From b15dfacb6026af3b0ba697e5753844923b468d2b Mon Sep 17 00:00:00 2001 From: yuhzheng Date: Fri, 7 Feb 2020 20:14:50 +0000 Subject: [PATCH] Update version number in readiness for V10.3.0 release. Sync SVN with reviewed release candidate. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2821 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../common/DemoTasks/SimpleHTTPSExamples.c | 4 +- .../https/common/WinPCap/arch.c | 4 +- .../https/common/WinPCap/netif.h | 4 +- .../https/common/demo_logging.c | 4 +- .../https/common/demo_logging.h | 4 +- .../https/common/main.c | 4 +- .../https/http_plain_text/FreeRTOSConfig.h | 4 +- .../https/http_plain_text/FreeRTOSIPConfig.h | 4 +- .../https/http_plain_text/demo_config.h | 4 +- .../FreeRTOSConfig.h | 4 +- .../FreeRTOSIPConfig.h | 4 +- .../https_basic_tls_server_auth/demo_config.h | 4 +- .../https_tls_mutual_auth/FreeRTOSConfig.h | 4 +- .../https_tls_mutual_auth/FreeRTOSIPConfig.h | 4 +- .../https/https_tls_mutual_auth/demo_config.h | 4 +- .../include/aws_iot_demo_profile.h | 4 +- .../include/aws_iot_setup_check.h | 4 +- .../include/https_demo_profile.h | 4 +- .../include/mqtt_demo_profile.h | 4 +- .../DemoTasks/JobsNotifyNextExamples.c | 4 +- .../jobs/jobs_notify_next/FreeRTOSConfig.h | 4 +- .../jobs/jobs_notify_next/FreeRTOSIPConfig.h | 4 +- .../jobs/jobs_notify_next/WinPCap/arch.c | 4 +- .../jobs/jobs_notify_next/WinPCap/netif.h | 4 +- .../jobs/jobs_notify_next/demo_config.h | 4 +- .../jobs/jobs_notify_next/demo_logging.c | 4 +- .../jobs/jobs_notify_next/demo_logging.h | 4 +- .../jobs/jobs_notify_next/main.c | 4 +- .../common/DemoTasks/LightWeightMQTTExample.c | 4 +- .../common/DemoTasks/SimpleMQTTExamples.c | 4 +- .../mqtt/common/Run-time-stats-utils.c | 4 +- .../mqtt/common/WinPCap/arch.c | 4 +- .../mqtt/common/WinPCap/netif.h | 4 +- .../mqtt/common/demo_logging.c | 4 +- .../mqtt/common/demo_logging.h | 4 +- .../FreeRTOS_IoT_Libraries/mqtt/common/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../FreeRTOSIPConfig.h | 4 +- .../mqtt_basic_tls_server_auth/demo_config.h | 4 +- .../mqtt/mqtt_plain_text/FreeRTOSConfig.h | 4 +- .../mqtt/mqtt_plain_text/FreeRTOSIPConfig.h | 4 +- .../mqtt/mqtt_plain_text/demo_config.h | 4 +- .../mqtt_tls_mutual_auth/FreeRTOSConfig.h | 4 +- .../mqtt_tls_mutual_auth/FreeRTOSIPConfig.h | 4 +- .../mqtt/mqtt_tls_mutual_auth/demo_config.h | 4 +- .../ShadowDeviceOperationsExamples.c | 4 +- .../shadow_device_operations/FreeRTOSConfig.h | 4 +- .../FreeRTOSIPConfig.h | 4 +- .../shadow_device_operations/WinPCap/arch.c | 4 +- .../shadow_device_operations/WinPCap/netif.h | 4 +- .../shadow_device_operations/demo_config.h | 4 +- .../shadow_device_operations/demo_logging.c | 4 +- .../shadow_device_operations/demo_logging.h | 4 +- .../shadow/shadow_device_operations/main.c | 4 +- .../js/aws_iot_demo_profile_template.js | 4 +- .../aws_iot_demo_profile.templ | 4 +- .../aws_iot_demo_profile_empty.templ | 4 +- .../DemoTasks/SimpleTaskPoolExamples.c | 4 +- .../utilities/task_pool/FreeRTOSConfig.h | 4 +- .../utilities/task_pool/FreeRTOSIPConfig.h | 4 +- .../utilities/task_pool/WinPCap/arch.c | 4 +- .../utilities/task_pool/WinPCap/netif.h | 4 +- .../utilities/task_pool/demo_config.h | 4 +- .../utilities/task_pool/demo_logging.c | 4 +- .../utilities/task_pool/demo_logging.h | 4 +- .../utilities/task_pool/main.c | 4 +- .../File-Related-CLI-commands.c | 2 +- .../Sample-CLI-commands.c | 2 +- .../UARTCommandConsole.c | 2 +- .../UDP-Related-CLI-commands.c | 2 +- .../CreateExampleFiles/File-system-demo.c | 2 +- .../CLICommands/CLI-commands.c | 2 +- .../CLICommands/UDPCommandInterpreter.h | 2 +- .../CLICommands/UDPCommandServer.c | 2 +- .../EchoClients/TwoEchoClients.c | 2 +- .../EchoClients/TwoEchoClients.h | 2 +- .../TraceMacros/Example1/DemoIPTrace.c | 2 +- .../TraceMacros/Example1/DemoIPTrace.h | 2 +- .../mqtt/DemoTasks/SimpleMQTTExamples.c | 548 - .../mqtt/FreeRTOSConfig.h | 210 - .../mqtt/FreeRTOSIPConfig.h | 307 - .../mqtt/READ_ME_INSTRUCTIONS.url | 5 - .../FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj | 224 - .../mqtt/WIN32.vcxproj.filters | 308 - .../mqtt/WinPCap/Packet32.h | 359 - .../mqtt/WinPCap/PacketData.h | 267 - .../mqtt/WinPCap/Win32-Extensions.h | 114 - .../mqtt/WinPCap/arch.c | 336 - .../mqtt/WinPCap/bittypes.h | 137 - .../mqtt/WinPCap/ip6_misc.h | 163 - .../mqtt/WinPCap/netif.h | 52 - .../mqtt/WinPCap/pcap-bpf.h | 47 - .../mqtt/WinPCap/pcap-namedb.h | 42 - .../mqtt/WinPCap/pcap-stdinc.h | 93 - .../mqtt/WinPCap/pcap.h | 45 - .../mqtt/WinPCap/pcap/bluetooth.h | 48 - .../mqtt/WinPCap/pcap/bpf.h | 934 -- .../mqtt/WinPCap/pcap/namedb.h | 89 - .../mqtt/WinPCap/pcap/pcap.h | 407 - .../mqtt/WinPCap/pcap/sll.h | 129 - .../mqtt/WinPCap/pcap/usb.h | 90 - .../mqtt/WinPCap/pcap/vlan.h | 46 - .../mqtt/WinPCap/remote-ext.h | 444 - .../mqtt/WinPCap/wpcap.lib | Bin 19320 -> 0 bytes .../Demo/FreeRTOS_IoT_Libraries/mqtt/atomic.h | 547 - .../mqtt/demo_logging.c | 526 - .../mqtt/demo_logging.h | 48 - .../FreeRTOS_IoT_Libraries/mqtt/iot_config.h | 122 - .../mqtt/iot_config_common.h | 200 - .../mqtt/iot_secure_sockets_config.h | 56 - .../Demo/FreeRTOS_IoT_Libraries/mqtt/main.c | 364 - .../FreeRTOS_IoT_Libraries/mqtt/mqtt_demo.sln | 23 - .../mqtt/printf-stdarg.c | 667 - .../DemoTasks/SimpleTaskPoolExamples.c | 695 - .../DemoTasks/SimpleUDPClientAndServer.c | 355 - .../task_pool/FreeRTOSConfig.h | 208 - .../task_pool/FreeRTOSIPConfig.h | 307 - .../task_pool/READ_ME_INSTRUCTIONS.url | 6 - .../task_pool/WIN32.vcxproj | 210 - .../task_pool/WIN32.vcxproj.filters | 260 - .../task_pool/WinPCap/Packet32.h | 359 - .../task_pool/WinPCap/PacketData.h | 267 - .../task_pool/WinPCap/Win32-Extensions.h | 114 - .../task_pool/WinPCap/arch.c | 336 - .../task_pool/WinPCap/bittypes.h | 137 - .../task_pool/WinPCap/ip6_misc.h | 163 - .../task_pool/WinPCap/netif.h | 52 - .../task_pool/WinPCap/pcap-bpf.h | 47 - .../task_pool/WinPCap/pcap-namedb.h | 42 - .../task_pool/WinPCap/pcap-stdinc.h | 93 - .../task_pool/WinPCap/pcap.h | 45 - .../task_pool/WinPCap/pcap/bluetooth.h | 48 - .../task_pool/WinPCap/pcap/bpf.h | 934 -- .../task_pool/WinPCap/pcap/namedb.h | 89 - .../task_pool/WinPCap/pcap/pcap.h | 407 - .../task_pool/WinPCap/pcap/sll.h | 129 - .../task_pool/WinPCap/pcap/usb.h | 90 - .../task_pool/WinPCap/pcap/vlan.h | 46 - .../task_pool/WinPCap/remote-ext.h | 444 - .../task_pool/WinPCap/wpcap.lib | Bin 19320 -> 0 bytes .../task_pool/demo_logging.c | 526 - .../task_pool/demo_logging.h | 48 - .../task_pool/iot_config.h | 94 - .../task_pool/iot_config_common.h | 197 - .../FreeRTOS_IoT_Libraries/task_pool/main.c | 210 - .../task_pool/printf-stdarg.c | 667 - .../task_pool/task_pool_demo.sln | 23 - .../CLI-commands.c | 2 +- .../FreeRTOSConfig.h | 2 +- .../Run-time-stats-utils.c | 2 +- .../UDPCommandServer.c | 2 +- .../main.c | 2 +- .../ConfigurationFiles/FreeRTOSConfig.h | 2 +- .../File-Related-CLI-commands.c | 2 +- .../File-system-demo.c | 2 +- .../Run-time-stats-utils.c | 2 +- .../Sample-CLI-commands.c | 2 +- .../UDPCommandServer.c | 2 +- .../main.c | 2 +- .../DemoTasks/SimpleUDPClientAndServer.c | 2 +- .../DemoTasks/TCPEchoClient_SingleTasks.c | 2 +- .../include/SimpleUDPClientAndServer.h | 2 +- .../include/TCPEchoClient_SingleTasks.h | 2 +- .../FreeRTOSConfig.h | 2 +- .../FreeRTOSIPConfig.h | 2 +- .../WinPCap/arch.c | 2 +- .../WinPCap/netif.h | 2 +- .../demo_logging.c | 2 +- .../demo_logging.h | 2 +- .../main.c | 2 +- .../FreeRTOSConfig.h | 2 +- .../SecureTCPClientTask.c | 2 +- .../SecureTCPServerTask.c | 2 +- .../main.c | 2 +- .../Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c | 1350 +- .../Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c | 2042 +-- .../Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c | 3112 ++-- .../Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c | 4674 +++--- .../FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c | 7350 +++++----- .../FreeRTOS_Stream_Buffer.c | 398 +- .../FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c | 6780 ++++----- .../FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c | 3996 ++--- .../FreeRTOS-Plus-TCP/FreeRTOS_UDP_IP.c | 808 +- .../Source/FreeRTOS-Plus-TCP/History.txt | 354 +- .../Source/FreeRTOS-Plus-TCP/ReadMe.url | 10 +- .../include/FreeRTOSIPConfigDefaults.h | 1138 +- .../FreeRTOS-Plus-TCP/include/FreeRTOS_ARP.h | 282 +- .../FreeRTOS-Plus-TCP/include/FreeRTOS_DHCP.h | 174 +- .../FreeRTOS-Plus-TCP/include/FreeRTOS_DNS.h | 274 +- .../FreeRTOS-Plus-TCP/include/FreeRTOS_IP.h | 674 +- .../include/FreeRTOS_IP_Private.h | 1654 +-- .../include/FreeRTOS_Sockets.h | 804 +- .../include/FreeRTOS_Stream_Buffer.h | 462 +- .../include/FreeRTOS_TCP_IP.h | 160 +- .../include/FreeRTOS_TCP_WIN.h | 426 +- .../include/FreeRTOS_UDP_IP.h | 112 +- .../include/FreeRTOS_errno_TCP.h | 180 +- .../include/IPTraceMacroDefaults.h | 386 +- .../include/NetworkBufferManagement.h | 140 +- .../include/NetworkInterface.h | 88 +- .../BufferManagement/BufferAllocation_1.c | 822 +- .../BufferManagement/BufferAllocation_2.c | 786 +- .../portable/Compiler/CompilerName/ReadMe.txt | 3 + .../Compiler/CompilerName/pack_struct_end.h | 32 + .../Compiler/CompilerName/pack_struct_start.h | 32 + .../portable/Compiler/GCC/pack_struct_end.h | 92 +- .../portable/Compiler/GCC/pack_struct_start.h | 96 +- .../portable/Compiler/IAR/pack_struct_end.h | 94 +- .../portable/Compiler/IAR/pack_struct_start.h | 98 +- .../portable/Compiler/Keil/pack_struct_end.h | 66 +- .../Compiler/Keil/pack_struct_start.h | 96 +- .../portable/Compiler/MSVC/pack_struct_end.h | 96 +- .../Compiler/MSVC/pack_struct_start.h | 94 +- .../Compiler/Renesas/pack_struct_end.h | 120 +- .../Compiler/Renesas/pack_struct_start.h | 116 +- .../ATSAM4E/NetworkInterface.c | 1274 +- .../NetworkInterface/ATSAM4E/component/gmac.h | 1492 +- .../NetworkInterface/ATSAM4E/ethernet_phy.c | 908 +- .../NetworkInterface/ATSAM4E/ethernet_phy.h | 562 +- .../portable/NetworkInterface/ATSAM4E/gmac.c | 1888 +-- .../portable/NetworkInterface/ATSAM4E/gmac.h | 2692 ++-- .../NetworkInterface/ATSAM4E/instance/gmac.h | 2698 ++-- .../NetworkInterface/Common/phyHandling.c | 721 - .../LPC17xx/NetworkInterface.c | 534 +- .../LPC18xx/NetworkInterface.c | 2136 +-- .../NetworkInterface/LPC18xx/ReadMe.txt | 4 +- .../NetworkInterface/M487/NetworkInterface.c | 662 +- .../portable/NetworkInterface/M487/m480_eth.c | 896 +- .../portable/NetworkInterface/M487/m480_eth.h | 328 +- .../README_DRIVER_DISCLAIMER.txt | 20 +- .../NetworkInterface/RX/NetworkInterface.c | 1251 +- .../NetworkInterface/RX/ether_callback.c | 354 +- .../NetworkInterface/SH2A/NetworkInterface.c | 236 +- .../STM32F7xx/NetworkInterface.c | 1193 -- .../STM32F7xx/stm32f7xx_hal_eth.c | 1835 --- .../STM32F7xx/stm32f7xx_hal_eth.h | 2214 --- .../STM32Fxx/NetworkInterface.c | 2708 ++-- .../NetworkInterface/STM32Fxx/readme.txt | 60 - .../STM32Fxx/stm32f2xx_hal_eth.h | 6 - .../STM32Fxx/stm32f4xx_hal_eth.c | 1833 --- .../STM32Fxx/stm32f4xx_hal_eth.h | 6 - .../STM32Fxx/stm32f7xx_hal_eth.h | 6 - .../STM32Fxx/stm32fxx_hal_eth.c | 1468 -- .../STM32Fxx/stm32fxx_hal_eth.h | 2262 --- .../NetworkInterface/WinPCap/FaultInjection.c | 350 +- .../WinPCap/NetworkInterface.c | 1268 +- .../NetworkInterface/Zynq/NetworkInterface.c | 796 +- .../portable/NetworkInterface/Zynq/README.txt | 50 +- .../NetworkInterface/Zynq/uncached_memory.c | 132 - .../NetworkInterface/Zynq/uncached_memory.h | 23 - .../NetworkInterface/Zynq/x_emacpsif.h | 288 +- .../NetworkInterface/Zynq/x_emacpsif_dma.c | 1252 +- .../NetworkInterface/Zynq/x_emacpsif_hw.c | 486 +- .../NetworkInterface/Zynq/x_emacpsif_hw.h | 78 +- .../Zynq/x_emacpsif_physpeed.c | 1170 +- .../NetworkInterface/Zynq/x_topology.h | 92 +- .../board_family/NetworkInterface.c | 124 +- .../NetworkInterface/esp32/NetworkInterface.c | 328 +- .../NetworkInterface/include/phyHandling.h | 118 - .../ksz8851snl/NetworkInterface.c | 2544 ++-- .../NetworkInterface/ksz8851snl/ksz8851snl.c | 610 - .../NetworkInterface/ksz8851snl/ksz8851snl.h | 67 - .../ksz8851snl/ksz8851snl_reg.h | 473 - .../mw300_rd/NetworkInterface.c | 434 +- .../pic32mzef/BufferAllocation_2.c | 1240 +- .../pic32mzef/NetworkInterface_eth.c | 1778 +-- .../pic32mzef/NetworkInterface_wifi.c | 384 +- .../Source/FreeRTOS-Plus-TCP/readme.txt | 36 +- .../ARM7_AT91FR40008_GCC/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile | 4 +- .../ARM7_AT91FR40008_GCC/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c | 4 +- .../Demo/ARM7_AT91FR40008_GCC/serial/serial.c | 4 +- .../ARM7_AT91FR40008_GCC/serial/serialISR.c | 4 +- .../ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h | 4 +- .../ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c | 4 +- .../Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c | 4 +- FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c | 4 +- .../Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c | 4 +- .../Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile | 4 +- .../Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c | 4 +- .../Demo/ARM7_LPC2106_GCC/serial/serial.c | 4 +- .../Demo/ARM7_LPC2106_GCC/serial/serialISR.c | 4 +- .../Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h | 4 +- .../Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c | 4 +- .../Demo/ARM7_LPC2129_IAR/serial/serial.c | 4 +- .../ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h | 4 +- .../ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c | 4 +- .../ARM7_LPC2129_Keil_RVDS/serial/serial.c | 4 +- .../ARM7_LPC2129_Keil_RVDS/serial/serialISR.s | 4 +- .../Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c | 4 +- FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../ARM7_LPC2368_Eclipse/RTOSDemo/Makefile | 4 +- .../RTOSDemo/ParTest/ParTest.c | 4 +- .../Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c | 4 +- .../RTOSDemo/webserver/uIP_Task.c | 4 +- .../Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h | 4 +- .../ARM7_LPC2368_Rowley/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c | 4 +- .../ARM7_LPC2368_Rowley/webserver/uIP_Task.c | 4 +- .../Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h | 4 +- .../Demo/ARM7_STR71x_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_STR71x_IAR/main.c | 4 +- FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c | 4 +- .../Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h | 4 +- .../Demo/ARM7_STR75x_GCC/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_STR75x_GCC/main.c | 4 +- FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c | 4 +- .../Demo/ARM7_STR75x_GCC/serial/serialISR.c | 4 +- .../Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h | 4 +- .../Demo/ARM7_STR75x_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM7_STR75x_IAR/main.c | 4 +- FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c | 4 +- .../Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h | 4 +- .../ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c | 4 +- .../Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c | 4 +- .../Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h | 4 +- .../Demo/ARM9_STR91X_IAR/ParTest/ParTest.c | 4 +- .../lwip/include/lwIPWebServer/BasicWEB.h | 4 +- .../lwip/lwipWebServer/BasicWEB.c | 4 +- FreeRTOS/Demo/ARM9_STR91X_IAR/main.c | 4 +- FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c | 4 +- .../Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c | 4 +- FreeRTOS/Demo/AVR32_UC3/main.c | 4 +- .../Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h | 4 +- .../Demo/AVR_ATMega323_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/AVR_ATMega323_IAR/main.c | 4 +- FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c | 4 +- FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h | 4 +- .../Demo/AVR_ATMega323_IAR/serial/serial.c | 4 +- .../AVR_ATMega323_WinAVR/FreeRTOSConfig.h | 4 +- .../AVR_ATMega323_WinAVR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c | 4 +- FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c | 4 +- FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h | 4 +- .../Demo/AVR_ATMega323_WinAVR/serial/serial.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c | 4 +- .../CORTEX_A2F200_IAR_and_Keil/main-blinky.c | 4 +- .../CORTEX_A2F200_IAR_and_Keil/main-full.c | 4 +- .../CORTEX_A2F200_IAR_and_Keil/uIP_Task.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_A2F200_SoftConsole/ParTest.c | 4 +- .../CORTEX_A2F200_SoftConsole/main-blinky.c | 4 +- .../CORTEX_A2F200_SoftConsole/main-full.c | 4 +- .../Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../RTOSDemo_A53/src/FreeRTOSConfig.h | 4 +- .../RTOSDemo_A53/src/FreeRTOS_tick_config.c | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../RTOSDemo_A53/src/Full_Demo/main_full.c | 4 +- .../RTOSDemo_A53/src/Full_Demo/reg_test.S | 4 +- .../RTOSDemo_A53/src/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../FreeRTOS_tick_config.c | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/main_full.c | 4 +- .../Full_Demo/reg_test.S | 4 +- .../CORTEX_A5_SAMA5D2x_Xplained_IAR/LEDs.c | 4 +- .../blinky_demo/main_blinky.c | 4 +- .../CORTEX_A5_SAMA5D2x_Xplained_IAR/main.c | 4 +- .../CDCCommandConsole.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../FreeRTOS_tick_config.c | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/main_full.c | 4 +- .../Full_Demo/reg_test.S | 4 +- .../CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c | 4 +- .../blinky_demo/main_blinky.c | 4 +- .../CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c | 4 +- .../Blinky_Demo/main_blinky.c | 4 +- .../CDCCommandConsole.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../FreeRTOS_tick_config.c | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/main_full.c | 4 +- .../Full_Demo/reg_test.S | 4 +- .../Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c | 4 +- .../Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_A9_Cyclone_V_SoC_DK/LEDs.c | 4 +- .../Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c | 4 +- .../CORTEX_A9_Cyclone_V_SoC_DK/main_blinky.c | 4 +- .../CORTEX_A9_Cyclone_V_SoC_DK/main_full.c | 4 +- .../CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S | 4 +- .../Demo/CORTEX_A9_Cyclone_V_SoC_DK/serial.c | 4 +- .../RTOSDemo/src/Blinky_Demo/main_blinky.c | 4 +- .../RTOSDemo/src/FreeRTOSConfig.h | 4 +- .../RTOSDemo/src/FreeRTOS_tick_config.c | 4 +- .../RTOSDemo/src/Full_Demo/IntQueueTimer.c | 4 +- .../RTOSDemo/src/Full_Demo/IntQueueTimer.h | 4 +- .../RTOSDemo/src/Full_Demo/main_full.c | 4 +- .../RTOSDemo/src/Full_Demo/reg_test.S | 4 +- .../RTOSDemo/src/Full_Demo/serial.c | 4 +- .../RTOSDemo/src/ParTest.c | 4 +- .../BasicSocketCommandServer.c | 4 +- .../src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c | 4 +- .../src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h | 4 +- .../RTOSDemo/src/lwIP_Demo/main_lwIP.c | 4 +- .../CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c | 4 +- .../CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h | 4 +- .../CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c | 4 +- .../CORTEX_AT91SAM3U256_IAR/lcd_message.h | 4 +- FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c | 4 +- .../CORTEX_AT91SAM3U256_IAR/serial/serial.c | 4 +- .../src/Common-Demo-Source/comtest.c | 4 +- .../Common-Demo-Source/include/demo_serial.h | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/ParTest.c | 4 +- .../src/main.c | 4 +- .../src/main_blinky.c | 4 +- .../src/main_full.c | 4 +- .../src/serial.c | 4 +- .../src/Common-Demo-Source/comtest.c | 4 +- .../Common-Demo-Source/include/demo_serial.h | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c | 4 +- .../CORTEX_ATSAM3X_Atmel_Studio/src/main.c | 4 +- .../src/main_blinky.c | 4 +- .../src/main_full.c | 4 +- .../CORTEX_ATSAM3X_Atmel_Studio/src/serial.c | 4 +- .../FreeRTOS_Demo.cydsn/FreeRTOSConfig.h | 4 +- .../FreeRTOS_Demo.cydsn/IntQueueTimer.c | 4 +- .../FreeRTOS_Demo.cydsn/IntQueueTimer.h | 4 +- .../FreeRTOS_Demo.cydsn/ParTest.c | 4 +- .../FreeRTOS_Demo.cydsn/Serial.c | 4 +- .../FreeRTOS_Demo.cydsn/TimerTest.c | 4 +- .../FreeRTOS_Demo.cydsn/main.c | 4 +- .../FreeRTOS_Demo.cydsn/FreeRTOSConfig.h | 4 +- .../FreeRTOS_Demo.cydsn/IntQueueTimer.c | 4 +- .../FreeRTOS_Demo.cydsn/IntQueueTimer.h | 4 +- .../FreeRTOS_Demo.cydsn/ParTest.c | 4 +- .../FreeRTOS_Demo.cydsn/Serial.c | 4 +- .../FreeRTOS_Demo.cydsn/TimerTest.c | 4 +- .../FreeRTOS_Demo.cydsn/main.c | 4 +- .../FreeRTOS_Demo.cydsn/FreeRTOSConfig.h | 4 +- .../FreeRTOS_Demo.cydsn/IntQueueTimer.c | 4 +- .../FreeRTOS_Demo.cydsn/IntQueueTimer.h | 4 +- .../FreeRTOS_Demo.cydsn/ParTest.c | 4 +- .../FreeRTOS_Demo.cydsn/Serial.c | 4 +- .../FreeRTOS_Demo.cydsn/TimerTest.c | 4 +- .../FreeRTOS_Demo.cydsn/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/RegTest.c | 4 +- .../Full_Demo/main_full.c | 4 +- .../low_power_tick_management_BURTC.c | 4 +- .../low_power_tick_management_RTC.c | 4 +- .../Low_Power_Demo/main_low_power.c | 4 +- .../main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/RegTest.c | 4 +- .../Full_Demo/main_full.c | 4 +- .../low_power_tick_management_RTCC.c | 4 +- .../Low_Power_Demo/main_low_power.c | 4 +- .../main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../CORTEX_Kinetis_K60_Tower_IAR/ParTest.c | 4 +- .../CORTEX_Kinetis_K60_Tower_IAR/main-full.c | 4 +- .../main_blinky.c | 4 +- .../CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c | 4 +- .../webserver/EMAC.c | 4 +- .../webserver/EMAC.h | 4 +- .../CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c | 4 +- .../CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c | 4 +- .../Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c | 4 +- .../Demo1/FreeRTOSConfig.h | 4 +- .../CORTEX_LM3S102_Rowley/Demo1/ParTest.c | 4 +- .../Demo/CORTEX_LM3S102_Rowley/Demo1/main.c | 4 +- .../Demo2/FreeRTOSConfig.h | 4 +- .../CORTEX_LM3S102_Rowley/Demo2/ParTest.c | 4 +- .../Demo/CORTEX_LM3S102_Rowley/Demo2/main.c | 4 +- .../Demo3/FreeRTOSConfig.h | 4 +- .../CORTEX_LM3S102_Rowley/Demo3/ParTest.c | 4 +- .../Demo/CORTEX_LM3S102_Rowley/Demo3/main.c | 4 +- .../Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c | 4 +- FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h | 4 +- FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c | 4 +- .../Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c | 4 +- .../Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c | 4 +- .../Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c | 4 +- FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c | 4 +- .../CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h | 4 +- .../CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c | 4 +- .../CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h | 4 +- .../ParTest/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c | 4 +- .../Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c | 4 +- .../CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c | 4 +- .../webserver/uIP_Task.c | 4 +- .../CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h | 4 +- .../CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c | 4 +- .../CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h | 4 +- .../CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c | 4 +- .../Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c | 4 +- .../CORTEX_LM3Sxxxx_Rowley/webserver/emac.c | 4 +- .../webserver/uIP_Task.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c | 4 +- .../CORTEX_LPC1768_GCC_RedSuite/src/main.c | 4 +- .../src/webserver/emac.c | 4 +- .../src/webserver/uIP_Task.c | 4 +- .../FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h | 4 +- .../Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c | 4 +- .../Demo/CORTEX_LPC1768_GCC_Rowley/main.c | 4 +- .../webserver/emac.c | 4 +- .../webserver/uIP_Task.c | 4 +- .../Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h | 4 +- FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c | 4 +- .../Demo/CORTEX_LPC1768_IAR/webserver/emac.c | 4 +- .../CORTEX_LPC1768_IAR/webserver/uIP_Task.c | 4 +- .../RTOSDemo/src/RegTest.c | 4 +- .../RTOSDemo/src/Sample-CLI-commands.c | 4 +- .../RTOSDemo/src/UARTCommandConsole.c | 4 +- .../RTOSDemo/src/UARTCommandConsole.h | 4 +- .../RTOSDemo/src/config/FreeRTOSConfig.h | 4 +- .../RTOSDemo/src/main-blinky.c | 4 +- .../RTOSDemo/src/main-full.c | 4 +- .../RTOSDemo/src/main.c | 4 +- .../GCC_specific/RegTest.c | 4 +- .../GCC_specific/compiler_attributes.h | 4 +- .../IAR_specific/RegTest_IAR.s | 4 +- .../IAR_specific/compiler_attributes.h | 4 +- .../Keil_specific/RegTest_Keil.s | 4 +- .../Keil_specific/compiler_attributes.h | 4 +- .../app/FreeRTOSConfig.h | 4 +- .../app/IntQueueTimer.c | 4 +- .../app/IntQueueTimer.h | 4 +- .../app/main_blinky.c | 4 +- .../app/main_full.c | 4 +- .../Atollic_Specific/RegTest.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../IAR_Specific/RegTest_IAR.s | 4 +- .../Keil_Specific/RegTest_Keil.s | 4 +- .../ParTest_XMC1100.c | 4 +- .../ParTest_XMC1200.c | 4 +- .../ParTest_XMC1300.c | 4 +- .../main-blinky.c | 4 +- .../main-full.c | 4 +- .../main.c | 4 +- .../RTOSDemo/Source/FreeRTOSConfig.h | 4 +- .../RTOSDemo/Source/IntQueueTimer.c | 4 +- .../RTOSDemo/Source/IntQueueTimer.h | 4 +- .../RTOSDemo/Source/RegTest.c | 4 +- .../RTOSDemo/Source/main-blinky.c | 4 +- .../RTOSDemo/Source/main-full.c | 4 +- .../RTOSDemo/Source/main.c | 4 +- .../CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c | 4 +- .../Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s | 4 +- .../CORTEX_M0_STM32F0518_IAR/main-blinky.c | 4 +- .../Demo/CORTEX_M0_STM32F0518_IAR/main-full.c | 4 +- FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../GCC_Specific/RegTest.c | 4 +- .../Keil_Specific/RegTest.c | 4 +- .../Demo/CORTEX_M4F_CEC1302_Keil_GCC/main.c | 4 +- .../main_full/IntQueueTimer.c | 4 +- .../main_full/IntQueueTimer.h | 4 +- .../main_full/main_full.c | 4 +- .../main_low_power/low_power_tick_config.c | 4 +- .../main_low_power/main_low_power.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../MikroC_Specific/RegTest.c | 4 +- .../Demo/CORTEX_M4F_CEC1302_MikroC/main.c | 4 +- .../main_full/IntQueueTimer.c | 4 +- .../main_full/IntQueueTimer.h | 4 +- .../main_full/main_full.c | 4 +- .../main_low_power/low_power_tick_config.c | 4 +- .../main_low_power/main_low_power.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../main.c | 4 +- .../main_blinky.c | 4 +- .../main_full.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s | 4 +- .../CORTEX_M4F_Infineon_XMC4000_IAR/main.c | 4 +- .../main_blinky.c | 4 +- .../main_full.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../RegTest.c | 4 +- .../CORTEX_M4F_Infineon_XMC4000_Keil/main.c | 4 +- .../main_blinky.c | 4 +- .../main_full.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../main.c | 4 +- .../main_blinky.c | 4 +- .../main_full.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/main.c | 4 +- .../src/main_blinky.c | 4 +- .../src/main_full.c | 4 +- .../M4/FreeRTOSConfig.h | 4 +- .../CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c | 4 +- .../CORTEX_M4F_M0_LPC43xx_Keil/M4/RegTest.c | 4 +- .../Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/RegTest.asm | 4 +- .../Full_Demo/RegTest.c | 4 +- .../Full_Demo/RegTest.s | 4 +- .../Full_Demo/RunTimeStatsTimer.c | 4 +- .../Full_Demo/main_full.c | 4 +- .../Full_Demo/serial.c | 4 +- .../SimplyBlinkyDemo/main_blinky.c | 4 +- .../main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c | 4 +- .../Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s | 4 +- .../Demo/CORTEX_M4F_STM32F407ZG-SK/main.c | 4 +- .../src/ParTest.c | 4 +- .../src/SAM4L_low_power_tick_management.c | 4 +- .../src/config/FreeRTOSConfig.h | 4 +- .../CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c | 4 +- .../src/main_full.c | 4 +- .../src/main_low_power.c | 4 +- .../src/Common-Demo-Source/comtest.c | 4 +- .../Common-Demo-Source/include/demo_serial.h | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/IntQueueTimer.c | 4 +- .../src/IntQueueTimer.h | 4 +- .../src/ParTest.c | 4 +- .../CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c | 4 +- .../src/main_blinky.c | 4 +- .../src/main_full.c | 4 +- .../src/serial.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/RegTest.asm | 4 +- .../Full_Demo/main_full.c | 4 +- .../Simply_Blinky_Demo/main_blinky.c | 4 +- .../CORTEX_M4_SimpleLink_CC3220SF_CCS/main.c | 4 +- .../CM4/main.c | 4 +- .../CM7/main.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/RegTest_GCC.c | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/main.c | 4 +- .../Blinky_Demo/main_blinky.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/RegTest_GCC.c | 4 +- .../Full_Demo/main_full.c | 4 +- .../main.c | 4 +- .../Blinky_Demo/main_blinky.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/RegTest.c | 4 +- .../Full_Demo/RegTest.s | 4 +- .../Full_Demo/main_full.c | 4 +- .../CORTEX_M7_SAMV71_Xplained_IAR_Keil/main.c | 4 +- .../Blinky_Demo/main_blinky.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/RegTest_IAR.s | 4 +- .../Full_Demo/RegTest_Keil.c | 4 +- .../Full_Demo/main_full.c | 4 +- .../main.c | 4 +- .../CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c | 4 +- .../Demo/CORTEX_MB9A310_IAR_Keil/main-full.c | 4 +- .../CORTEX_MB9A310_IAR_Keil/main_blinky.c | 4 +- .../Demo/CORTEX_MB9A310_IAR_Keil/serial.c | 4 +- .../CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h | 4 +- .../Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c | 4 +- .../Demo/CORTEX_MB9B500_IAR_Keil/main-full.c | 4 +- .../CORTEX_MB9B500_IAR_Keil/main_blinky.c | 4 +- .../Demo/CORTEX_MB9B500_IAR_Keil/serial.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../GCC_Specific/RegTest.c | 4 +- .../Keil_Specific/RegTest.c | 4 +- .../main.c | 4 +- .../Config/FreeRTOSConfig.h | 4 +- .../Demo/main.c | 4 +- .../Demo/mpu_demo.c | 4 +- .../Demo/mpu_demo.h | 4 +- .../MCUXpresso/Startup/memfault_handler.c | 4 +- .../Projects/IAR/Config/FreeRTOSConfig.h | 4 +- .../Projects/IAR/NonSecure/fault_handler.s | 4 +- .../Projects/IAR/NonSecure/main_ns.c | 4 +- .../Projects/IAR/Secure/main_s.c | 4 +- .../Projects/Keil/Config/FreeRTOSConfig.h | 4 +- .../Projects/Keil/NonSecure/main_ns.c | 4 +- .../Projects/Keil/Secure/main_s.c | 4 +- .../MCUXpresso/Config/FreeRTOSConfig.h | 4 +- .../Projects/MCUXpresso/NonSecure/main_ns.c | 4 +- .../Projects/MCUXpresso/Secure/main_s.c | 4 +- .../Config/FreeRTOSConfig.h | 4 +- .../NonSecure/main_ns.c | 4 +- .../Secure/main_s.c | 4 +- .../Config/FreeRTOSConfig.h | 4 +- .../Demo/app_main.c | 4 +- .../Demo/app_main.h | 4 +- .../Demo/mpu_demo.c | 4 +- .../Demo/mpu_demo.h | 4 +- .../Projects/GCC/Startup/memfault_handler.c | 4 +- .../Config/FreeRTOSConfig.h | 4 +- .../Demo/app_main.c | 4 +- .../Demo/app_main.h | 4 +- .../Demo/mpu_demo.c | 4 +- .../Demo/mpu_demo.h | 4 +- .../Projects/GCC/Startup/memfault_handler.c | 4 +- .../Projects/IAR/memfault_handler.s | 4 +- .../Projects/Keil/memfault_handler.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../GCC_Specific/RegTest.c | 4 +- .../Keil_Specific/RegTest.c | 4 +- .../Demo/CORTEX_MPU_Simulator_Keil_GCC/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../GCC_Specific/RegTest.c | 4 +- .../Keil_Specific/RegTest.c | 4 +- .../main.c | 4 +- .../System/IAR/Interrupt_Entry_Stubs.asm | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/FreeRTOS_tick_config.c | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/Full_Demo/reg_test_GCC.S | 4 +- .../src/Full_Demo/reg_test_IAR.asm | 4 +- .../Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../CORTEX_R4_RM48_TMS570_CCS5/Library/het.c | 4 +- .../CORTEX_R4_RM48_TMS570_CCS5/Library/het.h | 4 +- .../Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c | 4 +- .../flop_hercules.c | 4 +- .../flop_hercules.h | 4 +- .../Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c | 4 +- .../CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c | 4 +- .../CORTEX_R4_RM48_TMS570_CCS5/main_full.c | 4 +- .../CORTEX_R4_RM48_TMS570_CCS5/reg_test.asm | 4 +- .../Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c | 4 +- .../RTOSDemo_R5/src/Blinky_Demo/main_blinky.c | 4 +- .../RTOSDemo_R5/src/FreeRTOSConfig.h | 4 +- .../RTOSDemo_R5/src/FreeRTOS_tick_config.c | 4 +- .../RTOSDemo_R5/src/Full_Demo/IntQueueTimer.c | 4 +- .../RTOSDemo_R5/src/Full_Demo/IntQueueTimer.h | 4 +- .../RTOSDemo_R5/src/Full_Demo/main_full.c | 4 +- .../RTOSDemo_R5/src/Full_Demo/reg_test.S | 4 +- .../RTOSDemo_R5/src/main.c | 4 +- .../Simple_Demo_Source/FreeRTOSConfig.h | 4 +- .../Simple_Demo_Source/main.c | 4 +- .../Drivers/STM32_USART.c | 4 +- .../Drivers/STM32_USART.h | 4 +- .../FreeRTOSConfig.h | 4 +- .../ParTest/ParTest_MCBSTM32.c | 4 +- .../ParTest/ParTest_ST_Eval.c | 4 +- .../Demo/CORTEX_STM32F103_GCC_Rowley/main.c | 4 +- .../CORTEX_STM32F103_IAR/FreeRTOSConfig.h | 4 +- .../CORTEX_STM32F103_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c | 4 +- .../Demo/CORTEX_STM32F103_IAR/serial/serial.c | 4 +- .../Demo/CORTEX_STM32F103_IAR/timertest.c | 4 +- .../CORTEX_STM32F103_Keil/FreeRTOSConfig.h | 4 +- .../CORTEX_STM32F103_Keil/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c | 4 +- .../CORTEX_STM32F103_Keil/serial/serial.c | 4 +- .../Demo/CORTEX_STM32F103_Keil/timertest.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../ParTest/ParTest.c | 4 +- .../Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h | 4 +- .../Demo/CORTEX_STM32F103_Primer_GCC/main.c | 4 +- .../CORTEX_STM32F103_Primer_GCC/timertest.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../ParTest/ParTest.c | 4 +- .../Demo/CORTEX_STM32F107_GCC_Rowley/main.c | 4 +- .../Demo/CORTEX_STM32F107_GCC_Rowley/scsc.tmp | 4 +- .../CORTEX_STM32F107_GCC_Rowley/timertest.c | 4 +- .../webserver/emac.c | 4 +- .../webserver/emac.c.scsc | 4 +- .../webserver/emac.h | 4 +- .../webserver/emac.h.scsc | 4 +- .../webserver/uIP_Task.c | 4 +- .../STM32L_low_power_tick_management.c | 4 +- .../include/FreeRTOSConfig.h | 4 +- .../CORTEX_STM32L152_Discovery_IAR/main.c | 4 +- .../main_full.c | 4 +- .../main_low_power.c | 4 +- .../CORTEX_STM32L152_IAR/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c | 4 +- FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c | 4 +- FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h | 4 +- .../CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c | 4 +- FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c | 4 +- .../Sources/FreeRTOSConfig.h | 4 +- .../Sources/ParTest/ParTest.c | 4 +- .../Sources/httpd/uIP_Task.c | 4 +- .../Sources/main.c | 4 +- .../sources/FreeRTOSConfig.h | 4 +- .../sources/FreeRTOS_Tick_Setup.c | 4 +- .../sources/ParTest/ParTest.c | 4 +- .../sources/main.c | 4 +- .../sources/serial/serial.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../FreeRTOS_Tick_Setup.c | 4 +- .../ColdFire_MCF52259_CodeWarrior/HTTPDemo.c | 4 +- .../ColdFire_MCF52259_CodeWarrior/HTTPDemo.h | 4 +- .../ParTest/ParTest.c | 4 +- .../Demo/ColdFire_MCF52259_CodeWarrior/main.c | 4 +- .../Demo/Common/ARMv8M/mpu_demo/mpu_demo.c | 4 +- .../Demo/Common/ARMv8M/mpu_demo/mpu_demo.h | 4 +- .../Common/ARMv8M/tz_demo/nsc_functions.c | 4 +- .../Common/ARMv8M/tz_demo/nsc_functions.h | 4 +- FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.c | 4 +- FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.h | 4 +- FreeRTOS/Demo/Common/Full/BlockQ.c | 4 +- FreeRTOS/Demo/Common/Full/PollQ.c | 4 +- FreeRTOS/Demo/Common/Full/comtest.c | 4 +- FreeRTOS/Demo/Common/Full/death.c | 4 +- FreeRTOS/Demo/Common/Full/dynamic.c | 4 +- FreeRTOS/Demo/Common/Full/events.c | 4 +- FreeRTOS/Demo/Common/Full/flash.c | 4 +- FreeRTOS/Demo/Common/Full/flop.c | 4 +- FreeRTOS/Demo/Common/Full/integer.c | 4 +- FreeRTOS/Demo/Common/Full/print.c | 4 +- FreeRTOS/Demo/Common/Full/semtest.c | 4 +- FreeRTOS/Demo/Common/Minimal/AbortDelay.c | 4 +- FreeRTOS/Demo/Common/Minimal/BlockQ.c | 4 +- .../Demo/Common/Minimal/EventGroupsDemo.c | 4 +- FreeRTOS/Demo/Common/Minimal/GenQTest.c | 4 +- FreeRTOS/Demo/Common/Minimal/IntQueue.c | 4 +- FreeRTOS/Demo/Common/Minimal/IntSemTest.c | 4 +- .../Demo/Common/Minimal/MessageBufferAMP.c | 4 +- .../Demo/Common/Minimal/MessageBufferDemo.c | 4 +- FreeRTOS/Demo/Common/Minimal/PollQ.c | 4 +- FreeRTOS/Demo/Common/Minimal/QPeek.c | 4 +- FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c | 4 +- FreeRTOS/Demo/Common/Minimal/QueueSet.c | 4 +- .../Demo/Common/Minimal/QueueSetPolling.c | 4 +- .../Demo/Common/Minimal/StaticAllocation.c | 4 +- .../Demo/Common/Minimal/StreamBufferDemo.c | 4 +- .../Common/Minimal/StreamBufferInterrupt.c | 4 +- FreeRTOS/Demo/Common/Minimal/TaskNotify.c | 4 +- FreeRTOS/Demo/Common/Minimal/TimerDemo.c | 4 +- FreeRTOS/Demo/Common/Minimal/blocktim.c | 4 +- FreeRTOS/Demo/Common/Minimal/comtest.c | 4 +- .../Demo/Common/Minimal/comtest_strings.c | 4 +- FreeRTOS/Demo/Common/Minimal/countsem.c | 4 +- FreeRTOS/Demo/Common/Minimal/crflash.c | 4 +- FreeRTOS/Demo/Common/Minimal/crhook.c | 4 +- FreeRTOS/Demo/Common/Minimal/death.c | 4 +- FreeRTOS/Demo/Common/Minimal/dynamic.c | 4 +- FreeRTOS/Demo/Common/Minimal/flash.c | 4 +- FreeRTOS/Demo/Common/Minimal/flash_timer.c | 4 +- FreeRTOS/Demo/Common/Minimal/flop.c | 4 +- FreeRTOS/Demo/Common/Minimal/integer.c | 4 +- FreeRTOS/Demo/Common/Minimal/recmutex.c | 4 +- FreeRTOS/Demo/Common/Minimal/semtest.c | 4 +- FreeRTOS/Demo/Common/Minimal/sp_flop.c | 4 +- .../MicroBlaze-Ethernet-Lite/ethernetif.c | 4 +- .../lwip-1.4.0/ports/win32/WinPCap/arch.c | 4 +- .../lwip-1.4.0/ports/win32/WinPCap/netif.h | 4 +- .../lwip-1.4.0/ports/win32/ethernetif.c | 4 +- FreeRTOS/Demo/Common/include/AbortDelay.h | 4 +- FreeRTOS/Demo/Common/include/BlockQ.h | 4 +- .../Demo/Common/include/EventGroupsDemo.h | 4 +- FreeRTOS/Demo/Common/include/GenQTest.h | 4 +- FreeRTOS/Demo/Common/include/IntQueue.h | 4 +- FreeRTOS/Demo/Common/include/IntSemTest.h | 4 +- .../Demo/Common/include/MessageBufferAMP.h | 4 +- .../Demo/Common/include/MessageBufferDemo.h | 4 +- FreeRTOS/Demo/Common/include/PollQ.h | 4 +- FreeRTOS/Demo/Common/include/QPeek.h | 4 +- FreeRTOS/Demo/Common/include/QueueOverwrite.h | 4 +- FreeRTOS/Demo/Common/include/QueueSet.h | 4 +- .../Demo/Common/include/QueueSetPolling.h | 4 +- .../Demo/Common/include/StaticAllocation.h | 4 +- .../Demo/Common/include/StreamBufferDemo.h | 4 +- .../Common/include/StreamBufferInterrupt.h | 4 +- FreeRTOS/Demo/Common/include/TaskNotify.h | 4 +- FreeRTOS/Demo/Common/include/TimerDemo.h | 4 +- FreeRTOS/Demo/Common/include/blocktim.h | 4 +- FreeRTOS/Demo/Common/include/comtest.h | 4 +- FreeRTOS/Demo/Common/include/comtest2.h | 4 +- .../Demo/Common/include/comtest_strings.h | 4 +- FreeRTOS/Demo/Common/include/countsem.h | 4 +- FreeRTOS/Demo/Common/include/crflash.h | 4 +- FreeRTOS/Demo/Common/include/crhook.h | 4 +- FreeRTOS/Demo/Common/include/death.h | 4 +- FreeRTOS/Demo/Common/include/dynamic.h | 4 +- FreeRTOS/Demo/Common/include/fileIO.h | 4 +- FreeRTOS/Demo/Common/include/flash.h | 4 +- FreeRTOS/Demo/Common/include/flash_timer.h | 4 +- FreeRTOS/Demo/Common/include/flop.h | 4 +- FreeRTOS/Demo/Common/include/integer.h | 4 +- FreeRTOS/Demo/Common/include/mevents.h | 4 +- FreeRTOS/Demo/Common/include/partest.h | 4 +- FreeRTOS/Demo/Common/include/print.h | 4 +- FreeRTOS/Demo/Common/include/recmutex.h | 4 +- FreeRTOS/Demo/Common/include/semtest.h | 4 +- FreeRTOS/Demo/Common/include/serial.h | 4 +- FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/Cygnal/Makefile | 4 +- FreeRTOS/Demo/Cygnal/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/Cygnal/main.c | 4 +- FreeRTOS/Demo/Cygnal/serial/serial.c | 4 +- FreeRTOS/Demo/Flshlite/FRConfig.h | 4 +- FreeRTOS/Demo/Flshlite/FileIO/fileIO.c | 4 +- FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/Flshlite/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/Flshlite/main.c | 4 +- FreeRTOS/Demo/Flshlite/serial/serial.c | 4 +- FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/H8S/RTOSDemo/main.c | 4 +- FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c | 4 +- .../CODE/{COM0.C => _COM0.C} | 0 .../CODE/{COM0.H => _COM0.H} | 0 .../HCS12_CodeWarrior_banked/FreeRTOSConfig.h | 4 +- .../ParTest/ParTest.c | 4 +- FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c | 4 +- .../HCS12_CodeWarrior_banked/serial/serial.c | 4 +- .../HCS12_CodeWarrior_small/FreeRTOSConfig.h | 4 +- .../HCS12_CodeWarrior_small/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c | 4 +- .../HCS12_CodeWarrior_small/serial/serial.c | 4 +- .../Demo/HCS12_GCC_banked/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c | 4 +- FreeRTOS/Demo/HCS12_GCC_banked/main.c | 4 +- FreeRTOS/Demo/HCS12_GCC_banked/startup.c | 4 +- .../Blinky_Demo/main_blinky.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/IntQueueTimer.c | 4 +- .../Full_Demo/IntQueueTimer.h | 4 +- .../Full_Demo/RegTest.S | 4 +- .../Full_Demo/main_full.c | 4 +- .../Support_Files/freestanding_functions.c | 4 +- .../Support_Files/math.h | 4 +- .../Support_Files/startup.S | 4 +- .../Support_Files/stdint.h | 4 +- .../Demo/IA32_flat_GCC_Galileo_Gen_2/main.c | 4 +- .../Demo/MB91460_Softune/SRC/FreeRTOSConfig.h | 4 +- .../MB91460_Softune/SRC/crflash_modified.c | 4 +- FreeRTOS/Demo/MB91460_Softune/SRC/main.c | 4 +- .../MB91460_Softune/SRC/partest/partest.c | 4 +- .../Demo/MB91460_Softune/SRC/serial/serial.c | 4 +- .../Src/FreeRTOSConfig.h | 4 +- .../Src/crflash_sk16fx100mpc.c | 4 +- .../FreeRTOS_96348hs_SK16FX100PMC/Src/main.c | 4 +- .../Src/partest/partest.c | 4 +- .../Src/serial/serial.c | 4 +- .../Demo/MB96350_Softune_Dice_Kit/DiceTask.c | 4 +- .../Demo/MB96350_Softune_Dice_Kit/DiceTask.h | 4 +- .../MB96350_Softune_Dice_Kit/FreeRTOSConfig.h | 4 +- .../ParTest/ParTest.c | 4 +- .../SegmentToggleTasks.c | 4 +- FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c | 4 +- .../Demo_Source/FreeRTOSConfig.h | 4 +- .../Demo_Source/ParTest.c | 4 +- .../Demo_Source/RegTest.asm | 4 +- .../Demo_Source/RunTimeStatsConfig.c | 4 +- .../Demo_Source/main.c | 4 +- .../Demo_Source/serial.c | 4 +- .../MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h | 4 +- .../Demo/MSP430X_MSP430F5438_IAR/ParTest.c | 4 +- .../Demo/MSP430X_MSP430F5438_IAR/RegTest.s43 | 4 +- .../RunTimeStatsConfig.c | 4 +- FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c | 4 +- .../Demo/MSP430X_MSP430F5438_IAR/serial.c | 4 +- .../Blinky_Demo/main_blinky.c | 4 +- .../CCS_Only/RegTest.asm | 4 +- .../FreeRTOSConfig.h | 4 +- .../Full_Demo/main_full.c | 4 +- .../Full_Demo/serial.c | 4 +- .../IAR_Only/RegTest.s43 | 4 +- .../LEDs.c | 4 +- .../main.c | 4 +- .../RTOSDemo/src/Blinky_Demo/main_blinky.c | 4 +- .../RTOSDemo/src/FreeRTOSConfig.h | 4 +- .../RTOSDemo/src/Full_Demo/RegisterTests.S | 4 +- .../RTOSDemo/src/Full_Demo/main_full.c | 4 +- .../RTOSDemo/src/LEDs.c | 4 +- .../BasicSocketCommandServer.c | 4 +- .../src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c | 4 +- .../src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h | 4 +- .../RTOSDemo/src/lwIP_Demo/main_lwIP.c | 4 +- .../RTOSDemo/src/main.c | 4 +- .../RTOSDemo/src/serial.c | 4 +- FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26 | 4 +- FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c | 4 +- FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26 | 4 +- FreeRTOS/Demo/NEC_78K0R_IAR/main.c | 4 +- FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h | 4 +- .../LowLevelInit/LowLevelInit.c | 4 +- .../LowLevelInit/LowLevelInit_Fx3.c | 4 +- .../LowLevelInit/LowLevelInit_Hx2.c | 4 +- .../ParTest/ParTest_Fx3_App_Board.c | 4 +- .../ParTest/ParTest_Generic_Target_Board.c | 4 +- FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85 | 4 +- FreeRTOS/Demo/NEC_V850ES_IAR/main.c | 4 +- FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/ParTest/ParTest.c | 4 +- .../RTOSDemo/main.c | 4 +- .../RTOSDemo/serial.c | 4 +- FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/PIC18_MPLAB/main1.c | 4 +- FreeRTOS/Demo/PIC18_MPLAB/main2.c | 4 +- FreeRTOS/Demo/PIC18_MPLAB/main3.c | 4 +- FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c | 4 +- .../Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo1/main.c | 4 +- .../Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo2/main.c | 4 +- .../Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo3/main.c | 4 +- .../Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo4/main.c | 4 +- .../Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo5/main.c | 4 +- .../Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo6/main.c | 4 +- .../Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c | 4 +- FreeRTOS/Demo/PIC18_WizC/Demo7/main.c | 4 +- FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c | 4 +- FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c | 4 +- FreeRTOS/Demo/PIC18_WizC/serial/serial.c | 4 +- FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/PIC24_MPLAB/lcd.c | 4 +- FreeRTOS/Demo/PIC24_MPLAB/lcd.h | 4 +- FreeRTOS/Demo/PIC24_MPLAB/main.c | 4 +- FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c | 4 +- FreeRTOS/Demo/PIC24_MPLAB/timertest.c | 4 +- FreeRTOS/Demo/PIC24_MPLAB/timertest.h | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../PIC32MEC14xx_MPLAB/src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/IntQueueTimer_isr.S | 4 +- .../src/Full_Demo/RegisterTestTasks.S | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/Full_Demo/timertest.c | 4 +- .../src/Full_Demo/timertest.h | 4 +- FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/main.c | 4 +- .../Demo/PIC32MX_MPLAB/ConfigPerformance.c | 4 +- .../Demo/PIC32MX_MPLAB/ConfigPerformance.h | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h | 4 +- .../Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S | 4 +- .../ParTest/ParTest_Explorer16.c | 4 +- .../ParTest/ParTest_USBII_Starter_Kit.c | 4 +- .../Demo/PIC32MX_MPLAB/RegisterTestTasks.S | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/main.c | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h | 4 +- FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S | 4 +- .../Demo/PIC32MZ_MPLAB/ConfigPerformance.c | 4 +- .../Demo/PIC32MZ_MPLAB/ConfigPerformance.h | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h | 4 +- .../Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c | 4 +- .../Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h | 4 +- .../Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c | 4 +- .../Demo/PIC32MZ_MPLAB/RegisterTestTasks.S | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.c | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.h | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/main.c | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h | 4 +- FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop-reg-test.h | 4 +- .../RTOSDemo/flop/flop.c | 4 +- .../RTOSDemo/main.c | 4 +- .../RTOSDemo/partest/partest.c | 4 +- .../RTOSDemo/serial/serial.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop-reg-test.h | 4 +- .../RTOSDemo/flop/flop.c | 4 +- .../RTOSDemo/main.c | 4 +- .../RTOSDemo/partest/partest.c | 4 +- .../RTOSDemo/serial/serial.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/flop/flop-reg-test.c | 4 +- .../RTOSDemo/flop/flop-reg-test.h | 4 +- .../RTOSDemo/flop/flop.c | 4 +- .../PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c | 4 +- .../RTOSDemo/partest/partest.c | 4 +- .../RTOSDemo/serial/serial.c | 4 +- .../blinky_demo/main_blinky.c | 4 +- .../full_demo/RegTest.S | 4 +- .../full_demo/main_full.c | 4 +- .../RISC-V-Qemu-sifive_e-Eclipse-GCC/main.c | 4 +- .../RTOSDemo_ri5cy/blinky_demo/main_blinky.c | 4 +- .../RTOSDemo_ri5cy/full_demo/RegTest.S | 4 +- .../RTOSDemo_ri5cy/full_demo/main_full.c | 4 +- .../projects/RTOSDemo_ri5cy/main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../blinky_demo/main_blinky.c | 4 +- .../full_demo/RegTest.S | 4 +- .../full_demo/main_full.c | 4 +- .../main.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../blinky_demo/main_blinky.c | 4 +- .../full_demo/RegTest.s | 4 +- .../full_demo/main_full.c | 4 +- .../main.c | 4 +- .../blinky_demo/main_blinky.c | 4 +- .../full_demo/RegTest.S | 4 +- .../full_demo/main_full.c | 4 +- .../RISC-V_Renode_Emulator_SoftConsole/main.c | 4 +- .../RL78_E2Studio_GCC/.HardwareDebuglinker | 100 - .../Demo/RL78_E2Studio_GCC/.RL78_G1A_TBlinker | 100 - .../Demo/RL78_E2Studio_GCC/.RSKRL78G1Clinker | 100 - .../Demo/RL78_E2Studio_GCC/.RSKRL78L13linker | 100 - .../Demo/RL78_E2Studio_GCC/.RSKRL78L1Clinker | 100 - .../Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker | 112 - FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject | 651 - FreeRTOS/Demo/RL78_E2Studio_GCC/.info | 7 - FreeRTOS/Demo/RL78_E2Studio_GCC/.project | 161 - .../Project_Generation_Prefrences.prefs | 21 - .../org.eclipse.ltk.core.refactoring.prefs | 3 - FreeRTOS/Demo/RL78_E2Studio_GCC/custom.bat | 0 .../src/Common-Demo-Tasks/PollQ.c | 220 - .../src/Common-Demo-Tasks/blocktim.c | 467 - .../src/Common-Demo-Tasks/dynamic.c | 401 - .../src/Common-Demo-Tasks/include/PollQ.h | 36 - .../src/Common-Demo-Tasks/include/blocktim.h | 36 - .../src/Common-Demo-Tasks/include/dynamic.h | 36 - .../Demo/RL78_E2Studio_GCC/src/ExampleISR.S | 75 - .../RL78_E2Studio_GCC/src/FreeRTOSConfig.h | 90 - FreeRTOS/Demo/RL78_E2Studio_GCC/src/RegTest.S | 243 - .../RL78_E2Studio_GCC/src/demo_specific_io.h | 82 - .../RL78_E2Studio_GCC/src/hardware_setup.c | 39 - .../src/iodefine/iodefine_RL78G14.h | 1121 -- .../src/iodefine/iodefine_RL78G14_ext.h | 1204 -- .../src/iodefine/iodefine_RL78G1A.h | 1037 -- .../src/iodefine/iodefine_RL78G1A_ext.h | 571 - .../src/iodefine/iodefine_RL78G1C.h | 903 -- .../src/iodefine/iodefine_RL78G1C_ext.h | 530 - .../src/iodefine/iodefine_RL78L13.h | 1057 -- .../src/iodefine/iodefine_RL78L13_ext.h | 946 -- .../src/iodefine/iodefine_RL78L1C.h | 1002 -- .../src/iodefine/iodefine_RL78L1C_ext.h | 1178 -- FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c | 210 - .../Demo/RL78_E2Studio_GCC/src/main_blinky.c | 195 - .../Demo/RL78_E2Studio_GCC/src/main_full.c | 379 - .../RL78_E2Studio_GCC/src/reset_program.asm | 11005 -------------- .../Demo/RL78_E2Studio_GCC/src/typedefine.h | 24 - .../Demo/RL78_E2Studio_GCC/src/vector_table.c | 173 - .../FreeRTOSConfig.h | 4 +- .../RL78_RL78G13_Promo_Board_IAR/RegTest.s87 | 4 +- .../Demo/RL78_RL78G13_Promo_Board_IAR/main.c | 4 +- .../Demo/RL78_multiple_IAR/ExampleISR.s87 | 4 +- .../Demo/RL78_multiple_IAR/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87 | 4 +- .../Demo/RL78_multiple_IAR/demo_specific_io.h | 4 +- FreeRTOS/Demo/RL78_multiple_IAR/main.c | 4 +- FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c | 4 +- FreeRTOS/Demo/RL78_multiple_IAR/main_full.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c | 4 +- .../RX100-RSK_GCC_e2studio/RTOSDemo/main.c | 4 +- .../RTOSDemo/main_full.c | 4 +- .../RTOSDemo/main_low_power.c | 4 +- FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c | 4 +- .../Demo/RX100-RSK_IAR/PriorityDefinitions.h | 4 +- FreeRTOS/Demo/RX100-RSK_IAR/main.c | 4 +- FreeRTOS/Demo/RX100-RSK_IAR/main_full.c | 4 +- FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c | 4 +- FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/main.c | 4 +- .../RTOSDemo/main_full.c | 4 +- .../RTOSDemo/main_low_power.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/RegTest_GCC.S | 4 +- .../src/Full_Demo/RegTest_IAR.s | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/PriorityDefinitions.h | 4 +- .../src/main.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/main.c | 4 +- .../RTOSDemo/ButtonAndLCD.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/HighFrequencyTimerTest.c | 4 +- .../RTOSDemo/IntQueueTimer.c | 4 +- .../RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/include/ButtonAndLCD.h | 4 +- .../RTOSDemo/include/IntQueueTimer.h | 4 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/RegTest_GCC.S | 4 +- .../src/Full_Demo/RegTest_IAR.s | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/PriorityDefinitions.h | 4 +- .../src/main.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/main.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/HighFrequencyTimerTest.c | 4 +- .../RTOSDemo/IntQueueTimer.c | 4 +- .../RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/include/IntQueueTimer.h | 4 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c | 4 +- .../RTOSDemo/webserver/EMAC.c | 4 +- .../Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h | 4 +- .../HighFrequencyTimerTest.c | 4 +- .../Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c | 4 +- .../RX600_RX62N-RDK_IAR/PriorityDefinitions.h | 4 +- FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s | 4 +- .../include/IntQueueTimer.h | 4 +- .../Demo/RX600_RX62N-RDK_IAR/main-blinky.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c | 4 +- .../Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/HighFrequencyTimerTest.c | 4 +- .../RTOSDemo/IntQueueTimer.c | 4 +- .../RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/include/IntQueueTimer.h | 4 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/uIP_Task.c | 4 +- .../RTOSDemo/webserver/EMAC.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/HighFrequencyTimerTest.c | 4 +- .../RTOSDemo/IntQueueTimer.c | 4 +- .../RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/include/IntQueueTimer.h | 4 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c | 4 +- .../RTOSDemo/webserver/EMAC.c | 4 +- .../Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h | 4 +- .../HighFrequencyTimerTest.c | 4 +- .../Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c | 4 +- .../RX600_RX62N-RSK_IAR/PriorityDefinitions.h | 4 +- FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s | 4 +- .../include/IntQueueTimer.h | 4 +- .../Demo/RX600_RX62N-RSK_IAR/main-blinky.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c | 4 +- .../Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/HighFrequencyTimerTest.c | 4 +- .../RTOSDemo/IntQueueTimer.c | 4 +- .../RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/include/IntQueueTimer.h | 4 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/uIP_Task.c | 4 +- .../RTOSDemo/webserver/EMAC.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/HighFrequencyTimerTest.c | 4 +- .../RTOSDemo/IntQueueTimer.c | 4 +- .../RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/include/IntQueueTimer.h | 4 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/HighFrequencyTimerTest.c | 4 +- .../RTOSDemo/IntQueueTimer.c | 4 +- .../RTOSDemo/IntQueueTimer.h | 4 +- .../RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/main-blinky.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/uIP_Task.c | 4 +- .../RTOSDemo/webserver/EMAC.c | 4 +- .../Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.Hbp | 4 - .../Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.hws | 49 - .../Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.tws | 17 - .../RTOSDemo/DefaultSession.hsf | 106 - .../RTOSDemo/FreeRTOSConfig.h | 146 - .../RTOSDemo/HighFrequencyTimerTest.c | 144 - .../RTOSDemo/IntQueueTimer.c | 117 - .../RTOSDemo/IntQueueTimer.h | 36 - .../RTOSDemo/ParTest.c | 157 - .../RTOSDemo/RTOSDemo.hwp | 479 - .../RTOSDemo/RTOSDemo.nav | Bin 337737 -> 0 bytes .../RTOSDemo/RTOSDemo.tps | 33 - .../Renesas-Files/board/rskrx63n/dbsct.c | 83 - .../board/rskrx63n/flash_options.c | 124 - .../Renesas-Files/board/rskrx63n/hwsetup.c | 161 - .../Renesas-Files/board/rskrx63n/hwsetup.h | 42 - .../Renesas-Files/board/rskrx63n/lowlvl.src | 54 - .../Renesas-Files/board/rskrx63n/lowsrc.c | 332 - .../Renesas-Files/board/rskrx63n/mcu_info.h | 59 - .../Renesas-Files/board/rskrx63n/r_bsp.h | 54 - .../board/rskrx63n/r_bsp_config_reference.h | 149 - .../Renesas-Files/board/rskrx63n/resetprg.c | 409 - .../Renesas-Files/board/rskrx63n/rskrx63n.h | 65 - .../Renesas-Files/board/rskrx63n/sbrk.c | 96 - .../Renesas-Files/board/rskrx63n/vecttbl.c | 186 - .../Renesas-Files/mcu/rx63n/iodefine.h | 12106 ---------------- .../mcu/rx63n/iodefine.h_from_toolchain | 12063 --------------- .../RTOSDemo/Renesas-Files/platform.h | 75 - .../RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf | 584 - .../RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini | 45 - .../RTOSDemo/SimSessionRX600.hsf | 290 - .../RTOSDemo/main-blinky.c | 238 - .../RTOSDemo/main-full.c | 675 - .../RTOSDemo/r_bsp_config.h | 149 - .../RTOSDemo/uIP_Task.c | 319 - .../RTOSDemo/webserver/EMAC.c | 535 - .../RTOSDemo/webserver/httpd-cgi.c | 277 - .../RTOSDemo/webserver/httpd-fs/404.html | 8 - .../RTOSDemo/webserver/httpd-fs/index.html | 13 - .../RTOSDemo/webserver/httpd-fs/index.shtml | 20 - .../RTOSDemo/webserver/httpd-fs/io.shtml | 28 - .../RTOSDemo/webserver/httpd-fs/runtime.shtml | 20 - .../RTOSDemo/webserver/httpd-fs/stats.shtml | 47 - .../RTOSDemo/webserver/httpd-fs/tcp.shtml | 21 - .../RTOSDemo/webserver/httpd-fsdata.c | 3871 ----- .../RTOSDemo/webserver/makefsdata | 79 - .../RTOSDemo/webserver/phy.c | 468 - .../RTOSDemo/webserver/phy.h | 84 - .../RTOSDemo/webserver/r_ether.h | 185 - .../RTOSDemo/webserver/uip-conf.h | 167 - .../RTOSDemo/webserver/webserver.h | 47 - .../src/FreeRTOSConfig.h | 4 +- .../src/IntQueueTimer.c | 4 +- .../src/IntQueueTimer.h | 4 +- .../src/ParTest.c | 4 +- .../src/RegTest.S | 4 +- .../RX600_RX64M_RSK_GCC_e2studio/src/main.c | 4 +- .../src/main_blinky.c | 4 +- .../src/main_full.c | 4 +- .../Source/FreeRTOSConfig.h | 4 +- .../Source/IntQueueTimer.c | 4 +- .../Source/IntQueueTimer.h | 4 +- .../Source/ParTest.c | 4 +- .../Source/RegTest.src | 4 +- .../Source/main.c | 4 +- .../Source/main_blinky.c | 4 +- .../Source/main_full.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/RegTest_GCC.S | 4 +- .../src/Full_Demo/RegTest_IAR.s | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/PriorityDefinitions.h | 4 +- .../src/main.c | 4 +- .../src/Blinky_Demo/main_blinky.c | 4 +- .../src/FreeRTOSConfig.h | 4 +- .../src/Full_Demo/IntQueueTimer.c | 4 +- .../src/Full_Demo/IntQueueTimer.h | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../src/main.c | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/ParTest/ParTest.c | 4 +- .../SuperH_SH7216_Renesas/RTOSDemo/flop.c | 4 +- .../SuperH_SH7216_Renesas/RTOSDemo/main.c | 4 +- .../RTOSDemo/regtest.src | 4 +- .../SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c | 4 +- .../RTOSDemo/webserver/EMAC.c | 4 +- .../RTOSDemo/webserver/EMAC_ISR.src | 4 +- .../Demo/T-HEAD_CB2201_CDK/FreeRTOSConfig.h | 202 +- .../IntQueueTimer.c | 2 +- .../IntQueueTimer.h | 2 +- .../Tensilica_Simulator_Xplorer_XCC/main.c | 4 +- .../main_blinky.c | 4 +- .../regtest_xtensa.S | 4 +- .../RTOSDemo/FreeRTOSConfig.h | 4 +- .../RTOSDemo/InterruptNestTest.c | 4 +- .../RTOSDemo/InterruptNestTest.h | 4 +- .../RTOSDemo/ParTest.c | 4 +- .../RTOSDemo/main.c | 4 +- .../RTOSDemo/serial.c | 4 +- .../FreeRTOSConfig.h | 4 +- .../WIN32-MSVC-Static-Allocation-Only/main.c | 4 +- .../Demo/WIN32-MSVC-lwIP/FreeRTOSConfig.h | 139 - FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.sln | 20 - FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj | 275 - .../WIN32-MSVC-lwIP/WIN32.vcxproj.filters | 436 - .../BasicSocketCommandServer.c | 170 - .../httpserver_raw_from_lwIP_download/fs.c | 177 - .../httpserver_raw_from_lwIP_download/fs.h | 100 - .../fsdata.c | 2068 --- .../fsdata.h | 50 - .../httpserver_raw_from_lwIP_download/httpd.c | 2184 --- .../httpserver_raw_from_lwIP_download/httpd.h | 236 - .../httpd_structs.h | 115 - .../makefsdata/MakeFSData_proj.sln | 20 - .../makefsdata/MakeFSData_proj.suo | Bin 11264 -> 0 bytes .../makefsdata/MakeFSData_proj.vcxproj | 91 - .../MakeFSData_proj.vcxproj.filters | 36 - .../makefsdata/MakeFSData_proj.vcxproj.user | 3 - .../makefsdata/fs/404.html | 21 - .../makefsdata/fs/index.shtml | 20 - .../makefsdata/fs/runtime.shtml | 20 - .../makefsdata/fsdata.c | 2068 --- .../makefsdata/makefsdata | 97 - .../makefsdata/makefsdata.c | 610 - .../makefsdata/makefsdata.exe | Bin 46592 -> 0 bytes .../makefsdata/stdafx.cpp | 8 - .../makefsdata/stdafx.h | 15 - .../makefsdata/targetver.h | 8 - .../WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c | 196 - .../WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.h | 37 - .../WIN32-MSVC-lwIP/lwIP_Apps/lwipcfg_msvc.h | 46 - .../Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipopts.h | 302 - FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c | 336 - FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h | 4 +- .../Demo/WIN32-MSVC/Run-time-stats-utils.c | 4 +- FreeRTOS/Demo/WIN32-MSVC/main.c | 4 +- FreeRTOS/Demo/WIN32-MSVC/main_blinky.c | 4 +- FreeRTOS/Demo/WIN32-MSVC/main_full.c | 4 +- .../DemosModifiedForLowTickRate/recmutex.c | 4 +- FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h | 4 +- .../Demo/WIN32-MingW/Run-time-stats-utils.c | 4 +- .../WIN32-MingW/code_coverage_additions.c | 4 +- FreeRTOS/Demo/WIN32-MingW/main.c | 4 +- FreeRTOS/Demo/WIN32-MingW/main_blinky.c | 4 +- FreeRTOS/Demo/WIN32-MingW/main_full.c | 4 +- .../WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h | 4 +- .../Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c | 4 +- .../Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c | 4 +- .../Demo/WizNET_DEMO_GCC_ARM7/html_pages.h | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c | 4 +- FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c | 4 +- .../WizNET_DEMO_TERN_186/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c | 4 +- FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h | 4 +- FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c | 4 +- .../Demo/WizNET_DEMO_TERN_186/serial/serial.c | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/lcd.c | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/lcd.h | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/main.c | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/timertest.c | 4 +- FreeRTOS/Demo/dsPIC_MPLAB/timertest.h | 4 +- .../Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c | 4 +- .../Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h | 4 +- .../lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c | 4 +- .../lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h | 4 +- .../EMAC/SAM7_EMAC_ISR.c | 4 +- .../lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h | 4 +- .../lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c | 4 +- .../Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c | 4 +- .../Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h | 4 +- .../Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c | 4 +- .../lwIP_Demo_Rowley_ARM7/USB/descriptors.h | 4 +- FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h | 4 +- FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c | 4 +- FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile | 4 +- .../Demo/msp430_CrossWorks/FreeRTOSConfig.h | 4 +- .../Demo/msp430_CrossWorks/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/msp430_CrossWorks/main.c | 4 +- .../Demo/msp430_CrossWorks/serial/serial.c | 4 +- .../msp430_CrossWorks/serial/serialASM.asm | 4 +- FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/msp430_GCC/main.c | 4 +- FreeRTOS/Demo/msp430_GCC/makefile | 4 +- FreeRTOS/Demo/msp430_GCC/serial/serial.c | 4 +- FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h | 4 +- FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c | 4 +- FreeRTOS/Demo/msp430_IAR/main.c | 4 +- FreeRTOS/Demo/msp430_IAR/serial/serial.c | 4 +- FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43 | 4 +- FreeRTOS/History.txt | 64 +- FreeRTOS/License/license.txt | 2 +- FreeRTOS/Source/croutine.c | 4 +- FreeRTOS/Source/event_groups.c | 4 +- FreeRTOS/Source/include/FreeRTOS.h | 4 +- FreeRTOS/Source/include/StackMacros.h | 4 +- FreeRTOS/Source/include/atomic.h | 4 +- FreeRTOS/Source/include/croutine.h | 4 +- .../Source/include/deprecated_definitions.h | 4 +- FreeRTOS/Source/include/event_groups.h | 4 +- FreeRTOS/Source/include/list.h | 4 +- FreeRTOS/Source/include/message_buffer.h | 4 +- FreeRTOS/Source/include/mpu_prototypes.h | 4 +- FreeRTOS/Source/include/mpu_wrappers.h | 4 +- FreeRTOS/Source/include/portable.h | 4 +- FreeRTOS/Source/include/projdefs.h | 4 +- FreeRTOS/Source/include/queue.h | 4 +- FreeRTOS/Source/include/semphr.h | 4 +- FreeRTOS/Source/include/stack_macros.h | 4 +- FreeRTOS/Source/include/stream_buffer.h | 4 +- FreeRTOS/Source/include/task.h | 4 +- FreeRTOS/Source/include/timers.h | 4 +- FreeRTOS/Source/list.c | 4 +- FreeRTOS/Source/portable/ARMv8M/copy_files.py | 4 +- .../Source/portable/ARMv8M/non_secure/port.c | 4 +- .../portable/GCC/ARM_CM23/portasm.c | 4 +- .../portable/GCC/ARM_CM23/portmacro.h | 4 +- .../portable/GCC/ARM_CM23_NTZ/portasm.c | 4 +- .../portable/GCC/ARM_CM23_NTZ/portmacro.h | 4 +- .../portable/GCC/ARM_CM33/portasm.c | 4 +- .../portable/GCC/ARM_CM33/portmacro.h | 4 +- .../portable/GCC/ARM_CM33_NTZ/portasm.c | 4 +- .../portable/GCC/ARM_CM33_NTZ/portmacro.h | 4 +- .../portable/IAR/ARM_CM23/portasm.s | 4 +- .../portable/IAR/ARM_CM23/portmacro.h | 4 +- .../portable/IAR/ARM_CM23_NTZ/portasm.s | 4 +- .../portable/IAR/ARM_CM23_NTZ/portmacro.h | 4 +- .../portable/IAR/ARM_CM33/portasm.s | 4 +- .../portable/IAR/ARM_CM33/portmacro.h | 4 +- .../portable/IAR/ARM_CM33_NTZ/portasm.s | 4 +- .../portable/IAR/ARM_CM33_NTZ/portmacro.h | 4 +- .../portable/ARMv8M/non_secure/portasm.h | 4 +- .../GCC/ARM_CM23/secure_context_port.c | 4 +- .../GCC/ARM_CM33/secure_context_port.c | 4 +- .../IAR/ARM_CM23/secure_context_port.c | 4 +- .../IAR/ARM_CM23/secure_context_port_asm.s | 4 +- .../IAR/ARM_CM33/secure_context_port.c | 4 +- .../IAR/ARM_CM33/secure_context_port_asm.s | 4 +- .../ARMv8M/secure/context/secure_context.c | 4 +- .../ARMv8M/secure/context/secure_context.h | 4 +- .../portable/ARMv8M/secure/heap/secure_heap.c | 4 +- .../portable/ARMv8M/secure/heap/secure_heap.h | 4 +- .../portable/ARMv8M/secure/init/secure_init.c | 4 +- .../portable/ARMv8M/secure/init/secure_init.h | 4 +- .../ARMv8M/secure/macros/secure_port_macros.h | 4 +- .../portable/BCC/16BitDOS/Flsh186/port.c | 4 +- .../portable/BCC/16BitDOS/Flsh186/prtmacro.h | 4 +- .../Source/portable/BCC/16BitDOS/PC/port.c | 4 +- .../portable/BCC/16BitDOS/PC/prtmacro.h | 4 +- .../portable/BCC/16BitDOS/common/portasm.h | 4 +- .../portable/BCC/16BitDOS/common/portcomn.c | 4 +- FreeRTOS/Source/portable/CCS/ARM_CM3/port.c | 4 +- .../Source/portable/CCS/ARM_CM3/portasm.asm | 4 +- .../Source/portable/CCS/ARM_CM3/portmacro.h | 4 +- FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c | 4 +- .../Source/portable/CCS/ARM_CM4F/portasm.asm | 4 +- .../Source/portable/CCS/ARM_CM4F/portmacro.h | 4 +- .../Source/portable/CCS/ARM_Cortex-R4/port.c | 4 +- .../portable/CCS/ARM_Cortex-R4/portASM.asm | 4 +- .../portable/CCS/ARM_Cortex-R4/portmacro.h | 4 +- .../Source/portable/CCS/MSP430X/data_model.h | 4 +- FreeRTOS/Source/portable/CCS/MSP430X/port.c | 4 +- .../Source/portable/CCS/MSP430X/portext.asm | 4 +- .../Source/portable/CCS/MSP430X/portmacro.h | 4 +- .../portable/CodeWarrior/ColdFire_V1/port.c | 4 +- .../CodeWarrior/ColdFire_V1/portasm.S | 4 +- .../CodeWarrior/ColdFire_V1/portmacro.h | 4 +- .../portable/CodeWarrior/ColdFire_V2/port.c | 4 +- .../CodeWarrior/ColdFire_V2/portasm.S | 4 +- .../CodeWarrior/ColdFire_V2/portmacro.h | 4 +- .../Source/portable/CodeWarrior/HCS12/port.c | 4 +- .../portable/CodeWarrior/HCS12/portmacro.h | 4 +- .../Source/portable/Common/mpu_wrappers.c | 4 +- .../portable/GCC/ARM7_AT91FR40008/port.c | 4 +- .../portable/GCC/ARM7_AT91FR40008/portISR.c | 4 +- .../portable/GCC/ARM7_AT91FR40008/portmacro.h | 4 +- .../Source/portable/GCC/ARM7_AT91SAM7S/port.c | 4 +- .../portable/GCC/ARM7_AT91SAM7S/portISR.c | 4 +- .../portable/GCC/ARM7_AT91SAM7S/portmacro.h | 4 +- .../Source/portable/GCC/ARM7_LPC2000/port.c | 4 +- .../portable/GCC/ARM7_LPC2000/portISR.c | 4 +- .../portable/GCC/ARM7_LPC2000/portmacro.h | 4 +- .../Source/portable/GCC/ARM7_LPC23xx/port.c | 4 +- .../portable/GCC/ARM7_LPC23xx/portISR.c | 4 +- .../portable/GCC/ARM7_LPC23xx/portmacro.h | 4 +- .../portable/GCC/ARM_CA53_64_BIT/port.c | 4 +- .../portable/GCC/ARM_CA53_64_BIT/portASM.S | 4 +- .../portable/GCC/ARM_CA53_64_BIT/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/ARM_CA9/port.c | 4 +- .../Source/portable/GCC/ARM_CA9/portASM.S | 4 +- .../Source/portable/GCC/ARM_CA9/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/ARM_CM0/port.c | 4 +- .../Source/portable/GCC/ARM_CM0/portmacro.h | 4 +- .../portable/GCC/ARM_CM23/non_secure/port.c | 4 +- .../GCC/ARM_CM23/non_secure/portasm.c | 4 +- .../GCC/ARM_CM23/non_secure/portasm.h | 4 +- .../GCC/ARM_CM23/non_secure/portmacro.h | 4 +- .../GCC/ARM_CM23/secure/secure_context.c | 4 +- .../GCC/ARM_CM23/secure/secure_context.h | 4 +- .../GCC/ARM_CM23/secure/secure_context_port.c | 4 +- .../GCC/ARM_CM23/secure/secure_heap.c | 4 +- .../GCC/ARM_CM23/secure/secure_heap.h | 4 +- .../GCC/ARM_CM23/secure/secure_init.c | 4 +- .../GCC/ARM_CM23/secure/secure_init.h | 4 +- .../GCC/ARM_CM23/secure/secure_port_macros.h | 4 +- .../GCC/ARM_CM23_NTZ/non_secure/port.c | 4 +- .../GCC/ARM_CM23_NTZ/non_secure/portasm.c | 4 +- .../GCC/ARM_CM23_NTZ/non_secure/portasm.h | 4 +- .../GCC/ARM_CM23_NTZ/non_secure/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/ARM_CM3/port.c | 4 +- .../Source/portable/GCC/ARM_CM3/portmacro.h | 4 +- .../portable/GCC/ARM_CM33/non_secure/port.c | 4 +- .../GCC/ARM_CM33/non_secure/portasm.c | 4 +- .../GCC/ARM_CM33/non_secure/portasm.h | 4 +- .../GCC/ARM_CM33/non_secure/portmacro.h | 4 +- .../GCC/ARM_CM33/secure/secure_context.c | 4 +- .../GCC/ARM_CM33/secure/secure_context.h | 4 +- .../GCC/ARM_CM33/secure/secure_context_port.c | 4 +- .../GCC/ARM_CM33/secure/secure_heap.c | 4 +- .../GCC/ARM_CM33/secure/secure_heap.h | 4 +- .../GCC/ARM_CM33/secure/secure_init.c | 4 +- .../GCC/ARM_CM33/secure/secure_init.h | 4 +- .../GCC/ARM_CM33/secure/secure_port_macros.h | 4 +- .../GCC/ARM_CM33_NTZ/non_secure/port.c | 4 +- .../GCC/ARM_CM33_NTZ/non_secure/portasm.c | 4 +- .../GCC/ARM_CM33_NTZ/non_secure/portasm.h | 4 +- .../GCC/ARM_CM33_NTZ/non_secure/portmacro.h | 4 +- .../Source/portable/GCC/ARM_CM3_MPU/port.c | 4 +- .../portable/GCC/ARM_CM3_MPU/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c | 4 +- .../Source/portable/GCC/ARM_CM4F/portmacro.h | 4 +- .../Source/portable/GCC/ARM_CM4_MPU/port.c | 4 +- .../portable/GCC/ARM_CM4_MPU/portmacro.h | 4 +- .../Source/portable/GCC/ARM_CM7/r0p1/port.c | 4 +- .../portable/GCC/ARM_CM7/r0p1/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/ARM_CR5/port.c | 4 +- .../Source/portable/GCC/ARM_CR5/portASM.S | 4 +- .../Source/portable/GCC/ARM_CR5/portmacro.h | 4 +- .../Source/portable/GCC/ARM_CRx_No_GIC/port.c | 4 +- .../portable/GCC/ARM_CRx_No_GIC/portASM.S | 4 +- .../portable/GCC/ARM_CRx_No_GIC/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/ATMega323/port.c | 4 +- .../Source/portable/GCC/ATMega323/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c | 4 +- .../Source/portable/GCC/AVR32_UC3/portmacro.h | 4 +- .../Source/portable/GCC/CORTUS_APS3/port.c | 4 +- .../portable/GCC/CORTUS_APS3/portmacro.h | 4 +- .../Source/portable/GCC/ColdFire_V2/port.c | 4 +- .../Source/portable/GCC/ColdFire_V2/portasm.S | 4 +- .../portable/GCC/ColdFire_V2/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/H8S2329/port.c | 4 +- .../Source/portable/GCC/H8S2329/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/HCS12/port.c | 4 +- .../Source/portable/GCC/HCS12/portmacro.h | 4 +- .../portable/GCC/IA32_flat/ISR_Support.h | 4 +- FreeRTOS/Source/portable/GCC/IA32_flat/port.c | 4 +- .../Source/portable/GCC/IA32_flat/portASM.S | 4 +- .../Source/portable/GCC/IA32_flat/portmacro.h | 4 +- .../Source/portable/GCC/MSP430F449/port.c | 4 +- .../portable/GCC/MSP430F449/portmacro.h | 4 +- .../Source/portable/GCC/MicroBlaze/port.c | 4 +- .../Source/portable/GCC/MicroBlaze/portasm.s | 4 +- .../portable/GCC/MicroBlaze/portmacro.h | 4 +- .../Source/portable/GCC/MicroBlazeV8/port.c | 4 +- .../GCC/MicroBlazeV8/port_exceptions.c | 4 +- .../portable/GCC/MicroBlazeV8/portasm.S | 4 +- .../portable/GCC/MicroBlazeV8/portmacro.h | 4 +- .../Source/portable/GCC/MicroBlazeV9/port.c | 4 +- .../GCC/MicroBlazeV9/port_exceptions.c | 4 +- .../portable/GCC/MicroBlazeV9/portasm.S | 4 +- .../portable/GCC/MicroBlazeV9/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/NiosII/port.c | 4 +- .../Source/portable/GCC/NiosII/port_asm.S | 4 +- .../Source/portable/GCC/NiosII/portmacro.h | 4 +- .../portable/GCC/PPC405_Xilinx/FPU_Macros.h | 4 +- .../Source/portable/GCC/PPC405_Xilinx/port.c | 4 +- .../portable/GCC/PPC405_Xilinx/portasm.S | 4 +- .../portable/GCC/PPC405_Xilinx/portmacro.h | 4 +- .../portable/GCC/PPC440_Xilinx/FPU_Macros.h | 4 +- .../Source/portable/GCC/PPC440_Xilinx/port.c | 4 +- .../portable/GCC/PPC440_Xilinx/portasm.S | 4 +- .../portable/GCC/PPC440_Xilinx/portmacro.h | 4 +- ...freertos_risc_v_chip_specific_extensions.h | 4 +- ...freertos_risc_v_chip_specific_extensions.h | 4 +- FreeRTOS/Source/portable/GCC/RISC-V/port.c | 4 +- FreeRTOS/Source/portable/GCC/RISC-V/portASM.S | 4 +- .../Source/portable/GCC/RISC-V/portmacro.h | 4 +- .../Source/portable/GCC/RL78/isr_support.h | 4 +- FreeRTOS/Source/portable/GCC/RL78/port.c | 4 +- FreeRTOS/Source/portable/GCC/RL78/portasm.S | 4 +- FreeRTOS/Source/portable/GCC/RL78/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/RX100/port.c | 4 +- .../Source/portable/GCC/RX100/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/RX600/port.c | 4 +- .../Source/portable/GCC/RX600/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/RX600v2/port.c | 4 +- .../Source/portable/GCC/RX600v2/portmacro.h | 4 +- FreeRTOS/Source/portable/GCC/STR75x/port.c | 4 +- FreeRTOS/Source/portable/GCC/STR75x/portISR.c | 4 +- .../Source/portable/GCC/STR75x/portmacro.h | 4 +- .../Source/portable/GCC/TriCore_1782/port.c | 4 +- .../portable/GCC/TriCore_1782/portmacro.h | 4 +- .../portable/GCC/TriCore_1782/porttrap.c | 4 +- .../Source/portable/IAR/78K0R/ISR_Support.h | 4 +- FreeRTOS/Source/portable/IAR/78K0R/port.c | 4 +- .../Source/portable/IAR/78K0R/portasm.s26 | 4 +- .../Source/portable/IAR/78K0R/portmacro.h | 4 +- .../Source/portable/IAR/ARM_CA5_No_GIC/port.c | 4 +- .../portable/IAR/ARM_CA5_No_GIC/portASM.h | 4 +- .../portable/IAR/ARM_CA5_No_GIC/portASM.s | 4 +- .../portable/IAR/ARM_CA5_No_GIC/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/ARM_CA9/port.c | 4 +- .../Source/portable/IAR/ARM_CA9/portASM.h | 4 +- .../Source/portable/IAR/ARM_CA9/portASM.s | 4 +- .../Source/portable/IAR/ARM_CA9/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/ARM_CM0/port.c | 4 +- .../Source/portable/IAR/ARM_CM0/portasm.s | 4 +- .../Source/portable/IAR/ARM_CM0/portmacro.h | 4 +- .../portable/IAR/ARM_CM23/non_secure/port.c | 4 +- .../IAR/ARM_CM23/non_secure/portasm.h | 4 +- .../IAR/ARM_CM23/non_secure/portasm.s | 4 +- .../IAR/ARM_CM23/non_secure/portmacro.h | 4 +- .../IAR/ARM_CM23/secure/secure_context.c | 4 +- .../IAR/ARM_CM23/secure/secure_context.h | 4 +- .../IAR/ARM_CM23/secure/secure_context_port.c | 4 +- .../ARM_CM23/secure/secure_context_port_asm.s | 4 +- .../IAR/ARM_CM23/secure/secure_heap.c | 4 +- .../IAR/ARM_CM23/secure/secure_heap.h | 4 +- .../IAR/ARM_CM23/secure/secure_init.c | 4 +- .../IAR/ARM_CM23/secure/secure_init.h | 4 +- .../IAR/ARM_CM23/secure/secure_port_macros.h | 4 +- .../IAR/ARM_CM23_NTZ/non_secure/port.c | 4 +- .../IAR/ARM_CM23_NTZ/non_secure/portasm.h | 4 +- .../IAR/ARM_CM23_NTZ/non_secure/portasm.s | 4 +- .../IAR/ARM_CM23_NTZ/non_secure/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/ARM_CM3/port.c | 4 +- .../Source/portable/IAR/ARM_CM3/portasm.s | 4 +- .../Source/portable/IAR/ARM_CM3/portmacro.h | 4 +- .../portable/IAR/ARM_CM33/non_secure/port.c | 4 +- .../IAR/ARM_CM33/non_secure/portasm.h | 4 +- .../IAR/ARM_CM33/non_secure/portasm.s | 4 +- .../IAR/ARM_CM33/non_secure/portmacro.h | 4 +- .../IAR/ARM_CM33/secure/secure_context.c | 4 +- .../IAR/ARM_CM33/secure/secure_context.h | 4 +- .../IAR/ARM_CM33/secure/secure_context_port.c | 4 +- .../ARM_CM33/secure/secure_context_port_asm.s | 4 +- .../IAR/ARM_CM33/secure/secure_heap.c | 4 +- .../IAR/ARM_CM33/secure/secure_heap.h | 4 +- .../IAR/ARM_CM33/secure/secure_init.c | 4 +- .../IAR/ARM_CM33/secure/secure_init.h | 4 +- .../IAR/ARM_CM33/secure/secure_port_macros.h | 4 +- .../IAR/ARM_CM33_NTZ/non_secure/port.c | 4 +- .../IAR/ARM_CM33_NTZ/non_secure/portasm.h | 4 +- .../IAR/ARM_CM33_NTZ/non_secure/portasm.s | 4 +- .../IAR/ARM_CM33_NTZ/non_secure/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c | 4 +- .../Source/portable/IAR/ARM_CM4F/portasm.s | 4 +- .../Source/portable/IAR/ARM_CM4F/portmacro.h | 4 +- .../Source/portable/IAR/ARM_CM4F_MPU/port.c | 4 +- .../portable/IAR/ARM_CM4F_MPU/portasm.s | 4 +- .../portable/IAR/ARM_CM4F_MPU/portmacro.h | 4 +- .../Source/portable/IAR/ARM_CM7/r0p1/port.c | 4 +- .../portable/IAR/ARM_CM7/r0p1/portasm.s | 4 +- .../portable/IAR/ARM_CM7/r0p1/portmacro.h | 4 +- .../Source/portable/IAR/ARM_CRx_No_GIC/port.c | 4 +- .../portable/IAR/ARM_CRx_No_GIC/portASM.s | 4 +- .../portable/IAR/ARM_CRx_No_GIC/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/ATMega323/port.c | 4 +- .../Source/portable/IAR/ATMega323/portmacro.h | 4 +- .../portable/IAR/ATMega323/portmacro.s90 | 4 +- FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c | 4 +- .../Source/portable/IAR/AVR32_UC3/portmacro.h | 4 +- .../portable/IAR/AtmelSAM7S64/ISR_Support.h | 4 +- .../Source/portable/IAR/AtmelSAM7S64/port.c | 4 +- .../portable/IAR/AtmelSAM7S64/portasm.s79 | 4 +- .../portable/IAR/AtmelSAM7S64/portmacro.h | 4 +- .../Source/portable/IAR/AtmelSAM9XE/port.c | 4 +- .../portable/IAR/AtmelSAM9XE/portmacro.h | 4 +- .../Source/portable/IAR/LPC2000/ISR_Support.h | 4 +- FreeRTOS/Source/portable/IAR/LPC2000/port.c | 4 +- .../Source/portable/IAR/LPC2000/portasm.s79 | 4 +- .../Source/portable/IAR/LPC2000/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/MSP430/port.c | 4 +- FreeRTOS/Source/portable/IAR/MSP430/portasm.h | 4 +- .../Source/portable/IAR/MSP430/portext.s43 | 4 +- .../Source/portable/IAR/MSP430/portmacro.h | 4 +- .../Source/portable/IAR/MSP430X/data_model.h | 4 +- FreeRTOS/Source/portable/IAR/MSP430X/port.c | 4 +- .../Source/portable/IAR/MSP430X/portext.s43 | 4 +- .../Source/portable/IAR/MSP430X/portmacro.h | 4 +- ...freertos_risc_v_chip_specific_extensions.h | 4 +- FreeRTOS/Source/portable/IAR/RISC-V/port.c | 4 +- FreeRTOS/Source/portable/IAR/RISC-V/portASM.s | 4 +- .../Source/portable/IAR/RISC-V/portmacro.h | 4 +- .../Source/portable/IAR/RL78/ISR_Support.h | 4 +- FreeRTOS/Source/portable/IAR/RL78/port.c | 4 +- FreeRTOS/Source/portable/IAR/RL78/portasm.s87 | 4 +- FreeRTOS/Source/portable/IAR/RL78/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/RX100/port.c | 4 +- FreeRTOS/Source/portable/IAR/RX100/port_asm.s | 4 +- .../Source/portable/IAR/RX100/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/RX600/port.c | 4 +- FreeRTOS/Source/portable/IAR/RX600/port_asm.s | 4 +- .../Source/portable/IAR/RX600/portmacro.h | 4 +- FreeRTOS/Source/portable/IAR/RXv2/port.c | 4 +- FreeRTOS/Source/portable/IAR/RXv2/port_asm.s | 4 +- FreeRTOS/Source/portable/IAR/RXv2/portmacro.h | 4 +- .../Source/portable/IAR/STR71x/ISR_Support.h | 4 +- FreeRTOS/Source/portable/IAR/STR71x/port.c | 4 +- .../Source/portable/IAR/STR71x/portasm.s79 | 4 +- .../Source/portable/IAR/STR71x/portmacro.h | 4 +- .../Source/portable/IAR/STR75x/ISR_Support.h | 4 +- FreeRTOS/Source/portable/IAR/STR75x/port.c | 4 +- .../Source/portable/IAR/STR75x/portasm.s79 | 4 +- .../Source/portable/IAR/STR75x/portmacro.h | 4 +- .../Source/portable/IAR/STR91x/ISR_Support.h | 4 +- FreeRTOS/Source/portable/IAR/STR91x/port.c | 4 +- .../Source/portable/IAR/STR91x/portasm.s79 | 4 +- .../Source/portable/IAR/STR91x/portmacro.h | 4 +- .../Source/portable/IAR/V850ES/ISR_Support.h | 4 +- FreeRTOS/Source/portable/IAR/V850ES/port.c | 4 +- .../Source/portable/IAR/V850ES/portasm.s85 | 4 +- .../portable/IAR/V850ES/portasm_Fx3.s85 | 4 +- .../portable/IAR/V850ES/portasm_Hx2.s85 | 4 +- .../Source/portable/IAR/V850ES/portmacro.h | 4 +- FreeRTOS/Source/portable/MPLAB/PIC18F/port.c | 4 +- .../Source/portable/MPLAB/PIC18F/portmacro.h | 4 +- .../Source/portable/MPLAB/PIC24_dsPIC/port.c | 4 +- .../MPLAB/PIC24_dsPIC/portasm_PIC24.S | 4 +- .../MPLAB/PIC24_dsPIC/portasm_dsPIC.S | 4 +- .../portable/MPLAB/PIC24_dsPIC/portmacro.h | 4 +- .../portable/MPLAB/PIC32MEC14xx/ISR_Support.h | 4 +- .../Source/portable/MPLAB/PIC32MEC14xx/port.c | 4 +- .../portable/MPLAB/PIC32MEC14xx/port_asm.S | 4 +- .../portable/MPLAB/PIC32MEC14xx/portmacro.h | 4 +- .../portable/MPLAB/PIC32MX/ISR_Support.h | 4 +- FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c | 4 +- .../Source/portable/MPLAB/PIC32MX/port_asm.S | 4 +- .../Source/portable/MPLAB/PIC32MX/portmacro.h | 4 +- .../portable/MPLAB/PIC32MZ/ISR_Support.h | 4 +- FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c | 4 +- .../Source/portable/MPLAB/PIC32MZ/port_asm.S | 4 +- .../Source/portable/MPLAB/PIC32MZ/portmacro.h | 4 +- FreeRTOS/Source/portable/MSVC-MingW/port.c | 8 +- .../Source/portable/MSVC-MingW/portmacro.h | 4 +- FreeRTOS/Source/portable/MemMang/heap_1.c | 4 +- FreeRTOS/Source/portable/MemMang/heap_2.c | 4 +- FreeRTOS/Source/portable/MemMang/heap_3.c | 4 +- FreeRTOS/Source/portable/MemMang/heap_4.c | 4 +- FreeRTOS/Source/portable/MemMang/heap_5.c | 4 +- .../Source/portable/MikroC/ARM_CM4F/port.c | 4 +- .../portable/MikroC/ARM_CM4F/portmacro.h | 4 +- .../Paradigm/Tern_EE/large_untested/port.c | 4 +- .../Paradigm/Tern_EE/large_untested/portasm.h | 4 +- .../Tern_EE/large_untested/portmacro.h | 4 +- .../portable/Paradigm/Tern_EE/small/port.c | 4 +- .../portable/Paradigm/Tern_EE/small/portasm.h | 4 +- .../Paradigm/Tern_EE/small/portmacro.h | 4 +- .../Source/portable/RVDS/ARM7_LPC21xx/port.c | 4 +- .../portable/RVDS/ARM7_LPC21xx/portASM.s | 4 +- .../portable/RVDS/ARM7_LPC21xx/portmacro.h | 4 +- .../portable/RVDS/ARM7_LPC21xx/portmacro.inc | 4 +- FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c | 4 +- .../Source/portable/RVDS/ARM_CA9/portASM.s | 4 +- .../Source/portable/RVDS/ARM_CA9/portmacro.h | 4 +- .../portable/RVDS/ARM_CA9/portmacro.inc | 4 +- FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c | 4 +- .../Source/portable/RVDS/ARM_CM0/portmacro.h | 4 +- FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c | 4 +- .../Source/portable/RVDS/ARM_CM3/portmacro.h | 4 +- FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c | 4 +- .../Source/portable/RVDS/ARM_CM4F/portmacro.h | 4 +- .../Source/portable/RVDS/ARM_CM4_MPU/port.c | 4 +- .../portable/RVDS/ARM_CM4_MPU/portmacro.h | 4 +- .../Source/portable/RVDS/ARM_CM7/r0p1/port.c | 4 +- .../portable/RVDS/ARM_CM7/r0p1/portmacro.h | 4 +- FreeRTOS/Source/portable/Renesas/RX100/port.c | 4 +- .../portable/Renesas/RX100/port_asm.src | 4 +- .../Source/portable/Renesas/RX100/portmacro.h | 4 +- FreeRTOS/Source/portable/Renesas/RX200/port.c | 4 +- .../portable/Renesas/RX200/port_asm.src | 4 +- .../Source/portable/Renesas/RX200/portmacro.h | 4 +- FreeRTOS/Source/portable/Renesas/RX600/port.c | 4 +- .../portable/Renesas/RX600/port_asm.src | 4 +- .../Source/portable/Renesas/RX600/portmacro.h | 4 +- .../Source/portable/Renesas/RX600v2/port.c | 4 +- .../portable/Renesas/RX600v2/port_asm.src | 4 +- .../portable/Renesas/RX600v2/portmacro.h | 4 +- .../portable/Renesas/SH2A_FPU/ISR_Support.inc | 4 +- .../Source/portable/Renesas/SH2A_FPU/port.c | 4 +- .../portable/Renesas/SH2A_FPU/portasm.src | 4 +- .../portable/Renesas/SH2A_FPU/portmacro.h | 4 +- .../Source/portable/Rowley/MSP430F449/port.c | 4 +- .../portable/Rowley/MSP430F449/portasm.h | 4 +- .../portable/Rowley/MSP430F449/portext.asm | 4 +- .../portable/Rowley/MSP430F449/portmacro.h | 4 +- FreeRTOS/Source/portable/SDCC/Cygnal/port.c | 4 +- .../Source/portable/SDCC/Cygnal/portmacro.h | 4 +- .../Source/portable/Softune/MB91460/port.c | 4 +- .../portable/Softune/MB91460/portmacro.h | 4 +- .../Source/portable/Softune/MB96340/port.c | 4 +- .../portable/Softune/MB96340/portmacro.h | 4 +- .../Source/portable/Tasking/ARM_CM4F/port.c | 4 +- .../portable/Tasking/ARM_CM4F/port_asm.asm | 4 +- .../portable/Tasking/ARM_CM4F/portmacro.h | 4 +- .../portable/WizC/PIC18/Drivers/Tick/Tick.c | 4 +- .../WizC/PIC18/Drivers/Tick/isrTick.c | 4 +- .../Source/portable/WizC/PIC18/addFreeRTOS.h | 4 +- FreeRTOS/Source/portable/WizC/PIC18/port.c | 4 +- .../Source/portable/WizC/PIC18/portmacro.h | 4 +- .../portable/oWatcom/16BitDOS/Flsh186/port.c | 4 +- .../oWatcom/16BitDOS/Flsh186/portmacro.h | 4 +- .../portable/oWatcom/16BitDOS/PC/port.c | 4 +- .../portable/oWatcom/16BitDOS/PC/portmacro.h | 4 +- .../oWatcom/16BitDOS/common/portasm.h | 4 +- .../oWatcom/16BitDOS/common/portcomn.c | 4 +- FreeRTOS/Source/queue.c | 4 +- FreeRTOS/Source/stream_buffer.c | 4 +- FreeRTOS/Source/tasks.c | 4 +- FreeRTOS/Source/timers.c | 4 +- Upgrading to FreeRTOS V10.3.0.url | 5 - 1989 files changed, 40469 insertions(+), 139137 deletions(-) delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/DemoTasks/SimpleMQTTExamples.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSConfig.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSIPConfig.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/READ_ME_INSTRUCTIONS.url delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj.filters delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Packet32.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/PacketData.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Win32-Extensions.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/arch.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/bittypes.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/ip6_misc.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/netif.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-bpf.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-namedb.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-stdinc.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bluetooth.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bpf.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/namedb.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/pcap.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/sll.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/usb.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/vlan.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/remote-ext.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/wpcap.lib delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/atomic.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config_common.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_secure_sockets_config.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/main.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_demo.sln delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/printf-stdarg.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleTaskPoolExamples.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleUDPClientAndServer.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSConfig.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSIPConfig.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/READ_ME_INSTRUCTIONS.url delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj.filters delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Packet32.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/PacketData.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Win32-Extensions.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/arch.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/bittypes.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/ip6_misc.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/netif.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-bpf.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-namedb.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-stdinc.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bluetooth.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bpf.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/namedb.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/pcap.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/sll.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/usb.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/vlan.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/remote-ext.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/wpcap.lib delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config_common.h delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/main.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/printf-stdarg.c delete mode 100644 FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/task_pool_demo.sln create mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/ReadMe.txt create mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_end.h create mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_start.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Common/phyHandling.c delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/NetworkInterface.c delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.c delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/readme.txt delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f2xx_hal_eth.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.c delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f7xx_hal_eth.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.c delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/include/phyHandling.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.c delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.h delete mode 100644 FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl_reg.h rename FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/{COM0.C => _COM0.C} (100%) rename FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/{COM0.H => _COM0.H} (100%) delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.HardwareDebuglinker delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.RL78_G1A_TBlinker delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78G1Clinker delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L13linker delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L1Clinker delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.info delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.project delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/Project_Generation_Prefrences.prefs delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/org.eclipse.ltk.core.refactoring.prefs delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/custom.bat delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/PollQ.c delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/dynamic.c delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/PollQ.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/blocktim.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/dynamic.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/ExampleISR.S delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/RegTest.S delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/demo_specific_io.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14_ext.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A_ext.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C_ext.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13_ext.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C_ext.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_blinky.c delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h delete mode 100644 FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.Hbp delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.hws delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.tws delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/DefaultSession.hsf delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/ParTest.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.nav delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.tps delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/dbsct.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/flash_options.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowlvl.src delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowsrc.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/mcu_info.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp_config_reference.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/resetprg.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/rskrx63n.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/sbrk.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/vecttbl.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h_from_toolchain delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/platform.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SimSessionRX600.hsf delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-blinky.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-full.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/r_bsp_config.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/EMAC.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/404.html delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.html delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.shtml delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/io.shtml delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/runtime.shtml delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/stats.shtml delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/tcp.shtml delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fsdata.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/makefsdata delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.c delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/r_ether.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/uip-conf.h delete mode 100644 FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/webserver.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/FreeRTOSConfig.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.sln delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj.filters delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.c delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.c delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.c delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd_structs.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.sln delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.suo delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.filters delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.user delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/404.html delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/index.shtml delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/runtime.shtml delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fsdata.c delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.c delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.exe delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/stdafx.cpp delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/stdafx.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/targetver.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipcfg_msvc.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipopts.h delete mode 100644 FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c delete mode 100644 Upgrading to FreeRTOS V10.3.0.url diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/DemoTasks/SimpleHTTPSExamples.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/DemoTasks/SimpleHTTPSExamples.c index a543fae83..c2c236de7 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/DemoTasks/SimpleHTTPSExamples.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/DemoTasks/SimpleHTTPSExamples.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/arch.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/arch.c index 02bf82bf9..1f62658ce 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/arch.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/arch.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/netif.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/netif.h index 2d51478c0..1a25c309f 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/netif.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/WinPCap/netif.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.c index 2dc08cf05..8eef94a78 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.h index 197b21684..ae31ae8cf 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/demo_logging.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/main.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/main.c index a1b0fa5e9..7af543bda 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/main.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/common/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSConfig.h index d58a0b80f..5b50d813b 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSIPConfig.h index 92b7773b7..b16594272 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/demo_config.h index e81cc2cd9..b6e7b4e9b 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/http_plain_text/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSConfig.h index d58a0b80f..5b50d813b 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSIPConfig.h index 92b7773b7..b16594272 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/demo_config.h index 73f331883..14751dfff 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_basic_tls_server_auth/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSConfig.h index d58a0b80f..5b50d813b 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSIPConfig.h index f6985100f..1b09c3e1f 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/demo_config.h index 1e286386b..2b1f43f67 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/https/https_tls_mutual_auth/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_demo_profile.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_demo_profile.h index c4a3e1a58..d1263f261 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_demo_profile.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_demo_profile.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_setup_check.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_setup_check.h index 0fefe0305..85ee6958a 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_setup_check.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/aws_iot_setup_check.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/https_demo_profile.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/https_demo_profile.h index 8ef81df01..eab902134 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/https_demo_profile.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/https_demo_profile.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/mqtt_demo_profile.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/mqtt_demo_profile.h index 40b5a9773..51cb52e1f 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/mqtt_demo_profile.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/include/mqtt_demo_profile.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/DemoTasks/JobsNotifyNextExamples.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/DemoTasks/JobsNotifyNextExamples.c index 89d36a482..37a9ae8a7 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/DemoTasks/JobsNotifyNextExamples.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/DemoTasks/JobsNotifyNextExamples.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSConfig.h index d58a0b80f..5b50d813b 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSIPConfig.h index 6f86009bf..a2084f05c 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/arch.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/arch.c index 02bf82bf9..1f62658ce 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/arch.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/arch.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/netif.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/netif.h index 2d51478c0..1a25c309f 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/netif.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/WinPCap/netif.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_config.h index 971405caa..407cd7683 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.c index e22e91093..8388bab0e 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.h index 197b21684..ae31ae8cf 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/demo_logging.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/main.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/main.c index f06d37c21..924ecee9a 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/main.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/jobs/jobs_notify_next/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/LightWeightMQTTExample.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/LightWeightMQTTExample.c index aabb3a6f3..94b524177 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/LightWeightMQTTExample.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/LightWeightMQTTExample.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/SimpleMQTTExamples.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/SimpleMQTTExamples.c index feb872c52..7288238fd 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/SimpleMQTTExamples.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/DemoTasks/SimpleMQTTExamples.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/Run-time-stats-utils.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/Run-time-stats-utils.c index d9b7a593d..bda52a958 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/Run-time-stats-utils.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/Run-time-stats-utils.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/arch.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/arch.c index 02bf82bf9..1f62658ce 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/arch.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/arch.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/netif.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/netif.h index 2d51478c0..1a25c309f 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/netif.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/WinPCap/netif.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.c index e22e91093..8388bab0e 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.h index 197b21684..ae31ae8cf 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/demo_logging.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/main.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/main.c index 0c11b0c1d..d8403fd06 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/main.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/common/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSConfig.h index d58a0b80f..5b50d813b 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSIPConfig.h index b4f55e137..b28a4490e 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/demo_config.h index 20a783d51..a289ae50d 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_basic_tls_server_auth/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSConfig.h index 841ebd1a8..9f4f4e6d0 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSIPConfig.h index 92b7773b7..b16594272 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/demo_config.h index 6ea370304..14382ad1c 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_plain_text/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSConfig.h index d58a0b80f..5b50d813b 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSIPConfig.h index 6f86009bf..a2084f05c 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/demo_config.h index 6639d2407..5adfd95c3 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_tls_mutual_auth/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/DemoTasks/ShadowDeviceOperationsExamples.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/DemoTasks/ShadowDeviceOperationsExamples.c index 614e2614c..25b7d77a5 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/DemoTasks/ShadowDeviceOperationsExamples.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/DemoTasks/ShadowDeviceOperationsExamples.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSConfig.h index e407f438d..727998023 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSIPConfig.h index 6f86009bf..a2084f05c 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/arch.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/arch.c index 02bf82bf9..1f62658ce 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/arch.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/arch.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/netif.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/netif.h index 2d51478c0..1a25c309f 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/netif.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/WinPCap/netif.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_config.h index b96fc0bc9..f0d8362c7 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.c index e22e91093..8388bab0e 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.h index 197b21684..ae31ae8cf 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/demo_logging.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/main.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/main.c index 357a2c223..131daa689 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/main.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/shadow/shadow_device_operations/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_offline/js/aws_iot_demo_profile_template.js b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_offline/js/aws_iot_demo_profile_template.js index d30abd5a5..a89619b73 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_offline/js/aws_iot_demo_profile_template.js +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_offline/js/aws_iot_demo_profile_template.js @@ -1,7 +1,7 @@ var awsIotProfileTemplate = `/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile.templ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile.templ index 817f706a9..c9a54ab15 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile.templ +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile.templ @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile_empty.templ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile_empty.templ index c4a3e1a58..d1263f261 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile_empty.templ +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/aws_iot_demo_profile_empty.templ @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/DemoTasks/SimpleTaskPoolExamples.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/DemoTasks/SimpleTaskPoolExamples.c index 3c8fa0699..e0667d79a 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/DemoTasks/SimpleTaskPoolExamples.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/DemoTasks/SimpleTaskPoolExamples.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSConfig.h index 8ec7ee00f..1a46df021 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSIPConfig.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSIPConfig.h index 11f8f00b9..e788d28e6 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSIPConfig.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/FreeRTOSIPConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/arch.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/arch.c index 02bf82bf9..1f62658ce 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/arch.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/arch.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/netif.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/netif.h index 2d51478c0..1a25c309f 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/netif.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/WinPCap/netif.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_config.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_config.h index 971405caa..407cd7683 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_config.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_config.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.c index e22e91093..8388bab0e 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.h b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.h index 197b21684..ae31ae8cf 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.h +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/demo_logging.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/main.c b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/main.c index 22f95907c..fa9f5aaba 100644 --- a/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/main.c +++ b/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/utilities/task_pool/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c index e973cef02..20fbe615c 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c index fd548844f..0ee1b6224 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c index ba3a43e6f..d61e017f8 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c index bac9b7a1a..27a948e2a 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c index 157463544..b47c4dec1 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c index a43264819..3df1c4458 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h index 69dda2995..69698c6a6 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c index eb0d078ac..f8ea22e76 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c index cc1872876..e0f89d2e9 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h index 3f1f6ef4f..e3c32fcd0 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c index b241fd369..b159373e5 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h index 1a73f1cf1..939bff283 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/DemoTasks/SimpleMQTTExamples.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/DemoTasks/SimpleMQTTExamples.c deleted file mode 100644 index 80a04169e..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/DemoTasks/SimpleMQTTExamples.c +++ /dev/null @@ -1,548 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* Standard inclues. */ -#include -#include - -/* Kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* IoT SDK includes. */ -#include "iot_mqtt.h" -#include "iot_taskpool.h" -#include "platform/iot_network_freertos.h" - -/** - * @brief The keep-alive interval used for this example. - * - * An MQTT ping request will be sent periodically at this interval. - */ -#define mqttexampleKEEP_ALIVE_SECONDS ( 60 ) - -/** - * @brief The timeout for MQTT operations in this example. - */ -#define mqttexampleMQTT_TIMEOUT_MS ( 50000 ) - -/** - * @brief The MQTT client identifier used in this example. - */ -#define mqttexampleCLIENT_IDENTIFIER "mqttexampleclient" - -const char *pcClientIdentifiers[] = { "AAA" };//, "BBB", "CCC", "DDD", "EEE", "FFF", "GGG", "HHH", "III", "JJJ" }; - -/** - * @brief Details of the MQTT broker to connect to. - * - * @note This example does not use TLS and therefore won't work with AWS IoT. - * - */ -#define mqttexampleMQTT_BROKER_ENDPOINT "test.mosquitto.org" -#define mqttexampleMQTT_BROKER_PORT 1883 - -/** - * @brief The topic to subscribe and publish to in the example. - */ -#define mqttexampleTOPIC "example/topic" - -/** - * @brief The MQTT message published in this example. - */ -#define mqttexampleMESSAGE "Hello World!" - -/** - * @brief Paramters to control the retry behaviour in case a QoS1 publish - * message gets lost. - * - * Retry every minutes up to a maximum of 5 retries. - */ -#define mqttexamplePUBLISH_RETRY_MS ( 1000 ) -#define mqttexamplePUBLISH_RETRY_LIMIT ( 5 ) - -/** - * @brief The bit which is set in the demo task's notification value from the - * disconnect callback to inform the demo task about the MQTT disconnect. - */ -#define mqttexampleDISCONNECTED_BIT ( 1UL << 0UL ) - -/** - * @brief The bit which is set in the demo task's notification value from the - * publish callback to inform the demo task about the message received from the - * MQTT broker. - */ -#define mqttexampleMESSAGE_RECEIVED_BIT ( 1UL << 1UL ) -/*-----------------------------------------------------------*/ - -/** - * @brief Parameters used to create the system task pool. - */ -static const IotTaskPoolInfo_t xTaskPoolParameters = { - /* Minimum number of threads in a task pool. - * Note the slimmed down version of the task - * pool used by this library does not autoscale - * the number of tasks in the pool so in this - * case this sets the number of tasks in the - * pool. */ - 2, - /* Maximum number of threads in a task pool. - * Note the slimmed down version of the task - * pool used by this library does not autoscale - * the number of tasks in the pool so in this - * case this parameter is just ignored. */ - 2, - /* Stack size for every task pool thread - in - * bytes, hence multiplying by the number of bytes - * in a word as configMINIMAL_STACK_SIZE is - * specified in words. */ - configMINIMAL_STACK_SIZE * sizeof( portSTACK_TYPE ), - /* Priority for every task pool thread. */ - tskIDLE_PRIORITY, - }; -/*-----------------------------------------------------------*/ - -/** - * @brief The task used to demonstrate the MQTT API. - * - * @param[in] pvParameters Parmaters as passed at the time of task creation. Not - * used in this example. - */ -static void prvMQTTDemoTask( void *pvParameters ); - -/** - * @brief The callback invoked by the MQTT library when the MQTT connection gets - * disconnected. - * - * @param[in] pvCallbackContext Callback context as provided at the time of - * connect. - * @param[in] pxCallbackParams Contains the reason why the MQTT connection was - * disconnected. - */ -static void prvExample_OnDisconnect( void * pvCallbackContext, - IotMqttCallbackParam_t * pxCallbackParams ); - -/** - * @brief The callback invoked by the MQTT library when a message is received on - * a subscribed topic from the MQTT broker. - * - * @param[in] pvCallbackContext Callback context as provided at the time of - * subscribe. - * @param[in] pxCallbackParams Contain the details about the received message - - * topic on which the message was received, the received message. - */ -static void prvExample_OnMessageReceived( void * pvCallbackContext, - IotMqttCallbackParam_t * pxCallbackParams ); - -/** - * @brief Connects to the MQTT broker as specified in mqttexampleMQTT_BROKER_ENDPOINT - * and mqttexampleMQTT_BROKER_PORT. - * - * @note This example does not use TLS and therefore will not work with MQTT. - */ -static void prvMQTTConnect( IotMqttConnection_t *xMQTTConnection, const char *pcClientID ); - -/** - * @brief Subscribes to pcTopicString. - */ -static void prvMQTTSubscribe( IotMqttConnection_t xMQTTConnection, const char * const pcTopicString ); - -/** - * @brief Publishes a messages mqttexampleMESSAGE on mqttexampleTOPIC topic. - */ -static void prvMQTTPublish( IotMqttConnection_t xMQTTConnection, const char * const pcTopicString ); - -/** - * @brief Unsubscribes from the mqttexampleTOPIC topic. - */ -static void prvMQTTUnsubscribe( IotMqttConnection_t xMQTTConnection, const char * const pcTopicString ); - -/** - * @brief Disconnects from the MQTT broker gracefully by sending an MQTT - * DISCONNECT message. - */ -static void prvMQTTDisconnect( IotMqttConnection_t xMQTTConnection ); -/*-----------------------------------------------------------*/ - -static void prvExample_OnDisconnect( void * pvCallbackContext, - IotMqttCallbackParam_t * pxCallbackParams ) -{ -TaskHandle_t xDemoTaskHandle = ( TaskHandle_t ) pvCallbackContext; - - /* Ensure that we initiated the disconnect. */ - configASSERT( pxCallbackParams->u.disconnectReason == IOT_MQTT_DISCONNECT_CALLED ); - - /* Inform the demo task about the disconnect. */ - xTaskNotify( xDemoTaskHandle, - mqttexampleDISCONNECTED_BIT, - eSetBits /* Set the mqttexampleDISCONNECTED_BIT in the demo task's notification value. */ - ); -} -/*-----------------------------------------------------------*/ - -static void prvExample_OnMessageReceived( void * pvCallbackContext, - IotMqttCallbackParam_t * pxCallbackParams ) -{ -TaskHandle_t xDemoTaskHandle = ( TaskHandle_t ) pvCallbackContext; - - /* Ensure that the message is received on the expected topic. */ -// configASSERT( pxCallbackParams->u.message.info.topicNameLength == strlen( mqttexampleTOPIC ) ); -// configASSERT( strncmp( pxCallbackParams->u.message.info.pTopicName, -// mqttexampleTOPIC, -// strlen( mqttexampleTOPIC ) ) == 0 ); - - /* Ensure that the expected message is received. */ - configASSERT( pxCallbackParams->u.message.info.payloadLength == strlen( mqttexampleMESSAGE ) ); - configASSERT( strncmp( pxCallbackParams->u.message.info.pPayload, - mqttexampleMESSAGE, - strlen( mqttexampleMESSAGE ) ) == 0 ); - - /* Ensure that the message QoS is as expected. */ - configASSERT( pxCallbackParams->u.message.info.qos == IOT_MQTT_QOS_1 ); - - /* Although this print uses the constants rather than the data from the - * message payload the asserts above have already checked the message - * payload equals the constants, and it is more efficient not to have to - * worry about lengths in the print. */ - configPRINTF( ( "Received %s on the topic %s\r\n", mqttexampleMESSAGE, mqttexampleTOPIC ) ); - - /* Inform the demo task about the message received from the MQTT broker. */ - xTaskNotify( xDemoTaskHandle, - mqttexampleMESSAGE_RECEIVED_BIT, - eSetBits /* Set the mqttexampleMESSAGE_RECEIVED_BIT in the demo task's notification value. */ - ); -} -/*-----------------------------------------------------------*/ - -void vStartSimpleMQTTDemo( void ) -{ -uint32_t x; -const uint32_t ulMax_x = sizeof( pcClientIdentifiers ) / sizeof( char * ); - - /* This example uses a single application task, which in turn is used to - * connect, subscribe, publish, unsubscribe and disconnect from the MQTT - * broker. */ -for( x = 0; x < ulMax_x; x++ ) -{ - xTaskCreate( prvMQTTDemoTask, /* Function that implements the task. */ - "MQTTDemo", /* Text name for the task - only used for debugging. */ - configMINIMAL_STACK_SIZE, /* Size of stack (in words, not bytes) to allocate for the task. */ - ( void * ) x, /* Task parameter - not used in this case. */ - tskIDLE_PRIORITY, /* Task priority, must be between 0 and configMAX_PRIORITIES - 1. */ - NULL ); /* Used to pass out a handle to the created task - not used in this case. */ -} -} -/*-----------------------------------------------------------*/ - -static void prvMQTTDemoTask( void *pvParameters ) -{ -IotMqttError_t xResult; -uint32_t ulNotificationValue = 0, ulPublishCount; -uint32_t ulMaxPublishCount = 0UL; -const TickType_t xNoDelay = ( TickType_t ) 1; -IotMqttConnection_t xMQTTConnection = IOT_MQTT_CONNECTION_INITIALIZER; -uint32_t ulTaskNumber = ( uint32_t ) pvParameters, x; -char cTopicString[ sizeof( mqttexampleTOPIC ) + 5 ];//_RB_ Access by other tasks so must be persistant and will cause memory faults on memory protected systems. -#pragma message ("Access by other tasks so must be persistant and will cause memory faults on memory protected systems.") - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - /* The MQTT library needs a task pool, so create the system task pool. */ - xResult = IotTaskPool_CreateSystemTaskPool( &( xTaskPoolParameters ) ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* MQTT library must be initialized before it can be used. This is just one - * time initialization. */ - xResult = IotMqtt_Init(); - configASSERT( xResult == IOT_MQTT_SUCCESS ); - - /* Create a topic string that is unique to the MQTT connection created by - this task. */ - snprintf( cTopicString, sizeof( cTopicString ), "%s/%s", mqttexampleTOPIC, pcClientIdentifiers[ ulTaskNumber ] ); - - for( ; ; ) - { - /* Don't expect any notifications to be pending yet. */ - ulNotificationValue = ulTaskNotifyTake( pdTRUE, xNoDelay ); - configASSERT( ulNotificationValue == 0 ); - - - /****************************** Connect. ******************************/ - - /* Establish a connection to the MQTT broker. This example connects to - * the MQTT broker as specified in mqttexampleMQTT_BROKER_ENDPOINT and - * mqttexampleMQTT_BROKER_PORT at the top of this file. Please change - * it to the MQTT broker you want to connect to. Note that this example - * does not use TLS and therefore will not work with AWS IoT. */ - prvMQTTConnect( &xMQTTConnection, pcClientIdentifiers[ ulTaskNumber ] ); - configPRINTF( ( "Connected to %s\r\n", mqttexampleMQTT_BROKER_ENDPOINT ) ); - - - /**************************** Subscribe. ******************************/ - - /* The client is now connected to the broker. Subscribe to the topic - * as specified in mqttexampleTOPIC at the top of this file. This - * client will then publish to the same topic it subscribed to, so will - * expect all the messages it sends to the broker to be sent back to it - * from the broker. */ - prvMQTTSubscribe( xMQTTConnection, cTopicString ); - configPRINTF( ( "Subscribed to the topic %s\r\n", cTopicString ) ); - - - /*********************** Publish 5 messages. **************************/ - - /* Publish a few messages while connected. */ - for( x = 0; x < ( ulTaskNumber + 1UL ); x++ ) - { - ulMaxPublishCount = uxRand(); - } - - /* Cap ulMaxPublishCount but ensure it is not zero. */ - ulMaxPublishCount %= 10UL; - ulMaxPublishCount++; - - for( ulPublishCount = 0; ulPublishCount < ulMaxPublishCount; ulPublishCount++ ) - { - /* Publish a message on the mqttexampleTOPIC topic as specified at - * the top of this file. */ - prvMQTTPublish( xMQTTConnection, cTopicString ); - configPRINTF( ( "Published %s on the topic %s\r\n", mqttexampleMESSAGE, cTopicString ) ); - - /* Since we are subscribed to the same topic as we published on, we - * will get the same message back from the MQTT broker. Wait for the - * message to be received which is informed to us by the publish - * callback (prvExample_OnMessageReceived) by setting the - * mqttexampleMESSAGE_RECEIVED_BIT in this task's notification - * value. Note that the bit is cleared in the task's notification - * value to ensure that it is ready for next message. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - mqttexampleMESSAGE_RECEIVED_BIT, /* Clear bit on exit. */ - &( ulNotificationValue ), /* Obtain the notification value. */ - pdMS_TO_TICKS( mqttexampleMQTT_TIMEOUT_MS ) ); - configASSERT( ( ulNotificationValue & mqttexampleMESSAGE_RECEIVED_BIT ) == mqttexampleMESSAGE_RECEIVED_BIT ); - } - - - /******************* Unsubscribe and Disconnect. **********************/ - - /* Unsubscribe from the topic mqttexampleTOPIC and disconnect - * gracefully. */ - prvMQTTUnsubscribe( xMQTTConnection, cTopicString ); - prvMQTTDisconnect( xMQTTConnection ); - configPRINTF( ( "Disconnected from %s\r\n\r\n", mqttexampleMQTT_BROKER_ENDPOINT ) ); - - /* Wait for the disconnect operation to complete which is informed to us - * by the disconnect callback (prvExample_OnDisconnect)by setting - * the mqttexampleDISCONNECTED_BIT in this task's notification value. - * Note that the bit is cleared in the task's notification value to - * ensure that it is ready for the next run. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - mqttexampleDISCONNECTED_BIT, /* Clear bit on exit. */ - &( ulNotificationValue ), /* Obtain the notification value. */ - pdMS_TO_TICKS( mqttexampleMQTT_TIMEOUT_MS ) ); - configASSERT( ( ulNotificationValue & mqttexampleDISCONNECTED_BIT ) == mqttexampleDISCONNECTED_BIT ); - - /* Wait for some time between two iterations to ensure that we do not - * bombard the public test mosquitto broker. */ - configPRINTF( ( "prvMQTTDemoTask() completed an iteration without hitting an assert. Total free heap is %u\r\n\r\n", xPortGetFreeHeapSize() ) ); -// vTaskDelay( pdMS_TO_TICKS( 5000 ) ); - } -} -/*-----------------------------------------------------------*/ - -static void prvMQTTConnect( IotMqttConnection_t *xMQTTConnection, const char *pcClientID ) -{ -IotMqttError_t xResult; -IotNetworkServerInfo_t xMQTTBrokerInfo; -IotMqttNetworkInfo_t xNetworkInfo = IOT_MQTT_NETWORK_INFO_INITIALIZER; -IotMqttConnectInfo_t xConnectInfo = IOT_MQTT_CONNECT_INFO_INITIALIZER; -static char c[ 10 ]; -static int id = 0; - - /******************* Broker information setup. **********************/ - - xMQTTBrokerInfo.pHostName = mqttexampleMQTT_BROKER_ENDPOINT; - xMQTTBrokerInfo.port = mqttexampleMQTT_BROKER_PORT; - - - /******************* Network information setup. **********************/ - - /* No connection to the MQTT broker has been established yet and we want to - * establish a new connection. */ - xNetworkInfo.createNetworkConnection = true; - xNetworkInfo.u.setup.pNetworkServerInfo = &( xMQTTBrokerInfo ); - - /* This example does not use TLS and therefore pNetworkCredentialInfo must - * be set to NULL. */ - xNetworkInfo.u.setup.pNetworkCredentialInfo = NULL; - - /* Use FreeRTOS+TCP network. */ - xNetworkInfo.pNetworkInterface = IOT_NETWORK_INTERFACE_FREERTOS; - - /* Setup the callback which is called when the MQTT connection is - * disconnected. The task handle is passed as the callback context which - * is used by the callback to send a task notification to this task.*/ - xNetworkInfo.disconnectCallback.pCallbackContext = ( void * ) xTaskGetCurrentTaskHandle(); - xNetworkInfo.disconnectCallback.function = prvExample_OnDisconnect; - - - /****************** MQTT Connection information setup. ********************/ - - /* Set this flag to true if connecting to the AWS IoT MQTT broker. This - * example does not use TLS and therefore won't work with AWS IoT. */ - xConnectInfo.awsIotMqttMode = false; - - /* Start with a clean session i.e. direct the MQTT broker to discard any - * previous session data. Also, establishing a connection with clean session - * will ensure that the broker does not store any data when this client - * gets disconnected. */ - xConnectInfo.cleanSession = true; - - /* Since we are starting with a clean session, there are no previous - * subscriptions to be restored. */ - xConnectInfo.pPreviousSubscriptions = NULL; - xConnectInfo.previousSubscriptionCount = 0; - - /* We do not want to publish Last Will and Testament (LWT) message if the - * client gets disconnected. */ - xConnectInfo.pWillInfo = NULL; - - /* Send an MQTT PING request every minute to keep the connection open if - there is no other MQTT traffic. */ - xConnectInfo.keepAliveSeconds = mqttexampleKEEP_ALIVE_SECONDS; - - /* The client identifier is used to uniquely identify this MQTT client to - * the MQTT broker. In a production device the identifier can be something - * unique, such as a device serial number. */ - xConnectInfo.pClientIdentifier = pcClientID; - xConnectInfo.clientIdentifierLength = ( uint16_t ) strlen( pcClientID ); - - /* This example does not use any authentication and therefore username and - * password fields are not used. */ - xConnectInfo.pUserName = NULL; - xConnectInfo.userNameLength = 0; - xConnectInfo.pPassword = NULL; - xConnectInfo.passwordLength = 0; - - /* Establish the connection to the MQTT broker - It is a blocking call and - will return only when connection is complete or a timeout occurs. */ - xResult = IotMqtt_Connect( &( xNetworkInfo ), - &( xConnectInfo ), - mqttexampleMQTT_TIMEOUT_MS, - xMQTTConnection ); - configASSERT( xResult == IOT_MQTT_SUCCESS ); -} -/*-----------------------------------------------------------*/ - -static void prvMQTTSubscribe( IotMqttConnection_t xMQTTConnection, const char * const pcTopicString ) -{ -IotMqttError_t xResult; -IotMqttSubscription_t xMQTTSubscription; - - /* Subscribe to the mqttexampleTOPIC topic filter. The task handle is passed - * as the callback context which is used by the callback to send a task - * notification to this task.*/ - xMQTTSubscription.qos = IOT_MQTT_QOS_1; - xMQTTSubscription.pTopicFilter = pcTopicString; - xMQTTSubscription.topicFilterLength = ( uint16_t ) strlen( pcTopicString ); - xMQTTSubscription.callback.pCallbackContext = ( void * ) xTaskGetCurrentTaskHandle(); - xMQTTSubscription.callback.function = prvExample_OnMessageReceived; - - /* Use the synchronous API to subscribe - It is a blocking call and only - * returns when the subscribe operation is complete or a timeout occurs. */ - xResult = IotMqtt_TimedSubscribe( xMQTTConnection, - &( xMQTTSubscription ), - 1, /* We are subscribing to one topic filter. */ - 0, /* flags - currently ignored. */ - mqttexampleMQTT_TIMEOUT_MS ); - configASSERT( xResult == IOT_MQTT_SUCCESS ); -} -/*-----------------------------------------------------------*/ - -static void prvMQTTPublish( IotMqttConnection_t xMQTTConnection, const char * const pcTopicString ) -{ -IotMqttError_t xResult; -IotMqttPublishInfo_t xMQTTPublishInfo; - - /* Publish a message with QoS1 on the mqttexampleTOPIC topic. Since we are - * subscribed to the same topic, the MQTT broker will send the same message - * back to us. It is verified in the publish callback. */ - xMQTTPublishInfo.qos = IOT_MQTT_QOS_1; - xMQTTPublishInfo.retain = false; - xMQTTPublishInfo.pTopicName = pcTopicString; - xMQTTPublishInfo.topicNameLength = ( uint16_t ) strlen( pcTopicString ); - xMQTTPublishInfo.pPayload = mqttexampleMESSAGE; - xMQTTPublishInfo.payloadLength = strlen( mqttexampleMESSAGE ); - xMQTTPublishInfo.retryMs = mqttexamplePUBLISH_RETRY_MS; - xMQTTPublishInfo.retryLimit = mqttexamplePUBLISH_RETRY_LIMIT; - - /* Use the synchronous API to publish - It is a blocking call and only - * returns when the publish operation is complete or a timeout occurs. */ - xResult = IotMqtt_TimedPublish( xMQTTConnection, - &( xMQTTPublishInfo ), - 0, /* flags - currently ignored. */ - mqttexampleMQTT_TIMEOUT_MS ); - configASSERT( xResult == IOT_MQTT_SUCCESS ); -} -/*-----------------------------------------------------------*/ - -static void prvMQTTUnsubscribe( IotMqttConnection_t xMQTTConnection, const char * const pcTopicString ) -{ -IotMqttError_t xResult; -IotMqttSubscription_t xMQTTSubscription; - - /* Unsubscribe from the mqttexampleTOPIC topic filter. */ - xMQTTSubscription.pTopicFilter = pcTopicString; - xMQTTSubscription.topicFilterLength = ( uint16_t ) strlen( pcTopicString ); - /* The following members of the IotMqttSubscription_t are ignored by the - * unsubscribe operation. Just initialize them to avoid "use of uninitialized - * variable" warnings. */ - xMQTTSubscription.qos = IOT_MQTT_QOS_1; - xMQTTSubscription.callback.pCallbackContext = NULL; - xMQTTSubscription.callback.function = NULL; - - /* Use the synchronous API to unsubscribe - It is a blocking call and only - * returns when the unsubscribe operation is complete or a timeout occurs. */ - xResult = IotMqtt_TimedUnsubscribe( xMQTTConnection, - &( xMQTTSubscription ), - 1, /* We are unsubscribing from one topic filter. */ - 0, /* flags - currently ignored. */ - mqttexampleMQTT_TIMEOUT_MS ); - configASSERT( xResult == IOT_MQTT_SUCCESS ); -} -/*-----------------------------------------------------------*/ - -static void prvMQTTDisconnect( IotMqttConnection_t xMQTTConnection ) -{ - /* Send a MQTT DISCONNECT packet to the MQTT broker to do a graceful - * disconnect. */ - IotMqtt_Disconnect( xMQTTConnection, - 0 /* flags - 0 means a graceful disconnect by sending MQTT DISCONNECT. */ - ); -} -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSConfig.h deleted file mode 100644 index 29b4aace0..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSConfig.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * http://www.freertos.org/a00110.html - * - * The bottom of this file contains some constants specific to running the UDP - * stack in this demo. Constants specific to FreeRTOS+TCP itself (rather than - * the demo) are contained in FreeRTOSIPConfig.h. - *----------------------------------------------------------*/ -#define configUSE_PREEMPTION 1 -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 -#define configMAX_PRIORITIES ( 7 ) -#define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the Win32 thread. */ -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2048U * 1024U ) ) -#define configMAX_TASK_NAME_LEN ( 15 ) -#define configUSE_TRACE_FACILITY 1 -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_CO_ROUTINES 0 -#define configUSE_MUTEXES 1 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configQUEUE_REGISTRY_SIZE 0 -#define configUSE_APPLICATION_TASK_TAG 0 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_ALTERNATIVE_API 0 -#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0 -#define configENABLE_BACKWARD_COMPATIBILITY 1 -#define configSUPPORT_STATIC_ALLOCATION 1 - -/* Hook function related definitions. */ -#define configUSE_TICK_HOOK 0 -#define configUSE_IDLE_HOOK 0 -#define configUSE_MALLOC_FAILED_HOOK 0 -#define configCHECK_FOR_STACK_OVERFLOW 0 /* Not applicable to the Win32 port. */ - -/* Software timer related definitions. */ -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) -#define configTIMER_QUEUE_LENGTH 5 -#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) - -/* Event group related definitions. */ -#define configUSE_EVENT_GROUPS 1 - -/* Run time stats gathering definitions. */ -#define configGENERATE_RUN_TIME_STATS 0 - -/* Co-routine definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - -/* Set the following definitions to 1 to include the API function, or zero -to exclude the API function. */ -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_vTaskCleanUpResources 0 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define INCLUDE_xTaskGetSchedulerState 1 -#define INCLUDE_xTimerGetTimerTaskHandle 0 -#define INCLUDE_xTaskGetIdleTaskHandle 0 -#define INCLUDE_xQueueGetMutexHolder 1 -#define INCLUDE_eTaskGetState 1 -#define INCLUDE_xEventGroupSetBitsFromISR 1 -#define INCLUDE_xTimerPendFunctionCall 1 -#define INCLUDE_pcTaskGetTaskName 1 - -/* This demo makes use of one or more example stats formatting functions. These -format the raw data provided by the uxTaskGetSystemState() function in to human -readable ASCII form. See the notes in the implementation of vTaskList() within -FreeRTOS/Source/tasks.c for limitations. configUSE_STATS_FORMATTING_FUNCTIONS -is set to 2 so the formatting functions are included without the stdio.h being -included in tasks.c. That is because this project defines its own sprintf() -functions. */ -#define configUSE_STATS_FORMATTING_FUNCTIONS 1 - -/* Assert call defined for debug builds. */ -#ifdef _DEBUG - extern void vAssertCalled( const char *pcFile, uint32_t ulLine ); - #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ ) -#endif /* _DEBUG */ - - - -/* Application specific definitions follow. **********************************/ - -/* Only used when running in the FreeRTOS Windows simulator. Defines the -priority of the task used to simulate Ethernet interrupts. */ -#define configMAC_ISR_SIMULATOR_PRIORITY ( configMAX_PRIORITIES - 1 ) - -/* This demo creates a virtual network connection by accessing the raw Ethernet -or WiFi data to and from a real network connection. Many computers have more -than one real network port, and configNETWORK_INTERFACE_TO_USE is used to tell -the demo which real port should be used to create the virtual port. The ports -available are displayed on the console when the application is executed. For -example, on my development laptop setting configNETWORK_INTERFACE_TO_USE to 4 -results in the wired network being used, while setting -configNETWORK_INTERFACE_TO_USE to 2 results in the wireless network being -used. */ -#define configNETWORK_INTERFACE_TO_USE 2L - -/* The address of an echo server is only left in this project as it doubles as -the address to which logging is sent should UDP logging be enabled. */ -#define configECHO_SERVER_ADDR0 192 -#define configECHO_SERVER_ADDR1 168 -#define configECHO_SERVER_ADDR2 26 -#define configECHO_SERVER_ADDR3 100 - -/* Default MAC address configuration. The demo creates a virtual network -connection that uses this MAC address by accessing the raw Ethernet/WiFi data -to and from a real network connection on the host PC. See the -configNETWORK_INTERFACE_TO_USE definition above for information on how to -configure the real network connection to use. */ -#define configMAC_ADDR0 0x00 -#define configMAC_ADDR1 0x11 -#define configMAC_ADDR2 0x11 -#define configMAC_ADDR3 0x11 -#define configMAC_ADDR4 0x11 -#define configMAC_ADDR5 0x41 - -/* Default IP address configuration. Used in ipconfigUSE_DNS is set to 0, or -ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */ -#define configIP_ADDR0 192 -#define configIP_ADDR1 168 -#define configIP_ADDR2 1 -#define configIP_ADDR3 51 - -/* Default gateway IP address configuration. Used in ipconfigUSE_DNS is set to -0, or ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */ -#define configGATEWAY_ADDR0 192 -#define configGATEWAY_ADDR1 168 -#define configGATEWAY_ADDR2 1 -#define configGATEWAY_ADDR3 1 - -/* Default DNS server configuration. OpenDNS addresses are 208.67.222.222 and -208.67.220.220. Used in ipconfigUSE_DNS is set to 0, or ipconfigUSE_DNS is set -to 1 but a DNS server cannot be contacted.*/ -#define configDNS_SERVER_ADDR0 8 -#define configDNS_SERVER_ADDR1 8 -#define configDNS_SERVER_ADDR2 8 -#define configDNS_SERVER_ADDR3 8 - -/* Default netmask configuration. Used in ipconfigUSE_DNS is set to 0, or -ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */ -#define configNET_MASK0 255 -#define configNET_MASK1 255 -#define configNET_MASK2 255 -#define configNET_MASK3 0 - -/* The UDP port to which print messages are sent. */ -#define configPRINT_PORT ( 15000 ) - -#if( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) ) - /* Map to Windows names. */ - #define snprintf _snprintf - #define vsnprintf _vsnprintf -#endif - -/* Visual studio does not have an implementation of strcasecmp(). */ -#define strcasecmp _stricmp -#define strncasecmp _strnicmp -#define strcmpi _strcmpi - -/* Prototype for the function used to print out. In this case it prints to the -console before the network is connected then a UDP port after the network has -connected. */ -extern void vLoggingPrintf( const char *pcFormatString, ... ); -#define configPRINTF( X ) vLoggingPrintf X - -#endif /* FREERTOS_CONFIG_H */ - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSIPConfig.h deleted file mode 100644 index 563f0cb09..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/FreeRTOSIPConfig.h +++ /dev/null @@ -1,307 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - - -/***************************************************************************** - * - * See the following URL for configuration information. - * http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html - * - *****************************************************************************/ - -#ifndef FREERTOS_IP_CONFIG_H -#define FREERTOS_IP_CONFIG_H - -/* Prototype for the function used to print out. In this case it prints to the -console before the network is connected then a UDP port after the network has -connected. */ -extern void vLoggingPrintf( const char *pcFormatString, ... ); - -/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to -1 then FreeRTOS_debug_printf should be defined to the function used to print -out the debugging messages. */ -#define ipconfigHAS_DEBUG_PRINTF 0 -#if( ipconfigHAS_DEBUG_PRINTF == 1 ) - #define FreeRTOS_debug_printf(X) vLoggingPrintf X -#endif - -/* Set to 1 to print out non debugging messages, for example the output of the -FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1 -then FreeRTOS_printf should be set to the function used to print out the -messages. */ -#define ipconfigHAS_PRINTF 1 -#if( ipconfigHAS_PRINTF == 1 ) - #define FreeRTOS_printf(X) vLoggingPrintf X -#endif - -/* Define the byte order of the target MCU (the MCU FreeRTOS+TCP is executing -on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */ -#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN - -/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums) -then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software -stack repeating the checksum calculations. */ -#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1 - -/* Several API's will block until the result is known, or the action has been -performed, for example FreeRTOS_send() and FreeRTOS_recv(). The timeouts can be -set per socket, using setsockopt(). If not set, the times below will be -used as defaults. */ -#define ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME ( 5000 ) -#define ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME ( 5000 ) - -/* Include support for LLMNR: Link-local Multicast Name Resolution -(non-Microsoft) */ -#define ipconfigUSE_LLMNR ( 0 ) - -/* Include support for NBNS: NetBIOS Name Service (Microsoft) */ -#define ipconfigUSE_NBNS ( 0 ) - -/* Include support for DNS caching. For TCP, having a small DNS cache is very -useful. When a cache is present, ipconfigDNS_REQUEST_ATTEMPTS can be kept low -and also DNS may use small timeouts. If a DNS reply comes in after the DNS -socket has been destroyed, the result will be stored into the cache. The next -call to FreeRTOS_gethostbyname() will return immediately, without even creating -a socket. */ -#define ipconfigUSE_DNS_CACHE ( 1 ) -#define ipconfigDNS_CACHE_NAME_LENGTH ( 32 ) -#define ipconfigDNS_CACHE_ENTRIES ( 4 ) -#define ipconfigDNS_REQUEST_ATTEMPTS ( 2 ) - -/* The IP stack executes it its own task (although any application task can make -use of its services through the published sockets API). ipconfigUDP_TASK_PRIORITY -sets the priority of the task that executes the IP stack. The priority is a -standard FreeRTOS task priority so can take any value from 0 (the lowest -priority) to (configMAX_PRIORITIES - 1) (the highest priority). -configMAX_PRIORITIES is a standard FreeRTOS configuration parameter defined in -FreeRTOSConfig.h, not FreeRTOSIPConfig.h. Consideration needs to be given as to -the priority assigned to the task executing the IP stack relative to the -priority assigned to tasks that use the IP stack. */ -#define ipconfigIP_TASK_PRIORITY ( configMAX_PRIORITIES - 2 ) - -/* The size, in words (not bytes), of the stack allocated to the FreeRTOS+TCP -task. This setting is less important when the FreeRTOS Win32 simulator is used -as the Win32 simulator only stores a fixed amount of information on the task -stack. FreeRTOS includes optional stack overflow detection, see: -http://www.freertos.org/Stacks-and-stack-overflow-checking.html */ -#define ipconfigIP_TASK_STACK_SIZE_WORDS ( configMINIMAL_STACK_SIZE * 5 ) - -/* ipconfigRAND32() is called by the IP stack to generate random numbers for -things such as a DHCP transaction number or initial sequence number. Random -number generation is performed via this macro to allow applications to use their -own random number generation method. For example, it might be possible to -generate a random number by sampling noise on an analogue input. */ -extern UBaseType_t uxRand(); -#define ipconfigRAND32() uxRand() - -/* If ipconfigUSE_NETWORK_EVENT_HOOK is set to 1 then FreeRTOS+TCP will call the -network event hook at the appropriate times. If ipconfigUSE_NETWORK_EVENT_HOOK -is not set to 1 then the network event hook will never be called. See -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/API/vApplicationIPNetworkEventHook.shtml -*/ -#define ipconfigUSE_NETWORK_EVENT_HOOK 1 - -/* Sockets have a send block time attribute. If FreeRTOS_sendto() is called but -a network buffer cannot be obtained then the calling task is held in the Blocked -state (so other tasks can continue to executed) until either a network buffer -becomes available or the send block time expires. If the send block time expires -then the send operation is aborted. The maximum allowable send block time is -capped to the value set by ipconfigMAX_SEND_BLOCK_TIME_TICKS. Capping the -maximum allowable send block time prevents prevents a deadlock occurring when -all the network buffers are in use and the tasks that process (and subsequently -free) the network buffers are themselves blocked waiting for a network buffer. -ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in -milliseconds can be converted to a time in ticks by dividing the time in -milliseconds by portTICK_PERIOD_MS. */ -#define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( 5000 / portTICK_PERIOD_MS ) - -/* If ipconfigUSE_DHCP is 1 then FreeRTOS+TCP will attempt to retrieve an IP -address, netmask, DNS server address and gateway address from a DHCP server. If -ipconfigUSE_DHCP is 0 then FreeRTOS+TCP will use a static IP address. The -stack will revert to using the static IP address even when ipconfigUSE_DHCP is -set to 1 if a valid configuration cannot be obtained from a DHCP server for any -reason. The static configuration used is that passed into the stack by the -FreeRTOS_IPInit() function call. */ -#define ipconfigUSE_DHCP 0 - -/* When ipconfigUSE_DHCP is set to 1, DHCP requests will be sent out at -increasing time intervals until either a reply is received from a DHCP server -and accepted, or the interval between transmissions reaches -ipconfigMAXIMUM_DISCOVER_TX_PERIOD. The IP stack will revert to using the -static IP address passed as a parameter to FreeRTOS_IPInit() if the -re-transmission time interval reaches ipconfigMAXIMUM_DISCOVER_TX_PERIOD without -a DHCP reply being received. */ -#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 120000 / portTICK_PERIOD_MS ) - -/* The ARP cache is a table that maps IP addresses to MAC addresses. The IP -stack can only send a UDP message to a remove IP address if it knowns the MAC -address associated with the IP address, or the MAC address of the router used to -contact the remote IP address. When a UDP message is received from a remote IP -address the MAC address and IP address are added to the ARP cache. When a UDP -message is sent to a remote IP address that does not already appear in the ARP -cache then the UDP message is replaced by a ARP message that solicits the -required MAC address information. ipconfigARP_CACHE_ENTRIES defines the maximum -number of entries that can exist in the ARP table at any one time. */ -#define ipconfigARP_CACHE_ENTRIES 6 - -/* ARP requests that do not result in an ARP response will be re-transmitted a -maximum of ipconfigMAX_ARP_RETRANSMISSIONS times before the ARP request is -aborted. */ -#define ipconfigMAX_ARP_RETRANSMISSIONS ( 5 ) - -/* ipconfigMAX_ARP_AGE defines the maximum time between an entry in the ARP -table being created or refreshed and the entry being removed because it is stale. -New ARP requests are sent for ARP cache entries that are nearing their maximum -age. ipconfigMAX_ARP_AGE is specified in tens of seconds, so a value of 150 is -equal to 1500 seconds (or 25 minutes). */ -#define ipconfigMAX_ARP_AGE 150 - -/* Implementing FreeRTOS_inet_addr() necessitates the use of string handling -routines, which are relatively large. To save code space the full -FreeRTOS_inet_addr() implementation is made optional, and a smaller and faster -alternative called FreeRTOS_inet_addr_quick() is provided. FreeRTOS_inet_addr() -takes an IP in decimal dot format (for example, "192.168.0.1") as its parameter. -FreeRTOS_inet_addr_quick() takes an IP address as four separate numerical octets -(for example, 192, 168, 0, 1) as its parameters. If -ipconfigINCLUDE_FULL_INET_ADDR is set to 1 then both FreeRTOS_inet_addr() and -FreeRTOS_indet_addr_quick() are available. If ipconfigINCLUDE_FULL_INET_ADDR is -not set to 1 then only FreeRTOS_indet_addr_quick() is available. */ -#define ipconfigINCLUDE_FULL_INET_ADDR 1 - -/* ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS defines the total number of network buffer that -are available to the IP stack. The total number of network buffers is limited -to ensure the total amount of RAM that can be consumed by the IP stack is capped -to a pre-determinable value. */ -#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 60 - -/* A FreeRTOS queue is used to send events from application tasks to the IP -stack. ipconfigEVENT_QUEUE_LENGTH sets the maximum number of events that can -be queued for processing at any one time. The event queue must be a minimum of -5 greater than the total number of network buffers. */ -#define ipconfigEVENT_QUEUE_LENGTH ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 ) - -/* The address of a socket is the combination of its IP address and its port -number. FreeRTOS_bind() is used to manually allocate a port number to a socket -(to 'bind' the socket to a port), but manual binding is not normally necessary -for client sockets (those sockets that initiate outgoing connections rather than -wait for incoming connections on a known port number). If -ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 1 then calling -FreeRTOS_sendto() on a socket that has not yet been bound will result in the IP -stack automatically binding the socket to a port number from the range -socketAUTO_PORT_ALLOCATION_START_NUMBER to 0xffff. If -ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 0 then calling FreeRTOS_sendto() -on a socket that has not yet been bound will result in the send operation being -aborted. */ -#define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1 - -/* Defines the Time To Live (TTL) values used in outgoing UDP packets. */ -#define ipconfigUDP_TIME_TO_LIVE 128 -#define ipconfigTCP_TIME_TO_LIVE 128 /* also defined in FreeRTOSIPConfigDefaults.h */ - -/* USE_TCP: Use TCP and all its features */ -#define ipconfigUSE_TCP ( 1 ) - -/* USE_WIN: Let TCP use windowing mechanism. */ -#define ipconfigUSE_TCP_WIN ( 1 ) - -/* The MTU is the maximum number of bytes the payload of a network frame can -contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a -lower value can save RAM, depending on the buffer management scheme used. If -ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must -be divisible by 8. */ -#define ipconfigNETWORK_MTU 1200 - -/* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used -through the FreeRTOS_gethostbyname() API function. */ -#define ipconfigUSE_DNS 1 - -/* If ipconfigREPLY_TO_INCOMING_PINGS is set to 1 then the IP stack will -generate replies to incoming ICMP echo (ping) requests. */ -#define ipconfigREPLY_TO_INCOMING_PINGS 1 - -/* If ipconfigSUPPORT_OUTGOING_PINGS is set to 1 then the -FreeRTOS_SendPingRequest() API function is available. */ -#define ipconfigSUPPORT_OUTGOING_PINGS 0 - -/* If ipconfigSUPPORT_SELECT_FUNCTION is set to 1 then the FreeRTOS_select() -(and associated) API function is available. */ -#define ipconfigSUPPORT_SELECT_FUNCTION 1 - -/* If ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES is set to 1 then Ethernet frames -that are not in Ethernet II format will be dropped. This option is included for -potential future IP stack developments. */ -#define ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES 1 - -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1 then it is the -responsibility of the Ethernet interface to filter out packets that are of no -interest. If the Ethernet interface does not implement this functionality, then -set ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES to 0 to have the IP stack -perform the filtering instead (it is much less efficient for the stack to do it -because the packet will already have been passed into the stack). If the -Ethernet driver does all the necessary filtering in hardware then software -filtering can be removed by using a value other than 1 or 0. */ -#define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1 - -/* The windows simulator cannot really simulate MAC interrupts, and needs to -block occasionally to allow other tasks to run. */ -#define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 20 / portTICK_PERIOD_MS ) - -/* Advanced only: in order to access 32-bit fields in the IP packets with -32-bit memory instructions, all packets will be stored 32-bit-aligned, plus 16-bits. -This has to do with the contents of the IP-packets: all 32-bit fields are -32-bit-aligned, plus 16-bit(!) */ -#define ipconfigPACKET_FILLER_SIZE 2 - -/* Define the size of the pool of TCP window descriptors. On the average, each -TCP socket will use up to 2 x 6 descriptors, meaning that it can have 2 x 6 -outstanding packets (for Rx and Tx). When using up to 10 TP sockets -simultaneously, one could define TCP_WIN_SEG_COUNT as 120. */ -#define ipconfigTCP_WIN_SEG_COUNT 240 - -/* Each TCP socket has a circular buffers for Rx and Tx, which have a fixed -maximum size. Define the size of Rx buffer for TCP sockets. */ -#define ipconfigTCP_RX_BUFFER_LENGTH ( 1000 ) - -/* Define the size of Tx buffer for TCP sockets. */ -#define ipconfigTCP_TX_BUFFER_LENGTH ( 1000 ) - -/* When using call-back handlers, the driver may check if the handler points to -real program memory (RAM or flash) or just has a random non-zero value. */ -#define ipconfigIS_VALID_PROG_ADDRESS(x) ( (x) != NULL ) - -/* Include support for TCP hang protection. All sockets in a connecting or -disconnecting stage will timeout after a period of non-activity. */ -#define ipconfigTCP_HANG_PROTECTION ( 1 ) -#define ipconfigTCP_HANG_PROTECTION_TIME ( 30 ) - -/* Include support for TCP keep-alive messages. */ -#define ipconfigTCP_KEEP_ALIVE ( 1 ) -#define ipconfigTCP_KEEP_ALIVE_INTERVAL ( 20 ) /* in seconds */ - -#define portINLINE __inline - -#endif /* FREERTOS_IP_CONFIG_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/READ_ME_INSTRUCTIONS.url b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/READ_ME_INSTRUCTIONS.url deleted file mode 100644 index 8a5a8617e..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/READ_ME_INSTRUCTIONS.url +++ /dev/null @@ -1,5 +0,0 @@ -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,11 -[InternetShortcut] -IDList= -URL=https://www.freertos.org/mqtt/ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj deleted file mode 100644 index b92278318..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj +++ /dev/null @@ -1,224 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {C686325E-3261-42F7-AEB1-DDE5280E1CEB} - RTOSDemo - 10.0 - - - - Application - false - MultiByte - v142 - - - Application - false - MultiByte - v142 - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\Debug\ - .\Debug\ - true - .\Release\ - .\Release\ - false - AllRules.ruleset - - - - .\Debug/WIN32.tlb - - - - - Disabled - ..\..\..\Source\FreeRTOS-Plus-TCP\include;..\..\..\Source\FreeRTOS-Plus-TCP\portable\BufferManagement;..\..\..\Source\FreeRTOS-Plus-TCP\portable\Compiler\MSVC;.\DemoTasks\include;.\WinPCap;..\..\..\..\FreeRTOS\Source\include;..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW;..\..\..\Source\FreeRTOS-IoT-Libraries\c_sdk\standard\common\include\private;..\..\..\Source\FreeRTOS-IoT-Libraries\c_sdk\standard\common\include;..\..\..\Source\FreeRTOS-IoT-Libraries\abstractions\platform\include;..\..\..\Source\FreeRTOS-IoT-Libraries\abstractions\platform\freertos\include;..\..\..\Source\FreeRTOS-IoT-Libraries\c_sdk\standard\mqtt\include;.;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDLL - .\Debug/WIN32.pch - .\Debug/ - .\Debug/ - .\Debug/ - Level4 - true - false - EditAndContinue - /wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 /wd4200 %(AdditionalOptions) - true - NotUsing - false - CompileAsC - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c09 - - - .\Debug/RTOSDemo.exe - true - true - .\Debug/WIN32.pdb - Console - MachineX86 - wpcap.lib;%(AdditionalDependencies) - .\WinPCap - false - false - - - true - .\Debug/WIN32.bsc - - - - - .\Release/WIN32.tlb - - - - - MaxSpeed - OnlyExplicitInline - _WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - MultiThreaded - true - .\Release/WIN32.pch - .\Release/ - .\Release/ - .\Release/ - Level3 - true - ..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\..\Source\include;..\..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c09 - - - .\Release/RTOSDemo.exe - true - .\Release/WIN32.pdb - Console - MachineX86 - ..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap - wpcap.lib;%(AdditionalDependencies) - - - true - .\Release/WIN32.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj.filters b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj.filters deleted file mode 100644 index 98cdff0ad..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WIN32.vcxproj.filters +++ /dev/null @@ -1,308 +0,0 @@ - - - - - {38712199-cebf-4124-bf15-398f7c3419ea} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {af3445a1-4908-4170-89ed-39345d90d30c} - - - {f32be356-4763-4cae-9020-974a2638cb08} - *.c - - - {88f409e6-d396-4ac5-94bd-7a99c914be46} - - - {e5ad4ec7-23dc-4295-8add-2acaee488f5a} - - - {d2dcd641-8d91-492b-852f-5563ffadaec6} - - - {8672fa26-b119-481f-8b8d-086419c01a3e} - - - {4570be11-ec96-4b55-ac58-24b50ada980a} - - - {5d93ed51-023a-41ad-9243-8d230165d34b} - - - {b71e974a-9f28-4815-972b-d930ba8a34d0} - - - {60717407-397f-4ea5-8492-3314acdd25f0} - - - {8a90222f-d723-4b4e-8e6e-c57afaf7fa92} - - - {7c995f05-2a10-4771-ad77-18a755876e46} - - - {e07288b6-a8e7-416a-947d-7f0260673dcc} - - - {9a636cc3-ebc6-48c5-8c18-c72494686e81} - - - {fe53a296-12ec-4819-bf2b-fd9dca2c6e96} - - - {29376c48-bc8b-4624-ad59-16807874c9f2} - - - {91ef4008-de51-4b41-ba5e-bf24d8cda378} - - - {ade43c6c-04c5-4897-abdb-91af2df04e5d} - - - {08a4e35c-19ca-4b1e-af24-bac368c2bf7b} - - - {1fc5fc25-c18b-45a2-bad3-0c07795db1e9} - - - {f3a69e5b-1462-4e19-8651-274e86c252b0} - - - {9a849d9e-91e5-4035-ab4c-70a986c6aed1} - - - {1e324500-91b4-4c76-b699-59ba75691760} - - - {bdcbc1ec-99b8-4c72-9075-49035c115488} - - - {2d17d5e6-ed70-4e42-9693-f7a63baf4948} - - - {7158b0be-01e7-42d1-8d3f-c75118a596a2} - - - {6ad56e6d-c330-4830-8f4b-c75b05dfa866} - - - {1d80b387-5a86-4744-a4cc-930033a52e4b} - - - {1943ad1a-a367-4ef5-ab65-1313801e6327} - - - - - FreeRTOS\Source\Portable - - - FreeRTOS\Source - - - FreeRTOS\Source - - - FreeRTOS\Source - - - FreeRTOS\Source - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP\portable - - - FreeRTOS+\FreeRTOS+TCP\portable - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS\Source - - - FreeRTOS\Source\Portable - - - - FreeRTOS+\FreeRTOS+TCP - - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\task_pool - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\logging - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\freertos - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\freertos - - - DemoTasks - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\freertos - - - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\types - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\include\types - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\include - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\include\types - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\freertos\include\platform - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\include\platform - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\include\platform - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\include\platform - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\include\platform - - - \ No newline at end of file diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Packet32.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Packet32.h deleted file mode 100644 index 1e0eacd77..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Packet32.h +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** @ingroup packetapi - * @{ - */ - -/** @defgroup packet32h Packet.dll definitions and data structures - * Packet32.h contains the data structures and the definitions used by packet.dll. - * The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included - * by the applications that use the functions of this library - * @{ - */ - -#ifndef __PACKET32 -#define __PACKET32 - -#include - -#ifdef HAVE_AIRPCAP_API -#include -#else -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */ -#endif /* HAVE_AIRPCAP_API */ - -#ifdef HAVE_DAG_API -#include -#endif /* HAVE_DAG_API */ - -// Working modes -#define PACKET_MODE_CAPT 0x0 ///< Capture mode -#define PACKET_MODE_STAT 0x1 ///< Statistical mode -#define PACKET_MODE_MON 0x2 ///< Monitoring mode -#define PACKET_MODE_DUMP 0x10 ///< Dump mode -#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode - - -/// Alignment macro. Defines the alignment size. -#define Packet_ALIGNMENT sizeof(int) -/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. -#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1)) - -#define NdisMediumNull -1 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumCHDLC -2 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPPPSerial -3 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumBare80211 -4 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumRadio80211 -5 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPpi -6 ///< Custom linktype: NDIS doesn't provide an equivalent - -// Loopback behaviour definitions -#define NPF_DISABLE_LOOPBACK 1 ///< Drop the packets sent by the NPF driver -#define NPF_ENABLE_LOOPBACK 2 ///< Capture the packets sent by the NPF driver - -/*! - \brief Network type structure. - - This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed. -*/ -typedef struct NetType -{ - UINT LinkType; ///< The MAC of the current network adapter (see function PacketGetNetType() for more information) - ULONGLONG LinkSpeed; ///< The speed of the network in bits per second -}NetType; - - -//some definitions stolen from libpcap - -#ifndef BPF_MAJOR_VERSION - -/*! - \brief A BPF pseudo-assembly program. - - The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. -*/ -struct bpf_program -{ - UINT bf_len; ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow. - struct bpf_insn *bf_insns; ///< A pointer to the first instruction of the program. -}; - -/*! - \brief A single BPF pseudo-instruction. - - bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver. -*/ -struct bpf_insn -{ - USHORT code; ///< Instruction type and addressing mode. - UCHAR jt; ///< Jump if true - UCHAR jf; ///< Jump if false - int k; ///< Generic field used for various purposes. -}; - -/*! - \brief Structure that contains a couple of statistics values on the current capture. - - It is used by packet.dll to return statistics about a capture session. -*/ -struct bpf_stat -{ - UINT bs_recv; ///< Number of packets that the driver received from the network adapter - ///< from the beginning of the current capture. This value includes the packets - ///< lost by the driver. - UINT bs_drop; ///< number of packets that the driver lost from the beginning of a capture. - ///< Basically, a packet is lost when the the buffer of the driver is full. - ///< In this situation the packet cannot be stored and the driver rejects it. - UINT ps_ifdrop; ///< drops by interface. XXX not yet supported - UINT bs_capt; ///< number of packets that pass the filter, find place in the kernel buffer and - ///< thus reach the application. -}; - -/*! - \brief Packet header. - - This structure defines the header associated with every packet delivered to the application. -*/ -struct bpf_hdr -{ - struct timeval bh_tstamp; ///< The timestamp associated with the captured packet. - ///< It is stored in a TimeVal structure. - UINT bh_caplen; ///< Length of captured portion. The captured portion can be different - ///< from the original packet, because it is possible (with a proper filter) - ///< to instruct the driver to capture only a portion of the packets. - UINT bh_datalen; ///< Original length of packet - USHORT bh_hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, - ///< a padding could be added between the end of this structure and the packet - ///< data for performance reasons. This filed can be used to retrieve the actual data - ///< of the packet. -}; - -/*! - \brief Dump packet header. - - This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets(). - It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a - packet in a dump file. This makes straightforward sending WinPcap dump files to the network. -*/ -struct dump_bpf_hdr{ - struct timeval ts; ///< Time stamp of the packet - UINT caplen; ///< Length of captured portion. The captured portion can smaller than the - ///< the original packet, because it is possible (with a proper filter) to - ///< instruct the driver to capture only a portion of the packets. - UINT len; ///< Length of the original packet (off wire). -}; - - -#endif - -struct bpf_stat; - -#define DOSNAMEPREFIX TEXT("Packet_") ///< Prefix added to the adapters device names to create the WinPcap devices -#define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links -#define NMAX_PACKET 65535 - -/*! - \brief Addresses of a network adapter. - - This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with - an adapter. -*/ -typedef struct npf_if_addr { - struct sockaddr_storage IPAddress; ///< IP address. - struct sockaddr_storage SubnetMask; ///< Netmask for that address. - struct sockaddr_storage Broadcast; ///< Broadcast address. -}npf_if_addr; - - -#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API. -#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API. -#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. -#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. - - -typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API -typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API - -#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter -#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET -#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card -#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file -#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones. -#define INFO_FLAG_AIRPCAP_CARD 16 ///< Flag for ADAPTER_INFO: this is an airpcap card -#define INFO_FLAG_NPFIM_DEVICE 32 - -/*! - \brief Describes an opened network adapter. - - This structure is the most important for the functioning of packet.dll, but the great part of its fields - should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters -*/ -typedef struct _ADAPTER { - HANDLE hFile; ///< \internal Handle to an open instance of the NPF driver. - CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened. - int NumWrites; ///< \internal Number of times a packets written on this adapter will be repeated - ///< on the wire. - HANDLE ReadEvent; ///< A notification event associated with the read calls on the adapter. - ///< It can be passed to standard Win32 functions (like WaitForSingleObject - ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some - ///< data. It is particularly useful in GUI applications that need to wait - ///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy() - ///< function can be used to define the minimum amount of data in the kernel buffer - ///< that will cause the event to be signalled. - - UINT ReadTimeOut; ///< \internal The amount of time after which a read on the driver will be released and - ///< ReadEvent will be signaled, also if no packets were captured - CHAR Name[ADAPTER_NAME_LENGTH]; - PWAN_ADAPTER pWanAdapter; - UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. - -#ifdef HAVE_AIRPCAP_API - PAirpcapHandle AirpcapAd; -#endif // HAVE_AIRPCAP_API - -#ifdef HAVE_NPFIM_API - void* NpfImHandle; -#endif // HAVE_NPFIM_API - -#ifdef HAVE_DAG_API - dagc_t *pDagCard; ///< Pointer to the dagc API adapter descriptor for this adapter - PCHAR DagBuffer; ///< Pointer to the buffer with the packets that is received from the DAG card - struct timeval DagReadTimeout; ///< Read timeout. The dagc API requires a timeval structure - unsigned DagFcsLen; ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry - DWORD DagFastProcess; ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps). -#endif // HAVE_DAG_API -} ADAPTER, *LPADAPTER; - -/*! - \brief Structure that contains a group of packets coming from the driver. - - This structure defines the header associated with every packet delivered to the application. -*/ -typedef struct _PACKET { - HANDLE hEvent; ///< \deprecated Still present for compatibility with old applications. - OVERLAPPED OverLapped; ///< \deprecated Still present for compatibility with old applications. - PVOID Buffer; ///< Buffer with containing the packets. See the PacketReceivePacket() for - ///< details about the organization of the data in this buffer - UINT Length; ///< Length of the buffer - DWORD ulBytesReceived; ///< Number of valid bytes present in the buffer, i.e. amount of data - ///< received by the last call to PacketReceivePacket() - BOOLEAN bIoComplete; ///< \deprecated Still present for compatibility with old applications. -} PACKET, *LPPACKET; - -/*! - \brief Structure containing an OID request. - - It is used by the PacketRequest() function to send an OID to the interface card driver. - It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, - the list of the multicast groups defined on it, and so on. -*/ -struct _PACKET_OID_DATA { - ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h - ///< for a complete list of valid codes. - ULONG Length; ///< Length of the data field - UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received - ///< from the adapter. -}; -typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @} - */ - -/* -BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName, - CHAR *Value, - UINT *pValueLen, - CHAR *DefaultVal); - -BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName, - WCHAR *Value, - UINT *pValueLen, - WCHAR *DefaultVal); -*/ - -//--------------------------------------------------------------------------- -// EXPORTED FUNCTIONS -//--------------------------------------------------------------------------- - -PCHAR PacketGetVersion(); -PCHAR PacketGetDriverVersion(); -BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes); -BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites); -BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode); -BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout); -BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp); -BOOLEAN PacketSetLoopbackBehavior(LPADAPTER AdapterObject, UINT LoopbackBehavior); -INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen); -BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim); -BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type); -LPADAPTER PacketOpenAdapter(PCHAR AdapterName); -BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync); -INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync); -LPPACKET PacketAllocatePacket(void); -VOID PacketInitPacket(LPPACKET lpPacket,PVOID Buffer,UINT Length); -VOID PacketFreePacket(LPPACKET lpPacket); -BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync); -BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter); -BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize); -BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries); -BOOLEAN PacketRequest(LPADAPTER AdapterObject,BOOLEAN Set,PPACKET_OID_DATA OidData); -HANDLE PacketGetReadEvent(LPADAPTER AdapterObject); -BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len); -BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks); -BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync); -BOOL PacketStopDriver(); -VOID PacketCloseAdapter(LPADAPTER lpAdapter); -BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength); -BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags); -PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject); - -// -// Used by PacketStartOemEx -// -#define PACKET_START_OEM_NO_NETMON 0x00000001 - -#ifdef __cplusplus -} -#endif - -#endif //__PACKET32 diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/PacketData.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/PacketData.h deleted file mode 100644 index 8124db66d..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/PacketData.h +++ /dev/null @@ -1,267 +0,0 @@ -char pkt1[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x30, 0x09, 0x9c, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x07, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x35, 0x00, 0x00, 0x00, 0x00, 0x70, 0x02, -0x40, 0x00, 0xdf, 0xab, 0x00, 0x00, 0x02, 0x04, -0x05, 0xb4, 0x01, 0x01, 0x04, 0x02 }; - -char pkt2[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa6, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt3[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0x9e, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x0d, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x36, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt4[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x02, 0x27, 0x09, 0x9f, 0x40, 0x00, 0x80, 0x06, -0x6d, 0x0d, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x36, 0x00, 0x00, 0x06, 0x69, 0x50, 0x18, -0x42, 0xd8, 0x84, 0x3e, 0x00, 0x00, 0x47, 0x45, -0x54, 0x20, 0x2f, 0x20, 0x48, 0x54, 0x54, 0x50, -0x2f, 0x31, 0x2e, 0x31, 0x0d, 0x0a, 0x41, 0x63, -0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0x2c, -0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, -0x2d, 0x78, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70, -0x2c, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, -0x6a, 0x70, 0x65, 0x67, 0x2c, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x70, 0x6a, 0x70, 0x65, -0x67, 0x2c, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, -0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, -0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x65, 0x78, -0x63, 0x65, 0x6c, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x6d, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2c, -0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, -0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x6f, 0x77, 0x65, -0x72, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x20, -0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, -0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, -0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x70, -0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, -0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x78, -0x62, 0x61, 0x70, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, -0x78, 0x70, 0x73, 0x64, 0x6f, 0x63, 0x75, 0x6d, -0x65, 0x6e, 0x74, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x78, 0x61, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, -0x6c, 0x2c, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x4c, -0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, -0x20, 0x65, 0x6e, 0x2d, 0x67, 0x62, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x45, -0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3a, -0x20, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x20, 0x64, -0x65, 0x66, 0x6c, 0x61, 0x74, 0x65, 0x0d, 0x0a, -0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, -0x6e, 0x74, 0x3a, 0x20, 0x4d, 0x6f, 0x7a, 0x69, -0x6c, 0x6c, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x20, -0x28, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, -0x62, 0x6c, 0x65, 0x3b, 0x20, 0x4d, 0x53, 0x49, -0x45, 0x20, 0x36, 0x2e, 0x30, 0x3b, 0x20, 0x57, -0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x4e, -0x54, 0x20, 0x35, 0x2e, 0x31, 0x3b, 0x20, 0x53, -0x56, 0x31, 0x3b, 0x20, 0x47, 0x6f, 0x6f, 0x67, -0x6c, 0x65, 0x54, 0x35, 0x3b, 0x20, 0x2e, 0x4e, -0x45, 0x54, 0x20, 0x43, 0x4c, 0x52, 0x20, 0x32, -0x2e, 0x30, 0x2e, 0x35, 0x30, 0x37, 0x32, 0x37, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x30, 0x2e, 0x30, -0x34, 0x35, 0x30, 0x36, 0x2e, 0x36, 0x34, 0x38, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x35, 0x2e, 0x32, -0x31, 0x30, 0x32, 0x32, 0x29, 0x0d, 0x0a, 0x48, -0x6f, 0x73, 0x74, 0x3a, 0x20, 0x31, 0x39, 0x32, -0x2e, 0x31, 0x36, 0x38, 0x2e, 0x30, 0x2e, 0x31, -0x32, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, -0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4b, -0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, -0x65, 0x0d, 0x0a, 0x0d, 0x0a }; - -char pkt5[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x02, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa5, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt6[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa1, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x0a, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt7[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x02, 0x27, 0x09, 0xa2, 0x40, 0x00, 0x80, 0x06, -0x6d, 0x0a, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x36, 0x00, 0x00, 0x06, 0x69, 0x50, 0x18, -0x42, 0xd8, 0x84, 0x3e, 0x00, 0x00, 0x47, 0x45, -0x54, 0x20, 0x2f, 0x20, 0x48, 0x54, 0x54, 0x50, -0x2f, 0x31, 0x2e, 0x31, 0x0d, 0x0a, 0x41, 0x63, -0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0x2c, -0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, -0x2d, 0x78, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70, -0x2c, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, -0x6a, 0x70, 0x65, 0x67, 0x2c, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x70, 0x6a, 0x70, 0x65, -0x67, 0x2c, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, -0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, -0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x65, 0x78, -0x63, 0x65, 0x6c, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x6d, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2c, -0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, -0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x6f, 0x77, 0x65, -0x72, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x20, -0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, -0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, -0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x70, -0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, -0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x78, -0x62, 0x61, 0x70, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, -0x78, 0x70, 0x73, 0x64, 0x6f, 0x63, 0x75, 0x6d, -0x65, 0x6e, 0x74, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x78, 0x61, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, -0x6c, 0x2c, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x4c, -0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, -0x20, 0x65, 0x6e, 0x2d, 0x67, 0x62, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x45, -0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3a, -0x20, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x20, 0x64, -0x65, 0x66, 0x6c, 0x61, 0x74, 0x65, 0x0d, 0x0a, -0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, -0x6e, 0x74, 0x3a, 0x20, 0x4d, 0x6f, 0x7a, 0x69, -0x6c, 0x6c, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x20, -0x28, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, -0x62, 0x6c, 0x65, 0x3b, 0x20, 0x4d, 0x53, 0x49, -0x45, 0x20, 0x36, 0x2e, 0x30, 0x3b, 0x20, 0x57, -0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x4e, -0x54, 0x20, 0x35, 0x2e, 0x31, 0x3b, 0x20, 0x53, -0x56, 0x31, 0x3b, 0x20, 0x47, 0x6f, 0x6f, 0x67, -0x6c, 0x65, 0x54, 0x35, 0x3b, 0x20, 0x2e, 0x4e, -0x45, 0x54, 0x20, 0x43, 0x4c, 0x52, 0x20, 0x32, -0x2e, 0x30, 0x2e, 0x35, 0x30, 0x37, 0x32, 0x37, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x30, 0x2e, 0x30, -0x34, 0x35, 0x30, 0x36, 0x2e, 0x36, 0x34, 0x38, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x35, 0x2e, 0x32, -0x31, 0x30, 0x32, 0x32, 0x29, 0x0d, 0x0a, 0x48, -0x6f, 0x73, 0x74, 0x3a, 0x20, 0x31, 0x39, 0x32, -0x2e, 0x31, 0x36, 0x38, 0x2e, 0x30, 0x2e, 0x31, -0x32, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, -0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4b, -0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, -0x65, 0x0d, 0x0a, 0x0d, 0x0a }; - -char pkt8[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x03, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa4, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt9[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa3, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x08, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt10[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x04, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa3, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt11[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa6, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x05, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt12[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa7, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x04, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x14, -0x00, 0x00, 0x43, 0xf4, 0x00, 0x00 }; - - -typedef struct -{ - char *pcData; - int iDataLen; -} xPacketData; - -xPacketData xAllPackets[] = -{ - { pkt1, sizeof( pkt1 ) }, -// { pkt2, sizeof( pkt2 ) }, - { pkt3, sizeof( pkt3 ) }, - { pkt4, sizeof( pkt4 ) }, -// { pkt5, sizeof( pkt5 ) }, - { pkt6, sizeof( pkt6 ) }, - { pkt7, sizeof( pkt7 ) }, - { pkt8, sizeof( pkt8 ) }, - { pkt9, sizeof( pkt9 ) }, - { pkt10, sizeof( pkt10 ) }, -// { pkt11, sizeof( pkt11 ) }, -// { pkt12, sizeof( pkt12 ) }, -// { pkt13, sizeof( pkt13 ) }, -// { pkt14, sizeof( pkt14 ) }, -// { pkt15, sizeof( pkt15 ) }, -// { pkt16, sizeof( pkt16 ) }, -}; diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Win32-Extensions.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Win32-Extensions.h deleted file mode 100644 index be71c85e9..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/Win32-Extensions.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef __WIN32_EXTENSIONS_H__ -#define __WIN32_EXTENSIONS_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Definitions */ - -/*! - \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). -*/ -struct pcap_send_queue -{ - u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field. - u_int len; ///< Current size of the queue, in bytes. - char *buffer; ///< Buffer containing the packets to be sent. -}; - -typedef struct pcap_send_queue pcap_send_queue; - -/*! - \brief This typedef is a support for the pcap_get_airpcap_handle() function -*/ -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif - -#define BPF_MEM_EX_IMM 0xc0 -#define BPF_MEM_EX_IND 0xe0 - -/*used for ST*/ -#define BPF_MEM_EX 0xc0 -#define BPF_TME 0x08 - -#define BPF_LOOKUP 0x90 -#define BPF_EXECUTE 0xa0 -#define BPF_INIT 0xb0 -#define BPF_VALIDATE 0xc0 -#define BPF_SET_ACTIVE 0xd0 -#define BPF_RESET 0xe0 -#define BPF_SET_MEMORY 0x80 -#define BPF_GET_REGISTER_VALUE 0x70 -#define BPF_SET_REGISTER_VALUE 0x60 -#define BPF_SET_WORKING 0x50 -#define BPF_SET_ACTIVE_READ 0x40 -#define BPF_SET_AUTODELETION 0x30 -#define BPF_SEPARATION 0xff - -/* Prototypes */ -pcap_send_queue* pcap_sendqueue_alloc(u_int memsize); - -void pcap_sendqueue_destroy(pcap_send_queue* queue); - -int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data); - -u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync); - -HANDLE pcap_getevent(pcap_t *p); - -struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size); - -int pcap_setuserbuffer(pcap_t *p, int size); - -int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks); - -int pcap_live_dump_ended(pcap_t *p, int sync); - -int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int pcap_start_oem(char* err_str, int flags); - -PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p); - -#ifdef __cplusplus -} -#endif - -#endif //__WIN32_EXTENSIONS_H__ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/arch.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/arch.c deleted file mode 100644 index d704da800..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/arch.c +++ /dev/null @@ -1,336 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* WinPCap includes. */ -#include "pcap.h" -#include "remote-ext.h" - -/* uIP includes. */ -#include "net/uip.h" -#include "net/uip_arp.h" -#include "net/clock-arch.h" - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" - -/* - * Query the computer the simulation is being executed on to find the network - * interfaces it has installed. - */ -static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ); - -/* - * Open the network interface. The number of the interface to be opened is set - * by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. - */ -static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ); - -/* - * Configure the capture filter to allow blocking reads, and to filter out - * packets that are not of interest to this demo. - */ -static void prvConfigureCaptureBehaviour( void ); - -pcap_t *pxOpenedInterfaceHandle = NULL; -LARGE_INTEGER freq, sys_start_time; - -#define archNUM_BUFFERS 5 -#define archNUM_BUFFER_POINTERS ( archNUM_BUFFERS - 1 ) - -static void prvInterruptSimulator( void *pvParameters ); - -static unsigned char ucEthernetBuffer[ archNUM_BUFFERS ][ UIP_CONF_BUFFER_SIZE ]; -static unsigned char *pucEthernetBufferPointers[ archNUM_BUFFER_POINTERS ]; - -static long lLengthOfDataInBuffer[ archNUM_BUFFER_POINTERS ] = { 0 }; -static unsigned char ucNextBufferToFill = 0U, ucNextBufferToProcess = 0U; - -unsigned char *uip_buf = NULL; -char cErrorBuffer[PCAP_ERRBUF_SIZE]; - -void vNetifTx( void ) -{ - pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len ); - pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len ); -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxNetifRx( void ) -{ -UBaseType_t xDataLen; -unsigned char *pucTemp; - - /* Check there is really data available. */ - xDataLen = lLengthOfDataInBuffer[ ucNextBufferToProcess ]; - if( xDataLen != 0L ) - { - - /* The buffer pointed to by uip_buf is going to change. Remember which - buffer uip_buf is currently pointing to. */ - pucTemp = uip_buf; - - /* Point uip_buf at the next buffer that contains data. */ - uip_buf = pucEthernetBufferPointers[ ucNextBufferToProcess ]; - - /* The buffer pointed to by - pucEthernetBufferPointeres[ ucNextBufferToProcess ] is now in use by - uip_buf, but the buffer uip_buf was pointing to on entry to this - function is free. Set - pucEthernetBufferPointeres[ ucNextBufferToProcess ] to the free - buffer. */ - pucEthernetBufferPointers[ ucNextBufferToProcess ] = pucTemp; - lLengthOfDataInBuffer[ ucNextBufferToProcess ] = 0L; - - ucNextBufferToProcess++; - if( ucNextBufferToProcess >= archNUM_BUFFER_POINTERS ) - { - ucNextBufferToProcess = 0L; - } - } - - return xDataLen; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetifInit( void ) -{ -BaseType_t x; -pcap_if_t *pxAllNetworkInterfaces; - - /* Allocate a free buffer to each buffer pointer. */ - for( x = 0; x < sizeof( pucEthernetBufferPointers ) / sizeof( unsigned char * ); x++ ) - { - pucEthernetBufferPointers[ x ] = &( ucEthernetBuffer[ x ][ 0 ] ); - } - - /* Start with uip_buf pointing to a buffer that is not referenced from the - pucEthernetBufferPointers[] array. */ - uip_buf = &( ucEthernetBuffer[ archNUM_BUFFERS - 1 ][ 0 ] ); - - /* Query the computer the simulation is being executed on to find the - network interfaces it has installed. */ - pxAllNetworkInterfaces = prvPrintAvailableNetworkInterfaces(); - - /* Open the network interface. The number of the interface to be opened is - set by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. - Calling this function will set the pxOpenedInterfaceHandle variable. If, - after calling this function, pxOpenedInterfaceHandle is equal to NULL, then - the interface could not be opened. */ - if( pxAllNetworkInterfaces != NULL ) - { - prvOpenSelectedNetworkInterface( pxAllNetworkInterfaces ); - } - - - return x; -} -/*-----------------------------------------------------------*/ - -static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ) -{ -pcap_if_t * pxAllNetworkInterfaces = NULL, *xInterface; -long lInterfaceNumber = 1; - - if( pcap_findalldevs_ex( PCAP_SRC_IF_STRING, NULL, &pxAllNetworkInterfaces, cErrorBuffer ) == -1 ) - { - printf( "\r\nCould not obtain a list of network interfaces\r\n%s\r\n", cErrorBuffer ); - pxAllNetworkInterfaces = NULL; - } - - if( pxAllNetworkInterfaces != NULL ) - { - /* Print out the list of network interfaces. The first in the list - is interface '1', not interface '0'. */ - for( xInterface = pxAllNetworkInterfaces; xInterface != NULL; xInterface = xInterface->next ) - { - printf( "%d. %s", lInterfaceNumber, xInterface->name ); - - if( xInterface->description != NULL ) - { - printf( " (%s)\r\n", xInterface->description ); - } - else - { - printf( " (No description available)\r\n") ; - } - - lInterfaceNumber++; - } - } - - if( lInterfaceNumber == 1 ) - { - /* The interface number was never incremented, so the above for() loop - did not execute meaning no interfaces were found. */ - printf( " \r\nNo network interfaces were found.\r\n" ); - pxAllNetworkInterfaces = NULL; - } - - printf( "\r\nThe interface that will be opened is set by configNETWORK_INTERFACE_TO_USE which should be defined in FreeRTOSConfig.h\r\n" ); - printf( "Attempting to open interface number %d.\r\n", configNETWORK_INTERFACE_TO_USE ); - - if( ( configNETWORK_INTERFACE_TO_USE < 1L ) || ( configNETWORK_INTERFACE_TO_USE > lInterfaceNumber ) ) - { - printf("\r\nconfigNETWORK_INTERFACE_TO_USE is not in the valid range.\r\n" ); - - if( pxAllNetworkInterfaces != NULL ) - { - /* Free the device list, as no devices are going to be opened. */ - pcap_freealldevs( pxAllNetworkInterfaces ); - pxAllNetworkInterfaces = NULL; - } - } - - return pxAllNetworkInterfaces; -} -/*-----------------------------------------------------------*/ - -static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ) -{ -pcap_if_t *xInterface; -long x; - - /* Walk the list of devices until the selected device is located. */ - xInterface = pxAllNetworkInterfaces; - for( x = 0L; x < ( configNETWORK_INTERFACE_TO_USE - 1L ); x++ ) - { - xInterface = xInterface->next; - } - - /* Open the selected interface. */ - pxOpenedInterfaceHandle = pcap_open( xInterface->name, /* The name of the selected interface. */ - UIP_CONF_BUFFER_SIZE, /* The size of the packet to capture. */ - PCAP_OPENFLAG_PROMISCUOUS, /* Open in promiscious mode as the MAC and - IP address is going to be "simulated", and - not be the real MAC and IP address. This allows - trafic to the simulated IP address to be routed - to uIP, and trafic to the real IP address to be - routed to the Windows TCP/IP stack. */ - 0xfffffffL, /* The read time out. This is going to block - until data is available. */ - NULL, /* No authentication is required as this is - not a remote capture session. */ - cErrorBuffer - ); - - if ( pxOpenedInterfaceHandle == NULL ) - { - printf( "\r\n%s is not supported by WinPcap and cannot be opened\r\n", xInterface->name ); - } - else - { - /* Configure the capture filter to allow blocking reads, and to filter - out packets that are not of interest to this demo. */ - prvConfigureCaptureBehaviour(); - } - - /* The device list is no longer required. */ - pcap_freealldevs( pxAllNetworkInterfaces ); -} -/*-----------------------------------------------------------*/ - -static void prvConfigureCaptureBehaviour( void ) -{ -struct bpf_program xFilterCode; -const long lMinBytesToCopy = 10L, lBlocking = 0L; -unsigned long ulNetMask; - - /* Unblock a read as soon as anything is received. */ - pcap_setmintocopy( pxOpenedInterfaceHandle, lMinBytesToCopy ); - - /* Allow blocking. */ - pcap_setnonblock( pxOpenedInterfaceHandle, lBlocking, cErrorBuffer ); - - /* Set up a filter so only the packets of interest are passed to the uIP - stack. cErrorBuffer is used for convenience to create the string. Don't - confuse this with an error message. */ - sprintf( cErrorBuffer, "broadcast or multicast or host %d.%d.%d.%d", configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - - ulNetMask = ( configNET_MASK3 << 24UL ) | ( configNET_MASK2 << 16UL ) | ( configNET_MASK1 << 8L ) | configNET_MASK0; - - if( pcap_compile(pxOpenedInterfaceHandle, &xFilterCode, cErrorBuffer, 1, ulNetMask ) < 0 ) - { - printf("\r\nThe packet filter string is invalid\r\n" ); - } - else - { - if( pcap_setfilter( pxOpenedInterfaceHandle, &xFilterCode ) < 0 ) - { - printf( "\r\nAn error occurred setting the packet filter.\r\n" ); - } - } - - /* Create a task that simulates an interrupt in a real system. This will - block waiting for packets, then send a message to the uIP task when data - is available. */ - xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( configuIP_TASK_PRIORITY - 1 ), NULL ); -} -/*-----------------------------------------------------------*/ - -static void prvInterruptSimulator( void *pvParameters ) -{ -static struct pcap_pkthdr *pxHeader; -const unsigned char *pucPacketData; -extern QueueHandle_t xEMACEventQueue; -const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; -long lResult; - - /* Just to kill the compiler warning. */ - ( void ) pvParameters; - - for( ;; ) - { - /* Get the next packet. */ - lResult = pcap_next_ex( pxOpenedInterfaceHandle, &pxHeader, &pucPacketData ); - if( lResult ) - { - /* Is the next buffer into which data should be placed free? */ - if( lLengthOfDataInBuffer[ ucNextBufferToFill ] == 0L ) - { - /* Copy the data from the captured packet into the buffer. */ - memcpy( pucEthernetBufferPointers[ ucNextBufferToFill ], pucPacketData, pxHeader->len ); - - /* Note the amount of data that was copied. */ - lLengthOfDataInBuffer[ ucNextBufferToFill ] = pxHeader->len; - - /* Move onto the next buffer, wrapping around if necessary. */ - ucNextBufferToFill++; - if( ucNextBufferToFill >= archNUM_BUFFER_POINTERS ) - { - ucNextBufferToFill = 0U; - } - - /* Data was received and stored. Send a message to the uIP task - to let it know. */ - xQueueSendToBack( xEMACEventQueue, &ulRxEvent, portMAX_DELAY ); - } - } - } -} - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/bittypes.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/bittypes.h deleted file mode 100644 index f55fcecfd..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/bittypes.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 1999 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#ifndef _BITTYPES_H -#define _BITTYPES_H - -#ifndef HAVE_U_INT8_T - -#if SIZEOF_CHAR == 1 -typedef unsigned char u_int8_t; -typedef signed char _int8_t; -#elif SIZEOF_INT == 1 -typedef unsigned int u_int8_t; -typedef signed int int8_t; -#else /* XXX */ -#error "there's no appropriate type for u_int8_t" -#endif -#define HAVE_U_INT8_T 1 -#define HAVE_INT8_T 1 - -#endif /* HAVE_U_INT8_T */ - -#ifndef HAVE_U_INT16_T - -#if SIZEOF_SHORT == 2 -typedef unsigned short u_int16_t; -typedef signed short _int16_t; -#elif SIZEOF_INT == 2 -typedef unsigned int u_int16_t; -typedef signed int int16_t; -#elif SIZEOF_CHAR == 2 -typedef unsigned char u_int16_t; -typedef signed char int16_t; -#else /* XXX */ -#error "there's no appropriate type for u_int16_t" -#endif -#define HAVE_U_INT16_T 1 -#define HAVE_INT16_T 1 - -#endif /* HAVE_U_INT16_T */ - -#ifndef HAVE_U_INT32_T - -#if SIZEOF_INT == 4 -typedef unsigned int u_int32_t; -typedef signed int _int32_t; -#elif SIZEOF_LONG == 4 -typedef unsigned long u_int32_t; -typedef signed long int32_t; -#elif SIZEOF_SHORT == 4 -typedef unsigned short u_int32_t; -typedef signed short int32_t; -#else /* XXX */ -#error "there's no appropriate type for u_int32_t" -#endif -#define HAVE_U_INT32_T 1 -#define HAVE_INT32_T 1 - -#endif /* HAVE_U_INT32_T */ - -#ifndef HAVE_U_INT64_T -#if SIZEOF_LONG_LONG == 8 -typedef unsigned long long u_int64_t; -typedef long long int64_t; -#elif defined(_MSC_EXTENSIONS) -typedef unsigned _int64 u_int64_t; -typedef _int64 int64_t; -#elif SIZEOF_INT == 8 -typedef unsigned int u_int64_t; -#elif SIZEOF_LONG == 8 -typedef unsigned long u_int64_t; -#elif SIZEOF_SHORT == 8 -typedef unsigned short u_int64_t; -#else /* XXX */ -#error "there's no appropriate type for u_int64_t" -#endif - -#endif /* HAVE_U_INT64_T */ - -#ifndef PRId64 -#ifdef _MSC_EXTENSIONS -#define PRId64 "I64d" -#else /* _MSC_EXTENSIONS */ -#define PRId64 "lld" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRId64 */ - -#ifndef PRIo64 -#ifdef _MSC_EXTENSIONS -#define PRIo64 "I64o" -#else /* _MSC_EXTENSIONS */ -#define PRIo64 "llo" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIo64 */ - -#ifndef PRIx64 -#ifdef _MSC_EXTENSIONS -#define PRIx64 "I64x" -#else /* _MSC_EXTENSIONS */ -#define PRIx64 "llx" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIx64 */ - -#ifndef PRIu64 -#ifdef _MSC_EXTENSIONS -#define PRIu64 "I64u" -#else /* _MSC_EXTENSIONS */ -#define PRIu64 "llu" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIu64 */ - -#endif /* _BITTYPES_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/ip6_misc.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/ip6_misc.h deleted file mode 100644 index 562fa6184..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/ip6_misc.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 1993, 1994, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL) - */ - -/* - * This file contains a collage of declarations for IPv6 from FreeBSD not present in Windows - */ - -#include - -#include - -#ifndef __MINGW32__ -#define IN_MULTICAST(a) IN_CLASSD(a) -#endif - -#define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000) - -#define IN_LOOPBACKNET 127 - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) -/* IPv6 address */ -struct in6_addr - { - union - { - u_int8_t u6_addr8[16]; - u_int16_t u6_addr16[8]; - u_int32_t u6_addr32[4]; - } in6_u; -#define s6_addr in6_u.u6_addr8 -#define s6_addr16 in6_u.u6_addr16 -#define s6_addr32 in6_u.u6_addr32 -#define s6_addr64 in6_u.u6_addr64 - }; - -#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } -#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } -#endif /* __MINGW32__ */ - - -#if (defined _MSC_VER) || (defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)) -typedef unsigned short sa_family_t; -#endif - - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -/* Ditto, for IPv6. */ -struct sockaddr_in6 - { - __SOCKADDR_COMMON (sin6_); - u_int16_t sin6_port; /* Transport layer port # */ - u_int32_t sin6_flowinfo; /* IPv6 flow information */ - struct in6_addr sin6_addr; /* IPv6 address */ - }; - -#define IN6_IS_ADDR_V4MAPPED(a) \ - ((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \ - (((u_int32_t *) (a))[2] == htonl (0xffff))) - -#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff) - -#define IN6_IS_ADDR_LINKLOCAL(a) \ - ((((u_int32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000)) - -#define IN6_IS_ADDR_LOOPBACK(a) \ - (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \ - ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1)) -#endif /* __MINGW32__ */ - -#define ip6_vfc ip6_ctlun.ip6_un2_vfc -#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow -#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen -#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt -#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim -#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim - -#define nd_rd_type nd_rd_hdr.icmp6_type -#define nd_rd_code nd_rd_hdr.icmp6_code -#define nd_rd_cksum nd_rd_hdr.icmp6_cksum -#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] - -/* - * IPV6 extension headers - */ -#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ -#define IPPROTO_IPV6 41 /* IPv6 header. */ -#define IPPROTO_ROUTING 43 /* IPv6 routing header */ -#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ -#define IPPROTO_ESP 50 /* encapsulating security payload */ -#define IPPROTO_AH 51 /* authentication header */ -#define IPPROTO_ICMPV6 58 /* ICMPv6 */ -#define IPPROTO_NONE 59 /* IPv6 no next header */ -#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ -#define IPPROTO_PIM 103 /* Protocol Independent Multicast. */ - -#define IPV6_RTHDR_TYPE_0 0 - -/* Option types and related macros */ -#define IP6OPT_PAD1 0x00 /* 00 0 00000 */ -#define IP6OPT_PADN 0x01 /* 00 0 00001 */ -#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */ -#define IP6OPT_JUMBO_LEN 6 -#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */ - -#define IP6OPT_RTALERT_LEN 4 -#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */ -#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */ -#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ -#define IP6OPT_MINLEN 2 - -#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */ -#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */ -#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */ -#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */ -#define IP6OPT_EID 0x8a /* 10 0 01010 */ - -#define IP6OPT_TYPE(o) ((o) & 0xC0) -#define IP6OPT_TYPE_SKIP 0x00 -#define IP6OPT_TYPE_DISCARD 0x40 -#define IP6OPT_TYPE_FORCEICMP 0x80 -#define IP6OPT_TYPE_ICMP 0xC0 - -#define IP6OPT_MUTABLE 0x20 - - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) -#ifndef EAI_ADDRFAMILY -struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ - size_t ai_addrlen; /* length of ai_addr */ - char *ai_canonname; /* canonical name for hostname */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ -}; -#endif -#endif /* __MINGW32__ */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/netif.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/netif.h deleted file mode 100644 index 8fe539376..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/netif.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef NET_IF_H -#define NET_IF_H - -/* - * Send uip_len bytes from uip_buf to the network interface selected by the - * configNETWORK_INTERFACE_TO_USE constant (defined in FreeRTOSConfig.h). - */ -void vNetifTx( void ); - -/* - * Receive bytes from the network interface selected by the - * configNETWORK_INTERFACE_TO_USE constant (defined in FreeRTOSConfig.h). The - * bytes are placed in uip_buf. The number of bytes copied into uip_buf is - * returned. - */ -UBaseType_t uxNetifRx( void ); - -/* - * Prepare a packet capture session. This will print out all the network - * interfaces available, and the one actually used is set by the - * configNETWORK_INTERFACE_TO_USE constant that is defined in - * FreeRTOSConfig.h. */ -BaseType_t xNetifInit( void ); - -#endif /* NET_IF_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-bpf.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-bpf.h deleted file mode 100644 index 5fe129dbb..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-bpf.h +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.50 2007/04/01 21:43:55 guy Exp $ (LBL) - */ - -/* - * For backwards compatibility. - * - * Note to OS vendors: do NOT get rid of this file! Some applications - * might expect to be able to include . - */ -#include diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-namedb.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-namedb.h deleted file mode 100644 index 80a2f0040..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-namedb.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1994, 1996 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.13 2006/10/04 18:13:32 guy Exp $ (LBL) - */ - -/* - * For backwards compatibility. - * - * Note to OS vendors: do NOT get rid of this file! Some applications - * might expect to be able to include . - */ -#include diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-stdinc.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-stdinc.h deleted file mode 100644 index cbd62d169..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap-stdinc.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL) - */ - -#define SIZEOF_CHAR 1 -#define SIZEOF_SHORT 2 -#define SIZEOF_INT 4 -#ifndef _MSC_EXTENSIONS -#define SIZEOF_LONG_LONG 8 -#endif - -/* - * Avoids a compiler warning in case this was already defined - * (someone defined _WINSOCKAPI_ when including 'windows.h', in order - * to prevent it from including 'winsock.h') - */ -#ifdef _WINSOCKAPI_ -#undef _WINSOCKAPI_ -#endif -#include - -#include - -#include "bittypes.h" -#include -#include - -#ifndef __MINGW32__ -#include "IP6_misc.h" -#endif - -#define caddr_t char* - -#if _MSC_VER < 1500 -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#define strdup _strdup -#endif - -#define inline __inline - -#ifdef __MINGW32__ -#include -#else /*__MINGW32__*/ -/* MSVC compiler */ -#ifndef _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef _W64 unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif - -#ifndef _INTPTR_T_DEFINED -#ifdef _WIN64 -typedef __int64 intptr_t; -#else -typedef _W64 int intptr_t; -#endif -#define _INTPTR_T_DEFINED -#endif - -#endif /*__MINGW32__*/ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap.h deleted file mode 100644 index 935f9494c..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL) - */ - -/* - * For backwards compatibility. - * - * Note to OS vendors: do NOT get rid of this file! Many applications - * expect to be able to include , and at least some of them - * go through contortions in their configure scripts to try to detect - * OSes that have "helpfully" moved pcap.h to without - * leaving behind a file. - */ -#include diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bluetooth.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bluetooth.h deleted file mode 100644 index 7bf65df03..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bluetooth.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2006 Paolo Abeni (Italy) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * bluetooth data struct - * By Paolo Abeni - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $ - */ - -#ifndef _PCAP_BLUETOOTH_STRUCTS_H__ -#define _PCAP_BLUETOOTH_STRUCTS_H__ - -/* - * Header prepended libpcap to each bluetooth h:4 frame. - * fields are in network byte order - */ -typedef struct _pcap_bluetooth_h4_header { - u_int32_t direction; /* if first bit is set direction is incoming */ -} pcap_bluetooth_h4_header; - - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bpf.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bpf.h deleted file mode 100644 index 9f4ca33e3..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/bpf.h +++ /dev/null @@ -1,934 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)bpf.h 7.1 (Berkeley) 5/7/91 - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.8 2008-09-22 20:16:01 guy Exp $ (LBL) - */ - -/* - * This is libpcap's cut-down version of bpf.h; it includes only - * the stuff needed for the code generator and the userland BPF - * interpreter, and the libpcap APIs for setting filters, etc.. - * - * "pcap-bpf.c" will include the native OS version, as it deals with - * the OS's BPF implementation. - * - * XXX - should this all just be moved to "pcap.h"? - */ - -#ifndef BPF_MAJOR_VERSION - -#ifdef __cplusplus -extern "C" { -#endif - -/* BSD style release date */ -#define BPF_RELEASE 199606 - -#ifdef MSDOS /* must be 32-bit */ -typedef long bpf_int32; -typedef unsigned long bpf_u_int32; -#else -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -/* - * Alignment macros. BPF_WORDALIGN rounds up to the next - * even multiple of BPF_ALIGNMENT. - */ -#ifndef __NetBSD__ -#define BPF_ALIGNMENT sizeof(bpf_int32) -#else -#define BPF_ALIGNMENT sizeof(long) -#endif -#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) - -#define BPF_MAXBUFSIZE 0x8000 -#define BPF_MINBUFSIZE 32 - -/* - * Structure for "pcap_compile()", "pcap_setfilter()", etc.. - */ -struct bpf_program { - u_int bf_len; - struct bpf_insn *bf_insns; -}; - -/* - * Struct return by BIOCVERSION. This represents the version number of - * the filter language described by the instruction encodings below. - * bpf understands a program iff kernel_major == filter_major && - * kernel_minor >= filter_minor, that is, if the value returned by the - * running kernel has the same major number and a minor number equal - * equal to or less than the filter being downloaded. Otherwise, the - * results are undefined, meaning an error may be returned or packets - * may be accepted haphazardly. - * It has nothing to do with the source code version. - */ -struct bpf_version { - u_short bv_major; - u_short bv_minor; -}; -/* Current version number of filter architecture. */ -#define BPF_MAJOR_VERSION 1 -#define BPF_MINOR_VERSION 1 - -/* - * Data-link level type codes. - * - * Do *NOT* add new values to this list without asking - * "tcpdump-workers@lists.tcpdump.org" for a value. Otherwise, you run - * the risk of using a value that's already being used for some other - * purpose, and of having tools that read libpcap-format captures not - * being able to handle captures with your new DLT_ value, with no hope - * that they will ever be changed to do so (as that would destroy their - * ability to read captures using that value for that other purpose). - */ - -/* - * These are the types that are the same on all platforms, and that - * have been defined by for ages. - */ -#define DLT_NULL 0 /* BSD loopback encapsulation */ -#define DLT_EN10MB 1 /* Ethernet (10Mb) */ -#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ -#define DLT_AX25 3 /* Amateur Radio AX.25 */ -#define DLT_PRONET 4 /* Proteon ProNET Token Ring */ -#define DLT_CHAOS 5 /* Chaos */ -#define DLT_IEEE802 6 /* 802.5 Token Ring */ -#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ -#define DLT_SLIP 8 /* Serial Line IP */ -#define DLT_PPP 9 /* Point-to-point Protocol */ -#define DLT_FDDI 10 /* FDDI */ - -/* - * These are types that are different on some platforms, and that - * have been defined by for ages. We use #ifdefs to - * detect the BSDs that define them differently from the traditional - * libpcap - * - * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS, - * but I don't know what the right #define is for BSD/OS. - */ -#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */ - -#ifdef __OpenBSD__ -#define DLT_RAW 14 /* raw IP */ -#else -#define DLT_RAW 12 /* raw IP */ -#endif - -/* - * Given that the only OS that currently generates BSD/OS SLIP or PPP - * is, well, BSD/OS, arguably everybody should have chosen its values - * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they - * didn't. So it goes. - */ -#if defined(__NetBSD__) || defined(__FreeBSD__) -#ifndef DLT_SLIP_BSDOS -#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ -#endif -#else -#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ -#endif - -/* - * 17 is used for DLT_OLD_PFLOG in OpenBSD; - * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below. - * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else. - */ - -#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ - -/* - * Apparently Redback uses this for its SmartEdge 400/800. I hope - * nobody else decided to use it, too. - */ -#define DLT_REDBACK_SMARTEDGE 32 - -/* - * These values are defined by NetBSD; other platforms should refrain from - * using them for other purposes, so that NetBSD savefiles with link - * types of 50 or 51 can be read as this type on all platforms. - */ -#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ -#define DLT_PPP_ETHER 51 /* PPP over Ethernet */ - -/* - * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses - * a link-layer type of 99 for the tcpdump it supplies. The link-layer - * header has 6 bytes of unknown data, something that appears to be an - * Ethernet type, and 36 bytes that appear to be 0 in at least one capture - * I've seen. - */ -#define DLT_SYMANTEC_FIREWALL 99 - -/* - * Values between 100 and 103 are used in capture file headers as - * link-layer types corresponding to DLT_ types that differ - * between platforms; don't use those values for new DLT_ new types. - */ - -/* - * This value was defined by libpcap 0.5; platforms that have defined - * it with a different value should define it here with that value - - * a link type of 104 in a save file will be mapped to DLT_C_HDLC, - * whatever value that happens to be, so programs will correctly - * handle files with that link type regardless of the value of - * DLT_C_HDLC. - * - * The name DLT_C_HDLC was used by BSD/OS; we use that name for source - * compatibility with programs written for BSD/OS. - * - * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, - * for source compatibility with programs written for libpcap 0.5. - */ -#define DLT_C_HDLC 104 /* Cisco HDLC */ -#define DLT_CHDLC DLT_C_HDLC - -#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ - -/* - * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW, - * except when it isn't. (I.e., sometimes it's just raw IP, and - * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL, - * so that we don't have to worry about the link-layer header.) - */ - -/* - * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides - * with other values. - * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header - * (DLCI, etc.). - */ -#define DLT_FRELAY 107 - -/* - * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except - * that the AF_ type in the link-layer header is in network byte order. - * - * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so - * we don't use 12 for it in OSes other than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_LOOP 12 -#else -#define DLT_LOOP 108 -#endif - -/* - * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's - * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other - * than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_ENC 13 -#else -#define DLT_ENC 109 -#endif - -/* - * Values between 110 and 112 are reserved for use in capture file headers - * as link-layer types corresponding to DLT_ types that might differ - * between platforms; don't use those values for new DLT_ types - * other than the corresponding DLT_ types. - */ - -/* - * This is for Linux cooked sockets. - */ -#define DLT_LINUX_SLL 113 - -/* - * Apple LocalTalk hardware. - */ -#define DLT_LTALK 114 - -/* - * Acorn Econet. - */ -#define DLT_ECONET 115 - -/* - * Reserved for use with OpenBSD ipfilter. - */ -#define DLT_IPFILTER 116 - -/* - * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023 - * in SuSE 6.3, so we can't use 17 for it in capture-file headers. - * - * XXX: is there a conflict with DLT_PFSYNC 18 as well? - */ -#ifdef __OpenBSD__ -#define DLT_OLD_PFLOG 17 -#define DLT_PFSYNC 18 -#endif -#define DLT_PFLOG 117 - -/* - * Registered for Cisco-internal use. - */ -#define DLT_CISCO_IOS 118 - -/* - * For 802.11 cards using the Prism II chips, with a link-layer - * header including Prism monitor mode information plus an 802.11 - * header. - */ -#define DLT_PRISM_HEADER 119 - -/* - * Reserved for Aironet 802.11 cards, with an Aironet link-layer header - * (see Doug Ambrisko's FreeBSD patches). - */ -#define DLT_AIRONET_HEADER 120 - -/* - * Reserved for Siemens HiPath HDLC. - */ -#define DLT_HHDLC 121 - -/* - * This is for RFC 2625 IP-over-Fibre Channel. - * - * This is not for use with raw Fibre Channel, where the link-layer - * header starts with a Fibre Channel frame header; it's for IP-over-FC, - * where the link-layer header starts with an RFC 2625 Network_Header - * field. - */ -#define DLT_IP_OVER_FC 122 - -/* - * This is for Full Frontal ATM on Solaris with SunATM, with a - * pseudo-header followed by an AALn PDU. - * - * There may be other forms of Full Frontal ATM on other OSes, - * with different pseudo-headers. - * - * If ATM software returns a pseudo-header with VPI/VCI information - * (and, ideally, packet type information, e.g. signalling, ILMI, - * LANE, LLC-multiplexed traffic, etc.), it should not use - * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump - * and the like don't have to infer the presence or absence of a - * pseudo-header and the form of the pseudo-header. - */ -#define DLT_SUNATM 123 /* Solaris+SunATM */ - -/* - * Reserved as per request from Kent Dahlgren - * for private use. - */ -#define DLT_RIO 124 /* RapidIO */ -#define DLT_PCI_EXP 125 /* PCI Express */ -#define DLT_AURORA 126 /* Xilinx Aurora link layer */ - -/* - * Header for 802.11 plus a number of bits of link-layer information - * including radio information, used by some recent BSD drivers as - * well as the madwifi Atheros driver for Linux. - */ -#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */ - -/* - * Reserved for the TZSP encapsulation, as per request from - * Chris Waters - * TZSP is a generic encapsulation for any other link type, - * which includes a means to include meta-information - * with the packet, e.g. signal strength and channel - * for 802.11 packets. - */ -#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ - -/* - * BSD's ARCNET headers have the source host, destination host, - * and type at the beginning of the packet; that's what's handed - * up to userland via BPF. - * - * Linux's ARCNET headers, however, have a 2-byte offset field - * between the host IDs and the type; that's what's handed up - * to userland via PF_PACKET sockets. - * - * We therefore have to have separate DLT_ values for them. - */ -#define DLT_ARCNET_LINUX 129 /* ARCNET */ - -/* - * Juniper-private data link types, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MLPPP 130 -#define DLT_JUNIPER_MLFR 131 -#define DLT_JUNIPER_ES 132 -#define DLT_JUNIPER_GGSN 133 -#define DLT_JUNIPER_MFR 134 -#define DLT_JUNIPER_ATM2 135 -#define DLT_JUNIPER_SERVICES 136 -#define DLT_JUNIPER_ATM1 137 - -/* - * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund - * . The header that's presented is an Ethernet-like - * header: - * - * #define FIREWIRE_EUI64_LEN 8 - * struct firewire_header { - * u_char firewire_dhost[FIREWIRE_EUI64_LEN]; - * u_char firewire_shost[FIREWIRE_EUI64_LEN]; - * u_short firewire_type; - * }; - * - * with "firewire_type" being an Ethernet type value, rather than, - * for example, raw GASP frames being handed up. - */ -#define DLT_APPLE_IP_OVER_IEEE1394 138 - -/* - * Various SS7 encapsulations, as per a request from Jeff Morriss - * and subsequent discussions. - */ -#define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */ -#define DLT_MTP2 140 /* MTP2, without pseudo-header */ -#define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */ -#define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */ - -/* - * DOCSIS MAC frames. - */ -#define DLT_DOCSIS 143 - -/* - * Linux-IrDA packets. Protocol defined at http://www.irda.org. - * Those packets include IrLAP headers and above (IrLMP...), but - * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy - * framing can be handled by the hardware and depend on the bitrate. - * This is exactly the format you would get capturing on a Linux-IrDA - * interface (irdaX), but not on a raw serial port. - * Note the capture is done in "Linux-cooked" mode, so each packet include - * a fake packet header (struct sll_header). This is because IrDA packet - * decoding is dependant on the direction of the packet (incomming or - * outgoing). - * When/if other platform implement IrDA capture, we may revisit the - * issue and define a real DLT_IRDA... - * Jean II - */ -#define DLT_LINUX_IRDA 144 - -/* - * Reserved for IBM SP switch and IBM Next Federation switch. - */ -#define DLT_IBM_SP 145 -#define DLT_IBM_SN 146 - -/* - * Reserved for private use. If you have some link-layer header type - * that you want to use within your organization, with the capture files - * using that link-layer header type not ever be sent outside your - * organization, you can use these values. - * - * No libpcap release will use these for any purpose, nor will any - * tcpdump release use them, either. - * - * Do *NOT* use these in capture files that you expect anybody not using - * your private versions of capture-file-reading tools to read; in - * particular, do *NOT* use them in products, otherwise you may find that - * people won't be able to use tcpdump, or snort, or Ethereal, or... to - * read capture files from your firewall/intrusion detection/traffic - * monitoring/etc. appliance, or whatever product uses that DLT_ value, - * and you may also find that the developers of those applications will - * not accept patches to let them read those files. - * - * Also, do not use them if somebody might send you a capture using them - * for *their* private type and tools using them for *your* private type - * would have to read them. - * - * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value, - * as per the comment above, and use the type you're given. - */ -#define DLT_USER0 147 -#define DLT_USER1 148 -#define DLT_USER2 149 -#define DLT_USER3 150 -#define DLT_USER4 151 -#define DLT_USER5 152 -#define DLT_USER6 153 -#define DLT_USER7 154 -#define DLT_USER8 155 -#define DLT_USER9 156 -#define DLT_USER10 157 -#define DLT_USER11 158 -#define DLT_USER12 159 -#define DLT_USER13 160 -#define DLT_USER14 161 -#define DLT_USER15 162 - -/* - * For future use with 802.11 captures - defined by AbsoluteValue - * Systems to store a number of bits of link-layer information - * including radio information: - * - * http://www.shaftnet.org/~pizza/software/capturefrm.txt - * - * but it might be used by some non-AVS drivers now or in the - * future. - */ -#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MONITOR 164 - -/* - * Reserved for BACnet MS/TP. - */ -#define DLT_BACNET_MS_TP 165 - -/* - * Another PPP variant as per request from Karsten Keil . - * - * This is used in some OSes to allow a kernel socket filter to distinguish - * between incoming and outgoing packets, on a socket intended to - * supply pppd with outgoing packets so it can do dial-on-demand and - * hangup-on-lack-of-demand; incoming packets are filtered out so they - * don't cause pppd to hold the connection up (you don't want random - * input packets such as port scans, packets from old lost connections, - * etc. to force the connection to stay up). - * - * The first byte of the PPP header (0xff03) is modified to accomodate - * the direction - 0x00 = IN, 0x01 = OUT. - */ -#define DLT_PPP_PPPD 166 - -/* - * Names for backwards compatibility with older versions of some PPP - * software; new software should use DLT_PPP_PPPD. - */ -#define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD -#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, cookies, etc.. - */ -#define DLT_JUNIPER_PPPOE 167 -#define DLT_JUNIPER_PPPOE_ATM 168 - -#define DLT_GPRS_LLC 169 /* GPRS LLC */ -#define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ -#define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ - -/* - * Requested by Oolan Zimmer for use in Gcom's T1/E1 line - * monitoring equipment. - */ -#define DLT_GCOM_T1E1 172 -#define DLT_GCOM_SERIAL 173 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_ is used - * for internal communication to Physical Interface Cards (PIC) - */ -#define DLT_JUNIPER_PIC_PEER 174 - -/* - * Link types requested by Gregor Maier of Endace - * Measurement Systems. They add an ERF header (see - * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of - * the link-layer header. - */ -#define DLT_ERF_ETH 175 /* Ethernet */ -#define DLT_ERF_POS 176 /* Packet-over-SONET */ - -/* - * Requested by Daniele Orlandi for raw LAPD - * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header - * includes additional information before the LAPD header, so it's - * not necessarily a generic LAPD header. - */ -#define DLT_LINUX_LAPD 177 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ are used for prepending meta-information - * like interface index, interface name - * before standard Ethernet, PPP, Frelay & C-HDLC Frames - */ -#define DLT_JUNIPER_ETHER 178 -#define DLT_JUNIPER_PPP 179 -#define DLT_JUNIPER_FRELAY 180 -#define DLT_JUNIPER_CHDLC 181 - -/* - * Multi Link Frame Relay (FRF.16) - */ -#define DLT_MFR 182 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * voice Adapter Card (PIC) - */ -#define DLT_JUNIPER_VP 183 - -/* - * Arinc 429 frames. - * DLT_ requested by Gianluca Varenni . - * Every frame contains a 32bit A429 label. - * More documentation on Arinc 429 can be found at - * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf - */ -#define DLT_A429 184 - -/* - * Arinc 653 Interpartition Communication messages. - * DLT_ requested by Gianluca Varenni . - * Please refer to the A653-1 standard for more information. - */ -#define DLT_A653_ICM 185 - -/* - * USB packets, beginning with a USB setup header; requested by - * Paolo Abeni . - */ -#define DLT_USB 186 - -/* - * Bluetooth HCI UART transport layer (part H:4); requested by - * Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4 187 - -/* - * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz - * . - */ -#define DLT_IEEE802_16_MAC_CPS 188 - -/* - * USB packets, beginning with a Linux USB header; requested by - * Paolo Abeni . - */ -#define DLT_USB_LINUX 189 - -/* - * Controller Area Network (CAN) v. 2.0B packets. - * DLT_ requested by Gianluca Varenni . - * Used to dump CAN packets coming from a CAN Vector board. - * More documentation on the CAN v2.0B frames can be found at - * http://www.can-cia.org/downloads/?269 - */ -#define DLT_CAN20B 190 - -/* - * IEEE 802.15.4, with address fields padded, as is done by Linux - * drivers; requested by Juergen Schimmer. - */ -#define DLT_IEEE802_15_4_LINUX 191 - -/* - * Per Packet Information encapsulated packets. - * DLT_ requested by Gianluca Varenni . - */ -#define DLT_PPI 192 - -/* - * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; - * requested by Charles Clancy. - */ -#define DLT_IEEE802_16_MAC_CPS_RADIO 193 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * integrated service module (ISM). - */ -#define DLT_JUNIPER_ISM 194 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing); requested by Mikko Saarnivala . - */ -#define DLT_IEEE802_15_4 195 - -/* - * Various link-layer types, with a pseudo-header, for SITA - * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com). - */ -#define DLT_SITA 196 - -/* - * Various link-layer types, with a pseudo-header, for Endace DAG cards; - * encapsulates Endace ERF records. Requested by Stephen Donnelly - * . - */ -#define DLT_ERF 197 - -/* - * Special header prepended to Ethernet packets when capturing from a - * u10 Networks board. Requested by Phil Mulholland - * . - */ -#define DLT_RAIF1 198 - -/* - * IPMB packet for IPMI, beginning with the I2C slave address, followed - * by the netFn and LUN, etc.. Requested by Chanthy Toeung - * . - */ -#define DLT_IPMB 199 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for capturing data on a secure tunnel interface. - */ -#define DLT_JUNIPER_ST 200 - -/* - * Bluetooth HCI UART transport layer (part H:4), with pseudo-header - * that includes direction information; requested by Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 - -/* - * AX.25 packet with a 1-byte KISS header; see - * - * http://www.ax25.net/kiss.htm - * - * as per Richard Stearn . - */ -#define DLT_AX25_KISS 202 - -/* - * LAPD packets from an ISDN channel, starting with the address field, - * with no pseudo-header. - * Requested by Varuna De Silva . - */ -#define DLT_LAPD 203 - -/* - * Variants of various link-layer headers, with a one-byte direction - * pseudo-header prepended - zero means "received by this host", - * non-zero (any non-zero value) means "sent by this host" - as per - * Will Barker . - */ -#define DLT_PPP_WITH_DIR 204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */ -#define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */ -#define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */ -#define DLT_LAPB_WITH_DIR 207 /* LAPB */ - -/* - * 208 is reserved for an as-yet-unspecified proprietary link-layer - * type, as requested by Will Barker. - */ - -/* - * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman - * . - */ -#define DLT_IPMB_LINUX 209 - -/* - * FlexRay automotive bus - http://www.flexray.com/ - as requested - * by Hannes Kaelber . - */ -#define DLT_FLEXRAY 210 - -/* - * Media Oriented Systems Transport (MOST) bus for multimedia - * transport - http://www.mostcooperation.com/ - as requested - * by Hannes Kaelber . - */ -#define DLT_MOST 211 - -/* - * Local Interconnect Network (LIN) bus for vehicle networks - - * http://www.lin-subbus.org/ - as requested by Hannes Kaelber - * . - */ -#define DLT_LIN 212 - -/* - * X2E-private data link type used for serial line capture, - * as requested by Hannes Kaelber . - */ -#define DLT_X2E_SERIAL 213 - -/* - * X2E-private data link type used for the Xoraya data logger - * family, as requested by Hannes Kaelber . - */ -#define DLT_X2E_XORAYA 214 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing), but with the PHY-level data for non-ASK PHYs (4 octets - * of 0 as preamble, one octet of SFD, one octet of frame length+ - * reserved bit, and then the MAC-layer data, starting with the - * frame control field). - * - * Requested by Max Filippov . - */ -#define DLT_IEEE802_15_4_NONASK_PHY 215 - - -/* - * DLT and savefile link type values are split into a class and - * a member of that class. A class value of 0 indicates a regular - * DLT_/LINKTYPE_ value. - */ -#define DLT_CLASS(x) ((x) & 0x03ff0000) - -/* - * NetBSD-specific generic "raw" link type. The class value indicates - * that this is the generic raw type, and the lower 16 bits are the - * address family we're dealing with. Those values are NetBSD-specific; - * do not assume that they correspond to AF_ values for your operating - * system. - */ -#define DLT_CLASS_NETBSD_RAWAF 0x02240000 -#define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af)) -#define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff) -#define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF) - - -/* - * The instruction encodings. - */ -/* instruction classes */ -#define BPF_CLASS(code) ((code) & 0x07) -#define BPF_LD 0x00 -#define BPF_LDX 0x01 -#define BPF_ST 0x02 -#define BPF_STX 0x03 -#define BPF_ALU 0x04 -#define BPF_JMP 0x05 -#define BPF_RET 0x06 -#define BPF_MISC 0x07 - -/* ld/ldx fields */ -#define BPF_SIZE(code) ((code) & 0x18) -#define BPF_W 0x00 -#define BPF_H 0x08 -#define BPF_B 0x10 -#define BPF_MODE(code) ((code) & 0xe0) -#define BPF_IMM 0x00 -#define BPF_ABS 0x20 -#define BPF_IND 0x40 -#define BPF_MEM 0x60 -#define BPF_LEN 0x80 -#define BPF_MSH 0xa0 - -/* alu/jmp fields */ -#define BPF_OP(code) ((code) & 0xf0) -#define BPF_ADD 0x00 -#define BPF_SUB 0x10 -#define BPF_MUL 0x20 -#define BPF_DIV 0x30 -#define BPF_OR 0x40 -#define BPF_AND 0x50 -#define BPF_LSH 0x60 -#define BPF_RSH 0x70 -#define BPF_NEG 0x80 -#define BPF_JA 0x00 -#define BPF_JEQ 0x10 -#define BPF_JGT 0x20 -#define BPF_JGE 0x30 -#define BPF_JSET 0x40 -#define BPF_SRC(code) ((code) & 0x08) -#define BPF_K 0x00 -#define BPF_X 0x08 - -/* ret - BPF_K and BPF_X also apply */ -#define BPF_RVAL(code) ((code) & 0x18) -#define BPF_A 0x10 - -/* misc */ -#define BPF_MISCOP(code) ((code) & 0xf8) -#define BPF_TAX 0x00 -#define BPF_TXA 0x80 - -/* - * The instruction data structure. - */ -struct bpf_insn { - u_short code; - u_char jt; - u_char jf; - bpf_u_int32 k; -}; - -/* - * Macros for insn array initializers. - */ -#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } -#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } - -#if __STDC__ || defined(__cplusplus) -extern int bpf_validate(const struct bpf_insn *, int); -extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -#else -extern int bpf_validate(); -extern u_int bpf_filter(); -#endif - -/* - * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). - */ -#define BPF_MEMWORDS 16 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/namedb.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/namedb.h deleted file mode 100644 index 9002c7509..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/namedb.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 1994, 1996 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL) - */ - -#ifndef lib_pcap_namedb_h -#define lib_pcap_namedb_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * As returned by the pcap_next_etherent() - * XXX this stuff doesn't belong in this interface, but this - * library already must do name to address translation, so - * on systems that don't have support for /etc/ethers, we - * export these hooks since they'll - */ -struct pcap_etherent { - u_char addr[6]; - char name[122]; -}; -#ifndef PCAP_ETHERS_FILE -#define PCAP_ETHERS_FILE "/etc/ethers" -#endif -struct pcap_etherent *pcap_next_etherent(FILE *); -u_char *pcap_ether_hostton(const char*); -u_char *pcap_ether_aton(const char *); - -bpf_u_int32 **pcap_nametoaddr(const char *); -#ifdef INET6 -struct addrinfo *pcap_nametoaddrinfo(const char *); -#endif -bpf_u_int32 pcap_nametonetaddr(const char *); - -int pcap_nametoport(const char *, int *, int *); -int pcap_nametoportrange(const char *, int *, int *, int *); -int pcap_nametoproto(const char *); -int pcap_nametoeproto(const char *); -int pcap_nametollc(const char *); -/* - * If a protocol is unknown, PROTO_UNDEF is returned. - * Also, pcap_nametoport() returns the protocol along with the port number. - * If there are ambiguous entried in /etc/services (i.e. domain - * can be either tcp or udp) PROTO_UNDEF is returned. - */ -#define PROTO_UNDEF -1 - -/* XXX move these to pcap-int.h? */ -int __pcap_atodn(const char *, bpf_u_int32 *); -int __pcap_atoin(const char *, bpf_u_int32 *); -u_short __pcap_nametodnaddr(const char *); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/pcap.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/pcap.h deleted file mode 100644 index ad8fc40ac..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/pcap.h +++ /dev/null @@ -1,407 +0,0 @@ -/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ -/* - * Copyright (c) 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/pcap.h,v 1.4.2.11 2008-10-06 15:38:39 gianluca Exp $ (LBL) - */ - -#ifndef lib_pcap_pcap_h -#define lib_pcap_pcap_h - -#if defined(WIN32) - #include -#elif defined(MSDOS) - #include - #include /* u_int, u_char etc. */ -#else /* UN*X */ - #include - #include -#endif /* WIN32/MSDOS/UN*X */ - -#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H -#include -#endif - -#include - -#ifdef HAVE_REMOTE - // We have to define the SOCKET here, although it has been defined in sockutils.h - // This is to avoid the distribution of the 'sockutils.h' file around - // (for example in the WinPcap developer's pack) - #ifndef SOCKET - #ifdef WIN32 - #define SOCKET unsigned int - #else - #define SOCKET int - #endif - #endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define PCAP_VERSION_MAJOR 2 -#define PCAP_VERSION_MINOR 4 - -#define PCAP_ERRBUF_SIZE 256 - -/* - * Compatibility for systems that have a bpf.h that - * predates the bpf typedefs for 64-bit support. - */ -#if BPF_RELEASE - 0 < 199406 -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -typedef struct pcap pcap_t; -typedef struct pcap_dumper pcap_dumper_t; -typedef struct pcap_if pcap_if_t; -typedef struct pcap_addr pcap_addr_t; - -/* - * The first record in the file contains saved values for some - * of the flags used in the printout phases of tcpdump. - * Many fields here are 32 bit ints so compilers won't insert unwanted - * padding; these files need to be interchangeable across architectures. - * - * Do not change the layout of this structure, in any way (this includes - * changes that only affect the length of fields in this structure). - * - * Also, do not change the interpretation of any of the members of this - * structure, in any way (this includes using values other than - * LINKTYPE_ values, as defined in "savefile.c", in the "linktype" - * field). - * - * Instead: - * - * introduce a new structure for the new format, if the layout - * of the structure changed; - * - * send mail to "tcpdump-workers@lists.tcpdump.org", requesting - * a new magic number for your new capture file format, and, when - * you get the new magic number, put it in "savefile.c"; - * - * use that magic number for save files with the changed file - * header; - * - * make the code in "savefile.c" capable of reading files with - * the old file header as well as files with the new file header - * (using the magic number to determine the header format). - * - * Then supply the changes as a patch at - * - * http://sourceforge.net/projects/libpcap/ - * - * so that future versions of libpcap and programs that use it (such as - * tcpdump) will be able to read your new capture file format. - */ -struct pcap_file_header { - bpf_u_int32 magic; - u_short version_major; - u_short version_minor; - bpf_int32 thiszone; /* gmt to local correction */ - bpf_u_int32 sigfigs; /* accuracy of timestamps */ - bpf_u_int32 snaplen; /* max length saved portion of each pkt */ - bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */ -}; - -/* - * Macros for the value returned by pcap_datalink_ext(). - * - * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro - * gives the FCS length of packets in the capture. - */ -#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000) -#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28) -#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000) - -typedef enum { - PCAP_D_INOUT = 0, - PCAP_D_IN, - PCAP_D_OUT -} pcap_direction_t; - -/* - * Generic per-packet information, as supplied by libpcap. - * - * The time stamp can and should be a "struct timeval", regardless of - * whether your system supports 32-bit tv_sec in "struct timeval", - * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit - * and 64-bit applications. The on-disk format of savefiles uses 32-bit - * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit - * and 64-bit versions of libpcap, even if they're on the same platform, - * should supply the appropriate version of "struct timeval", even if - * that's not what the underlying packet capture mechanism supplies. - */ -struct pcap_pkthdr { - struct timeval ts; /* time stamp */ - bpf_u_int32 caplen; /* length of portion present */ - bpf_u_int32 len; /* length this packet (off wire) */ -}; - -/* - * As returned by the pcap_stats() - */ -struct pcap_stat { - u_int ps_recv; /* number of packets received */ - u_int ps_drop; /* number of packets dropped */ - u_int ps_ifdrop; /* drops by interface XXX not yet supported */ -#ifdef HAVE_REMOTE - u_int ps_capt; /* number of packets that are received by the application; please get rid off the Win32 ifdef */ - u_int ps_sent; /* number of packets sent by the server on the network */ - u_int ps_netdrop; /* number of packets lost on the network */ -#endif /* HAVE_REMOTE */ -}; - -#ifdef MSDOS -/* - * As returned by the pcap_stats_ex() - */ -struct pcap_stat_ex { - u_long rx_packets; /* total packets received */ - u_long tx_packets; /* total packets transmitted */ - u_long rx_bytes; /* total bytes received */ - u_long tx_bytes; /* total bytes transmitted */ - u_long rx_errors; /* bad packets received */ - u_long tx_errors; /* packet transmit problems */ - u_long rx_dropped; /* no space in Rx buffers */ - u_long tx_dropped; /* no space available for Tx */ - u_long multicast; /* multicast packets received */ - u_long collisions; - - /* detailed rx_errors: */ - u_long rx_length_errors; - u_long rx_over_errors; /* receiver ring buff overflow */ - u_long rx_crc_errors; /* recv'd pkt with crc error */ - u_long rx_frame_errors; /* recv'd frame alignment error */ - u_long rx_fifo_errors; /* recv'r fifo overrun */ - u_long rx_missed_errors; /* recv'r missed packet */ - - /* detailed tx_errors */ - u_long tx_aborted_errors; - u_long tx_carrier_errors; - u_long tx_fifo_errors; - u_long tx_heartbeat_errors; - u_long tx_window_errors; - }; -#endif - -/* - * Item in a list of interfaces. - */ -struct pcap_if { - struct pcap_if *next; - char *name; /* name to hand to "pcap_open_live()" */ - char *description; /* textual description of interface, or NULL */ - struct pcap_addr *addresses; - bpf_u_int32 flags; /* PCAP_IF_ interface flags */ -}; - -#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */ - -/* - * Representation of an interface address. - */ -struct pcap_addr { - struct pcap_addr *next; - struct sockaddr *addr; /* address */ - struct sockaddr *netmask; /* netmask for that address */ - struct sockaddr *broadaddr; /* broadcast address for that address */ - struct sockaddr *dstaddr; /* P2P destination address for that address */ -}; - -typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, - const u_char *); - -/* - * Error codes for the pcap API. - * These will all be negative, so you can check for the success or - * failure of a call that returns these codes by checking for a - * negative value. - */ -#define PCAP_ERROR -1 /* generic error code */ -#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */ -#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */ -#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */ -#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */ -#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */ -#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */ -#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */ -#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */ - -/* - * Warning codes for the pcap API. - * These will all be positive and non-zero, so they won't look like - * errors. - */ -#define PCAP_WARNING 1 /* generic warning code */ -#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */ - -char *pcap_lookupdev(char *); -int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); - -pcap_t *pcap_create(const char *, char *); -int pcap_set_snaplen(pcap_t *, int); -int pcap_set_promisc(pcap_t *, int); -int pcap_can_set_rfmon(pcap_t *); -int pcap_set_rfmon(pcap_t *, int); -int pcap_set_timeout(pcap_t *, int); -int pcap_set_buffer_size(pcap_t *, int); -int pcap_activate(pcap_t *); - -pcap_t *pcap_open_live(const char *, int, int, int, char *); -pcap_t *pcap_open_dead(int, int); -pcap_t *pcap_open_offline(const char *, char *); -#if defined(WIN32) -pcap_t *pcap_hopen_offline(intptr_t, char *); -#if !defined(LIBPCAP_EXPORTS) -#define pcap_fopen_offline(f,b) \ - pcap_hopen_offline(_get_osfhandle(_fileno(f)), b) -#else /*LIBPCAP_EXPORTS*/ -static pcap_t *pcap_fopen_offline(FILE *, char *); -#endif -#else /*WIN32*/ -pcap_t *pcap_fopen_offline(FILE *, char *); -#endif /*WIN32*/ - -void pcap_close(pcap_t *); -int pcap_loop(pcap_t *, int, pcap_handler, u_char *); -int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); -const u_char* - pcap_next(pcap_t *, struct pcap_pkthdr *); -int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **); -void pcap_breakloop(pcap_t *); -int pcap_stats(pcap_t *, struct pcap_stat *); -int pcap_setfilter(pcap_t *, struct bpf_program *); -int pcap_setdirection(pcap_t *, pcap_direction_t); -int pcap_getnonblock(pcap_t *, char *); -int pcap_setnonblock(pcap_t *, int, char *); -int pcap_inject(pcap_t *, const void *, size_t); -int pcap_sendpacket(pcap_t *, const u_char *, int); -const char *pcap_statustostr(int); -const char *pcap_strerror(int); -char *pcap_geterr(pcap_t *); -void pcap_perror(pcap_t *, char *); -int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, - bpf_u_int32); -int pcap_compile_nopcap(int, int, struct bpf_program *, - const char *, int, bpf_u_int32); -void pcap_freecode(struct bpf_program *); -int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *, - const u_char *); -int pcap_datalink(pcap_t *); -int pcap_datalink_ext(pcap_t *); -int pcap_list_datalinks(pcap_t *, int **); -int pcap_set_datalink(pcap_t *, int); -void pcap_free_datalinks(int *); -int pcap_datalink_name_to_val(const char *); -const char *pcap_datalink_val_to_name(int); -const char *pcap_datalink_val_to_description(int); -int pcap_snapshot(pcap_t *); -int pcap_is_swapped(pcap_t *); -int pcap_major_version(pcap_t *); -int pcap_minor_version(pcap_t *); - -/* XXX */ -FILE *pcap_file(pcap_t *); -int pcap_fileno(pcap_t *); - -pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); -pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); -FILE *pcap_dump_file(pcap_dumper_t *); -long pcap_dump_ftell(pcap_dumper_t *); -int pcap_dump_flush(pcap_dumper_t *); -void pcap_dump_close(pcap_dumper_t *); -void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); - -int pcap_findalldevs(pcap_if_t **, char *); -void pcap_freealldevs(pcap_if_t *); - -const char *pcap_lib_version(void); - -/* XXX this guy lives in the bpf tree */ -u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -int bpf_validate(const struct bpf_insn *f, int len); -char *bpf_image(const struct bpf_insn *, int); -void bpf_dump(const struct bpf_program *, int); - -#if defined(WIN32) - -/* - * Win32 definitions - */ - -int pcap_setbuff(pcap_t *p, int dim); -int pcap_setmode(pcap_t *p, int mode); -int pcap_setmintocopy(pcap_t *p, int size); - -#ifdef WPCAP -/* Include file with the wpcap-specific extensions */ -#include -#endif /* WPCAP */ - -#define MODE_CAPT 0 -#define MODE_STAT 1 -#define MODE_MON 2 - -#elif defined(MSDOS) - -/* - * MS-DOS definitions - */ - -int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *); -void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait); -u_long pcap_mac_packets (void); - -#else /* UN*X */ - -/* - * UN*X definitions - */ - -int pcap_get_selectable_fd(pcap_t *); - -#endif /* WIN32/MSDOS/UN*X */ - -#ifdef HAVE_REMOTE -/* Includes most of the public stuff that is needed for the remote capture */ -#include -#endif /* HAVE_REMOTE */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/sll.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/sll.h deleted file mode 100644 index e9d5452af..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/sll.h +++ /dev/null @@ -1,129 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/sll.h,v 1.2.2.1 2008-05-30 01:36:06 guy Exp $ (LBL) - */ - -/* - * For captures on Linux cooked sockets, we construct a fake header - * that includes: - * - * a 2-byte "packet type" which is one of: - * - * LINUX_SLL_HOST packet was sent to us - * LINUX_SLL_BROADCAST packet was broadcast - * LINUX_SLL_MULTICAST packet was multicast - * LINUX_SLL_OTHERHOST packet was sent to somebody else - * LINUX_SLL_OUTGOING packet was sent *by* us; - * - * a 2-byte Ethernet protocol field; - * - * a 2-byte link-layer type; - * - * a 2-byte link-layer address length; - * - * an 8-byte source link-layer address, whose actual length is - * specified by the previous value. - * - * All fields except for the link-layer address are in network byte order. - * - * DO NOT change the layout of this structure, or change any of the - * LINUX_SLL_ values below. If you must change the link-layer header - * for a "cooked" Linux capture, introduce a new DLT_ type (ask - * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it - * a value that collides with a value already being used), and use the - * new header in captures of that type, so that programs that can - * handle DLT_LINUX_SLL captures will continue to handle them correctly - * without any change, and so that capture files with different headers - * can be told apart and programs that read them can dissect the - * packets in them. - */ - -#ifndef lib_pcap_sll_h -#define lib_pcap_sll_h - -/* - * A DLT_LINUX_SLL fake link-layer header. - */ -#define SLL_HDR_LEN 16 /* total header length */ -#define SLL_ADDRLEN 8 /* length of address field */ - -struct sll_header { - u_int16_t sll_pkttype; /* packet type */ - u_int16_t sll_hatype; /* link-layer address type */ - u_int16_t sll_halen; /* link-layer address length */ - u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */ - u_int16_t sll_protocol; /* protocol */ -}; - -/* - * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the - * PACKET_ values on Linux, but are defined here so that they're - * available even on systems other than Linux, and so that they - * don't change even if the PACKET_ values change. - */ -#define LINUX_SLL_HOST 0 -#define LINUX_SLL_BROADCAST 1 -#define LINUX_SLL_MULTICAST 2 -#define LINUX_SLL_OTHERHOST 3 -#define LINUX_SLL_OUTGOING 4 - -/* - * The LINUX_SLL_ values for "sll_protocol"; these correspond to the - * ETH_P_ values on Linux, but are defined here so that they're - * available even on systems other than Linux. We assume, for now, - * that the ETH_P_ values won't change in Linux; if they do, then: - * - * if we don't translate them in "pcap-linux.c", capture files - * won't necessarily be readable if captured on a system that - * defines ETH_P_ values that don't match these values; - * - * if we do translate them in "pcap-linux.c", that makes life - * unpleasant for the BPF code generator, as the values you test - * for in the kernel aren't the values that you test for when - * reading a capture file, so the fixup code run on BPF programs - * handed to the kernel ends up having to do more work. - * - * Add other values here as necessary, for handling packet types that - * might show up on non-Ethernet, non-802.x networks. (Not all the ones - * in the Linux "if_ether.h" will, I suspect, actually show up in - * captures.) - */ -#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */ -#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */ - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/usb.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/usb.h deleted file mode 100644 index adcd19c05..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/usb.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2006 Paolo Abeni (Italy) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Basic USB data struct - * By Paolo Abeni - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $ - */ - -#ifndef _PCAP_USB_STRUCTS_H__ -#define _PCAP_USB_STRUCTS_H__ - -/* - * possible transfer mode - */ -#define URB_TRANSFER_IN 0x80 -#define URB_ISOCHRONOUS 0x0 -#define URB_INTERRUPT 0x1 -#define URB_CONTROL 0x2 -#define URB_BULK 0x3 - -/* - * possible event type - */ -#define URB_SUBMIT 'S' -#define URB_COMPLETE 'C' -#define URB_ERROR 'E' - -/* - * USB setup header as defined in USB specification. - * Appears at the front of each packet in DLT_USB captures. - */ -typedef struct _usb_setup { - u_int8_t bmRequestType; - u_int8_t bRequest; - u_int16_t wValue; - u_int16_t wIndex; - u_int16_t wLength; -} pcap_usb_setup; - - -/* - * Header prepended by linux kernel to each event. - * Appears at the front of each packet in DLT_USB_LINUX captures. - */ -typedef struct _usb_header { - u_int64_t id; - u_int8_t event_type; - u_int8_t transfer_type; - u_int8_t endpoint_number; - u_int8_t device_address; - u_int16_t bus_id; - char setup_flag;/*if !=0 the urb setup header is not present*/ - char data_flag; /*if !=0 no urb data is present*/ - int64_t ts_sec; - int32_t ts_usec; - int32_t status; - u_int32_t urb_len; - u_int32_t data_len; /* amount of urb data really present in this event*/ - pcap_usb_setup setup; -} pcap_usb_header; - - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/vlan.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/vlan.h deleted file mode 100644 index b0cb7949b..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/pcap/vlan.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/vlan.h,v 1.1.2.2 2008-08-06 07:45:59 guy Exp $ - */ - -#ifndef lib_pcap_vlan_h -#define lib_pcap_vlan_h - -struct vlan_tag { - u_int16_t vlan_tpid; /* ETH_P_8021Q */ - u_int16_t vlan_tci; /* VLAN TCI */ -}; - -#define VLAN_TAG_LEN 4 - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/remote-ext.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/remote-ext.h deleted file mode 100644 index 9f54d6974..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/remote-ext.h +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright (c) 2002 - 2003 - * NetGroup, Politecnico di Torino (Italy) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef __REMOTE_EXT_H__ -#define __REMOTE_EXT_H__ - - -#ifndef HAVE_REMOTE -#error Please do not include this file directly. Just define HAVE_REMOTE and then include pcap.h -#endif - -// Definition for Microsoft Visual Studio -#if _MSC_VER > 1000 -#pragma once -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*! - \file remote-ext.h - - The goal of this file it to include most of the new definitions that should be - placed into the pcap.h file. - - It includes all new definitions (structures and functions like pcap_open(). - Some of the functions are not really a remote feature, but, right now, - they are placed here. -*/ - - - -// All this stuff is public -/*! \addtogroup remote_struct - \{ -*/ - - - - -/*! - \brief Defines the maximum buffer size in which address, port, interface names are kept. - - In case the adapter name or such is larger than this value, it is truncated. - This is not used by the user; however it must be aware that an hostname / interface - name longer than this value will be truncated. -*/ -#define PCAP_BUF_SIZE 1024 - - -/*! \addtogroup remote_source_ID - \{ -*/ - - -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a file, i.e. the user want to open a capture from a local file. -*/ -#define PCAP_SRC_FILE 2 -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a local interface, i.e. the user want to open a capture from - a local interface. This does not involve the RPCAP protocol. -*/ -#define PCAP_SRC_IFLOCAL 3 -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a remote interface, i.e. the user want to open a capture from - an interface on a remote host. This does involve the RPCAP protocol. -*/ -#define PCAP_SRC_IFREMOTE 4 - -/*! - \} -*/ - - - -/*! \addtogroup remote_source_string - - The formats allowed by the pcap_open() are the following: - - file://path_and_filename [opens a local file] - - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol] - - rpcap://host/devicename [opens the selected device available on a remote host] - - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP] - - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged] - - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged] - - The formats allowed by the pcap_findalldevs_ex() are the following: - - file://folder/ [lists all the files in the given folder] - - rpcap:// [lists all local adapters] - - rpcap://host:port/ [lists the devices available on a remote host] - - Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since - IPv6 is fully supported, these are the allowed formats: - - - host (literal): e.g. host.foo.bar - - host (numeric IPv4): e.g. 10.11.12.13 - - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13] - - host (numeric IPv6): e.g. [1:2:3::4] - - port: can be either numeric (e.g. '80') or literal (e.g. 'http') - - Here you find some allowed examples: - - rpcap://host.foo.bar/devicename [everything literal, no port number] - - rpcap://host.foo.bar:1234/devicename [everything literal, with port number] - - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number] - - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number] - - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number] - - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number] - - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number] - - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number] - - \{ -*/ - - -/*! - \brief String that will be used to determine the type of source in use (file, - remote/local interface). - - This string will be prepended to the interface name in order to create a string - that contains all the information required to open the source. - - This string indicates that the user wants to open a capture from a local file. -*/ -#define PCAP_SRC_FILE_STRING "file://" -/*! - \brief String that will be used to determine the type of source in use (file, - remote/local interface). - - This string will be prepended to the interface name in order to create a string - that contains all the information required to open the source. - - This string indicates that the user wants to open a capture from a network interface. - This string does not necessarily involve the use of the RPCAP protocol. If the - interface required resides on the local host, the RPCAP protocol is not involved - and the local functions are used. -*/ -#define PCAP_SRC_IF_STRING "rpcap://" - -/*! - \} -*/ - - - - - -/*! - \addtogroup remote_open_flags - \{ -*/ - -/*! - \brief Defines if the adapter has to go in promiscuous mode. - - It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise. - Note that even if this parameter is false, the interface could well be in promiscuous - mode for some other reason (for example because another capture process with - promiscuous mode enabled is currently using that interface). - On on Linux systems with 2.2 or later kernels (that have the "any" device), this - flag does not work on the "any" device; if an argument of "any" is supplied, - the 'promisc' flag is ignored. -*/ -#define PCAP_OPENFLAG_PROMISCUOUS 1 - -/*! - \brief Defines if the data trasfer (in case of a remote - capture) has to be done with UDP protocol. - - If it is '1' if you want a UDP data connection, '0' if you want - a TCP data connection; control connection is always TCP-based. - A UDP connection is much lighter, but it does not guarantee that all - the captured packets arrive to the client workstation. Moreover, - it could be harmful in case of network congestion. - This flag is meaningless if the source is not a remote interface. - In that case, it is simply ignored. -*/ -#define PCAP_OPENFLAG_DATATX_UDP 2 - - -/*! - \brief Defines if the remote probe will capture its own generated traffic. - - In case the remote probe uses the same interface to capture traffic and to send - data back to the caller, the captured traffic includes the RPCAP traffic as well. - If this flag is turned on, the RPCAP traffic is excluded from the capture, so that - the trace returned back to the collector is does not include this traffic. -*/ -#define PCAP_OPENFLAG_NOCAPTURE_RPCAP 4 - -/*! - \brief Defines if the local adapter will capture its own generated traffic. - - This flag tells the underlying capture driver to drop the packets that were sent by itself. - This is usefult when building applications like bridges, that should ignore the traffic - they just sent. -*/ -#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8 - -/*! - \brief This flag configures the adapter for maximum responsiveness. - - In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before - copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage, - i.e. better performance, which is good for applications like sniffers. If the user sets the - PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application - is ready to receive them. This is suggested for real time applications (like, for example, a bridge) - that need the best responsiveness.*/ -#define PCAP_OPENFLAG_MAX_RESPONSIVENESS 16 - -/*! - \} -*/ - - -/*! - \addtogroup remote_samp_methods - \{ -*/ - -/*! - \brief No sampling has to be done on the current capture. - - In this case, no sampling algorithms are applied to the current capture. -*/ -#define PCAP_SAMP_NOSAMP 0 - -/*! - \brief It defines that only 1 out of N packets must be returned to the user. - - In this case, the 'value' field of the 'pcap_samp' structure indicates the - number of packets (minus 1) that must be discarded before one packet got accepted. - In other words, if 'value = 10', the first packet is returned to the caller, while - the following 9 are discarded. -*/ -#define PCAP_SAMP_1_EVERY_N 1 - -/*! - \brief It defines that we have to return 1 packet every N milliseconds. - - In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting - time' in milliseconds before one packet got accepted. - In other words, if 'value = 10', the first packet is returned to the caller; the next - returned one will be the first packet that arrives when 10ms have elapsed. -*/ -#define PCAP_SAMP_FIRST_AFTER_N_MS 2 - -/*! - \} -*/ - - -/*! - \addtogroup remote_auth_methods - \{ -*/ - -/*! - \brief It defines the NULL authentication. - - This value has to be used within the 'type' member of the pcap_rmtauth structure. - The 'NULL' authentication has to be equal to 'zero', so that old applications - can just put every field of struct pcap_rmtauth to zero, and it does work. -*/ -#define RPCAP_RMTAUTH_NULL 0 -/*! - \brief It defines the username/password authentication. - - With this type of authentication, the RPCAP protocol will use the username/ - password provided to authenticate the user on the remote machine. If the - authentication is successful (and the user has the right to open network devices) - the RPCAP connection will continue; otherwise it will be dropped. - - This value has to be used within the 'type' member of the pcap_rmtauth structure. -*/ -#define RPCAP_RMTAUTH_PWD 1 - -/*! - \} -*/ - - - - -/*! - - \brief This structure keeps the information needed to autheticate - the user on a remote machine. - - The remote machine can either grant or refuse the access according - to the information provided. - In case the NULL authentication is required, both 'username' and - 'password' can be NULL pointers. - - This structure is meaningless if the source is not a remote interface; - in that case, the functions which requires such a structure can accept - a NULL pointer as well. -*/ -struct pcap_rmtauth -{ - /*! - \brief Type of the authentication required. - - In order to provide maximum flexibility, we can support different types - of authentication based on the value of this 'type' variable. The currently - supported authentication methods are defined into the - \link remote_auth_methods Remote Authentication Methods Section\endlink. - - */ - int type; - /*! - \brief Zero-terminated string containing the username that has to be - used on the remote machine for authentication. - - This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication - and it can be NULL. - */ - char *username; - /*! - \brief Zero-terminated string containing the password that has to be - used on the remote machine for authentication. - - This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication - and it can be NULL. - */ - char *password; -}; - - -/*! - \brief This structure defines the information related to sampling. - - In case the sampling is requested, the capturing device should read - only a subset of the packets coming from the source. The returned packets depend - on the sampling parameters. - - \warning The sampling process is applied after the filtering process. - In other words, packets are filtered first, then the sampling process selects a - subset of the 'filtered' packets and it returns them to the caller. -*/ -struct pcap_samp -{ - /*! - Method used for sampling. Currently, the supported methods are listed in the - \link remote_samp_methods Sampling Methods Section\endlink. - */ - int method; - - /*! - This value depends on the sampling method defined. For its meaning, please check - at the \link remote_samp_methods Sampling Methods Section\endlink. - */ - int value; -}; - - - - -//! Maximum lenght of an host name (needed for the RPCAP active mode) -#define RPCAP_HOSTLIST_SIZE 1024 - - -/*! - \} -*/ // end of public documentation - - -// Exported functions - - - -/** \name New WinPcap functions - - This section lists the new functions that are able to help considerably in writing - WinPcap programs because of their easiness of use. - */ -//\{ -pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf); -int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf); -int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf); -int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf); -struct pcap_samp *pcap_setsampling(pcap_t *p); - -//\} -// End of new winpcap functions - - - -/** \name Remote Capture functions - */ -//\{ -SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf); -int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf); -int pcap_remoteact_close(const char *host, char *errbuf); -void pcap_remoteact_cleanup(); -//\} -// End of remote capture functions - -#ifdef __cplusplus -} -#endif - - -#endif - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/wpcap.lib b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/WinPCap/wpcap.lib deleted file mode 100644 index f832e0445b5c7dafe5a0f887262064265ba2b293..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19320 zcmdU0O>9(05-uRW4k3h)gbS|j4}Uz#t>t&Y%Y)S%rl;4JTp5pCTuoh zr6{Lp73IKQa^QrbD7U>tdx#=VoK`4`_7Fwch+_^p| zS6BDfKh<5`)$NUA`Fde~ylZ#2`x_V>8Oe?2azi67zdwrRhWbZ!@NyRb{1af)Ai(As zfGr;YjQ*f$?=%3>0gMxkW0+_MhKYuM)O4~3fN1X*n)>bm5FNa!=@dc`jeVwR->(2f zr@qm2dK`f0IF?CtuvgRRPmzx_yk67JDF8*E;}+y2(SaM92H(eeAPs$`X>=9#JJEGb+ptfFdaw>e+iq*x`Yiy_8LSsk zPhHb?lqKrHekD4vPE+rP*gr_)Sa+hqpEMo(8T%RO(3GZ$?*SB*@r$$_@rd?+t!Zo@ zjvvxV99NR-y@~cP&F-(99u}FD=x9fbs_AYW3=3tr%W|L_8r?37d|TiVLY~ zEvy9P(zP&>67jfHb#AU)syKqo60(JIwPA#!ut>cUHY?T2Y`I#v8X-CyA=yYsIvgR1 z{ec~7x`z7J_EoXesO6i5`6%5+g-kun7o&6?6lsXL*a+*hi*s{fJrauXgmly&fhf^s z3E4_`-3*NminK;E-)tB(9ge34;dLpXqEaSo&XvkdS!WX$Qnj#NubO6=h)8cV>r%o- zg$#}#%0zWB5s_Y~F4Rh8)(8_zN(7avo*HT-qioC+@^ketEL4l8NE;P0#e6f5+G>={ zMukkHlCL%9t7a5zRLGPXLF4Uwtri*$kqjZXkpEM)9$X9SjZ(D|bw-RQrAw8hw96CH zIB?un6^x}-su3UwQbeQ|7jfC3NgauZcw9Wn7pTvr=@psX2-v zPKxSZ5_y=PnoE_N$P;l>b2RJuN@JnKx{58)m9q&VA1x?B*qjgRVZ~&L@q{!@+G|$O zMuiOZZ>iF(7OFMdSjiHy%7zr}qAKD-YOYi%Vt=CNK_NilssaMOp#PS~G0a z3#jr@2fHjGTg%rQuBgKil48`YO^Y*yd_7#KHp6_O8RQFvux8Xd$xh8vE;W)lG&5CR zE{YZ+xiZSMFke|T8koY@IHd|2`Ept5435N=dVT?dRHmqxp2NoQb4*B>?S@fVJ*ax; z#(FH|ab7p_3pF&AS9m=V93eT2qkmOwwM1MS~zh^OYj+6w(qzK0R@x9xxG+j`OQ@O)YAwXd4wWGVhD0>`FwwU%QhSy`Bsht3yBaP(% ze(43MpxoU(=zYOFA0d4{0I&g1$&>iKwHu(>kDdVhcHwsomUZU@z?X;clzbTAW2BWw z0NzC^?gw}e%b&*d8(7cxv5c>V09Ik$uOp3b!!mjRZsYgctytC>fI7y0LnY-36{Zf7=>XNfjzJf#$Z1jgA3T1 zPr!??4yIuo*25%B!C6=dn_&}df!E4q}7h2Vp-SXex#;FLwXebxMB`=5C9I^9PV8s(AynihM(q47Hlj}F34Yx5 z5?lA>X`GVyBqM>5uRR)q`2Y)!$;$8I=7z=ffJr=%AQ6tTb`!4lnRETAExQINoiFRt&`kb6)zb#5OTk(WXF`3LzuyeV>Hxo-xE;5&wx*TA8>_O0# zmkw~5!tPVa^mwZsG2>X)OyT6P_FY#r`5rUt)woR?W2mOSw@rK-bJ`>O{@4yI%WYCPuf1kaI9X$ zNp*3w@H`qDr?aNs+&Oo2#&Hz0Why()^2D`)wqGhaX1N5xvM@q!8M4BUSkpzx4EynIBam!|lli=G+Mk}qYj1rahg&EpnNTMnkZ z6X;YS&b;BMmJ!Md!^x2hGOWz7`V;-AEPO=~#ptsfeItO|rMA!b4@pA?b9;q` zELR%xFI6w99i(bVQ6qBcEkNU%@)Gd`Z&9+L3Wy4UP

ii zt(#u7(X5F2?uWKuz$0Zt8OJO)7!6qr;{`-mW-ub#&;iOoI?D5ivfQBP z?YRYMzrS+nDC-bqg+bw+zXjsZL+Gm53p&N2Dhi z$sPL*kF_J!=aoO!_oo5a`Wl^G6SWCz8X~fDnjyWbFWEo#2>_LrfpY(yof(M2GuM&^&tn45RTGq64I1es%5IBD_q*{iK;u2FYa$7I6mN$G=TOG^=4LlDoZVf8Mpw z8`>v5@1R6iH=VS|vlhSLVkx(ih2l^~-N<=b^b_Mk`m)-zIUnA+Dq&#M2jgMyAnZo(4AD0*qp9b5G`pq6hCIM%0W!8nw$ z=X{p)l{75!sW3?UZSYVll0YzKHbPhY;~;29sU1>;c0zRY>-XSai;ZdbYZCG=to zq}NeHHZoF*W4Z&(oJadNNlfy2cY@QRZM55d-N8}r^iGgGy0KXzv2)UbaVVp147WIa zljmv+W4U(#jA6SoBbv{mY-KcYyI`T(Ull#QxQ(&o#f1gqP{wxoR*xQmS-4#qq68LyTjtHxo|KwtJB;6=J(Y@(tt?ceEx_3CTXEKlvOJ{NFy#1JrL^z$>YNrb&<@)H8*An#mck^5f7vwn&$@= zl0z9sY}m8Q7*9o{hYgHkLs{`!j2wCD52oO$CleN~{Wa0!-I!oJ@fxE8EMH$9a z4-3eltbOUxmcuD{<_QVov_E zH5QOV8As7)wU0Y^#`|rDZ3!!<#~Pe)(9AO+ZjXh{+AKB$jT}9S zHBXm1z-lq?X#aRxVyQ<_9pHHO31=jZeQssJ+SYsD$#znrB{r%InpH16?K&%w>>DwL zSc1lTMr+DJqo>Fgh(lRh<ClhvL%JxCqKEC=kR{Bh7JE3l N*?W_a?2Af)@;}RMSJ?mn diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/atomic.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/atomic.h deleted file mode 100644 index d44593d8f..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/atomic.h +++ /dev/null @@ -1,547 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.0 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/** - * @file atomic.h - * @brief FreeRTOS atomic operation support. - * - * Two implementations of atomic are given in this header file: - * 1. Disabling interrupt globally. - * 2. ISA native atomic support. - * The former is available to all ports (compiler-architecture combination), - * while the latter is only available to ports compiling with GCC (version at - * least 4.7.0), which also have ISA atomic support. - * - * User can select which implementation to use by: - * setting/clearing configUSE_ATOMIC_INSTRUCTION in FreeRTOSConfig.h. - * Define AND set configUSE_ATOMIC_INSTRUCTION to 1 for ISA native atomic support. - * Undefine OR clear configUSE_ATOMIC_INSTRUCTION for disabling global interrupt - * implementation. - * - * @see GCC Built-in Functions for Memory Model Aware Atomic Operations - * https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html - */ - -#ifndef ATOMIC_H -#define ATOMIC_H - -#ifndef INC_FREERTOS_H - #error "include FreeRTOS.h must appear in source files before include atomic.h" -#endif - -/* Standard includes. */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - /* Needed for __atomic_compare_exchange() weak=false. */ - #include - - /* This branch is for GCC compiler and GCC compiler only. */ - #ifndef portFORCE_INLINE - #define portFORCE_INLINE inline __attribute__((always_inline)) - #endif - -#else - - /* Port specific definitions -- entering/exiting critical section. - * Refer template -- ./lib/FreeRTOS/portable/Compiler/Arch/portmacro.h - * - * Every call to ATOMIC_EXIT_CRITICAL() must be closely paired with - * ATOMIC_ENTER_CRITICAL(). - */ - #if defined( portSET_INTERRUPT_MASK_FROM_ISR ) - - /* Nested interrupt scheme is supported in this port. */ - #define ATOMIC_ENTER_CRITICAL() \ - UBaseType_t uxCriticalSectionType = portSET_INTERRUPT_MASK_FROM_ISR() - - #define ATOMIC_EXIT_CRITICAL() \ - portCLEAR_INTERRUPT_MASK_FROM_ISR( uxCriticalSectionType ) - - #else - - /* Nested interrupt scheme is NOT supported in this port. */ - #define ATOMIC_ENTER_CRITICAL() portENTER_CRITICAL() - #define ATOMIC_EXIT_CRITICAL() portEXIT_CRITICAL() - - #endif /* portSET_INTERRUPT_MASK_FROM_ISR() */ - - /* Port specific definition -- "always inline". - * Inline is compiler specific, and may not always get inlined depending on your optimization level. - * Also, inline is considerred as performance optimization for atomic. - * Thus, if portFORCE_INLINE is not provided by portmacro.h, instead of resulting error, - * simply define it. - */ - #ifndef portFORCE_INLINE - #define portFORCE_INLINE - #endif - -#endif /* configUSE_GCC_BUILTIN_ATOMICS */ - -#define ATOMIC_COMPARE_AND_SWAP_SUCCESS 0x1U /**< Compare and swap succeeded, swapped. */ -#define ATOMIC_COMPARE_AND_SWAP_FAILURE 0x0U /**< Compare and swap failed, did not swap. */ - -/*----------------------------- Swap && CAS ------------------------------*/ - -/** - * Atomic compare-and-swap - * - * @brief Performs an atomic compare-and-swap operation on the specified values. - * - * @param[in, out] pDestination Pointer to memory location from where value is - * to be loaded and checked. - * @param[in] ulExchange If condition meets, write this value to memory. - * @param[in] ulComparand Swap condition. - * - * @return Unsigned integer of value 1 or 0. 1 for swapped, 0 for not swapped. - * - * @note This function only swaps *pDestination with ulExchange, if previous - * *pDestination value equals ulComparand. - */ -static portFORCE_INLINE uint32_t Atomic_CompareAndSwap_u32( - uint32_t volatile * pDestination, - uint32_t ulExchange, - uint32_t ulComparand ) -{ - - uint32_t ulReturnValue = ATOMIC_COMPARE_AND_SWAP_FAILURE; - -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - if ( __atomic_compare_exchange( pDestination, - &ulComparand, - &ulExchange, - false, - __ATOMIC_SEQ_CST, - __ATOMIC_SEQ_CST ) ) - { - ulReturnValue = ATOMIC_COMPARE_AND_SWAP_SUCCESS; - } - -#else - - ATOMIC_ENTER_CRITICAL(); - - if ( *pDestination == ulComparand ) - { - *pDestination = ulExchange; - ulReturnValue = ATOMIC_COMPARE_AND_SWAP_SUCCESS; - } - - ATOMIC_EXIT_CRITICAL(); - -#endif - - return ulReturnValue; - -} - -/** - * Atomic swap (pointers) - * - * @brief Atomically sets the address pointed to by *ppDestination to the value - * of *pExchange. - * - * @param[in, out] ppDestination Pointer to memory location from where a pointer - * value is to be loaded and written back to. - * @param[in] pExchange Pointer value to be written to *ppDestination. - * - * @return The initial value of *ppDestination. - */ -static portFORCE_INLINE void * Atomic_SwapPointers_p32( - void * volatile * ppDestination, - void * pExchange ) -{ - void * pReturnValue; - -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - __atomic_exchange( ppDestination, &pExchange, &pReturnValue, __ATOMIC_SEQ_CST ); - -#else - - ATOMIC_ENTER_CRITICAL(); - - pReturnValue = *ppDestination; - - *ppDestination = pExchange; - - ATOMIC_EXIT_CRITICAL(); - -#endif - - return pReturnValue; -} - -/** - * Atomic compare-and-swap (pointers) - * - * @brief Performs an atomic compare-and-swap operation on the specified pointer - * values. - * - * @param[in, out] ppDestination Pointer to memory location from where a pointer - * value is to be loaded and checked. - * @param[in] pExchange If condition meets, write this value to memory. - * @param[in] pComparand Swap condition. - * - * @return Unsigned integer of value 1 or 0. 1 for swapped, 0 for not swapped. - * - * @note This function only swaps *ppDestination with pExchange, if previous - * *ppDestination value equals pComparand. - */ -static portFORCE_INLINE uint32_t Atomic_CompareAndSwapPointers_p32( - void * volatile * ppDestination, - void * pExchange, void * pComparand ) -{ - uint32_t ulReturnValue = ATOMIC_COMPARE_AND_SWAP_FAILURE; - -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - if ( __atomic_compare_exchange( ppDestination, - &pComparand, - &pExchange, - false, - __ATOMIC_SEQ_CST, - __ATOMIC_SEQ_CST ) ) - { - ulReturnValue = ATOMIC_COMPARE_AND_SWAP_SUCCESS; - } - -#else - - ATOMIC_ENTER_CRITICAL(); - - if ( *ppDestination == pComparand ) - { - *ppDestination = pExchange; - ulReturnValue = ATOMIC_COMPARE_AND_SWAP_SUCCESS; - } - - ATOMIC_EXIT_CRITICAL(); - -#endif - - return ulReturnValue; -} - - -/*----------------------------- Arithmetic ------------------------------*/ - -/** - * Atomic add - * - * @brief Atomically adds count to the value of the specified pointer points to. - * - * @param[in,out] pAddend Pointer to memory location from where value is to be - * loaded and written back to. - * @param[in] ulCount Value to be added to *pAddend. - * - * @return previous *pAddend value. - */ -static portFORCE_INLINE uint32_t Atomic_Add_u32( - uint32_t volatile * pAddend, - uint32_t ulCount ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_add(pAddend, ulCount, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pAddend; - - *pAddend += ulCount; - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -/** - * Atomic subtract - * - * @brief Atomically subtracts count from the value of the specified pointer - * pointers to. - * - * @param[in,out] pAddend Pointer to memory location from where value is to be - * loaded and written back to. - * @param[in] ulCount Value to be subtract from *pAddend. - * - * @return previous *pAddend value. - */ -static portFORCE_INLINE uint32_t Atomic_Subtract_u32( - uint32_t volatile * pAddend, - uint32_t ulCount ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_sub(pAddend, ulCount, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pAddend; - - *pAddend -= ulCount; - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -/** - * Atomic increment - * - * @brief Atomically increments the value of the specified pointer points to. - * - * @param[in,out] pAddend Pointer to memory location from where value is to be - * loaded and written back to. - * - * @return *pAddend value before increment. - */ -static portFORCE_INLINE uint32_t Atomic_Increment_u32( uint32_t volatile * pAddend ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_add(pAddend, 1, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pAddend; - - *pAddend += 1; - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -/** - * Atomic decrement - * - * @brief Atomically decrements the value of the specified pointer points to - * - * @param[in,out] pAddend Pointer to memory location from where value is to be - * loaded and written back to. - * - * @return *pAddend value before decrement. - */ -static portFORCE_INLINE uint32_t Atomic_Decrement_u32( uint32_t volatile * pAddend ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_sub(pAddend, 1, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pAddend; - - *pAddend -= 1; - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -/*----------------------------- Bitwise Logical ------------------------------*/ - -/** - * Atomic OR - * - * @brief Performs an atomic OR operation on the specified values. - * - * @param [in, out] pDestination Pointer to memory location from where value is - * to be loaded and written back to. - * @param [in] ulValue Value to be ORed with *pDestination. - * - * @return The original value of *pDestination. - */ -static portFORCE_INLINE uint32_t Atomic_OR_u32( - uint32_t volatile * pDestination, - uint32_t ulValue ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_or(pDestination, ulValue, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pDestination; - - *pDestination |= ulValue; - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -/** - * Atomic AND - * - * @brief Performs an atomic AND operation on the specified values. - * - * @param [in, out] pDestination Pointer to memory location from where value is - * to be loaded and written back to. - * @param [in] ulValue Value to be ANDed with *pDestination. - * - * @return The original value of *pDestination. - */ -static portFORCE_INLINE uint32_t Atomic_AND_u32( - uint32_t volatile * pDestination, - uint32_t ulValue ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_and(pDestination, ulValue, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pDestination; - - *pDestination &= ulValue; - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -/** - * Atomic NAND - * - * @brief Performs an atomic NAND operation on the specified values. - * - * @param [in, out] pDestination Pointer to memory location from where value is - * to be loaded and written back to. - * @param [in] ulValue Value to be NANDed with *pDestination. - * - * @return The original value of *pDestination. - */ -static portFORCE_INLINE uint32_t Atomic_NAND_u32( - uint32_t volatile * pDestination, - uint32_t ulValue ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_nand(pDestination, ulValue, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pDestination; - - *pDestination = ~(ulCurrent & ulValue); - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -/** - * Atomic XOR - * - * @brief Performs an atomic XOR operation on the specified values. - * - * @param [in, out] pDestination Pointer to memory location from where value is - * to be loaded and written back to. - * @param [in] ulValue Value to be XORed with *pDestination. - * - * @return The original value of *pDestination. - */ -static portFORCE_INLINE uint32_t Atomic_XOR_u32( - uint32_t volatile * pDestination, - uint32_t ulValue ) -{ -#if defined ( configUSE_GCC_BUILTIN_ATOMICS ) && ( configUSE_GCC_BUILTIN_ATOMICS == 1 ) - - return __atomic_fetch_xor(pDestination, ulValue, __ATOMIC_SEQ_CST); - -#else - - uint32_t ulCurrent; - - ATOMIC_ENTER_CRITICAL(); - - ulCurrent = *pDestination; - - *pDestination ^= ulValue; - - ATOMIC_EXIT_CRITICAL(); - - return ulCurrent; - -#endif -} - -#ifdef __cplusplus -} -#endif - -#endif /* ATOMIC_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.c deleted file mode 100644 index d6a1d2577..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.c +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * Logging utility that allows FreeRTOS tasks to log to a UDP port, stdout, and - * disk file without making any Win32 system calls themselves. - * - * Messages logged to a UDP port are sent directly (using FreeRTOS+TCP), but as - * FreeRTOS tasks cannot make Win32 system calls messages sent to stdout or a - * disk file are sent via a stream buffer to a Win32 thread which then performs - * the actual output. - */ - -/* Standard includes. */ -#include -#include -#include -#include -#include - -/* FreeRTOS includes. */ -#include -#include "task.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_Stream_Buffer.h" - -/* Demo includes. */ -#include "demo_logging.h" - -/*-----------------------------------------------------------*/ - -/* The maximum size to which the log file may grow, before being renamed -to .ful. */ -#define dlLOGGING_FILE_SIZE ( 40ul * 1024ul * 1024ul ) - -/* Dimensions the arrays into which print messages are created. */ -#define dlMAX_PRINT_STRING_LENGTH 255 - -/* The size of the stream buffer used to pass messages from FreeRTOS tasks to -the Win32 thread that is responsible for making any Win32 system calls that are -necessary for the selected logging method. */ -#define dlLOGGING_STREAM_BUFFER_SIZE 32768 - -/* A block time of zero simply means don't block. */ -#define dlDONT_BLOCK 0 - -/*-----------------------------------------------------------*/ - -/* - * Called from vLoggingInit() to start a new disk log file. - */ -static void prvFileLoggingInit( void ); - -/* - * Attempt to write a message to the file. - */ -static void prvLogToFile( const char *pcMessage, size_t xLength ); - -/* - * Simply close the logging file, if it is open. - */ -static void prvFileClose( void ); - -/* - * Before the scheduler is started this function is called directly. After the - * scheduler has started it is called from the Windows thread dedicated to - * outputting log messages. Only the windows thread actually performs the - * writing so as not to disrupt the simulation by making Windows system calls - * from FreeRTOS tasks. - */ -static void prvLoggingFlushBuffer( void ); - -/* - * The windows thread that performs the actual writing of messages that require - * Win32 system calls. Only the windows thread can make system calls so as not - * to disrupt the simulation by making Windows calls from FreeRTOS tasks. - */ -static DWORD WINAPI prvWin32LoggingThread( void *pvParam ); - -/* - * Creates the socket to which UDP messages are sent. This function is not - * called directly to prevent the print socket being created from within the IP - * task - which could result in a deadlock. Instead the function call is - * deferred to run in the RTOS daemon task - hence it prototype. - */ -static void prvCreatePrintSocket( void *pvParameter1, uint32_t ulParameter2 ); - -/*-----------------------------------------------------------*/ - -/* Windows event used to wake the Win32 thread which performs any logging that -needs Win32 system calls. */ -static void *pvLoggingThreadEvent = NULL; - -/* Stores the selected logging targets passed in as parameters to the -vLoggingInit() function. */ -BaseType_t xStdoutLoggingUsed = pdFALSE, xDiskFileLoggingUsed = pdFALSE, xUDPLoggingUsed = pdFALSE; - -/* Circular buffer used to pass messages from the FreeRTOS tasks to the Win32 -thread that is responsible for making Win32 calls (when stdout or a disk log is -used). */ -static StreamBuffer_t *xLogStreamBuffer = NULL; - -/* Handle to the file used for logging. This is left open while there are -messages waiting to be logged, then closed again in between logs. */ -static FILE *pxLoggingFileHandle = NULL; - -/* When true prints are performed directly. After start up xDirectPrint is set -to pdFALSE - at which time prints that require Win32 system calls are done by -the Win32 thread responsible for logging. */ -BaseType_t xDirectPrint = pdTRUE; - -/* File names for the in use and complete (full) log files. */ -static const char *pcLogFileName = "RTOSDemo.log"; -static const char *pcFullLogFileName = "RTOSDemo.ful"; - -/* Keep the current file size in a variable, as an optimisation. */ -static size_t ulSizeOfLoggingFile = 0ul; - -/* The UDP socket and address on/to which print messages are sent. */ -Socket_t xPrintSocket = FREERTOS_INVALID_SOCKET; -struct freertos_sockaddr xPrintUDPAddress; - -/*-----------------------------------------------------------*/ - -void vLoggingInit( BaseType_t xLogToStdout, BaseType_t xLogToFile, BaseType_t xLogToUDP, uint32_t ulRemoteIPAddress, uint16_t usRemotePort ) -{ - /* Can only be called before the scheduler has started. */ - configASSERT( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED ); - - #if( ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) ) - { - HANDLE Win32Thread; - - /* Record which output methods are to be used. */ - xStdoutLoggingUsed = xLogToStdout; - xDiskFileLoggingUsed = xLogToFile; - xUDPLoggingUsed = xLogToUDP; - - /* If a disk file is used then initialise it now. */ - if( xDiskFileLoggingUsed != pdFALSE ) - { - prvFileLoggingInit(); - } - - /* If UDP logging is used then store the address to which the log data - will be sent - but don't create the socket yet because the network is - not initialised. */ - if( xUDPLoggingUsed != pdFALSE ) - { - /* Set the address to which the print messages are sent. */ - xPrintUDPAddress.sin_port = FreeRTOS_htons( usRemotePort ); - xPrintUDPAddress.sin_addr = ulRemoteIPAddress; - } - - /* If a disk file or stdout are to be used then Win32 system calls will - have to be made. Such system calls cannot be made from FreeRTOS tasks - so create a stream buffer to pass the messages to a Win32 thread, then - create the thread itself, along with a Win32 event that can be used to - unblock the thread. */ - if( ( xStdoutLoggingUsed != pdFALSE ) || ( xDiskFileLoggingUsed != pdFALSE ) ) - { - /* Create the buffer. */ - xLogStreamBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xLogStreamBuffer ) - sizeof( xLogStreamBuffer->ucArray ) + dlLOGGING_STREAM_BUFFER_SIZE + 1 ); - configASSERT( xLogStreamBuffer ); - memset( xLogStreamBuffer, '\0', sizeof( *xLogStreamBuffer ) - sizeof( xLogStreamBuffer->ucArray ) ); - xLogStreamBuffer->LENGTH = dlLOGGING_STREAM_BUFFER_SIZE + 1; - - /* Create the Windows event. */ - pvLoggingThreadEvent = CreateEvent( NULL, FALSE, TRUE, "StdoutLoggingEvent" ); - - /* Create the thread itself. */ - Win32Thread = CreateThread( - NULL, /* Pointer to thread security attributes. */ - 0, /* Initial thread stack size, in bytes. */ - prvWin32LoggingThread, /* Pointer to thread function. */ - NULL, /* Argument for new thread. */ - 0, /* Creation flags. */ - NULL ); - - /* Use the cores that are not used by the FreeRTOS tasks. */ - SetThreadAffinityMask( Win32Thread, ~0x01u ); - SetThreadPriorityBoost( Win32Thread, TRUE ); - SetThreadPriority( Win32Thread, THREAD_PRIORITY_IDLE ); - } - } - #else - { - /* FreeRTOSIPConfig is set such that no print messages will be output. - Avoid compiler warnings about unused parameters. */ - ( void ) xLogToStdout; - ( void ) xLogToFile; - ( void ) xLogToUDP; - ( void ) usRemotePort; - ( void ) ulRemoteIPAddress; - } - #endif /* ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) */ -} -/*-----------------------------------------------------------*/ - -static void prvCreatePrintSocket( void *pvParameter1, uint32_t ulParameter2 ) -{ -static const TickType_t xSendTimeOut = pdMS_TO_TICKS( 0 ); -Socket_t xSocket; - - /* The function prototype is that of a deferred function, but the parameters - are not actually used. */ - ( void ) pvParameter1; - ( void ) ulParameter2; - - xSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - - if( xSocket != FREERTOS_INVALID_SOCKET ) - { - /* FreeRTOS+TCP decides which port to bind to. */ - FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, &xSendTimeOut, sizeof( xSendTimeOut ) ); - FreeRTOS_bind( xSocket, NULL, 0 ); - - /* Now the socket is bound it can be assigned to the print socket. */ - xPrintSocket = xSocket; - } -} -/*-----------------------------------------------------------*/ - -void vLoggingPrintf( const char *pcFormat, ... ) -{ -char cPrintString[ dlMAX_PRINT_STRING_LENGTH ]; -char cOutputString[ dlMAX_PRINT_STRING_LENGTH ]; -char *pcSource, *pcTarget, *pcBegin; -size_t xLength, xLength2, rc; -static BaseType_t xMessageNumber = 0; -va_list args; -uint32_t ulIPAddress; -const char *pcTaskName; -const char *pcNoTask = "None"; -int iOriginalPriority; -HANDLE xCurrentTask; - - - if( ( xStdoutLoggingUsed != pdFALSE ) || ( xDiskFileLoggingUsed != pdFALSE ) || ( xUDPLoggingUsed != pdFALSE ) ) - { - /* There are a variable number of parameters. */ - va_start( args, pcFormat ); - - /* Additional info to place at the start of the log. */ - if( xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED ) - { - pcTaskName = pcTaskGetName( NULL ); - } - else - { - pcTaskName = pcNoTask; - } - - if( strcmp( pcFormat, "\n" ) != 0 ) - { - xLength = snprintf( cPrintString, dlMAX_PRINT_STRING_LENGTH, "%lu %lu [%s] ", - xMessageNumber++, - ( unsigned long ) xTaskGetTickCount(), - pcTaskName ); - } - else - { - xLength = 0; - memset( cPrintString, 0x00, dlMAX_PRINT_STRING_LENGTH ); - } - - xLength2 = vsnprintf( cPrintString + xLength, dlMAX_PRINT_STRING_LENGTH - xLength, pcFormat, args ); - - if( xLength2 < 0 ) - { - /* Clean up. */ - xLength2 = dlMAX_PRINT_STRING_LENGTH - 1 - xLength; - cPrintString[ dlMAX_PRINT_STRING_LENGTH - 1 ] = '\0'; - } - - xLength += xLength2; - va_end( args ); - - /* For ease of viewing, copy the string into another buffer, converting - IP addresses to dot notation on the way. */ - pcSource = cPrintString; - pcTarget = cOutputString; - - while( ( *pcSource ) != '\0' ) - { - *pcTarget = *pcSource; - pcTarget++; - pcSource++; - - /* Look forward for an IP address denoted by 'ip'. */ - if( ( isxdigit( pcSource[ 0 ] ) != pdFALSE ) && ( pcSource[ 1 ] == 'i' ) && ( pcSource[ 2 ] == 'p' ) ) - { - *pcTarget = *pcSource; - pcTarget++; - *pcTarget = '\0'; - pcBegin = pcTarget - 8; - - while( ( pcTarget > pcBegin ) && ( isxdigit( pcTarget[ -1 ] ) != pdFALSE ) ) - { - pcTarget--; - } - - sscanf( pcTarget, "%8X", &ulIPAddress ); - rc = sprintf( pcTarget, "%lu.%lu.%lu.%lu", - ( unsigned long ) ( ulIPAddress >> 24UL ), - ( unsigned long ) ( (ulIPAddress >> 16UL) & 0xffUL ), - ( unsigned long ) ( (ulIPAddress >> 8UL) & 0xffUL ), - ( unsigned long ) ( ulIPAddress & 0xffUL ) ); - pcTarget += rc; - pcSource += 3; /* skip "ip" */ - } - } - - /* How far through the buffer was written? */ - xLength = ( BaseType_t ) ( pcTarget - cOutputString ); - - /* If the message is to be logged to a UDP port then it can be sent directly - because it only uses FreeRTOS function (not Win32 functions). */ - if( xUDPLoggingUsed != pdFALSE ) - { - if( ( xPrintSocket == FREERTOS_INVALID_SOCKET ) && ( FreeRTOS_IsNetworkUp() != pdFALSE ) ) - { - /* Create and bind the socket to which print messages are sent. The - xTimerPendFunctionCall() function is used even though this is - not an interrupt because this function is called from the IP task - and the IP task cannot itself wait for a socket to bind. The - parameters to prvCreatePrintSocket() are not required so set to - NULL or 0. */ - xTimerPendFunctionCall( prvCreatePrintSocket, NULL, 0, dlDONT_BLOCK ); - } - - if( xPrintSocket != FREERTOS_INVALID_SOCKET ) - { - FreeRTOS_sendto( xPrintSocket, cOutputString, xLength, 0, &xPrintUDPAddress, sizeof( xPrintUDPAddress ) ); - - /* Just because the UDP data logger I'm using is dumb. */ - FreeRTOS_sendto( xPrintSocket, "\r", sizeof( char ), 0, &xPrintUDPAddress, sizeof( xPrintUDPAddress ) ); - } - } - - /* If logging is also to go to either stdout or a disk file then it cannot - be output here - so instead write the message to the stream buffer and wake - the Win32 thread which will read it from the stream buffer and perform the - actual output. */ - if( ( xStdoutLoggingUsed != pdFALSE ) || ( xDiskFileLoggingUsed != pdFALSE ) ) - { - configASSERT( xLogStreamBuffer ); - - /* How much space is in the buffer? */ - xLength2 = uxStreamBufferGetSpace( xLogStreamBuffer ); - - /* There must be enough space to write both the string and the length of - the string. */ - if( xLength2 >= ( xLength + sizeof( xLength ) ) ) - { - /* First write in the length of the data, then write in the data - itself. Raising the thread priority is used as a critical section - as there are potentially multiple writers. The stream buffer is - only thread safe when there is a single writer (likewise for - reading from the buffer). */ - xCurrentTask = GetCurrentThread(); - iOriginalPriority = GetThreadPriority( xCurrentTask ); - SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL ); - uxStreamBufferAdd( xLogStreamBuffer, 0, ( const uint8_t * ) &( xLength ), sizeof( xLength ) ); - uxStreamBufferAdd( xLogStreamBuffer, 0, ( const uint8_t * ) cOutputString, xLength ); - SetThreadPriority( GetCurrentThread(), iOriginalPriority ); - } - - /* xDirectPrint is initialised to pdTRUE, and while it remains true the - logging output function is called directly. When the system is running - the output function cannot be called directly because it would get - called from both FreeRTOS tasks and Win32 threads - so instead wake the - Win32 thread responsible for the actual output. */ - if( xDirectPrint != pdFALSE ) - { - /* While starting up, the thread which calls prvWin32LoggingThread() - is not running yet and xDirectPrint will be pdTRUE. */ - prvLoggingFlushBuffer(); - } - else if( pvLoggingThreadEvent != NULL ) - { - /* While running, wake up prvWin32LoggingThread() to send the - logging data. */ - SetEvent( pvLoggingThreadEvent ); - } - } - } -} -/*-----------------------------------------------------------*/ - -static void prvLoggingFlushBuffer( void ) -{ -size_t xLength; -char cPrintString[ dlMAX_PRINT_STRING_LENGTH ]; - - /* Is there more than the length value stored in the circular buffer - used to pass data from the FreeRTOS simulator into this Win32 thread? */ - while( uxStreamBufferGetSize( xLogStreamBuffer ) > sizeof( xLength ) ) - { - memset( cPrintString, 0x00, dlMAX_PRINT_STRING_LENGTH ); - uxStreamBufferGet( xLogStreamBuffer, 0, ( uint8_t * ) &xLength, sizeof( xLength ), pdFALSE ); - uxStreamBufferGet( xLogStreamBuffer, 0, ( uint8_t * ) cPrintString, xLength, pdFALSE ); - - /* Write the message to standard out if requested to do so when - vLoggingInit() was called, or if the network is not yet up. */ - if( ( xStdoutLoggingUsed != pdFALSE ) || ( FreeRTOS_IsNetworkUp() == pdFALSE ) ) - { - /* Write the message to stdout. */ - printf( "%s", cPrintString ); /*_RB_ Replace with _write(). */ - } - - /* Write the message to a file if requested to do so when - vLoggingInit() was called. */ - if( xDiskFileLoggingUsed != pdFALSE ) - { - prvLogToFile( cPrintString, xLength ); - } - } - - prvFileClose(); -} -/*-----------------------------------------------------------*/ - -static DWORD WINAPI prvWin32LoggingThread( void *pvParameter ) -{ -const DWORD xMaxWait = 1000; - - ( void ) pvParameter; - - /* From now on, prvLoggingFlushBuffer() will only be called from this - Windows thread */ - xDirectPrint = pdFALSE; - - for( ;; ) - { - /* Wait to be told there are message waiting to be logged. */ - WaitForSingleObject( pvLoggingThreadEvent, xMaxWait ); - - /* Write out all waiting messages. */ - prvLoggingFlushBuffer(); - } -} -/*-----------------------------------------------------------*/ - -static void prvFileLoggingInit( void ) -{ -FILE *pxHandle = fopen( pcLogFileName, "a" ); - - if( pxHandle != NULL ) - { - fseek( pxHandle, SEEK_END, 0ul ); - ulSizeOfLoggingFile = ftell( pxHandle ); - fclose( pxHandle ); - } - else - { - ulSizeOfLoggingFile = 0ul; - } -} -/*-----------------------------------------------------------*/ - -static void prvFileClose( void ) -{ - if( pxLoggingFileHandle != NULL ) - { - fclose( pxLoggingFileHandle ); - pxLoggingFileHandle = NULL; - } -} -/*-----------------------------------------------------------*/ - -static void prvLogToFile( const char *pcMessage, size_t xLength ) -{ - if( pxLoggingFileHandle == NULL ) - { - pxLoggingFileHandle = fopen( pcLogFileName, "a" ); - } - - if( pxLoggingFileHandle != NULL ) - { - fwrite( pcMessage, 1, xLength, pxLoggingFileHandle ); - ulSizeOfLoggingFile += xLength; - - /* If the file has grown to its maximum permissible size then close and - rename it - then start with a new file. */ - if( ulSizeOfLoggingFile > ( size_t ) dlLOGGING_FILE_SIZE ) - { - prvFileClose(); - if( _access( pcFullLogFileName, 00 ) == 0 ) - { - remove( pcFullLogFileName ); - } - rename( pcLogFileName, pcFullLogFileName ); - ulSizeOfLoggingFile = 0; - } - } -} -/*-----------------------------------------------------------*/ - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.h deleted file mode 100644 index 62ae46a52..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/demo_logging.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef DEMO_LOGGING_H -#define DEMO_LOGGING_H - -/* - * Initialise a logging system that can be used from FreeRTOS tasks and Win32 - * threads. Do not call printf() directly while the scheduler is running. - * - * Set xLogToStdout, xLogToFile and xLogToUDP to either pdTRUE or pdFALSE to - * lot to stdout, a disk file and a UDP port respectively. - * - * If xLogToUDP is pdTRUE then ulRemoteIPAddress and usRemotePort must be set - * to the IP address and port number to which UDP log messages will be sent. - */ -void vLoggingInit( BaseType_t xLogToStdout, - BaseType_t xLogToFile, - BaseType_t xLogToUDP, - uint32_t ulRemoteIPAddress, - uint16_t usRemotePort ); - -#endif /* DEMO_LOGGING_H */ - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config.h deleted file mode 100644 index 8a06baac5..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* This file contains configuration settings for the demos. */ - -#ifndef IOT_CONFIG_H_ -#define IOT_CONFIG_H_ - - -/** - * @brief The number of recyclable jobs for the task pool to cache. - * - * Caching dynamically allocated jobs (recyclable jobs) helps the application - * to limit the number of allocations at runtime. Caching recyclable jobs may - * help making the application more responsive and predictable, by removing a - * potential for memory allocation failures, but it may also have negative - * repercussions on the amount of memory available at any given time. It is up - * to the application developer to strike the correct balance among these - * competing needs. The task pool will cache a job when the application calls - * IotTaskPool_RecycleJob on a job which was created using - * IotTaskPool_CreateRecyclableJob API. Any recycled jobs in excess of - * IOT_TASKPOOL_JOBS_RECYCLE_LIMIT will be destroyed and its memory will be - * released. - * - * Default value (if undefined): 8 - */ -#define IOT_TASKPOOL_JOBS_RECYCLE_LIMIT 8 - -/** - * @brief Enable/Disable asserts for the task pool library. - * - * Set this to 1 to perform sanity checks when using the task pool library. - * Asserts are useful for debugging, but should be disabled in production code. - * If this is set to 1, IotTaskPool_Assert can be defined to set the assertion - * function; otherwise, the standard library's assert function will be used. - * - * Possible values: 0 (asserts disabled) or 1 (asserts enabled) - * Recommended values: 1 when debugging; 0 in production code. - * Default value (if undefined): 0 - */ -#define IOT_TASKPOOL_ENABLE_ASSERTS 1 - -/** - * @brief The numer of worker tasks in the task pool. - * - * The full IoT Task Pool Library has many use cases, including Linux - * development. Typical FreeRTOS use cases do not require the full - * functionality so an optimized implementation is provided specifically for use - * with FreeRTOS. The optimized version has a fixed number of tasks in the - * task pool, each of which uses statically allocated memory to ensure creation - * of the task pool is guaranteed (it does not run out of heap space). - */ -#define IOT_TASKPOOL_NUMBER_OF_WORKERS 3 - -/* - * @brief Set the log level of the task pool library. - * - * Log messages from the task pool library at or below this setting will be - * printed. - * - * Possible values: One of the Log levels. - * Default value (if undefined): IOT_LOG_LEVEL_GLOBAL; if that is undefined, - * then IOT_LOG_NONE. - */ -#define IOT_LOG_LEVEL_TASKPOOL IOT_LOG_WARN - - -/** - * @brief The stack size (in bytes) for each worker task in the task pool. - * - * The minimal version of the of task pool library only supports one task pool - * and the configuration of each worker task fixed at the compile time. - */ -#define IOT_TASKPOOL_WORKER_STACK_SIZE_BYTES 2048 - -/** - * @brief The amount of time the MQTT library waits for responses (PINGRESPs or - * PUBACKs) from the MQTT broker. - */ -#define IOT_MQTT_RESPONSE_WAIT_MS ( 10000 ) - -/** - * @brief Enable/Disable anonymous metrics collection when using AWS IoT. - * - * This demo does not use TLS and so does not work with AWS IoT. Therefore, - * the metric collection must be disabled. - */ -#define AWS_IOT_MQTT_ENABLE_METRICS 0 - -/** - * @brief Set the log level of the MQTT library. - * - * Log messages from the MQTT library at or below this setting will be printed. - * - * Possible values: One of the Log levels. - * Default value (if undefined): IOT_LOG_LEVEL_GLOBAL; if that is undefined, - * then IOT_LOG_NONE. - */ -#define IOT_LOG_LEVEL_MQTT IOT_LOG_WARN - -/* Include the common configuration file for FreeRTOS. */ -#include "iot_config_common.h" - -#endif /* ifndef IOT_CONFIG_H_ */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config_common.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config_common.h deleted file mode 100644 index 8d39bac4f..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config_common.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Amazon FreeRTOS V201906.00 Major - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* This file contains default configuration settings for the demos on FreeRTOS. */ - -#ifndef IOT_CONFIG_COMMON_H_ -#define IOT_CONFIG_COMMON_H_ - -/* FreeRTOS include. */ -#include "FreeRTOS.h" //_RB_Makes common config file FreeRTOS specific - -/* Use platform types on FreeRTOS. */ -#include "platform/iot_platform_types_freertos.h" //_RB_Makes common config file FreeRTOS specific - -/* SDK version. */ -#define IOT_SDK_VERSION "4.0.0" - -/* This config file is for the demos; disable any test code. */ -#define IOT_BUILD_TESTS ( 0 ) - -/* Logging puts function. */ -#define IotLogging_Puts( str ) configPRINTF( ( "%s\r\n", str ) ) - -/* Enable asserts in libraries by default. */ -#ifndef IOT_METRICS_ENABLE_ASSERTS - #define IOT_METRICS_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_CONTAINERS_ENABLE_ASSERTS - #define IOT_CONTAINERS_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_TASKPOOL_ENABLE_ASSERTS - #define IOT_TASKPOOL_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_MQTT_ENABLE_ASSERTS - #define IOT_MQTT_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef AWS_IOT_SHADOW_ENABLE_ASSERTS - #define AWS_IOT_SHADOW_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef AWS_IOT_DEFENDER_ENABLE_ASSERTS - #define AWS_IOT_DEFENDER_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_BLE_ENABLE_ASSERTS - #define IOT_BLE_ENABLE_ASSERTS ( 1 ) -#endif - -/* Assert functions. */ -#define IotMetrics_Assert( expression ) configASSERT( expression ) -#define IotContainers_Assert( expression ) configASSERT( expression ) -#define IotTaskPool_Assert( expression ) configASSERT( expression ) -#define IotMqtt_Assert( expression ) configASSERT( expression ) -#define AwsIotShadow_Assert( expression ) configASSERT( expression ) -#define AwsIotDefender_Assert( expression ) configASSERT( expression ) -#define IotBle_Assert( expression ) configASSERT( expression ) - -/* Control the usage of dynamic memory allocation. */ -#ifndef IOT_STATIC_MEMORY_ONLY - #define IOT_STATIC_MEMORY_ONLY ( 0 ) -#endif - -/* Memory allocation configuration. Note that these functions will not be affected - * by IOT_STATIC_MEMORY_ONLY. */ -#define IotNetwork_Malloc pvPortMalloc -#define IotNetwork_Free vPortFree -#define IotThreads_Malloc pvPortMalloc -#define IotThreads_Free vPortFree -#define IotLogging_Malloc pvPortMalloc -#define IotLogging_Free vPortFree -#define IotBle_Malloc pvPortMalloc -#define IotBle_Free vPortFree -/* #define IotLogging_StaticBufferSize */ - -/* Memory allocation function configuration for the MQTT and Defender library. - * These libraries will be affected by IOT_STATIC_MEMORY_ONLY. */ -#if IOT_STATIC_MEMORY_ONLY == 0 - #define IotMetrics_MallocTcpConnection pvPortMalloc - #define IotMetrics_FreeTcpConnection vPortFree - #define IotMetrics_MallocIpAddress pvPortMalloc - #define IotMetrics_FreeIpAddress vPortFree - - #define IotTaskPool_MallocTaskPool pvPortMalloc - #define IotTaskPool_FreeTaskPool vPortFree - #define IotTaskPool_MallocJob pvPortMalloc - #define IotTaskPool_FreeJob vPortFree - #define IotTaskPool_MallocTimerEvent pvPortMalloc - #define IotTaskPool_FreeTimerEvent vPortFree - - #define IotMqtt_MallocConnection pvPortMalloc - #define IotMqtt_FreeConnection vPortFree - #define IotMqtt_MallocMessage pvPortMalloc - #define IotMqtt_FreeMessage vPortFree - #define IotMqtt_MallocOperation pvPortMalloc - #define IotMqtt_FreeOperation vPortFree - #define IotMqtt_MallocSubscription pvPortMalloc - #define IotMqtt_FreeSubscription vPortFree - - #define IotSerializer_MallocCborEncoder pvPortMalloc - #define IotSerializer_FreeCborEncoder vPortFree - #define IotSerializer_MallocCborParser pvPortMalloc - #define IotSerializer_FreeCborParser vPortFree - #define IotSerializer_MallocCborValue pvPortMalloc - #define IotSerializer_FreeCborValue vPortFree - #define IotSerializer_MallocDecoderObject pvPortMalloc - #define IotSerializer_FreeDecoderObject vPortFree - - #define AwsIotShadow_MallocOperation pvPortMalloc - #define AwsIotShadow_FreeOperation vPortFree - #define AwsIotShadow_MallocString pvPortMalloc - #define AwsIotShadow_FreeString vPortFree - #define AwsIotShadow_MallocSubscription pvPortMalloc - #define AwsIotShadow_FreeSubscription vPortFree - - #define AwsIotDefender_MallocReport pvPortMalloc - #define AwsIotDefender_FreeReport vPortFree - #define AwsIotDefender_MallocTopic pvPortMalloc - #define AwsIotDefender_FreeTopic vPortFree -#endif /* if IOT_STATIC_MEMORY_ONLY == 0 */ - -/* Default platform thread stack size and priority. */ -#ifndef IOT_THREAD_DEFAULT_STACK_SIZE - #define IOT_THREAD_DEFAULT_STACK_SIZE 2048 -#endif -#ifndef IOT_THREAD_DEFAULT_PRIORITY - #define IOT_THREAD_DEFAULT_PRIORITY tskIDLE_PRIORITY -#endif - -/* Platform network configuration. */ -#ifndef IOT_NETWORK_RECEIVE_TASK_PRIORITY - #define IOT_NETWORK_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#endif -#ifndef IOT_NETWORK_RECEIVE_TASK_STACK_SIZE - #define IOT_NETWORK_RECEIVE_TASK_STACK_SIZE IOT_THREAD_DEFAULT_STACK_SIZE -#endif - -/* Platform and SDK name for AWS IoT MQTT metrics. Only used when - * AWS_IOT_MQTT_ENABLE_METRICS is 1. */ -#define IOT_SDK_NAME "AmazonFreeRTOS" -#ifdef configPLATFORM_NAME - #define IOT_PLATFORM_NAME configPLATFORM_NAME -#else - #define IOT_PLATFORM_NAME "Unknown" -#endif - -/* Cloud endpoint to which the device connects to. */ -#define IOT_CLOUD_ENDPOINT clientcredentialMQTT_BROKER_ENDPOINT - -/** - * @brief Unique identifier used to recognize a device by the cloud. - * This could be SHA-256 of the device certificate. - */ -extern const char *getDeviceIdentifier( void ); -#define IOT_DEVICE_IDENTIFIER getDeviceIdentifier() - -/** - * @brief Metrics emitted by the device. - */ -extern const char *getDeviceMetrics( void ); -#define AWS_IOT_METRICS_USERNAME getDeviceMetrics() - -/** - * @brief Length of the metrics emitted by device. - */ -extern uint16_t getDeviceMetricsLength( void ); -#define AWS_IOT_METRICS_USERNAME_LENGTH getDeviceMetricsLength() - -/* Define the data type of metrics connection id as same as Socket_t in aws_secure_socket.h */ -#define IotMetricsConnectionId_t void * - -/* Configuration for defender demo: set format to CBOR. */ -#define AWS_IOT_DEFENDER_FORMAT AWS_IOT_DEFENDER_FORMAT_CBOR - -/* Configuration for defender demo: use long tag for readable output. Please use short tag for the real application. */ -#define AWS_IOT_DEFENDER_USE_LONG_TAG ( 1 ) - -/* Demo runner configuration. */ -//_RB_#include "aws_demo_config.h" - -#endif /* ifndef IOT_CONFIG_COMMON_H_ */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_secure_sockets_config.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_secure_sockets_config.h deleted file mode 100644 index 6442e8de2..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_secure_sockets_config.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Amazon FreeRTOS V1.4.7 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/** - * @file aws_secure_sockets_config.h - * @brief Secure sockets configuration options. - */ - -#ifndef _AWS_SECURE_SOCKETS_CONFIG_H_ -#define _AWS_SECURE_SOCKETS_CONFIG_H_ - -/** - * @brief Byte order of the target MCU. - * - * Valid values are pdLITTLE_ENDIAN and pdBIG_ENDIAN. - */ -#define socketsconfigBYTE_ORDER pdLITTLE_ENDIAN - -/** - * @brief Default socket send timeout. - */ -#define socketsconfigDEFAULT_SEND_TIMEOUT ( 10000 ) - -/** - * @brief Default socket receive timeout. - */ -#define socketsconfigDEFAULT_RECV_TIMEOUT ( 10000 ) - -/** - * @brief Enable metrics of secure socket. - */ -#define AWS_IOT_SECURE_SOCKETS_METRICS_ENABLED ( 0 ) - -#endif /* _AWS_SECURE_SOCKETS_CONFIG_H_ */ \ No newline at end of file diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/main.c deleted file mode 100644 index f2f8eb5a2..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/main.c +++ /dev/null @@ -1,364 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - - /*** - * See https://www.FreeRTOS.org/mqtt/index.html for configuration and usage instructions. - ***/ - -/* Standard includes. */ -#include -#include - -/* Visual studio intrinsics used so the __debugbreak() function is available -should an assert get hit. */ -#include - -/* FreeRTOS includes. */ -#include -#include "task.h" - -/* TCP/IP stack includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" - -/* Demo app includes. */ -#include "demo_logging.h" - -/* - * Prototypes for the demos that can be started from this project. Note the - * MQTT demo is not actually started until the network is already, which is - * indicated by vApplicationIPNetworkEventHook() executing - hence - * prvStartSimpleMQTTDemo() is called from inside vApplicationIPNetworkEventHook(). - */ -extern void vStartSimpleMQTTDemo( void ); - -/* - * Just seeds the simple pseudo random number generator. - * - * !!! NOTE !!! - * This is not a secure method of generating random numbers and production - * devices should use a true random number generator (TRNG). - */ -static void prvSRand( UBaseType_t ulSeed ); - -/* - * Miscellaneous initialisation including preparing the logging and seeding the - * random number generator. - */ -static void prvMiscInitialisation( void ); - -/* The default IP and MAC address used by the demo. The address configuration -defined here will be used if ipconfigUSE_DHCP is 0, or if ipconfigUSE_DHCP is -1 but a DHCP server could not be contacted. See the online documentation for -more information. */ -static const uint8_t ucIPAddress[ 4 ] = { configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 }; -static const uint8_t ucNetMask[ 4 ] = { configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 }; -static const uint8_t ucGatewayAddress[ 4 ] = { configGATEWAY_ADDR0, configGATEWAY_ADDR1, configGATEWAY_ADDR2, configGATEWAY_ADDR3 }; -static const uint8_t ucDNSServerAddress[ 4 ] = { configDNS_SERVER_ADDR0, configDNS_SERVER_ADDR1, configDNS_SERVER_ADDR2, configDNS_SERVER_ADDR3 }; - -/* Set the following constant to pdTRUE to log using the method indicated by the -name of the constant, or pdFALSE to not log using the method indicated by the -name of the constant. Options include to standard out (xLogToStdout), to a disk -file (xLogToFile), and to a UDP port (xLogToUDP). If xLogToUDP is set to pdTRUE -then UDP messages are sent to the IP address configured as the echo server -address (see the configECHO_SERVER_ADDR0 definitions in FreeRTOSConfig.h) and -the port number set by configPRINT_PORT in FreeRTOSConfig.h. */ -const BaseType_t xLogToStdout = pdTRUE, xLogToFile = pdFALSE, xLogToUDP = pdFALSE; - -/* Default MAC address configuration. The demo creates a virtual network -connection that uses this MAC address by accessing the raw Ethernet data -to and from a real network connection on the host PC. See the -configNETWORK_INTERFACE_TO_USE definition for information on how to configure -the real network connection to use. */ -const uint8_t ucMACAddress[ 6 ] = { configMAC_ADDR0, configMAC_ADDR1, configMAC_ADDR2, configMAC_ADDR3, configMAC_ADDR4, configMAC_ADDR5 }; - -/* Use by the pseudo random number generator. */ -static UBaseType_t ulNextRand; -/*-----------------------------------------------------------*/ - -int main( void ) -{ - /*** - * See https://www.FreeRTOS.org/mqtt/index.html for configuration and usage instructions. - ***/ - - /* Miscellaneous initialisation including preparing the logging and seeding - the random number generator. */ - prvMiscInitialisation(); - - /* Initialise the network interface. - - ***NOTE*** Tasks that use the network are created in the network event hook - when the network is connected and ready for use (see the implementation of - vApplicationIPNetworkEventHook() below). The address values passed in here - are used if ipconfigUSE_DHCP is set to 0, or if ipconfigUSE_DHCP is set to 1 - but a DHCP server cannot be contacted. */ - FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress ); - - /* Start the RTOS scheduler. */ - vTaskStartScheduler(); - - /* If all is well, the scheduler will now be running, and the following - line will never be reached. If the following line does execute, then - there was insufficient FreeRTOS heap memory available for the idle and/or - timer tasks to be created. See the memory management section on the - FreeRTOS web site for more details (this is standard text that is not not - really applicable to the Win32 simulator port). */ - for( ;; ) - { - __debugbreak(); - } -} -/*-----------------------------------------------------------*/ - -/* Called by FreeRTOS+TCP when the network connects or disconnects. Disconnect -events are only received if implemented in the MAC driver. */ -void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent ) -{ -uint32_t ulIPAddress, ulNetMask, ulGatewayAddress, ulDNSServerAddress; -char cBuffer[ 16 ]; -static BaseType_t xTasksAlreadyCreated = pdFALSE; - - /* If the network has just come up...*/ - if( eNetworkEvent == eNetworkUp ) - { - /* Create the tasks that use the IP stack if they have not already been - created. */ - if( xTasksAlreadyCreated == pdFALSE ) - { - /* Demos that use the nextwork are created after the nextwork is - up. */ - vStartSimpleMQTTDemo(); - xTasksAlreadyCreated = pdTRUE; - } - - /* Print out the network configuration, which may have come from a DHCP - server. */ - FreeRTOS_GetAddressConfiguration( &ulIPAddress, &ulNetMask, &ulGatewayAddress, &ulDNSServerAddress ); - FreeRTOS_inet_ntoa( ulIPAddress, cBuffer ); - FreeRTOS_printf( ( "\r\n\r\nIP Address: %s\r\n", cBuffer ) );/*_RB_ Should use IoT libraries logging. */ - - FreeRTOS_inet_ntoa( ulNetMask, cBuffer ); - FreeRTOS_printf( ( "Subnet Mask: %s\r\n", cBuffer ) ); - - FreeRTOS_inet_ntoa( ulGatewayAddress, cBuffer ); - FreeRTOS_printf( ( "Gateway Address: %s\r\n", cBuffer ) ); - - FreeRTOS_inet_ntoa( ulDNSServerAddress, cBuffer ); - FreeRTOS_printf( ( "DNS Server Address: %s\r\n\r\n\r\n", cBuffer ) ); - } -} -/*-----------------------------------------------------------*/ - -void vAssertCalled( const char *pcFile, uint32_t ulLine ) -{ - volatile uint32_t ulBlockVariable = 0UL; - volatile char *pcFileName = ( volatile char * ) pcFile; - volatile uint32_t ulLineNumber = ulLine; - - ( void ) pcFileName; - ( void ) ulLineNumber; - - printf( "vAssertCalled( %s, %u\n", pcFile, ulLine ); - - /* Setting ulBlockVariable to a non-zero value in the debugger will allow - this function to be exited. */ - taskDISABLE_INTERRUPTS(); - { - while( ulBlockVariable == 0UL ) - { - __debugbreak(); - } - } - taskENABLE_INTERRUPTS(); -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxRand( void ) -{ -const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL; - - /* - * Utility function to generate a pseudo random number. - * - * !!!NOTE!!! - * This is not a secure method of generating a random number. Production - * devices should use a True Random Number Generator (TRNG). - */ - ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement; - return( ( int ) ( ulNextRand >> 16UL ) & 0x7fffUL ); -} -/*-----------------------------------------------------------*/ - -static void prvSRand( UBaseType_t ulSeed ) -{ - /* Utility function to seed the pseudo random number generator. */ - ulNextRand = ulSeed; -} -/*-----------------------------------------------------------*/ - -static void prvMiscInitialisation( void ) -{ -time_t xTimeNow; -uint32_t ulLoggingIPAddress; - - ulLoggingIPAddress = FreeRTOS_inet_addr_quick( configECHO_SERVER_ADDR0, configECHO_SERVER_ADDR1, configECHO_SERVER_ADDR2, configECHO_SERVER_ADDR3 ); - vLoggingInit( xLogToStdout, xLogToFile, xLogToUDP, ulLoggingIPAddress, configPRINT_PORT ); - - /* - * Seed random number generator. - * - * !!!NOTE!!! - * This is not a secure method of generating a random number. Production - * devices should use a True Random Number Generator (TRNG). - */ - time( &xTimeNow ); - FreeRTOS_debug_printf( ( "Seed for randomiser: %lu\n", xTimeNow ) ); - prvSRand( ( uint32_t ) xTimeNow ); - FreeRTOS_debug_printf( ( "Random numbers: %08X %08X %08X %08X\n", ipconfigRAND32(), ipconfigRAND32(), ipconfigRAND32(), ipconfigRAND32() ) ); -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_NBNS != 0 ) || ( ipconfigDHCP_REGISTER_HOSTNAME == 1 ) - - const char *pcApplicationHostnameHook( void ) - { - /* Assign the name "FreeRTOS" to this network node. This function will - be called during the DHCP: the machine will be registered with an IP - address plus this name. */ - return mainHOST_NAME; - } - -#endif -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_NBNS != 0 ) - - BaseType_t xApplicationDNSQueryHook( const char *pcName ) - { - BaseType_t xReturn; - - /* Determine if a name lookup is for this node. Two names are given - to this node: that returned by pcApplicationHostnameHook() and that set - by mainDEVICE_NICK_NAME. */ - if( _stricmp( pcName, pcApplicationHostnameHook() ) == 0 ) - { - xReturn = pdPASS; - } - else if( _stricmp( pcName, mainDEVICE_NICK_NAME ) == 0 ) - { - xReturn = pdPASS; - } - else - { - xReturn = pdFAIL; - } - - return xReturn; - } - -#endif -/*-----------------------------------------------------------*/ - -/* - * Callback that provides the inputs necessary to generate a randomized TCP - * Initial Sequence Number per RFC 6528. THIS IS ONLY A DUMMY IMPLEMENTATION - * THAT RETURNS A PSEUDO RANDOM NUMBER SO IS NOT INTENDED FOR USE IN PRODUCTION - * SYSTEMS. - */ -extern uint32_t ulApplicationGetNextSequenceNumber( uint32_t ulSourceAddress, - uint16_t usSourcePort, - uint32_t ulDestinationAddress, - uint16_t usDestinationPort ) -{ - ( void ) ulSourceAddress; - ( void ) usSourcePort; - ( void ) ulDestinationAddress; - ( void ) usDestinationPort; - - return uxRand(); -} -/*-----------------------------------------------------------*/ - -/* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an -implementation of vApplicationGetIdleTaskMemory() to provide the memory that is -used by the Idle task. */ -void vApplicationGetIdleTaskMemory( StaticTask_t** ppxIdleTaskTCBBuffer, StackType_t** ppxIdleTaskStackBuffer, uint32_t* pulIdleTaskStackSize ) -{ - /* If the buffers to be provided to the Idle task are declared inside this - function then they must be declared static - otherwise they will be allocated on - the stack and so not exists after this function exits. */ - static StaticTask_t xIdleTaskTCB; - static StackType_t uxIdleTaskStack[configMINIMAL_STACK_SIZE]; - - /* Pass out a pointer to the StaticTask_t structure in which the Idle task's - state will be stored. */ - *ppxIdleTaskTCBBuffer = &xIdleTaskTCB; - - /* Pass out the array that will be used as the Idle task's stack. */ - *ppxIdleTaskStackBuffer = uxIdleTaskStack; - - /* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer. - Note that, as the array is necessarily of type StackType_t, - configMINIMAL_STACK_SIZE is specified in words, not bytes. */ - *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; -} -/*-----------------------------------------------------------*/ - -/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the -application must provide an implementation of vApplicationGetTimerTaskMemory() -to provide the memory that is used by the Timer service task. */ -void vApplicationGetTimerTaskMemory( StaticTask_t** ppxTimerTaskTCBBuffer, StackType_t** ppxTimerTaskStackBuffer, uint32_t* pulTimerTaskStackSize ) -{ - /* If the buffers to be provided to the Timer task are declared inside this - function then they must be declared static - otherwise they will be allocated on - the stack and so not exists after this function exits. */ - static StaticTask_t xTimerTaskTCB; - static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH]; - - /* Pass out a pointer to the StaticTask_t structure in which the Timer - task's state will be stored. */ - *ppxTimerTaskTCBBuffer = &xTimerTaskTCB; - - /* Pass out the array that will be used as the Timer task's stack. */ - *ppxTimerTaskStackBuffer = uxTimerTaskStack; - - /* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer. - Note that, as the array is necessarily of type StackType_t, - configMINIMAL_STACK_SIZE is specified in words, not bytes. */ - *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; -} -/*-----------------------------------------------------------*/ - - - - - - - - - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_demo.sln b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_demo.sln deleted file mode 100644 index b362f36c5..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/mqtt_demo.sln +++ /dev/null @@ -1,23 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RTOSDemo", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}" -EndProject -Global - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = FreeRTOS_Plus_TCP_Minimal.vsmdi - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.Build.0 = Debug|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Release|Win32.ActiveCfg = Release|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/printf-stdarg.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/printf-stdarg.c deleted file mode 100644 index 5505535c1..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/printf-stdarg.c +++ /dev/null @@ -1,667 +0,0 @@ -/* - Copyright 2001, 2002 Georges Menie (www.menie.org) - stdarg version contributed by Christian Ettinger - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Changes for the FreeRTOS ports: - - - The dot in "%-8.8s" - - The specifiers 'l' (long) and 'L' (long long) - - The specifier 'u' for unsigned - - Dot notation for IP addresses: - sprintf("IP = %xip\n", 0xC0A80164); - will produce "IP = 192.168.1.100\n" -*/ - -#include -#include -#include -#include - -#include "FreeRTOS.h" - -#define PAD_RIGHT 1 -#define PAD_ZERO 2 - -/* - * Return 1 for readable, 2 for writeable, 3 for both. - * Function must be provided by the application. - */ -extern BaseType_t xApplicationMemoryPermissions( uint32_t aAddress ); - -extern void vOutputChar( const char cChar, const TickType_t xTicksToWait ); -static const TickType_t xTicksToWait = pdMS_TO_TICKS( 20 ); - -struct xPrintFlags -{ - int base; - int width; - int printLimit; - unsigned - pad : 8, - letBase : 8, - isSigned : 1, - isNumber : 1, - long32 : 1, - long64 : 1; -}; - -struct SStringBuf -{ - char *str; - const char *orgStr; - const char *nulPos; - int curLen; - struct xPrintFlags flags; -}; - -static void strbuf_init( struct SStringBuf *apStr, char *apBuf, const char *apMaxStr ) -{ - apStr->str = apBuf; - apStr->orgStr = apBuf; - apStr->nulPos = apMaxStr-1; - apStr->curLen = 0; - - memset( &apStr->flags, '\0', sizeof( apStr->flags ) ); -} -/*-----------------------------------------------------------*/ - -static BaseType_t strbuf_printchar( struct SStringBuf *apStr, int c ) -{ - if( apStr->str == NULL ) - { - vOutputChar( ( char ) c, xTicksToWait ); - apStr->curLen++; - return pdTRUE; - } - if( apStr->str < apStr->nulPos ) - { - *( apStr->str++ ) = c; - apStr->curLen++; - return pdTRUE; - } - if( apStr->str == apStr->nulPos ) - { - *( apStr->str++ ) = '\0'; - } - return pdFALSE; -} -/*-----------------------------------------------------------*/ - -static portINLINE BaseType_t strbuf_printchar_inline( struct SStringBuf *apStr, int c ) -{ - if( apStr->str == NULL ) - { - vOutputChar( ( char ) c, xTicksToWait ); - if( c == 0 ) - { - return pdFALSE; - } - apStr->curLen++; - return pdTRUE; - } - if( apStr->str < apStr->nulPos ) - { - *(apStr->str++) = c; - if( c == 0 ) - { - return pdFALSE; - } - apStr->curLen++; - return pdTRUE; - } - if( apStr->str == apStr->nulPos ) - { - *( apStr->str++ ) = '\0'; - } - return pdFALSE; -} -/*-----------------------------------------------------------*/ - -static portINLINE int i2hex( int aCh ) -{ -int iResult; - - if( aCh < 10 ) - { - iResult = '0' + aCh; - } - else - { - iResult = 'A' + aCh - 10; - } - - return iResult; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prints(struct SStringBuf *apBuf, const char *apString ) -{ - register int padchar = ' '; - int i,len; - - if( xApplicationMemoryPermissions( ( uint32_t )apString ) == 0 ) - { - /* The user has probably made a mistake with the parameter - for '%s', the memory is not readbale. */ - apString = "INV_MEM"; - } - - if( apBuf->flags.width > 0 ) - { - register int len = 0; - register const char *ptr; - for( ptr = apString; *ptr; ++ptr ) - { - ++len; - } - - if( len >= apBuf->flags.width ) - { - apBuf->flags.width = 0; - } - else - { - apBuf->flags.width -= len; - } - - if( apBuf->flags.pad & PAD_ZERO ) - { - padchar = '0'; - } - } - if( ( apBuf->flags.pad & PAD_RIGHT ) == 0 ) - { - for( ; apBuf->flags.width > 0; --apBuf->flags.width ) - { - if( strbuf_printchar( apBuf, padchar ) == 0 ) - { - return pdFALSE; - } - } - } - if( ( apBuf->flags.isNumber == pdTRUE ) && ( apBuf->flags.pad == pdTRUE ) ) - { - /* The string to print represents an integer number. - * In this case, printLimit is the min number of digits to print - * If the length of the number to print is less than the min nb of i - * digits to display, we add 0 before printing the number - */ - len = strlen( apString ); - - if( len < apBuf->flags.printLimit ) - { - i = apBuf->flags.printLimit - len; - for( ; i; i-- ) - { - if( strbuf_printchar( apBuf, '0' ) == 0 ) - { - return pdFALSE; - } - } - } - } - /* The string to print is not the result of a number conversion to ascii. - * For a string, printLimit is the max number of characters to display - */ - for( ; apBuf->flags.printLimit && *apString ; ++apString, --apBuf->flags.printLimit ) - { - if( !strbuf_printchar( apBuf, *apString ) ) - { - return pdFALSE; - } - } - - for( ; apBuf->flags.width > 0; --apBuf->flags.width ) - { - if( !strbuf_printchar( apBuf, padchar ) ) - { - return pdFALSE; - } - } - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -/* the following should be enough for 32 bit int */ -#define PRINT_BUF_LEN 12 /* to print 4294967296 */ - -#if SPRINTF_LONG_LONG -#warning 64-bit libraries will be included as well -static BaseType_t printll( struct SStringBuf *apBuf, long long i ) -{ - char print_buf[ 2 * PRINT_BUF_LEN ]; - register char *s; - register int t, neg = 0; - register unsigned long long u = i; - lldiv_t lldiv_result; - -/* typedef struct - * { - * long long int quot; // quotient - * long long int rem; // remainder - * } lldiv_t; - */ - - apBuf->flags.isNumber = pdTRUE; /* Parameter for prints */ - if( i == 0LL ) - { - print_buf[ 0 ] = '0'; - print_buf[ 1 ] = '\0'; - return prints( apBuf, print_buf ); - } - - if( ( apBuf->flags.isSigned == pdTRUE ) && ( apBuf->flags.base == 10 ) && ( i < 0LL ) ) - { - neg = 1; - u = -i; - } - - s = print_buf + sizeof( print_buf ) - 1; - - *s = '\0'; - /* 18446744073709551616 */ - while( u != 0 ) - { - lldiv_result = lldiv( u, ( unsigned long long ) apBuf->flags.base ); - t = lldiv_result.rem; - if( t >= 10 ) - { - t += apBuf->flags.letBase - '0' - 10; - } - *( --s ) = t + '0'; - u = lldiv_result.quot; - } - - if( neg != 0 ) - { - if( ( apBuf->flags.width != 0 ) && ( apBuf->flags.pad & PAD_ZERO ) ) - { - if( !strbuf_printchar( apBuf, '-' ) ) - { - return pdFALSE; - } - --apBuf->flags.width; - } - else - { - *( --s ) = '-'; - } - } - - return prints( apBuf, s ); -} -#endif /* SPRINTF_LONG_LONG */ -/*-----------------------------------------------------------*/ - -static BaseType_t printi( struct SStringBuf *apBuf, int i ) -{ - char print_buf[ PRINT_BUF_LEN ]; - register char *s; - register int t, neg = 0; - register unsigned int u = i; - register unsigned base = apBuf->flags.base; - - apBuf->flags.isNumber = pdTRUE; /* Parameter for prints */ - - if( i == 0 ) - { - print_buf[ 0 ] = '0'; - print_buf[ 1 ] = '\0'; - return prints( apBuf, print_buf ); - } - - if( ( apBuf->flags.isSigned == pdTRUE ) && ( base == 10 ) && ( i < 0 ) ) - { - neg = 1; - u = -i; - } - - s = print_buf + sizeof( print_buf ) - 1; - - *s = '\0'; - switch( base ) - { - case 16: - while( u != 0 ) - { - t = u & 0xF; - if( t >= 10 ) - { - t += apBuf->flags.letBase - '0' - 10; - } - *( --s ) = t + '0'; - u >>= 4; - } - break; - - case 8: - case 10: - /* GCC compiles very efficient */ - while( u ) - { - t = u % base; - *( --s ) = t + '0'; - u /= base; - } - break; -/* - // The generic case, not yet in use - default: - while( u ) - { - t = u % base; - if( t >= 10) - { - t += apBuf->flags.letBase - '0' - 10; - } - *( --s ) = t + '0'; - u /= base; - } - break; -*/ - } - - if( neg != 0 ) - { - if( apBuf->flags.width && (apBuf->flags.pad & PAD_ZERO ) ) - { - if( strbuf_printchar( apBuf, '-' ) == 0 ) - { - return pdFALSE; - } - --apBuf->flags.width; - } - else - { - *( --s ) = '-'; - } - } - - return prints( apBuf, s ); -} -/*-----------------------------------------------------------*/ - -static BaseType_t printIp(struct SStringBuf *apBuf, unsigned i ) -{ - char print_buf[16]; - - sprintf( print_buf, "%u.%u.%u.%u", - i >> 24, - ( i >> 16 ) & 0xff, - ( i >> 8 ) & 0xff, - i & 0xff ); - apBuf->flags.isNumber = pdTRUE; /* Parameter for prints */ - prints( apBuf, print_buf ); - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -static void tiny_print( struct SStringBuf *apBuf, const char *format, va_list args ) -{ - char scr[2]; - - for( ; ; ) - { - int ch = *( format++ ); - - if( ch != '%' ) - { - do - { - /* Put the most like flow in a small loop */ - if( strbuf_printchar_inline( apBuf, ch ) == 0 ) - { - return; - } - ch = *( format++ ); - } while( ch != '%' ); - } - ch = *( format++ ); - /* Now ch has character after '%', format pointing to next */ - - if( ch == '\0' ) - { - break; - } - if( ch == '%' ) - { - if( strbuf_printchar( apBuf, ch ) == 0 ) - { - return; - } - continue; - } - memset( &apBuf->flags, '\0', sizeof( apBuf->flags ) ); - - if( ch == '-' ) - { - ch = *( format++ ); - apBuf->flags.pad = PAD_RIGHT; - } - while( ch == '0' ) - { - ch = *( format++ ); - apBuf->flags.pad |= PAD_ZERO; - } - if( ch == '*' ) - { - ch = *( format++ ); - apBuf->flags.width = va_arg( args, int ); - } - else - { - while( ch >= '0' && ch <= '9' ) - { - apBuf->flags.width *= 10; - apBuf->flags.width += ch - '0'; - ch = *( format++ ); - } - } - if( ch == '.' ) - { - ch = *( format++ ); - if( ch == '*' ) - { - apBuf->flags.printLimit = va_arg( args, int ); - ch = *( format++ ); - } - else - { - while( ch >= '0' && ch <= '9' ) - { - apBuf->flags.printLimit *= 10; - apBuf->flags.printLimit += ch - '0'; - ch = *( format++ ); - } - } - } - if( apBuf->flags.printLimit == 0 ) - { - apBuf->flags.printLimit--; /* -1: make it unlimited */ - } - if( ch == 's' ) - { - register char *s = ( char * )va_arg( args, int ); - if( prints( apBuf, s ? s : "(null)" ) == 0 ) - { - break; - } - continue; - } - if( ch == 'c' ) - { - /* char are converted to int then pushed on the stack */ - scr[0] = ( char ) va_arg( args, int ); - - if( strbuf_printchar( apBuf, scr[0] ) == 0 ) - { - return; - } - - continue; - } - if( ch == 'l' ) - { - ch = *( format++ ); - apBuf->flags.long32 = 1; - /* Makes not difference as u32 == long */ - } - if( ch == 'L' ) - { - ch = *( format++ ); - apBuf->flags.long64 = 1; - /* Does make a difference */ - } - apBuf->flags.base = 10; - apBuf->flags.letBase = 'a'; - - if( ch == 'd' || ch == 'u' ) - { - apBuf->flags.isSigned = ( ch == 'd' ); -#if SPRINTF_LONG_LONG - if( apBuf->flags.long64 != pdFALSE ) - { - if( printll( apBuf, va_arg( args, long long ) ) == 0 ) - { - break; - } - } else -#endif /* SPRINTF_LONG_LONG */ - if( printi( apBuf, va_arg( args, int ) ) == 0 ) - { - break; - } - continue; - } - - apBuf->flags.base = 16; /* From here all hexadecimal */ - - if( ch == 'x' && format[0] == 'i' && format[1] == 'p' ) - { - format += 2; /* eat the "xi" of "xip" */ - /* Will use base 10 again */ - if( printIp( apBuf, va_arg( args, int ) ) == 0 ) - { - break; - } - continue; - } - if( ch == 'x' || ch == 'X' || ch == 'p' || ch == 'o' ) - { - if( ch == 'X' ) - { - apBuf->flags.letBase = 'A'; - } - else if( ch == 'o' ) - { - apBuf->flags.base = 8; - } -#if SPRINTF_LONG_LONG - if( apBuf->flags.long64 != pdFALSE ) - { - if( printll( apBuf, va_arg( args, long long ) ) == 0 ) - { - break; - } - } else -#endif /* SPRINTF_LONG_LONG */ - if( printi( apBuf, va_arg( args, int ) ) == 0 ) - { - break; - } - continue; - } - } - strbuf_printchar( apBuf, '\0' ); -} -/*-----------------------------------------------------------*/ - -int vsnprintf( char *apBuf, size_t aMaxLen, const char *apFmt, va_list args ) -{ - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char* )apBuf + aMaxLen ); - tiny_print( &strBuf, apFmt, args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -int snprintf( char *apBuf, size_t aMaxLen, const char *apFmt, ... ) -{ - va_list args; - - va_start( args, apFmt ); - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char* )apBuf + aMaxLen ); - tiny_print( &strBuf, apFmt, args ); - va_end( args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -int sprintf( char *apBuf, const char *apFmt, ... ) -{ - va_list args; - - va_start( args, apFmt ); - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char * )apBuf + 1024 ); - tiny_print( &strBuf, apFmt, args ); - va_end( args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -int vsprintf( char *apBuf, const char *apFmt, va_list args ) -{ - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char* ) apBuf + 1024 ); - tiny_print( &strBuf, apFmt, args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -const char *mkSize (unsigned long long aSize, char *apBuf, int aLen) -{ -static char retString[33]; -size_t gb, mb, kb, sb; - - if (apBuf == NULL) { - apBuf = retString; - aLen = sizeof( retString ); - } - gb = aSize / (1024*1024*1024); - aSize -= gb * (1024*1024*1024); - mb = aSize / (1024*1024); - aSize -= mb * (1024*1024); - kb = aSize / (1024); - aSize -= kb * (1024); - sb = aSize; - if( gb ) - { - snprintf (apBuf, aLen, "%u.%02u GB", ( unsigned ) gb, ( unsigned ) ( ( 100 * mb ) / 1024ul ) ); - } - else if( mb ) - { - snprintf (apBuf, aLen, "%u.%02u MB", ( unsigned ) mb, ( unsigned ) ( ( 100 * kb) / 1024ul ) ); - } - else if( kb != 0ul ) - { - snprintf (apBuf, aLen, "%u.%02u KB", ( unsigned ) kb, ( unsigned ) ( ( 100 * sb) / 1024ul ) ); - } - else - { - snprintf (apBuf, aLen, "%u bytes", ( unsigned ) sb); - } - return apBuf; -} diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleTaskPoolExamples.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleTaskPoolExamples.c deleted file mode 100644 index fb2eaca26..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleTaskPoolExamples.c +++ /dev/null @@ -1,695 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - - -/* Kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* Standard includes. */ -#include - -/* IoT SDK includes. */ -#include "iot_taskpool.h" - -/* The priority at which that tasks in the task pool (the worker tasks) get -created. */ -#define tpTASK_POOL_WORKER_PRIORITY 1 - -/* - * Prototypes for the functions that demonstrate the task pool API. - * See the implementation of the prvTaskPoolDemoTask() function within this file - * for a description of the individual functions. A configASSERT() is hit if - * any of the demos encounter any unexpected behaviour. - */ -static void prvExample_BasicSingleJob( void ); -static void prvExample_DeferredJobAndCancellingJobs( void ); -static void prvExample_BasicRecyclableJob( void ); -static void prvExample_ReuseRecyclableJobFromLowPriorityTask( void ); -static void prvExample_ReuseRecyclableJobFromHighPriorityTask( void ); - -/* - * Prototypes of the callback functions used in the examples. The callback - * simply sends a signal (in the form of a direct task notification) to the - * prvTaskPoolDemoTask() task to let the task know that the callback execute. - * The handle of the prvTaskPoolDemoTask() task is not accessed directly, but - * instead passed into the task pool job as the job's context. - */ -static void prvSimpleTaskNotifyCallback( IotTaskPool_t pTaskPool, IotTaskPoolJob_t pJob, void *pUserContext ); - -/* - * The task used to demonstrate the task pool API. This task just loops through - * each demo in turn. - */ -static void prvTaskPoolDemoTask( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -/* Parameters used to create the system task pool - see TBD for more information - * as the task pool used in this example is a slimmed down version of the full - * library - the slimmed down version being intended specifically for FreeRTOS - * kernel use cases. */ -static const IotTaskPoolInfo_t xTaskPoolParameters = { - /* Minimum number of threads in a task pool. - * Note the slimmed down version of the task - * pool used by this library does not autoscale - * the number of tasks in the pool so in this - * case this sets the number of tasks in the - * pool. */ - 2, - /* Maximum number of threads in a task pool. - * Note the slimmed down version of the task - * pool used by this library does not autoscale - * the number of tasks in the pool so in this - * case this parameter is just ignored. */ - 2, - /* Stack size for every task pool thread - in - * bytes, hence multiplying by the number of bytes - * in a word as configMINIMAL_STACK_SIZE is - * specified in words. */ - configMINIMAL_STACK_SIZE * sizeof( portSTACK_TYPE ), - /* Priority for every task pool thread. */ - tpTASK_POOL_WORKER_PRIORITY, - }; - -/*-----------------------------------------------------------*/ - -void vStartSimpleTaskPoolDemo( void ) -{ - /* This example uses a single application task, which in turn is used to - * create and send jobs to task pool tasks. */ - xTaskCreate( prvTaskPoolDemoTask, /* Function that implements the task. */ - "PoolDemo", /* Text name for the task - only used for debugging. */ - configMINIMAL_STACK_SIZE, /* Size of stack (in words, not bytes) to allocate for the task. */ - NULL, /* Task parameter - not used in this case. */ - tskIDLE_PRIORITY, /* Task priority, must be between 0 and configMAX_PRIORITIES - 1. */ - NULL ); /* Used to pass out a handle to the created task - not used in this case. */ -} -/*-----------------------------------------------------------*/ - -static void prvTaskPoolDemoTask( void *pvParameters ) -{ -IotTaskPoolError_t xResult; -uint32_t ulLoops = 0; - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - /* The task pool must be created before it can be used. The system task - * pool is the task pool managed by the task pool library itself - the storage - * used by the task pool is provided by the library. */ - xResult = IotTaskPool_CreateSystemTaskPool( &xTaskPoolParameters ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Attempting to create the task pool again should then appear to succeed - * (in case it is initialised by more than one library), but have no effect. */ - xResult = IotTaskPool_CreateSystemTaskPool( &xTaskPoolParameters ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - for( ;; ) - { - /* Demonstrate the most basic use case where a non persistent job is - * created and scheduled to run immediately. The task pool worker tasks - * (in which the job callback function executes) have a priority above the - * priority of this task so the job's callback executes as soon as it is - * scheduled. */ - prvExample_BasicSingleJob(); - - /* Demonstrate a job being scheduled to run at some time in the - * future, and how a job scheduled to run in the future can be cancelled - * if it has not yet started executing. */ - prvExample_DeferredJobAndCancellingJobs(); - - /* Demonstrate the most basic use of a recyclable job. This is similar - * to prvExample_BasicSingleJob() but using a recyclable job. Creating a - * recyclable job will re-use a previously created and now spare job from - * the task pool's job cache if one is available, or otherwise dynamically - * create a new job if a spare job is not available in the cache but space - * remains in the cache. */ - prvExample_BasicRecyclableJob(); - - /* Demonstrate a recyclable job being created, used, and then re-used. - * In this the task pool worker tasks (in which the job callback - * functions execute) have a priority above the priority of this task so - * the job's callback functions execute as soon as they are scheduled. */ - prvExample_ReuseRecyclableJobFromLowPriorityTask(); - - /* Again demonstrate a recyclable job being created, used, and then - * re-usedbut this time the priority of the task pool worker tasks (in - * which the job callback functions execute) are lower than the priority - * of this task so the job's callback functions don't execute until this - * task enters the blocked state. */ - prvExample_ReuseRecyclableJobFromHighPriorityTask(); - - ulLoops++; - if( ( ulLoops % 10UL ) == 0 ) - { - configPRINTF( ( "prvTaskPoolDemoTask() performed %u iterations without hitting an assert.\r\n", ulLoops ) ); - fflush( stdout ); - } - } -} -/*-----------------------------------------------------------*/ - -static void prvSimpleTaskNotifyCallback( IotTaskPool_t pTaskPool, IotTaskPoolJob_t pJob, void *pUserContext ) -{ -/* The jobs context is the handle of the task to which a notification should - * be sent. */ -TaskHandle_t xTaskToNotify = ( TaskHandle_t ) pUserContext; - - /* Remove warnings about unused parameters. */ - ( void ) pTaskPool; - ( void ) pJob; - - /* Notify the task that created this job. */ - xTaskNotifyGive( xTaskToNotify ); -} -/*-----------------------------------------------------------*/ - -static void prvExample_BasicSingleJob( void ) -{ -IotTaskPoolJobStorage_t xJobStorage; -IotTaskPoolJob_t xJob; -IotTaskPoolError_t xResult; -uint32_t ulReturn; -const uint32_t ulNoFlags = 0UL; -const TickType_t xNoDelay = ( TickType_t ) 0; -size_t xFreeHeapBeforeCreatingJob = xPortGetFreeHeapSize(); -IotTaskPoolJobStatus_t xJobStatus; - - /* Don't expect any notifications to be pending yet. */ - configASSERT( ulTaskNotifyTake( pdTRUE, xNoDelay ) == 0 ); - - /* Create and schedule a job using the handle of this task as the job's - * context and the function that sends a notification to the task handle as - * the job's callback function. This is not a recyclable job so the storage - * required to hold information about the job is provided by this task - in - * this case the storage is on the stack of this task so no memory is allocated - * dynamically but the stack frame must remain in scope for the lifetime of - * the job. */ - xResult = IotTaskPool_CreateJob( prvSimpleTaskNotifyCallback, /* Callback function. */ - ( void * ) xTaskGetCurrentTaskHandle(), /* Job context. */ - &xJobStorage, - &xJob ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The job has been created but not scheduled so is now ready. */ - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_READY ); - - /* This is not a persistent (recyclable) job and its storage is on the - * stack of this function, so the amount of heap space available should not - * have changed since entering this function. */ - configASSERT( xFreeHeapBeforeCreatingJob == xPortGetFreeHeapSize() ); - - /* In the full task pool implementation the first parameter is used to - * pass the handle of the task pool to schedule. The lean task pool - * implementation used in this demo only supports a single task pool, which - * is created internally within the library, so the first parameter is NULL. */ - xResult = IotTaskPool_Schedule( NULL, xJob, ulNoFlags ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Look for the notification coming from the job's callback function. The - * priority of the task pool worker task that executes the callback is higher - * than the priority of this task so a block time is not needed - the task pool - * worker task preempts this task and sends the notification (from the job's - * callback) as soon as the job is scheduled. */ - ulReturn = ulTaskNotifyTake( pdTRUE, xNoDelay ); - configASSERT( ulReturn ); - - /* The job's callback has executed so the job has now completed. */ - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_COMPLETED ); -} -/*-----------------------------------------------------------*/ - -static void prvExample_DeferredJobAndCancellingJobs( void ) -{ -IotTaskPoolJobStorage_t xJobStorage; -IotTaskPoolJob_t xJob; -IotTaskPoolError_t xResult; -uint32_t ulReturn; -const uint32_t ulShortDelay_ms = 100UL; -const TickType_t xNoDelay = ( TickType_t ) 0, xAllowableMargin = ( TickType_t ) 5; /* Large margin for Windows port, which is not real time. */ -TickType_t xTimeBefore, xElapsedTime, xShortDelay_ticks; -size_t xFreeHeapBeforeCreatingJob = xPortGetFreeHeapSize(); -IotTaskPoolJobStatus_t xJobStatus; - - /* Don't expect any notifications to be pending yet. */ - configASSERT( ulTaskNotifyTake( pdTRUE, xNoDelay ) == 0 ); - - /* Create a job using the handle of this task as the job's context and the - * function that sends a notification to the task handle as the job's callback - * function. The job is created using storage allocated on the stack of this - * function - so no memory is allocated. */ - xResult = IotTaskPool_CreateJob( prvSimpleTaskNotifyCallback, /* Callback function. */ - ( void * ) xTaskGetCurrentTaskHandle(), /* Job context. */ - &xJobStorage, - &xJob ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The job has been created but not scheduled so is now ready. */ - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_READY ); - - /* This is not a persistent (recyclable) job and its storage is on the - * stack of this function, so the amount of heap space available should not - * have changed since entering this function. */ - configASSERT( xFreeHeapBeforeCreatingJob == xPortGetFreeHeapSize() ); - - /* Schedule the job to run its callback in ulShortDelay_ms milliseconds time. - * In the full task pool implementation the first parameter is used to pass the - * handle of the task pool to schedule. The lean task pool implementation used - * in this demo only supports a single task pool, which is created internally - * within the library, so the first parameter is NULL. */ - xResult = IotTaskPool_ScheduleDeferred( NULL, xJob, ulShortDelay_ms ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The scheduled job should not have executed yet, so don't expect any - * notifications and expect the job's status to be 'deferred'. */ - ulReturn = ulTaskNotifyTake( pdTRUE, xNoDelay ); - configASSERT( ulReturn == 0 ); - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_DEFERRED ); - - /* As the job has not yet been executed it can be cancelled. */ - xResult = IotTaskPool_TryCancel( NULL, xJob, &xJobStatus ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_CANCELED ); - - /* Schedule the job again, and this time wait until its callback is - * executed (the callback function sends a notification to this task) to see - * that it executes at the right time. */ - xTimeBefore = xTaskGetTickCount(); - xResult = IotTaskPool_ScheduleDeferred( NULL, xJob, ulShortDelay_ms ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Wait twice the deferred execution time to ensure the callback is executed - * before the call below times out. */ - ulReturn = ulTaskNotifyTake( pdTRUE, pdMS_TO_TICKS( ulShortDelay_ms * 2UL ) ); - xElapsedTime = xTaskGetTickCount() - xTimeBefore; - - /* A single notification should have been received... */ - configASSERT( ulReturn == 1 ); - - /* ...and the time since scheduling the job should be greater than or - * equal to the deferred execution time - which is converted to ticks for - * comparison. */ - xShortDelay_ticks = pdMS_TO_TICKS( ulShortDelay_ms ); - configASSERT( ( xElapsedTime >= xShortDelay_ticks ) && ( xElapsedTime < ( xShortDelay_ticks + xAllowableMargin ) ) ); -} -/*-----------------------------------------------------------*/ - -static void prvExample_BasicRecyclableJob( void ) -{ -IotTaskPoolJob_t xJob; -IotTaskPoolError_t xResult; -uint32_t ulReturn; -const uint32_t ulNoFlags = 0UL; -const TickType_t xNoDelay = ( TickType_t ) 0; -size_t xFreeHeapBeforeCreatingJob = xPortGetFreeHeapSize(); - - /* Don't expect any notifications to be pending yet. */ - configASSERT( ulTaskNotifyTake( pdTRUE, xNoDelay ) == 0 ); - - /* Create and schedule a job using the handle of this task as the job's - * context and the function that sends a notification to the task handle as - * the job's callback function. The job is created as a recyclable job and in - * this case the memory used to hold the job status is allocated inside the - * create function. As the job is persistent it can be used multiple times, - * as demonstrated in other examples within this demo. In the full task pool - * implementation the first parameter is used to pass the handle of the task - * pool this recyclable job is to be associated with. In the lean - * implementation of the task pool used by this demo there is only one task - * pool (the system task pool created within the task pool library) so the - * first parameter is NULL. */ - xResult = IotTaskPool_CreateRecyclableJob( NULL, - prvSimpleTaskNotifyCallback, - (void * ) xTaskGetCurrentTaskHandle(), - &xJob ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* This recyclable job is persistent, and in this case created dynamically, - * so expect there to be less heap space than when entering the function. */ - configASSERT( xPortGetFreeHeapSize() < xFreeHeapBeforeCreatingJob ); - - /* In the full task pool implementation the first parameter is used to - * pass the handle of the task pool to schedule. The lean task pool - * implementation used in this demo only supports a single task pool, which - * is created internally within the library, so the first parameter is NULL. */ - xResult = IotTaskPool_Schedule( NULL, xJob, ulNoFlags ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Look for the notification coming from the job's callback function. The - * priority of the task pool worker task that executes the callback is higher - * than the priority of this task so a block time is not needed - the task pool - * worker task preempts this task and sends the notification (from the job's - * callback) as soon as the job is scheduled. */ - ulReturn = ulTaskNotifyTake( pdTRUE, xNoDelay ); - configASSERT( ulReturn ); - - /* Clean up recyclable job. In the full implementation of the task pool - * the first parameter is used to pass a handle to the task pool the job is - * associated with. In the lean implementation of the task pool used by this - * demo there is only one task pool (the system task pool created in the - * task pool library itself) so the first parameter is NULL. */ - IotTaskPool_DestroyRecyclableJob( NULL, xJob ); - - /* Once the job has been deleted the memory used to hold the job is - * returned, so the available heap should be exactly as when entering this - * function. */ - configASSERT( xPortGetFreeHeapSize() == xFreeHeapBeforeCreatingJob ); -} -/*-----------------------------------------------------------*/ - -static void prvExample_ReuseRecyclableJobFromLowPriorityTask( void ) -{ -IotTaskPoolError_t xResult; -uint32_t ulNotificationValue; -const uint32_t ulNoFlags = 0UL; -const TickType_t xNoDelay = ( TickType_t ) 0; -IotTaskPoolJob_t xJob, xJobRecycled; -size_t xFreeHeapBeforeCreatingJob = xPortGetFreeHeapSize(), xFreeHeapAfterCreatingJob = 0; -IotTaskPoolJobStatus_t xJobStatus; - - /* Don't expect any notifications to be pending yet. */ - configASSERT( ulTaskNotifyTake( pdTRUE, xNoDelay ) == 0 ); - - /* Create a recycleable job using the handle of this task as the job's - * context and the function that sends a notification to the task handle as - * the job's callback function. In the full task pool implementation the - * first parameter is used to pass the handle of the task pool this - * recyclable job is to be associated with. In the lean implementation of - * the task pool used by this demo there is only one task pool (the system - * task pool created within the task pool library) so the first parameter is - * NULL. */ - xResult = IotTaskPool_CreateRecyclableJob( NULL, - prvSimpleTaskNotifyCallback, - (void * ) xTaskGetCurrentTaskHandle(), - &( xJob ) ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The job is created as a recyclable job and in this case the memory to - * store the job information is allocated within the create function as at - * this time there are no recyclable jobs in the task pool jobs cache. So - * expect there to be less heap space than when entering the function. */ - xFreeHeapAfterCreatingJob = xPortGetFreeHeapSize(); - configASSERT( xFreeHeapAfterCreatingJob < xFreeHeapBeforeCreatingJob ); - - /* The job has been created but not scheduled so is now ready. */ - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_READY ); - - /* In the full task pool implementation the first parameter is used to - * pass the handle of the task pool to schedule. The lean task pool - * implementation used in this demo only supports a single task pool, which - * is created internally within the library, so the first parameter is NULL. */ - xResult = IotTaskPool_Schedule( NULL, xJob, ulNoFlags ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The priority of the task pool task(s) is higher than the priority - * of this task, so the job's callback function should have already - * executed, sending a notification to this task, and incrementing this - * task's notification value. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xNoDelay ); /* No block time, return immediately. */ - configASSERT( ulNotificationValue == 1 ); - - /* The job's callback has executed so the job is now completed. */ - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_COMPLETED ); - - /* Return the job to the task pool's job cache. */ - IotTaskPool_RecycleJob( NULL, xJob ); - - /* Create a recycleable job again using the handle of this task as the job's - * context and the function that sends a notification to the task handle as - * the job's callback function. In the full task pool implementation the - * first parameter is used to pass the handle of the task pool this - * recyclable job is to be associated with. In the lean implementation of - * the task pool used by this demo there is only one task pool (the system - * task pool created within the task pool library) so the first parameter is - * NULL. */ - xResult = IotTaskPool_CreateRecyclableJob( NULL, - prvSimpleTaskNotifyCallback, - (void * ) xTaskGetCurrentTaskHandle(), - &( xJobRecycled ) ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Since this time the task pool's job cache had a recycleable job, it must - * have been re-used. Thefore expect the free heap space to be same as after - * the creation of first job */ - configASSERT( xPortGetFreeHeapSize() == xFreeHeapAfterCreatingJob ); - - /* Expect the task pool to re-use the job in its cache as opposed to - * allocating a new one. */ - configASSERT( xJobRecycled == xJob ); - - /* In the full task pool implementation the first parameter is used to - * pass the handle of the task pool to schedule. The lean task pool - * implementation used in this demo only supports a single task pool, which - * is created internally within the library, so the first parameter is NULL. */ - xResult = IotTaskPool_Schedule( NULL, xJobRecycled, ulNoFlags ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The priority of the task pool task(s) is higher than the priority - * of this task, so the job's callback function should have already - * executed, sending a notification to this task, and incrementing this - * task's notification value. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xNoDelay ); /* No block time, return immediately. */ - configASSERT( ulNotificationValue == 2 ); - - /* The job's callback has executed so the job is now completed. */ - IotTaskPool_GetStatus( NULL, xJobRecycled, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_COMPLETED ); - - /* Clean up the recyclable job. In the full implementation of the task - * pool the first parameter is used to pass a handle to the task pool the job - * is associated with. In the lean implementation of the task pool used by - * this demo there is only one task pool (the system task pool created in the - * task pool library itself) so the first parameter is NULL. */ - xResult = IotTaskPool_DestroyRecyclableJob( NULL, xJobRecycled ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Clear all the notification value bits ready for the next example. */ - xTaskNotifyWait( portMAX_DELAY, /* Clear all bits on entry - portMAX_DELAY is used as it is a portable way of having all bits set. */ - 0UL, /* Don't clear any bits on exit. */ - NULL, /* Don't need the notification value this time. */ - xNoDelay ); /* No block time, return immediately. */ - configASSERT( ulTaskNotifyTake( pdTRUE, xNoDelay ) == 0 ); - - /* Once the job has been deleted the memory used to hold the job is - * returned, so the available heap should be exactly as when entering this - * function. */ - configASSERT( xPortGetFreeHeapSize() == xFreeHeapBeforeCreatingJob ); -} -/*-----------------------------------------------------------*/ - -static void prvExample_ReuseRecyclableJobFromHighPriorityTask( void ) -{ -IotTaskPoolError_t xResult; -uint32_t ulNotificationValue; -const uint32_t ulNoFlags = 0UL; -const TickType_t xNoDelay = ( TickType_t ) 0; -TickType_t xShortDelay = pdMS_TO_TICKS( 150 ); -IotTaskPoolJob_t xJob, xJobRecycled; -size_t xFreeHeapBeforeCreatingJob = xPortGetFreeHeapSize(), xFreeHeapAfterCreatingJob = 0; -IotTaskPoolJobStatus_t xJobStatus; - - /* Don't expect any notifications to be pending yet. */ - configASSERT( ulTaskNotifyTake( pdTRUE, xNoDelay ) == 0 ); - - /* prvExample_ReuseRecyclableJobFromLowPriorityTask() executes in a task - * that has a lower [task] priority than the task pool's worker tasks. - * Therefore a task pool worker preempts the task that calls - * prvExample_ReuseRecyclableJobFromHighPriorityTask() as soon as the job is - * scheduled. prvExample_ReuseRecyclableJobFromHighPriorityTask() reverses the - * priorities - prvExample_ReuseRecyclableJobFromHighPriorityTask() raises its - * priority to above the task pool's worker tasks, so the worker tasks do not - * execute until the calling task enters the blocked state. First raise the - * priority - passing NULL means raise the priority of the calling task. */ - vTaskPrioritySet( NULL, tpTASK_POOL_WORKER_PRIORITY + 1 ); - - /* Create a recycleable job using the handle of this task as the job's - * context and the function that sends a notification to the task handle as - * the job's callback function. In the full task pool implementation the - * first parameter is used to pass the handle of the task pool this - * recyclable job is to be associated with. In the lean implementation of - * the task pool used by this demo there is only one task pool (the system - * task pool created within the task pool library) so the first parameter is - * NULL. */ - xResult = IotTaskPool_CreateRecyclableJob( NULL, - prvSimpleTaskNotifyCallback, - (void * ) xTaskGetCurrentTaskHandle(), - &( xJob ) ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The job is created as a recyclable job and in this case the memory to - * store the job information is allocated within the create function as at - * this time there are no recyclable jobs in the task pool jobs cache. So - * expect there to be less heap space than when entering the function. */ - xFreeHeapAfterCreatingJob = xPortGetFreeHeapSize(); - configASSERT( xFreeHeapAfterCreatingJob < xFreeHeapBeforeCreatingJob ); - - /* The job has been created but not scheduled so is now ready. */ - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_READY ); - - /* In the full task pool implementation the first parameter is used to - * pass the handle of the task pool to schedule. The lean task pool - * implementation used in this demo only supports a single task pool, which - * is created internally within the library, so the first parameter is NULL. */ - xResult = IotTaskPool_Schedule( NULL, xJob, ulNoFlags ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The priority of the task pool task(s) is lower than the priority - * of this task, so the job's callback function should not have executed - * yet, so don't expect the notification value for this task to have - * changed. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xNoDelay ); /* No block time, return immediately. */ - configASSERT( ulNotificationValue == 0 ); - - /* When this task blocks to wait for a notification, a worker thread will be - * able to execute - but as soon as its callback function sends a - * notification to this task, this task will preempt it (because it has a - * higher priority). So this task expects to receive one notification. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xShortDelay ); /* Short delay to allow a task pool worker to execute. */ - configASSERT( ulNotificationValue == 1 ); - - /* Since the scheduled job has now executed, so waiting for another - * notification should timeout without the notification value changing. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xShortDelay ); /* Short delay to allow a task pool worker to execute. */ - configASSERT( ulNotificationValue == 1 ); - - /* The job's callback has executed so the job is now completed. */ - IotTaskPool_GetStatus( NULL, xJob, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_COMPLETED ); - - /* Return the job to the task pool's job cache. */ - IotTaskPool_RecycleJob( NULL, xJob ); - - /* Create a recycleable job again using the handle of this task as the job's - * context and the function that sends a notification to the task handle as - * the job's callback function. In the full task pool implementation the - * first parameter is used to pass the handle of the task pool this - * recyclable job is to be associated with. In the lean implementation of - * the task pool used by this demo there is only one task pool (the system - * task pool created within the task pool library) so the first parameter is - * NULL. */ - xResult = IotTaskPool_CreateRecyclableJob( NULL, - prvSimpleTaskNotifyCallback, - (void * ) xTaskGetCurrentTaskHandle(), - &( xJobRecycled ) ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Since this time the task pool's job cache had a recycleable job, it must - * have been re-used. Thefore expect the free heap space to be same as after - * the creation of first job */ - configASSERT( xPortGetFreeHeapSize() == xFreeHeapAfterCreatingJob ); - - /* Expect the task pool to re-use the job in its cache as opposed to - * allocating a new one. */ - configASSERT( xJobRecycled == xJob ); - - /* In the full task pool implementation the first parameter is used to - * pass the handle of the task pool to schedule. The lean task pool - * implementation used in this demo only supports a single task pool, which - * is created internally within the library, so the first parameter is NULL. */ - xResult = IotTaskPool_Schedule( NULL, xJobRecycled, ulNoFlags ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* The priority of the task pool task(s) is lower than the priority - * of this task, so the job's callback function should not have executed - * yet, so don't expect the notification value for this task to have - * changed. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xNoDelay ); /* No block time, return immediately. */ - configASSERT( ulNotificationValue == 1 ); - - /* When this task blocks to wait for a notification, a worker thread will be - * able to execute - but as soon as its callback function sends a - * notification to this task, this task will preempt it (because it has a - * higher priority). So this task expects to receive one notification. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xShortDelay ); /* Short delay to allow a task pool worker to execute. */ - configASSERT( ulNotificationValue == 2 ); - - /* Since the scheduled job has now executed, so waiting for another - * notification should timeout without the notification value changing. */ - xTaskNotifyWait( 0UL, /* Don't clear any bits on entry. */ - 0UL, /* Don't clear any bits on exit. */ - &ulNotificationValue, /* Obtain the notification value. */ - xShortDelay ); /* Short delay to allow a task pool worker to execute. */ - configASSERT( ulNotificationValue == 2 ); - - /* The job's callback has executed so the job is now completed. */ - IotTaskPool_GetStatus( NULL, xJobRecycled, &xJobStatus ); - configASSERT( xJobStatus == IOT_TASKPOOL_STATUS_COMPLETED ); - - /* Clean up the recyclable job. In the full implementation of the task - * pool the first parameter is used to pass a handle to the task pool the job - * is associated with. In the lean implementation of the task pool used by - * this demo there is only one task pool (the system task pool created in the - * task pool library itself) so the first parameter is NULL. */ - xResult = IotTaskPool_DestroyRecyclableJob( NULL, xJobRecycled ); - configASSERT( xResult == IOT_TASKPOOL_SUCCESS ); - - /* Reset this task's priority. */ - vTaskPrioritySet( NULL, tskIDLE_PRIORITY ); - - /* Clear all the notification value bits ready for the next example. */ - xTaskNotifyWait( portMAX_DELAY, /* Clear all bits on entry - portMAX_DELAY is used as it is a portable way of having all bits set. */ - 0UL, /* Don't clear any bits on exit. */ - NULL, /* Don't need the notification value this time. */ - xNoDelay ); /* No block time, return immediately. */ - configASSERT( ulTaskNotifyTake( pdTRUE, xNoDelay ) == 0 ); - - /* Once the job has been deleted the memory used to hold the job is - * returned, so the available heap should be exactly as when entering this - * function. */ - configASSERT( xPortGetFreeHeapSize() == xFreeHeapBeforeCreatingJob ); -} -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleUDPClientAndServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleUDPClientAndServer.c deleted file mode 100644 index 54143c367..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/DemoTasks/SimpleUDPClientAndServer.c +++ /dev/null @@ -1,355 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * Creates two transmitting tasks and two receiving tasks. The transmitting - * tasks send values that are received by the receiving tasks. One set of tasks - * uses the standard API. The other set of tasks uses the zero copy API. - * - * See the following web page for essential demo usage and configuration - * details: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/examples_FreeRTOS_simulator.html - */ - -/* Standard includes. */ -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" - -#define simpTINY_DELAY ( ( TickType_t ) 2 ) - -/* - * Uses a socket to send data without using the zero copy option. - * prvSimpleServerTask() will receive the data. - */ -static void prvSimpleClientTask( void *pvParameters ); - -/* - * Uses a socket to receive the data sent by the prvSimpleClientTask() task. - * Does not use the zero copy option. - */ -static void prvSimpleServerTask( void *pvParameters ); - -/* - * Uses a socket to send data using the zero copy option. - * prvSimpleZeroCopyServerTask() will receive the data. - */ -static void prvSimpleZeroCopyUDPClientTask( void *pvParameters ); - -/* - * Uses a socket to receive the data sent by the prvSimpleZeroCopyUDPClientTask() - * task. Uses the zero copy option. - */ -static void prvSimpleZeroCopyServerTask( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority ) -{ - /* Create the client and server tasks that do not use the zero copy - interface. */ - xTaskCreate( prvSimpleClientTask, "SimpCpyClnt", usStackSize, ( void * ) ulPort, uxPriority, NULL ); - xTaskCreate( prvSimpleServerTask, "SimpCpySrv", usStackSize, ( void * ) ulPort, uxPriority + 1, NULL ); - - /* Create the client and server tasks that do use the zero copy interface. */ - xTaskCreate( prvSimpleZeroCopyUDPClientTask, "SimpZCpyClnt", usStackSize, ( void * ) ( ulPort + 1 ), uxPriority, NULL ); - xTaskCreate( prvSimpleZeroCopyServerTask, "SimpZCpySrv", usStackSize, ( void * ) ( ulPort + 1 ), uxPriority + 1, NULL ); -} -/*-----------------------------------------------------------*/ - -static void prvSimpleClientTask( void *pvParameters ) -{ -Socket_t xClientSocket; -struct freertos_sockaddr xDestinationAddress; -uint8_t cString[ 65 ]; -BaseType_t lReturned; -uint32_t ulCount = 0UL, ulIPAddress; -const uint32_t ulLoopsPerSocket = 10UL; -const TickType_t x150ms = 150UL / portTICK_PERIOD_MS; - - /* Remove compiler warning about unused parameters. */ - ( void ) pvParameters; - - /* It is assumed that this task is not created until the network is up, - so the IP address can be obtained immediately. store the IP address being - used in ulIPAddress. This is done so the socket can send to a different - port on the same IP address. */ - FreeRTOS_GetAddressConfiguration( &ulIPAddress, NULL, NULL, NULL ); - - /* This test sends to itself, so data sent from here is received by a server - socket on the same IP address. Setup the freertos_sockaddr structure with - this nodes IP address, and the port number being sent to. The strange - casting is to try and remove compiler warnings on 32 bit machines. */ - xDestinationAddress.sin_addr = ulIPAddress; - xDestinationAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL; - xDestinationAddress.sin_port = FreeRTOS_htons( xDestinationAddress.sin_port ); - - for( ;; ) - { - /* Create the socket. */ - xClientSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - configASSERT( xClientSocket != FREERTOS_INVALID_SOCKET ); - - /* The count is used to differentiate between different messages sent to - the server, and to break out of the do while loop below. */ - ulCount = 0UL; - - do - { - /* Create the string that is sent to the server. */ - sprintf( ( char * ) cString, "Server received (not zero copy): Message number %lu\r\n", ulCount ); - - /* Send the string to the socket. ulFlags is set to 0, so the zero - copy option is not selected. That means the data from cString[] is - copied into a network buffer inside FreeRTOS_sendto(), and cString[] - can be reused as soon as FreeRTOS_sendto() has returned. */ - lReturned = FreeRTOS_sendto( xClientSocket, ( void * ) cString, strlen( ( const char * ) cString ), 0, &xDestinationAddress, sizeof( xDestinationAddress ) ); - - ulCount++; - - } while( ( lReturned != FREERTOS_SOCKET_ERROR ) && ( ulCount < ulLoopsPerSocket ) ); - - FreeRTOS_closesocket( xClientSocket ); - - /* A short delay to prevent the messages printed by the server task - scrolling off the screen too quickly, and to prevent reduce the network - loading. */ - vTaskDelay( x150ms ); - } -} -/*-----------------------------------------------------------*/ - -static void prvSimpleServerTask( void *pvParameters ) -{ -int32_t lBytes; -uint8_t cReceivedString[ 60 ]; -struct freertos_sockaddr xClient, xBindAddress; -uint32_t xClientLength = sizeof( xClient ); -Socket_t xListeningSocket; - - /* Just to prevent compiler warnings. */ - ( void ) pvParameters; - - /* Attempt to open the socket. */ - xListeningSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - configASSERT( xListeningSocket != FREERTOS_INVALID_SOCKET ); - - /* This test receives data sent from a different port on the same IP - address. Configure the freertos_sockaddr structure with the address being - bound to. The strange casting is to try and remove compiler warnings on 32 - bit machines. Note that this task is only created after the network is up, - so the IP address is valid here. */ - xBindAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL; - xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port ); - - /* Bind the socket to the port that the client task will send to. */ - FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) ); - - for( ;; ) - { - /* Zero out the receive array so there is NULL at the end of the string - when it is printed out. */ - memset( cReceivedString, 0x00, sizeof( cReceivedString ) ); - - /* Receive data on the socket. ulFlags is zero, so the zero copy option - is not set and the received data is copied into the buffer pointed to by - cReceivedString. By default the block time is portMAX_DELAY. - xClientLength is not actually used by FreeRTOS_recvfrom(), but is set - appropriately in case future versions do use it. */ - lBytes = FreeRTOS_recvfrom( xListeningSocket, cReceivedString, sizeof( cReceivedString ), 0, &xClient, &xClientLength ); - - /* Error check. */ - configASSERT( lBytes == ( BaseType_t ) strlen( ( const char * ) cReceivedString ) ); - } -} -/*-----------------------------------------------------------*/ - -static void prvSimpleZeroCopyUDPClientTask( void *pvParameters ) -{ -Socket_t xClientSocket; -uint8_t *pucUDPPayloadBuffer; -struct freertos_sockaddr xDestinationAddress; -BaseType_t lReturned; -uint32_t ulCount = 0UL, ulIPAddress; -const uint32_t ulLoopsPerSocket = 10UL; -const char *pcStringToSend = "Server received (using zero copy): Message number "; -const TickType_t x150ms = 150UL / portTICK_PERIOD_MS; -/* 15 is added to ensure the number, \r\n and terminating zero fit. */ -const size_t xStringLength = strlen( pcStringToSend ) + 15; - - /* Remove compiler warning about unused parameters. */ - ( void ) pvParameters; - - /* It is assumed that this task is not created until the network is up, - so the IP address can be obtained immediately. store the IP address being - used in ulIPAddress. This is done so the socket can send to a different - port on the same IP address. */ - FreeRTOS_GetAddressConfiguration( &ulIPAddress, NULL, NULL, NULL ); - - /* This test sends to itself, so data sent from here is received by a server - socket on the same IP address. Setup the freertos_sockaddr structure with - this nodes IP address, and the port number being sent to. The strange - casting is to try and remove compiler warnings on 32 bit machines. */ - xDestinationAddress.sin_addr = ulIPAddress; - xDestinationAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL; - xDestinationAddress.sin_port = FreeRTOS_htons( xDestinationAddress.sin_port ); - - for( ;; ) - { - /* Create the socket. */ - xClientSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - configASSERT( xClientSocket != FREERTOS_INVALID_SOCKET ); - - /* The count is used to differentiate between different messages sent to - the server, and to break out of the do while loop below. */ - ulCount = 0UL; - - do - { - /* This task is going to send using the zero copy interface. The - data being sent is therefore written directly into a buffer that is - passed into, rather than copied into, the FreeRTOS_sendto() - function. - - First obtain a buffer of adequate length from the IP stack into which - the string will be written. Although a max delay is used, the actual - delay will be capped to ipconfigMAX_SEND_BLOCK_TIME_TICKS, hence - the do while loop is used to ensure a buffer is obtained. */ - do - { - } while( ( pucUDPPayloadBuffer = ( uint8_t * ) FreeRTOS_GetUDPPayloadBuffer( xStringLength, portMAX_DELAY ) ) == NULL ); - - /* A buffer was successfully obtained. Create the string that is - sent to the server. First the string is filled with zeros as this will - effectively be the null terminator when the string is received at the other - end. Note that the string is being written directly into the buffer - obtained from the IP stack above. */ - memset( ( void * ) pucUDPPayloadBuffer, 0x00, xStringLength ); - sprintf( ( char * ) pucUDPPayloadBuffer, "%s%lu\r\n", pcStringToSend, ulCount ); - - /* Pass the buffer into the send function. ulFlags has the - FREERTOS_ZERO_COPY bit set so the IP stack will take control of the - buffer rather than copy data out of the buffer. */ - lReturned = FreeRTOS_sendto( xClientSocket, /* The socket being sent to. */ - ( void * ) pucUDPPayloadBuffer, /* A pointer to the the data being sent. */ - strlen( ( const char * ) pucUDPPayloadBuffer ) + 1, /* The length of the data being sent - including the string's null terminator. */ - FREERTOS_ZERO_COPY, /* ulFlags with the FREERTOS_ZERO_COPY bit set. */ - &xDestinationAddress, /* Where the data is being sent. */ - sizeof( xDestinationAddress ) ); - - if( lReturned == 0 ) - { - /* The send operation failed, so this task is still responsible - for the buffer obtained from the IP stack. To ensure the buffer - is not lost it must either be used again, or, as in this case, - returned to the IP stack using FreeRTOS_ReleaseUDPPayloadBuffer(). - pucUDPPayloadBuffer can be safely re-used after this call. */ - FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucUDPPayloadBuffer ); - } - else - { - /* The send was successful so the IP stack is now managing the - buffer pointed to by pucUDPPayloadBuffer, and the IP stack will - return the buffer once it has been sent. pucUDPPayloadBuffer can - be safely re-used. */ - } - - ulCount++; - - } while( ( lReturned != FREERTOS_SOCKET_ERROR ) && ( ulCount < ulLoopsPerSocket ) ); - - FreeRTOS_closesocket( xClientSocket ); - - /* A short delay to prevent the messages scrolling off the screen too - quickly. */ - vTaskDelay( x150ms ); - } -} -/*-----------------------------------------------------------*/ - -static void prvSimpleZeroCopyServerTask( void *pvParameters ) -{ -int32_t lBytes; -uint8_t *pucUDPPayloadBuffer; -struct freertos_sockaddr xClient, xBindAddress; -uint32_t xClientLength = sizeof( xClient ), ulIPAddress; -Socket_t xListeningSocket; - - /* Just to prevent compiler warnings. */ - ( void ) pvParameters; - - /* Attempt to open the socket. */ - xListeningSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - configASSERT( xListeningSocket != FREERTOS_INVALID_SOCKET ); - - /* This test receives data sent from a different port on the same IP address. - Obtain the nodes IP address. Configure the freertos_sockaddr structure with - the address being bound to. The strange casting is to try and remove - compiler warnings on 32 bit machines. Note that this task is only created - after the network is up, so the IP address is valid here. */ - FreeRTOS_GetAddressConfiguration( &ulIPAddress, NULL, NULL, NULL ); - xBindAddress.sin_addr = ulIPAddress; - xBindAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL; - xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port ); - - /* Bind the socket to the port that the client task will send to. */ - FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) ); - - for( ;; ) - { - /* Receive data on the socket. ulFlags has the zero copy bit set - (FREERTOS_ZERO_COPY) indicating to the stack that a reference to the - received data should be passed out to this task using the second - parameter to the FreeRTOS_recvfrom() call. When this is done the - IP stack is no longer responsible for releasing the buffer, and - the task *must* return the buffer to the stack when it is no longer - needed. By default the block time is portMAX_DELAY. */ - lBytes = FreeRTOS_recvfrom( xListeningSocket, ( void * ) &pucUDPPayloadBuffer, 0, FREERTOS_ZERO_COPY, &xClient, &xClientLength ); - - /* Print the received characters. */ - if( lBytes > 0 ) - { - /* It is expected to receive one more byte than the string length as - the NULL terminator is also transmitted. */ - configASSERT( lBytes == ( ( BaseType_t ) strlen( ( const char * ) pucUDPPayloadBuffer ) + 1 ) ); - } - - if( lBytes >= 0 ) - { - /* The buffer *must* be freed once it is no longer needed. */ - FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayloadBuffer ); - } - } -} - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSConfig.h deleted file mode 100644 index 3b63eb063..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSConfig.h +++ /dev/null @@ -1,208 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * http://www.freertos.org/a00110.html - * - * The bottom of this file contains some constants specific to running the UDP - * stack in this demo. Constants specific to FreeRTOS+TCP itself (rather than - * the demo) are contained in FreeRTOSIPConfig.h. - *----------------------------------------------------------*/ -#define configUSE_PREEMPTION 1 -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 -#define configMAX_PRIORITIES ( 7 ) -#define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the Win32 thread. */ -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2048U * 1024U ) ) -#define configMAX_TASK_NAME_LEN ( 15 ) -#define configUSE_TRACE_FACILITY 1 -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_CO_ROUTINES 0 -#define configUSE_MUTEXES 1 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configQUEUE_REGISTRY_SIZE 0 -#define configUSE_APPLICATION_TASK_TAG 0 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_ALTERNATIVE_API 0 -#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0 -#define configENABLE_BACKWARD_COMPATIBILITY 1 -#define configSUPPORT_STATIC_ALLOCATION 1 - -/* Hook function related definitions. */ -#define configUSE_TICK_HOOK 0 -#define configUSE_IDLE_HOOK 0 -#define configUSE_MALLOC_FAILED_HOOK 0 -#define configCHECK_FOR_STACK_OVERFLOW 0 /* Not applicable to the Win32 port. */ - -/* Software timer related definitions. */ -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) -#define configTIMER_QUEUE_LENGTH 5 -#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) - -/* Event group related definitions. */ -#define configUSE_EVENT_GROUPS 1 - -/* Run time stats gathering definitions. */ -#define configGENERATE_RUN_TIME_STATS 0 - -/* Co-routine definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - -/* Set the following definitions to 1 to include the API function, or zero -to exclude the API function. */ -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_vTaskCleanUpResources 0 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define INCLUDE_xTaskGetSchedulerState 1 -#define INCLUDE_xTimerGetTimerTaskHandle 0 -#define INCLUDE_xTaskGetIdleTaskHandle 0 -#define INCLUDE_xQueueGetMutexHolder 1 -#define INCLUDE_eTaskGetState 1 -#define INCLUDE_xEventGroupSetBitsFromISR 1 -#define INCLUDE_xTimerPendFunctionCall 1 -#define INCLUDE_pcTaskGetTaskName 1 - -/* This demo makes use of one or more example stats formatting functions. These -format the raw data provided by the uxTaskGetSystemState() function in to human -readable ASCII form. See the notes in the implementation of vTaskList() within -FreeRTOS/Source/tasks.c for limitations. configUSE_STATS_FORMATTING_FUNCTIONS -is set to 2 so the formatting functions are included without the stdio.h being -included in tasks.c. That is because this project defines its own sprintf() -functions. */ -#define configUSE_STATS_FORMATTING_FUNCTIONS 1 - -/* Assert call defined for debug builds. */ -#ifdef _DEBUG - extern void vAssertCalled( const char *pcFile, uint32_t ulLine ); - #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ ) -#endif /* _DEBUG */ - - - -/* Application specific definitions follow. **********************************/ - -/* Only used when running in the FreeRTOS Windows simulator. Defines the -priority of the task used to simulate Ethernet interrupts. */ -#define configMAC_ISR_SIMULATOR_PRIORITY ( configMAX_PRIORITIES - 1 ) - -/* This demo creates a virtual network connection by accessing the raw Ethernet -or WiFi data to and from a real network connection. Many computers have more -than one real network port, and configNETWORK_INTERFACE_TO_USE is used to tell -the demo which real port should be used to create the virtual port. The ports -available are displayed on the console when the application is executed. For -example, on my development laptop setting configNETWORK_INTERFACE_TO_USE to 4 -results in the wired network being used, while setting -configNETWORK_INTERFACE_TO_USE to 2 results in the wireless network being -used. */ -#define configNETWORK_INTERFACE_TO_USE 4L - -/* The address of an echo server that will be used by the two demo echo client -tasks. -http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Echo_Clients.html -http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/UDP_Echo_Clients.html */ -#define configECHO_SERVER_ADDR0 192 -#define configECHO_SERVER_ADDR1 168 -#define configECHO_SERVER_ADDR2 0 -#define configECHO_SERVER_ADDR3 11 - -/* Default MAC address configuration. The demo creates a virtual network -connection that uses this MAC address by accessing the raw Ethernet/WiFi data -to and from a real network connection on the host PC. See the -configNETWORK_INTERFACE_TO_USE definition above for information on how to -configure the real network connection to use. */ -#define configMAC_ADDR0 0x00 -#define configMAC_ADDR1 0x11 -#define configMAC_ADDR2 0x22 -#define configMAC_ADDR3 0x33 -#define configMAC_ADDR4 0x44 -#define configMAC_ADDR5 0x41 - -/* Default IP address configuration. Used in ipconfigUSE_DNS is set to 0, or -ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */ -#define configIP_ADDR0 10 -#define configIP_ADDR1 10 -#define configIP_ADDR2 10 -#define configIP_ADDR3 200 - -/* Default gateway IP address configuration. Used in ipconfigUSE_DNS is set to -0, or ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */ -#define configGATEWAY_ADDR0 10 -#define configGATEWAY_ADDR1 10 -#define configGATEWAY_ADDR2 10 -#define configGATEWAY_ADDR3 1 - -/* Default DNS server configuration. OpenDNS addresses are 208.67.222.222 and -208.67.220.220. Used in ipconfigUSE_DNS is set to 0, or ipconfigUSE_DNS is set -to 1 but a DNS server cannot be contacted.*/ -#define configDNS_SERVER_ADDR0 208 -#define configDNS_SERVER_ADDR1 67 -#define configDNS_SERVER_ADDR2 222 -#define configDNS_SERVER_ADDR3 222 - -/* Default netmask configuration. Used in ipconfigUSE_DNS is set to 0, or -ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */ -#define configNET_MASK0 255 -#define configNET_MASK1 0 -#define configNET_MASK2 0 -#define configNET_MASK3 0 - -/* The UDP port to which print messages are sent. */ -#define configPRINT_PORT ( 15000 ) - -#if( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) ) - /* Map to Windows names. */ - #define snprintf _snprintf - #define vsnprintf _vsnprintf -#endif - -/* Visual studio does not have an implementation of strcasecmp(). */ -#define strcasecmp _stricmp -#define strncasecmp _strnicmp -#define strcmpi _strcmpi - -#define configPRINTF( X ) printf X - -#endif /* FREERTOS_CONFIG_H */ - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSIPConfig.h deleted file mode 100644 index 7092fca6a..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/FreeRTOSIPConfig.h +++ /dev/null @@ -1,307 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - - -/***************************************************************************** - * - * See the following URL for configuration information. - * http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html - * - *****************************************************************************/ - -#ifndef FREERTOS_IP_CONFIG_H -#define FREERTOS_IP_CONFIG_H - -/* Prototype for the function used to print out. In this case it prints to the -console before the network is connected then a UDP port after the network has -connected. */ -extern void vLoggingPrintf( const char *pcFormatString, ... ); - -/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to -1 then FreeRTOS_debug_printf should be defined to the function used to print -out the debugging messages. */ -#define ipconfigHAS_DEBUG_PRINTF 0 -#if( ipconfigHAS_DEBUG_PRINTF == 1 ) - #define FreeRTOS_debug_printf(X) vLoggingPrintf X -#endif - -/* Set to 1 to print out non debugging messages, for example the output of the -FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1 -then FreeRTOS_printf should be set to the function used to print out the -messages. */ -#define ipconfigHAS_PRINTF 0 -#if( ipconfigHAS_PRINTF == 1 ) - #define FreeRTOS_printf(X) vLoggingPrintf X -#endif - -/* Define the byte order of the target MCU (the MCU FreeRTOS+TCP is executing -on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */ -#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN - -/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums) -then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software -stack repeating the checksum calculations. */ -#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1 - -/* Several API's will block until the result is known, or the action has been -performed, for example FreeRTOS_send() and FreeRTOS_recv(). The timeouts can be -set per socket, using setsockopt(). If not set, the times below will be -used as defaults. */ -#define ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME ( 5000 ) -#define ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME ( 5000 ) - -/* Include support for LLMNR: Link-local Multicast Name Resolution -(non-Microsoft) */ -#define ipconfigUSE_LLMNR ( 0 ) - -/* Include support for NBNS: NetBIOS Name Service (Microsoft) */ -#define ipconfigUSE_NBNS ( 0 ) - -/* Include support for DNS caching. For TCP, having a small DNS cache is very -useful. When a cache is present, ipconfigDNS_REQUEST_ATTEMPTS can be kept low -and also DNS may use small timeouts. If a DNS reply comes in after the DNS -socket has been destroyed, the result will be stored into the cache. The next -call to FreeRTOS_gethostbyname() will return immediately, without even creating -a socket. */ -#define ipconfigUSE_DNS_CACHE ( 1 ) -#define ipconfigDNS_CACHE_NAME_LENGTH ( 16 ) -#define ipconfigDNS_CACHE_ENTRIES ( 4 ) -#define ipconfigDNS_REQUEST_ATTEMPTS ( 2 ) - -/* The IP stack executes it its own task (although any application task can make -use of its services through the published sockets API). ipconfigUDP_TASK_PRIORITY -sets the priority of the task that executes the IP stack. The priority is a -standard FreeRTOS task priority so can take any value from 0 (the lowest -priority) to (configMAX_PRIORITIES - 1) (the highest priority). -configMAX_PRIORITIES is a standard FreeRTOS configuration parameter defined in -FreeRTOSConfig.h, not FreeRTOSIPConfig.h. Consideration needs to be given as to -the priority assigned to the task executing the IP stack relative to the -priority assigned to tasks that use the IP stack. */ -#define ipconfigIP_TASK_PRIORITY ( configMAX_PRIORITIES - 2 ) - -/* The size, in words (not bytes), of the stack allocated to the FreeRTOS+TCP -task. This setting is less important when the FreeRTOS Win32 simulator is used -as the Win32 simulator only stores a fixed amount of information on the task -stack. FreeRTOS includes optional stack overflow detection, see: -http://www.freertos.org/Stacks-and-stack-overflow-checking.html */ -#define ipconfigIP_TASK_STACK_SIZE_WORDS ( configMINIMAL_STACK_SIZE * 5 ) - -/* ipconfigRAND32() is called by the IP stack to generate random numbers for -things such as a DHCP transaction number or initial sequence number. Random -number generation is performed via this macro to allow applications to use their -own random number generation method. For example, it might be possible to -generate a random number by sampling noise on an analogue input. */ -extern UBaseType_t uxRand(); -#define ipconfigRAND32() uxRand() - -/* If ipconfigUSE_NETWORK_EVENT_HOOK is set to 1 then FreeRTOS+TCP will call the -network event hook at the appropriate times. If ipconfigUSE_NETWORK_EVENT_HOOK -is not set to 1 then the network event hook will never be called. See -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/API/vApplicationIPNetworkEventHook.shtml -*/ -#define ipconfigUSE_NETWORK_EVENT_HOOK 1 - -/* Sockets have a send block time attribute. If FreeRTOS_sendto() is called but -a network buffer cannot be obtained then the calling task is held in the Blocked -state (so other tasks can continue to executed) until either a network buffer -becomes available or the send block time expires. If the send block time expires -then the send operation is aborted. The maximum allowable send block time is -capped to the value set by ipconfigMAX_SEND_BLOCK_TIME_TICKS. Capping the -maximum allowable send block time prevents prevents a deadlock occurring when -all the network buffers are in use and the tasks that process (and subsequently -free) the network buffers are themselves blocked waiting for a network buffer. -ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in -milliseconds can be converted to a time in ticks by dividing the time in -milliseconds by portTICK_PERIOD_MS. */ -#define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( 5000 / portTICK_PERIOD_MS ) - -/* If ipconfigUSE_DHCP is 1 then FreeRTOS+TCP will attempt to retrieve an IP -address, netmask, DNS server address and gateway address from a DHCP server. If -ipconfigUSE_DHCP is 0 then FreeRTOS+TCP will use a static IP address. The -stack will revert to using the static IP address even when ipconfigUSE_DHCP is -set to 1 if a valid configuration cannot be obtained from a DHCP server for any -reason. The static configuration used is that passed into the stack by the -FreeRTOS_IPInit() function call. */ -#define ipconfigUSE_DHCP 0 - -/* When ipconfigUSE_DHCP is set to 1, DHCP requests will be sent out at -increasing time intervals until either a reply is received from a DHCP server -and accepted, or the interval between transmissions reaches -ipconfigMAXIMUM_DISCOVER_TX_PERIOD. The IP stack will revert to using the -static IP address passed as a parameter to FreeRTOS_IPInit() if the -re-transmission time interval reaches ipconfigMAXIMUM_DISCOVER_TX_PERIOD without -a DHCP reply being received. */ -#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 120000 / portTICK_PERIOD_MS ) - -/* The ARP cache is a table that maps IP addresses to MAC addresses. The IP -stack can only send a UDP message to a remove IP address if it knowns the MAC -address associated with the IP address, or the MAC address of the router used to -contact the remote IP address. When a UDP message is received from a remote IP -address the MAC address and IP address are added to the ARP cache. When a UDP -message is sent to a remote IP address that does not already appear in the ARP -cache then the UDP message is replaced by a ARP message that solicits the -required MAC address information. ipconfigARP_CACHE_ENTRIES defines the maximum -number of entries that can exist in the ARP table at any one time. */ -#define ipconfigARP_CACHE_ENTRIES 6 - -/* ARP requests that do not result in an ARP response will be re-transmitted a -maximum of ipconfigMAX_ARP_RETRANSMISSIONS times before the ARP request is -aborted. */ -#define ipconfigMAX_ARP_RETRANSMISSIONS ( 5 ) - -/* ipconfigMAX_ARP_AGE defines the maximum time between an entry in the ARP -table being created or refreshed and the entry being removed because it is stale. -New ARP requests are sent for ARP cache entries that are nearing their maximum -age. ipconfigMAX_ARP_AGE is specified in tens of seconds, so a value of 150 is -equal to 1500 seconds (or 25 minutes). */ -#define ipconfigMAX_ARP_AGE 150 - -/* Implementing FreeRTOS_inet_addr() necessitates the use of string handling -routines, which are relatively large. To save code space the full -FreeRTOS_inet_addr() implementation is made optional, and a smaller and faster -alternative called FreeRTOS_inet_addr_quick() is provided. FreeRTOS_inet_addr() -takes an IP in decimal dot format (for example, "192.168.0.1") as its parameter. -FreeRTOS_inet_addr_quick() takes an IP address as four separate numerical octets -(for example, 192, 168, 0, 1) as its parameters. If -ipconfigINCLUDE_FULL_INET_ADDR is set to 1 then both FreeRTOS_inet_addr() and -FreeRTOS_indet_addr_quick() are available. If ipconfigINCLUDE_FULL_INET_ADDR is -not set to 1 then only FreeRTOS_indet_addr_quick() is available. */ -#define ipconfigINCLUDE_FULL_INET_ADDR 1 - -/* ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS defines the total number of network buffer that -are available to the IP stack. The total number of network buffers is limited -to ensure the total amount of RAM that can be consumed by the IP stack is capped -to a pre-determinable value. */ -#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 60 - -/* A FreeRTOS queue is used to send events from application tasks to the IP -stack. ipconfigEVENT_QUEUE_LENGTH sets the maximum number of events that can -be queued for processing at any one time. The event queue must be a minimum of -5 greater than the total number of network buffers. */ -#define ipconfigEVENT_QUEUE_LENGTH ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 ) - -/* The address of a socket is the combination of its IP address and its port -number. FreeRTOS_bind() is used to manually allocate a port number to a socket -(to 'bind' the socket to a port), but manual binding is not normally necessary -for client sockets (those sockets that initiate outgoing connections rather than -wait for incoming connections on a known port number). If -ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 1 then calling -FreeRTOS_sendto() on a socket that has not yet been bound will result in the IP -stack automatically binding the socket to a port number from the range -socketAUTO_PORT_ALLOCATION_START_NUMBER to 0xffff. If -ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 0 then calling FreeRTOS_sendto() -on a socket that has not yet been bound will result in the send operation being -aborted. */ -#define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1 - -/* Defines the Time To Live (TTL) values used in outgoing UDP packets. */ -#define ipconfigUDP_TIME_TO_LIVE 128 -#define ipconfigTCP_TIME_TO_LIVE 128 /* also defined in FreeRTOSIPConfigDefaults.h */ - -/* USE_TCP: Use TCP and all its features */ -#define ipconfigUSE_TCP ( 1 ) - -/* USE_WIN: Let TCP use windowing mechanism. */ -#define ipconfigUSE_TCP_WIN ( 1 ) - -/* The MTU is the maximum number of bytes the payload of a network frame can -contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a -lower value can save RAM, depending on the buffer management scheme used. If -ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must -be divisible by 8. */ -#define ipconfigNETWORK_MTU 1200 - -/* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used -through the FreeRTOS_gethostbyname() API function. */ -#define ipconfigUSE_DNS 1 - -/* If ipconfigREPLY_TO_INCOMING_PINGS is set to 1 then the IP stack will -generate replies to incoming ICMP echo (ping) requests. */ -#define ipconfigREPLY_TO_INCOMING_PINGS 1 - -/* If ipconfigSUPPORT_OUTGOING_PINGS is set to 1 then the -FreeRTOS_SendPingRequest() API function is available. */ -#define ipconfigSUPPORT_OUTGOING_PINGS 0 - -/* If ipconfigSUPPORT_SELECT_FUNCTION is set to 1 then the FreeRTOS_select() -(and associated) API function is available. */ -#define ipconfigSUPPORT_SELECT_FUNCTION 1 - -/* If ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES is set to 1 then Ethernet frames -that are not in Ethernet II format will be dropped. This option is included for -potential future IP stack developments. */ -#define ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES 1 - -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1 then it is the -responsibility of the Ethernet interface to filter out packets that are of no -interest. If the Ethernet interface does not implement this functionality, then -set ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES to 0 to have the IP stack -perform the filtering instead (it is much less efficient for the stack to do it -because the packet will already have been passed into the stack). If the -Ethernet driver does all the necessary filtering in hardware then software -filtering can be removed by using a value other than 1 or 0. */ -#define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1 - -/* The windows simulator cannot really simulate MAC interrupts, and needs to -block occasionally to allow other tasks to run. */ -#define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 20 / portTICK_PERIOD_MS ) - -/* Advanced only: in order to access 32-bit fields in the IP packets with -32-bit memory instructions, all packets will be stored 32-bit-aligned, plus 16-bits. -This has to do with the contents of the IP-packets: all 32-bit fields are -32-bit-aligned, plus 16-bit(!) */ -#define ipconfigPACKET_FILLER_SIZE 2 - -/* Define the size of the pool of TCP window descriptors. On the average, each -TCP socket will use up to 2 x 6 descriptors, meaning that it can have 2 x 6 -outstanding packets (for Rx and Tx). When using up to 10 TP sockets -simultaneously, one could define TCP_WIN_SEG_COUNT as 120. */ -#define ipconfigTCP_WIN_SEG_COUNT 240 - -/* Each TCP socket has a circular buffers for Rx and Tx, which have a fixed -maximum size. Define the size of Rx buffer for TCP sockets. */ -#define ipconfigTCP_RX_BUFFER_LENGTH ( 1000 ) - -/* Define the size of Tx buffer for TCP sockets. */ -#define ipconfigTCP_TX_BUFFER_LENGTH ( 1000 ) - -/* When using call-back handlers, the driver may check if the handler points to -real program memory (RAM or flash) or just has a random non-zero value. */ -#define ipconfigIS_VALID_PROG_ADDRESS(x) ( (x) != NULL ) - -/* Include support for TCP hang protection. All sockets in a connecting or -disconnecting stage will timeout after a period of non-activity. */ -#define ipconfigTCP_HANG_PROTECTION ( 1 ) -#define ipconfigTCP_HANG_PROTECTION_TIME ( 30 ) - -/* Include support for TCP keep-alive messages. */ -#define ipconfigTCP_KEEP_ALIVE ( 1 ) -#define ipconfigTCP_KEEP_ALIVE_INTERVAL ( 20 ) /* in seconds */ - -#define portINLINE __inline - -#endif /* FREERTOS_IP_CONFIG_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/READ_ME_INSTRUCTIONS.url b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/READ_ME_INSTRUCTIONS.url deleted file mode 100644 index c00147b27..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/READ_ME_INSTRUCTIONS.url +++ /dev/null @@ -1,6 +0,0 @@ -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,11 -[InternetShortcut] -IDList= -URL=https://www.freertos.org/task-pool/ -HotKey=0 diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj deleted file mode 100644 index 7f9596ad3..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {C686325E-3261-42F7-AEB1-DDE5280E1CEB} - RTOSDemo - 10.0 - - - - Application - false - MultiByte - v142 - - - Application - false - MultiByte - v142 - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\Debug\ - .\Debug\ - true - .\Release\ - .\Release\ - false - AllRules.ruleset - - - - .\Debug/WIN32.tlb - - - - - Disabled - ..\..\..\Source\FreeRTOS-Plus-TCP\include;..\..\..\Source\FreeRTOS-Plus-TCP\portable\BufferManagement;..\..\..\Source\FreeRTOS-Plus-TCP\portable\Compiler\MSVC;.\DemoTasks\include;.\WinPCap;..\..\..\..\FreeRTOS\Source\include;..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW;..\..\..\Source\FreeRTOS-IoT-Libraries\c_sdk\standard\common\include;..\..\..\Source\FreeRTOS-IoT-Libraries\abstractions\platform\include;..\..\..\Source\FreeRTOS-IoT-Libraries\abstractions\platform\freertos\include;.;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDLL - .\Debug/WIN32.pch - .\Debug/ - .\Debug/ - .\Debug/ - Level4 - true - false - EditAndContinue - /wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 %(AdditionalOptions) - true - NotUsing - false - CompileAsC - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c09 - - - .\Debug/RTOSDemo.exe - true - true - .\Debug/WIN32.pdb - Console - MachineX86 - wpcap.lib;%(AdditionalDependencies) - .\WinPCap - false - false - - - true - .\Debug/WIN32.bsc - - - - - .\Release/WIN32.tlb - - - - - MaxSpeed - OnlyExplicitInline - _WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - MultiThreaded - true - .\Release/WIN32.pch - .\Release/ - .\Release/ - .\Release/ - Level3 - true - ..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\..\Source\include;..\..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c09 - - - .\Release/RTOSDemo.exe - true - .\Release/WIN32.pdb - Console - MachineX86 - ..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap - wpcap.lib;%(AdditionalDependencies) - - - true - .\Release/WIN32.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj.filters b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj.filters deleted file mode 100644 index 3653a6cbe..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WIN32.vcxproj.filters +++ /dev/null @@ -1,260 +0,0 @@ - - - - - {38712199-cebf-4124-bf15-398f7c3419ea} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {af3445a1-4908-4170-89ed-39345d90d30c} - - - {f32be356-4763-4cae-9020-974a2638cb08} - *.c - - - {88f409e6-d396-4ac5-94bd-7a99c914be46} - - - {e5ad4ec7-23dc-4295-8add-2acaee488f5a} - - - {d2dcd641-8d91-492b-852f-5563ffadaec6} - - - {8672fa26-b119-481f-8b8d-086419c01a3e} - - - {4570be11-ec96-4b55-ac58-24b50ada980a} - - - {5d93ed51-023a-41ad-9243-8d230165d34b} - - - {b71e974a-9f28-4815-972b-d930ba8a34d0} - - - {60717407-397f-4ea5-8492-3314acdd25f0} - - - {8a90222f-d723-4b4e-8e6e-c57afaf7fa92} - - - {7c995f05-2a10-4771-ad77-18a755876e46} - - - {e07288b6-a8e7-416a-947d-7f0260673dcc} - - - {9a636cc3-ebc6-48c5-8c18-c72494686e81} - - - {fe53a296-12ec-4819-bf2b-fd9dca2c6e96} - - - {29376c48-bc8b-4624-ad59-16807874c9f2} - - - {91ef4008-de51-4b41-ba5e-bf24d8cda378} - - - {ade43c6c-04c5-4897-abdb-91af2df04e5d} - - - {08a4e35c-19ca-4b1e-af24-bac368c2bf7b} - - - {1fc5fc25-c18b-45a2-bad3-0c07795db1e9} - - - {f3a69e5b-1462-4e19-8651-274e86c252b0} - - - {9a849d9e-91e5-4035-ab4c-70a986c6aed1} - - - {1e324500-91b4-4c76-b699-59ba75691760} - - - {bdcbc1ec-99b8-4c72-9075-49035c115488} - - - {35ce7745-52a2-4220-be31-50dfaa35c0ab} - - - {6c8bc003-a388-4666-99f4-a31faa932a36} - - - - - FreeRTOS\Source\Portable - - - FreeRTOS\Source - - - FreeRTOS\Source - - - FreeRTOS\Source - - - FreeRTOS\Source - - - DemoTasks - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP\portable - - - FreeRTOS+\FreeRTOS+TCP\portable - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS+\FreeRTOS+TCP - - - FreeRTOS\Source - - - FreeRTOS\Source\Portable - - - - FreeRTOS+\FreeRTOS+TCP - - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\task_pool - - - DemoTasks - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\logging - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\freertos - - - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS+\FreeRTOS+TCP\include - - - - - FreeRTOS+\FreeRTOS+TCP\include - - - FreeRTOS\Source\include - - - FreeRTOS\Source\include - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\types - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - FreeRTOS+\FreeRTOS IoT Libraries\standard\common\include\private - - - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\include\types - - - FreeRTOS+\FreeRTOS IoT Libraries\abstractions\platform\freertos\include\platform\types - - - \ No newline at end of file diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Packet32.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Packet32.h deleted file mode 100644 index 1e0eacd77..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Packet32.h +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** @ingroup packetapi - * @{ - */ - -/** @defgroup packet32h Packet.dll definitions and data structures - * Packet32.h contains the data structures and the definitions used by packet.dll. - * The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included - * by the applications that use the functions of this library - * @{ - */ - -#ifndef __PACKET32 -#define __PACKET32 - -#include - -#ifdef HAVE_AIRPCAP_API -#include -#else -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */ -#endif /* HAVE_AIRPCAP_API */ - -#ifdef HAVE_DAG_API -#include -#endif /* HAVE_DAG_API */ - -// Working modes -#define PACKET_MODE_CAPT 0x0 ///< Capture mode -#define PACKET_MODE_STAT 0x1 ///< Statistical mode -#define PACKET_MODE_MON 0x2 ///< Monitoring mode -#define PACKET_MODE_DUMP 0x10 ///< Dump mode -#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode - - -/// Alignment macro. Defines the alignment size. -#define Packet_ALIGNMENT sizeof(int) -/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. -#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1)) - -#define NdisMediumNull -1 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumCHDLC -2 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPPPSerial -3 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumBare80211 -4 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumRadio80211 -5 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPpi -6 ///< Custom linktype: NDIS doesn't provide an equivalent - -// Loopback behaviour definitions -#define NPF_DISABLE_LOOPBACK 1 ///< Drop the packets sent by the NPF driver -#define NPF_ENABLE_LOOPBACK 2 ///< Capture the packets sent by the NPF driver - -/*! - \brief Network type structure. - - This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed. -*/ -typedef struct NetType -{ - UINT LinkType; ///< The MAC of the current network adapter (see function PacketGetNetType() for more information) - ULONGLONG LinkSpeed; ///< The speed of the network in bits per second -}NetType; - - -//some definitions stolen from libpcap - -#ifndef BPF_MAJOR_VERSION - -/*! - \brief A BPF pseudo-assembly program. - - The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. -*/ -struct bpf_program -{ - UINT bf_len; ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow. - struct bpf_insn *bf_insns; ///< A pointer to the first instruction of the program. -}; - -/*! - \brief A single BPF pseudo-instruction. - - bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver. -*/ -struct bpf_insn -{ - USHORT code; ///< Instruction type and addressing mode. - UCHAR jt; ///< Jump if true - UCHAR jf; ///< Jump if false - int k; ///< Generic field used for various purposes. -}; - -/*! - \brief Structure that contains a couple of statistics values on the current capture. - - It is used by packet.dll to return statistics about a capture session. -*/ -struct bpf_stat -{ - UINT bs_recv; ///< Number of packets that the driver received from the network adapter - ///< from the beginning of the current capture. This value includes the packets - ///< lost by the driver. - UINT bs_drop; ///< number of packets that the driver lost from the beginning of a capture. - ///< Basically, a packet is lost when the the buffer of the driver is full. - ///< In this situation the packet cannot be stored and the driver rejects it. - UINT ps_ifdrop; ///< drops by interface. XXX not yet supported - UINT bs_capt; ///< number of packets that pass the filter, find place in the kernel buffer and - ///< thus reach the application. -}; - -/*! - \brief Packet header. - - This structure defines the header associated with every packet delivered to the application. -*/ -struct bpf_hdr -{ - struct timeval bh_tstamp; ///< The timestamp associated with the captured packet. - ///< It is stored in a TimeVal structure. - UINT bh_caplen; ///< Length of captured portion. The captured portion can be different - ///< from the original packet, because it is possible (with a proper filter) - ///< to instruct the driver to capture only a portion of the packets. - UINT bh_datalen; ///< Original length of packet - USHORT bh_hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, - ///< a padding could be added between the end of this structure and the packet - ///< data for performance reasons. This filed can be used to retrieve the actual data - ///< of the packet. -}; - -/*! - \brief Dump packet header. - - This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets(). - It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a - packet in a dump file. This makes straightforward sending WinPcap dump files to the network. -*/ -struct dump_bpf_hdr{ - struct timeval ts; ///< Time stamp of the packet - UINT caplen; ///< Length of captured portion. The captured portion can smaller than the - ///< the original packet, because it is possible (with a proper filter) to - ///< instruct the driver to capture only a portion of the packets. - UINT len; ///< Length of the original packet (off wire). -}; - - -#endif - -struct bpf_stat; - -#define DOSNAMEPREFIX TEXT("Packet_") ///< Prefix added to the adapters device names to create the WinPcap devices -#define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links -#define NMAX_PACKET 65535 - -/*! - \brief Addresses of a network adapter. - - This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with - an adapter. -*/ -typedef struct npf_if_addr { - struct sockaddr_storage IPAddress; ///< IP address. - struct sockaddr_storage SubnetMask; ///< Netmask for that address. - struct sockaddr_storage Broadcast; ///< Broadcast address. -}npf_if_addr; - - -#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API. -#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API. -#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. -#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. - - -typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API -typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API - -#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter -#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET -#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card -#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file -#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones. -#define INFO_FLAG_AIRPCAP_CARD 16 ///< Flag for ADAPTER_INFO: this is an airpcap card -#define INFO_FLAG_NPFIM_DEVICE 32 - -/*! - \brief Describes an opened network adapter. - - This structure is the most important for the functioning of packet.dll, but the great part of its fields - should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters -*/ -typedef struct _ADAPTER { - HANDLE hFile; ///< \internal Handle to an open instance of the NPF driver. - CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened. - int NumWrites; ///< \internal Number of times a packets written on this adapter will be repeated - ///< on the wire. - HANDLE ReadEvent; ///< A notification event associated with the read calls on the adapter. - ///< It can be passed to standard Win32 functions (like WaitForSingleObject - ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some - ///< data. It is particularly useful in GUI applications that need to wait - ///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy() - ///< function can be used to define the minimum amount of data in the kernel buffer - ///< that will cause the event to be signalled. - - UINT ReadTimeOut; ///< \internal The amount of time after which a read on the driver will be released and - ///< ReadEvent will be signaled, also if no packets were captured - CHAR Name[ADAPTER_NAME_LENGTH]; - PWAN_ADAPTER pWanAdapter; - UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. - -#ifdef HAVE_AIRPCAP_API - PAirpcapHandle AirpcapAd; -#endif // HAVE_AIRPCAP_API - -#ifdef HAVE_NPFIM_API - void* NpfImHandle; -#endif // HAVE_NPFIM_API - -#ifdef HAVE_DAG_API - dagc_t *pDagCard; ///< Pointer to the dagc API adapter descriptor for this adapter - PCHAR DagBuffer; ///< Pointer to the buffer with the packets that is received from the DAG card - struct timeval DagReadTimeout; ///< Read timeout. The dagc API requires a timeval structure - unsigned DagFcsLen; ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry - DWORD DagFastProcess; ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps). -#endif // HAVE_DAG_API -} ADAPTER, *LPADAPTER; - -/*! - \brief Structure that contains a group of packets coming from the driver. - - This structure defines the header associated with every packet delivered to the application. -*/ -typedef struct _PACKET { - HANDLE hEvent; ///< \deprecated Still present for compatibility with old applications. - OVERLAPPED OverLapped; ///< \deprecated Still present for compatibility with old applications. - PVOID Buffer; ///< Buffer with containing the packets. See the PacketReceivePacket() for - ///< details about the organization of the data in this buffer - UINT Length; ///< Length of the buffer - DWORD ulBytesReceived; ///< Number of valid bytes present in the buffer, i.e. amount of data - ///< received by the last call to PacketReceivePacket() - BOOLEAN bIoComplete; ///< \deprecated Still present for compatibility with old applications. -} PACKET, *LPPACKET; - -/*! - \brief Structure containing an OID request. - - It is used by the PacketRequest() function to send an OID to the interface card driver. - It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, - the list of the multicast groups defined on it, and so on. -*/ -struct _PACKET_OID_DATA { - ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h - ///< for a complete list of valid codes. - ULONG Length; ///< Length of the data field - UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received - ///< from the adapter. -}; -typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @} - */ - -/* -BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName, - CHAR *Value, - UINT *pValueLen, - CHAR *DefaultVal); - -BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName, - WCHAR *Value, - UINT *pValueLen, - WCHAR *DefaultVal); -*/ - -//--------------------------------------------------------------------------- -// EXPORTED FUNCTIONS -//--------------------------------------------------------------------------- - -PCHAR PacketGetVersion(); -PCHAR PacketGetDriverVersion(); -BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes); -BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites); -BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode); -BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout); -BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp); -BOOLEAN PacketSetLoopbackBehavior(LPADAPTER AdapterObject, UINT LoopbackBehavior); -INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen); -BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim); -BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type); -LPADAPTER PacketOpenAdapter(PCHAR AdapterName); -BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync); -INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync); -LPPACKET PacketAllocatePacket(void); -VOID PacketInitPacket(LPPACKET lpPacket,PVOID Buffer,UINT Length); -VOID PacketFreePacket(LPPACKET lpPacket); -BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync); -BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter); -BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize); -BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries); -BOOLEAN PacketRequest(LPADAPTER AdapterObject,BOOLEAN Set,PPACKET_OID_DATA OidData); -HANDLE PacketGetReadEvent(LPADAPTER AdapterObject); -BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len); -BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks); -BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync); -BOOL PacketStopDriver(); -VOID PacketCloseAdapter(LPADAPTER lpAdapter); -BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength); -BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags); -PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject); - -// -// Used by PacketStartOemEx -// -#define PACKET_START_OEM_NO_NETMON 0x00000001 - -#ifdef __cplusplus -} -#endif - -#endif //__PACKET32 diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/PacketData.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/PacketData.h deleted file mode 100644 index 8124db66d..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/PacketData.h +++ /dev/null @@ -1,267 +0,0 @@ -char pkt1[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x30, 0x09, 0x9c, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x07, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x35, 0x00, 0x00, 0x00, 0x00, 0x70, 0x02, -0x40, 0x00, 0xdf, 0xab, 0x00, 0x00, 0x02, 0x04, -0x05, 0xb4, 0x01, 0x01, 0x04, 0x02 }; - -char pkt2[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa6, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt3[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0x9e, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x0d, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x36, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt4[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x02, 0x27, 0x09, 0x9f, 0x40, 0x00, 0x80, 0x06, -0x6d, 0x0d, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x36, 0x00, 0x00, 0x06, 0x69, 0x50, 0x18, -0x42, 0xd8, 0x84, 0x3e, 0x00, 0x00, 0x47, 0x45, -0x54, 0x20, 0x2f, 0x20, 0x48, 0x54, 0x54, 0x50, -0x2f, 0x31, 0x2e, 0x31, 0x0d, 0x0a, 0x41, 0x63, -0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0x2c, -0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, -0x2d, 0x78, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70, -0x2c, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, -0x6a, 0x70, 0x65, 0x67, 0x2c, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x70, 0x6a, 0x70, 0x65, -0x67, 0x2c, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, -0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, -0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x65, 0x78, -0x63, 0x65, 0x6c, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x6d, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2c, -0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, -0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x6f, 0x77, 0x65, -0x72, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x20, -0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, -0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, -0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x70, -0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, -0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x78, -0x62, 0x61, 0x70, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, -0x78, 0x70, 0x73, 0x64, 0x6f, 0x63, 0x75, 0x6d, -0x65, 0x6e, 0x74, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x78, 0x61, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, -0x6c, 0x2c, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x4c, -0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, -0x20, 0x65, 0x6e, 0x2d, 0x67, 0x62, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x45, -0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3a, -0x20, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x20, 0x64, -0x65, 0x66, 0x6c, 0x61, 0x74, 0x65, 0x0d, 0x0a, -0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, -0x6e, 0x74, 0x3a, 0x20, 0x4d, 0x6f, 0x7a, 0x69, -0x6c, 0x6c, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x20, -0x28, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, -0x62, 0x6c, 0x65, 0x3b, 0x20, 0x4d, 0x53, 0x49, -0x45, 0x20, 0x36, 0x2e, 0x30, 0x3b, 0x20, 0x57, -0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x4e, -0x54, 0x20, 0x35, 0x2e, 0x31, 0x3b, 0x20, 0x53, -0x56, 0x31, 0x3b, 0x20, 0x47, 0x6f, 0x6f, 0x67, -0x6c, 0x65, 0x54, 0x35, 0x3b, 0x20, 0x2e, 0x4e, -0x45, 0x54, 0x20, 0x43, 0x4c, 0x52, 0x20, 0x32, -0x2e, 0x30, 0x2e, 0x35, 0x30, 0x37, 0x32, 0x37, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x30, 0x2e, 0x30, -0x34, 0x35, 0x30, 0x36, 0x2e, 0x36, 0x34, 0x38, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x35, 0x2e, 0x32, -0x31, 0x30, 0x32, 0x32, 0x29, 0x0d, 0x0a, 0x48, -0x6f, 0x73, 0x74, 0x3a, 0x20, 0x31, 0x39, 0x32, -0x2e, 0x31, 0x36, 0x38, 0x2e, 0x30, 0x2e, 0x31, -0x32, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, -0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4b, -0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, -0x65, 0x0d, 0x0a, 0x0d, 0x0a }; - -char pkt5[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x02, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa5, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt6[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa1, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x0a, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt7[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x02, 0x27, 0x09, 0xa2, 0x40, 0x00, 0x80, 0x06, -0x6d, 0x0a, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc7, 0x36, 0x00, 0x00, 0x06, 0x69, 0x50, 0x18, -0x42, 0xd8, 0x84, 0x3e, 0x00, 0x00, 0x47, 0x45, -0x54, 0x20, 0x2f, 0x20, 0x48, 0x54, 0x54, 0x50, -0x2f, 0x31, 0x2e, 0x31, 0x0d, 0x0a, 0x41, 0x63, -0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0x2c, -0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, -0x2d, 0x78, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70, -0x2c, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, -0x6a, 0x70, 0x65, 0x67, 0x2c, 0x20, 0x69, 0x6d, -0x61, 0x67, 0x65, 0x2f, 0x70, 0x6a, 0x70, 0x65, -0x67, 0x2c, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, -0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, -0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x65, 0x78, -0x63, 0x65, 0x6c, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x6d, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2c, -0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, -0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x6f, 0x77, 0x65, -0x72, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x20, -0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, -0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, -0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, -0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x70, -0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, -0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x78, -0x62, 0x61, 0x70, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, -0x78, 0x70, 0x73, 0x64, 0x6f, 0x63, 0x75, 0x6d, -0x65, 0x6e, 0x74, 0x2c, 0x20, 0x61, 0x70, 0x70, -0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x2f, 0x78, 0x61, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, -0x6c, 0x2c, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x4c, -0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, -0x20, 0x65, 0x6e, 0x2d, 0x67, 0x62, 0x0d, 0x0a, -0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x45, -0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3a, -0x20, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x20, 0x64, -0x65, 0x66, 0x6c, 0x61, 0x74, 0x65, 0x0d, 0x0a, -0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, -0x6e, 0x74, 0x3a, 0x20, 0x4d, 0x6f, 0x7a, 0x69, -0x6c, 0x6c, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x20, -0x28, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, -0x62, 0x6c, 0x65, 0x3b, 0x20, 0x4d, 0x53, 0x49, -0x45, 0x20, 0x36, 0x2e, 0x30, 0x3b, 0x20, 0x57, -0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x4e, -0x54, 0x20, 0x35, 0x2e, 0x31, 0x3b, 0x20, 0x53, -0x56, 0x31, 0x3b, 0x20, 0x47, 0x6f, 0x6f, 0x67, -0x6c, 0x65, 0x54, 0x35, 0x3b, 0x20, 0x2e, 0x4e, -0x45, 0x54, 0x20, 0x43, 0x4c, 0x52, 0x20, 0x32, -0x2e, 0x30, 0x2e, 0x35, 0x30, 0x37, 0x32, 0x37, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x30, 0x2e, 0x30, -0x34, 0x35, 0x30, 0x36, 0x2e, 0x36, 0x34, 0x38, -0x3b, 0x20, 0x2e, 0x4e, 0x45, 0x54, 0x20, 0x43, -0x4c, 0x52, 0x20, 0x33, 0x2e, 0x35, 0x2e, 0x32, -0x31, 0x30, 0x32, 0x32, 0x29, 0x0d, 0x0a, 0x48, -0x6f, 0x73, 0x74, 0x3a, 0x20, 0x31, 0x39, 0x32, -0x2e, 0x31, 0x36, 0x38, 0x2e, 0x30, 0x2e, 0x31, -0x32, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, -0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4b, -0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, -0x65, 0x0d, 0x0a, 0x0d, 0x0a }; - -char pkt8[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x03, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa4, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt9[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa3, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x08, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt10[] = { -0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01, -0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00, -0x00, 0x2c, 0x00, 0x04, 0x00, 0x00, 0x40, 0x06, -0xf8, 0xa3, 0xc0, 0xa8, 0x00, 0x0c, 0xc0, 0xa8, -0x00, 0xc8, 0x00, 0x50, 0x0f, 0xe2, 0x00, 0x00, -0x06, 0x68, 0x09, 0xe7, 0xc7, 0x36, 0x60, 0x12, -0x05, 0x92, 0x28, 0xca, 0x00, 0x00, 0x02, 0x04, -0x05, 0x92 }; - -char pkt11[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa6, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x05, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x10, -0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00 }; - -char pkt12[] = { -0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14, -0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00, -0x00, 0x28, 0x09, 0xa7, 0x40, 0x00, 0x80, 0x06, -0x6f, 0x04, 0xc0, 0xa8, 0x00, 0xc8, 0xc0, 0xa8, -0x00, 0x0c, 0x0f, 0xe2, 0x00, 0x50, 0x09, 0xe7, -0xc9, 0x35, 0x00, 0x00, 0x06, 0x69, 0x50, 0x14, -0x00, 0x00, 0x43, 0xf4, 0x00, 0x00 }; - - -typedef struct -{ - char *pcData; - int iDataLen; -} xPacketData; - -xPacketData xAllPackets[] = -{ - { pkt1, sizeof( pkt1 ) }, -// { pkt2, sizeof( pkt2 ) }, - { pkt3, sizeof( pkt3 ) }, - { pkt4, sizeof( pkt4 ) }, -// { pkt5, sizeof( pkt5 ) }, - { pkt6, sizeof( pkt6 ) }, - { pkt7, sizeof( pkt7 ) }, - { pkt8, sizeof( pkt8 ) }, - { pkt9, sizeof( pkt9 ) }, - { pkt10, sizeof( pkt10 ) }, -// { pkt11, sizeof( pkt11 ) }, -// { pkt12, sizeof( pkt12 ) }, -// { pkt13, sizeof( pkt13 ) }, -// { pkt14, sizeof( pkt14 ) }, -// { pkt15, sizeof( pkt15 ) }, -// { pkt16, sizeof( pkt16 ) }, -}; diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Win32-Extensions.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Win32-Extensions.h deleted file mode 100644 index be71c85e9..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/Win32-Extensions.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef __WIN32_EXTENSIONS_H__ -#define __WIN32_EXTENSIONS_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Definitions */ - -/*! - \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). -*/ -struct pcap_send_queue -{ - u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field. - u_int len; ///< Current size of the queue, in bytes. - char *buffer; ///< Buffer containing the packets to be sent. -}; - -typedef struct pcap_send_queue pcap_send_queue; - -/*! - \brief This typedef is a support for the pcap_get_airpcap_handle() function -*/ -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif - -#define BPF_MEM_EX_IMM 0xc0 -#define BPF_MEM_EX_IND 0xe0 - -/*used for ST*/ -#define BPF_MEM_EX 0xc0 -#define BPF_TME 0x08 - -#define BPF_LOOKUP 0x90 -#define BPF_EXECUTE 0xa0 -#define BPF_INIT 0xb0 -#define BPF_VALIDATE 0xc0 -#define BPF_SET_ACTIVE 0xd0 -#define BPF_RESET 0xe0 -#define BPF_SET_MEMORY 0x80 -#define BPF_GET_REGISTER_VALUE 0x70 -#define BPF_SET_REGISTER_VALUE 0x60 -#define BPF_SET_WORKING 0x50 -#define BPF_SET_ACTIVE_READ 0x40 -#define BPF_SET_AUTODELETION 0x30 -#define BPF_SEPARATION 0xff - -/* Prototypes */ -pcap_send_queue* pcap_sendqueue_alloc(u_int memsize); - -void pcap_sendqueue_destroy(pcap_send_queue* queue); - -int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data); - -u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync); - -HANDLE pcap_getevent(pcap_t *p); - -struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size); - -int pcap_setuserbuffer(pcap_t *p, int size); - -int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks); - -int pcap_live_dump_ended(pcap_t *p, int sync); - -int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int pcap_start_oem(char* err_str, int flags); - -PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p); - -#ifdef __cplusplus -} -#endif - -#endif //__WIN32_EXTENSIONS_H__ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/arch.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/arch.c deleted file mode 100644 index d704da800..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/arch.c +++ /dev/null @@ -1,336 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* WinPCap includes. */ -#include "pcap.h" -#include "remote-ext.h" - -/* uIP includes. */ -#include "net/uip.h" -#include "net/uip_arp.h" -#include "net/clock-arch.h" - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" - -/* - * Query the computer the simulation is being executed on to find the network - * interfaces it has installed. - */ -static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ); - -/* - * Open the network interface. The number of the interface to be opened is set - * by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. - */ -static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ); - -/* - * Configure the capture filter to allow blocking reads, and to filter out - * packets that are not of interest to this demo. - */ -static void prvConfigureCaptureBehaviour( void ); - -pcap_t *pxOpenedInterfaceHandle = NULL; -LARGE_INTEGER freq, sys_start_time; - -#define archNUM_BUFFERS 5 -#define archNUM_BUFFER_POINTERS ( archNUM_BUFFERS - 1 ) - -static void prvInterruptSimulator( void *pvParameters ); - -static unsigned char ucEthernetBuffer[ archNUM_BUFFERS ][ UIP_CONF_BUFFER_SIZE ]; -static unsigned char *pucEthernetBufferPointers[ archNUM_BUFFER_POINTERS ]; - -static long lLengthOfDataInBuffer[ archNUM_BUFFER_POINTERS ] = { 0 }; -static unsigned char ucNextBufferToFill = 0U, ucNextBufferToProcess = 0U; - -unsigned char *uip_buf = NULL; -char cErrorBuffer[PCAP_ERRBUF_SIZE]; - -void vNetifTx( void ) -{ - pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len ); - pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len ); -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxNetifRx( void ) -{ -UBaseType_t xDataLen; -unsigned char *pucTemp; - - /* Check there is really data available. */ - xDataLen = lLengthOfDataInBuffer[ ucNextBufferToProcess ]; - if( xDataLen != 0L ) - { - - /* The buffer pointed to by uip_buf is going to change. Remember which - buffer uip_buf is currently pointing to. */ - pucTemp = uip_buf; - - /* Point uip_buf at the next buffer that contains data. */ - uip_buf = pucEthernetBufferPointers[ ucNextBufferToProcess ]; - - /* The buffer pointed to by - pucEthernetBufferPointeres[ ucNextBufferToProcess ] is now in use by - uip_buf, but the buffer uip_buf was pointing to on entry to this - function is free. Set - pucEthernetBufferPointeres[ ucNextBufferToProcess ] to the free - buffer. */ - pucEthernetBufferPointers[ ucNextBufferToProcess ] = pucTemp; - lLengthOfDataInBuffer[ ucNextBufferToProcess ] = 0L; - - ucNextBufferToProcess++; - if( ucNextBufferToProcess >= archNUM_BUFFER_POINTERS ) - { - ucNextBufferToProcess = 0L; - } - } - - return xDataLen; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetifInit( void ) -{ -BaseType_t x; -pcap_if_t *pxAllNetworkInterfaces; - - /* Allocate a free buffer to each buffer pointer. */ - for( x = 0; x < sizeof( pucEthernetBufferPointers ) / sizeof( unsigned char * ); x++ ) - { - pucEthernetBufferPointers[ x ] = &( ucEthernetBuffer[ x ][ 0 ] ); - } - - /* Start with uip_buf pointing to a buffer that is not referenced from the - pucEthernetBufferPointers[] array. */ - uip_buf = &( ucEthernetBuffer[ archNUM_BUFFERS - 1 ][ 0 ] ); - - /* Query the computer the simulation is being executed on to find the - network interfaces it has installed. */ - pxAllNetworkInterfaces = prvPrintAvailableNetworkInterfaces(); - - /* Open the network interface. The number of the interface to be opened is - set by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. - Calling this function will set the pxOpenedInterfaceHandle variable. If, - after calling this function, pxOpenedInterfaceHandle is equal to NULL, then - the interface could not be opened. */ - if( pxAllNetworkInterfaces != NULL ) - { - prvOpenSelectedNetworkInterface( pxAllNetworkInterfaces ); - } - - - return x; -} -/*-----------------------------------------------------------*/ - -static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ) -{ -pcap_if_t * pxAllNetworkInterfaces = NULL, *xInterface; -long lInterfaceNumber = 1; - - if( pcap_findalldevs_ex( PCAP_SRC_IF_STRING, NULL, &pxAllNetworkInterfaces, cErrorBuffer ) == -1 ) - { - printf( "\r\nCould not obtain a list of network interfaces\r\n%s\r\n", cErrorBuffer ); - pxAllNetworkInterfaces = NULL; - } - - if( pxAllNetworkInterfaces != NULL ) - { - /* Print out the list of network interfaces. The first in the list - is interface '1', not interface '0'. */ - for( xInterface = pxAllNetworkInterfaces; xInterface != NULL; xInterface = xInterface->next ) - { - printf( "%d. %s", lInterfaceNumber, xInterface->name ); - - if( xInterface->description != NULL ) - { - printf( " (%s)\r\n", xInterface->description ); - } - else - { - printf( " (No description available)\r\n") ; - } - - lInterfaceNumber++; - } - } - - if( lInterfaceNumber == 1 ) - { - /* The interface number was never incremented, so the above for() loop - did not execute meaning no interfaces were found. */ - printf( " \r\nNo network interfaces were found.\r\n" ); - pxAllNetworkInterfaces = NULL; - } - - printf( "\r\nThe interface that will be opened is set by configNETWORK_INTERFACE_TO_USE which should be defined in FreeRTOSConfig.h\r\n" ); - printf( "Attempting to open interface number %d.\r\n", configNETWORK_INTERFACE_TO_USE ); - - if( ( configNETWORK_INTERFACE_TO_USE < 1L ) || ( configNETWORK_INTERFACE_TO_USE > lInterfaceNumber ) ) - { - printf("\r\nconfigNETWORK_INTERFACE_TO_USE is not in the valid range.\r\n" ); - - if( pxAllNetworkInterfaces != NULL ) - { - /* Free the device list, as no devices are going to be opened. */ - pcap_freealldevs( pxAllNetworkInterfaces ); - pxAllNetworkInterfaces = NULL; - } - } - - return pxAllNetworkInterfaces; -} -/*-----------------------------------------------------------*/ - -static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ) -{ -pcap_if_t *xInterface; -long x; - - /* Walk the list of devices until the selected device is located. */ - xInterface = pxAllNetworkInterfaces; - for( x = 0L; x < ( configNETWORK_INTERFACE_TO_USE - 1L ); x++ ) - { - xInterface = xInterface->next; - } - - /* Open the selected interface. */ - pxOpenedInterfaceHandle = pcap_open( xInterface->name, /* The name of the selected interface. */ - UIP_CONF_BUFFER_SIZE, /* The size of the packet to capture. */ - PCAP_OPENFLAG_PROMISCUOUS, /* Open in promiscious mode as the MAC and - IP address is going to be "simulated", and - not be the real MAC and IP address. This allows - trafic to the simulated IP address to be routed - to uIP, and trafic to the real IP address to be - routed to the Windows TCP/IP stack. */ - 0xfffffffL, /* The read time out. This is going to block - until data is available. */ - NULL, /* No authentication is required as this is - not a remote capture session. */ - cErrorBuffer - ); - - if ( pxOpenedInterfaceHandle == NULL ) - { - printf( "\r\n%s is not supported by WinPcap and cannot be opened\r\n", xInterface->name ); - } - else - { - /* Configure the capture filter to allow blocking reads, and to filter - out packets that are not of interest to this demo. */ - prvConfigureCaptureBehaviour(); - } - - /* The device list is no longer required. */ - pcap_freealldevs( pxAllNetworkInterfaces ); -} -/*-----------------------------------------------------------*/ - -static void prvConfigureCaptureBehaviour( void ) -{ -struct bpf_program xFilterCode; -const long lMinBytesToCopy = 10L, lBlocking = 0L; -unsigned long ulNetMask; - - /* Unblock a read as soon as anything is received. */ - pcap_setmintocopy( pxOpenedInterfaceHandle, lMinBytesToCopy ); - - /* Allow blocking. */ - pcap_setnonblock( pxOpenedInterfaceHandle, lBlocking, cErrorBuffer ); - - /* Set up a filter so only the packets of interest are passed to the uIP - stack. cErrorBuffer is used for convenience to create the string. Don't - confuse this with an error message. */ - sprintf( cErrorBuffer, "broadcast or multicast or host %d.%d.%d.%d", configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - - ulNetMask = ( configNET_MASK3 << 24UL ) | ( configNET_MASK2 << 16UL ) | ( configNET_MASK1 << 8L ) | configNET_MASK0; - - if( pcap_compile(pxOpenedInterfaceHandle, &xFilterCode, cErrorBuffer, 1, ulNetMask ) < 0 ) - { - printf("\r\nThe packet filter string is invalid\r\n" ); - } - else - { - if( pcap_setfilter( pxOpenedInterfaceHandle, &xFilterCode ) < 0 ) - { - printf( "\r\nAn error occurred setting the packet filter.\r\n" ); - } - } - - /* Create a task that simulates an interrupt in a real system. This will - block waiting for packets, then send a message to the uIP task when data - is available. */ - xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( configuIP_TASK_PRIORITY - 1 ), NULL ); -} -/*-----------------------------------------------------------*/ - -static void prvInterruptSimulator( void *pvParameters ) -{ -static struct pcap_pkthdr *pxHeader; -const unsigned char *pucPacketData; -extern QueueHandle_t xEMACEventQueue; -const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; -long lResult; - - /* Just to kill the compiler warning. */ - ( void ) pvParameters; - - for( ;; ) - { - /* Get the next packet. */ - lResult = pcap_next_ex( pxOpenedInterfaceHandle, &pxHeader, &pucPacketData ); - if( lResult ) - { - /* Is the next buffer into which data should be placed free? */ - if( lLengthOfDataInBuffer[ ucNextBufferToFill ] == 0L ) - { - /* Copy the data from the captured packet into the buffer. */ - memcpy( pucEthernetBufferPointers[ ucNextBufferToFill ], pucPacketData, pxHeader->len ); - - /* Note the amount of data that was copied. */ - lLengthOfDataInBuffer[ ucNextBufferToFill ] = pxHeader->len; - - /* Move onto the next buffer, wrapping around if necessary. */ - ucNextBufferToFill++; - if( ucNextBufferToFill >= archNUM_BUFFER_POINTERS ) - { - ucNextBufferToFill = 0U; - } - - /* Data was received and stored. Send a message to the uIP task - to let it know. */ - xQueueSendToBack( xEMACEventQueue, &ulRxEvent, portMAX_DELAY ); - } - } - } -} - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/bittypes.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/bittypes.h deleted file mode 100644 index f55fcecfd..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/bittypes.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 1999 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#ifndef _BITTYPES_H -#define _BITTYPES_H - -#ifndef HAVE_U_INT8_T - -#if SIZEOF_CHAR == 1 -typedef unsigned char u_int8_t; -typedef signed char _int8_t; -#elif SIZEOF_INT == 1 -typedef unsigned int u_int8_t; -typedef signed int int8_t; -#else /* XXX */ -#error "there's no appropriate type for u_int8_t" -#endif -#define HAVE_U_INT8_T 1 -#define HAVE_INT8_T 1 - -#endif /* HAVE_U_INT8_T */ - -#ifndef HAVE_U_INT16_T - -#if SIZEOF_SHORT == 2 -typedef unsigned short u_int16_t; -typedef signed short _int16_t; -#elif SIZEOF_INT == 2 -typedef unsigned int u_int16_t; -typedef signed int int16_t; -#elif SIZEOF_CHAR == 2 -typedef unsigned char u_int16_t; -typedef signed char int16_t; -#else /* XXX */ -#error "there's no appropriate type for u_int16_t" -#endif -#define HAVE_U_INT16_T 1 -#define HAVE_INT16_T 1 - -#endif /* HAVE_U_INT16_T */ - -#ifndef HAVE_U_INT32_T - -#if SIZEOF_INT == 4 -typedef unsigned int u_int32_t; -typedef signed int _int32_t; -#elif SIZEOF_LONG == 4 -typedef unsigned long u_int32_t; -typedef signed long int32_t; -#elif SIZEOF_SHORT == 4 -typedef unsigned short u_int32_t; -typedef signed short int32_t; -#else /* XXX */ -#error "there's no appropriate type for u_int32_t" -#endif -#define HAVE_U_INT32_T 1 -#define HAVE_INT32_T 1 - -#endif /* HAVE_U_INT32_T */ - -#ifndef HAVE_U_INT64_T -#if SIZEOF_LONG_LONG == 8 -typedef unsigned long long u_int64_t; -typedef long long int64_t; -#elif defined(_MSC_EXTENSIONS) -typedef unsigned _int64 u_int64_t; -typedef _int64 int64_t; -#elif SIZEOF_INT == 8 -typedef unsigned int u_int64_t; -#elif SIZEOF_LONG == 8 -typedef unsigned long u_int64_t; -#elif SIZEOF_SHORT == 8 -typedef unsigned short u_int64_t; -#else /* XXX */ -#error "there's no appropriate type for u_int64_t" -#endif - -#endif /* HAVE_U_INT64_T */ - -#ifndef PRId64 -#ifdef _MSC_EXTENSIONS -#define PRId64 "I64d" -#else /* _MSC_EXTENSIONS */ -#define PRId64 "lld" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRId64 */ - -#ifndef PRIo64 -#ifdef _MSC_EXTENSIONS -#define PRIo64 "I64o" -#else /* _MSC_EXTENSIONS */ -#define PRIo64 "llo" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIo64 */ - -#ifndef PRIx64 -#ifdef _MSC_EXTENSIONS -#define PRIx64 "I64x" -#else /* _MSC_EXTENSIONS */ -#define PRIx64 "llx" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIx64 */ - -#ifndef PRIu64 -#ifdef _MSC_EXTENSIONS -#define PRIu64 "I64u" -#else /* _MSC_EXTENSIONS */ -#define PRIu64 "llu" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIu64 */ - -#endif /* _BITTYPES_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/ip6_misc.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/ip6_misc.h deleted file mode 100644 index 562fa6184..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/ip6_misc.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 1993, 1994, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL) - */ - -/* - * This file contains a collage of declarations for IPv6 from FreeBSD not present in Windows - */ - -#include - -#include - -#ifndef __MINGW32__ -#define IN_MULTICAST(a) IN_CLASSD(a) -#endif - -#define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000) - -#define IN_LOOPBACKNET 127 - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) -/* IPv6 address */ -struct in6_addr - { - union - { - u_int8_t u6_addr8[16]; - u_int16_t u6_addr16[8]; - u_int32_t u6_addr32[4]; - } in6_u; -#define s6_addr in6_u.u6_addr8 -#define s6_addr16 in6_u.u6_addr16 -#define s6_addr32 in6_u.u6_addr32 -#define s6_addr64 in6_u.u6_addr64 - }; - -#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } -#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } -#endif /* __MINGW32__ */ - - -#if (defined _MSC_VER) || (defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)) -typedef unsigned short sa_family_t; -#endif - - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -/* Ditto, for IPv6. */ -struct sockaddr_in6 - { - __SOCKADDR_COMMON (sin6_); - u_int16_t sin6_port; /* Transport layer port # */ - u_int32_t sin6_flowinfo; /* IPv6 flow information */ - struct in6_addr sin6_addr; /* IPv6 address */ - }; - -#define IN6_IS_ADDR_V4MAPPED(a) \ - ((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \ - (((u_int32_t *) (a))[2] == htonl (0xffff))) - -#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff) - -#define IN6_IS_ADDR_LINKLOCAL(a) \ - ((((u_int32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000)) - -#define IN6_IS_ADDR_LOOPBACK(a) \ - (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \ - ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1)) -#endif /* __MINGW32__ */ - -#define ip6_vfc ip6_ctlun.ip6_un2_vfc -#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow -#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen -#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt -#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim -#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim - -#define nd_rd_type nd_rd_hdr.icmp6_type -#define nd_rd_code nd_rd_hdr.icmp6_code -#define nd_rd_cksum nd_rd_hdr.icmp6_cksum -#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] - -/* - * IPV6 extension headers - */ -#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ -#define IPPROTO_IPV6 41 /* IPv6 header. */ -#define IPPROTO_ROUTING 43 /* IPv6 routing header */ -#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ -#define IPPROTO_ESP 50 /* encapsulating security payload */ -#define IPPROTO_AH 51 /* authentication header */ -#define IPPROTO_ICMPV6 58 /* ICMPv6 */ -#define IPPROTO_NONE 59 /* IPv6 no next header */ -#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ -#define IPPROTO_PIM 103 /* Protocol Independent Multicast. */ - -#define IPV6_RTHDR_TYPE_0 0 - -/* Option types and related macros */ -#define IP6OPT_PAD1 0x00 /* 00 0 00000 */ -#define IP6OPT_PADN 0x01 /* 00 0 00001 */ -#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */ -#define IP6OPT_JUMBO_LEN 6 -#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */ - -#define IP6OPT_RTALERT_LEN 4 -#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */ -#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */ -#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ -#define IP6OPT_MINLEN 2 - -#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */ -#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */ -#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */ -#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */ -#define IP6OPT_EID 0x8a /* 10 0 01010 */ - -#define IP6OPT_TYPE(o) ((o) & 0xC0) -#define IP6OPT_TYPE_SKIP 0x00 -#define IP6OPT_TYPE_DISCARD 0x40 -#define IP6OPT_TYPE_FORCEICMP 0x80 -#define IP6OPT_TYPE_ICMP 0xC0 - -#define IP6OPT_MUTABLE 0x20 - - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) -#ifndef EAI_ADDRFAMILY -struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ - size_t ai_addrlen; /* length of ai_addr */ - char *ai_canonname; /* canonical name for hostname */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ -}; -#endif -#endif /* __MINGW32__ */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/netif.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/netif.h deleted file mode 100644 index 8fe539376..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/netif.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef NET_IF_H -#define NET_IF_H - -/* - * Send uip_len bytes from uip_buf to the network interface selected by the - * configNETWORK_INTERFACE_TO_USE constant (defined in FreeRTOSConfig.h). - */ -void vNetifTx( void ); - -/* - * Receive bytes from the network interface selected by the - * configNETWORK_INTERFACE_TO_USE constant (defined in FreeRTOSConfig.h). The - * bytes are placed in uip_buf. The number of bytes copied into uip_buf is - * returned. - */ -UBaseType_t uxNetifRx( void ); - -/* - * Prepare a packet capture session. This will print out all the network - * interfaces available, and the one actually used is set by the - * configNETWORK_INTERFACE_TO_USE constant that is defined in - * FreeRTOSConfig.h. */ -BaseType_t xNetifInit( void ); - -#endif /* NET_IF_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-bpf.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-bpf.h deleted file mode 100644 index 5fe129dbb..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-bpf.h +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.50 2007/04/01 21:43:55 guy Exp $ (LBL) - */ - -/* - * For backwards compatibility. - * - * Note to OS vendors: do NOT get rid of this file! Some applications - * might expect to be able to include . - */ -#include diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-namedb.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-namedb.h deleted file mode 100644 index 80a2f0040..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-namedb.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1994, 1996 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.13 2006/10/04 18:13:32 guy Exp $ (LBL) - */ - -/* - * For backwards compatibility. - * - * Note to OS vendors: do NOT get rid of this file! Some applications - * might expect to be able to include . - */ -#include diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-stdinc.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-stdinc.h deleted file mode 100644 index cbd62d169..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap-stdinc.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL) - */ - -#define SIZEOF_CHAR 1 -#define SIZEOF_SHORT 2 -#define SIZEOF_INT 4 -#ifndef _MSC_EXTENSIONS -#define SIZEOF_LONG_LONG 8 -#endif - -/* - * Avoids a compiler warning in case this was already defined - * (someone defined _WINSOCKAPI_ when including 'windows.h', in order - * to prevent it from including 'winsock.h') - */ -#ifdef _WINSOCKAPI_ -#undef _WINSOCKAPI_ -#endif -#include - -#include - -#include "bittypes.h" -#include -#include - -#ifndef __MINGW32__ -#include "IP6_misc.h" -#endif - -#define caddr_t char* - -#if _MSC_VER < 1500 -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#define strdup _strdup -#endif - -#define inline __inline - -#ifdef __MINGW32__ -#include -#else /*__MINGW32__*/ -/* MSVC compiler */ -#ifndef _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef _W64 unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif - -#ifndef _INTPTR_T_DEFINED -#ifdef _WIN64 -typedef __int64 intptr_t; -#else -typedef _W64 int intptr_t; -#endif -#define _INTPTR_T_DEFINED -#endif - -#endif /*__MINGW32__*/ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap.h deleted file mode 100644 index 935f9494c..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL) - */ - -/* - * For backwards compatibility. - * - * Note to OS vendors: do NOT get rid of this file! Many applications - * expect to be able to include , and at least some of them - * go through contortions in their configure scripts to try to detect - * OSes that have "helpfully" moved pcap.h to without - * leaving behind a file. - */ -#include diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bluetooth.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bluetooth.h deleted file mode 100644 index 7bf65df03..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bluetooth.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2006 Paolo Abeni (Italy) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * bluetooth data struct - * By Paolo Abeni - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $ - */ - -#ifndef _PCAP_BLUETOOTH_STRUCTS_H__ -#define _PCAP_BLUETOOTH_STRUCTS_H__ - -/* - * Header prepended libpcap to each bluetooth h:4 frame. - * fields are in network byte order - */ -typedef struct _pcap_bluetooth_h4_header { - u_int32_t direction; /* if first bit is set direction is incoming */ -} pcap_bluetooth_h4_header; - - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bpf.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bpf.h deleted file mode 100644 index 9f4ca33e3..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/bpf.h +++ /dev/null @@ -1,934 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)bpf.h 7.1 (Berkeley) 5/7/91 - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.8 2008-09-22 20:16:01 guy Exp $ (LBL) - */ - -/* - * This is libpcap's cut-down version of bpf.h; it includes only - * the stuff needed for the code generator and the userland BPF - * interpreter, and the libpcap APIs for setting filters, etc.. - * - * "pcap-bpf.c" will include the native OS version, as it deals with - * the OS's BPF implementation. - * - * XXX - should this all just be moved to "pcap.h"? - */ - -#ifndef BPF_MAJOR_VERSION - -#ifdef __cplusplus -extern "C" { -#endif - -/* BSD style release date */ -#define BPF_RELEASE 199606 - -#ifdef MSDOS /* must be 32-bit */ -typedef long bpf_int32; -typedef unsigned long bpf_u_int32; -#else -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -/* - * Alignment macros. BPF_WORDALIGN rounds up to the next - * even multiple of BPF_ALIGNMENT. - */ -#ifndef __NetBSD__ -#define BPF_ALIGNMENT sizeof(bpf_int32) -#else -#define BPF_ALIGNMENT sizeof(long) -#endif -#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) - -#define BPF_MAXBUFSIZE 0x8000 -#define BPF_MINBUFSIZE 32 - -/* - * Structure for "pcap_compile()", "pcap_setfilter()", etc.. - */ -struct bpf_program { - u_int bf_len; - struct bpf_insn *bf_insns; -}; - -/* - * Struct return by BIOCVERSION. This represents the version number of - * the filter language described by the instruction encodings below. - * bpf understands a program iff kernel_major == filter_major && - * kernel_minor >= filter_minor, that is, if the value returned by the - * running kernel has the same major number and a minor number equal - * equal to or less than the filter being downloaded. Otherwise, the - * results are undefined, meaning an error may be returned or packets - * may be accepted haphazardly. - * It has nothing to do with the source code version. - */ -struct bpf_version { - u_short bv_major; - u_short bv_minor; -}; -/* Current version number of filter architecture. */ -#define BPF_MAJOR_VERSION 1 -#define BPF_MINOR_VERSION 1 - -/* - * Data-link level type codes. - * - * Do *NOT* add new values to this list without asking - * "tcpdump-workers@lists.tcpdump.org" for a value. Otherwise, you run - * the risk of using a value that's already being used for some other - * purpose, and of having tools that read libpcap-format captures not - * being able to handle captures with your new DLT_ value, with no hope - * that they will ever be changed to do so (as that would destroy their - * ability to read captures using that value for that other purpose). - */ - -/* - * These are the types that are the same on all platforms, and that - * have been defined by for ages. - */ -#define DLT_NULL 0 /* BSD loopback encapsulation */ -#define DLT_EN10MB 1 /* Ethernet (10Mb) */ -#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ -#define DLT_AX25 3 /* Amateur Radio AX.25 */ -#define DLT_PRONET 4 /* Proteon ProNET Token Ring */ -#define DLT_CHAOS 5 /* Chaos */ -#define DLT_IEEE802 6 /* 802.5 Token Ring */ -#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ -#define DLT_SLIP 8 /* Serial Line IP */ -#define DLT_PPP 9 /* Point-to-point Protocol */ -#define DLT_FDDI 10 /* FDDI */ - -/* - * These are types that are different on some platforms, and that - * have been defined by for ages. We use #ifdefs to - * detect the BSDs that define them differently from the traditional - * libpcap - * - * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS, - * but I don't know what the right #define is for BSD/OS. - */ -#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */ - -#ifdef __OpenBSD__ -#define DLT_RAW 14 /* raw IP */ -#else -#define DLT_RAW 12 /* raw IP */ -#endif - -/* - * Given that the only OS that currently generates BSD/OS SLIP or PPP - * is, well, BSD/OS, arguably everybody should have chosen its values - * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they - * didn't. So it goes. - */ -#if defined(__NetBSD__) || defined(__FreeBSD__) -#ifndef DLT_SLIP_BSDOS -#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ -#endif -#else -#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ -#endif - -/* - * 17 is used for DLT_OLD_PFLOG in OpenBSD; - * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below. - * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else. - */ - -#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ - -/* - * Apparently Redback uses this for its SmartEdge 400/800. I hope - * nobody else decided to use it, too. - */ -#define DLT_REDBACK_SMARTEDGE 32 - -/* - * These values are defined by NetBSD; other platforms should refrain from - * using them for other purposes, so that NetBSD savefiles with link - * types of 50 or 51 can be read as this type on all platforms. - */ -#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ -#define DLT_PPP_ETHER 51 /* PPP over Ethernet */ - -/* - * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses - * a link-layer type of 99 for the tcpdump it supplies. The link-layer - * header has 6 bytes of unknown data, something that appears to be an - * Ethernet type, and 36 bytes that appear to be 0 in at least one capture - * I've seen. - */ -#define DLT_SYMANTEC_FIREWALL 99 - -/* - * Values between 100 and 103 are used in capture file headers as - * link-layer types corresponding to DLT_ types that differ - * between platforms; don't use those values for new DLT_ new types. - */ - -/* - * This value was defined by libpcap 0.5; platforms that have defined - * it with a different value should define it here with that value - - * a link type of 104 in a save file will be mapped to DLT_C_HDLC, - * whatever value that happens to be, so programs will correctly - * handle files with that link type regardless of the value of - * DLT_C_HDLC. - * - * The name DLT_C_HDLC was used by BSD/OS; we use that name for source - * compatibility with programs written for BSD/OS. - * - * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, - * for source compatibility with programs written for libpcap 0.5. - */ -#define DLT_C_HDLC 104 /* Cisco HDLC */ -#define DLT_CHDLC DLT_C_HDLC - -#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ - -/* - * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW, - * except when it isn't. (I.e., sometimes it's just raw IP, and - * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL, - * so that we don't have to worry about the link-layer header.) - */ - -/* - * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides - * with other values. - * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header - * (DLCI, etc.). - */ -#define DLT_FRELAY 107 - -/* - * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except - * that the AF_ type in the link-layer header is in network byte order. - * - * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so - * we don't use 12 for it in OSes other than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_LOOP 12 -#else -#define DLT_LOOP 108 -#endif - -/* - * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's - * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other - * than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_ENC 13 -#else -#define DLT_ENC 109 -#endif - -/* - * Values between 110 and 112 are reserved for use in capture file headers - * as link-layer types corresponding to DLT_ types that might differ - * between platforms; don't use those values for new DLT_ types - * other than the corresponding DLT_ types. - */ - -/* - * This is for Linux cooked sockets. - */ -#define DLT_LINUX_SLL 113 - -/* - * Apple LocalTalk hardware. - */ -#define DLT_LTALK 114 - -/* - * Acorn Econet. - */ -#define DLT_ECONET 115 - -/* - * Reserved for use with OpenBSD ipfilter. - */ -#define DLT_IPFILTER 116 - -/* - * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023 - * in SuSE 6.3, so we can't use 17 for it in capture-file headers. - * - * XXX: is there a conflict with DLT_PFSYNC 18 as well? - */ -#ifdef __OpenBSD__ -#define DLT_OLD_PFLOG 17 -#define DLT_PFSYNC 18 -#endif -#define DLT_PFLOG 117 - -/* - * Registered for Cisco-internal use. - */ -#define DLT_CISCO_IOS 118 - -/* - * For 802.11 cards using the Prism II chips, with a link-layer - * header including Prism monitor mode information plus an 802.11 - * header. - */ -#define DLT_PRISM_HEADER 119 - -/* - * Reserved for Aironet 802.11 cards, with an Aironet link-layer header - * (see Doug Ambrisko's FreeBSD patches). - */ -#define DLT_AIRONET_HEADER 120 - -/* - * Reserved for Siemens HiPath HDLC. - */ -#define DLT_HHDLC 121 - -/* - * This is for RFC 2625 IP-over-Fibre Channel. - * - * This is not for use with raw Fibre Channel, where the link-layer - * header starts with a Fibre Channel frame header; it's for IP-over-FC, - * where the link-layer header starts with an RFC 2625 Network_Header - * field. - */ -#define DLT_IP_OVER_FC 122 - -/* - * This is for Full Frontal ATM on Solaris with SunATM, with a - * pseudo-header followed by an AALn PDU. - * - * There may be other forms of Full Frontal ATM on other OSes, - * with different pseudo-headers. - * - * If ATM software returns a pseudo-header with VPI/VCI information - * (and, ideally, packet type information, e.g. signalling, ILMI, - * LANE, LLC-multiplexed traffic, etc.), it should not use - * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump - * and the like don't have to infer the presence or absence of a - * pseudo-header and the form of the pseudo-header. - */ -#define DLT_SUNATM 123 /* Solaris+SunATM */ - -/* - * Reserved as per request from Kent Dahlgren - * for private use. - */ -#define DLT_RIO 124 /* RapidIO */ -#define DLT_PCI_EXP 125 /* PCI Express */ -#define DLT_AURORA 126 /* Xilinx Aurora link layer */ - -/* - * Header for 802.11 plus a number of bits of link-layer information - * including radio information, used by some recent BSD drivers as - * well as the madwifi Atheros driver for Linux. - */ -#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */ - -/* - * Reserved for the TZSP encapsulation, as per request from - * Chris Waters - * TZSP is a generic encapsulation for any other link type, - * which includes a means to include meta-information - * with the packet, e.g. signal strength and channel - * for 802.11 packets. - */ -#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ - -/* - * BSD's ARCNET headers have the source host, destination host, - * and type at the beginning of the packet; that's what's handed - * up to userland via BPF. - * - * Linux's ARCNET headers, however, have a 2-byte offset field - * between the host IDs and the type; that's what's handed up - * to userland via PF_PACKET sockets. - * - * We therefore have to have separate DLT_ values for them. - */ -#define DLT_ARCNET_LINUX 129 /* ARCNET */ - -/* - * Juniper-private data link types, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MLPPP 130 -#define DLT_JUNIPER_MLFR 131 -#define DLT_JUNIPER_ES 132 -#define DLT_JUNIPER_GGSN 133 -#define DLT_JUNIPER_MFR 134 -#define DLT_JUNIPER_ATM2 135 -#define DLT_JUNIPER_SERVICES 136 -#define DLT_JUNIPER_ATM1 137 - -/* - * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund - * . The header that's presented is an Ethernet-like - * header: - * - * #define FIREWIRE_EUI64_LEN 8 - * struct firewire_header { - * u_char firewire_dhost[FIREWIRE_EUI64_LEN]; - * u_char firewire_shost[FIREWIRE_EUI64_LEN]; - * u_short firewire_type; - * }; - * - * with "firewire_type" being an Ethernet type value, rather than, - * for example, raw GASP frames being handed up. - */ -#define DLT_APPLE_IP_OVER_IEEE1394 138 - -/* - * Various SS7 encapsulations, as per a request from Jeff Morriss - * and subsequent discussions. - */ -#define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */ -#define DLT_MTP2 140 /* MTP2, without pseudo-header */ -#define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */ -#define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */ - -/* - * DOCSIS MAC frames. - */ -#define DLT_DOCSIS 143 - -/* - * Linux-IrDA packets. Protocol defined at http://www.irda.org. - * Those packets include IrLAP headers and above (IrLMP...), but - * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy - * framing can be handled by the hardware and depend on the bitrate. - * This is exactly the format you would get capturing on a Linux-IrDA - * interface (irdaX), but not on a raw serial port. - * Note the capture is done in "Linux-cooked" mode, so each packet include - * a fake packet header (struct sll_header). This is because IrDA packet - * decoding is dependant on the direction of the packet (incomming or - * outgoing). - * When/if other platform implement IrDA capture, we may revisit the - * issue and define a real DLT_IRDA... - * Jean II - */ -#define DLT_LINUX_IRDA 144 - -/* - * Reserved for IBM SP switch and IBM Next Federation switch. - */ -#define DLT_IBM_SP 145 -#define DLT_IBM_SN 146 - -/* - * Reserved for private use. If you have some link-layer header type - * that you want to use within your organization, with the capture files - * using that link-layer header type not ever be sent outside your - * organization, you can use these values. - * - * No libpcap release will use these for any purpose, nor will any - * tcpdump release use them, either. - * - * Do *NOT* use these in capture files that you expect anybody not using - * your private versions of capture-file-reading tools to read; in - * particular, do *NOT* use them in products, otherwise you may find that - * people won't be able to use tcpdump, or snort, or Ethereal, or... to - * read capture files from your firewall/intrusion detection/traffic - * monitoring/etc. appliance, or whatever product uses that DLT_ value, - * and you may also find that the developers of those applications will - * not accept patches to let them read those files. - * - * Also, do not use them if somebody might send you a capture using them - * for *their* private type and tools using them for *your* private type - * would have to read them. - * - * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value, - * as per the comment above, and use the type you're given. - */ -#define DLT_USER0 147 -#define DLT_USER1 148 -#define DLT_USER2 149 -#define DLT_USER3 150 -#define DLT_USER4 151 -#define DLT_USER5 152 -#define DLT_USER6 153 -#define DLT_USER7 154 -#define DLT_USER8 155 -#define DLT_USER9 156 -#define DLT_USER10 157 -#define DLT_USER11 158 -#define DLT_USER12 159 -#define DLT_USER13 160 -#define DLT_USER14 161 -#define DLT_USER15 162 - -/* - * For future use with 802.11 captures - defined by AbsoluteValue - * Systems to store a number of bits of link-layer information - * including radio information: - * - * http://www.shaftnet.org/~pizza/software/capturefrm.txt - * - * but it might be used by some non-AVS drivers now or in the - * future. - */ -#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MONITOR 164 - -/* - * Reserved for BACnet MS/TP. - */ -#define DLT_BACNET_MS_TP 165 - -/* - * Another PPP variant as per request from Karsten Keil . - * - * This is used in some OSes to allow a kernel socket filter to distinguish - * between incoming and outgoing packets, on a socket intended to - * supply pppd with outgoing packets so it can do dial-on-demand and - * hangup-on-lack-of-demand; incoming packets are filtered out so they - * don't cause pppd to hold the connection up (you don't want random - * input packets such as port scans, packets from old lost connections, - * etc. to force the connection to stay up). - * - * The first byte of the PPP header (0xff03) is modified to accomodate - * the direction - 0x00 = IN, 0x01 = OUT. - */ -#define DLT_PPP_PPPD 166 - -/* - * Names for backwards compatibility with older versions of some PPP - * software; new software should use DLT_PPP_PPPD. - */ -#define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD -#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, cookies, etc.. - */ -#define DLT_JUNIPER_PPPOE 167 -#define DLT_JUNIPER_PPPOE_ATM 168 - -#define DLT_GPRS_LLC 169 /* GPRS LLC */ -#define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ -#define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ - -/* - * Requested by Oolan Zimmer for use in Gcom's T1/E1 line - * monitoring equipment. - */ -#define DLT_GCOM_T1E1 172 -#define DLT_GCOM_SERIAL 173 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_ is used - * for internal communication to Physical Interface Cards (PIC) - */ -#define DLT_JUNIPER_PIC_PEER 174 - -/* - * Link types requested by Gregor Maier of Endace - * Measurement Systems. They add an ERF header (see - * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of - * the link-layer header. - */ -#define DLT_ERF_ETH 175 /* Ethernet */ -#define DLT_ERF_POS 176 /* Packet-over-SONET */ - -/* - * Requested by Daniele Orlandi for raw LAPD - * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header - * includes additional information before the LAPD header, so it's - * not necessarily a generic LAPD header. - */ -#define DLT_LINUX_LAPD 177 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ are used for prepending meta-information - * like interface index, interface name - * before standard Ethernet, PPP, Frelay & C-HDLC Frames - */ -#define DLT_JUNIPER_ETHER 178 -#define DLT_JUNIPER_PPP 179 -#define DLT_JUNIPER_FRELAY 180 -#define DLT_JUNIPER_CHDLC 181 - -/* - * Multi Link Frame Relay (FRF.16) - */ -#define DLT_MFR 182 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * voice Adapter Card (PIC) - */ -#define DLT_JUNIPER_VP 183 - -/* - * Arinc 429 frames. - * DLT_ requested by Gianluca Varenni . - * Every frame contains a 32bit A429 label. - * More documentation on Arinc 429 can be found at - * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf - */ -#define DLT_A429 184 - -/* - * Arinc 653 Interpartition Communication messages. - * DLT_ requested by Gianluca Varenni . - * Please refer to the A653-1 standard for more information. - */ -#define DLT_A653_ICM 185 - -/* - * USB packets, beginning with a USB setup header; requested by - * Paolo Abeni . - */ -#define DLT_USB 186 - -/* - * Bluetooth HCI UART transport layer (part H:4); requested by - * Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4 187 - -/* - * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz - * . - */ -#define DLT_IEEE802_16_MAC_CPS 188 - -/* - * USB packets, beginning with a Linux USB header; requested by - * Paolo Abeni . - */ -#define DLT_USB_LINUX 189 - -/* - * Controller Area Network (CAN) v. 2.0B packets. - * DLT_ requested by Gianluca Varenni . - * Used to dump CAN packets coming from a CAN Vector board. - * More documentation on the CAN v2.0B frames can be found at - * http://www.can-cia.org/downloads/?269 - */ -#define DLT_CAN20B 190 - -/* - * IEEE 802.15.4, with address fields padded, as is done by Linux - * drivers; requested by Juergen Schimmer. - */ -#define DLT_IEEE802_15_4_LINUX 191 - -/* - * Per Packet Information encapsulated packets. - * DLT_ requested by Gianluca Varenni . - */ -#define DLT_PPI 192 - -/* - * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; - * requested by Charles Clancy. - */ -#define DLT_IEEE802_16_MAC_CPS_RADIO 193 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * integrated service module (ISM). - */ -#define DLT_JUNIPER_ISM 194 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing); requested by Mikko Saarnivala . - */ -#define DLT_IEEE802_15_4 195 - -/* - * Various link-layer types, with a pseudo-header, for SITA - * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com). - */ -#define DLT_SITA 196 - -/* - * Various link-layer types, with a pseudo-header, for Endace DAG cards; - * encapsulates Endace ERF records. Requested by Stephen Donnelly - * . - */ -#define DLT_ERF 197 - -/* - * Special header prepended to Ethernet packets when capturing from a - * u10 Networks board. Requested by Phil Mulholland - * . - */ -#define DLT_RAIF1 198 - -/* - * IPMB packet for IPMI, beginning with the I2C slave address, followed - * by the netFn and LUN, etc.. Requested by Chanthy Toeung - * . - */ -#define DLT_IPMB 199 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for capturing data on a secure tunnel interface. - */ -#define DLT_JUNIPER_ST 200 - -/* - * Bluetooth HCI UART transport layer (part H:4), with pseudo-header - * that includes direction information; requested by Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 - -/* - * AX.25 packet with a 1-byte KISS header; see - * - * http://www.ax25.net/kiss.htm - * - * as per Richard Stearn . - */ -#define DLT_AX25_KISS 202 - -/* - * LAPD packets from an ISDN channel, starting with the address field, - * with no pseudo-header. - * Requested by Varuna De Silva . - */ -#define DLT_LAPD 203 - -/* - * Variants of various link-layer headers, with a one-byte direction - * pseudo-header prepended - zero means "received by this host", - * non-zero (any non-zero value) means "sent by this host" - as per - * Will Barker . - */ -#define DLT_PPP_WITH_DIR 204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */ -#define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */ -#define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */ -#define DLT_LAPB_WITH_DIR 207 /* LAPB */ - -/* - * 208 is reserved for an as-yet-unspecified proprietary link-layer - * type, as requested by Will Barker. - */ - -/* - * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman - * . - */ -#define DLT_IPMB_LINUX 209 - -/* - * FlexRay automotive bus - http://www.flexray.com/ - as requested - * by Hannes Kaelber . - */ -#define DLT_FLEXRAY 210 - -/* - * Media Oriented Systems Transport (MOST) bus for multimedia - * transport - http://www.mostcooperation.com/ - as requested - * by Hannes Kaelber . - */ -#define DLT_MOST 211 - -/* - * Local Interconnect Network (LIN) bus for vehicle networks - - * http://www.lin-subbus.org/ - as requested by Hannes Kaelber - * . - */ -#define DLT_LIN 212 - -/* - * X2E-private data link type used for serial line capture, - * as requested by Hannes Kaelber . - */ -#define DLT_X2E_SERIAL 213 - -/* - * X2E-private data link type used for the Xoraya data logger - * family, as requested by Hannes Kaelber . - */ -#define DLT_X2E_XORAYA 214 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing), but with the PHY-level data for non-ASK PHYs (4 octets - * of 0 as preamble, one octet of SFD, one octet of frame length+ - * reserved bit, and then the MAC-layer data, starting with the - * frame control field). - * - * Requested by Max Filippov . - */ -#define DLT_IEEE802_15_4_NONASK_PHY 215 - - -/* - * DLT and savefile link type values are split into a class and - * a member of that class. A class value of 0 indicates a regular - * DLT_/LINKTYPE_ value. - */ -#define DLT_CLASS(x) ((x) & 0x03ff0000) - -/* - * NetBSD-specific generic "raw" link type. The class value indicates - * that this is the generic raw type, and the lower 16 bits are the - * address family we're dealing with. Those values are NetBSD-specific; - * do not assume that they correspond to AF_ values for your operating - * system. - */ -#define DLT_CLASS_NETBSD_RAWAF 0x02240000 -#define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af)) -#define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff) -#define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF) - - -/* - * The instruction encodings. - */ -/* instruction classes */ -#define BPF_CLASS(code) ((code) & 0x07) -#define BPF_LD 0x00 -#define BPF_LDX 0x01 -#define BPF_ST 0x02 -#define BPF_STX 0x03 -#define BPF_ALU 0x04 -#define BPF_JMP 0x05 -#define BPF_RET 0x06 -#define BPF_MISC 0x07 - -/* ld/ldx fields */ -#define BPF_SIZE(code) ((code) & 0x18) -#define BPF_W 0x00 -#define BPF_H 0x08 -#define BPF_B 0x10 -#define BPF_MODE(code) ((code) & 0xe0) -#define BPF_IMM 0x00 -#define BPF_ABS 0x20 -#define BPF_IND 0x40 -#define BPF_MEM 0x60 -#define BPF_LEN 0x80 -#define BPF_MSH 0xa0 - -/* alu/jmp fields */ -#define BPF_OP(code) ((code) & 0xf0) -#define BPF_ADD 0x00 -#define BPF_SUB 0x10 -#define BPF_MUL 0x20 -#define BPF_DIV 0x30 -#define BPF_OR 0x40 -#define BPF_AND 0x50 -#define BPF_LSH 0x60 -#define BPF_RSH 0x70 -#define BPF_NEG 0x80 -#define BPF_JA 0x00 -#define BPF_JEQ 0x10 -#define BPF_JGT 0x20 -#define BPF_JGE 0x30 -#define BPF_JSET 0x40 -#define BPF_SRC(code) ((code) & 0x08) -#define BPF_K 0x00 -#define BPF_X 0x08 - -/* ret - BPF_K and BPF_X also apply */ -#define BPF_RVAL(code) ((code) & 0x18) -#define BPF_A 0x10 - -/* misc */ -#define BPF_MISCOP(code) ((code) & 0xf8) -#define BPF_TAX 0x00 -#define BPF_TXA 0x80 - -/* - * The instruction data structure. - */ -struct bpf_insn { - u_short code; - u_char jt; - u_char jf; - bpf_u_int32 k; -}; - -/* - * Macros for insn array initializers. - */ -#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } -#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } - -#if __STDC__ || defined(__cplusplus) -extern int bpf_validate(const struct bpf_insn *, int); -extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -#else -extern int bpf_validate(); -extern u_int bpf_filter(); -#endif - -/* - * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). - */ -#define BPF_MEMWORDS 16 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/namedb.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/namedb.h deleted file mode 100644 index 9002c7509..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/namedb.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 1994, 1996 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL) - */ - -#ifndef lib_pcap_namedb_h -#define lib_pcap_namedb_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * As returned by the pcap_next_etherent() - * XXX this stuff doesn't belong in this interface, but this - * library already must do name to address translation, so - * on systems that don't have support for /etc/ethers, we - * export these hooks since they'll - */ -struct pcap_etherent { - u_char addr[6]; - char name[122]; -}; -#ifndef PCAP_ETHERS_FILE -#define PCAP_ETHERS_FILE "/etc/ethers" -#endif -struct pcap_etherent *pcap_next_etherent(FILE *); -u_char *pcap_ether_hostton(const char*); -u_char *pcap_ether_aton(const char *); - -bpf_u_int32 **pcap_nametoaddr(const char *); -#ifdef INET6 -struct addrinfo *pcap_nametoaddrinfo(const char *); -#endif -bpf_u_int32 pcap_nametonetaddr(const char *); - -int pcap_nametoport(const char *, int *, int *); -int pcap_nametoportrange(const char *, int *, int *, int *); -int pcap_nametoproto(const char *); -int pcap_nametoeproto(const char *); -int pcap_nametollc(const char *); -/* - * If a protocol is unknown, PROTO_UNDEF is returned. - * Also, pcap_nametoport() returns the protocol along with the port number. - * If there are ambiguous entried in /etc/services (i.e. domain - * can be either tcp or udp) PROTO_UNDEF is returned. - */ -#define PROTO_UNDEF -1 - -/* XXX move these to pcap-int.h? */ -int __pcap_atodn(const char *, bpf_u_int32 *); -int __pcap_atoin(const char *, bpf_u_int32 *); -u_short __pcap_nametodnaddr(const char *); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/pcap.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/pcap.h deleted file mode 100644 index ad8fc40ac..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/pcap.h +++ /dev/null @@ -1,407 +0,0 @@ -/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ -/* - * Copyright (c) 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/pcap.h,v 1.4.2.11 2008-10-06 15:38:39 gianluca Exp $ (LBL) - */ - -#ifndef lib_pcap_pcap_h -#define lib_pcap_pcap_h - -#if defined(WIN32) - #include -#elif defined(MSDOS) - #include - #include /* u_int, u_char etc. */ -#else /* UN*X */ - #include - #include -#endif /* WIN32/MSDOS/UN*X */ - -#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H -#include -#endif - -#include - -#ifdef HAVE_REMOTE - // We have to define the SOCKET here, although it has been defined in sockutils.h - // This is to avoid the distribution of the 'sockutils.h' file around - // (for example in the WinPcap developer's pack) - #ifndef SOCKET - #ifdef WIN32 - #define SOCKET unsigned int - #else - #define SOCKET int - #endif - #endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define PCAP_VERSION_MAJOR 2 -#define PCAP_VERSION_MINOR 4 - -#define PCAP_ERRBUF_SIZE 256 - -/* - * Compatibility for systems that have a bpf.h that - * predates the bpf typedefs for 64-bit support. - */ -#if BPF_RELEASE - 0 < 199406 -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -typedef struct pcap pcap_t; -typedef struct pcap_dumper pcap_dumper_t; -typedef struct pcap_if pcap_if_t; -typedef struct pcap_addr pcap_addr_t; - -/* - * The first record in the file contains saved values for some - * of the flags used in the printout phases of tcpdump. - * Many fields here are 32 bit ints so compilers won't insert unwanted - * padding; these files need to be interchangeable across architectures. - * - * Do not change the layout of this structure, in any way (this includes - * changes that only affect the length of fields in this structure). - * - * Also, do not change the interpretation of any of the members of this - * structure, in any way (this includes using values other than - * LINKTYPE_ values, as defined in "savefile.c", in the "linktype" - * field). - * - * Instead: - * - * introduce a new structure for the new format, if the layout - * of the structure changed; - * - * send mail to "tcpdump-workers@lists.tcpdump.org", requesting - * a new magic number for your new capture file format, and, when - * you get the new magic number, put it in "savefile.c"; - * - * use that magic number for save files with the changed file - * header; - * - * make the code in "savefile.c" capable of reading files with - * the old file header as well as files with the new file header - * (using the magic number to determine the header format). - * - * Then supply the changes as a patch at - * - * http://sourceforge.net/projects/libpcap/ - * - * so that future versions of libpcap and programs that use it (such as - * tcpdump) will be able to read your new capture file format. - */ -struct pcap_file_header { - bpf_u_int32 magic; - u_short version_major; - u_short version_minor; - bpf_int32 thiszone; /* gmt to local correction */ - bpf_u_int32 sigfigs; /* accuracy of timestamps */ - bpf_u_int32 snaplen; /* max length saved portion of each pkt */ - bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */ -}; - -/* - * Macros for the value returned by pcap_datalink_ext(). - * - * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro - * gives the FCS length of packets in the capture. - */ -#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000) -#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28) -#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000) - -typedef enum { - PCAP_D_INOUT = 0, - PCAP_D_IN, - PCAP_D_OUT -} pcap_direction_t; - -/* - * Generic per-packet information, as supplied by libpcap. - * - * The time stamp can and should be a "struct timeval", regardless of - * whether your system supports 32-bit tv_sec in "struct timeval", - * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit - * and 64-bit applications. The on-disk format of savefiles uses 32-bit - * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit - * and 64-bit versions of libpcap, even if they're on the same platform, - * should supply the appropriate version of "struct timeval", even if - * that's not what the underlying packet capture mechanism supplies. - */ -struct pcap_pkthdr { - struct timeval ts; /* time stamp */ - bpf_u_int32 caplen; /* length of portion present */ - bpf_u_int32 len; /* length this packet (off wire) */ -}; - -/* - * As returned by the pcap_stats() - */ -struct pcap_stat { - u_int ps_recv; /* number of packets received */ - u_int ps_drop; /* number of packets dropped */ - u_int ps_ifdrop; /* drops by interface XXX not yet supported */ -#ifdef HAVE_REMOTE - u_int ps_capt; /* number of packets that are received by the application; please get rid off the Win32 ifdef */ - u_int ps_sent; /* number of packets sent by the server on the network */ - u_int ps_netdrop; /* number of packets lost on the network */ -#endif /* HAVE_REMOTE */ -}; - -#ifdef MSDOS -/* - * As returned by the pcap_stats_ex() - */ -struct pcap_stat_ex { - u_long rx_packets; /* total packets received */ - u_long tx_packets; /* total packets transmitted */ - u_long rx_bytes; /* total bytes received */ - u_long tx_bytes; /* total bytes transmitted */ - u_long rx_errors; /* bad packets received */ - u_long tx_errors; /* packet transmit problems */ - u_long rx_dropped; /* no space in Rx buffers */ - u_long tx_dropped; /* no space available for Tx */ - u_long multicast; /* multicast packets received */ - u_long collisions; - - /* detailed rx_errors: */ - u_long rx_length_errors; - u_long rx_over_errors; /* receiver ring buff overflow */ - u_long rx_crc_errors; /* recv'd pkt with crc error */ - u_long rx_frame_errors; /* recv'd frame alignment error */ - u_long rx_fifo_errors; /* recv'r fifo overrun */ - u_long rx_missed_errors; /* recv'r missed packet */ - - /* detailed tx_errors */ - u_long tx_aborted_errors; - u_long tx_carrier_errors; - u_long tx_fifo_errors; - u_long tx_heartbeat_errors; - u_long tx_window_errors; - }; -#endif - -/* - * Item in a list of interfaces. - */ -struct pcap_if { - struct pcap_if *next; - char *name; /* name to hand to "pcap_open_live()" */ - char *description; /* textual description of interface, or NULL */ - struct pcap_addr *addresses; - bpf_u_int32 flags; /* PCAP_IF_ interface flags */ -}; - -#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */ - -/* - * Representation of an interface address. - */ -struct pcap_addr { - struct pcap_addr *next; - struct sockaddr *addr; /* address */ - struct sockaddr *netmask; /* netmask for that address */ - struct sockaddr *broadaddr; /* broadcast address for that address */ - struct sockaddr *dstaddr; /* P2P destination address for that address */ -}; - -typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, - const u_char *); - -/* - * Error codes for the pcap API. - * These will all be negative, so you can check for the success or - * failure of a call that returns these codes by checking for a - * negative value. - */ -#define PCAP_ERROR -1 /* generic error code */ -#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */ -#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */ -#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */ -#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */ -#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */ -#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */ -#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */ -#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */ - -/* - * Warning codes for the pcap API. - * These will all be positive and non-zero, so they won't look like - * errors. - */ -#define PCAP_WARNING 1 /* generic warning code */ -#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */ - -char *pcap_lookupdev(char *); -int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); - -pcap_t *pcap_create(const char *, char *); -int pcap_set_snaplen(pcap_t *, int); -int pcap_set_promisc(pcap_t *, int); -int pcap_can_set_rfmon(pcap_t *); -int pcap_set_rfmon(pcap_t *, int); -int pcap_set_timeout(pcap_t *, int); -int pcap_set_buffer_size(pcap_t *, int); -int pcap_activate(pcap_t *); - -pcap_t *pcap_open_live(const char *, int, int, int, char *); -pcap_t *pcap_open_dead(int, int); -pcap_t *pcap_open_offline(const char *, char *); -#if defined(WIN32) -pcap_t *pcap_hopen_offline(intptr_t, char *); -#if !defined(LIBPCAP_EXPORTS) -#define pcap_fopen_offline(f,b) \ - pcap_hopen_offline(_get_osfhandle(_fileno(f)), b) -#else /*LIBPCAP_EXPORTS*/ -static pcap_t *pcap_fopen_offline(FILE *, char *); -#endif -#else /*WIN32*/ -pcap_t *pcap_fopen_offline(FILE *, char *); -#endif /*WIN32*/ - -void pcap_close(pcap_t *); -int pcap_loop(pcap_t *, int, pcap_handler, u_char *); -int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); -const u_char* - pcap_next(pcap_t *, struct pcap_pkthdr *); -int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **); -void pcap_breakloop(pcap_t *); -int pcap_stats(pcap_t *, struct pcap_stat *); -int pcap_setfilter(pcap_t *, struct bpf_program *); -int pcap_setdirection(pcap_t *, pcap_direction_t); -int pcap_getnonblock(pcap_t *, char *); -int pcap_setnonblock(pcap_t *, int, char *); -int pcap_inject(pcap_t *, const void *, size_t); -int pcap_sendpacket(pcap_t *, const u_char *, int); -const char *pcap_statustostr(int); -const char *pcap_strerror(int); -char *pcap_geterr(pcap_t *); -void pcap_perror(pcap_t *, char *); -int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, - bpf_u_int32); -int pcap_compile_nopcap(int, int, struct bpf_program *, - const char *, int, bpf_u_int32); -void pcap_freecode(struct bpf_program *); -int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *, - const u_char *); -int pcap_datalink(pcap_t *); -int pcap_datalink_ext(pcap_t *); -int pcap_list_datalinks(pcap_t *, int **); -int pcap_set_datalink(pcap_t *, int); -void pcap_free_datalinks(int *); -int pcap_datalink_name_to_val(const char *); -const char *pcap_datalink_val_to_name(int); -const char *pcap_datalink_val_to_description(int); -int pcap_snapshot(pcap_t *); -int pcap_is_swapped(pcap_t *); -int pcap_major_version(pcap_t *); -int pcap_minor_version(pcap_t *); - -/* XXX */ -FILE *pcap_file(pcap_t *); -int pcap_fileno(pcap_t *); - -pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); -pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); -FILE *pcap_dump_file(pcap_dumper_t *); -long pcap_dump_ftell(pcap_dumper_t *); -int pcap_dump_flush(pcap_dumper_t *); -void pcap_dump_close(pcap_dumper_t *); -void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); - -int pcap_findalldevs(pcap_if_t **, char *); -void pcap_freealldevs(pcap_if_t *); - -const char *pcap_lib_version(void); - -/* XXX this guy lives in the bpf tree */ -u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -int bpf_validate(const struct bpf_insn *f, int len); -char *bpf_image(const struct bpf_insn *, int); -void bpf_dump(const struct bpf_program *, int); - -#if defined(WIN32) - -/* - * Win32 definitions - */ - -int pcap_setbuff(pcap_t *p, int dim); -int pcap_setmode(pcap_t *p, int mode); -int pcap_setmintocopy(pcap_t *p, int size); - -#ifdef WPCAP -/* Include file with the wpcap-specific extensions */ -#include -#endif /* WPCAP */ - -#define MODE_CAPT 0 -#define MODE_STAT 1 -#define MODE_MON 2 - -#elif defined(MSDOS) - -/* - * MS-DOS definitions - */ - -int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *); -void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait); -u_long pcap_mac_packets (void); - -#else /* UN*X */ - -/* - * UN*X definitions - */ - -int pcap_get_selectable_fd(pcap_t *); - -#endif /* WIN32/MSDOS/UN*X */ - -#ifdef HAVE_REMOTE -/* Includes most of the public stuff that is needed for the remote capture */ -#include -#endif /* HAVE_REMOTE */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/sll.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/sll.h deleted file mode 100644 index e9d5452af..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/sll.h +++ /dev/null @@ -1,129 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/sll.h,v 1.2.2.1 2008-05-30 01:36:06 guy Exp $ (LBL) - */ - -/* - * For captures on Linux cooked sockets, we construct a fake header - * that includes: - * - * a 2-byte "packet type" which is one of: - * - * LINUX_SLL_HOST packet was sent to us - * LINUX_SLL_BROADCAST packet was broadcast - * LINUX_SLL_MULTICAST packet was multicast - * LINUX_SLL_OTHERHOST packet was sent to somebody else - * LINUX_SLL_OUTGOING packet was sent *by* us; - * - * a 2-byte Ethernet protocol field; - * - * a 2-byte link-layer type; - * - * a 2-byte link-layer address length; - * - * an 8-byte source link-layer address, whose actual length is - * specified by the previous value. - * - * All fields except for the link-layer address are in network byte order. - * - * DO NOT change the layout of this structure, or change any of the - * LINUX_SLL_ values below. If you must change the link-layer header - * for a "cooked" Linux capture, introduce a new DLT_ type (ask - * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it - * a value that collides with a value already being used), and use the - * new header in captures of that type, so that programs that can - * handle DLT_LINUX_SLL captures will continue to handle them correctly - * without any change, and so that capture files with different headers - * can be told apart and programs that read them can dissect the - * packets in them. - */ - -#ifndef lib_pcap_sll_h -#define lib_pcap_sll_h - -/* - * A DLT_LINUX_SLL fake link-layer header. - */ -#define SLL_HDR_LEN 16 /* total header length */ -#define SLL_ADDRLEN 8 /* length of address field */ - -struct sll_header { - u_int16_t sll_pkttype; /* packet type */ - u_int16_t sll_hatype; /* link-layer address type */ - u_int16_t sll_halen; /* link-layer address length */ - u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */ - u_int16_t sll_protocol; /* protocol */ -}; - -/* - * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the - * PACKET_ values on Linux, but are defined here so that they're - * available even on systems other than Linux, and so that they - * don't change even if the PACKET_ values change. - */ -#define LINUX_SLL_HOST 0 -#define LINUX_SLL_BROADCAST 1 -#define LINUX_SLL_MULTICAST 2 -#define LINUX_SLL_OTHERHOST 3 -#define LINUX_SLL_OUTGOING 4 - -/* - * The LINUX_SLL_ values for "sll_protocol"; these correspond to the - * ETH_P_ values on Linux, but are defined here so that they're - * available even on systems other than Linux. We assume, for now, - * that the ETH_P_ values won't change in Linux; if they do, then: - * - * if we don't translate them in "pcap-linux.c", capture files - * won't necessarily be readable if captured on a system that - * defines ETH_P_ values that don't match these values; - * - * if we do translate them in "pcap-linux.c", that makes life - * unpleasant for the BPF code generator, as the values you test - * for in the kernel aren't the values that you test for when - * reading a capture file, so the fixup code run on BPF programs - * handed to the kernel ends up having to do more work. - * - * Add other values here as necessary, for handling packet types that - * might show up on non-Ethernet, non-802.x networks. (Not all the ones - * in the Linux "if_ether.h" will, I suspect, actually show up in - * captures.) - */ -#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */ -#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */ - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/usb.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/usb.h deleted file mode 100644 index adcd19c05..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/usb.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2006 Paolo Abeni (Italy) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Basic USB data struct - * By Paolo Abeni - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $ - */ - -#ifndef _PCAP_USB_STRUCTS_H__ -#define _PCAP_USB_STRUCTS_H__ - -/* - * possible transfer mode - */ -#define URB_TRANSFER_IN 0x80 -#define URB_ISOCHRONOUS 0x0 -#define URB_INTERRUPT 0x1 -#define URB_CONTROL 0x2 -#define URB_BULK 0x3 - -/* - * possible event type - */ -#define URB_SUBMIT 'S' -#define URB_COMPLETE 'C' -#define URB_ERROR 'E' - -/* - * USB setup header as defined in USB specification. - * Appears at the front of each packet in DLT_USB captures. - */ -typedef struct _usb_setup { - u_int8_t bmRequestType; - u_int8_t bRequest; - u_int16_t wValue; - u_int16_t wIndex; - u_int16_t wLength; -} pcap_usb_setup; - - -/* - * Header prepended by linux kernel to each event. - * Appears at the front of each packet in DLT_USB_LINUX captures. - */ -typedef struct _usb_header { - u_int64_t id; - u_int8_t event_type; - u_int8_t transfer_type; - u_int8_t endpoint_number; - u_int8_t device_address; - u_int16_t bus_id; - char setup_flag;/*if !=0 the urb setup header is not present*/ - char data_flag; /*if !=0 no urb data is present*/ - int64_t ts_sec; - int32_t ts_usec; - int32_t status; - u_int32_t urb_len; - u_int32_t data_len; /* amount of urb data really present in this event*/ - pcap_usb_setup setup; -} pcap_usb_header; - - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/vlan.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/vlan.h deleted file mode 100644 index b0cb7949b..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/pcap/vlan.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/vlan.h,v 1.1.2.2 2008-08-06 07:45:59 guy Exp $ - */ - -#ifndef lib_pcap_vlan_h -#define lib_pcap_vlan_h - -struct vlan_tag { - u_int16_t vlan_tpid; /* ETH_P_8021Q */ - u_int16_t vlan_tci; /* VLAN TCI */ -}; - -#define VLAN_TAG_LEN 4 - -#endif diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/remote-ext.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/remote-ext.h deleted file mode 100644 index 9f54d6974..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/remote-ext.h +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright (c) 2002 - 2003 - * NetGroup, Politecnico di Torino (Italy) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef __REMOTE_EXT_H__ -#define __REMOTE_EXT_H__ - - -#ifndef HAVE_REMOTE -#error Please do not include this file directly. Just define HAVE_REMOTE and then include pcap.h -#endif - -// Definition for Microsoft Visual Studio -#if _MSC_VER > 1000 -#pragma once -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*! - \file remote-ext.h - - The goal of this file it to include most of the new definitions that should be - placed into the pcap.h file. - - It includes all new definitions (structures and functions like pcap_open(). - Some of the functions are not really a remote feature, but, right now, - they are placed here. -*/ - - - -// All this stuff is public -/*! \addtogroup remote_struct - \{ -*/ - - - - -/*! - \brief Defines the maximum buffer size in which address, port, interface names are kept. - - In case the adapter name or such is larger than this value, it is truncated. - This is not used by the user; however it must be aware that an hostname / interface - name longer than this value will be truncated. -*/ -#define PCAP_BUF_SIZE 1024 - - -/*! \addtogroup remote_source_ID - \{ -*/ - - -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a file, i.e. the user want to open a capture from a local file. -*/ -#define PCAP_SRC_FILE 2 -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a local interface, i.e. the user want to open a capture from - a local interface. This does not involve the RPCAP protocol. -*/ -#define PCAP_SRC_IFLOCAL 3 -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a remote interface, i.e. the user want to open a capture from - an interface on a remote host. This does involve the RPCAP protocol. -*/ -#define PCAP_SRC_IFREMOTE 4 - -/*! - \} -*/ - - - -/*! \addtogroup remote_source_string - - The formats allowed by the pcap_open() are the following: - - file://path_and_filename [opens a local file] - - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol] - - rpcap://host/devicename [opens the selected device available on a remote host] - - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP] - - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged] - - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged] - - The formats allowed by the pcap_findalldevs_ex() are the following: - - file://folder/ [lists all the files in the given folder] - - rpcap:// [lists all local adapters] - - rpcap://host:port/ [lists the devices available on a remote host] - - Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since - IPv6 is fully supported, these are the allowed formats: - - - host (literal): e.g. host.foo.bar - - host (numeric IPv4): e.g. 10.11.12.13 - - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13] - - host (numeric IPv6): e.g. [1:2:3::4] - - port: can be either numeric (e.g. '80') or literal (e.g. 'http') - - Here you find some allowed examples: - - rpcap://host.foo.bar/devicename [everything literal, no port number] - - rpcap://host.foo.bar:1234/devicename [everything literal, with port number] - - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number] - - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number] - - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number] - - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number] - - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number] - - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number] - - \{ -*/ - - -/*! - \brief String that will be used to determine the type of source in use (file, - remote/local interface). - - This string will be prepended to the interface name in order to create a string - that contains all the information required to open the source. - - This string indicates that the user wants to open a capture from a local file. -*/ -#define PCAP_SRC_FILE_STRING "file://" -/*! - \brief String that will be used to determine the type of source in use (file, - remote/local interface). - - This string will be prepended to the interface name in order to create a string - that contains all the information required to open the source. - - This string indicates that the user wants to open a capture from a network interface. - This string does not necessarily involve the use of the RPCAP protocol. If the - interface required resides on the local host, the RPCAP protocol is not involved - and the local functions are used. -*/ -#define PCAP_SRC_IF_STRING "rpcap://" - -/*! - \} -*/ - - - - - -/*! - \addtogroup remote_open_flags - \{ -*/ - -/*! - \brief Defines if the adapter has to go in promiscuous mode. - - It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise. - Note that even if this parameter is false, the interface could well be in promiscuous - mode for some other reason (for example because another capture process with - promiscuous mode enabled is currently using that interface). - On on Linux systems with 2.2 or later kernels (that have the "any" device), this - flag does not work on the "any" device; if an argument of "any" is supplied, - the 'promisc' flag is ignored. -*/ -#define PCAP_OPENFLAG_PROMISCUOUS 1 - -/*! - \brief Defines if the data trasfer (in case of a remote - capture) has to be done with UDP protocol. - - If it is '1' if you want a UDP data connection, '0' if you want - a TCP data connection; control connection is always TCP-based. - A UDP connection is much lighter, but it does not guarantee that all - the captured packets arrive to the client workstation. Moreover, - it could be harmful in case of network congestion. - This flag is meaningless if the source is not a remote interface. - In that case, it is simply ignored. -*/ -#define PCAP_OPENFLAG_DATATX_UDP 2 - - -/*! - \brief Defines if the remote probe will capture its own generated traffic. - - In case the remote probe uses the same interface to capture traffic and to send - data back to the caller, the captured traffic includes the RPCAP traffic as well. - If this flag is turned on, the RPCAP traffic is excluded from the capture, so that - the trace returned back to the collector is does not include this traffic. -*/ -#define PCAP_OPENFLAG_NOCAPTURE_RPCAP 4 - -/*! - \brief Defines if the local adapter will capture its own generated traffic. - - This flag tells the underlying capture driver to drop the packets that were sent by itself. - This is usefult when building applications like bridges, that should ignore the traffic - they just sent. -*/ -#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8 - -/*! - \brief This flag configures the adapter for maximum responsiveness. - - In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before - copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage, - i.e. better performance, which is good for applications like sniffers. If the user sets the - PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application - is ready to receive them. This is suggested for real time applications (like, for example, a bridge) - that need the best responsiveness.*/ -#define PCAP_OPENFLAG_MAX_RESPONSIVENESS 16 - -/*! - \} -*/ - - -/*! - \addtogroup remote_samp_methods - \{ -*/ - -/*! - \brief No sampling has to be done on the current capture. - - In this case, no sampling algorithms are applied to the current capture. -*/ -#define PCAP_SAMP_NOSAMP 0 - -/*! - \brief It defines that only 1 out of N packets must be returned to the user. - - In this case, the 'value' field of the 'pcap_samp' structure indicates the - number of packets (minus 1) that must be discarded before one packet got accepted. - In other words, if 'value = 10', the first packet is returned to the caller, while - the following 9 are discarded. -*/ -#define PCAP_SAMP_1_EVERY_N 1 - -/*! - \brief It defines that we have to return 1 packet every N milliseconds. - - In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting - time' in milliseconds before one packet got accepted. - In other words, if 'value = 10', the first packet is returned to the caller; the next - returned one will be the first packet that arrives when 10ms have elapsed. -*/ -#define PCAP_SAMP_FIRST_AFTER_N_MS 2 - -/*! - \} -*/ - - -/*! - \addtogroup remote_auth_methods - \{ -*/ - -/*! - \brief It defines the NULL authentication. - - This value has to be used within the 'type' member of the pcap_rmtauth structure. - The 'NULL' authentication has to be equal to 'zero', so that old applications - can just put every field of struct pcap_rmtauth to zero, and it does work. -*/ -#define RPCAP_RMTAUTH_NULL 0 -/*! - \brief It defines the username/password authentication. - - With this type of authentication, the RPCAP protocol will use the username/ - password provided to authenticate the user on the remote machine. If the - authentication is successful (and the user has the right to open network devices) - the RPCAP connection will continue; otherwise it will be dropped. - - This value has to be used within the 'type' member of the pcap_rmtauth structure. -*/ -#define RPCAP_RMTAUTH_PWD 1 - -/*! - \} -*/ - - - - -/*! - - \brief This structure keeps the information needed to autheticate - the user on a remote machine. - - The remote machine can either grant or refuse the access according - to the information provided. - In case the NULL authentication is required, both 'username' and - 'password' can be NULL pointers. - - This structure is meaningless if the source is not a remote interface; - in that case, the functions which requires such a structure can accept - a NULL pointer as well. -*/ -struct pcap_rmtauth -{ - /*! - \brief Type of the authentication required. - - In order to provide maximum flexibility, we can support different types - of authentication based on the value of this 'type' variable. The currently - supported authentication methods are defined into the - \link remote_auth_methods Remote Authentication Methods Section\endlink. - - */ - int type; - /*! - \brief Zero-terminated string containing the username that has to be - used on the remote machine for authentication. - - This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication - and it can be NULL. - */ - char *username; - /*! - \brief Zero-terminated string containing the password that has to be - used on the remote machine for authentication. - - This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication - and it can be NULL. - */ - char *password; -}; - - -/*! - \brief This structure defines the information related to sampling. - - In case the sampling is requested, the capturing device should read - only a subset of the packets coming from the source. The returned packets depend - on the sampling parameters. - - \warning The sampling process is applied after the filtering process. - In other words, packets are filtered first, then the sampling process selects a - subset of the 'filtered' packets and it returns them to the caller. -*/ -struct pcap_samp -{ - /*! - Method used for sampling. Currently, the supported methods are listed in the - \link remote_samp_methods Sampling Methods Section\endlink. - */ - int method; - - /*! - This value depends on the sampling method defined. For its meaning, please check - at the \link remote_samp_methods Sampling Methods Section\endlink. - */ - int value; -}; - - - - -//! Maximum lenght of an host name (needed for the RPCAP active mode) -#define RPCAP_HOSTLIST_SIZE 1024 - - -/*! - \} -*/ // end of public documentation - - -// Exported functions - - - -/** \name New WinPcap functions - - This section lists the new functions that are able to help considerably in writing - WinPcap programs because of their easiness of use. - */ -//\{ -pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf); -int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf); -int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf); -int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf); -struct pcap_samp *pcap_setsampling(pcap_t *p); - -//\} -// End of new winpcap functions - - - -/** \name Remote Capture functions - */ -//\{ -SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf); -int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf); -int pcap_remoteact_close(const char *host, char *errbuf); -void pcap_remoteact_cleanup(); -//\} -// End of remote capture functions - -#ifdef __cplusplus -} -#endif - - -#endif - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/wpcap.lib b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/WinPCap/wpcap.lib deleted file mode 100644 index f832e0445b5c7dafe5a0f887262064265ba2b293..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19320 zcmdU0O>9(05-uRW4k3h)gbS|j4}Uz#t>t&Y%Y)S%rl;4JTp5pCTuoh zr6{Lp73IKQa^QrbD7U>tdx#=VoK`4`_7Fwch+_^p| zS6BDfKh<5`)$NUA`Fde~ylZ#2`x_V>8Oe?2azi67zdwrRhWbZ!@NyRb{1af)Ai(As zfGr;YjQ*f$?=%3>0gMxkW0+_MhKYuM)O4~3fN1X*n)>bm5FNa!=@dc`jeVwR->(2f zr@qm2dK`f0IF?CtuvgRRPmzx_yk67JDF8*E;}+y2(SaM92H(eeAPs$`X>=9#JJEGb+ptfFdaw>e+iq*x`Yiy_8LSsk zPhHb?lqKrHekD4vPE+rP*gr_)Sa+hqpEMo(8T%RO(3GZ$?*SB*@r$$_@rd?+t!Zo@ zjvvxV99NR-y@~cP&F-(99u}FD=x9fbs_AYW3=3tr%W|L_8r?37d|TiVLY~ zEvy9P(zP&>67jfHb#AU)syKqo60(JIwPA#!ut>cUHY?T2Y`I#v8X-CyA=yYsIvgR1 z{ec~7x`z7J_EoXesO6i5`6%5+g-kun7o&6?6lsXL*a+*hi*s{fJrauXgmly&fhf^s z3E4_`-3*NminK;E-)tB(9ge34;dLpXqEaSo&XvkdS!WX$Qnj#NubO6=h)8cV>r%o- zg$#}#%0zWB5s_Y~F4Rh8)(8_zN(7avo*HT-qioC+@^ketEL4l8NE;P0#e6f5+G>={ zMukkHlCL%9t7a5zRLGPXLF4Uwtri*$kqjZXkpEM)9$X9SjZ(D|bw-RQrAw8hw96CH zIB?un6^x}-su3UwQbeQ|7jfC3NgauZcw9Wn7pTvr=@psX2-v zPKxSZ5_y=PnoE_N$P;l>b2RJuN@JnKx{58)m9q&VA1x?B*qjgRVZ~&L@q{!@+G|$O zMuiOZZ>iF(7OFMdSjiHy%7zr}qAKD-YOYi%Vt=CNK_NilssaMOp#PS~G0a z3#jr@2fHjGTg%rQuBgKil48`YO^Y*yd_7#KHp6_O8RQFvux8Xd$xh8vE;W)lG&5CR zE{YZ+xiZSMFke|T8koY@IHd|2`Ept5435N=dVT?dRHmqxp2NoQb4*B>?S@fVJ*ax; z#(FH|ab7p_3pF&AS9m=V93eT2qkmOwwM1MS~zh^OYj+6w(qzK0R@x9xxG+j`OQ@O)YAwXd4wWGVhD0>`FwwU%QhSy`Bsht3yBaP(% ze(43MpxoU(=zYOFA0d4{0I&g1$&>iKwHu(>kDdVhcHwsomUZU@z?X;clzbTAW2BWw z0NzC^?gw}e%b&*d8(7cxv5c>V09Ik$uOp3b!!mjRZsYgctytC>fI7y0LnY-36{Zf7=>XNfjzJf#$Z1jgA3T1 zPr!??4yIuo*25%B!C6=dn_&}df!E4q}7h2Vp-SXex#;FLwXebxMB`=5C9I^9PV8s(AynihM(q47Hlj}F34Yx5 z5?lA>X`GVyBqM>5uRR)q`2Y)!$;$8I=7z=ffJr=%AQ6tTb`!4lnRETAExQINoiFRt&`kb6)zb#5OTk(WXF`3LzuyeV>Hxo-xE;5&wx*TA8>_O0# zmkw~5!tPVa^mwZsG2>X)OyT6P_FY#r`5rUt)woR?W2mOSw@rK-bJ`>O{@4yI%WYCPuf1kaI9X$ zNp*3w@H`qDr?aNs+&Oo2#&Hz0Why()^2D`)wqGhaX1N5xvM@q!8M4BUSkpzx4EynIBam!|lli=G+Mk}qYj1rahg&EpnNTMnkZ z6X;YS&b;BMmJ!Md!^x2hGOWz7`V;-AEPO=~#ptsfeItO|rMA!b4@pA?b9;q` zELR%xFI6w99i(bVQ6qBcEkNU%@)Gd`Z&9+L3Wy4UP

ii zt(#u7(X5F2?uWKuz$0Zt8OJO)7!6qr;{`-mW-ub#&;iOoI?D5ivfQBP z?YRYMzrS+nDC-bqg+bw+zXjsZL+Gm53p&N2Dhi z$sPL*kF_J!=aoO!_oo5a`Wl^G6SWCz8X~fDnjyWbFWEo#2>_LrfpY(yof(M2GuM&^&tn45RTGq64I1es%5IBD_q*{iK;u2FYa$7I6mN$G=TOG^=4LlDoZVf8Mpw z8`>v5@1R6iH=VS|vlhSLVkx(ih2l^~-N<=b^b_Mk`m)-zIUnA+Dq&#M2jgMyAnZo(4AD0*qp9b5G`pq6hCIM%0W!8nw$ z=X{p)l{75!sW3?UZSYVll0YzKHbPhY;~;29sU1>;c0zRY>-XSai;ZdbYZCG=to zq}NeHHZoF*W4Z&(oJadNNlfy2cY@QRZM55d-N8}r^iGgGy0KXzv2)UbaVVp147WIa zljmv+W4U(#jA6SoBbv{mY-KcYyI`T(Ull#QxQ(&o#f1gqP{wxoR*xQmS-4#qq68LyTjtHxo|KwtJB;6=J(Y@(tt?ceEx_3CTXEKlvOJ{NFy#1JrL^z$>YNrb&<@)H8*An#mck^5f7vwn&$@= zl0z9sY}m8Q7*9o{hYgHkLs{`!j2wCD52oO$CleN~{Wa0!-I!oJ@fxE8EMH$9a z4-3eltbOUxmcuD{<_QVov_E zH5QOV8As7)wU0Y^#`|rDZ3!!<#~Pe)(9AO+ZjXh{+AKB$jT}9S zHBXm1z-lq?X#aRxVyQ<_9pHHO31=jZeQssJ+SYsD$#znrB{r%InpH16?K&%w>>DwL zSc1lTMr+DJqo>Fgh(lRh<ClhvL%JxCqKEC=kR{Bh7JE3l N*?W_a?2Af)@;}RMSJ?mn diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.c deleted file mode 100644 index d6a1d2577..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.c +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * Logging utility that allows FreeRTOS tasks to log to a UDP port, stdout, and - * disk file without making any Win32 system calls themselves. - * - * Messages logged to a UDP port are sent directly (using FreeRTOS+TCP), but as - * FreeRTOS tasks cannot make Win32 system calls messages sent to stdout or a - * disk file are sent via a stream buffer to a Win32 thread which then performs - * the actual output. - */ - -/* Standard includes. */ -#include -#include -#include -#include -#include - -/* FreeRTOS includes. */ -#include -#include "task.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_Stream_Buffer.h" - -/* Demo includes. */ -#include "demo_logging.h" - -/*-----------------------------------------------------------*/ - -/* The maximum size to which the log file may grow, before being renamed -to .ful. */ -#define dlLOGGING_FILE_SIZE ( 40ul * 1024ul * 1024ul ) - -/* Dimensions the arrays into which print messages are created. */ -#define dlMAX_PRINT_STRING_LENGTH 255 - -/* The size of the stream buffer used to pass messages from FreeRTOS tasks to -the Win32 thread that is responsible for making any Win32 system calls that are -necessary for the selected logging method. */ -#define dlLOGGING_STREAM_BUFFER_SIZE 32768 - -/* A block time of zero simply means don't block. */ -#define dlDONT_BLOCK 0 - -/*-----------------------------------------------------------*/ - -/* - * Called from vLoggingInit() to start a new disk log file. - */ -static void prvFileLoggingInit( void ); - -/* - * Attempt to write a message to the file. - */ -static void prvLogToFile( const char *pcMessage, size_t xLength ); - -/* - * Simply close the logging file, if it is open. - */ -static void prvFileClose( void ); - -/* - * Before the scheduler is started this function is called directly. After the - * scheduler has started it is called from the Windows thread dedicated to - * outputting log messages. Only the windows thread actually performs the - * writing so as not to disrupt the simulation by making Windows system calls - * from FreeRTOS tasks. - */ -static void prvLoggingFlushBuffer( void ); - -/* - * The windows thread that performs the actual writing of messages that require - * Win32 system calls. Only the windows thread can make system calls so as not - * to disrupt the simulation by making Windows calls from FreeRTOS tasks. - */ -static DWORD WINAPI prvWin32LoggingThread( void *pvParam ); - -/* - * Creates the socket to which UDP messages are sent. This function is not - * called directly to prevent the print socket being created from within the IP - * task - which could result in a deadlock. Instead the function call is - * deferred to run in the RTOS daemon task - hence it prototype. - */ -static void prvCreatePrintSocket( void *pvParameter1, uint32_t ulParameter2 ); - -/*-----------------------------------------------------------*/ - -/* Windows event used to wake the Win32 thread which performs any logging that -needs Win32 system calls. */ -static void *pvLoggingThreadEvent = NULL; - -/* Stores the selected logging targets passed in as parameters to the -vLoggingInit() function. */ -BaseType_t xStdoutLoggingUsed = pdFALSE, xDiskFileLoggingUsed = pdFALSE, xUDPLoggingUsed = pdFALSE; - -/* Circular buffer used to pass messages from the FreeRTOS tasks to the Win32 -thread that is responsible for making Win32 calls (when stdout or a disk log is -used). */ -static StreamBuffer_t *xLogStreamBuffer = NULL; - -/* Handle to the file used for logging. This is left open while there are -messages waiting to be logged, then closed again in between logs. */ -static FILE *pxLoggingFileHandle = NULL; - -/* When true prints are performed directly. After start up xDirectPrint is set -to pdFALSE - at which time prints that require Win32 system calls are done by -the Win32 thread responsible for logging. */ -BaseType_t xDirectPrint = pdTRUE; - -/* File names for the in use and complete (full) log files. */ -static const char *pcLogFileName = "RTOSDemo.log"; -static const char *pcFullLogFileName = "RTOSDemo.ful"; - -/* Keep the current file size in a variable, as an optimisation. */ -static size_t ulSizeOfLoggingFile = 0ul; - -/* The UDP socket and address on/to which print messages are sent. */ -Socket_t xPrintSocket = FREERTOS_INVALID_SOCKET; -struct freertos_sockaddr xPrintUDPAddress; - -/*-----------------------------------------------------------*/ - -void vLoggingInit( BaseType_t xLogToStdout, BaseType_t xLogToFile, BaseType_t xLogToUDP, uint32_t ulRemoteIPAddress, uint16_t usRemotePort ) -{ - /* Can only be called before the scheduler has started. */ - configASSERT( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED ); - - #if( ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) ) - { - HANDLE Win32Thread; - - /* Record which output methods are to be used. */ - xStdoutLoggingUsed = xLogToStdout; - xDiskFileLoggingUsed = xLogToFile; - xUDPLoggingUsed = xLogToUDP; - - /* If a disk file is used then initialise it now. */ - if( xDiskFileLoggingUsed != pdFALSE ) - { - prvFileLoggingInit(); - } - - /* If UDP logging is used then store the address to which the log data - will be sent - but don't create the socket yet because the network is - not initialised. */ - if( xUDPLoggingUsed != pdFALSE ) - { - /* Set the address to which the print messages are sent. */ - xPrintUDPAddress.sin_port = FreeRTOS_htons( usRemotePort ); - xPrintUDPAddress.sin_addr = ulRemoteIPAddress; - } - - /* If a disk file or stdout are to be used then Win32 system calls will - have to be made. Such system calls cannot be made from FreeRTOS tasks - so create a stream buffer to pass the messages to a Win32 thread, then - create the thread itself, along with a Win32 event that can be used to - unblock the thread. */ - if( ( xStdoutLoggingUsed != pdFALSE ) || ( xDiskFileLoggingUsed != pdFALSE ) ) - { - /* Create the buffer. */ - xLogStreamBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xLogStreamBuffer ) - sizeof( xLogStreamBuffer->ucArray ) + dlLOGGING_STREAM_BUFFER_SIZE + 1 ); - configASSERT( xLogStreamBuffer ); - memset( xLogStreamBuffer, '\0', sizeof( *xLogStreamBuffer ) - sizeof( xLogStreamBuffer->ucArray ) ); - xLogStreamBuffer->LENGTH = dlLOGGING_STREAM_BUFFER_SIZE + 1; - - /* Create the Windows event. */ - pvLoggingThreadEvent = CreateEvent( NULL, FALSE, TRUE, "StdoutLoggingEvent" ); - - /* Create the thread itself. */ - Win32Thread = CreateThread( - NULL, /* Pointer to thread security attributes. */ - 0, /* Initial thread stack size, in bytes. */ - prvWin32LoggingThread, /* Pointer to thread function. */ - NULL, /* Argument for new thread. */ - 0, /* Creation flags. */ - NULL ); - - /* Use the cores that are not used by the FreeRTOS tasks. */ - SetThreadAffinityMask( Win32Thread, ~0x01u ); - SetThreadPriorityBoost( Win32Thread, TRUE ); - SetThreadPriority( Win32Thread, THREAD_PRIORITY_IDLE ); - } - } - #else - { - /* FreeRTOSIPConfig is set such that no print messages will be output. - Avoid compiler warnings about unused parameters. */ - ( void ) xLogToStdout; - ( void ) xLogToFile; - ( void ) xLogToUDP; - ( void ) usRemotePort; - ( void ) ulRemoteIPAddress; - } - #endif /* ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) */ -} -/*-----------------------------------------------------------*/ - -static void prvCreatePrintSocket( void *pvParameter1, uint32_t ulParameter2 ) -{ -static const TickType_t xSendTimeOut = pdMS_TO_TICKS( 0 ); -Socket_t xSocket; - - /* The function prototype is that of a deferred function, but the parameters - are not actually used. */ - ( void ) pvParameter1; - ( void ) ulParameter2; - - xSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - - if( xSocket != FREERTOS_INVALID_SOCKET ) - { - /* FreeRTOS+TCP decides which port to bind to. */ - FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, &xSendTimeOut, sizeof( xSendTimeOut ) ); - FreeRTOS_bind( xSocket, NULL, 0 ); - - /* Now the socket is bound it can be assigned to the print socket. */ - xPrintSocket = xSocket; - } -} -/*-----------------------------------------------------------*/ - -void vLoggingPrintf( const char *pcFormat, ... ) -{ -char cPrintString[ dlMAX_PRINT_STRING_LENGTH ]; -char cOutputString[ dlMAX_PRINT_STRING_LENGTH ]; -char *pcSource, *pcTarget, *pcBegin; -size_t xLength, xLength2, rc; -static BaseType_t xMessageNumber = 0; -va_list args; -uint32_t ulIPAddress; -const char *pcTaskName; -const char *pcNoTask = "None"; -int iOriginalPriority; -HANDLE xCurrentTask; - - - if( ( xStdoutLoggingUsed != pdFALSE ) || ( xDiskFileLoggingUsed != pdFALSE ) || ( xUDPLoggingUsed != pdFALSE ) ) - { - /* There are a variable number of parameters. */ - va_start( args, pcFormat ); - - /* Additional info to place at the start of the log. */ - if( xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED ) - { - pcTaskName = pcTaskGetName( NULL ); - } - else - { - pcTaskName = pcNoTask; - } - - if( strcmp( pcFormat, "\n" ) != 0 ) - { - xLength = snprintf( cPrintString, dlMAX_PRINT_STRING_LENGTH, "%lu %lu [%s] ", - xMessageNumber++, - ( unsigned long ) xTaskGetTickCount(), - pcTaskName ); - } - else - { - xLength = 0; - memset( cPrintString, 0x00, dlMAX_PRINT_STRING_LENGTH ); - } - - xLength2 = vsnprintf( cPrintString + xLength, dlMAX_PRINT_STRING_LENGTH - xLength, pcFormat, args ); - - if( xLength2 < 0 ) - { - /* Clean up. */ - xLength2 = dlMAX_PRINT_STRING_LENGTH - 1 - xLength; - cPrintString[ dlMAX_PRINT_STRING_LENGTH - 1 ] = '\0'; - } - - xLength += xLength2; - va_end( args ); - - /* For ease of viewing, copy the string into another buffer, converting - IP addresses to dot notation on the way. */ - pcSource = cPrintString; - pcTarget = cOutputString; - - while( ( *pcSource ) != '\0' ) - { - *pcTarget = *pcSource; - pcTarget++; - pcSource++; - - /* Look forward for an IP address denoted by 'ip'. */ - if( ( isxdigit( pcSource[ 0 ] ) != pdFALSE ) && ( pcSource[ 1 ] == 'i' ) && ( pcSource[ 2 ] == 'p' ) ) - { - *pcTarget = *pcSource; - pcTarget++; - *pcTarget = '\0'; - pcBegin = pcTarget - 8; - - while( ( pcTarget > pcBegin ) && ( isxdigit( pcTarget[ -1 ] ) != pdFALSE ) ) - { - pcTarget--; - } - - sscanf( pcTarget, "%8X", &ulIPAddress ); - rc = sprintf( pcTarget, "%lu.%lu.%lu.%lu", - ( unsigned long ) ( ulIPAddress >> 24UL ), - ( unsigned long ) ( (ulIPAddress >> 16UL) & 0xffUL ), - ( unsigned long ) ( (ulIPAddress >> 8UL) & 0xffUL ), - ( unsigned long ) ( ulIPAddress & 0xffUL ) ); - pcTarget += rc; - pcSource += 3; /* skip "ip" */ - } - } - - /* How far through the buffer was written? */ - xLength = ( BaseType_t ) ( pcTarget - cOutputString ); - - /* If the message is to be logged to a UDP port then it can be sent directly - because it only uses FreeRTOS function (not Win32 functions). */ - if( xUDPLoggingUsed != pdFALSE ) - { - if( ( xPrintSocket == FREERTOS_INVALID_SOCKET ) && ( FreeRTOS_IsNetworkUp() != pdFALSE ) ) - { - /* Create and bind the socket to which print messages are sent. The - xTimerPendFunctionCall() function is used even though this is - not an interrupt because this function is called from the IP task - and the IP task cannot itself wait for a socket to bind. The - parameters to prvCreatePrintSocket() are not required so set to - NULL or 0. */ - xTimerPendFunctionCall( prvCreatePrintSocket, NULL, 0, dlDONT_BLOCK ); - } - - if( xPrintSocket != FREERTOS_INVALID_SOCKET ) - { - FreeRTOS_sendto( xPrintSocket, cOutputString, xLength, 0, &xPrintUDPAddress, sizeof( xPrintUDPAddress ) ); - - /* Just because the UDP data logger I'm using is dumb. */ - FreeRTOS_sendto( xPrintSocket, "\r", sizeof( char ), 0, &xPrintUDPAddress, sizeof( xPrintUDPAddress ) ); - } - } - - /* If logging is also to go to either stdout or a disk file then it cannot - be output here - so instead write the message to the stream buffer and wake - the Win32 thread which will read it from the stream buffer and perform the - actual output. */ - if( ( xStdoutLoggingUsed != pdFALSE ) || ( xDiskFileLoggingUsed != pdFALSE ) ) - { - configASSERT( xLogStreamBuffer ); - - /* How much space is in the buffer? */ - xLength2 = uxStreamBufferGetSpace( xLogStreamBuffer ); - - /* There must be enough space to write both the string and the length of - the string. */ - if( xLength2 >= ( xLength + sizeof( xLength ) ) ) - { - /* First write in the length of the data, then write in the data - itself. Raising the thread priority is used as a critical section - as there are potentially multiple writers. The stream buffer is - only thread safe when there is a single writer (likewise for - reading from the buffer). */ - xCurrentTask = GetCurrentThread(); - iOriginalPriority = GetThreadPriority( xCurrentTask ); - SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL ); - uxStreamBufferAdd( xLogStreamBuffer, 0, ( const uint8_t * ) &( xLength ), sizeof( xLength ) ); - uxStreamBufferAdd( xLogStreamBuffer, 0, ( const uint8_t * ) cOutputString, xLength ); - SetThreadPriority( GetCurrentThread(), iOriginalPriority ); - } - - /* xDirectPrint is initialised to pdTRUE, and while it remains true the - logging output function is called directly. When the system is running - the output function cannot be called directly because it would get - called from both FreeRTOS tasks and Win32 threads - so instead wake the - Win32 thread responsible for the actual output. */ - if( xDirectPrint != pdFALSE ) - { - /* While starting up, the thread which calls prvWin32LoggingThread() - is not running yet and xDirectPrint will be pdTRUE. */ - prvLoggingFlushBuffer(); - } - else if( pvLoggingThreadEvent != NULL ) - { - /* While running, wake up prvWin32LoggingThread() to send the - logging data. */ - SetEvent( pvLoggingThreadEvent ); - } - } - } -} -/*-----------------------------------------------------------*/ - -static void prvLoggingFlushBuffer( void ) -{ -size_t xLength; -char cPrintString[ dlMAX_PRINT_STRING_LENGTH ]; - - /* Is there more than the length value stored in the circular buffer - used to pass data from the FreeRTOS simulator into this Win32 thread? */ - while( uxStreamBufferGetSize( xLogStreamBuffer ) > sizeof( xLength ) ) - { - memset( cPrintString, 0x00, dlMAX_PRINT_STRING_LENGTH ); - uxStreamBufferGet( xLogStreamBuffer, 0, ( uint8_t * ) &xLength, sizeof( xLength ), pdFALSE ); - uxStreamBufferGet( xLogStreamBuffer, 0, ( uint8_t * ) cPrintString, xLength, pdFALSE ); - - /* Write the message to standard out if requested to do so when - vLoggingInit() was called, or if the network is not yet up. */ - if( ( xStdoutLoggingUsed != pdFALSE ) || ( FreeRTOS_IsNetworkUp() == pdFALSE ) ) - { - /* Write the message to stdout. */ - printf( "%s", cPrintString ); /*_RB_ Replace with _write(). */ - } - - /* Write the message to a file if requested to do so when - vLoggingInit() was called. */ - if( xDiskFileLoggingUsed != pdFALSE ) - { - prvLogToFile( cPrintString, xLength ); - } - } - - prvFileClose(); -} -/*-----------------------------------------------------------*/ - -static DWORD WINAPI prvWin32LoggingThread( void *pvParameter ) -{ -const DWORD xMaxWait = 1000; - - ( void ) pvParameter; - - /* From now on, prvLoggingFlushBuffer() will only be called from this - Windows thread */ - xDirectPrint = pdFALSE; - - for( ;; ) - { - /* Wait to be told there are message waiting to be logged. */ - WaitForSingleObject( pvLoggingThreadEvent, xMaxWait ); - - /* Write out all waiting messages. */ - prvLoggingFlushBuffer(); - } -} -/*-----------------------------------------------------------*/ - -static void prvFileLoggingInit( void ) -{ -FILE *pxHandle = fopen( pcLogFileName, "a" ); - - if( pxHandle != NULL ) - { - fseek( pxHandle, SEEK_END, 0ul ); - ulSizeOfLoggingFile = ftell( pxHandle ); - fclose( pxHandle ); - } - else - { - ulSizeOfLoggingFile = 0ul; - } -} -/*-----------------------------------------------------------*/ - -static void prvFileClose( void ) -{ - if( pxLoggingFileHandle != NULL ) - { - fclose( pxLoggingFileHandle ); - pxLoggingFileHandle = NULL; - } -} -/*-----------------------------------------------------------*/ - -static void prvLogToFile( const char *pcMessage, size_t xLength ) -{ - if( pxLoggingFileHandle == NULL ) - { - pxLoggingFileHandle = fopen( pcLogFileName, "a" ); - } - - if( pxLoggingFileHandle != NULL ) - { - fwrite( pcMessage, 1, xLength, pxLoggingFileHandle ); - ulSizeOfLoggingFile += xLength; - - /* If the file has grown to its maximum permissible size then close and - rename it - then start with a new file. */ - if( ulSizeOfLoggingFile > ( size_t ) dlLOGGING_FILE_SIZE ) - { - prvFileClose(); - if( _access( pcFullLogFileName, 00 ) == 0 ) - { - remove( pcFullLogFileName ); - } - rename( pcLogFileName, pcFullLogFileName ); - ulSizeOfLoggingFile = 0; - } - } -} -/*-----------------------------------------------------------*/ - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.h deleted file mode 100644 index 62ae46a52..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/demo_logging.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef DEMO_LOGGING_H -#define DEMO_LOGGING_H - -/* - * Initialise a logging system that can be used from FreeRTOS tasks and Win32 - * threads. Do not call printf() directly while the scheduler is running. - * - * Set xLogToStdout, xLogToFile and xLogToUDP to either pdTRUE or pdFALSE to - * lot to stdout, a disk file and a UDP port respectively. - * - * If xLogToUDP is pdTRUE then ulRemoteIPAddress and usRemotePort must be set - * to the IP address and port number to which UDP log messages will be sent. - */ -void vLoggingInit( BaseType_t xLogToStdout, - BaseType_t xLogToFile, - BaseType_t xLogToUDP, - uint32_t ulRemoteIPAddress, - uint16_t usRemotePort ); - -#endif /* DEMO_LOGGING_H */ - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config.h deleted file mode 100644 index 68517887a..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* This file contains configuration settings for the demos. */ - -#ifndef IOT_CONFIG_H_ -#define IOT_CONFIG_H_ - - -/* - * Set this to the number of recyclable tasks for the task pool to cache. - * - * Caching dynamically allocated tasks (recyclable tasks) helps the application - * to limit the number of allocations at runtime. Caching recyclable tasks may - * help making the application more responsive and predictable, by removing a - * potential for memory allocation failures, but it may also have negative - * repercussions on the amount of memory available at any given time. It is up - * to the application developer to strike the correct balance these competing - * needs. The task pool will cache when the application calling - * IotTaskPool_RecycleJob. Any recycled tasks in excess of - * IOT_TASKPOOL_JOBS_RECYCLE_LIMIT will be destroyed and its memory will be - * release. - * - * Default value (if undefined): 8 - */ -#define IOT_TASKPOOL_JOBS_RECYCLE_LIMIT 8 - -/* - * Set this to 1 to perform sanity checks when using the task pool library. - * - * Asserts are useful for debugging, but should be disabled in production code. - * If this is set to 1, IotTaskPool_Assert can be defined to set the assertion - * function; otherwise, the standard library's assert function will be used. - * - * Possible values: 0 (asserts disabled) or 1 (asserts enabled) - * Recommended values: 1 when debugging; 0 in production code. - * Default value (if undefined): 0 - */ -#define IOT_TASKPOOL_ENABLE_ASSERTS 1 - -/* - * The full IoT Task Pool Library has many use cases, including Linux - * development.  Typical FreeRTOS use cases do not require the full - * functionality so an optimised implementation is provided specifically for use - * with FreeRTOS. The optimised version has a fixed number of tasks in the - * pool, each of which uses statically allocated memory to ensure creation of - * the pool is guaranteed (it does not run out of heap space). - * IOT_TASKPOOL_NUMBER_OF_WORKERS sets the number of tasks in the pool. - */ -#define IOT_TASKPOOL_NUMBER_OF_WORKERS 3 - -/* - * Set the log level of the task pool library. - * - * Log messages from the task pool library at or below this setting will be - * printed. - * - * Possible values: One of the Log levels. - * Default value (if undefined): IOT_LOG_LEVEL_GLOBAL; if that is undefined, - * then IOT_LOG_NONE. - */ -#define IOT_LOG_LEVEL_TASKPOOL IOT_LOG_INFO - - -/** - * @brief The stack size (in bytes) for each worker task in the task pool. - * - * The minimal version of the of task pool library only supports one task pool - * and the configuration of each worker task fixed at the compile time. - */ -#define IOT_TASKPOOL_WORKER_STACK_SIZE_BYTES 2048 - -/* Include the common configuration file for FreeRTOS. */ -#include "iot_config_common.h" - -#endif /* ifndef IOT_CONFIG_H_ */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config_common.h b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config_common.h deleted file mode 100644 index 8b976103e..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/iot_config_common.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Amazon FreeRTOS V201906.00 Major - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* This file contains default configuration settings for the demos on FreeRTOS. */ - -#ifndef IOT_CONFIG_COMMON_H_ -#define IOT_CONFIG_COMMON_H_ - -/* FreeRTOS include. */ -#include "FreeRTOS.h" //_RB_Makes common config file FreeRTOS specific - -/* Use platform types on FreeRTOS. */ -#include "platform/iot_platform_types_freertos.h" //_RB_Makes common config file FreeRTOS specific - -/* SDK version. */ -#define IOT_SDK_VERSION "4.0.0" - -/* This config file is for the demos; disable any test code. */ -#define IOT_BUILD_TESTS ( 0 ) - -/* Logging puts function. */ -#define IotLogging_Puts( str ) configPRINTF( ( "%s\r\n", str ) ) - -/* Enable asserts in libraries by default. */ -#ifndef IOT_METRICS_ENABLE_ASSERTS - #define IOT_METRICS_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_CONTAINERS_ENABLE_ASSERTS - #define IOT_CONTAINERS_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_TASKPOOL_ENABLE_ASSERTS - #define IOT_TASKPOOL_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_MQTT_ENABLE_ASSERTS - #define IOT_MQTT_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef AWS_IOT_SHADOW_ENABLE_ASSERTS - #define AWS_IOT_SHADOW_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef AWS_IOT_DEFENDER_ENABLE_ASSERTS - #define AWS_IOT_DEFENDER_ENABLE_ASSERTS ( 1 ) -#endif -#ifndef IOT_BLE_ENABLE_ASSERTS - #define IOT_BLE_ENABLE_ASSERTS ( 1 ) -#endif - -/* Assert functions. */ -#define IotMetrics_Assert( expression ) configASSERT( expression ) -#define IotContainers_Assert( expression ) configASSERT( expression ) -#define IotTaskPool_Assert( expression ) configASSERT( expression ) -#define IotMqtt_Assert( expression ) configASSERT( expression ) -#define AwsIotShadow_Assert( expression ) configASSERT( expression ) -#define AwsIotDefender_Assert( expression ) configASSERT( expression ) -#define IotBle_Assert( expression ) configASSERT( expression ) - -/* Control the usage of dynamic memory allocation. */ -#ifndef IOT_STATIC_MEMORY_ONLY - #define IOT_STATIC_MEMORY_ONLY ( 0 ) -#endif - -/* Memory allocation configuration. Note that these functions will not be affected - * by IOT_STATIC_MEMORY_ONLY. */ -#define IotNetwork_Malloc pvPortMalloc -#define IotNetwork_Free vPortFree -#define IotThreads_Malloc pvPortMalloc -#define IotThreads_Free vPortFree -#define IotLogging_Malloc pvPortMalloc -#define IotLogging_Free vPortFree -#define IotBle_Malloc pvPortMalloc -#define IotBle_Free vPortFree -/* #define IotLogging_StaticBufferSize */ - -/* Memory allocation function configuration for the MQTT and Defender library. - * These libraries will be affected by IOT_STATIC_MEMORY_ONLY. */ -#if IOT_STATIC_MEMORY_ONLY == 0 - #define IotMetrics_MallocTcpConnection pvPortMalloc - #define IotMetrics_FreeTcpConnection vPortFree - #define IotMetrics_MallocIpAddress pvPortMalloc - #define IotMetrics_FreeIpAddress vPortFree - - #define IotTaskPool_MallocTaskPool pvPortMalloc - #define IotTaskPool_FreeTaskPool vPortFree - #define IotTaskPool_MallocJob pvPortMalloc - #define IotTaskPool_FreeJob vPortFree - #define IotTaskPool_MallocTimerEvent pvPortMalloc - #define IotTaskPool_FreeTimerEvent vPortFree - - #define IotMqtt_MallocConnection pvPortMalloc - #define IotMqtt_FreeConnection vPortFree - #define IotMqtt_MallocMessage pvPortMalloc - #define IotMqtt_FreeMessage vPortFree - #define IotMqtt_MallocOperation pvPortMalloc - #define IotMqtt_FreeOperation vPortFree - #define IotMqtt_MallocSubscription pvPortMalloc - #define IotMqtt_FreeSubscription vPortFree - - #define IotSerializer_MallocCborEncoder pvPortMalloc - #define IotSerializer_FreeCborEncoder vPortFree - #define IotSerializer_MallocCborParser pvPortMalloc - #define IotSerializer_FreeCborParser vPortFree - #define IotSerializer_MallocCborValue pvPortMalloc - #define IotSerializer_FreeCborValue vPortFree - #define IotSerializer_MallocDecoderObject pvPortMalloc - #define IotSerializer_FreeDecoderObject vPortFree - - #define AwsIotShadow_MallocOperation pvPortMalloc - #define AwsIotShadow_FreeOperation vPortFree - #define AwsIotShadow_MallocString pvPortMalloc - #define AwsIotShadow_FreeString vPortFree - #define AwsIotShadow_MallocSubscription pvPortMalloc - #define AwsIotShadow_FreeSubscription vPortFree - - #define AwsIotDefender_MallocReport pvPortMalloc - #define AwsIotDefender_FreeReport vPortFree - #define AwsIotDefender_MallocTopic pvPortMalloc - #define AwsIotDefender_FreeTopic vPortFree -#endif /* if IOT_STATIC_MEMORY_ONLY == 0 */ - -/* Default platform thread stack size and priority. */ -#ifndef IOT_THREAD_DEFAULT_STACK_SIZE - #define IOT_THREAD_DEFAULT_STACK_SIZE 2048 -#endif -#ifndef IOT_THREAD_DEFAULT_PRIORITY - #define IOT_THREAD_DEFAULT_PRIORITY tskIDLE_PRIORITY -#endif - -/* Platform network configuration. */ -#ifndef IOT_NETWORK_RECEIVE_TASK_PRIORITY - #define IOT_NETWORK_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#endif -#ifndef IOT_NETWORK_RECEIVE_TASK_STACK_SIZE - #define IOT_NETWORK_RECEIVE_TASK_STACK_SIZE IOT_THREAD_DEFAULT_STACK_SIZE -#endif - -/* Platform and SDK name for AWS IoT MQTT metrics. Only used when - * AWS_IOT_MQTT_ENABLE_METRICS is 1. */ -#define IOT_SDK_NAME "AmazonFreeRTOS" -#ifdef configPLATFORM_NAME - #define IOT_PLATFORM_NAME configPLATFORM_NAME -#else - #define IOT_PLATFORM_NAME "Unknown" -#endif - -/* Cloud endpoint to which the device connects to. */ -#define IOT_CLOUD_ENDPOINT clientcredentialMQTT_BROKER_ENDPOINT - -/** - * @brief Unique identifier used to recognize a device by the cloud. - * This could be SHA-256 of the device certificate. - */ -extern const char *getDeviceIdentifier( void ); -#define IOT_DEVICE_IDENTIFIER getDeviceIdentifier() - -/** - * @brief Metrics emitted by the device. - */ -extern const char *getDeviceMetrics( void ); -#define AWS_IOT_METRICS_USERNAME getDeviceMetrics() - -/** - * @brief Length of the metrics emitted by device. - */ -extern uint16_t getDeviceMetricsLength( void ); -#define AWS_IOT_METRICS_USERNAME_LENGTH getDeviceMetricsLength() - -/* Define the data type of metrics connection id as same as Socket_t in aws_secure_socket.h */ -#define IotMetricsConnectionId_t void * - -/* Configuration for defender demo: set format to CBOR. */ -#define AWS_IOT_DEFENDER_FORMAT AWS_IOT_DEFENDER_FORMAT_CBOR - -/* Configuration for defender demo: use long tag for readable output. Please use short tag for the real application. */ -#define AWS_IOT_DEFENDER_USE_LONG_TAG ( 1 ) - -#endif /* ifndef IOT_CONFIG_COMMON_H_ */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/main.c deleted file mode 100644 index 2cf6b3829..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/main.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - - /*** - * See https://www.FreeRTOS.org/task-pool/ for configuration and usage instructions. - ***/ - - -/* Standard includes. */ -#include -#include - -/* Visual studio intrinsics used so the __debugbreak() function is available -should an assert get hit. */ -#include - -/* FreeRTOS includes. */ -#include -#include "task.h" - -/* TCP/IP stack includes. */ -#include "FreeRTOS_IP.h" - -/* - * Prototypes for the demos that can be started from this project. - */ -extern void vStartSimpleTaskPoolDemo( void ); - -/* This example is the first in a sequence that adds IoT functionality into -an existing TCP/IP project. In this first project the TCP/IP stack is not -actually used, but it is still built, which requires this array to be -present. */ -const uint8_t ucMACAddress[ 6 ] = { configMAC_ADDR0, configMAC_ADDR1, configMAC_ADDR2, configMAC_ADDR3, configMAC_ADDR4, configMAC_ADDR5 }; - -/*-----------------------------------------------------------*/ - -int main( void ) -{ - /*** - * See https://www.FreeRTOS.org/task-pool/ for configuration and usage instructions. - ***/ - - /* Create the example that demonstrates task pool functionality. Examples - that demonstrate networking connectivity will be added in future projects - and get started after the network has connected (from within the - vApplicationIPNetworkEventHook() function).*/ - vStartSimpleTaskPoolDemo(); - - /* Start the scheduler - if all is well from this point on only FreeRTOS - tasks will execute. */ - vTaskStartScheduler(); - - /* If all is well, the scheduler will now be running, and the following - line will never be reached. If the following line does execute, then - there was insufficient FreeRTOS heap memory available for the idle and/or - timer tasks to be created. See the memory management section on the - FreeRTOS web site for more details (this is standard text that is not not - really applicable to the Win32 simulator port). */ - for( ;; ) - { - __debugbreak(); - } -} -/*-----------------------------------------------------------*/ - -void vAssertCalled( const char *pcFile, uint32_t ulLine ) -{ -volatile uint32_t ulBlockVariable = 0UL; -volatile char *pcFileName = ( volatile char * ) pcFile; -volatile uint32_t ulLineNumber = ulLine; - - ( void ) pcFileName; - ( void ) ulLineNumber; - - printf( "vAssertCalled( %s, %u\n", pcFile, ulLine ); - - /* Setting ulBlockVariable to a non-zero value in the debugger will allow - this function to be exited. */ - taskDISABLE_INTERRUPTS(); - { - while( ulBlockVariable == 0UL ) - { - __debugbreak(); - } - } - taskENABLE_INTERRUPTS(); -} -/*-----------------------------------------------------------*/ - -/* Called by FreeRTOS+TCP when the network connects or disconnects. Disconnect -events are only received if implemented in the MAC driver. */ -void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent ) -{ - /* This example is the first in a sequence that adds IoT functionality into - an existing TCP/IP project. In this first project the TCP/IP stack is not - actually used, but it is still built, which requires this function to be - present. For now this function does not need to do anything, so just ensure - the unused parameters don't cause compiler warnings and that calls to this - function are trapped by the debugger. */ - __debugbreak(); - ( void ) eNetworkEvent; -} -/*-----------------------------------------------------------*/ - -extern uint32_t ulApplicationGetNextSequenceNumber( uint32_t ulSourceAddress, - uint16_t usSourcePort, - uint32_t ulDestinationAddress, - uint16_t usDestinationPort ) -{ - /* This example is the first in a sequence that adds IoT functionality into - an existing TCP/IP project. In this first project the TCP/IP stack is not - actually used, but it is still built, which requires this function to be - present. For now this function does not need to do anything, so just ensure - the unused parameters don't cause compiler warnings and that calls to this - function are trapped by the debugger. */ - ( void ) ulSourceAddress; - ( void ) usSourcePort; - ( void ) ulDestinationAddress; - ( void ) usDestinationPort; - __debugbreak(); - return 0; -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxRand( void ) -{ - /* This example is the first in a sequence that adds IoT functionality into - an existing TCP/IP project. In this first project the TCP/IP stack is not - actually used, but it is still built, which requires this function to be - present. For now this function does not need to do anything, so just ensure - the calls to the function are trapped by the debugger. */ - __debugbreak(); - return 0; -} -/*-----------------------------------------------------------*/ - -/* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an -implementation of vApplicationGetIdleTaskMemory() to provide the memory that is -used by the Idle task. */ -void vApplicationGetIdleTaskMemory( StaticTask_t** ppxIdleTaskTCBBuffer, StackType_t** ppxIdleTaskStackBuffer, uint32_t* pulIdleTaskStackSize ) -{ - /* If the buffers to be provided to the Idle task are declared inside this - function then they must be declared static - otherwise they will be allocated on - the stack and so not exists after this function exits. */ - static StaticTask_t xIdleTaskTCB; - static StackType_t uxIdleTaskStack[configMINIMAL_STACK_SIZE]; - - /* Pass out a pointer to the StaticTask_t structure in which the Idle task's - state will be stored. */ - *ppxIdleTaskTCBBuffer = &xIdleTaskTCB; - - /* Pass out the array that will be used as the Idle task's stack. */ - *ppxIdleTaskStackBuffer = uxIdleTaskStack; - - /* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer. - Note that, as the array is necessarily of type StackType_t, - configMINIMAL_STACK_SIZE is specified in words, not bytes. */ - *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; -} -/*-----------------------------------------------------------*/ - -/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the -application must provide an implementation of vApplicationGetTimerTaskMemory() -to provide the memory that is used by the Timer service task. */ -void vApplicationGetTimerTaskMemory( StaticTask_t** ppxTimerTaskTCBBuffer, StackType_t** ppxTimerTaskStackBuffer, uint32_t* pulTimerTaskStackSize ) -{ - /* If the buffers to be provided to the Timer task are declared inside this - function then they must be declared static - otherwise they will be allocated on - the stack and so not exists after this function exits. */ - static StaticTask_t xTimerTaskTCB; - static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH]; - - /* Pass out a pointer to the StaticTask_t structure in which the Timer - task's state will be stored. */ - *ppxTimerTaskTCBBuffer = &xTimerTaskTCB; - - /* Pass out the array that will be used as the Timer task's stack. */ - *ppxTimerTaskStackBuffer = uxTimerTaskStack; - - /* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer. - Note that, as the array is necessarily of type StackType_t, - configMINIMAL_STACK_SIZE is specified in words, not bytes. */ - *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; -} - - diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/printf-stdarg.c b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/printf-stdarg.c deleted file mode 100644 index 5505535c1..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/printf-stdarg.c +++ /dev/null @@ -1,667 +0,0 @@ -/* - Copyright 2001, 2002 Georges Menie (www.menie.org) - stdarg version contributed by Christian Ettinger - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Changes for the FreeRTOS ports: - - - The dot in "%-8.8s" - - The specifiers 'l' (long) and 'L' (long long) - - The specifier 'u' for unsigned - - Dot notation for IP addresses: - sprintf("IP = %xip\n", 0xC0A80164); - will produce "IP = 192.168.1.100\n" -*/ - -#include -#include -#include -#include - -#include "FreeRTOS.h" - -#define PAD_RIGHT 1 -#define PAD_ZERO 2 - -/* - * Return 1 for readable, 2 for writeable, 3 for both. - * Function must be provided by the application. - */ -extern BaseType_t xApplicationMemoryPermissions( uint32_t aAddress ); - -extern void vOutputChar( const char cChar, const TickType_t xTicksToWait ); -static const TickType_t xTicksToWait = pdMS_TO_TICKS( 20 ); - -struct xPrintFlags -{ - int base; - int width; - int printLimit; - unsigned - pad : 8, - letBase : 8, - isSigned : 1, - isNumber : 1, - long32 : 1, - long64 : 1; -}; - -struct SStringBuf -{ - char *str; - const char *orgStr; - const char *nulPos; - int curLen; - struct xPrintFlags flags; -}; - -static void strbuf_init( struct SStringBuf *apStr, char *apBuf, const char *apMaxStr ) -{ - apStr->str = apBuf; - apStr->orgStr = apBuf; - apStr->nulPos = apMaxStr-1; - apStr->curLen = 0; - - memset( &apStr->flags, '\0', sizeof( apStr->flags ) ); -} -/*-----------------------------------------------------------*/ - -static BaseType_t strbuf_printchar( struct SStringBuf *apStr, int c ) -{ - if( apStr->str == NULL ) - { - vOutputChar( ( char ) c, xTicksToWait ); - apStr->curLen++; - return pdTRUE; - } - if( apStr->str < apStr->nulPos ) - { - *( apStr->str++ ) = c; - apStr->curLen++; - return pdTRUE; - } - if( apStr->str == apStr->nulPos ) - { - *( apStr->str++ ) = '\0'; - } - return pdFALSE; -} -/*-----------------------------------------------------------*/ - -static portINLINE BaseType_t strbuf_printchar_inline( struct SStringBuf *apStr, int c ) -{ - if( apStr->str == NULL ) - { - vOutputChar( ( char ) c, xTicksToWait ); - if( c == 0 ) - { - return pdFALSE; - } - apStr->curLen++; - return pdTRUE; - } - if( apStr->str < apStr->nulPos ) - { - *(apStr->str++) = c; - if( c == 0 ) - { - return pdFALSE; - } - apStr->curLen++; - return pdTRUE; - } - if( apStr->str == apStr->nulPos ) - { - *( apStr->str++ ) = '\0'; - } - return pdFALSE; -} -/*-----------------------------------------------------------*/ - -static portINLINE int i2hex( int aCh ) -{ -int iResult; - - if( aCh < 10 ) - { - iResult = '0' + aCh; - } - else - { - iResult = 'A' + aCh - 10; - } - - return iResult; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prints(struct SStringBuf *apBuf, const char *apString ) -{ - register int padchar = ' '; - int i,len; - - if( xApplicationMemoryPermissions( ( uint32_t )apString ) == 0 ) - { - /* The user has probably made a mistake with the parameter - for '%s', the memory is not readbale. */ - apString = "INV_MEM"; - } - - if( apBuf->flags.width > 0 ) - { - register int len = 0; - register const char *ptr; - for( ptr = apString; *ptr; ++ptr ) - { - ++len; - } - - if( len >= apBuf->flags.width ) - { - apBuf->flags.width = 0; - } - else - { - apBuf->flags.width -= len; - } - - if( apBuf->flags.pad & PAD_ZERO ) - { - padchar = '0'; - } - } - if( ( apBuf->flags.pad & PAD_RIGHT ) == 0 ) - { - for( ; apBuf->flags.width > 0; --apBuf->flags.width ) - { - if( strbuf_printchar( apBuf, padchar ) == 0 ) - { - return pdFALSE; - } - } - } - if( ( apBuf->flags.isNumber == pdTRUE ) && ( apBuf->flags.pad == pdTRUE ) ) - { - /* The string to print represents an integer number. - * In this case, printLimit is the min number of digits to print - * If the length of the number to print is less than the min nb of i - * digits to display, we add 0 before printing the number - */ - len = strlen( apString ); - - if( len < apBuf->flags.printLimit ) - { - i = apBuf->flags.printLimit - len; - for( ; i; i-- ) - { - if( strbuf_printchar( apBuf, '0' ) == 0 ) - { - return pdFALSE; - } - } - } - } - /* The string to print is not the result of a number conversion to ascii. - * For a string, printLimit is the max number of characters to display - */ - for( ; apBuf->flags.printLimit && *apString ; ++apString, --apBuf->flags.printLimit ) - { - if( !strbuf_printchar( apBuf, *apString ) ) - { - return pdFALSE; - } - } - - for( ; apBuf->flags.width > 0; --apBuf->flags.width ) - { - if( !strbuf_printchar( apBuf, padchar ) ) - { - return pdFALSE; - } - } - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -/* the following should be enough for 32 bit int */ -#define PRINT_BUF_LEN 12 /* to print 4294967296 */ - -#if SPRINTF_LONG_LONG -#warning 64-bit libraries will be included as well -static BaseType_t printll( struct SStringBuf *apBuf, long long i ) -{ - char print_buf[ 2 * PRINT_BUF_LEN ]; - register char *s; - register int t, neg = 0; - register unsigned long long u = i; - lldiv_t lldiv_result; - -/* typedef struct - * { - * long long int quot; // quotient - * long long int rem; // remainder - * } lldiv_t; - */ - - apBuf->flags.isNumber = pdTRUE; /* Parameter for prints */ - if( i == 0LL ) - { - print_buf[ 0 ] = '0'; - print_buf[ 1 ] = '\0'; - return prints( apBuf, print_buf ); - } - - if( ( apBuf->flags.isSigned == pdTRUE ) && ( apBuf->flags.base == 10 ) && ( i < 0LL ) ) - { - neg = 1; - u = -i; - } - - s = print_buf + sizeof( print_buf ) - 1; - - *s = '\0'; - /* 18446744073709551616 */ - while( u != 0 ) - { - lldiv_result = lldiv( u, ( unsigned long long ) apBuf->flags.base ); - t = lldiv_result.rem; - if( t >= 10 ) - { - t += apBuf->flags.letBase - '0' - 10; - } - *( --s ) = t + '0'; - u = lldiv_result.quot; - } - - if( neg != 0 ) - { - if( ( apBuf->flags.width != 0 ) && ( apBuf->flags.pad & PAD_ZERO ) ) - { - if( !strbuf_printchar( apBuf, '-' ) ) - { - return pdFALSE; - } - --apBuf->flags.width; - } - else - { - *( --s ) = '-'; - } - } - - return prints( apBuf, s ); -} -#endif /* SPRINTF_LONG_LONG */ -/*-----------------------------------------------------------*/ - -static BaseType_t printi( struct SStringBuf *apBuf, int i ) -{ - char print_buf[ PRINT_BUF_LEN ]; - register char *s; - register int t, neg = 0; - register unsigned int u = i; - register unsigned base = apBuf->flags.base; - - apBuf->flags.isNumber = pdTRUE; /* Parameter for prints */ - - if( i == 0 ) - { - print_buf[ 0 ] = '0'; - print_buf[ 1 ] = '\0'; - return prints( apBuf, print_buf ); - } - - if( ( apBuf->flags.isSigned == pdTRUE ) && ( base == 10 ) && ( i < 0 ) ) - { - neg = 1; - u = -i; - } - - s = print_buf + sizeof( print_buf ) - 1; - - *s = '\0'; - switch( base ) - { - case 16: - while( u != 0 ) - { - t = u & 0xF; - if( t >= 10 ) - { - t += apBuf->flags.letBase - '0' - 10; - } - *( --s ) = t + '0'; - u >>= 4; - } - break; - - case 8: - case 10: - /* GCC compiles very efficient */ - while( u ) - { - t = u % base; - *( --s ) = t + '0'; - u /= base; - } - break; -/* - // The generic case, not yet in use - default: - while( u ) - { - t = u % base; - if( t >= 10) - { - t += apBuf->flags.letBase - '0' - 10; - } - *( --s ) = t + '0'; - u /= base; - } - break; -*/ - } - - if( neg != 0 ) - { - if( apBuf->flags.width && (apBuf->flags.pad & PAD_ZERO ) ) - { - if( strbuf_printchar( apBuf, '-' ) == 0 ) - { - return pdFALSE; - } - --apBuf->flags.width; - } - else - { - *( --s ) = '-'; - } - } - - return prints( apBuf, s ); -} -/*-----------------------------------------------------------*/ - -static BaseType_t printIp(struct SStringBuf *apBuf, unsigned i ) -{ - char print_buf[16]; - - sprintf( print_buf, "%u.%u.%u.%u", - i >> 24, - ( i >> 16 ) & 0xff, - ( i >> 8 ) & 0xff, - i & 0xff ); - apBuf->flags.isNumber = pdTRUE; /* Parameter for prints */ - prints( apBuf, print_buf ); - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -static void tiny_print( struct SStringBuf *apBuf, const char *format, va_list args ) -{ - char scr[2]; - - for( ; ; ) - { - int ch = *( format++ ); - - if( ch != '%' ) - { - do - { - /* Put the most like flow in a small loop */ - if( strbuf_printchar_inline( apBuf, ch ) == 0 ) - { - return; - } - ch = *( format++ ); - } while( ch != '%' ); - } - ch = *( format++ ); - /* Now ch has character after '%', format pointing to next */ - - if( ch == '\0' ) - { - break; - } - if( ch == '%' ) - { - if( strbuf_printchar( apBuf, ch ) == 0 ) - { - return; - } - continue; - } - memset( &apBuf->flags, '\0', sizeof( apBuf->flags ) ); - - if( ch == '-' ) - { - ch = *( format++ ); - apBuf->flags.pad = PAD_RIGHT; - } - while( ch == '0' ) - { - ch = *( format++ ); - apBuf->flags.pad |= PAD_ZERO; - } - if( ch == '*' ) - { - ch = *( format++ ); - apBuf->flags.width = va_arg( args, int ); - } - else - { - while( ch >= '0' && ch <= '9' ) - { - apBuf->flags.width *= 10; - apBuf->flags.width += ch - '0'; - ch = *( format++ ); - } - } - if( ch == '.' ) - { - ch = *( format++ ); - if( ch == '*' ) - { - apBuf->flags.printLimit = va_arg( args, int ); - ch = *( format++ ); - } - else - { - while( ch >= '0' && ch <= '9' ) - { - apBuf->flags.printLimit *= 10; - apBuf->flags.printLimit += ch - '0'; - ch = *( format++ ); - } - } - } - if( apBuf->flags.printLimit == 0 ) - { - apBuf->flags.printLimit--; /* -1: make it unlimited */ - } - if( ch == 's' ) - { - register char *s = ( char * )va_arg( args, int ); - if( prints( apBuf, s ? s : "(null)" ) == 0 ) - { - break; - } - continue; - } - if( ch == 'c' ) - { - /* char are converted to int then pushed on the stack */ - scr[0] = ( char ) va_arg( args, int ); - - if( strbuf_printchar( apBuf, scr[0] ) == 0 ) - { - return; - } - - continue; - } - if( ch == 'l' ) - { - ch = *( format++ ); - apBuf->flags.long32 = 1; - /* Makes not difference as u32 == long */ - } - if( ch == 'L' ) - { - ch = *( format++ ); - apBuf->flags.long64 = 1; - /* Does make a difference */ - } - apBuf->flags.base = 10; - apBuf->flags.letBase = 'a'; - - if( ch == 'd' || ch == 'u' ) - { - apBuf->flags.isSigned = ( ch == 'd' ); -#if SPRINTF_LONG_LONG - if( apBuf->flags.long64 != pdFALSE ) - { - if( printll( apBuf, va_arg( args, long long ) ) == 0 ) - { - break; - } - } else -#endif /* SPRINTF_LONG_LONG */ - if( printi( apBuf, va_arg( args, int ) ) == 0 ) - { - break; - } - continue; - } - - apBuf->flags.base = 16; /* From here all hexadecimal */ - - if( ch == 'x' && format[0] == 'i' && format[1] == 'p' ) - { - format += 2; /* eat the "xi" of "xip" */ - /* Will use base 10 again */ - if( printIp( apBuf, va_arg( args, int ) ) == 0 ) - { - break; - } - continue; - } - if( ch == 'x' || ch == 'X' || ch == 'p' || ch == 'o' ) - { - if( ch == 'X' ) - { - apBuf->flags.letBase = 'A'; - } - else if( ch == 'o' ) - { - apBuf->flags.base = 8; - } -#if SPRINTF_LONG_LONG - if( apBuf->flags.long64 != pdFALSE ) - { - if( printll( apBuf, va_arg( args, long long ) ) == 0 ) - { - break; - } - } else -#endif /* SPRINTF_LONG_LONG */ - if( printi( apBuf, va_arg( args, int ) ) == 0 ) - { - break; - } - continue; - } - } - strbuf_printchar( apBuf, '\0' ); -} -/*-----------------------------------------------------------*/ - -int vsnprintf( char *apBuf, size_t aMaxLen, const char *apFmt, va_list args ) -{ - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char* )apBuf + aMaxLen ); - tiny_print( &strBuf, apFmt, args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -int snprintf( char *apBuf, size_t aMaxLen, const char *apFmt, ... ) -{ - va_list args; - - va_start( args, apFmt ); - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char* )apBuf + aMaxLen ); - tiny_print( &strBuf, apFmt, args ); - va_end( args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -int sprintf( char *apBuf, const char *apFmt, ... ) -{ - va_list args; - - va_start( args, apFmt ); - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char * )apBuf + 1024 ); - tiny_print( &strBuf, apFmt, args ); - va_end( args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -int vsprintf( char *apBuf, const char *apFmt, va_list args ) -{ - struct SStringBuf strBuf; - strbuf_init( &strBuf, apBuf, ( const char* ) apBuf + 1024 ); - tiny_print( &strBuf, apFmt, args ); - - return strBuf.curLen; -} -/*-----------------------------------------------------------*/ - -const char *mkSize (unsigned long long aSize, char *apBuf, int aLen) -{ -static char retString[33]; -size_t gb, mb, kb, sb; - - if (apBuf == NULL) { - apBuf = retString; - aLen = sizeof( retString ); - } - gb = aSize / (1024*1024*1024); - aSize -= gb * (1024*1024*1024); - mb = aSize / (1024*1024); - aSize -= mb * (1024*1024); - kb = aSize / (1024); - aSize -= kb * (1024); - sb = aSize; - if( gb ) - { - snprintf (apBuf, aLen, "%u.%02u GB", ( unsigned ) gb, ( unsigned ) ( ( 100 * mb ) / 1024ul ) ); - } - else if( mb ) - { - snprintf (apBuf, aLen, "%u.%02u MB", ( unsigned ) mb, ( unsigned ) ( ( 100 * kb) / 1024ul ) ); - } - else if( kb != 0ul ) - { - snprintf (apBuf, aLen, "%u.%02u KB", ( unsigned ) kb, ( unsigned ) ( ( 100 * sb) / 1024ul ) ); - } - else - { - snprintf (apBuf, aLen, "%u bytes", ( unsigned ) sb); - } - return apBuf; -} diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/task_pool_demo.sln b/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/task_pool_demo.sln deleted file mode 100644 index b362f36c5..000000000 --- a/FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/task_pool/task_pool_demo.sln +++ /dev/null @@ -1,23 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RTOSDemo", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}" -EndProject -Global - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = FreeRTOS_Plus_TCP_Minimal.vsmdi - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.Build.0 = Debug|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Release|Win32.ActiveCfg = Release|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c index 5f4fa3da6..0a0774b1d 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h index f73e0f352..c0670fe87 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/Run-time-stats-utils.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/Run-time-stats-utils.c index 37204d126..ea340418c 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/Run-time-stats-utils.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/Run-time-stats-utils.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c index d155d87a7..6cd24037f 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c index a8e293dce..d02c44aa0 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h index 347140a11..2ff605a6f 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-Related-CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-Related-CLI-commands.c index 523fc8bad..a2702090e 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-Related-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-Related-CLI-commands.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-system-demo.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-system-demo.c index 04a8a656e..420a39f75 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-system-demo.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/File-system-demo.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Run-time-stats-utils.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Run-time-stats-utils.c index 72ed5a425..b87d8c79c 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Run-time-stats-utils.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Run-time-stats-utils.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Sample-CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Sample-CLI-commands.c index 42e7cc43c..f36a93f92 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Sample-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/Sample-CLI-commands.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/UDPCommandServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/UDPCommandServer.c index 565982363..bd7079965 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/UDPCommandServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/UDPCommandServer.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/main.c index f5bf1673a..182afeac1 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/main.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c index 54143c367..3bd55b372 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/TCPEchoClient_SingleTasks.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/TCPEchoClient_SingleTasks.c index e89d369dc..c4f8eb146 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/TCPEchoClient_SingleTasks.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/TCPEchoClient_SingleTasks.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/SimpleUDPClientAndServer.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/SimpleUDPClientAndServer.h index 342ab123a..d178d2c2d 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/SimpleUDPClientAndServer.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/SimpleUDPClientAndServer.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/TCPEchoClient_SingleTasks.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/TCPEchoClient_SingleTasks.h index 0f4676f47..864a3a10f 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/TCPEchoClient_SingleTasks.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/include/TCPEchoClient_SingleTasks.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSConfig.h index 7fdff102b..2ea535408 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSIPConfig.h index 4aa549e8c..9adb448e9 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/FreeRTOSIPConfig.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/arch.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/arch.c index d704da800..ea1c431c0 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/arch.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/arch.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/netif.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/netif.h index 8fe539376..6a93bea2c 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/netif.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/WinPCap/netif.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.c index d6a1d2577..61d6f2039 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.h index 62ae46a52..ad6886b17 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/demo_logging.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c index fae30bd74..9641e0624 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/FreeRTOSConfig.h index e031afb8e..c0898511d 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPClientTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPClientTask.c index ad8d22cc4..727a805d0 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPClientTask.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPClientTask.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPServerTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPServerTask.c index ba678b98c..8667ac2e0 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPServerTask.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/SecureTCPServerTask.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/main.c index 05587047e..08616dc11 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/main.c @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.1 + * FreeRTOS Kernel V10.3.0 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c index c98a7e870..7d8ed18c6 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c @@ -1,675 +1,675 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* Standard includes. */ -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_ARP.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_DHCP.h" -#if( ipconfigUSE_LLMNR == 1 ) - #include "FreeRTOS_DNS.h" -#endif /* ipconfigUSE_LLMNR */ -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" - - -/* When the age of an entry in the ARP table reaches this value (it counts down -to zero, so this is an old entry) an ARP request will be sent to see if the -entry is still valid and can therefore be refreshed. */ -#define arpMAX_ARP_AGE_BEFORE_NEW_ARP_REQUEST ( 3 ) - -/* The time between gratuitous ARPs. */ -#ifndef arpGRATUITOUS_ARP_PERIOD - #define arpGRATUITOUS_ARP_PERIOD ( pdMS_TO_TICKS( 20000 ) ) -#endif - -/*-----------------------------------------------------------*/ - -/* - * Lookup an MAC address in the ARP cache from the IP address. - */ -static eARPLookupResult_t prvCacheLookup( uint32_t ulAddressToLookup, MACAddress_t * const pxMACAddress ); - -/*-----------------------------------------------------------*/ - -/* The ARP cache. */ -static ARPCacheRow_t xARPCache[ ipconfigARP_CACHE_ENTRIES ]; - -/* The time at which the last gratuitous ARP was sent. Gratuitous ARPs are used -to ensure ARP tables are up to date and to detect IP address conflicts. */ -static TickType_t xLastGratuitousARPTime = ( TickType_t ) 0; - -/* - * IP-clash detection is currently only used internally. When DHCP doesn't respond, the - * driver can try out a random LinkLayer IP address (169.254.x.x). It will send out a - * gratuitos ARP message and, after a period of time, check the variables here below: - */ -#if( ipconfigARP_USE_CLASH_DETECTION != 0 ) - /* Becomes non-zero if another device responded to a gratuitos ARP message. */ - BaseType_t xARPHadIPClash; - /* MAC-address of the other device containing the same IP-address. */ - MACAddress_t xARPClashMacAddress; -#endif /* ipconfigARP_USE_CLASH_DETECTION */ - -/* Part of the Ethernet and ARP headers are always constant when sending an IPv4 -ARP packet. This array defines the constant parts, allowing this part of the -packet to be filled in using a simple memcpy() instead of individual writes. */ -static const uint8_t xDefaultPartARPPacketHeader[] = -{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* Ethernet destination address. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Ethernet source address. */ - 0x08, 0x06, /* Ethernet frame type (ipARP_FRAME_TYPE). */ - 0x00, 0x01, /* usHardwareType (ipARP_HARDWARE_TYPE_ETHERNET). */ - 0x08, 0x00, /* usProtocolType. */ - ipMAC_ADDRESS_LENGTH_BYTES, /* ucHardwareAddressLength. */ - ipIP_ADDRESS_LENGTH_BYTES, /* ucProtocolAddressLength. */ - 0x00, 0x01, /* usOperation (ipARP_REQUEST). */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* xSenderHardwareAddress. */ - 0x00, 0x00, 0x00, 0x00, /* ulSenderProtocolAddress. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* xTargetHardwareAddress. */ -}; - -/*-----------------------------------------------------------*/ - -eFrameProcessingResult_t eARPProcessPacket( ARPPacket_t * const pxARPFrame ) -{ -eFrameProcessingResult_t eReturn = eReleaseBuffer; -ARPHeader_t *pxARPHeader; -uint32_t ulTargetProtocolAddress, ulSenderProtocolAddress; - - pxARPHeader = &( pxARPFrame->xARPHeader ); - - /* The field ulSenderProtocolAddress is badly aligned, copy byte-by-byte. */ - memcpy( ( void *)&( ulSenderProtocolAddress ), ( void * )pxARPHeader->ucSenderProtocolAddress, sizeof( ulSenderProtocolAddress ) ); - /* The field ulTargetProtocolAddress is well-aligned, a 32-bits copy. */ - ulTargetProtocolAddress = pxARPHeader->ulTargetProtocolAddress; - - traceARP_PACKET_RECEIVED(); - - /* Don't do anything if the local IP address is zero because - that means a DHCP request has not completed. */ - if( *ipLOCAL_IP_ADDRESS_POINTER != 0UL ) - { - switch( pxARPHeader->usOperation ) - { - case ipARP_REQUEST : - /* The packet contained an ARP request. Was it for the IP - address of the node running this code? */ - if( ulTargetProtocolAddress == *ipLOCAL_IP_ADDRESS_POINTER ) - { - iptraceSENDING_ARP_REPLY( ulSenderProtocolAddress ); - - /* The request is for the address of this node. Add the - entry into the ARP cache, or refresh the entry if it - already exists. */ - vARPRefreshCacheEntry( &( pxARPHeader->xSenderHardwareAddress ), ulSenderProtocolAddress ); - - /* Generate a reply payload in the same buffer. */ - pxARPHeader->usOperation = ( uint16_t ) ipARP_REPLY; - if( ulTargetProtocolAddress == ulSenderProtocolAddress ) - { - /* A double IP address is detected! */ - /* Give the sources MAC address the value of the broadcast address, will be swapped later */ - memcpy( pxARPFrame->xEthernetHeader.xSourceAddress.ucBytes, xBroadcastMACAddress.ucBytes, sizeof( xBroadcastMACAddress ) ); - memset( pxARPHeader->xTargetHardwareAddress.ucBytes, '\0', sizeof( MACAddress_t ) ); - pxARPHeader->ulTargetProtocolAddress = 0UL; - } - else - { - memcpy( pxARPHeader->xTargetHardwareAddress.ucBytes, pxARPHeader->xSenderHardwareAddress.ucBytes, sizeof( MACAddress_t ) ); - pxARPHeader->ulTargetProtocolAddress = ulSenderProtocolAddress; - } - memcpy( pxARPHeader->xSenderHardwareAddress.ucBytes, ( void * ) ipLOCAL_MAC_ADDRESS, sizeof( MACAddress_t ) ); - memcpy( ( void* )pxARPHeader->ucSenderProtocolAddress, ( void* )ipLOCAL_IP_ADDRESS_POINTER, sizeof( pxARPHeader->ucSenderProtocolAddress ) ); - - eReturn = eReturnEthernetFrame; - } - break; - - case ipARP_REPLY : - iptracePROCESSING_RECEIVED_ARP_REPLY( ulTargetProtocolAddress ); - vARPRefreshCacheEntry( &( pxARPHeader->xSenderHardwareAddress ), ulSenderProtocolAddress ); - /* Process received ARP frame to see if there is a clash. */ - #if( ipconfigARP_USE_CLASH_DETECTION != 0 ) - { - if( ulSenderProtocolAddress == *ipLOCAL_IP_ADDRESS_POINTER ) - { - xARPHadIPClash = pdTRUE; - memcpy( xARPClashMacAddress.ucBytes, pxARPHeader->xSenderHardwareAddress.ucBytes, sizeof( xARPClashMacAddress.ucBytes ) ); - } - } - #endif /* ipconfigARP_USE_CLASH_DETECTION */ - break; - - default : - /* Invalid. */ - break; - } - } - - return eReturn; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_ARP_REMOVE_ENTRY != 0 ) - - uint32_t ulARPRemoveCacheEntryByMac( const MACAddress_t * pxMACAddress ) - { - BaseType_t x; - uint32_t lResult = 0; - - /* For each entry in the ARP cache table. */ - for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) - { - if( ( memcmp( xARPCache[ x ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ) == 0 ) ) - { - lResult = xARPCache[ x ].ulIPAddress; - memset( &xARPCache[ x ], '\0', sizeof( xARPCache[ x ] ) ); - break; - } - } - - return lResult; - } - -#endif /* ipconfigUSE_ARP_REMOVE_ENTRY != 0 */ -/*-----------------------------------------------------------*/ - -void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress ) -{ -BaseType_t x = 0; -BaseType_t xIpEntry = -1; -BaseType_t xMacEntry = -1; -BaseType_t xUseEntry = 0; -uint8_t ucMinAgeFound = 0U; - - #if( ipconfigARP_STORES_REMOTE_ADDRESSES == 0 ) - /* Only process the IP address if it is on the local network. - Unless: when '*ipLOCAL_IP_ADDRESS_POINTER' equals zero, the IP-address - and netmask are still unknown. */ - if( ( ( ulIPAddress & xNetworkAddressing.ulNetMask ) == ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ) || - ( *ipLOCAL_IP_ADDRESS_POINTER == 0ul ) ) - #else - /* If ipconfigARP_STORES_REMOTE_ADDRESSES is non-zero, IP addresses with - a different netmask will also be stored. After when replying to a UDP - message from a different netmask, the IP address can be looped up and a - reply sent. This option is useful for systems with multiple gateways, - the reply will surely arrive. If ipconfigARP_STORES_REMOTE_ADDRESSES is - zero the the gateway address is the only option. */ - if( pdTRUE ) - #endif - { - /* Start with the maximum possible number. */ - ucMinAgeFound--; - - /* For each entry in the ARP cache table. */ - for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) - { - /* Does this line in the cache table hold an entry for the IP - address being queried? */ - if( xARPCache[ x ].ulIPAddress == ulIPAddress ) - { - if( pxMACAddress == NULL ) - { - /* In case the parameter pxMACAddress is NULL, an entry will be reserved to - indicate that there is an outstanding ARP request, This entry will have - "ucValid == pdFALSE". */ - xIpEntry = x; - break; - } - - /* See if the MAC-address also matches. */ - if( memcmp( xARPCache[ x ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ) == 0 ) - { - /* This function will be called for each received packet - As this is by far the most common path the coding standard - is relaxed in this case and a return is permitted as an - optimisation. */ - xARPCache[ x ].ucAge = ( uint8_t ) ipconfigMAX_ARP_AGE; - xARPCache[ x ].ucValid = ( uint8_t ) pdTRUE; - return; - } - - /* Found an entry containing ulIPAddress, but the MAC address - doesn't match. Might be an entry with ucValid=pdFALSE, waiting - for an ARP reply. Still want to see if there is match with the - given MAC address.ucBytes. If found, either of the two entries - must be cleared. */ - xIpEntry = x; - } - else if( ( pxMACAddress != NULL ) && ( memcmp( xARPCache[ x ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ) == 0 ) ) - { - /* Found an entry with the given MAC-address, but the IP-address - is different. Continue looping to find a possible match with - ulIPAddress. */ - #if( ipconfigARP_STORES_REMOTE_ADDRESSES != 0 ) - /* If ARP stores the MAC address of IP addresses outside the - network, than the MAC address of the gateway should not be - overwritten. */ - BaseType_t bIsLocal[ 2 ]; - bIsLocal[ 0 ] = ( ( xARPCache[ x ].ulIPAddress & xNetworkAddressing.ulNetMask ) == ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ); - bIsLocal[ 1 ] = ( ( ulIPAddress & xNetworkAddressing.ulNetMask ) == ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ); - if( bIsLocal[ 0 ] == bIsLocal[ 1 ] ) - { - xMacEntry = x; - } - #else - xMacEntry = x; - #endif - } - /* _HT_ - Shouldn't we test for xARPCache[ x ].ucValid == pdFALSE here ? */ - else if( xARPCache[ x ].ucAge < ucMinAgeFound ) - { - /* As the table is traversed, remember the table row that - contains the oldest entry (the lowest age count, as ages are - decremented to zero) so the row can be re-used if this function - needs to add an entry that does not already exist. */ - ucMinAgeFound = xARPCache[ x ].ucAge; - xUseEntry = x; - } - } - - if( xMacEntry >= 0 ) - { - xUseEntry = xMacEntry; - - if( xIpEntry >= 0 ) - { - /* Both the MAC address as well as the IP address were found in - different locations: clear the entry which matches the - IP-address */ - memset( &xARPCache[ xIpEntry ], '\0', sizeof( xARPCache[ xIpEntry ] ) ); - } - } - else if( xIpEntry >= 0 ) - { - /* An entry containing the IP-address was found, but it had a different MAC address */ - xUseEntry = xIpEntry; - } - - /* If the entry was not found, we use the oldest entry and set the IPaddress */ - xARPCache[ xUseEntry ].ulIPAddress = ulIPAddress; - - if( pxMACAddress != NULL ) - { - memcpy( xARPCache[ xUseEntry ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ); - - iptraceARP_TABLE_ENTRY_CREATED( ulIPAddress, (*pxMACAddress) ); - /* And this entry does not need immediate attention */ - xARPCache[ xUseEntry ].ucAge = ( uint8_t ) ipconfigMAX_ARP_AGE; - xARPCache[ xUseEntry ].ucValid = ( uint8_t ) pdTRUE; - } - else if( xIpEntry < 0 ) - { - xARPCache[ xUseEntry ].ucAge = ( uint8_t ) ipconfigMAX_ARP_RETRANSMISSIONS; - xARPCache[ xUseEntry ].ucValid = ( uint8_t ) pdFALSE; - } - } -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_ARP_REVERSED_LOOKUP == 1 ) - eARPLookupResult_t eARPGetCacheEntryByMac( MACAddress_t * const pxMACAddress, uint32_t *pulIPAddress ) - { - BaseType_t x; - eARPLookupResult_t eReturn = eARPCacheMiss; - - /* Loop through each entry in the ARP cache. */ - for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) - { - /* Does this row in the ARP cache table hold an entry for the MAC - address being searched? */ - if( memcmp( pxMACAddress->ucBytes, xARPCache[ x ].xMACAddress.ucBytes, sizeof( MACAddress_t ) ) == 0 ) - { - *pulIPAddress = xARPCache[ x ].ulIPAddress; - eReturn = eARPCacheHit; - break; - } - } - - return eReturn; - } -#endif /* ipconfigUSE_ARP_REVERSED_LOOKUP */ - -/*-----------------------------------------------------------*/ - -eARPLookupResult_t eARPGetCacheEntry( uint32_t *pulIPAddress, MACAddress_t * const pxMACAddress ) -{ -eARPLookupResult_t eReturn; -uint32_t ulAddressToLookup; - -#if( ipconfigUSE_LLMNR == 1 ) - if( *pulIPAddress == ipLLMNR_IP_ADDR ) /* Is in network byte order. */ - { - /* The LLMNR IP-address has a fixed virtual MAC address. */ - memcpy( pxMACAddress->ucBytes, xLLMNR_MacAdress.ucBytes, sizeof( MACAddress_t ) ); - eReturn = eARPCacheHit; - } - else -#endif - if( ( *pulIPAddress == ipBROADCAST_IP_ADDRESS ) || /* Is it the general broadcast address 255.255.255.255? */ - ( *pulIPAddress == xNetworkAddressing.ulBroadcastAddress ) )/* Or a local broadcast address, eg 192.168.1.255? */ - { - /* This is a broadcast so uses the broadcast MAC address. */ - memcpy( pxMACAddress->ucBytes, xBroadcastMACAddress.ucBytes, sizeof( MACAddress_t ) ); - eReturn = eARPCacheHit; - } - else if( *ipLOCAL_IP_ADDRESS_POINTER == 0UL ) - { - /* The IP address has not yet been assigned, so there is nothing that - can be done. */ - eReturn = eCantSendPacket; - } - else - { - eReturn = eARPCacheMiss; - - if( ( *pulIPAddress & xNetworkAddressing.ulNetMask ) != ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ) - { -#if( ipconfigARP_STORES_REMOTE_ADDRESSES == 1 ) - eReturn = prvCacheLookup( *pulIPAddress, pxMACAddress ); - - if( eReturn == eARPCacheHit ) - { - /* The stack is configured to store 'remote IP addresses', i.e. addresses - belonging to a different the netmask. prvCacheLookup() returned a hit, so - the MAC address is known */ - } - else -#endif - { - /* The IP address is off the local network, so look up the - hardware address of the router, if any. */ - if( xNetworkAddressing.ulGatewayAddress != ( uint32_t )0u ) - { - ulAddressToLookup = xNetworkAddressing.ulGatewayAddress; - } - else - { - ulAddressToLookup = *pulIPAddress; - } - } - } - else - { - /* The IP address is on the local network, so lookup the requested - IP address directly. */ - ulAddressToLookup = *pulIPAddress; - } - - if( eReturn == eARPCacheMiss ) - { - if( ulAddressToLookup == 0UL ) - { - /* The address is not on the local network, and there is not a - router. */ - eReturn = eCantSendPacket; - } - else - { - eReturn = prvCacheLookup( ulAddressToLookup, pxMACAddress ); - - if( eReturn == eARPCacheMiss ) - { - /* It might be that the ARP has to go to the gateway. */ - *pulIPAddress = ulAddressToLookup; - } - } - } - } - - return eReturn; -} - -/*-----------------------------------------------------------*/ - -static eARPLookupResult_t prvCacheLookup( uint32_t ulAddressToLookup, MACAddress_t * const pxMACAddress ) -{ -BaseType_t x; -eARPLookupResult_t eReturn = eARPCacheMiss; - - /* Loop through each entry in the ARP cache. */ - for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) - { - /* Does this row in the ARP cache table hold an entry for the IP address - being queried? */ - if( xARPCache[ x ].ulIPAddress == ulAddressToLookup ) - { - /* A matching valid entry was found. */ - if( xARPCache[ x ].ucValid == ( uint8_t ) pdFALSE ) - { - /* This entry is waiting an ARP reply, so is not valid. */ - eReturn = eCantSendPacket; - } - else - { - /* A valid entry was found. */ - memcpy( pxMACAddress->ucBytes, xARPCache[ x ].xMACAddress.ucBytes, sizeof( MACAddress_t ) ); - eReturn = eARPCacheHit; - } - break; - } - } - - return eReturn; -} -/*-----------------------------------------------------------*/ - -void vARPAgeCache( void ) -{ -BaseType_t x; -TickType_t xTimeNow; - - /* Loop through each entry in the ARP cache. */ - for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) - { - /* If the entry is valid (its age is greater than zero). */ - if( xARPCache[ x ].ucAge > 0U ) - { - /* Decrement the age value of the entry in this ARP cache table row. - When the age reaches zero it is no longer considered valid. */ - ( xARPCache[ x ].ucAge )--; - - /* If the entry is not yet valid, then it is waiting an ARP - reply, and the ARP request should be retransmitted. */ - if( xARPCache[ x ].ucValid == ( uint8_t ) pdFALSE ) - { - FreeRTOS_OutputARPRequest( xARPCache[ x ].ulIPAddress ); - } - else if( xARPCache[ x ].ucAge <= ( uint8_t ) arpMAX_ARP_AGE_BEFORE_NEW_ARP_REQUEST ) - { - /* This entry will get removed soon. See if the MAC address is - still valid to prevent this happening. */ - iptraceARP_TABLE_ENTRY_WILL_EXPIRE( xARPCache[ x ].ulIPAddress ); - FreeRTOS_OutputARPRequest( xARPCache[ x ].ulIPAddress ); - } - else - { - /* The age has just ticked down, with nothing to do. */ - } - - if( xARPCache[ x ].ucAge == 0u ) - { - /* The entry is no longer valid. Wipe it out. */ - iptraceARP_TABLE_ENTRY_EXPIRED( xARPCache[ x ].ulIPAddress ); - xARPCache[ x ].ulIPAddress = 0UL; - } - } - } - - xTimeNow = xTaskGetTickCount (); - - if( ( xLastGratuitousARPTime == ( TickType_t ) 0 ) || ( ( xTimeNow - xLastGratuitousARPTime ) > ( TickType_t ) arpGRATUITOUS_ARP_PERIOD ) ) - { - FreeRTOS_OutputARPRequest( *ipLOCAL_IP_ADDRESS_POINTER ); - xLastGratuitousARPTime = xTimeNow; - } -} -/*-----------------------------------------------------------*/ - -void vARPSendGratuitous( void ) -{ - /* Setting xLastGratuitousARPTime to 0 will force a gratuitous ARP the next - time vARPAgeCache() is called. */ - xLastGratuitousARPTime = ( TickType_t ) 0; - - /* Let the IP-task call vARPAgeCache(). */ - xSendEventToIPTask( eARPTimerEvent ); -} - -/*-----------------------------------------------------------*/ -void FreeRTOS_OutputARPRequest( uint32_t ulIPAddress ) -{ -NetworkBufferDescriptor_t *pxNetworkBuffer; - - /* This is called from the context of the IP event task, so a block time - must not be used. */ - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( sizeof( ARPPacket_t ), ( TickType_t ) 0 ); - - if( pxNetworkBuffer != NULL ) - { - pxNetworkBuffer->ulIPAddress = ulIPAddress; - vARPGenerateRequestPacket( pxNetworkBuffer ); - - #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - BaseType_t xIndex; - - for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) - { - pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; - } - pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; - } - } - #endif - if( xIsCallingFromIPTask() != 0 ) - { - /* Only the IP-task is allowed to call this function directly. */ - xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE ); - } - else - { - IPStackEvent_t xSendEvent; - - /* Send a message to the IP-task to send this ARP packet. */ - xSendEvent.eEventType = eNetworkTxEvent; - xSendEvent.pvData = ( void * ) pxNetworkBuffer; - if( xSendEventStructToIPTask( &xSendEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL ) - { - /* Failed to send the message, so release the network buffer. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - } - } -} - -void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -ARPPacket_t *pxARPPacket; - - /* Buffer allocation ensures that buffers always have space - for an ARP packet. See buffer allocation implementations 1 - and 2 under portable/BufferManagement. */ - configASSERT( pxNetworkBuffer ); - configASSERT( pxNetworkBuffer->xDataLength >= sizeof(ARPPacket_t) ); - - pxARPPacket = ( ARPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; - - /* memcpy the const part of the header information into the correct - location in the packet. This copies: - xEthernetHeader.ulDestinationAddress - xEthernetHeader.usFrameType; - xARPHeader.usHardwareType; - xARPHeader.usProtocolType; - xARPHeader.ucHardwareAddressLength; - xARPHeader.ucProtocolAddressLength; - xARPHeader.usOperation; - xARPHeader.xTargetHardwareAddress; - */ - memcpy( ( void * ) pxARPPacket, ( void * ) xDefaultPartARPPacketHeader, sizeof( xDefaultPartARPPacketHeader ) ); - memcpy( ( void * ) pxARPPacket->xEthernetHeader.xSourceAddress.ucBytes , ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); - memcpy( ( void * ) pxARPPacket->xARPHeader.xSenderHardwareAddress.ucBytes, ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); - - memcpy( ( void* )pxARPPacket->xARPHeader.ucSenderProtocolAddress, ( void* )ipLOCAL_IP_ADDRESS_POINTER, sizeof( pxARPPacket->xARPHeader.ucSenderProtocolAddress ) ); - pxARPPacket->xARPHeader.ulTargetProtocolAddress = pxNetworkBuffer->ulIPAddress; - - pxNetworkBuffer->xDataLength = sizeof( ARPPacket_t ); - - iptraceCREATING_ARP_REQUEST( pxNetworkBuffer->ulIPAddress ); -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_ClearARP( void ) -{ - memset( xARPCache, '\0', sizeof( xARPCache ) ); -} -/*-----------------------------------------------------------*/ - -#if( ipconfigHAS_PRINTF != 0 ) || ( ipconfigHAS_DEBUG_PRINTF != 0 ) - - void FreeRTOS_PrintARPCache( void ) - { - BaseType_t x, xCount = 0; - - /* Loop through each entry in the ARP cache. */ - for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) - { - if( ( xARPCache[ x ].ulIPAddress != 0ul ) && ( xARPCache[ x ].ucAge > 0U ) ) - { - /* See if the MAC-address also matches, and we're all happy */ - FreeRTOS_printf( ( "Arp %2ld: %3u - %16lxip : %02x:%02x:%02x : %02x:%02x:%02x\n", - x, - xARPCache[ x ].ucAge, - xARPCache[ x ].ulIPAddress, - xARPCache[ x ].xMACAddress.ucBytes[0], - xARPCache[ x ].xMACAddress.ucBytes[1], - xARPCache[ x ].xMACAddress.ucBytes[2], - xARPCache[ x ].xMACAddress.ucBytes[3], - xARPCache[ x ].xMACAddress.ucBytes[4], - xARPCache[ x ].xMACAddress.ucBytes[5] ) ); - xCount++; - } - } - - FreeRTOS_printf( ( "Arp has %ld entries\n", xCount ) ); - } - -#endif /* ( ipconfigHAS_PRINTF != 0 ) || ( ipconfigHAS_DEBUG_PRINTF != 0 ) */ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* Standard includes. */ +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_ARP.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_DHCP.h" +#if( ipconfigUSE_LLMNR == 1 ) + #include "FreeRTOS_DNS.h" +#endif /* ipconfigUSE_LLMNR */ +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" + + +/* When the age of an entry in the ARP table reaches this value (it counts down +to zero, so this is an old entry) an ARP request will be sent to see if the +entry is still valid and can therefore be refreshed. */ +#define arpMAX_ARP_AGE_BEFORE_NEW_ARP_REQUEST ( 3 ) + +/* The time between gratuitous ARPs. */ +#ifndef arpGRATUITOUS_ARP_PERIOD + #define arpGRATUITOUS_ARP_PERIOD ( pdMS_TO_TICKS( 20000 ) ) +#endif + +/*-----------------------------------------------------------*/ + +/* + * Lookup an MAC address in the ARP cache from the IP address. + */ +static eARPLookupResult_t prvCacheLookup( uint32_t ulAddressToLookup, MACAddress_t * const pxMACAddress ); + +/*-----------------------------------------------------------*/ + +/* The ARP cache. */ +static ARPCacheRow_t xARPCache[ ipconfigARP_CACHE_ENTRIES ]; + +/* The time at which the last gratuitous ARP was sent. Gratuitous ARPs are used +to ensure ARP tables are up to date and to detect IP address conflicts. */ +static TickType_t xLastGratuitousARPTime = ( TickType_t ) 0; + +/* + * IP-clash detection is currently only used internally. When DHCP doesn't respond, the + * driver can try out a random LinkLayer IP address (169.254.x.x). It will send out a + * gratuitos ARP message and, after a period of time, check the variables here below: + */ +#if( ipconfigARP_USE_CLASH_DETECTION != 0 ) + /* Becomes non-zero if another device responded to a gratuitos ARP message. */ + BaseType_t xARPHadIPClash; + /* MAC-address of the other device containing the same IP-address. */ + MACAddress_t xARPClashMacAddress; +#endif /* ipconfigARP_USE_CLASH_DETECTION */ + +/* Part of the Ethernet and ARP headers are always constant when sending an IPv4 +ARP packet. This array defines the constant parts, allowing this part of the +packet to be filled in using a simple memcpy() instead of individual writes. */ +static const uint8_t xDefaultPartARPPacketHeader[] = +{ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* Ethernet destination address. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Ethernet source address. */ + 0x08, 0x06, /* Ethernet frame type (ipARP_FRAME_TYPE). */ + 0x00, 0x01, /* usHardwareType (ipARP_HARDWARE_TYPE_ETHERNET). */ + 0x08, 0x00, /* usProtocolType. */ + ipMAC_ADDRESS_LENGTH_BYTES, /* ucHardwareAddressLength. */ + ipIP_ADDRESS_LENGTH_BYTES, /* ucProtocolAddressLength. */ + 0x00, 0x01, /* usOperation (ipARP_REQUEST). */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* xSenderHardwareAddress. */ + 0x00, 0x00, 0x00, 0x00, /* ulSenderProtocolAddress. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* xTargetHardwareAddress. */ +}; + +/*-----------------------------------------------------------*/ + +eFrameProcessingResult_t eARPProcessPacket( ARPPacket_t * const pxARPFrame ) +{ +eFrameProcessingResult_t eReturn = eReleaseBuffer; +ARPHeader_t *pxARPHeader; +uint32_t ulTargetProtocolAddress, ulSenderProtocolAddress; + + pxARPHeader = &( pxARPFrame->xARPHeader ); + + /* The field ulSenderProtocolAddress is badly aligned, copy byte-by-byte. */ + memcpy( ( void *)&( ulSenderProtocolAddress ), ( void * )pxARPHeader->ucSenderProtocolAddress, sizeof( ulSenderProtocolAddress ) ); + /* The field ulTargetProtocolAddress is well-aligned, a 32-bits copy. */ + ulTargetProtocolAddress = pxARPHeader->ulTargetProtocolAddress; + + traceARP_PACKET_RECEIVED(); + + /* Don't do anything if the local IP address is zero because + that means a DHCP request has not completed. */ + if( *ipLOCAL_IP_ADDRESS_POINTER != 0UL ) + { + switch( pxARPHeader->usOperation ) + { + case ipARP_REQUEST : + /* The packet contained an ARP request. Was it for the IP + address of the node running this code? */ + if( ulTargetProtocolAddress == *ipLOCAL_IP_ADDRESS_POINTER ) + { + iptraceSENDING_ARP_REPLY( ulSenderProtocolAddress ); + + /* The request is for the address of this node. Add the + entry into the ARP cache, or refresh the entry if it + already exists. */ + vARPRefreshCacheEntry( &( pxARPHeader->xSenderHardwareAddress ), ulSenderProtocolAddress ); + + /* Generate a reply payload in the same buffer. */ + pxARPHeader->usOperation = ( uint16_t ) ipARP_REPLY; + if( ulTargetProtocolAddress == ulSenderProtocolAddress ) + { + /* A double IP address is detected! */ + /* Give the sources MAC address the value of the broadcast address, will be swapped later */ + memcpy( pxARPFrame->xEthernetHeader.xSourceAddress.ucBytes, xBroadcastMACAddress.ucBytes, sizeof( xBroadcastMACAddress ) ); + memset( pxARPHeader->xTargetHardwareAddress.ucBytes, '\0', sizeof( MACAddress_t ) ); + pxARPHeader->ulTargetProtocolAddress = 0UL; + } + else + { + memcpy( pxARPHeader->xTargetHardwareAddress.ucBytes, pxARPHeader->xSenderHardwareAddress.ucBytes, sizeof( MACAddress_t ) ); + pxARPHeader->ulTargetProtocolAddress = ulSenderProtocolAddress; + } + memcpy( pxARPHeader->xSenderHardwareAddress.ucBytes, ( void * ) ipLOCAL_MAC_ADDRESS, sizeof( MACAddress_t ) ); + memcpy( ( void* )pxARPHeader->ucSenderProtocolAddress, ( void* )ipLOCAL_IP_ADDRESS_POINTER, sizeof( pxARPHeader->ucSenderProtocolAddress ) ); + + eReturn = eReturnEthernetFrame; + } + break; + + case ipARP_REPLY : + iptracePROCESSING_RECEIVED_ARP_REPLY( ulTargetProtocolAddress ); + vARPRefreshCacheEntry( &( pxARPHeader->xSenderHardwareAddress ), ulSenderProtocolAddress ); + /* Process received ARP frame to see if there is a clash. */ + #if( ipconfigARP_USE_CLASH_DETECTION != 0 ) + { + if( ulSenderProtocolAddress == *ipLOCAL_IP_ADDRESS_POINTER ) + { + xARPHadIPClash = pdTRUE; + memcpy( xARPClashMacAddress.ucBytes, pxARPHeader->xSenderHardwareAddress.ucBytes, sizeof( xARPClashMacAddress.ucBytes ) ); + } + } + #endif /* ipconfigARP_USE_CLASH_DETECTION */ + break; + + default : + /* Invalid. */ + break; + } + } + + return eReturn; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_ARP_REMOVE_ENTRY != 0 ) + + uint32_t ulARPRemoveCacheEntryByMac( const MACAddress_t * pxMACAddress ) + { + BaseType_t x; + uint32_t lResult = 0; + + /* For each entry in the ARP cache table. */ + for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) + { + if( ( memcmp( xARPCache[ x ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ) == 0 ) ) + { + lResult = xARPCache[ x ].ulIPAddress; + memset( &xARPCache[ x ], '\0', sizeof( xARPCache[ x ] ) ); + break; + } + } + + return lResult; + } + +#endif /* ipconfigUSE_ARP_REMOVE_ENTRY != 0 */ +/*-----------------------------------------------------------*/ + +void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress ) +{ +BaseType_t x = 0; +BaseType_t xIpEntry = -1; +BaseType_t xMacEntry = -1; +BaseType_t xUseEntry = 0; +uint8_t ucMinAgeFound = 0U; + + #if( ipconfigARP_STORES_REMOTE_ADDRESSES == 0 ) + /* Only process the IP address if it is on the local network. + Unless: when '*ipLOCAL_IP_ADDRESS_POINTER' equals zero, the IP-address + and netmask are still unknown. */ + if( ( ( ulIPAddress & xNetworkAddressing.ulNetMask ) == ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ) || + ( *ipLOCAL_IP_ADDRESS_POINTER == 0ul ) ) + #else + /* If ipconfigARP_STORES_REMOTE_ADDRESSES is non-zero, IP addresses with + a different netmask will also be stored. After when replying to a UDP + message from a different netmask, the IP address can be looped up and a + reply sent. This option is useful for systems with multiple gateways, + the reply will surely arrive. If ipconfigARP_STORES_REMOTE_ADDRESSES is + zero the the gateway address is the only option. */ + if( pdTRUE ) + #endif + { + /* Start with the maximum possible number. */ + ucMinAgeFound--; + + /* For each entry in the ARP cache table. */ + for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) + { + /* Does this line in the cache table hold an entry for the IP + address being queried? */ + if( xARPCache[ x ].ulIPAddress == ulIPAddress ) + { + if( pxMACAddress == NULL ) + { + /* In case the parameter pxMACAddress is NULL, an entry will be reserved to + indicate that there is an outstanding ARP request, This entry will have + "ucValid == pdFALSE". */ + xIpEntry = x; + break; + } + + /* See if the MAC-address also matches. */ + if( memcmp( xARPCache[ x ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ) == 0 ) + { + /* This function will be called for each received packet + As this is by far the most common path the coding standard + is relaxed in this case and a return is permitted as an + optimisation. */ + xARPCache[ x ].ucAge = ( uint8_t ) ipconfigMAX_ARP_AGE; + xARPCache[ x ].ucValid = ( uint8_t ) pdTRUE; + return; + } + + /* Found an entry containing ulIPAddress, but the MAC address + doesn't match. Might be an entry with ucValid=pdFALSE, waiting + for an ARP reply. Still want to see if there is match with the + given MAC address.ucBytes. If found, either of the two entries + must be cleared. */ + xIpEntry = x; + } + else if( ( pxMACAddress != NULL ) && ( memcmp( xARPCache[ x ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ) == 0 ) ) + { + /* Found an entry with the given MAC-address, but the IP-address + is different. Continue looping to find a possible match with + ulIPAddress. */ + #if( ipconfigARP_STORES_REMOTE_ADDRESSES != 0 ) + /* If ARP stores the MAC address of IP addresses outside the + network, than the MAC address of the gateway should not be + overwritten. */ + BaseType_t bIsLocal[ 2 ]; + bIsLocal[ 0 ] = ( ( xARPCache[ x ].ulIPAddress & xNetworkAddressing.ulNetMask ) == ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ); + bIsLocal[ 1 ] = ( ( ulIPAddress & xNetworkAddressing.ulNetMask ) == ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ); + if( bIsLocal[ 0 ] == bIsLocal[ 1 ] ) + { + xMacEntry = x; + } + #else + xMacEntry = x; + #endif + } + /* _HT_ + Shouldn't we test for xARPCache[ x ].ucValid == pdFALSE here ? */ + else if( xARPCache[ x ].ucAge < ucMinAgeFound ) + { + /* As the table is traversed, remember the table row that + contains the oldest entry (the lowest age count, as ages are + decremented to zero) so the row can be re-used if this function + needs to add an entry that does not already exist. */ + ucMinAgeFound = xARPCache[ x ].ucAge; + xUseEntry = x; + } + } + + if( xMacEntry >= 0 ) + { + xUseEntry = xMacEntry; + + if( xIpEntry >= 0 ) + { + /* Both the MAC address as well as the IP address were found in + different locations: clear the entry which matches the + IP-address */ + memset( &xARPCache[ xIpEntry ], '\0', sizeof( xARPCache[ xIpEntry ] ) ); + } + } + else if( xIpEntry >= 0 ) + { + /* An entry containing the IP-address was found, but it had a different MAC address */ + xUseEntry = xIpEntry; + } + + /* If the entry was not found, we use the oldest entry and set the IPaddress */ + xARPCache[ xUseEntry ].ulIPAddress = ulIPAddress; + + if( pxMACAddress != NULL ) + { + memcpy( xARPCache[ xUseEntry ].xMACAddress.ucBytes, pxMACAddress->ucBytes, sizeof( pxMACAddress->ucBytes ) ); + + iptraceARP_TABLE_ENTRY_CREATED( ulIPAddress, (*pxMACAddress) ); + /* And this entry does not need immediate attention */ + xARPCache[ xUseEntry ].ucAge = ( uint8_t ) ipconfigMAX_ARP_AGE; + xARPCache[ xUseEntry ].ucValid = ( uint8_t ) pdTRUE; + } + else if( xIpEntry < 0 ) + { + xARPCache[ xUseEntry ].ucAge = ( uint8_t ) ipconfigMAX_ARP_RETRANSMISSIONS; + xARPCache[ xUseEntry ].ucValid = ( uint8_t ) pdFALSE; + } + } +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_ARP_REVERSED_LOOKUP == 1 ) + eARPLookupResult_t eARPGetCacheEntryByMac( MACAddress_t * const pxMACAddress, uint32_t *pulIPAddress ) + { + BaseType_t x; + eARPLookupResult_t eReturn = eARPCacheMiss; + + /* Loop through each entry in the ARP cache. */ + for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) + { + /* Does this row in the ARP cache table hold an entry for the MAC + address being searched? */ + if( memcmp( pxMACAddress->ucBytes, xARPCache[ x ].xMACAddress.ucBytes, sizeof( MACAddress_t ) ) == 0 ) + { + *pulIPAddress = xARPCache[ x ].ulIPAddress; + eReturn = eARPCacheHit; + break; + } + } + + return eReturn; + } +#endif /* ipconfigUSE_ARP_REVERSED_LOOKUP */ + +/*-----------------------------------------------------------*/ + +eARPLookupResult_t eARPGetCacheEntry( uint32_t *pulIPAddress, MACAddress_t * const pxMACAddress ) +{ +eARPLookupResult_t eReturn; +uint32_t ulAddressToLookup; + +#if( ipconfigUSE_LLMNR == 1 ) + if( *pulIPAddress == ipLLMNR_IP_ADDR ) /* Is in network byte order. */ + { + /* The LLMNR IP-address has a fixed virtual MAC address. */ + memcpy( pxMACAddress->ucBytes, xLLMNR_MacAdress.ucBytes, sizeof( MACAddress_t ) ); + eReturn = eARPCacheHit; + } + else +#endif + if( ( *pulIPAddress == ipBROADCAST_IP_ADDRESS ) || /* Is it the general broadcast address 255.255.255.255? */ + ( *pulIPAddress == xNetworkAddressing.ulBroadcastAddress ) )/* Or a local broadcast address, eg 192.168.1.255? */ + { + /* This is a broadcast so uses the broadcast MAC address. */ + memcpy( pxMACAddress->ucBytes, xBroadcastMACAddress.ucBytes, sizeof( MACAddress_t ) ); + eReturn = eARPCacheHit; + } + else if( *ipLOCAL_IP_ADDRESS_POINTER == 0UL ) + { + /* The IP address has not yet been assigned, so there is nothing that + can be done. */ + eReturn = eCantSendPacket; + } + else + { + eReturn = eARPCacheMiss; + + if( ( *pulIPAddress & xNetworkAddressing.ulNetMask ) != ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) ) + { +#if( ipconfigARP_STORES_REMOTE_ADDRESSES == 1 ) + eReturn = prvCacheLookup( *pulIPAddress, pxMACAddress ); + + if( eReturn == eARPCacheHit ) + { + /* The stack is configured to store 'remote IP addresses', i.e. addresses + belonging to a different the netmask. prvCacheLookup() returned a hit, so + the MAC address is known */ + } + else +#endif + { + /* The IP address is off the local network, so look up the + hardware address of the router, if any. */ + if( xNetworkAddressing.ulGatewayAddress != ( uint32_t )0u ) + { + ulAddressToLookup = xNetworkAddressing.ulGatewayAddress; + } + else + { + ulAddressToLookup = *pulIPAddress; + } + } + } + else + { + /* The IP address is on the local network, so lookup the requested + IP address directly. */ + ulAddressToLookup = *pulIPAddress; + } + + if( eReturn == eARPCacheMiss ) + { + if( ulAddressToLookup == 0UL ) + { + /* The address is not on the local network, and there is not a + router. */ + eReturn = eCantSendPacket; + } + else + { + eReturn = prvCacheLookup( ulAddressToLookup, pxMACAddress ); + + if( eReturn == eARPCacheMiss ) + { + /* It might be that the ARP has to go to the gateway. */ + *pulIPAddress = ulAddressToLookup; + } + } + } + } + + return eReturn; +} + +/*-----------------------------------------------------------*/ + +static eARPLookupResult_t prvCacheLookup( uint32_t ulAddressToLookup, MACAddress_t * const pxMACAddress ) +{ +BaseType_t x; +eARPLookupResult_t eReturn = eARPCacheMiss; + + /* Loop through each entry in the ARP cache. */ + for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) + { + /* Does this row in the ARP cache table hold an entry for the IP address + being queried? */ + if( xARPCache[ x ].ulIPAddress == ulAddressToLookup ) + { + /* A matching valid entry was found. */ + if( xARPCache[ x ].ucValid == ( uint8_t ) pdFALSE ) + { + /* This entry is waiting an ARP reply, so is not valid. */ + eReturn = eCantSendPacket; + } + else + { + /* A valid entry was found. */ + memcpy( pxMACAddress->ucBytes, xARPCache[ x ].xMACAddress.ucBytes, sizeof( MACAddress_t ) ); + eReturn = eARPCacheHit; + } + break; + } + } + + return eReturn; +} +/*-----------------------------------------------------------*/ + +void vARPAgeCache( void ) +{ +BaseType_t x; +TickType_t xTimeNow; + + /* Loop through each entry in the ARP cache. */ + for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) + { + /* If the entry is valid (its age is greater than zero). */ + if( xARPCache[ x ].ucAge > 0U ) + { + /* Decrement the age value of the entry in this ARP cache table row. + When the age reaches zero it is no longer considered valid. */ + ( xARPCache[ x ].ucAge )--; + + /* If the entry is not yet valid, then it is waiting an ARP + reply, and the ARP request should be retransmitted. */ + if( xARPCache[ x ].ucValid == ( uint8_t ) pdFALSE ) + { + FreeRTOS_OutputARPRequest( xARPCache[ x ].ulIPAddress ); + } + else if( xARPCache[ x ].ucAge <= ( uint8_t ) arpMAX_ARP_AGE_BEFORE_NEW_ARP_REQUEST ) + { + /* This entry will get removed soon. See if the MAC address is + still valid to prevent this happening. */ + iptraceARP_TABLE_ENTRY_WILL_EXPIRE( xARPCache[ x ].ulIPAddress ); + FreeRTOS_OutputARPRequest( xARPCache[ x ].ulIPAddress ); + } + else + { + /* The age has just ticked down, with nothing to do. */ + } + + if( xARPCache[ x ].ucAge == 0u ) + { + /* The entry is no longer valid. Wipe it out. */ + iptraceARP_TABLE_ENTRY_EXPIRED( xARPCache[ x ].ulIPAddress ); + xARPCache[ x ].ulIPAddress = 0UL; + } + } + } + + xTimeNow = xTaskGetTickCount (); + + if( ( xLastGratuitousARPTime == ( TickType_t ) 0 ) || ( ( xTimeNow - xLastGratuitousARPTime ) > ( TickType_t ) arpGRATUITOUS_ARP_PERIOD ) ) + { + FreeRTOS_OutputARPRequest( *ipLOCAL_IP_ADDRESS_POINTER ); + xLastGratuitousARPTime = xTimeNow; + } +} +/*-----------------------------------------------------------*/ + +void vARPSendGratuitous( void ) +{ + /* Setting xLastGratuitousARPTime to 0 will force a gratuitous ARP the next + time vARPAgeCache() is called. */ + xLastGratuitousARPTime = ( TickType_t ) 0; + + /* Let the IP-task call vARPAgeCache(). */ + xSendEventToIPTask( eARPTimerEvent ); +} + +/*-----------------------------------------------------------*/ +void FreeRTOS_OutputARPRequest( uint32_t ulIPAddress ) +{ +NetworkBufferDescriptor_t *pxNetworkBuffer; + + /* This is called from the context of the IP event task, so a block time + must not be used. */ + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( sizeof( ARPPacket_t ), ( TickType_t ) 0 ); + + if( pxNetworkBuffer != NULL ) + { + pxNetworkBuffer->ulIPAddress = ulIPAddress; + vARPGenerateRequestPacket( pxNetworkBuffer ); + + #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + BaseType_t xIndex; + + for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) + { + pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; + } + pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; + } + } + #endif + if( xIsCallingFromIPTask() != 0 ) + { + /* Only the IP-task is allowed to call this function directly. */ + xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE ); + } + else + { + IPStackEvent_t xSendEvent; + + /* Send a message to the IP-task to send this ARP packet. */ + xSendEvent.eEventType = eNetworkTxEvent; + xSendEvent.pvData = ( void * ) pxNetworkBuffer; + if( xSendEventStructToIPTask( &xSendEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL ) + { + /* Failed to send the message, so release the network buffer. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + } + } +} + +void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +ARPPacket_t *pxARPPacket; + + /* Buffer allocation ensures that buffers always have space + for an ARP packet. See buffer allocation implementations 1 + and 2 under portable/BufferManagement. */ + configASSERT( pxNetworkBuffer ); + configASSERT( pxNetworkBuffer->xDataLength >= sizeof(ARPPacket_t) ); + + pxARPPacket = ( ARPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; + + /* memcpy the const part of the header information into the correct + location in the packet. This copies: + xEthernetHeader.ulDestinationAddress + xEthernetHeader.usFrameType; + xARPHeader.usHardwareType; + xARPHeader.usProtocolType; + xARPHeader.ucHardwareAddressLength; + xARPHeader.ucProtocolAddressLength; + xARPHeader.usOperation; + xARPHeader.xTargetHardwareAddress; + */ + memcpy( ( void * ) pxARPPacket, ( void * ) xDefaultPartARPPacketHeader, sizeof( xDefaultPartARPPacketHeader ) ); + memcpy( ( void * ) pxARPPacket->xEthernetHeader.xSourceAddress.ucBytes , ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); + memcpy( ( void * ) pxARPPacket->xARPHeader.xSenderHardwareAddress.ucBytes, ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); + + memcpy( ( void* )pxARPPacket->xARPHeader.ucSenderProtocolAddress, ( void* )ipLOCAL_IP_ADDRESS_POINTER, sizeof( pxARPPacket->xARPHeader.ucSenderProtocolAddress ) ); + pxARPPacket->xARPHeader.ulTargetProtocolAddress = pxNetworkBuffer->ulIPAddress; + + pxNetworkBuffer->xDataLength = sizeof( ARPPacket_t ); + + iptraceCREATING_ARP_REQUEST( pxNetworkBuffer->ulIPAddress ); +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_ClearARP( void ) +{ + memset( xARPCache, '\0', sizeof( xARPCache ) ); +} +/*-----------------------------------------------------------*/ + +#if( ipconfigHAS_PRINTF != 0 ) || ( ipconfigHAS_DEBUG_PRINTF != 0 ) + + void FreeRTOS_PrintARPCache( void ) + { + BaseType_t x, xCount = 0; + + /* Loop through each entry in the ARP cache. */ + for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) + { + if( ( xARPCache[ x ].ulIPAddress != 0ul ) && ( xARPCache[ x ].ucAge > 0U ) ) + { + /* See if the MAC-address also matches, and we're all happy */ + FreeRTOS_printf( ( "Arp %2ld: %3u - %16lxip : %02x:%02x:%02x : %02x:%02x:%02x\n", + x, + xARPCache[ x ].ucAge, + xARPCache[ x ].ulIPAddress, + xARPCache[ x ].xMACAddress.ucBytes[0], + xARPCache[ x ].xMACAddress.ucBytes[1], + xARPCache[ x ].xMACAddress.ucBytes[2], + xARPCache[ x ].xMACAddress.ucBytes[3], + xARPCache[ x ].xMACAddress.ucBytes[4], + xARPCache[ x ].xMACAddress.ucBytes[5] ) ); + xCount++; + } + } + + FreeRTOS_printf( ( "Arp has %ld entries\n", xCount ) ); + } + +#endif /* ( ipconfigHAS_PRINTF != 0 ) || ( ipconfigHAS_DEBUG_PRINTF != 0 ) */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c index 8871d6563..930768055 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c @@ -1,1021 +1,1021 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_TCP_IP.h" -#include "FreeRTOS_DHCP.h" -#include "FreeRTOS_ARP.h" -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" - -/* Exclude the entire file if DHCP is not enabled. */ -#if( ipconfigUSE_DHCP != 0 ) - -#if ( ipconfigUSE_DHCP != 0 ) && ( ipconfigNETWORK_MTU < 586u ) - /* DHCP must be able to receive an options field of 312 bytes, the fixed - part of the DHCP packet is 240 bytes, and the IP/UDP headers take 28 bytes. */ - #error ipconfigNETWORK_MTU needs to be at least 586 to use DHCP -#endif - -/* Parameter widths in the DHCP packet. */ -#define dhcpCLIENT_HARDWARE_ADDRESS_LENGTH 16 -#define dhcpSERVER_HOST_NAME_LENGTH 64 -#define dhcpBOOT_FILE_NAME_LENGTH 128 - -/* Timer parameters */ -#ifndef dhcpINITIAL_DHCP_TX_PERIOD - #define dhcpINITIAL_TIMER_PERIOD ( pdMS_TO_TICKS( 250 ) ) - #define dhcpINITIAL_DHCP_TX_PERIOD ( pdMS_TO_TICKS( 5000 ) ) -#endif - -/* Codes of interest found in the DHCP options field. */ -#define dhcpZERO_PAD_OPTION_CODE ( 0u ) -#define dhcpSUBNET_MASK_OPTION_CODE ( 1u ) -#define dhcpGATEWAY_OPTION_CODE ( 3u ) -#define dhcpDNS_SERVER_OPTIONS_CODE ( 6u ) -#define dhcpDNS_HOSTNAME_OPTIONS_CODE ( 12u ) -#define dhcpREQUEST_IP_ADDRESS_OPTION_CODE ( 50u ) -#define dhcpLEASE_TIME_OPTION_CODE ( 51u ) -#define dhcpMESSAGE_TYPE_OPTION_CODE ( 53u ) -#define dhcpSERVER_IP_ADDRESS_OPTION_CODE ( 54u ) -#define dhcpPARAMETER_REQUEST_OPTION_CODE ( 55u ) -#define dhcpCLIENT_IDENTIFIER_OPTION_CODE ( 61u ) - -/* The four DHCP message types of interest. */ -#define dhcpMESSAGE_TYPE_DISCOVER ( 1 ) -#define dhcpMESSAGE_TYPE_OFFER ( 2 ) -#define dhcpMESSAGE_TYPE_REQUEST ( 3 ) -#define dhcpMESSAGE_TYPE_ACK ( 5 ) -#define dhcpMESSAGE_TYPE_NACK ( 6 ) - -/* Offsets into the transmitted DHCP options fields at which various parameters -are located. */ -#define dhcpCLIENT_IDENTIFIER_OFFSET ( 5 ) -#define dhcpREQUESTED_IP_ADDRESS_OFFSET ( 13 ) -#define dhcpDHCP_SERVER_IP_ADDRESS_OFFSET ( 19 ) - -/* Values used in the DHCP packets. */ -#define dhcpREQUEST_OPCODE ( 1 ) -#define dhcpREPLY_OPCODE ( 2 ) -#define dhcpADDRESS_TYPE_ETHERNET ( 1 ) -#define dhcpETHERNET_ADDRESS_LENGTH ( 6 ) - -/* If a lease time is not received, use the default of two days. */ -/* 48 hours in ticks. Can not use pdMS_TO_TICKS() as integer overflow can occur. */ -#define dhcpDEFAULT_LEASE_TIME ( ( 48UL * 60UL * 60UL ) * configTICK_RATE_HZ ) - -/* Don't allow the lease time to be too short. */ -#define dhcpMINIMUM_LEASE_TIME ( pdMS_TO_TICKS( 60000UL ) ) /* 60 seconds in ticks. */ - -/* Marks the end of the variable length options field in the DHCP packet. */ -#define dhcpOPTION_END_BYTE 0xffu - -/* Offset into a DHCP message at which the first byte of the options is -located. */ -#define dhcpFIRST_OPTION_BYTE_OFFSET ( 0xf0 ) - -/* Standard DHCP port numbers and magic cookie value. */ -#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) - #define dhcpCLIENT_PORT 0x4400u - #define dhcpSERVER_PORT 0x4300u - #define dhcpCOOKIE 0x63538263ul - #define dhcpBROADCAST 0x0080u -#else - #define dhcpCLIENT_PORT 0x0044u - #define dhcpSERVER_PORT 0x0043u - #define dhcpCOOKIE 0x63825363ul - #define dhcpBROADCAST 0x8000u -#endif /* ipconfigBYTE_ORDER */ - -#include "pack_struct_start.h" -struct xDHCPMessage -{ - uint8_t ucOpcode; - uint8_t ucAddressType; - uint8_t ucAddressLength; - uint8_t ucHops; - uint32_t ulTransactionID; - uint16_t usElapsedTime; - uint16_t usFlags; - uint32_t ulClientIPAddress_ciaddr; - uint32_t ulYourIPAddress_yiaddr; - uint32_t ulServerIPAddress_siaddr; - uint32_t ulRelayAgentIPAddress_giaddr; - uint8_t ucClientHardwareAddress[ dhcpCLIENT_HARDWARE_ADDRESS_LENGTH ]; - uint8_t ucServerHostName[ dhcpSERVER_HOST_NAME_LENGTH ]; - uint8_t ucBootFileName[ dhcpBOOT_FILE_NAME_LENGTH ]; - uint32_t ulDHCPCookie; - uint8_t ucFirstOptionByte; -} -#include "pack_struct_end.h" -typedef struct xDHCPMessage DHCPMessage_t; - -/* DHCP state machine states. */ -typedef enum -{ - eWaitingSendFirstDiscover = 0, /* Initial state. Send a discover the first time it is called, and reset all timers. */ - eWaitingOffer, /* Either resend the discover, or, if the offer is forthcoming, send a request. */ - eWaitingAcknowledge, /* Either resend the request. */ - #if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) - eGetLinkLayerAddress, /* When DHCP didn't respond, try to obtain a LinkLayer address 168.254.x.x. */ - #endif - eLeasedAddress, /* Resend the request at the appropriate time to renew the lease. */ - eNotUsingLeasedAddress /* DHCP failed, and a default IP address is being used. */ -} eDHCPState_t; - -/* Hold information in between steps in the DHCP state machine. */ -struct xDHCP_DATA -{ - uint32_t ulTransactionId; - uint32_t ulOfferedIPAddress; - uint32_t ulDHCPServerAddress; - uint32_t ulLeaseTime; - /* Hold information on the current timer state. */ - TickType_t xDHCPTxTime; - TickType_t xDHCPTxPeriod; - /* Try both without and with the broadcast flag */ - BaseType_t xUseBroadcast; - /* Maintains the DHCP state machine state. */ - eDHCPState_t eDHCPState; - /* The UDP socket used for all incoming and outgoing DHCP traffic. */ - Socket_t xDHCPSocket; -}; - -typedef struct xDHCP_DATA DHCPData_t; - -#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) - /* Define the Link Layer IP address: 169.254.x.x */ - #define LINK_LAYER_ADDRESS_0 169 - #define LINK_LAYER_ADDRESS_1 254 - - /* Define the netmask used: 255.255.0.0 */ - #define LINK_LAYER_NETMASK_0 255 - #define LINK_LAYER_NETMASK_1 255 - #define LINK_LAYER_NETMASK_2 0 - #define LINK_LAYER_NETMASK_3 0 -#endif - - -/* - * Generate a DHCP discover message and send it on the DHCP socket. - */ -static void prvSendDHCPDiscover( void ); - -/* - * Interpret message received on the DHCP socket. - */ -static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType ); - -/* - * Generate a DHCP request packet, and send it on the DHCP socket. - */ -static void prvSendDHCPRequest( void ); - -/* - * Prepare to start a DHCP transaction. This initialises some state variables - * and creates the DHCP socket if necessary. - */ -static void prvInitialiseDHCP( void ); - -/* - * Creates the part of outgoing DHCP messages that are common to all outgoing - * DHCP messages. - */ -static uint8_t *prvCreatePartDHCPMessage( struct freertos_sockaddr *pxAddress, BaseType_t xOpcode, const uint8_t * const pucOptionsArray, size_t *pxOptionsArraySize ); - -/* - * Create the DHCP socket, if it has not been created already. - */ -static void prvCreateDHCPSocket( void ); - -/* - * After DHCP has failed to answer, prepare everything to start searching - * for (trying-out) LinkLayer IP-addresses, using the random method: Send - * a gratuitous ARP request and wait if another device responds to it. - */ -#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) - static void prvPrepareLinkLayerIPLookUp( void ); -#endif - -/*-----------------------------------------------------------*/ - -/* The next DHCP transaction Id to be used. */ -static DHCPData_t xDHCPData; - -/*-----------------------------------------------------------*/ - -BaseType_t xIsDHCPSocket( Socket_t xSocket ) -{ -BaseType_t xReturn; - - if( xDHCPData.xDHCPSocket == xSocket ) - { - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -void vDHCPProcess( BaseType_t xReset ) -{ -BaseType_t xGivingUp = pdFALSE; -#if( ipconfigUSE_DHCP_HOOK != 0 ) - eDHCPCallbackAnswer_t eAnswer; -#endif /* ipconfigUSE_DHCP_HOOK */ - - /* Is DHCP starting over? */ - if( xReset != pdFALSE ) - { - xDHCPData.eDHCPState = eWaitingSendFirstDiscover; - } - - switch( xDHCPData.eDHCPState ) - { - case eWaitingSendFirstDiscover : - /* Ask the user if a DHCP discovery is required. */ - #if( ipconfigUSE_DHCP_HOOK != 0 ) - eAnswer = xApplicationDHCPHook( eDHCPPhasePreDiscover, xNetworkAddressing.ulDefaultIPAddress ); - if( eAnswer == eDHCPContinue ) - #endif /* ipconfigUSE_DHCP_HOOK */ - { - /* Initial state. Create the DHCP socket, timer, etc. if they - have not already been created. */ - prvInitialiseDHCP(); - - /* See if prvInitialiseDHCP() has creates a socket. */ - if( xDHCPData.xDHCPSocket == NULL ) - { - xGivingUp = pdTRUE; - break; - } - - *ipLOCAL_IP_ADDRESS_POINTER = 0UL; - - /* Send the first discover request. */ - if( xDHCPData.xDHCPSocket != NULL ) - { - xDHCPData.xDHCPTxTime = xTaskGetTickCount(); - prvSendDHCPDiscover( ); - xDHCPData.eDHCPState = eWaitingOffer; - } - } - #if( ipconfigUSE_DHCP_HOOK != 0 ) - else - { - if( eAnswer == eDHCPUseDefaults ) - { - memcpy( &xNetworkAddressing, &xDefaultAddressing, sizeof( xNetworkAddressing ) ); - } - - /* The user indicates that the DHCP process does not continue. */ - xGivingUp = pdTRUE; - } - #endif /* ipconfigUSE_DHCP_HOOK */ - break; - - case eWaitingOffer : - - xGivingUp = pdFALSE; - - /* Look for offers coming in. */ - if( prvProcessDHCPReplies( dhcpMESSAGE_TYPE_OFFER ) == pdPASS ) - { - #if( ipconfigUSE_DHCP_HOOK != 0 ) - /* Ask the user if a DHCP request is required. */ - eAnswer = xApplicationDHCPHook( eDHCPPhasePreRequest, xDHCPData.ulOfferedIPAddress ); - - if( eAnswer == eDHCPContinue ) - #endif /* ipconfigUSE_DHCP_HOOK */ - { - /* An offer has been made, the user wants to continue, - generate the request. */ - xDHCPData.xDHCPTxTime = xTaskGetTickCount(); - xDHCPData.xDHCPTxPeriod = dhcpINITIAL_DHCP_TX_PERIOD; - prvSendDHCPRequest( ); - xDHCPData.eDHCPState = eWaitingAcknowledge; - break; - } - - #if( ipconfigUSE_DHCP_HOOK != 0 ) - if( eAnswer == eDHCPUseDefaults ) - { - memcpy( &xNetworkAddressing, &xDefaultAddressing, sizeof( xNetworkAddressing ) ); - } - - /* The user indicates that the DHCP process does not continue. */ - xGivingUp = pdTRUE; - #endif /* ipconfigUSE_DHCP_HOOK */ - } - else if( ( xTaskGetTickCount() - xDHCPData.xDHCPTxTime ) > xDHCPData.xDHCPTxPeriod ) - { - /* It is time to send another Discover. Increase the time - period, and if it has not got to the point of giving up - send - another discovery. */ - xDHCPData.xDHCPTxPeriod <<= 1; - - if( xDHCPData.xDHCPTxPeriod <= ipconfigMAXIMUM_DISCOVER_TX_PERIOD ) - { - if( xApplicationGetRandomNumber( &( xDHCPData.ulTransactionId ) ) != pdFALSE ) - { - xDHCPData.xDHCPTxTime = xTaskGetTickCount( ); - xDHCPData.xUseBroadcast = !xDHCPData.xUseBroadcast; - prvSendDHCPDiscover( ); - FreeRTOS_debug_printf( ( "vDHCPProcess: timeout %lu ticks\n", xDHCPData.xDHCPTxPeriod ) ); - } - else - { - FreeRTOS_debug_printf( ( "vDHCPProcess: failed to generate a random Transaction ID\n" ) ); - } - } - else - { - FreeRTOS_debug_printf( ( "vDHCPProcess: giving up %lu > %lu ticks\n", xDHCPData.xDHCPTxPeriod, ipconfigMAXIMUM_DISCOVER_TX_PERIOD ) ); - - #if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) - { - /* Only use a fake Ack if the default IP address == 0x00 - and the link local addressing is used. Start searching - a free LinkLayer IP-address. Next state will be - 'eGetLinkLayerAddress'. */ - prvPrepareLinkLayerIPLookUp(); - - /* Setting an IP address manually so set to not using - leased address mode. */ - xDHCPData.eDHCPState = eGetLinkLayerAddress; - } - #else - { - xGivingUp = pdTRUE; - } - #endif /* ipconfigDHCP_FALL_BACK_AUTO_IP */ - } - } - break; - - case eWaitingAcknowledge : - - /* Look for acks coming in. */ - if( prvProcessDHCPReplies( dhcpMESSAGE_TYPE_ACK ) == pdPASS ) - { - FreeRTOS_debug_printf( ( "vDHCPProcess: acked %lxip\n", FreeRTOS_ntohl( xDHCPData.ulOfferedIPAddress ) ) ); - - /* DHCP completed. The IP address can now be used, and the - timer set to the lease timeout time. */ - *ipLOCAL_IP_ADDRESS_POINTER = xDHCPData.ulOfferedIPAddress; - - /* Setting the 'local' broadcast address, something like - '192.168.1.255'. */ - xNetworkAddressing.ulBroadcastAddress = ( xDHCPData.ulOfferedIPAddress & xNetworkAddressing.ulNetMask ) | ~xNetworkAddressing.ulNetMask; - xDHCPData.eDHCPState = eLeasedAddress; - - iptraceDHCP_SUCCEDEED( xDHCPData.ulOfferedIPAddress ); - - /* DHCP failed, the default configured IP-address will be used - Now call vIPNetworkUpCalls() to send the network-up event and - start the ARP timer. */ - vIPNetworkUpCalls( ); - - /* Close socket to ensure packets don't queue on it. */ - vSocketClose( xDHCPData.xDHCPSocket ); - xDHCPData.xDHCPSocket = NULL; - - if( xDHCPData.ulLeaseTime == 0UL ) - { - xDHCPData.ulLeaseTime = dhcpDEFAULT_LEASE_TIME; - } - else if( xDHCPData.ulLeaseTime < dhcpMINIMUM_LEASE_TIME ) - { - xDHCPData.ulLeaseTime = dhcpMINIMUM_LEASE_TIME; - } - else - { - /* The lease time is already valid. */ - } - - /* Check for clashes. */ - vARPSendGratuitous(); - vIPReloadDHCPTimer( xDHCPData.ulLeaseTime ); - } - else - { - /* Is it time to send another Discover? */ - if( ( xTaskGetTickCount() - xDHCPData.xDHCPTxTime ) > xDHCPData.xDHCPTxPeriod ) - { - /* Increase the time period, and if it has not got to the - point of giving up - send another request. */ - xDHCPData.xDHCPTxPeriod <<= 1; - - if( xDHCPData.xDHCPTxPeriod <= ipconfigMAXIMUM_DISCOVER_TX_PERIOD ) - { - xDHCPData.xDHCPTxTime = xTaskGetTickCount(); - prvSendDHCPRequest( ); - } - else - { - /* Give up, start again. */ - xDHCPData.eDHCPState = eWaitingSendFirstDiscover; - } - } - } - break; - - #if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) - case eGetLinkLayerAddress: - if( ( xTaskGetTickCount() - xDHCPData.xDHCPTxTime ) > xDHCPData.xDHCPTxPeriod ) - { - if( xARPHadIPClash == pdFALSE ) - { - /* ARP OK. proceed. */ - iptraceDHCP_SUCCEDEED( xDHCPData.ulOfferedIPAddress ); - - /* Auto-IP succeeded, the default configured IP-address will - be used. Now call vIPNetworkUpCalls() to send the - network-up event and start the ARP timer. */ - vIPNetworkUpCalls( ); - xDHCPData.eDHCPState = eNotUsingLeasedAddress; - } - else - { - /* ARP clashed - try another IP address. */ - prvPrepareLinkLayerIPLookUp(); - - /* Setting an IP address manually so set to not using leased - address mode. */ - xDHCPData.eDHCPState = eGetLinkLayerAddress; - } - } - break; - #endif /* ipconfigDHCP_FALL_BACK_AUTO_IP */ - - case eLeasedAddress : - - /* Resend the request at the appropriate time to renew the lease. */ - prvCreateDHCPSocket(); - - if( xDHCPData.xDHCPSocket != NULL ) - { - xDHCPData.xDHCPTxTime = xTaskGetTickCount(); - xDHCPData.xDHCPTxPeriod = dhcpINITIAL_DHCP_TX_PERIOD; - prvSendDHCPRequest( ); - xDHCPData.eDHCPState = eWaitingAcknowledge; - - /* From now on, we should be called more often */ - vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD ); - } - break; - - case eNotUsingLeasedAddress: - - vIPSetDHCPTimerEnableState( pdFALSE ); - break; - - default: - break; - } - - if( xGivingUp != pdFALSE ) - { - /* xGivingUp became true either because of a time-out, or because - xApplicationDHCPHook() returned another value than 'eDHCPContinue', - meaning that the conversion is canceled from here. */ - - /* Revert to static IP address. */ - taskENTER_CRITICAL(); - { - *ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress; - iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS( xNetworkAddressing.ulDefaultIPAddress ); - } - taskEXIT_CRITICAL(); - - xDHCPData.eDHCPState = eNotUsingLeasedAddress; - vIPSetDHCPTimerEnableState( pdFALSE ); - - /* DHCP failed, the default configured IP-address will be used. Now - call vIPNetworkUpCalls() to send the network-up event and start the ARP - timer. */ - vIPNetworkUpCalls( ); - - /* Test if socket was indeed created. */ - if( xDHCPData.xDHCPSocket != NULL ) - { - /* Close socket to ensure packets don't queue on it. */ - vSocketClose( xDHCPData.xDHCPSocket ); - xDHCPData.xDHCPSocket = NULL; - } - } -} -/*-----------------------------------------------------------*/ - -static void prvCreateDHCPSocket( void ) -{ -struct freertos_sockaddr xAddress; -BaseType_t xReturn; -TickType_t xTimeoutTime = ( TickType_t ) 0; - - /* Create the socket, if it has not already been created. */ - if( xDHCPData.xDHCPSocket == NULL ) - { - xDHCPData.xDHCPSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - if( xDHCPData.xDHCPSocket != FREERTOS_INVALID_SOCKET ) - { - - /* Ensure the Rx and Tx timeouts are zero as the DHCP executes in the - context of the IP task. */ - FreeRTOS_setsockopt( xDHCPData.xDHCPSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); - FreeRTOS_setsockopt( xDHCPData.xDHCPSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); - - /* Bind to the standard DHCP client port. */ - xAddress.sin_port = ( uint16_t ) dhcpCLIENT_PORT; - xReturn = vSocketBind( xDHCPData.xDHCPSocket, &xAddress, sizeof( xAddress ), pdFALSE ); - if( xReturn != 0 ) - { - /* Binding failed, close the socket again. */ - vSocketClose( xDHCPData.xDHCPSocket ); - xDHCPData.xDHCPSocket = NULL; - } - } - else - { - /* Change to NULL for easier testing. */ - xDHCPData.xDHCPSocket = NULL; - } - } -} -/*-----------------------------------------------------------*/ - -static void prvInitialiseDHCP( void ) -{ - /* Initialise the parameters that will be set by the DHCP process. Per - https://www.ietf.org/rfc/rfc2131.txt, Transaction ID should be a random - value chosen by the client. */ - - /* Check for random number generator API failure. */ - if( xApplicationGetRandomNumber( &( xDHCPData.ulTransactionId ) ) != pdFALSE ) - { - xDHCPData.xUseBroadcast = 0; - xDHCPData.ulOfferedIPAddress = 0UL; - xDHCPData.ulDHCPServerAddress = 0UL; - xDHCPData.xDHCPTxPeriod = dhcpINITIAL_DHCP_TX_PERIOD; - - /* Create the DHCP socket if it has not already been created. */ - prvCreateDHCPSocket(); - FreeRTOS_debug_printf( ( "prvInitialiseDHCP: start after %lu ticks\n", dhcpINITIAL_TIMER_PERIOD ) ); - vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD ); - } - else - { - /* There was a problem with the randomiser. */ - } -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType ) -{ -uint8_t *pucUDPPayload, *pucLastByte; -struct freertos_sockaddr xClient; -uint32_t xClientLength = sizeof( xClient ); -int32_t lBytes; -DHCPMessage_t *pxDHCPMessage; -uint8_t *pucByte, ucOptionCode, ucLength; -uint32_t ulProcessed, ulParameter; -BaseType_t xReturn = pdFALSE; -const uint32_t ulMandatoryOptions = 2ul; /* DHCP server address, and the correct DHCP message type must be present in the options. */ - - lBytes = FreeRTOS_recvfrom( xDHCPData.xDHCPSocket, ( void * ) &pucUDPPayload, 0ul, FREERTOS_ZERO_COPY, &xClient, &xClientLength ); - - if( lBytes > 0 ) - { - /* Map a DHCP structure onto the received data. */ - pxDHCPMessage = ( DHCPMessage_t * ) ( pucUDPPayload ); - - /* Sanity check. */ - if( ( lBytes >= sizeof( DHCPMessage_t ) ) && - ( pxDHCPMessage->ulDHCPCookie == ( uint32_t ) dhcpCOOKIE ) && - ( pxDHCPMessage->ucOpcode == ( uint8_t ) dhcpREPLY_OPCODE ) && - ( pxDHCPMessage->ulTransactionID == FreeRTOS_htonl( xDHCPData.ulTransactionId ) ) ) - { - if( memcmp( ( void * ) &( pxDHCPMessage->ucClientHardwareAddress ), - ( void * ) ipLOCAL_MAC_ADDRESS, - sizeof( MACAddress_t ) ) == 0 ) - { - /* None of the essential options have been processed yet. */ - ulProcessed = 0ul; - - /* Walk through the options until the dhcpOPTION_END_BYTE byte - is found, taking care not to walk off the end of the options. */ - pucByte = &( pxDHCPMessage->ucFirstOptionByte ); - /* Maintain a pointer to the last valid byte (i.e. not the first - invalid byte). */ - pucLastByte = pucUDPPayload + lBytes - 1; - - while( pucByte <= pucLastByte ) - { - ucOptionCode = pucByte[ 0 ]; - if( ucOptionCode == dhcpOPTION_END_BYTE ) - { - /* Ready, the last byte has been seen. */ - break; - } - if( ucOptionCode == dhcpZERO_PAD_OPTION_CODE ) - { - /* The value zero is used as a pad byte, - it is not followed by a length byte. */ - pucByte += 1; - continue; - } - - /* Stop if the response is malformed. */ - if( pucByte < pucLastByte ) - { - /* There are at least two bytes left. */ - ucLength = pucByte[ 1 ]; - pucByte += 2; - - if( pucByte + ucLength > pucLastByte ) - { - break; - } - } - else - { - break; - } - - /* In most cases, a 4-byte network-endian parameter follows, - just get it once here and use later. */ - if( ucLength >= sizeof( ulParameter ) ) - { - memcpy( ( void * ) &( ulParameter ), - ( void * ) pucByte, - ( size_t ) sizeof( ulParameter ) ); - } - else - { - ulParameter = 0; - } - - /* Option-specific handling. */ - switch( ucOptionCode ) - { - case dhcpMESSAGE_TYPE_OPTION_CODE : - - if( *pucByte == ( uint8_t ) xExpectedMessageType ) - { - /* The message type is the message type the - state machine is expecting. */ - ulProcessed++; - } - else if( *pucByte == ( uint8_t ) dhcpMESSAGE_TYPE_NACK ) - { - if( xExpectedMessageType == ( BaseType_t ) dhcpMESSAGE_TYPE_ACK ) - { - /* Start again. */ - xDHCPData.eDHCPState = eWaitingSendFirstDiscover; - } - } - else - { - /* Don't process other message types. */ - } - break; - - case dhcpSUBNET_MASK_OPTION_CODE : - - if( ucLength == sizeof( uint32_t ) ) - { - xNetworkAddressing.ulNetMask = ulParameter; - } - break; - - case dhcpGATEWAY_OPTION_CODE : - - if( ucLength == sizeof( uint32_t ) ) - { - /* ulProcessed is not incremented in this case - because the gateway is not essential. */ - xNetworkAddressing.ulGatewayAddress = ulParameter; - } - break; - - case dhcpDNS_SERVER_OPTIONS_CODE : - - /* ulProcessed is not incremented in this case - because the DNS server is not essential. Only the - first DNS server address is taken. */ - xNetworkAddressing.ulDNSServerAddress = ulParameter; - break; - - case dhcpSERVER_IP_ADDRESS_OPTION_CODE : - - if( ucLength == sizeof( uint32_t ) ) - { - if( xExpectedMessageType == ( BaseType_t ) dhcpMESSAGE_TYPE_OFFER ) - { - /* Offers state the replying server. */ - ulProcessed++; - xDHCPData.ulDHCPServerAddress = ulParameter; - } - else - { - /* The ack must come from the expected server. */ - if( xDHCPData.ulDHCPServerAddress == ulParameter ) - { - ulProcessed++; - } - } - } - break; - - case dhcpLEASE_TIME_OPTION_CODE : - - if( ucLength == sizeof( xDHCPData.ulLeaseTime ) ) - { - /* ulProcessed is not incremented in this case - because the lease time is not essential. */ - /* The DHCP parameter is in seconds, convert - to host-endian format. */ - xDHCPData.ulLeaseTime = FreeRTOS_ntohl( ulParameter ); - - /* Divide the lease time by two to ensure a - renew request is sent before the lease actually - expires. */ - xDHCPData.ulLeaseTime >>= 1UL; - - /* Multiply with configTICK_RATE_HZ to get clock - ticks. */ - xDHCPData.ulLeaseTime = configTICK_RATE_HZ * xDHCPData.ulLeaseTime; - } - break; - - default : - - /* Not interested in this field. */ - - break; - } - - /* Jump over the data to find the next option code. */ - if( ucLength == 0u ) - { - break; - } - else - { - pucByte += ucLength; - } - } - - /* Were all the mandatory options received? */ - if( ulProcessed >= ulMandatoryOptions ) - { - /* HT:endian: used to be network order */ - xDHCPData.ulOfferedIPAddress = pxDHCPMessage->ulYourIPAddress_yiaddr; - FreeRTOS_printf( ( "vDHCPProcess: offer %lxip\n", FreeRTOS_ntohl( xDHCPData.ulOfferedIPAddress ) ) ); - xReturn = pdPASS; - } - } - } - - FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucUDPPayload ); - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static uint8_t *prvCreatePartDHCPMessage( struct freertos_sockaddr *pxAddress, BaseType_t xOpcode, const uint8_t * const pucOptionsArray, size_t *pxOptionsArraySize ) -{ -DHCPMessage_t *pxDHCPMessage; -size_t xRequiredBufferSize = sizeof( DHCPMessage_t ) + *pxOptionsArraySize; -uint8_t *pucUDPPayloadBuffer; - -#if( ipconfigDHCP_REGISTER_HOSTNAME == 1 ) - const char *pucHostName = pcApplicationHostnameHook (); - size_t xNameLength = strlen( pucHostName ); - uint8_t *pucPtr; - - xRequiredBufferSize += ( 2 + xNameLength ); -#endif - - /* Get a buffer. This uses a maximum delay, but the delay will be capped - to ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS so the return value still needs to - be test. */ - do - { - } while( ( pucUDPPayloadBuffer = ( uint8_t * ) FreeRTOS_GetUDPPayloadBuffer( xRequiredBufferSize, portMAX_DELAY ) ) == NULL ); - - pxDHCPMessage = ( DHCPMessage_t * ) pucUDPPayloadBuffer; - - /* Most fields need to be zero. */ - memset( ( void * ) pxDHCPMessage, 0x00, sizeof( DHCPMessage_t ) ); - - /* Create the message. */ - pxDHCPMessage->ucOpcode = ( uint8_t ) xOpcode; - pxDHCPMessage->ucAddressType = ( uint8_t ) dhcpADDRESS_TYPE_ETHERNET; - pxDHCPMessage->ucAddressLength = ( uint8_t ) dhcpETHERNET_ADDRESS_LENGTH; - pxDHCPMessage->ulTransactionID = FreeRTOS_htonl( xDHCPData.ulTransactionId ); - pxDHCPMessage->ulDHCPCookie = ( uint32_t ) dhcpCOOKIE; - if( xDHCPData.xUseBroadcast != pdFALSE ) - { - pxDHCPMessage->usFlags = ( uint16_t ) dhcpBROADCAST; - } - else - { - pxDHCPMessage->usFlags = 0u; - } - - memcpy( ( void * ) &( pxDHCPMessage->ucClientHardwareAddress[ 0 ] ), ( void * ) ipLOCAL_MAC_ADDRESS, sizeof( MACAddress_t ) ); - - /* Copy in the const part of the options options. */ - memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET ] ), ( void * ) pucOptionsArray, *pxOptionsArraySize ); - - #if( ipconfigDHCP_REGISTER_HOSTNAME == 1 ) - { - /* With this option, the hostname can be registered as well which makes - it easier to lookup a device in a router's list of DHCP clients. */ - - /* Point to where the OPTION_END was stored to add data. */ - pucPtr = &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + ( *pxOptionsArraySize - 1 ) ] ); - pucPtr[ 0 ] = dhcpDNS_HOSTNAME_OPTIONS_CODE; - pucPtr[ 1 ] = ( uint8_t ) xNameLength; - memcpy( ( void *) ( pucPtr + 2 ), pucHostName, xNameLength ); - pucPtr[ 2 + xNameLength ] = dhcpOPTION_END_BYTE; - *pxOptionsArraySize += ( 2 + xNameLength ); - } - #endif - - /* Map in the client identifier. */ - memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + dhcpCLIENT_IDENTIFIER_OFFSET ] ), - ( void * ) ipLOCAL_MAC_ADDRESS, sizeof( MACAddress_t ) ); - - /* Set the addressing. */ - pxAddress->sin_addr = ipBROADCAST_IP_ADDRESS; - pxAddress->sin_port = ( uint16_t ) dhcpSERVER_PORT; - - return pucUDPPayloadBuffer; -} -/*-----------------------------------------------------------*/ - -static void prvSendDHCPRequest( void ) -{ -uint8_t *pucUDPPayloadBuffer; -struct freertos_sockaddr xAddress; -static const uint8_t ucDHCPRequestOptions[] = -{ - /* Do not change the ordering without also changing - dhcpCLIENT_IDENTIFIER_OFFSET, dhcpREQUESTED_IP_ADDRESS_OFFSET and - dhcpDHCP_SERVER_IP_ADDRESS_OFFSET. */ - dhcpMESSAGE_TYPE_OPTION_CODE, 1, dhcpMESSAGE_TYPE_REQUEST, /* Message type option. */ - dhcpCLIENT_IDENTIFIER_OPTION_CODE, 6, 0, 0, 0, 0, 0, 0, /* Client identifier. */ - dhcpREQUEST_IP_ADDRESS_OPTION_CODE, 4, 0, 0, 0, 0, /* The IP address being requested. */ - dhcpSERVER_IP_ADDRESS_OPTION_CODE, 4, 0, 0, 0, 0, /* The IP address of the DHCP server. */ - dhcpOPTION_END_BYTE -}; -size_t xOptionsLength = sizeof( ucDHCPRequestOptions ); - - pucUDPPayloadBuffer = prvCreatePartDHCPMessage( &xAddress, dhcpREQUEST_OPCODE, ucDHCPRequestOptions, &xOptionsLength ); - - /* Copy in the IP address being requested. */ - memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + dhcpREQUESTED_IP_ADDRESS_OFFSET ] ), - ( void * ) &( xDHCPData.ulOfferedIPAddress ), sizeof( xDHCPData.ulOfferedIPAddress ) ); - - /* Copy in the address of the DHCP server being used. */ - memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + dhcpDHCP_SERVER_IP_ADDRESS_OFFSET ] ), - ( void * ) &( xDHCPData.ulDHCPServerAddress ), sizeof( xDHCPData.ulDHCPServerAddress ) ); - - FreeRTOS_debug_printf( ( "vDHCPProcess: reply %lxip\n", FreeRTOS_ntohl( xDHCPData.ulOfferedIPAddress ) ) ); - iptraceSENDING_DHCP_REQUEST(); - - /* 'ucFirstOptionByte' is part of DHCP message struct, so subtract one byte. */ - if( FreeRTOS_sendto( xDHCPData.xDHCPSocket, pucUDPPayloadBuffer, ( sizeof( DHCPMessage_t ) + xOptionsLength - 1 ), FREERTOS_ZERO_COPY, &xAddress, sizeof( xAddress ) ) == 0 ) - { - /* The packet was not successfully queued for sending and must be - returned to the stack. */ - FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayloadBuffer ); - } -} -/*-----------------------------------------------------------*/ - -static void prvSendDHCPDiscover( void ) -{ -uint8_t *pucUDPPayloadBuffer; -struct freertos_sockaddr xAddress; -static const uint8_t ucDHCPDiscoverOptions[] = -{ - /* Do not change the ordering without also changing dhcpCLIENT_IDENTIFIER_OFFSET. */ - dhcpMESSAGE_TYPE_OPTION_CODE, 1, dhcpMESSAGE_TYPE_DISCOVER, /* Message type option. */ - dhcpCLIENT_IDENTIFIER_OPTION_CODE, 6, 0, 0, 0, 0, 0, 0, /* Client identifier. */ - dhcpPARAMETER_REQUEST_OPTION_CODE, 3, dhcpSUBNET_MASK_OPTION_CODE, dhcpGATEWAY_OPTION_CODE, dhcpDNS_SERVER_OPTIONS_CODE, /* Parameter request option. */ - dhcpOPTION_END_BYTE -}; -size_t xOptionsLength = sizeof( ucDHCPDiscoverOptions ); - - pucUDPPayloadBuffer = prvCreatePartDHCPMessage( &xAddress, dhcpREQUEST_OPCODE, ucDHCPDiscoverOptions, &xOptionsLength ); - - FreeRTOS_debug_printf( ( "vDHCPProcess: discover\n" ) ); - iptraceSENDING_DHCP_DISCOVER(); - - /* 'ucFirstOptionByte' is part of DHCP message struct, so subtract one byte. */ - if( FreeRTOS_sendto( xDHCPData.xDHCPSocket, pucUDPPayloadBuffer, ( sizeof( DHCPMessage_t ) + xOptionsLength - 1 ), FREERTOS_ZERO_COPY, &xAddress, sizeof( xAddress ) ) == 0 ) - { - /* The packet was not successfully queued for sending and must be - returned to the stack. */ - FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayloadBuffer ); - } -} -/*-----------------------------------------------------------*/ - -#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) - - static void prvPrepareLinkLayerIPLookUp( void ) - { - uint8_t ucLinkLayerIPAddress[ 2 ]; - uint32_t ulNumbers[ 2 ]; - - /* After DHCP has failed to answer, prepare everything to start - trying-out LinkLayer IP-addresses, using the random method. */ - xDHCPData.xDHCPTxTime = xTaskGetTickCount(); - - xApplicationGetRandomNumber( &( ulNumbers[ 0 ] ) ); - xApplicationGetRandomNumber( &( ulNumbers[ 1 ] ) ); - ucLinkLayerIPAddress[ 0 ] = ( uint8_t )1 + ( uint8_t )( ulNumbers[ 0 ] % 0xFDu ); /* get value 1..254 for IP-address 3rd byte of IP address to try. */ - ucLinkLayerIPAddress[ 1 ] = ( uint8_t )1 + ( uint8_t )( ulNumbers[ 1 ] % 0xFDu ); /* get value 1..254 for IP-address 4th byte of IP address to try. */ - - xNetworkAddressing.ulGatewayAddress = FreeRTOS_htonl( 0xA9FE0203 ); - - /* prepare xDHCPData with data to test. */ - xDHCPData.ulOfferedIPAddress = - FreeRTOS_inet_addr_quick( LINK_LAYER_ADDRESS_0, LINK_LAYER_ADDRESS_1, ucLinkLayerIPAddress[ 0 ], ucLinkLayerIPAddress[ 1 ] ); - - xDHCPData.ulLeaseTime = dhcpDEFAULT_LEASE_TIME; /* don't care about lease time. just put anything. */ - - xNetworkAddressing.ulNetMask = - FreeRTOS_inet_addr_quick( LINK_LAYER_NETMASK_0, LINK_LAYER_NETMASK_1, LINK_LAYER_NETMASK_2, LINK_LAYER_NETMASK_3 ); - - /* DHCP completed. The IP address can now be used, and the - timer set to the lease timeout time. */ - *ipLOCAL_IP_ADDRESS_POINTER = xDHCPData.ulOfferedIPAddress; - - /* Setting the 'local' broadcast address, something like 192.168.1.255' */ - xNetworkAddressing.ulBroadcastAddress = ( xDHCPData.ulOfferedIPAddress & xNetworkAddressing.ulNetMask ) | ~xNetworkAddressing.ulNetMask; - - /* Close socket to ensure packets don't queue on it. not needed anymore as DHCP failed. but still need timer for ARP testing. */ - if( xDHCPData.xDHCPSocket != NULL ) - { - /* Close socket to ensure packets don't queue on it. */ - vSocketClose( xDHCPData.xDHCPSocket ); - xDHCPData.xDHCPSocket = NULL; - } - - xApplicationGetRandomNumber( &( ulNumbers[ 0 ] ) ); - xDHCPData.xDHCPTxPeriod = pdMS_TO_TICKS( 3000ul + ( ulNumbers[ 0 ] & 0x3ffuL ) ); /* do ARP test every (3 + 0-1024mS) seconds. */ - - xARPHadIPClash = pdFALSE; /* reset flag that shows if have ARP clash. */ - vARPSendGratuitous(); - } - -#endif /* ipconfigDHCP_FALL_BACK_AUTO_IP */ -/*-----------------------------------------------------------*/ - -#endif /* ipconfigUSE_DHCP != 0 */ - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_TCP_IP.h" +#include "FreeRTOS_DHCP.h" +#include "FreeRTOS_ARP.h" +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" + +/* Exclude the entire file if DHCP is not enabled. */ +#if( ipconfigUSE_DHCP != 0 ) + +#if ( ipconfigUSE_DHCP != 0 ) && ( ipconfigNETWORK_MTU < 586u ) + /* DHCP must be able to receive an options field of 312 bytes, the fixed + part of the DHCP packet is 240 bytes, and the IP/UDP headers take 28 bytes. */ + #error ipconfigNETWORK_MTU needs to be at least 586 to use DHCP +#endif + +/* Parameter widths in the DHCP packet. */ +#define dhcpCLIENT_HARDWARE_ADDRESS_LENGTH 16 +#define dhcpSERVER_HOST_NAME_LENGTH 64 +#define dhcpBOOT_FILE_NAME_LENGTH 128 + +/* Timer parameters */ +#ifndef dhcpINITIAL_DHCP_TX_PERIOD + #define dhcpINITIAL_TIMER_PERIOD ( pdMS_TO_TICKS( 250 ) ) + #define dhcpINITIAL_DHCP_TX_PERIOD ( pdMS_TO_TICKS( 5000 ) ) +#endif + +/* Codes of interest found in the DHCP options field. */ +#define dhcpZERO_PAD_OPTION_CODE ( 0u ) +#define dhcpSUBNET_MASK_OPTION_CODE ( 1u ) +#define dhcpGATEWAY_OPTION_CODE ( 3u ) +#define dhcpDNS_SERVER_OPTIONS_CODE ( 6u ) +#define dhcpDNS_HOSTNAME_OPTIONS_CODE ( 12u ) +#define dhcpREQUEST_IP_ADDRESS_OPTION_CODE ( 50u ) +#define dhcpLEASE_TIME_OPTION_CODE ( 51u ) +#define dhcpMESSAGE_TYPE_OPTION_CODE ( 53u ) +#define dhcpSERVER_IP_ADDRESS_OPTION_CODE ( 54u ) +#define dhcpPARAMETER_REQUEST_OPTION_CODE ( 55u ) +#define dhcpCLIENT_IDENTIFIER_OPTION_CODE ( 61u ) + +/* The four DHCP message types of interest. */ +#define dhcpMESSAGE_TYPE_DISCOVER ( 1 ) +#define dhcpMESSAGE_TYPE_OFFER ( 2 ) +#define dhcpMESSAGE_TYPE_REQUEST ( 3 ) +#define dhcpMESSAGE_TYPE_ACK ( 5 ) +#define dhcpMESSAGE_TYPE_NACK ( 6 ) + +/* Offsets into the transmitted DHCP options fields at which various parameters +are located. */ +#define dhcpCLIENT_IDENTIFIER_OFFSET ( 5 ) +#define dhcpREQUESTED_IP_ADDRESS_OFFSET ( 13 ) +#define dhcpDHCP_SERVER_IP_ADDRESS_OFFSET ( 19 ) + +/* Values used in the DHCP packets. */ +#define dhcpREQUEST_OPCODE ( 1 ) +#define dhcpREPLY_OPCODE ( 2 ) +#define dhcpADDRESS_TYPE_ETHERNET ( 1 ) +#define dhcpETHERNET_ADDRESS_LENGTH ( 6 ) + +/* If a lease time is not received, use the default of two days. */ +/* 48 hours in ticks. Can not use pdMS_TO_TICKS() as integer overflow can occur. */ +#define dhcpDEFAULT_LEASE_TIME ( ( 48UL * 60UL * 60UL ) * configTICK_RATE_HZ ) + +/* Don't allow the lease time to be too short. */ +#define dhcpMINIMUM_LEASE_TIME ( pdMS_TO_TICKS( 60000UL ) ) /* 60 seconds in ticks. */ + +/* Marks the end of the variable length options field in the DHCP packet. */ +#define dhcpOPTION_END_BYTE 0xffu + +/* Offset into a DHCP message at which the first byte of the options is +located. */ +#define dhcpFIRST_OPTION_BYTE_OFFSET ( 0xf0 ) + +/* Standard DHCP port numbers and magic cookie value. */ +#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) + #define dhcpCLIENT_PORT 0x4400u + #define dhcpSERVER_PORT 0x4300u + #define dhcpCOOKIE 0x63538263ul + #define dhcpBROADCAST 0x0080u +#else + #define dhcpCLIENT_PORT 0x0044u + #define dhcpSERVER_PORT 0x0043u + #define dhcpCOOKIE 0x63825363ul + #define dhcpBROADCAST 0x8000u +#endif /* ipconfigBYTE_ORDER */ + +#include "pack_struct_start.h" +struct xDHCPMessage +{ + uint8_t ucOpcode; + uint8_t ucAddressType; + uint8_t ucAddressLength; + uint8_t ucHops; + uint32_t ulTransactionID; + uint16_t usElapsedTime; + uint16_t usFlags; + uint32_t ulClientIPAddress_ciaddr; + uint32_t ulYourIPAddress_yiaddr; + uint32_t ulServerIPAddress_siaddr; + uint32_t ulRelayAgentIPAddress_giaddr; + uint8_t ucClientHardwareAddress[ dhcpCLIENT_HARDWARE_ADDRESS_LENGTH ]; + uint8_t ucServerHostName[ dhcpSERVER_HOST_NAME_LENGTH ]; + uint8_t ucBootFileName[ dhcpBOOT_FILE_NAME_LENGTH ]; + uint32_t ulDHCPCookie; + uint8_t ucFirstOptionByte; +} +#include "pack_struct_end.h" +typedef struct xDHCPMessage DHCPMessage_t; + +/* DHCP state machine states. */ +typedef enum +{ + eWaitingSendFirstDiscover = 0, /* Initial state. Send a discover the first time it is called, and reset all timers. */ + eWaitingOffer, /* Either resend the discover, or, if the offer is forthcoming, send a request. */ + eWaitingAcknowledge, /* Either resend the request. */ + #if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) + eGetLinkLayerAddress, /* When DHCP didn't respond, try to obtain a LinkLayer address 168.254.x.x. */ + #endif + eLeasedAddress, /* Resend the request at the appropriate time to renew the lease. */ + eNotUsingLeasedAddress /* DHCP failed, and a default IP address is being used. */ +} eDHCPState_t; + +/* Hold information in between steps in the DHCP state machine. */ +struct xDHCP_DATA +{ + uint32_t ulTransactionId; + uint32_t ulOfferedIPAddress; + uint32_t ulDHCPServerAddress; + uint32_t ulLeaseTime; + /* Hold information on the current timer state. */ + TickType_t xDHCPTxTime; + TickType_t xDHCPTxPeriod; + /* Try both without and with the broadcast flag */ + BaseType_t xUseBroadcast; + /* Maintains the DHCP state machine state. */ + eDHCPState_t eDHCPState; + /* The UDP socket used for all incoming and outgoing DHCP traffic. */ + Socket_t xDHCPSocket; +}; + +typedef struct xDHCP_DATA DHCPData_t; + +#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) + /* Define the Link Layer IP address: 169.254.x.x */ + #define LINK_LAYER_ADDRESS_0 169 + #define LINK_LAYER_ADDRESS_1 254 + + /* Define the netmask used: 255.255.0.0 */ + #define LINK_LAYER_NETMASK_0 255 + #define LINK_LAYER_NETMASK_1 255 + #define LINK_LAYER_NETMASK_2 0 + #define LINK_LAYER_NETMASK_3 0 +#endif + + +/* + * Generate a DHCP discover message and send it on the DHCP socket. + */ +static void prvSendDHCPDiscover( void ); + +/* + * Interpret message received on the DHCP socket. + */ +static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType ); + +/* + * Generate a DHCP request packet, and send it on the DHCP socket. + */ +static void prvSendDHCPRequest( void ); + +/* + * Prepare to start a DHCP transaction. This initialises some state variables + * and creates the DHCP socket if necessary. + */ +static void prvInitialiseDHCP( void ); + +/* + * Creates the part of outgoing DHCP messages that are common to all outgoing + * DHCP messages. + */ +static uint8_t *prvCreatePartDHCPMessage( struct freertos_sockaddr *pxAddress, BaseType_t xOpcode, const uint8_t * const pucOptionsArray, size_t *pxOptionsArraySize ); + +/* + * Create the DHCP socket, if it has not been created already. + */ +static void prvCreateDHCPSocket( void ); + +/* + * After DHCP has failed to answer, prepare everything to start searching + * for (trying-out) LinkLayer IP-addresses, using the random method: Send + * a gratuitous ARP request and wait if another device responds to it. + */ +#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) + static void prvPrepareLinkLayerIPLookUp( void ); +#endif + +/*-----------------------------------------------------------*/ + +/* The next DHCP transaction Id to be used. */ +static DHCPData_t xDHCPData; + +/*-----------------------------------------------------------*/ + +BaseType_t xIsDHCPSocket( Socket_t xSocket ) +{ +BaseType_t xReturn; + + if( xDHCPData.xDHCPSocket == xSocket ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +void vDHCPProcess( BaseType_t xReset ) +{ +BaseType_t xGivingUp = pdFALSE; +#if( ipconfigUSE_DHCP_HOOK != 0 ) + eDHCPCallbackAnswer_t eAnswer; +#endif /* ipconfigUSE_DHCP_HOOK */ + + /* Is DHCP starting over? */ + if( xReset != pdFALSE ) + { + xDHCPData.eDHCPState = eWaitingSendFirstDiscover; + } + + switch( xDHCPData.eDHCPState ) + { + case eWaitingSendFirstDiscover : + /* Ask the user if a DHCP discovery is required. */ + #if( ipconfigUSE_DHCP_HOOK != 0 ) + eAnswer = xApplicationDHCPHook( eDHCPPhasePreDiscover, xNetworkAddressing.ulDefaultIPAddress ); + if( eAnswer == eDHCPContinue ) + #endif /* ipconfigUSE_DHCP_HOOK */ + { + /* Initial state. Create the DHCP socket, timer, etc. if they + have not already been created. */ + prvInitialiseDHCP(); + + /* See if prvInitialiseDHCP() has creates a socket. */ + if( xDHCPData.xDHCPSocket == NULL ) + { + xGivingUp = pdTRUE; + break; + } + + *ipLOCAL_IP_ADDRESS_POINTER = 0UL; + + /* Send the first discover request. */ + if( xDHCPData.xDHCPSocket != NULL ) + { + xDHCPData.xDHCPTxTime = xTaskGetTickCount(); + prvSendDHCPDiscover( ); + xDHCPData.eDHCPState = eWaitingOffer; + } + } + #if( ipconfigUSE_DHCP_HOOK != 0 ) + else + { + if( eAnswer == eDHCPUseDefaults ) + { + memcpy( &xNetworkAddressing, &xDefaultAddressing, sizeof( xNetworkAddressing ) ); + } + + /* The user indicates that the DHCP process does not continue. */ + xGivingUp = pdTRUE; + } + #endif /* ipconfigUSE_DHCP_HOOK */ + break; + + case eWaitingOffer : + + xGivingUp = pdFALSE; + + /* Look for offers coming in. */ + if( prvProcessDHCPReplies( dhcpMESSAGE_TYPE_OFFER ) == pdPASS ) + { + #if( ipconfigUSE_DHCP_HOOK != 0 ) + /* Ask the user if a DHCP request is required. */ + eAnswer = xApplicationDHCPHook( eDHCPPhasePreRequest, xDHCPData.ulOfferedIPAddress ); + + if( eAnswer == eDHCPContinue ) + #endif /* ipconfigUSE_DHCP_HOOK */ + { + /* An offer has been made, the user wants to continue, + generate the request. */ + xDHCPData.xDHCPTxTime = xTaskGetTickCount(); + xDHCPData.xDHCPTxPeriod = dhcpINITIAL_DHCP_TX_PERIOD; + prvSendDHCPRequest( ); + xDHCPData.eDHCPState = eWaitingAcknowledge; + break; + } + + #if( ipconfigUSE_DHCP_HOOK != 0 ) + if( eAnswer == eDHCPUseDefaults ) + { + memcpy( &xNetworkAddressing, &xDefaultAddressing, sizeof( xNetworkAddressing ) ); + } + + /* The user indicates that the DHCP process does not continue. */ + xGivingUp = pdTRUE; + #endif /* ipconfigUSE_DHCP_HOOK */ + } + else if( ( xTaskGetTickCount() - xDHCPData.xDHCPTxTime ) > xDHCPData.xDHCPTxPeriod ) + { + /* It is time to send another Discover. Increase the time + period, and if it has not got to the point of giving up - send + another discovery. */ + xDHCPData.xDHCPTxPeriod <<= 1; + + if( xDHCPData.xDHCPTxPeriod <= ipconfigMAXIMUM_DISCOVER_TX_PERIOD ) + { + if( xApplicationGetRandomNumber( &( xDHCPData.ulTransactionId ) ) != pdFALSE ) + { + xDHCPData.xDHCPTxTime = xTaskGetTickCount( ); + xDHCPData.xUseBroadcast = !xDHCPData.xUseBroadcast; + prvSendDHCPDiscover( ); + FreeRTOS_debug_printf( ( "vDHCPProcess: timeout %lu ticks\n", xDHCPData.xDHCPTxPeriod ) ); + } + else + { + FreeRTOS_debug_printf( ( "vDHCPProcess: failed to generate a random Transaction ID\n" ) ); + } + } + else + { + FreeRTOS_debug_printf( ( "vDHCPProcess: giving up %lu > %lu ticks\n", xDHCPData.xDHCPTxPeriod, ipconfigMAXIMUM_DISCOVER_TX_PERIOD ) ); + + #if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) + { + /* Only use a fake Ack if the default IP address == 0x00 + and the link local addressing is used. Start searching + a free LinkLayer IP-address. Next state will be + 'eGetLinkLayerAddress'. */ + prvPrepareLinkLayerIPLookUp(); + + /* Setting an IP address manually so set to not using + leased address mode. */ + xDHCPData.eDHCPState = eGetLinkLayerAddress; + } + #else + { + xGivingUp = pdTRUE; + } + #endif /* ipconfigDHCP_FALL_BACK_AUTO_IP */ + } + } + break; + + case eWaitingAcknowledge : + + /* Look for acks coming in. */ + if( prvProcessDHCPReplies( dhcpMESSAGE_TYPE_ACK ) == pdPASS ) + { + FreeRTOS_debug_printf( ( "vDHCPProcess: acked %lxip\n", FreeRTOS_ntohl( xDHCPData.ulOfferedIPAddress ) ) ); + + /* DHCP completed. The IP address can now be used, and the + timer set to the lease timeout time. */ + *ipLOCAL_IP_ADDRESS_POINTER = xDHCPData.ulOfferedIPAddress; + + /* Setting the 'local' broadcast address, something like + '192.168.1.255'. */ + xNetworkAddressing.ulBroadcastAddress = ( xDHCPData.ulOfferedIPAddress & xNetworkAddressing.ulNetMask ) | ~xNetworkAddressing.ulNetMask; + xDHCPData.eDHCPState = eLeasedAddress; + + iptraceDHCP_SUCCEDEED( xDHCPData.ulOfferedIPAddress ); + + /* DHCP failed, the default configured IP-address will be used + Now call vIPNetworkUpCalls() to send the network-up event and + start the ARP timer. */ + vIPNetworkUpCalls( ); + + /* Close socket to ensure packets don't queue on it. */ + vSocketClose( xDHCPData.xDHCPSocket ); + xDHCPData.xDHCPSocket = NULL; + + if( xDHCPData.ulLeaseTime == 0UL ) + { + xDHCPData.ulLeaseTime = dhcpDEFAULT_LEASE_TIME; + } + else if( xDHCPData.ulLeaseTime < dhcpMINIMUM_LEASE_TIME ) + { + xDHCPData.ulLeaseTime = dhcpMINIMUM_LEASE_TIME; + } + else + { + /* The lease time is already valid. */ + } + + /* Check for clashes. */ + vARPSendGratuitous(); + vIPReloadDHCPTimer( xDHCPData.ulLeaseTime ); + } + else + { + /* Is it time to send another Discover? */ + if( ( xTaskGetTickCount() - xDHCPData.xDHCPTxTime ) > xDHCPData.xDHCPTxPeriod ) + { + /* Increase the time period, and if it has not got to the + point of giving up - send another request. */ + xDHCPData.xDHCPTxPeriod <<= 1; + + if( xDHCPData.xDHCPTxPeriod <= ipconfigMAXIMUM_DISCOVER_TX_PERIOD ) + { + xDHCPData.xDHCPTxTime = xTaskGetTickCount(); + prvSendDHCPRequest( ); + } + else + { + /* Give up, start again. */ + xDHCPData.eDHCPState = eWaitingSendFirstDiscover; + } + } + } + break; + + #if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) + case eGetLinkLayerAddress: + if( ( xTaskGetTickCount() - xDHCPData.xDHCPTxTime ) > xDHCPData.xDHCPTxPeriod ) + { + if( xARPHadIPClash == pdFALSE ) + { + /* ARP OK. proceed. */ + iptraceDHCP_SUCCEDEED( xDHCPData.ulOfferedIPAddress ); + + /* Auto-IP succeeded, the default configured IP-address will + be used. Now call vIPNetworkUpCalls() to send the + network-up event and start the ARP timer. */ + vIPNetworkUpCalls( ); + xDHCPData.eDHCPState = eNotUsingLeasedAddress; + } + else + { + /* ARP clashed - try another IP address. */ + prvPrepareLinkLayerIPLookUp(); + + /* Setting an IP address manually so set to not using leased + address mode. */ + xDHCPData.eDHCPState = eGetLinkLayerAddress; + } + } + break; + #endif /* ipconfigDHCP_FALL_BACK_AUTO_IP */ + + case eLeasedAddress : + + /* Resend the request at the appropriate time to renew the lease. */ + prvCreateDHCPSocket(); + + if( xDHCPData.xDHCPSocket != NULL ) + { + xDHCPData.xDHCPTxTime = xTaskGetTickCount(); + xDHCPData.xDHCPTxPeriod = dhcpINITIAL_DHCP_TX_PERIOD; + prvSendDHCPRequest( ); + xDHCPData.eDHCPState = eWaitingAcknowledge; + + /* From now on, we should be called more often */ + vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD ); + } + break; + + case eNotUsingLeasedAddress: + + vIPSetDHCPTimerEnableState( pdFALSE ); + break; + + default: + break; + } + + if( xGivingUp != pdFALSE ) + { + /* xGivingUp became true either because of a time-out, or because + xApplicationDHCPHook() returned another value than 'eDHCPContinue', + meaning that the conversion is canceled from here. */ + + /* Revert to static IP address. */ + taskENTER_CRITICAL(); + { + *ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress; + iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS( xNetworkAddressing.ulDefaultIPAddress ); + } + taskEXIT_CRITICAL(); + + xDHCPData.eDHCPState = eNotUsingLeasedAddress; + vIPSetDHCPTimerEnableState( pdFALSE ); + + /* DHCP failed, the default configured IP-address will be used. Now + call vIPNetworkUpCalls() to send the network-up event and start the ARP + timer. */ + vIPNetworkUpCalls( ); + + /* Test if socket was indeed created. */ + if( xDHCPData.xDHCPSocket != NULL ) + { + /* Close socket to ensure packets don't queue on it. */ + vSocketClose( xDHCPData.xDHCPSocket ); + xDHCPData.xDHCPSocket = NULL; + } + } +} +/*-----------------------------------------------------------*/ + +static void prvCreateDHCPSocket( void ) +{ +struct freertos_sockaddr xAddress; +BaseType_t xReturn; +TickType_t xTimeoutTime = ( TickType_t ) 0; + + /* Create the socket, if it has not already been created. */ + if( xDHCPData.xDHCPSocket == NULL ) + { + xDHCPData.xDHCPSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); + if( xDHCPData.xDHCPSocket != FREERTOS_INVALID_SOCKET ) + { + + /* Ensure the Rx and Tx timeouts are zero as the DHCP executes in the + context of the IP task. */ + FreeRTOS_setsockopt( xDHCPData.xDHCPSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); + FreeRTOS_setsockopt( xDHCPData.xDHCPSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); + + /* Bind to the standard DHCP client port. */ + xAddress.sin_port = ( uint16_t ) dhcpCLIENT_PORT; + xReturn = vSocketBind( xDHCPData.xDHCPSocket, &xAddress, sizeof( xAddress ), pdFALSE ); + if( xReturn != 0 ) + { + /* Binding failed, close the socket again. */ + vSocketClose( xDHCPData.xDHCPSocket ); + xDHCPData.xDHCPSocket = NULL; + } + } + else + { + /* Change to NULL for easier testing. */ + xDHCPData.xDHCPSocket = NULL; + } + } +} +/*-----------------------------------------------------------*/ + +static void prvInitialiseDHCP( void ) +{ + /* Initialise the parameters that will be set by the DHCP process. Per + https://www.ietf.org/rfc/rfc2131.txt, Transaction ID should be a random + value chosen by the client. */ + + /* Check for random number generator API failure. */ + if( xApplicationGetRandomNumber( &( xDHCPData.ulTransactionId ) ) != pdFALSE ) + { + xDHCPData.xUseBroadcast = 0; + xDHCPData.ulOfferedIPAddress = 0UL; + xDHCPData.ulDHCPServerAddress = 0UL; + xDHCPData.xDHCPTxPeriod = dhcpINITIAL_DHCP_TX_PERIOD; + + /* Create the DHCP socket if it has not already been created. */ + prvCreateDHCPSocket(); + FreeRTOS_debug_printf( ( "prvInitialiseDHCP: start after %lu ticks\n", dhcpINITIAL_TIMER_PERIOD ) ); + vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD ); + } + else + { + /* There was a problem with the randomiser. */ + } +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType ) +{ +uint8_t *pucUDPPayload, *pucLastByte; +struct freertos_sockaddr xClient; +uint32_t xClientLength = sizeof( xClient ); +int32_t lBytes; +DHCPMessage_t *pxDHCPMessage; +uint8_t *pucByte, ucOptionCode, ucLength; +uint32_t ulProcessed, ulParameter; +BaseType_t xReturn = pdFALSE; +const uint32_t ulMandatoryOptions = 2ul; /* DHCP server address, and the correct DHCP message type must be present in the options. */ + + lBytes = FreeRTOS_recvfrom( xDHCPData.xDHCPSocket, ( void * ) &pucUDPPayload, 0ul, FREERTOS_ZERO_COPY, &xClient, &xClientLength ); + + if( lBytes > 0 ) + { + /* Map a DHCP structure onto the received data. */ + pxDHCPMessage = ( DHCPMessage_t * ) ( pucUDPPayload ); + + /* Sanity check. */ + if( ( lBytes >= sizeof( DHCPMessage_t ) ) && + ( pxDHCPMessage->ulDHCPCookie == ( uint32_t ) dhcpCOOKIE ) && + ( pxDHCPMessage->ucOpcode == ( uint8_t ) dhcpREPLY_OPCODE ) && + ( pxDHCPMessage->ulTransactionID == FreeRTOS_htonl( xDHCPData.ulTransactionId ) ) ) + { + if( memcmp( ( void * ) &( pxDHCPMessage->ucClientHardwareAddress ), + ( void * ) ipLOCAL_MAC_ADDRESS, + sizeof( MACAddress_t ) ) == 0 ) + { + /* None of the essential options have been processed yet. */ + ulProcessed = 0ul; + + /* Walk through the options until the dhcpOPTION_END_BYTE byte + is found, taking care not to walk off the end of the options. */ + pucByte = &( pxDHCPMessage->ucFirstOptionByte ); + /* Maintain a pointer to the last valid byte (i.e. not the first + invalid byte). */ + pucLastByte = pucUDPPayload + lBytes - 1; + + while( pucByte <= pucLastByte ) + { + ucOptionCode = pucByte[ 0 ]; + if( ucOptionCode == dhcpOPTION_END_BYTE ) + { + /* Ready, the last byte has been seen. */ + break; + } + if( ucOptionCode == dhcpZERO_PAD_OPTION_CODE ) + { + /* The value zero is used as a pad byte, + it is not followed by a length byte. */ + pucByte += 1; + continue; + } + + /* Stop if the response is malformed. */ + if( pucByte < pucLastByte ) + { + /* There are at least two bytes left. */ + ucLength = pucByte[ 1 ]; + pucByte += 2; + + if( pucByte + ucLength > pucLastByte ) + { + break; + } + } + else + { + break; + } + + /* In most cases, a 4-byte network-endian parameter follows, + just get it once here and use later. */ + if( ucLength >= sizeof( ulParameter ) ) + { + memcpy( ( void * ) &( ulParameter ), + ( void * ) pucByte, + ( size_t ) sizeof( ulParameter ) ); + } + else + { + ulParameter = 0; + } + + /* Option-specific handling. */ + switch( ucOptionCode ) + { + case dhcpMESSAGE_TYPE_OPTION_CODE : + + if( *pucByte == ( uint8_t ) xExpectedMessageType ) + { + /* The message type is the message type the + state machine is expecting. */ + ulProcessed++; + } + else if( *pucByte == ( uint8_t ) dhcpMESSAGE_TYPE_NACK ) + { + if( xExpectedMessageType == ( BaseType_t ) dhcpMESSAGE_TYPE_ACK ) + { + /* Start again. */ + xDHCPData.eDHCPState = eWaitingSendFirstDiscover; + } + } + else + { + /* Don't process other message types. */ + } + break; + + case dhcpSUBNET_MASK_OPTION_CODE : + + if( ucLength == sizeof( uint32_t ) ) + { + xNetworkAddressing.ulNetMask = ulParameter; + } + break; + + case dhcpGATEWAY_OPTION_CODE : + + if( ucLength == sizeof( uint32_t ) ) + { + /* ulProcessed is not incremented in this case + because the gateway is not essential. */ + xNetworkAddressing.ulGatewayAddress = ulParameter; + } + break; + + case dhcpDNS_SERVER_OPTIONS_CODE : + + /* ulProcessed is not incremented in this case + because the DNS server is not essential. Only the + first DNS server address is taken. */ + xNetworkAddressing.ulDNSServerAddress = ulParameter; + break; + + case dhcpSERVER_IP_ADDRESS_OPTION_CODE : + + if( ucLength == sizeof( uint32_t ) ) + { + if( xExpectedMessageType == ( BaseType_t ) dhcpMESSAGE_TYPE_OFFER ) + { + /* Offers state the replying server. */ + ulProcessed++; + xDHCPData.ulDHCPServerAddress = ulParameter; + } + else + { + /* The ack must come from the expected server. */ + if( xDHCPData.ulDHCPServerAddress == ulParameter ) + { + ulProcessed++; + } + } + } + break; + + case dhcpLEASE_TIME_OPTION_CODE : + + if( ucLength == sizeof( xDHCPData.ulLeaseTime ) ) + { + /* ulProcessed is not incremented in this case + because the lease time is not essential. */ + /* The DHCP parameter is in seconds, convert + to host-endian format. */ + xDHCPData.ulLeaseTime = FreeRTOS_ntohl( ulParameter ); + + /* Divide the lease time by two to ensure a + renew request is sent before the lease actually + expires. */ + xDHCPData.ulLeaseTime >>= 1UL; + + /* Multiply with configTICK_RATE_HZ to get clock + ticks. */ + xDHCPData.ulLeaseTime = configTICK_RATE_HZ * xDHCPData.ulLeaseTime; + } + break; + + default : + + /* Not interested in this field. */ + + break; + } + + /* Jump over the data to find the next option code. */ + if( ucLength == 0u ) + { + break; + } + else + { + pucByte += ucLength; + } + } + + /* Were all the mandatory options received? */ + if( ulProcessed >= ulMandatoryOptions ) + { + /* HT:endian: used to be network order */ + xDHCPData.ulOfferedIPAddress = pxDHCPMessage->ulYourIPAddress_yiaddr; + FreeRTOS_printf( ( "vDHCPProcess: offer %lxip\n", FreeRTOS_ntohl( xDHCPData.ulOfferedIPAddress ) ) ); + xReturn = pdPASS; + } + } + } + + FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucUDPPayload ); + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static uint8_t *prvCreatePartDHCPMessage( struct freertos_sockaddr *pxAddress, BaseType_t xOpcode, const uint8_t * const pucOptionsArray, size_t *pxOptionsArraySize ) +{ +DHCPMessage_t *pxDHCPMessage; +size_t xRequiredBufferSize = sizeof( DHCPMessage_t ) + *pxOptionsArraySize; +uint8_t *pucUDPPayloadBuffer; + +#if( ipconfigDHCP_REGISTER_HOSTNAME == 1 ) + const char *pucHostName = pcApplicationHostnameHook (); + size_t xNameLength = strlen( pucHostName ); + uint8_t *pucPtr; + + xRequiredBufferSize += ( 2 + xNameLength ); +#endif + + /* Get a buffer. This uses a maximum delay, but the delay will be capped + to ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS so the return value still needs to + be test. */ + do + { + } while( ( pucUDPPayloadBuffer = ( uint8_t * ) FreeRTOS_GetUDPPayloadBuffer( xRequiredBufferSize, portMAX_DELAY ) ) == NULL ); + + pxDHCPMessage = ( DHCPMessage_t * ) pucUDPPayloadBuffer; + + /* Most fields need to be zero. */ + memset( ( void * ) pxDHCPMessage, 0x00, sizeof( DHCPMessage_t ) ); + + /* Create the message. */ + pxDHCPMessage->ucOpcode = ( uint8_t ) xOpcode; + pxDHCPMessage->ucAddressType = ( uint8_t ) dhcpADDRESS_TYPE_ETHERNET; + pxDHCPMessage->ucAddressLength = ( uint8_t ) dhcpETHERNET_ADDRESS_LENGTH; + pxDHCPMessage->ulTransactionID = FreeRTOS_htonl( xDHCPData.ulTransactionId ); + pxDHCPMessage->ulDHCPCookie = ( uint32_t ) dhcpCOOKIE; + if( xDHCPData.xUseBroadcast != pdFALSE ) + { + pxDHCPMessage->usFlags = ( uint16_t ) dhcpBROADCAST; + } + else + { + pxDHCPMessage->usFlags = 0u; + } + + memcpy( ( void * ) &( pxDHCPMessage->ucClientHardwareAddress[ 0 ] ), ( void * ) ipLOCAL_MAC_ADDRESS, sizeof( MACAddress_t ) ); + + /* Copy in the const part of the options options. */ + memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET ] ), ( void * ) pucOptionsArray, *pxOptionsArraySize ); + + #if( ipconfigDHCP_REGISTER_HOSTNAME == 1 ) + { + /* With this option, the hostname can be registered as well which makes + it easier to lookup a device in a router's list of DHCP clients. */ + + /* Point to where the OPTION_END was stored to add data. */ + pucPtr = &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + ( *pxOptionsArraySize - 1 ) ] ); + pucPtr[ 0 ] = dhcpDNS_HOSTNAME_OPTIONS_CODE; + pucPtr[ 1 ] = ( uint8_t ) xNameLength; + memcpy( ( void *) ( pucPtr + 2 ), pucHostName, xNameLength ); + pucPtr[ 2 + xNameLength ] = dhcpOPTION_END_BYTE; + *pxOptionsArraySize += ( 2 + xNameLength ); + } + #endif + + /* Map in the client identifier. */ + memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + dhcpCLIENT_IDENTIFIER_OFFSET ] ), + ( void * ) ipLOCAL_MAC_ADDRESS, sizeof( MACAddress_t ) ); + + /* Set the addressing. */ + pxAddress->sin_addr = ipBROADCAST_IP_ADDRESS; + pxAddress->sin_port = ( uint16_t ) dhcpSERVER_PORT; + + return pucUDPPayloadBuffer; +} +/*-----------------------------------------------------------*/ + +static void prvSendDHCPRequest( void ) +{ +uint8_t *pucUDPPayloadBuffer; +struct freertos_sockaddr xAddress; +static const uint8_t ucDHCPRequestOptions[] = +{ + /* Do not change the ordering without also changing + dhcpCLIENT_IDENTIFIER_OFFSET, dhcpREQUESTED_IP_ADDRESS_OFFSET and + dhcpDHCP_SERVER_IP_ADDRESS_OFFSET. */ + dhcpMESSAGE_TYPE_OPTION_CODE, 1, dhcpMESSAGE_TYPE_REQUEST, /* Message type option. */ + dhcpCLIENT_IDENTIFIER_OPTION_CODE, 6, 0, 0, 0, 0, 0, 0, /* Client identifier. */ + dhcpREQUEST_IP_ADDRESS_OPTION_CODE, 4, 0, 0, 0, 0, /* The IP address being requested. */ + dhcpSERVER_IP_ADDRESS_OPTION_CODE, 4, 0, 0, 0, 0, /* The IP address of the DHCP server. */ + dhcpOPTION_END_BYTE +}; +size_t xOptionsLength = sizeof( ucDHCPRequestOptions ); + + pucUDPPayloadBuffer = prvCreatePartDHCPMessage( &xAddress, dhcpREQUEST_OPCODE, ucDHCPRequestOptions, &xOptionsLength ); + + /* Copy in the IP address being requested. */ + memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + dhcpREQUESTED_IP_ADDRESS_OFFSET ] ), + ( void * ) &( xDHCPData.ulOfferedIPAddress ), sizeof( xDHCPData.ulOfferedIPAddress ) ); + + /* Copy in the address of the DHCP server being used. */ + memcpy( ( void * ) &( pucUDPPayloadBuffer[ dhcpFIRST_OPTION_BYTE_OFFSET + dhcpDHCP_SERVER_IP_ADDRESS_OFFSET ] ), + ( void * ) &( xDHCPData.ulDHCPServerAddress ), sizeof( xDHCPData.ulDHCPServerAddress ) ); + + FreeRTOS_debug_printf( ( "vDHCPProcess: reply %lxip\n", FreeRTOS_ntohl( xDHCPData.ulOfferedIPAddress ) ) ); + iptraceSENDING_DHCP_REQUEST(); + + /* 'ucFirstOptionByte' is part of DHCP message struct, so subtract one byte. */ + if( FreeRTOS_sendto( xDHCPData.xDHCPSocket, pucUDPPayloadBuffer, ( sizeof( DHCPMessage_t ) + xOptionsLength - 1 ), FREERTOS_ZERO_COPY, &xAddress, sizeof( xAddress ) ) == 0 ) + { + /* The packet was not successfully queued for sending and must be + returned to the stack. */ + FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayloadBuffer ); + } +} +/*-----------------------------------------------------------*/ + +static void prvSendDHCPDiscover( void ) +{ +uint8_t *pucUDPPayloadBuffer; +struct freertos_sockaddr xAddress; +static const uint8_t ucDHCPDiscoverOptions[] = +{ + /* Do not change the ordering without also changing dhcpCLIENT_IDENTIFIER_OFFSET. */ + dhcpMESSAGE_TYPE_OPTION_CODE, 1, dhcpMESSAGE_TYPE_DISCOVER, /* Message type option. */ + dhcpCLIENT_IDENTIFIER_OPTION_CODE, 6, 0, 0, 0, 0, 0, 0, /* Client identifier. */ + dhcpPARAMETER_REQUEST_OPTION_CODE, 3, dhcpSUBNET_MASK_OPTION_CODE, dhcpGATEWAY_OPTION_CODE, dhcpDNS_SERVER_OPTIONS_CODE, /* Parameter request option. */ + dhcpOPTION_END_BYTE +}; +size_t xOptionsLength = sizeof( ucDHCPDiscoverOptions ); + + pucUDPPayloadBuffer = prvCreatePartDHCPMessage( &xAddress, dhcpREQUEST_OPCODE, ucDHCPDiscoverOptions, &xOptionsLength ); + + FreeRTOS_debug_printf( ( "vDHCPProcess: discover\n" ) ); + iptraceSENDING_DHCP_DISCOVER(); + + /* 'ucFirstOptionByte' is part of DHCP message struct, so subtract one byte. */ + if( FreeRTOS_sendto( xDHCPData.xDHCPSocket, pucUDPPayloadBuffer, ( sizeof( DHCPMessage_t ) + xOptionsLength - 1 ), FREERTOS_ZERO_COPY, &xAddress, sizeof( xAddress ) ) == 0 ) + { + /* The packet was not successfully queued for sending and must be + returned to the stack. */ + FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayloadBuffer ); + } +} +/*-----------------------------------------------------------*/ + +#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) + + static void prvPrepareLinkLayerIPLookUp( void ) + { + uint8_t ucLinkLayerIPAddress[ 2 ]; + uint32_t ulNumbers[ 2 ]; + + /* After DHCP has failed to answer, prepare everything to start + trying-out LinkLayer IP-addresses, using the random method. */ + xDHCPData.xDHCPTxTime = xTaskGetTickCount(); + + xApplicationGetRandomNumber( &( ulNumbers[ 0 ] ) ); + xApplicationGetRandomNumber( &( ulNumbers[ 1 ] ) ); + ucLinkLayerIPAddress[ 0 ] = ( uint8_t )1 + ( uint8_t )( ulNumbers[ 0 ] % 0xFDu ); /* get value 1..254 for IP-address 3rd byte of IP address to try. */ + ucLinkLayerIPAddress[ 1 ] = ( uint8_t )1 + ( uint8_t )( ulNumbers[ 1 ] % 0xFDu ); /* get value 1..254 for IP-address 4th byte of IP address to try. */ + + xNetworkAddressing.ulGatewayAddress = FreeRTOS_htonl( 0xA9FE0203 ); + + /* prepare xDHCPData with data to test. */ + xDHCPData.ulOfferedIPAddress = + FreeRTOS_inet_addr_quick( LINK_LAYER_ADDRESS_0, LINK_LAYER_ADDRESS_1, ucLinkLayerIPAddress[ 0 ], ucLinkLayerIPAddress[ 1 ] ); + + xDHCPData.ulLeaseTime = dhcpDEFAULT_LEASE_TIME; /* don't care about lease time. just put anything. */ + + xNetworkAddressing.ulNetMask = + FreeRTOS_inet_addr_quick( LINK_LAYER_NETMASK_0, LINK_LAYER_NETMASK_1, LINK_LAYER_NETMASK_2, LINK_LAYER_NETMASK_3 ); + + /* DHCP completed. The IP address can now be used, and the + timer set to the lease timeout time. */ + *ipLOCAL_IP_ADDRESS_POINTER = xDHCPData.ulOfferedIPAddress; + + /* Setting the 'local' broadcast address, something like 192.168.1.255' */ + xNetworkAddressing.ulBroadcastAddress = ( xDHCPData.ulOfferedIPAddress & xNetworkAddressing.ulNetMask ) | ~xNetworkAddressing.ulNetMask; + + /* Close socket to ensure packets don't queue on it. not needed anymore as DHCP failed. but still need timer for ARP testing. */ + if( xDHCPData.xDHCPSocket != NULL ) + { + /* Close socket to ensure packets don't queue on it. */ + vSocketClose( xDHCPData.xDHCPSocket ); + xDHCPData.xDHCPSocket = NULL; + } + + xApplicationGetRandomNumber( &( ulNumbers[ 0 ] ) ); + xDHCPData.xDHCPTxPeriod = pdMS_TO_TICKS( 3000ul + ( ulNumbers[ 0 ] & 0x3ffuL ) ); /* do ARP test every (3 + 0-1024mS) seconds. */ + + xARPHadIPClash = pdFALSE; /* reset flag that shows if have ARP clash. */ + vARPSendGratuitous(); + } + +#endif /* ipconfigDHCP_FALL_BACK_AUTO_IP */ +/*-----------------------------------------------------------*/ + +#endif /* ipconfigUSE_DHCP != 0 */ + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c index 43b246d26..d4f167af1 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c @@ -1,1556 +1,1556 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "list.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_DNS.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" -#include "IPTraceMacroDefaults.h" - -/* Exclude the entire file if DNS is not enabled. */ -#if( ipconfigUSE_DNS != 0 ) - -#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) - #define dnsDNS_PORT 0x3500u - #define dnsONE_QUESTION 0x0100u - #define dnsOUTGOING_FLAGS 0x0001u /* Standard query. */ - #define dnsRX_FLAGS_MASK 0x0f80u /* The bits of interest in the flags field of incoming DNS messages. */ - #define dnsEXPECTED_RX_FLAGS 0x0080u /* Should be a response, without any errors. */ -#else - #define dnsDNS_PORT 0x0035u - #define dnsONE_QUESTION 0x0001u - #define dnsOUTGOING_FLAGS 0x0100u /* Standard query. */ - #define dnsRX_FLAGS_MASK 0x800fu /* The bits of interest in the flags field of incoming DNS messages. */ - #define dnsEXPECTED_RX_FLAGS 0x8000u /* Should be a response, without any errors. */ - -#endif /* ipconfigBYTE_ORDER */ - -/* The maximum number of times a DNS request should be sent out if a response -is not received, before giving up. */ -#ifndef ipconfigDNS_REQUEST_ATTEMPTS - #define ipconfigDNS_REQUEST_ATTEMPTS 5 -#endif - -/* If the top two bits in the first character of a name field are set then the -name field is an offset to the string, rather than the string itself. */ -#define dnsNAME_IS_OFFSET ( ( uint8_t ) 0xc0 ) - -/* NBNS flags. */ -#define dnsNBNS_FLAGS_RESPONSE 0x8000u -#define dnsNBNS_FLAGS_OPCODE_MASK 0x7800u -#define dnsNBNS_FLAGS_OPCODE_QUERY 0x0000u -#define dnsNBNS_FLAGS_OPCODE_REGISTRATION 0x2800u - -/* Host types. */ -#define dnsTYPE_A_HOST 0x01u -#define dnsCLASS_IN 0x01u - -/* LLMNR constants. */ -#define dnsLLMNR_TTL_VALUE 300000uL -#define dnsLLMNR_FLAGS_IS_REPONSE 0x8000u - -/* NBNS constants. */ -#define dnsNBNS_TTL_VALUE 3600uL /* 1 hour valid */ -#define dnsNBNS_TYPE_NET_BIOS 0x0020u -#define dnsNBNS_CLASS_IN 0x01u -#define dnsNBNS_NAME_FLAGS 0x6000u -#define dnsNBNS_ENCODED_NAME_LENGTH 32 - -/* If the queried NBNS name matches with the device's name, -the query will be responded to with these flags: */ -#define dnsNBNS_QUERY_RESPONSE_FLAGS ( 0x8500u ) - -/* Flag DNS parsing errors in situations where an IPv4 address is the return -type. */ -#define dnsPARSE_ERROR 0uL - -/* - * Create a socket and bind it to the standard DNS port number. Return the - * the created socket - or NULL if the socket could not be created or bound. - */ -static Socket_t prvCreateDNSSocket( void ); - -/* - * Create the DNS message in the zero copy buffer passed in the first parameter. - */ -static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, - const char *pcHostName, - TickType_t uxIdentifier ); - -/* - * Simple routine that jumps over the NAME field of a resource record. - */ -static uint8_t * prvSkipNameField( uint8_t *pucByte, - size_t uxSourceLen ); - -/* - * Process a response packet from a DNS server. - * The parameter 'xExpected' indicates whether the identifier in the reply - * was expected, and thus if the DNS cache may be updated with the reply. - */ -static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer, - size_t uxBufferLength, - BaseType_t xExpected ); - -/* - * Prepare and send a message to a DNS server. 'uxReadTimeOut_ticks' will be passed as - * zero, in case the user has supplied a call-back function. - */ -static uint32_t prvGetHostByName( const char *pcHostName, - TickType_t uxIdentifier, - TickType_t uxReadTimeOut_ticks ); - -/* - * The NBNS and the LLMNR protocol share this reply function. - */ -#if( ( ipconfigUSE_NBNS == 1 ) || ( ipconfigUSE_LLMNR == 1 ) ) - static void prvReplyDNSMessage( NetworkBufferDescriptor_t *pxNetworkBuffer, - BaseType_t lNetLength ); -#endif - -#if( ipconfigUSE_NBNS == 1 ) - static portINLINE void prvTreatNBNS( uint8_t *pucUDPPayloadBuffer, - size_t uxBufferLength, - uint32_t ulIPAddress ); -#endif /* ipconfigUSE_NBNS */ - - -#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) - static uint8_t * prvReadNameField( uint8_t *pucByte, - size_t uxSourceLen, - char *pcName, - size_t uxLen ); -#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */ - -#if( ipconfigUSE_DNS_CACHE == 1 ) - static void prvProcessDNSCache( const char *pcName, - uint32_t *pulIP, - uint32_t ulTTL, - BaseType_t xLookUp ); - - typedef struct xDNS_CACHE_TABLE_ROW - { - uint32_t ulIPAddress; /* The IP address of an ARP cache entry. */ - char pcName[ ipconfigDNS_CACHE_NAME_LENGTH ]; /* The name of the host */ - uint32_t ulTTL; /* Time-to-Live (in seconds) from the DNS server. */ - uint32_t ulTimeWhenAddedInSeconds; - } DNSCacheRow_t; - - static DNSCacheRow_t xDNSCache[ ipconfigDNS_CACHE_ENTRIES ]; - - void FreeRTOS_dnsclear() - { - memset( xDNSCache, 0x0, sizeof( xDNSCache ) ); - } -#endif /* ipconfigUSE_DNS_CACHE == 1 */ - -#if( ipconfigUSE_LLMNR == 1 ) - const MACAddress_t xLLMNR_MacAdress = { { 0x01, 0x00, 0x5e, 0x00, 0x00, 0xfc } }; -#endif /* ipconfigUSE_LLMNR == 1 */ - -/*-----------------------------------------------------------*/ - -#include "pack_struct_start.h" -struct xDNSMessage -{ - uint16_t usIdentifier; - uint16_t usFlags; - uint16_t usQuestions; - uint16_t usAnswers; - uint16_t usAuthorityRRs; - uint16_t usAdditionalRRs; -} -#include "pack_struct_end.h" -typedef struct xDNSMessage DNSMessage_t; - -/* A DNS query consists of a header, as described in 'struct xDNSMessage' -It is followed by 1 or more queries, each one consisting of a name and a tail, -with two fields: type and class -*/ -#include "pack_struct_start.h" -struct xDNSTail -{ - uint16_t usType; - uint16_t usClass; -} -#include "pack_struct_end.h" -typedef struct xDNSTail DNSTail_t; - -/* DNS answer record header. */ -#include "pack_struct_start.h" -struct xDNSAnswerRecord -{ - uint16_t usType; - uint16_t usClass; - uint32_t ulTTL; - uint16_t usDataLength; -} -#include "pack_struct_end.h" -typedef struct xDNSAnswerRecord DNSAnswerRecord_t; - -#if( ipconfigUSE_LLMNR == 1 ) - - #include "pack_struct_start.h" - struct xLLMNRAnswer - { - uint8_t ucNameCode; - uint8_t ucNameOffset; /* The name is not repeated in the answer, only the offset is given with "0xc0 " */ - uint16_t usType; - uint16_t usClass; - uint32_t ulTTL; - uint16_t usDataLength; - uint32_t ulIPAddress; - } - #include "pack_struct_end.h" - typedef struct xLLMNRAnswer LLMNRAnswer_t; - -#endif /* ipconfigUSE_LLMNR == 1 */ - -#if( ipconfigUSE_NBNS == 1 ) - - #include "pack_struct_start.h" - struct xNBNSRequest - { - uint16_t usRequestId; - uint16_t usFlags; - uint16_t ulRequestCount; - uint16_t usAnswerRSS; - uint16_t usAuthRSS; - uint16_t usAdditionalRSS; - uint8_t ucNameSpace; - uint8_t ucName[ dnsNBNS_ENCODED_NAME_LENGTH ]; - uint8_t ucNameZero; - uint16_t usType; - uint16_t usClass; - } - #include "pack_struct_end.h" - typedef struct xNBNSRequest NBNSRequest_t; - - #include "pack_struct_start.h" - struct xNBNSAnswer - { - uint16_t usType; - uint16_t usClass; - uint32_t ulTTL; - uint16_t usDataLength; - uint16_t usNbFlags; /* NetBIOS flags 0x6000 : IP-address, big-endian */ - uint32_t ulIPAddress; - } - #include "pack_struct_end.h" - typedef struct xNBNSAnswer NBNSAnswer_t; - - #endif /* ipconfigUSE_NBNS == 1 */ - -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_DNS_CACHE == 1 ) - uint32_t FreeRTOS_dnslookup( const char *pcHostName ) - { - uint32_t ulIPAddress = 0uL; - - prvProcessDNSCache( pcHostName, &ulIPAddress, 0, pdTRUE ); - return ulIPAddress; - } -#endif /* ipconfigUSE_DNS_CACHE == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigDNS_USE_CALLBACKS == 1 ) - - typedef struct xDNS_Callback - { - TickType_t uxRemaningTime; /* Timeout in ms */ - FOnDNSEvent pCallbackFunction; /* Function to be called when the address has been found or when a timeout has beeen reached */ - TimeOut_t uxTimeoutState; - void *pvSearchID; - struct xLIST_ITEM xListItem; - char pcName[ 1 ]; - } DNSCallback_t; - - static List_t xCallbackList; - - /* Define FreeRTOS_gethostbyname() as a normal blocking call. */ - uint32_t FreeRTOS_gethostbyname( const char *pcHostName ) - { - return FreeRTOS_gethostbyname_a( pcHostName, ( FOnDNSEvent ) NULL, ( void * ) NULL, 0 ); - } - /*-----------------------------------------------------------*/ - - /* Initialise the list of call-back structures. */ - void vDNSInitialise( void ); - void vDNSInitialise( void ) - { - vListInitialise( &xCallbackList ); - } - /*-----------------------------------------------------------*/ - - /* Iterate through the list of call-back structures and remove - old entries which have reached a timeout. - As soon as the list hase become empty, the DNS timer will be stopped - In case pvSearchID is supplied, the user wants to cancel a DNS request - */ - void vDNSCheckCallBack( void *pvSearchID ); - void vDNSCheckCallBack( void *pvSearchID ) - { - const ListItem_t *pxIterator; - const MiniListItem_t * xEnd = ( const MiniListItem_t * ) listGET_END_MARKER( &xCallbackList ); - - vTaskSuspendAll(); - { - for( pxIterator = ( const ListItem_t * ) listGET_NEXT( xEnd ); - pxIterator != ( const ListItem_t * ) xEnd; - ) - { - DNSCallback_t *pxCallback = ( DNSCallback_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - - /* Move to the next item because we might remove this item */ - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ); - - if( ( pvSearchID != NULL ) && ( pvSearchID == pxCallback->pvSearchID ) ) - { - uxListRemove( &pxCallback->xListItem ); - vPortFree( pxCallback ); - } - else if( xTaskCheckForTimeOut( &pxCallback->uxTimeoutState, &pxCallback->uxRemaningTime ) != pdFALSE ) - { - pxCallback->pCallbackFunction( pxCallback->pcName, pxCallback->pvSearchID, 0 ); - uxListRemove( &pxCallback->xListItem ); - vPortFree( ( void * ) pxCallback ); - } - } - } - xTaskResumeAll(); - - if( listLIST_IS_EMPTY( &xCallbackList ) ) - { - vIPSetDnsTimerEnableState( pdFALSE ); - } - } - /*-----------------------------------------------------------*/ - - void FreeRTOS_gethostbyname_cancel( void *pvSearchID ) - { - /* _HT_ Should better become a new API call to have the IP-task remove the callback */ - vDNSCheckCallBack( pvSearchID ); - } - /*-----------------------------------------------------------*/ - - /* FreeRTOS_gethostbyname_a() was called along with callback parameters. - Store them in a list for later reference. */ - static void vDNSSetCallBack( const char *pcHostName, - void *pvSearchID, - FOnDNSEvent pCallbackFunction, - TickType_t uxTimeout, - TickType_t uxIdentifier ); - static void vDNSSetCallBack( const char *pcHostName, - void *pvSearchID, - FOnDNSEvent pCallbackFunction, - TickType_t uxTimeout, - TickType_t uxIdentifier ) - { - size_t lLength = strlen( pcHostName ); - DNSCallback_t *pxCallback = ( DNSCallback_t * ) pvPortMalloc( sizeof( *pxCallback ) + lLength ); - - /* Translate from ms to number of clock ticks. */ - uxTimeout /= portTICK_PERIOD_MS; - - if( pxCallback != NULL ) - { - if( listLIST_IS_EMPTY( &xCallbackList ) ) - { - /* This is the first one, start the DNS timer to check for timeouts */ - vIPReloadDNSTimer( FreeRTOS_min_uint32( 1000U, uxTimeout ) ); - } - - strcpy( pxCallback->pcName, pcHostName ); - pxCallback->pCallbackFunction = pCallbackFunction; - pxCallback->pvSearchID = pvSearchID; - pxCallback->uxRemaningTime = uxTimeout; - vTaskSetTimeOutState( &pxCallback->uxTimeoutState ); - listSET_LIST_ITEM_OWNER( &( pxCallback->xListItem ), ( void * ) pxCallback ); - listSET_LIST_ITEM_VALUE( &( pxCallback->xListItem ), uxIdentifier ); - vTaskSuspendAll(); - { - vListInsertEnd( &xCallbackList, &pxCallback->xListItem ); - } - xTaskResumeAll(); - } - } - /*-----------------------------------------------------------*/ - - /* A DNS reply was received, see if there is any matching entry and - call the handler. Returns pdTRUE if uxIdentifier was recognised. */ - static BaseType_t xDNSDoCallback( TickType_t uxIdentifier, - const char *pcName, - uint32_t ulIPAddress ); - static BaseType_t xDNSDoCallback( TickType_t uxIdentifier, - const char *pcName, - uint32_t ulIPAddress ) - { - BaseType_t xResult = pdFALSE; - const ListItem_t *pxIterator; - const MiniListItem_t * xEnd = ( const MiniListItem_t * ) listGET_END_MARKER( &xCallbackList ); - - vTaskSuspendAll(); - { - for( pxIterator = ( const ListItem_t * ) listGET_NEXT( xEnd ); - pxIterator != ( const ListItem_t * ) xEnd; - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - /* The cast will take away the 'configLIST_VOLATILE' */ - if( uxIdentifier == ( TickType_t ) listGET_LIST_ITEM_VALUE( pxIterator ) ) - { - DNSCallback_t *pxCallback = ( DNSCallback_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - - pxCallback->pCallbackFunction( pcName, pxCallback->pvSearchID, ulIPAddress ); - uxListRemove( &pxCallback->xListItem ); - vPortFree( pxCallback ); - - if( listLIST_IS_EMPTY( &xCallbackList ) ) - { - /* The list of outstanding requests is empty. No need for periodic polling. */ - vIPSetDnsTimerEnableState( pdFALSE ); - } - - xResult = pdTRUE; - break; - } - } - } - xTaskResumeAll(); - return xResult; - } - -#endif /* ipconfigDNS_USE_CALLBACKS == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigDNS_USE_CALLBACKS == 0 ) - uint32_t FreeRTOS_gethostbyname( const char *pcHostName ) -#else - uint32_t FreeRTOS_gethostbyname_a( const char *pcHostName, - FOnDNSEvent pCallback, - void *pvSearchID, - TickType_t uxTimeout ) -#endif -{ -uint32_t ulIPAddress = 0uL; -TickType_t uxReadTimeOut_ticks = ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS; -TickType_t uxIdentifier = 0u; -BaseType_t xHasRandom = pdFALSE; - - if( pcHostName != NULL ) - { - /* If the supplied hostname is IP address, convert it to uint32_t - and return. */ - #if( ipconfigINCLUDE_FULL_INET_ADDR == 1 ) - { - ulIPAddress = FreeRTOS_inet_addr( pcHostName ); - } - #endif /* ipconfigINCLUDE_FULL_INET_ADDR == 1 */ - - /* If a DNS cache is used then check the cache before issuing another DNS - request. */ - #if( ipconfigUSE_DNS_CACHE == 1 ) - { - if( ulIPAddress == 0uL ) - { - ulIPAddress = FreeRTOS_dnslookup( pcHostName ); - - if( ulIPAddress != 0 ) - { - FreeRTOS_debug_printf( ( "FreeRTOS_gethostbyname: found '%s' in cache: %lxip\n", pcHostName, ulIPAddress ) ); - } - else - { - /* prvGetHostByName will be called to start a DNS lookup. */ - } - } - } - #endif /* ipconfigUSE_DNS_CACHE == 1 */ - - /* Generate a unique identifier. */ - if( ulIPAddress == 0uL ) - { - uint32_t ulNumber; - - xHasRandom = xApplicationGetRandomNumber( &( ulNumber ) ); - /* DNS identifiers are 16-bit. */ - uxIdentifier = ( TickType_t ) ( ulNumber & 0xffffu ); - /* ipconfigRAND32() may not return a non-zero value. */ - } - - #if( ipconfigDNS_USE_CALLBACKS == 1 ) - { - if( pCallback != NULL ) - { - if( ulIPAddress == 0uL ) - { - /* The user has provided a callback function, so do not block on recvfrom() */ - if( xHasRandom != pdFALSE ) - { - uxReadTimeOut_ticks = 0u; - vDNSSetCallBack( pcHostName, pvSearchID, pCallback, uxTimeout, uxIdentifier ); - } - } - else - { - /* The IP address is known, do the call-back now. */ - pCallback( pcHostName, pvSearchID, ulIPAddress ); - } - } - } - #endif /* if ( ipconfigDNS_USE_CALLBACKS == 1 ) */ - - if( ( ulIPAddress == 0uL ) && ( xHasRandom != pdFALSE ) ) - { - ulIPAddress = prvGetHostByName( pcHostName, uxIdentifier, uxReadTimeOut_ticks ); - } - } - return ulIPAddress; -} -/*-----------------------------------------------------------*/ - -static uint32_t prvGetHostByName( const char *pcHostName, - TickType_t uxIdentifier, - TickType_t uxReadTimeOut_ticks ) -{ -struct freertos_sockaddr xAddress; -Socket_t xDNSSocket; -uint32_t ulIPAddress = 0uL; -uint8_t *pucUDPPayloadBuffer; -uint32_t ulAddressLength = sizeof( struct freertos_sockaddr ); -BaseType_t xAttempt; -int32_t lBytes; -size_t uxPayloadLength, uxExpectedPayloadLength; -TickType_t uxWriteTimeOut_ticks = ipconfigDNS_SEND_BLOCK_TIME_TICKS; - -#if( ipconfigUSE_LLMNR == 1 ) - BaseType_t bHasDot = pdFALSE; -#endif /* ipconfigUSE_LLMNR == 1 */ - - /* If LLMNR is being used then determine if the host name includes a '.' - - if not then LLMNR can be used as the lookup method. */ - #if( ipconfigUSE_LLMNR == 1 ) - { - const char *pucPtr; - - for( pucPtr = pcHostName; *pucPtr; pucPtr++ ) - { - if( *pucPtr == '.' ) - { - bHasDot = pdTRUE; - break; - } - } - } - #endif /* ipconfigUSE_LLMNR == 1 */ - - /* Two is added at the end for the count of characters in the first - subdomain part and the string end byte. */ - uxExpectedPayloadLength = sizeof( DNSMessage_t ) + strlen( pcHostName ) + sizeof( uint16_t ) + sizeof( uint16_t ) + 2u; - - xDNSSocket = prvCreateDNSSocket(); - - if( xDNSSocket != NULL ) - { - FreeRTOS_setsockopt( xDNSSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &uxWriteTimeOut_ticks, sizeof( TickType_t ) ); - FreeRTOS_setsockopt( xDNSSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &uxReadTimeOut_ticks, sizeof( TickType_t ) ); - - for( xAttempt = 0; xAttempt < ipconfigDNS_REQUEST_ATTEMPTS; xAttempt++ ) - { - /* Get a buffer. This uses a maximum delay, but the delay will be - capped to ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS so the return value - still needs to be tested. */ - pucUDPPayloadBuffer = ( uint8_t * ) FreeRTOS_GetUDPPayloadBuffer( uxExpectedPayloadLength, portMAX_DELAY ); - - if( pucUDPPayloadBuffer != NULL ) - { - /* Create the message in the obtained buffer. */ - uxPayloadLength = prvCreateDNSMessage( pucUDPPayloadBuffer, pcHostName, uxIdentifier ); - - iptraceSENDING_DNS_REQUEST(); - - /* Obtain the DNS server address. */ - FreeRTOS_GetAddressConfiguration( NULL, NULL, NULL, &ulIPAddress ); - - /* Send the DNS message. */ -#if( ipconfigUSE_LLMNR == 1 ) - if( bHasDot == pdFALSE ) - { - /* Use LLMNR addressing. */ - ( ( DNSMessage_t * ) pucUDPPayloadBuffer )->usFlags = 0; - xAddress.sin_addr = ipLLMNR_IP_ADDR; /* Is in network byte order. */ - xAddress.sin_port = FreeRTOS_ntohs( ipLLMNR_PORT ); - } - else -#endif - { - /* Use DNS server. */ - xAddress.sin_addr = ulIPAddress; - xAddress.sin_port = dnsDNS_PORT; - } - - ulIPAddress = 0uL; - - if( FreeRTOS_sendto( xDNSSocket, pucUDPPayloadBuffer, uxPayloadLength, FREERTOS_ZERO_COPY, &xAddress, sizeof( xAddress ) ) != 0 ) - { - /* Wait for the reply. */ - lBytes = FreeRTOS_recvfrom( xDNSSocket, &pucUDPPayloadBuffer, 0, FREERTOS_ZERO_COPY, &xAddress, &ulAddressLength ); - - if( lBytes > 0 ) - { - BaseType_t xExpected; - DNSMessage_t *pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; - - /* See if the identifiers match. */ - if( uxIdentifier == ( TickType_t ) pxDNSMessageHeader->usIdentifier ) - { - xExpected = pdTRUE; - } - else - { - /* The reply was not expected. */ - xExpected = pdFALSE; - } - - /* The reply was received. Process it. */ - #if( ipconfigDNS_USE_CALLBACKS == 0 ) - /* It is useless to analyse the unexpected reply - unless asynchronous look-ups are enabled. */ - if( xExpected != pdFALSE ) - #endif /* ipconfigDNS_USE_CALLBACKS == 0 */ - { - ulIPAddress = prvParseDNSReply( pucUDPPayloadBuffer, ( size_t ) lBytes, xExpected ); - } - - /* Finished with the buffer. The zero copy interface - is being used, so the buffer must be freed by the - task. */ - FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucUDPPayloadBuffer ); - - if( ulIPAddress != 0uL ) - { - /* All done. */ - break; - } - } - } - else - { - /* The message was not sent so the stack will not be - releasing the zero copy - it must be released here. */ - FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucUDPPayloadBuffer ); - } - } - - if( uxReadTimeOut_ticks == 0u ) - { - /* This DNS lookup is asynchronous, using a call-back: - send the request only once. */ - break; - } - } - - /* Finished with the socket. */ - FreeRTOS_closesocket( xDNSSocket ); - } - - return ulIPAddress; -} -/*-----------------------------------------------------------*/ - -static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, - const char *pcHostName, - TickType_t uxIdentifier ) -{ -DNSMessage_t *pxDNSMessageHeader; -uint8_t *pucStart, *pucByte; -DNSTail_t *pxTail; -static const DNSMessage_t xDefaultPartDNSHeader = -{ - 0, /* The identifier will be overwritten. */ - dnsOUTGOING_FLAGS, /* Flags set for standard query. */ - dnsONE_QUESTION, /* One question is being asked. */ - 0, /* No replies are included. */ - 0, /* No authorities. */ - 0 /* No additional authorities. */ -}; - - /* Copy in the const part of the header. */ - memcpy( ( void * ) pucUDPPayloadBuffer, ( void * ) &xDefaultPartDNSHeader, sizeof( xDefaultPartDNSHeader ) ); - - /* Write in a unique identifier. */ - pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; - pxDNSMessageHeader->usIdentifier = ( uint16_t ) uxIdentifier; - - /* Create the resource record at the end of the header. First - find the end of the header. */ - pucStart = pucUDPPayloadBuffer + sizeof( xDefaultPartDNSHeader ); - - /* Leave a gap for the first length bytes. */ - pucByte = pucStart + 1; - - /* Copy in the host name. */ - strcpy( ( char * ) pucByte, pcHostName ); - - /* Mark the end of the string. */ - pucByte += strlen( pcHostName ); - *pucByte = 0x00u; - - /* Walk the string to replace the '.' characters with byte counts. - pucStart holds the address of the byte count. Walking the string - starts after the byte count position. */ - pucByte = pucStart; - - do - { - pucByte++; - - while( ( *pucByte != 0x00 ) && ( *pucByte != '.' ) ) - { - pucByte++; - } - - /* Fill in the byte count, then move the pucStart pointer up to - the found byte position. */ - *pucStart = ( uint8_t ) ( ( uint32_t ) pucByte - ( uint32_t ) pucStart ); - ( *pucStart )--; - - pucStart = pucByte; - } while( *pucByte != 0x00 ); - - /* Finish off the record. */ - - pxTail = ( DNSTail_t * ) ( pucByte + 1 ); - - vSetField16( pxTail, DNSTail_t, usType, dnsTYPE_A_HOST ); /* Type A: host */ - vSetField16( pxTail, DNSTail_t, usClass, dnsCLASS_IN ); /* 1: Class IN */ - - /* Return the total size of the generated message, which is the space from - the last written byte to the beginning of the buffer. */ - return ( ( uint32_t ) pucByte - ( uint32_t ) pucUDPPayloadBuffer + 1 ) + sizeof( *pxTail ); -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) - - static uint8_t * prvReadNameField( uint8_t *pucByte, - size_t uxSourceLen, - char *pcName, - size_t uxDestLen ) - { - size_t uxNameLen = 0; - BaseType_t xCount; - - if( 0 == uxSourceLen ) - { - return NULL; - } - - /* Determine if the name is the fully coded name, or an offset to the name - elsewhere in the message. */ - if( ( *pucByte & dnsNAME_IS_OFFSET ) == dnsNAME_IS_OFFSET ) - { - /* Jump over the two byte offset. */ - if( uxSourceLen > sizeof( uint16_t ) ) - { - pucByte += sizeof( uint16_t ); - } - else - { - pucByte = NULL; - } - } - else - { - /* pucByte points to the full name. Walk over the string. */ - while( ( NULL != pucByte ) && ( *pucByte != 0x00u ) && ( uxSourceLen > 1u ) ) - { - /* If this is not the first time through the loop, then add a - separator in the output. */ - if( ( uxNameLen > 0 ) && ( uxNameLen < ( uxDestLen - 1u ) ) ) - { - pcName[ uxNameLen++ ] = '.'; - } - - /* Process the first/next sub-string. */ - for( xCount = *( pucByte++ ), uxSourceLen--; - xCount-- && uxSourceLen > 1u; - pucByte++, uxSourceLen-- ) - { - if( uxNameLen < uxDestLen - 1u ) - { - pcName[ uxNameLen++ ] = *( ( char * ) pucByte ); - } - else - { - /* DNS name is too big for the provided buffer. */ - pucByte = NULL; - break; - } - } - } - - /* Confirm that a fully formed name was found. */ - if( NULL != pucByte ) - { - if( 0x00 == *pucByte ) - { - pucByte++; - uxSourceLen--; - pcName[ uxNameLen++ ] = '\0'; - } - else - { - pucByte = NULL; - } - } - } - - return pucByte; - } -#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */ -/*-----------------------------------------------------------*/ - -static uint8_t * prvSkipNameField( uint8_t *pucByte, - size_t uxSourceLen ) -{ -size_t uxChunkLength; - - if( 0u == uxSourceLen ) - { - return NULL; - } - - /* Determine if the name is the fully coded name, or an offset to the name - elsewhere in the message. */ - if( ( *pucByte & dnsNAME_IS_OFFSET ) == dnsNAME_IS_OFFSET ) - { - /* Jump over the two byte offset. */ - if( uxSourceLen > sizeof( uint16_t ) ) - { - pucByte += sizeof( uint16_t ); - } - else - { - pucByte = NULL; - } - } - else - { - /* pucByte points to the full name. Walk over the string. */ - while( ( *pucByte != 0x00u ) && ( uxSourceLen > 1u ) ) - { - uxChunkLength = *pucByte + 1u; - - if( uxSourceLen > uxChunkLength ) - { - uxSourceLen -= uxChunkLength; - pucByte += uxChunkLength; - } - else - { - pucByte = NULL; - break; - } - } - - /* Confirm that a fully formed name was found. */ - if( NULL != pucByte ) - { - if( 0x00u == *pucByte ) - { - pucByte++; - } - else - { - pucByte = NULL; - } - } - } - - return pucByte; -} -/*-----------------------------------------------------------*/ - -/* The function below will only be called : -when ipconfigDNS_USE_CALLBACKS == 1 -when ipconfigUSE_LLMNR == 1 -for testing purposes, by the module iot_test_freertos_tcp.c -*/ -uint32_t ulDNSHandlePacket( NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ -DNSMessage_t *pxDNSMessageHeader; -size_t uxPayloadSize; - - /* Only proceed if the payload length indicated in the header - appears to be valid. */ - if( pxNetworkBuffer->xDataLength >= sizeof( UDPPacket_t ) ) - { - uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); - - if( uxPayloadSize >= sizeof( DNSMessage_t ) ) - { - pxDNSMessageHeader = - ( DNSMessage_t * ) ( pxNetworkBuffer->pucEthernetBuffer + sizeof( UDPPacket_t ) ); - - /* The parameter pdFALSE indicates that the reply was not expected. */ - prvParseDNSReply( ( uint8_t * ) pxDNSMessageHeader, - uxPayloadSize, - pdFALSE ); - } - } - - /* The packet was not consumed. */ - return pdFAIL; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_NBNS == 1 ) - - uint32_t ulNBNSHandlePacket( NetworkBufferDescriptor_t * pxNetworkBuffer ) - { - UDPPacket_t *pxUDPPacket = ( UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; - uint8_t *pucUDPPayloadBuffer = pxNetworkBuffer->pucEthernetBuffer + sizeof( UDPPacket_t ); - size_t uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); - - /* The network buffer data length has already been set to the - length of the UDP payload. */ - prvTreatNBNS( pucUDPPayloadBuffer, - uxPayloadSize, - pxUDPPacket->xIPHeader.ulSourceIPAddress ); - - /* The packet was not consumed. */ - return pdFAIL; - } - -#endif /* ipconfigUSE_NBNS */ -/*-----------------------------------------------------------*/ - -static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer, - size_t uxBufferLength, - BaseType_t xExpected ) -{ -DNSMessage_t *pxDNSMessageHeader; -DNSAnswerRecord_t *pxDNSAnswerRecord; -uint32_t ulIPAddress = 0uL; -#if( ipconfigUSE_LLMNR == 1 ) - char *pcRequestedName = NULL; -#endif -uint8_t *pucByte; -size_t uxSourceBytesRemaining; -uint16_t x, usDataLength, usQuestions; -BaseType_t xDoStore = xExpected; -#if( ipconfigUSE_LLMNR == 1 ) - uint16_t usType = 0, usClass = 0; -#endif -#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) - char pcName[ ipconfigDNS_CACHE_NAME_LENGTH ] = ""; -#endif - - /* Ensure that the buffer is of at least minimal DNS message length. */ - if( uxBufferLength < sizeof( DNSMessage_t ) ) - { - return dnsPARSE_ERROR; - } - - uxSourceBytesRemaining = uxBufferLength; - - /* Parse the DNS message header. */ - pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; - - /* Introduce a do {} while (0) to allow the use of breaks. */ - do - { - /* Start at the first byte after the header. */ - pucByte = pucUDPPayloadBuffer + sizeof( DNSMessage_t ); - uxSourceBytesRemaining -= sizeof( DNSMessage_t ); - - /* Skip any question records. */ - usQuestions = FreeRTOS_ntohs( pxDNSMessageHeader->usQuestions ); - - for( x = 0; x < usQuestions; x++ ) - { - #if( ipconfigUSE_LLMNR == 1 ) - { - if( x == 0 ) - { - pcRequestedName = ( char * ) pucByte; - } - } - #endif - -#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) - if( x == 0 ) - { - pucByte = prvReadNameField( pucByte, - uxSourceBytesRemaining, - pcName, - sizeof( pcName ) ); - - /* Check for a malformed response. */ - if( NULL == pucByte ) - { - return dnsPARSE_ERROR; - } - - uxSourceBytesRemaining = ( pucUDPPayloadBuffer + uxBufferLength ) - pucByte; - } - else -#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */ - { - /* Skip the variable length pcName field. */ - pucByte = prvSkipNameField( pucByte, - uxSourceBytesRemaining ); - - /* Check for a malformed response. */ - if( NULL == pucByte ) - { - return dnsPARSE_ERROR; - } - - uxSourceBytesRemaining = ( size_t ) - ( pucUDPPayloadBuffer + uxBufferLength - pucByte ); - } - - /* Check the remaining buffer size. */ - if( uxSourceBytesRemaining >= sizeof( uint32_t ) ) - { - #if( ipconfigUSE_LLMNR == 1 ) - { - /* usChar2u16 returns value in host endianness. */ - usType = usChar2u16( pucByte ); - usClass = usChar2u16( pucByte + 2 ); - } - #endif /* ipconfigUSE_LLMNR */ - - /* Skip the type and class fields. */ - pucByte += sizeof( uint32_t ); - uxSourceBytesRemaining -= sizeof( uint32_t ); - } - else - { - /* Malformed response. */ - return dnsPARSE_ERROR; - } - } - - /* Search through the answer records. */ - pxDNSMessageHeader->usAnswers = FreeRTOS_ntohs( pxDNSMessageHeader->usAnswers ); - - if( ( pxDNSMessageHeader->usFlags & dnsRX_FLAGS_MASK ) == dnsEXPECTED_RX_FLAGS ) - { - for( x = 0; x < pxDNSMessageHeader->usAnswers; x++ ) - { - pucByte = prvSkipNameField( pucByte, - uxSourceBytesRemaining ); - - /* Check for a malformed response. */ - if( NULL == pucByte ) - { - return dnsPARSE_ERROR; - } - - uxSourceBytesRemaining = ( size_t ) - ( pucUDPPayloadBuffer + uxBufferLength - pucByte ); - - /* Is there enough data for an IPv4 A record answer and, if so, - is this an A record? */ - if( ( uxSourceBytesRemaining >= ( sizeof( DNSAnswerRecord_t ) + sizeof( uint32_t ) ) ) && - ( usChar2u16( pucByte ) == dnsTYPE_A_HOST ) ) - { - /* This is the required record type and is of sufficient size. */ - pxDNSAnswerRecord = ( DNSAnswerRecord_t * ) pucByte; - - /* Sanity check the data length of an IPv4 answer. */ - if( FreeRTOS_ntohs( pxDNSAnswerRecord->usDataLength ) == sizeof( uint32_t ) ) - { - /* Copy the IP address out of the record. */ - memcpy( &ulIPAddress, - pucByte + sizeof( DNSAnswerRecord_t ), - sizeof( uint32_t ) ); - - #if( ipconfigDNS_USE_CALLBACKS == 1 ) - { - /* See if any asynchronous call was made to FreeRTOS_gethostbyname_a() */ - if( xDNSDoCallback( ( TickType_t ) pxDNSMessageHeader->usIdentifier, pcName, ulIPAddress ) != pdFALSE ) - { - /* This device has requested this DNS look-up. - The result may be stored in the DNS cache. */ - xDoStore = pdTRUE; - } - } - #endif /* ipconfigDNS_USE_CALLBACKS == 1 */ - #if( ipconfigUSE_DNS_CACHE == 1 ) - { - /* The reply will only be stored in the DNS cache when the - request was issued by this device. */ - if( xDoStore != pdFALSE ) - { - prvProcessDNSCache( pcName, &ulIPAddress, pxDNSAnswerRecord->ulTTL, pdFALSE ); - } - - /* Show what has happened. */ - FreeRTOS_printf( ( "DNS[0x%04X]: The answer to '%s' (%xip) will%s be stored\n", - ( unsigned ) pxDNSMessageHeader->usIdentifier, - pcName, - ( unsigned ) FreeRTOS_ntohl( ulIPAddress ), - ( xDoStore != 0 ) ? "" : " NOT" ) ); - } - #endif /* ipconfigUSE_DNS_CACHE */ - } - - pucByte += sizeof( DNSAnswerRecord_t ) + sizeof( uint32_t ); - uxSourceBytesRemaining -= ( sizeof( DNSAnswerRecord_t ) + sizeof( uint32_t ) ); - break; - } - else if( uxSourceBytesRemaining >= sizeof( DNSAnswerRecord_t ) ) - { - /* It's not an A record, so skip it. Get the header location - and then jump over the header. */ - pxDNSAnswerRecord = ( DNSAnswerRecord_t * ) pucByte; - pucByte += sizeof( DNSAnswerRecord_t ); - uxSourceBytesRemaining -= sizeof( DNSAnswerRecord_t ); - - /* Determine the length of the answer data from the header. */ - usDataLength = FreeRTOS_ntohs( pxDNSAnswerRecord->usDataLength ); - - /* Jump over the answer. */ - if( uxSourceBytesRemaining >= usDataLength ) - { - pucByte += usDataLength; - uxSourceBytesRemaining -= usDataLength; - } - else - { - /* Malformed response. */ - return dnsPARSE_ERROR; - } - } - } - } - -#if( ipconfigUSE_LLMNR == 1 ) - else if( usQuestions && ( usType == dnsTYPE_A_HOST ) && ( usClass == dnsCLASS_IN ) ) - { - /* If this is not a reply to our DNS request, it might an LLMNR - request. */ - if( xApplicationDNSQueryHook( ( pcRequestedName + 1 ) ) ) - { - int16_t usLength; - NetworkBufferDescriptor_t *pxNewBuffer = NULL; - NetworkBufferDescriptor_t *pxNetworkBuffer = pxUDPPayloadBuffer_to_NetworkBuffer( pucUDPPayloadBuffer ); - LLMNRAnswer_t *pxAnswer; - - if( ( xBufferAllocFixedSize == pdFALSE ) && ( pxNetworkBuffer != NULL ) ) - { - BaseType_t xDataLength = uxBufferLength + sizeof( UDPHeader_t ) + sizeof( EthernetHeader_t ) + sizeof( IPHeader_t ); - - /* Set the size of the outgoing packet. */ - pxNetworkBuffer->xDataLength = xDataLength; - pxNewBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, xDataLength + sizeof( LLMNRAnswer_t ) ); - - if( pxNewBuffer != NULL ) - { - BaseType_t xOffset1, xOffset2; - - xOffset1 = ( BaseType_t ) ( pucByte - pucUDPPayloadBuffer ); - xOffset2 = ( BaseType_t ) ( ( ( uint8_t * ) pcRequestedName ) - pucUDPPayloadBuffer ); - - pxNetworkBuffer = pxNewBuffer; - pucUDPPayloadBuffer = pxNetworkBuffer->pucEthernetBuffer + ipUDP_PAYLOAD_OFFSET_IPv4; - - pucByte = pucUDPPayloadBuffer + xOffset1; - pcRequestedName = ( char * ) ( pucUDPPayloadBuffer + xOffset2 ); - pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; - } - else - { - /* Just to indicate that the message may not be answered. */ - pxNetworkBuffer = NULL; - } - } - - if( pxNetworkBuffer != NULL ) - { - pxAnswer = ( LLMNRAnswer_t * ) pucByte; - - /* We leave 'usIdentifier' and 'usQuestions' untouched */ - vSetField16( pxDNSMessageHeader, DNSMessage_t, usFlags, dnsLLMNR_FLAGS_IS_REPONSE ); /* Set the response flag */ - vSetField16( pxDNSMessageHeader, DNSMessage_t, usAnswers, 1 ); /* Provide a single answer */ - vSetField16( pxDNSMessageHeader, DNSMessage_t, usAuthorityRRs, 0 ); /* No authority */ - vSetField16( pxDNSMessageHeader, DNSMessage_t, usAdditionalRRs, 0 ); /* No additional info */ - - pxAnswer->ucNameCode = dnsNAME_IS_OFFSET; - pxAnswer->ucNameOffset = ( uint8_t ) ( pcRequestedName - ( char * ) pucUDPPayloadBuffer ); - - vSetField16( pxAnswer, LLMNRAnswer_t, usType, dnsTYPE_A_HOST ); /* Type A: host */ - vSetField16( pxAnswer, LLMNRAnswer_t, usClass, dnsCLASS_IN ); /* 1: Class IN */ - vSetField32( pxAnswer, LLMNRAnswer_t, ulTTL, dnsLLMNR_TTL_VALUE ); - vSetField16( pxAnswer, LLMNRAnswer_t, usDataLength, 4 ); - vSetField32( pxAnswer, LLMNRAnswer_t, ulIPAddress, FreeRTOS_ntohl( *ipLOCAL_IP_ADDRESS_POINTER ) ); - - usLength = ( int16_t ) ( sizeof( *pxAnswer ) + ( size_t ) ( pucByte - pucUDPPayloadBuffer ) ); - - prvReplyDNSMessage( pxNetworkBuffer, usLength ); - - if( pxNewBuffer != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxNewBuffer ); - } - } - } - } -#endif /* ipconfigUSE_LLMNR == 1 */ - } while( 0 ); - - if( xExpected == pdFALSE ) - { - /* Do not return a valid IP-address in case the reply was not expected. */ - ulIPAddress = 0uL; - } - - return ulIPAddress; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_NBNS == 1 ) - - static void prvTreatNBNS( uint8_t *pucUDPPayloadBuffer, - size_t uxBufferLength, - uint32_t ulIPAddress ) - { - uint16_t usFlags, usType, usClass; - uint8_t *pucSource, *pucTarget; - uint8_t ucByte; - uint8_t ucNBNSName[ 17 ]; - - /* Check for minimum buffer size. */ - if( uxBufferLength < sizeof( NBNSRequest_t ) ) - { - return; - } - - /* Read the request flags in host endianness. */ - usFlags = usChar2u16( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usFlags ) ); - - if( ( usFlags & dnsNBNS_FLAGS_OPCODE_MASK ) == dnsNBNS_FLAGS_OPCODE_QUERY ) - { - usType = usChar2u16( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usType ) ); - usClass = usChar2u16( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usClass ) ); - - /* Not used for now */ - ( void ) usClass; - - /* For NBNS a name is 16 bytes long, written with capitals only. - Make sure that the copy is terminated with a zero. */ - pucTarget = ucNBNSName + sizeof( ucNBNSName ) - 2; - pucTarget[ 1 ] = '\0'; - - /* Start with decoding the last 2 bytes. */ - pucSource = pucUDPPayloadBuffer + ( offsetof( NBNSRequest_t, ucName ) + ( dnsNBNS_ENCODED_NAME_LENGTH - 2 ) ); - - for( ;; ) - { - ucByte = ( uint8_t ) ( ( ( pucSource[ 0 ] - 0x41 ) << 4 ) | ( pucSource[ 1 ] - 0x41 ) ); - - /* Make sure there are no trailing spaces in the name. */ - if( ( ucByte == ' ' ) && ( pucTarget[ 1 ] == '\0' ) ) - { - ucByte = '\0'; - } - - *pucTarget = ucByte; - - if( pucTarget == ucNBNSName ) - { - break; - } - - pucTarget -= 1; - pucSource -= 2; - } - - #if( ipconfigUSE_DNS_CACHE == 1 ) - { - if( ( usFlags & dnsNBNS_FLAGS_RESPONSE ) != 0 ) - { - /* If this is a response from another device, - add the name to the DNS cache */ - prvProcessDNSCache( ( char * ) ucNBNSName, &ulIPAddress, 0, pdFALSE ); - } - } - #else - { - /* Avoid compiler warnings. */ - ( void ) ulIPAddress; - } - #endif /* ipconfigUSE_DNS_CACHE */ - - if( ( ( usFlags & dnsNBNS_FLAGS_RESPONSE ) == 0 ) && - ( usType == dnsNBNS_TYPE_NET_BIOS ) && - ( xApplicationDNSQueryHook( ( const char * ) ucNBNSName ) != pdFALSE ) ) - { - uint16_t usLength; - DNSMessage_t *pxMessage; - NBNSAnswer_t *pxAnswer; - - /* Someone is looking for a device with ucNBNSName, - prepare a positive reply. */ - NetworkBufferDescriptor_t *pxNetworkBuffer = pxUDPPayloadBuffer_to_NetworkBuffer( pucUDPPayloadBuffer ); - - if( ( xBufferAllocFixedSize == pdFALSE ) && ( pxNetworkBuffer != NULL ) ) - { - NetworkBufferDescriptor_t *pxNewBuffer; - - /* The field xDataLength was set to the total length of the UDP packet, - i.e. the payload size plus sizeof( UDPPacket_t ). */ - pxNewBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, pxNetworkBuffer->xDataLength + sizeof( NBNSAnswer_t ) ); - - if( pxNewBuffer != NULL ) - { - pucUDPPayloadBuffer = pxNewBuffer->pucEthernetBuffer + sizeof( UDPPacket_t ); - pxNetworkBuffer = pxNewBuffer; - } - else - { - /* Just prevent that a reply will be sent */ - pxNetworkBuffer = NULL; - } - } - - /* Should not occur: pucUDPPayloadBuffer is part of a xNetworkBufferDescriptor */ - if( pxNetworkBuffer != NULL ) - { - pxMessage = ( DNSMessage_t * ) pucUDPPayloadBuffer; - - /* As the fields in the structures are not word-aligned, we have to - copy the values byte-by-byte using macro's vSetField16() and vSetField32() */ - vSetField16( pxMessage, DNSMessage_t, usFlags, dnsNBNS_QUERY_RESPONSE_FLAGS ); /* 0x8500 */ - vSetField16( pxMessage, DNSMessage_t, usQuestions, 0 ); - vSetField16( pxMessage, DNSMessage_t, usAnswers, 1 ); - vSetField16( pxMessage, DNSMessage_t, usAuthorityRRs, 0 ); - vSetField16( pxMessage, DNSMessage_t, usAdditionalRRs, 0 ); - - pxAnswer = ( NBNSAnswer_t * ) ( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usType ) ); - - vSetField16( pxAnswer, NBNSAnswer_t, usType, usType ); /* Type */ - vSetField16( pxAnswer, NBNSAnswer_t, usClass, dnsNBNS_CLASS_IN ); /* Class */ - vSetField32( pxAnswer, NBNSAnswer_t, ulTTL, dnsNBNS_TTL_VALUE ); - vSetField16( pxAnswer, NBNSAnswer_t, usDataLength, 6 ); /* 6 bytes including the length field */ - vSetField16( pxAnswer, NBNSAnswer_t, usNbFlags, dnsNBNS_NAME_FLAGS ); - vSetField32( pxAnswer, NBNSAnswer_t, ulIPAddress, FreeRTOS_ntohl( *ipLOCAL_IP_ADDRESS_POINTER ) ); - - usLength = ( uint16_t ) ( offsetof( NBNSRequest_t, usType ) + sizeof( NBNSAnswer_t ) ); - - prvReplyDNSMessage( pxNetworkBuffer, usLength ); - } - } - } - } - -#endif /* ipconfigUSE_NBNS */ -/*-----------------------------------------------------------*/ - -static Socket_t prvCreateDNSSocket( void ) -{ -Socket_t xSocket = NULL; -struct freertos_sockaddr xAddress; -BaseType_t xReturn; - - /* This must be the first time this function has been called. Create - the socket. */ - xSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); - - /* Auto bind the port. */ - xAddress.sin_port = 0u; - xReturn = FreeRTOS_bind( xSocket, &xAddress, sizeof( xAddress ) ); - - /* Check the bind was successful, and clean up if not. */ - if( xReturn != 0 ) - { - FreeRTOS_closesocket( xSocket ); - xSocket = NULL; - } - else - { - /* The send and receive timeouts will be set later on. */ - } - - return xSocket; -} -/*-----------------------------------------------------------*/ - -#if( ( ipconfigUSE_NBNS == 1 ) || ( ipconfigUSE_LLMNR == 1 ) ) - - static void prvReplyDNSMessage( NetworkBufferDescriptor_t *pxNetworkBuffer, - BaseType_t lNetLength ) - { - UDPPacket_t *pxUDPPacket; - IPHeader_t *pxIPHeader; - UDPHeader_t *pxUDPHeader; - - pxUDPPacket = ( UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; - pxIPHeader = &pxUDPPacket->xIPHeader; - pxUDPHeader = &pxUDPPacket->xUDPHeader; - /* HT: started using defines like 'ipSIZE_OF_xxx' */ - pxIPHeader->usLength = FreeRTOS_htons( lNetLength + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_UDP_HEADER ); - /* HT:endian: should not be translated, copying from packet to packet */ - pxIPHeader->ulDestinationIPAddress = pxIPHeader->ulSourceIPAddress; - pxIPHeader->ulSourceIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; - pxIPHeader->ucTimeToLive = ipconfigUDP_TIME_TO_LIVE; - pxIPHeader->usIdentification = FreeRTOS_htons( usPacketIdentifier ); - usPacketIdentifier++; - pxUDPHeader->usLength = FreeRTOS_htons( lNetLength + ipSIZE_OF_UDP_HEADER ); - vFlip_16( pxUDPPacket->xUDPHeader.usSourcePort, pxUDPPacket->xUDPHeader.usDestinationPort ); - - /* Important: tell NIC driver how many bytes must be sent */ - pxNetworkBuffer->xDataLength = ( size_t ) ( lNetLength + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_UDP_HEADER + ipSIZE_OF_ETH_HEADER ); - - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) - { - /* calculate the IP header checksum */ - pxIPHeader->usHeaderChecksum = 0x00; - pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0uL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); - pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); - - /* calculate the UDP checksum for outgoing package */ - usGenerateProtocolChecksum( ( uint8_t* ) pxUDPPacket, pxNetworkBuffer->xDataLength, pdTRUE ); - } - #endif - - /* This function will fill in the eth addresses and send the packet */ - vReturnEthernetFrame( pxNetworkBuffer, pdFALSE ); - } - -#endif /* ipconfigUSE_NBNS == 1 || ipconfigUSE_LLMNR == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_DNS_CACHE == 1 ) - - static void prvProcessDNSCache( const char *pcName, - uint32_t *pulIP, - uint32_t ulTTL, - BaseType_t xLookUp ) - { - BaseType_t x; - BaseType_t xFound = pdFALSE; - uint32_t ulCurrentTimeSeconds = ( xTaskGetTickCount() / portTICK_PERIOD_MS ) / 1000; - static BaseType_t xFreeEntry = 0; - configASSERT(pcName); - - /* For each entry in the DNS cache table. */ - for( x = 0; x < ipconfigDNS_CACHE_ENTRIES; x++ ) - { - if( xDNSCache[ x ].pcName[ 0 ] == 0 ) - { - continue; - } - - if( 0 == strcmp( xDNSCache[ x ].pcName, pcName ) ) - { - /* Is this function called for a lookup or to add/update an IP address? */ - if( xLookUp != pdFALSE ) - { - /* Confirm that the record is still fresh. */ - if( ulCurrentTimeSeconds < ( xDNSCache[ x ].ulTimeWhenAddedInSeconds + FreeRTOS_ntohl( xDNSCache[ x ].ulTTL ) ) ) - { - *pulIP = xDNSCache[ x ].ulIPAddress; - } - else - { - /* Age out the old cached record. */ - xDNSCache[ x ].pcName[ 0 ] = 0; - } - } - else - { - xDNSCache[ x ].ulIPAddress = *pulIP; - xDNSCache[ x ].ulTTL = ulTTL; - xDNSCache[ x ].ulTimeWhenAddedInSeconds = ulCurrentTimeSeconds; - } - - xFound = pdTRUE; - break; - } - } - - if( xFound == pdFALSE ) - { - if( xLookUp != pdFALSE ) - { - *pulIP = 0; - } - else - { - /* Add or update the item. */ - if( strlen( pcName ) < ipconfigDNS_CACHE_NAME_LENGTH ) - { - strcpy( xDNSCache[ xFreeEntry ].pcName, pcName ); - - xDNSCache[ xFreeEntry ].ulIPAddress = *pulIP; - xDNSCache[ xFreeEntry ].ulTTL = ulTTL; - xDNSCache[ xFreeEntry ].ulTimeWhenAddedInSeconds = ulCurrentTimeSeconds; - - xFreeEntry++; - - if( xFreeEntry == ipconfigDNS_CACHE_ENTRIES ) - { - xFreeEntry = 0; - } - } - } - } - - if( ( xLookUp == 0 ) || ( *pulIP != 0 ) ) - { - FreeRTOS_debug_printf( ( "prvProcessDNSCache: %s: '%s' @ %lxip\n", xLookUp ? "look-up" : "add", pcName, FreeRTOS_ntohl( *pulIP ) ) ); - } - } - -#endif /* ipconfigUSE_DNS_CACHE */ - -#endif /* ipconfigUSE_DNS != 0 */ - -/*-----------------------------------------------------------*/ - -/* Provide access to private members for testing. */ -#ifdef AMAZON_FREERTOS_ENABLE_UNIT_TESTS - #include "iot_freertos_tcp_test_access_dns_define.h" -#endif - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "list.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_DNS.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" +#include "IPTraceMacroDefaults.h" + +/* Exclude the entire file if DNS is not enabled. */ +#if( ipconfigUSE_DNS != 0 ) + +#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) + #define dnsDNS_PORT 0x3500u + #define dnsONE_QUESTION 0x0100u + #define dnsOUTGOING_FLAGS 0x0001u /* Standard query. */ + #define dnsRX_FLAGS_MASK 0x0f80u /* The bits of interest in the flags field of incoming DNS messages. */ + #define dnsEXPECTED_RX_FLAGS 0x0080u /* Should be a response, without any errors. */ +#else + #define dnsDNS_PORT 0x0035u + #define dnsONE_QUESTION 0x0001u + #define dnsOUTGOING_FLAGS 0x0100u /* Standard query. */ + #define dnsRX_FLAGS_MASK 0x800fu /* The bits of interest in the flags field of incoming DNS messages. */ + #define dnsEXPECTED_RX_FLAGS 0x8000u /* Should be a response, without any errors. */ + +#endif /* ipconfigBYTE_ORDER */ + +/* The maximum number of times a DNS request should be sent out if a response +is not received, before giving up. */ +#ifndef ipconfigDNS_REQUEST_ATTEMPTS + #define ipconfigDNS_REQUEST_ATTEMPTS 5 +#endif + +/* If the top two bits in the first character of a name field are set then the +name field is an offset to the string, rather than the string itself. */ +#define dnsNAME_IS_OFFSET ( ( uint8_t ) 0xc0 ) + +/* NBNS flags. */ +#define dnsNBNS_FLAGS_RESPONSE 0x8000u +#define dnsNBNS_FLAGS_OPCODE_MASK 0x7800u +#define dnsNBNS_FLAGS_OPCODE_QUERY 0x0000u +#define dnsNBNS_FLAGS_OPCODE_REGISTRATION 0x2800u + +/* Host types. */ +#define dnsTYPE_A_HOST 0x01u +#define dnsCLASS_IN 0x01u + +/* LLMNR constants. */ +#define dnsLLMNR_TTL_VALUE 300000uL +#define dnsLLMNR_FLAGS_IS_REPONSE 0x8000u + +/* NBNS constants. */ +#define dnsNBNS_TTL_VALUE 3600uL /* 1 hour valid */ +#define dnsNBNS_TYPE_NET_BIOS 0x0020u +#define dnsNBNS_CLASS_IN 0x01u +#define dnsNBNS_NAME_FLAGS 0x6000u +#define dnsNBNS_ENCODED_NAME_LENGTH 32 + +/* If the queried NBNS name matches with the device's name, +the query will be responded to with these flags: */ +#define dnsNBNS_QUERY_RESPONSE_FLAGS ( 0x8500u ) + +/* Flag DNS parsing errors in situations where an IPv4 address is the return +type. */ +#define dnsPARSE_ERROR 0uL + +/* + * Create a socket and bind it to the standard DNS port number. Return the + * the created socket - or NULL if the socket could not be created or bound. + */ +static Socket_t prvCreateDNSSocket( void ); + +/* + * Create the DNS message in the zero copy buffer passed in the first parameter. + */ +static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, + const char *pcHostName, + TickType_t uxIdentifier ); + +/* + * Simple routine that jumps over the NAME field of a resource record. + */ +static uint8_t * prvSkipNameField( uint8_t *pucByte, + size_t uxSourceLen ); + +/* + * Process a response packet from a DNS server. + * The parameter 'xExpected' indicates whether the identifier in the reply + * was expected, and thus if the DNS cache may be updated with the reply. + */ +static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer, + size_t uxBufferLength, + BaseType_t xExpected ); + +/* + * Prepare and send a message to a DNS server. 'uxReadTimeOut_ticks' will be passed as + * zero, in case the user has supplied a call-back function. + */ +static uint32_t prvGetHostByName( const char *pcHostName, + TickType_t uxIdentifier, + TickType_t uxReadTimeOut_ticks ); + +/* + * The NBNS and the LLMNR protocol share this reply function. + */ +#if( ( ipconfigUSE_NBNS == 1 ) || ( ipconfigUSE_LLMNR == 1 ) ) + static void prvReplyDNSMessage( NetworkBufferDescriptor_t *pxNetworkBuffer, + BaseType_t lNetLength ); +#endif + +#if( ipconfigUSE_NBNS == 1 ) + static portINLINE void prvTreatNBNS( uint8_t *pucUDPPayloadBuffer, + size_t uxBufferLength, + uint32_t ulIPAddress ); +#endif /* ipconfigUSE_NBNS */ + + +#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) + static uint8_t * prvReadNameField( uint8_t *pucByte, + size_t uxSourceLen, + char *pcName, + size_t uxLen ); +#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */ + +#if( ipconfigUSE_DNS_CACHE == 1 ) + static void prvProcessDNSCache( const char *pcName, + uint32_t *pulIP, + uint32_t ulTTL, + BaseType_t xLookUp ); + + typedef struct xDNS_CACHE_TABLE_ROW + { + uint32_t ulIPAddress; /* The IP address of an ARP cache entry. */ + char pcName[ ipconfigDNS_CACHE_NAME_LENGTH ]; /* The name of the host */ + uint32_t ulTTL; /* Time-to-Live (in seconds) from the DNS server. */ + uint32_t ulTimeWhenAddedInSeconds; + } DNSCacheRow_t; + + static DNSCacheRow_t xDNSCache[ ipconfigDNS_CACHE_ENTRIES ]; + + void FreeRTOS_dnsclear() + { + memset( xDNSCache, 0x0, sizeof( xDNSCache ) ); + } +#endif /* ipconfigUSE_DNS_CACHE == 1 */ + +#if( ipconfigUSE_LLMNR == 1 ) + const MACAddress_t xLLMNR_MacAdress = { { 0x01, 0x00, 0x5e, 0x00, 0x00, 0xfc } }; +#endif /* ipconfigUSE_LLMNR == 1 */ + +/*-----------------------------------------------------------*/ + +#include "pack_struct_start.h" +struct xDNSMessage +{ + uint16_t usIdentifier; + uint16_t usFlags; + uint16_t usQuestions; + uint16_t usAnswers; + uint16_t usAuthorityRRs; + uint16_t usAdditionalRRs; +} +#include "pack_struct_end.h" +typedef struct xDNSMessage DNSMessage_t; + +/* A DNS query consists of a header, as described in 'struct xDNSMessage' +It is followed by 1 or more queries, each one consisting of a name and a tail, +with two fields: type and class +*/ +#include "pack_struct_start.h" +struct xDNSTail +{ + uint16_t usType; + uint16_t usClass; +} +#include "pack_struct_end.h" +typedef struct xDNSTail DNSTail_t; + +/* DNS answer record header. */ +#include "pack_struct_start.h" +struct xDNSAnswerRecord +{ + uint16_t usType; + uint16_t usClass; + uint32_t ulTTL; + uint16_t usDataLength; +} +#include "pack_struct_end.h" +typedef struct xDNSAnswerRecord DNSAnswerRecord_t; + +#if( ipconfigUSE_LLMNR == 1 ) + + #include "pack_struct_start.h" + struct xLLMNRAnswer + { + uint8_t ucNameCode; + uint8_t ucNameOffset; /* The name is not repeated in the answer, only the offset is given with "0xc0 " */ + uint16_t usType; + uint16_t usClass; + uint32_t ulTTL; + uint16_t usDataLength; + uint32_t ulIPAddress; + } + #include "pack_struct_end.h" + typedef struct xLLMNRAnswer LLMNRAnswer_t; + +#endif /* ipconfigUSE_LLMNR == 1 */ + +#if( ipconfigUSE_NBNS == 1 ) + + #include "pack_struct_start.h" + struct xNBNSRequest + { + uint16_t usRequestId; + uint16_t usFlags; + uint16_t ulRequestCount; + uint16_t usAnswerRSS; + uint16_t usAuthRSS; + uint16_t usAdditionalRSS; + uint8_t ucNameSpace; + uint8_t ucName[ dnsNBNS_ENCODED_NAME_LENGTH ]; + uint8_t ucNameZero; + uint16_t usType; + uint16_t usClass; + } + #include "pack_struct_end.h" + typedef struct xNBNSRequest NBNSRequest_t; + + #include "pack_struct_start.h" + struct xNBNSAnswer + { + uint16_t usType; + uint16_t usClass; + uint32_t ulTTL; + uint16_t usDataLength; + uint16_t usNbFlags; /* NetBIOS flags 0x6000 : IP-address, big-endian */ + uint32_t ulIPAddress; + } + #include "pack_struct_end.h" + typedef struct xNBNSAnswer NBNSAnswer_t; + + #endif /* ipconfigUSE_NBNS == 1 */ + +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_DNS_CACHE == 1 ) + uint32_t FreeRTOS_dnslookup( const char *pcHostName ) + { + uint32_t ulIPAddress = 0uL; + + prvProcessDNSCache( pcHostName, &ulIPAddress, 0, pdTRUE ); + return ulIPAddress; + } +#endif /* ipconfigUSE_DNS_CACHE == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigDNS_USE_CALLBACKS == 1 ) + + typedef struct xDNS_Callback + { + TickType_t uxRemaningTime; /* Timeout in ms */ + FOnDNSEvent pCallbackFunction; /* Function to be called when the address has been found or when a timeout has beeen reached */ + TimeOut_t uxTimeoutState; + void *pvSearchID; + struct xLIST_ITEM xListItem; + char pcName[ 1 ]; + } DNSCallback_t; + + static List_t xCallbackList; + + /* Define FreeRTOS_gethostbyname() as a normal blocking call. */ + uint32_t FreeRTOS_gethostbyname( const char *pcHostName ) + { + return FreeRTOS_gethostbyname_a( pcHostName, ( FOnDNSEvent ) NULL, ( void * ) NULL, 0 ); + } + /*-----------------------------------------------------------*/ + + /* Initialise the list of call-back structures. */ + void vDNSInitialise( void ); + void vDNSInitialise( void ) + { + vListInitialise( &xCallbackList ); + } + /*-----------------------------------------------------------*/ + + /* Iterate through the list of call-back structures and remove + old entries which have reached a timeout. + As soon as the list hase become empty, the DNS timer will be stopped + In case pvSearchID is supplied, the user wants to cancel a DNS request + */ + void vDNSCheckCallBack( void *pvSearchID ); + void vDNSCheckCallBack( void *pvSearchID ) + { + const ListItem_t *pxIterator; + const MiniListItem_t * xEnd = ( const MiniListItem_t * ) listGET_END_MARKER( &xCallbackList ); + + vTaskSuspendAll(); + { + for( pxIterator = ( const ListItem_t * ) listGET_NEXT( xEnd ); + pxIterator != ( const ListItem_t * ) xEnd; + ) + { + DNSCallback_t *pxCallback = ( DNSCallback_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + + /* Move to the next item because we might remove this item */ + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ); + + if( ( pvSearchID != NULL ) && ( pvSearchID == pxCallback->pvSearchID ) ) + { + uxListRemove( &pxCallback->xListItem ); + vPortFree( pxCallback ); + } + else if( xTaskCheckForTimeOut( &pxCallback->uxTimeoutState, &pxCallback->uxRemaningTime ) != pdFALSE ) + { + pxCallback->pCallbackFunction( pxCallback->pcName, pxCallback->pvSearchID, 0 ); + uxListRemove( &pxCallback->xListItem ); + vPortFree( ( void * ) pxCallback ); + } + } + } + xTaskResumeAll(); + + if( listLIST_IS_EMPTY( &xCallbackList ) ) + { + vIPSetDnsTimerEnableState( pdFALSE ); + } + } + /*-----------------------------------------------------------*/ + + void FreeRTOS_gethostbyname_cancel( void *pvSearchID ) + { + /* _HT_ Should better become a new API call to have the IP-task remove the callback */ + vDNSCheckCallBack( pvSearchID ); + } + /*-----------------------------------------------------------*/ + + /* FreeRTOS_gethostbyname_a() was called along with callback parameters. + Store them in a list for later reference. */ + static void vDNSSetCallBack( const char *pcHostName, + void *pvSearchID, + FOnDNSEvent pCallbackFunction, + TickType_t uxTimeout, + TickType_t uxIdentifier ); + static void vDNSSetCallBack( const char *pcHostName, + void *pvSearchID, + FOnDNSEvent pCallbackFunction, + TickType_t uxTimeout, + TickType_t uxIdentifier ) + { + size_t lLength = strlen( pcHostName ); + DNSCallback_t *pxCallback = ( DNSCallback_t * ) pvPortMalloc( sizeof( *pxCallback ) + lLength ); + + /* Translate from ms to number of clock ticks. */ + uxTimeout /= portTICK_PERIOD_MS; + + if( pxCallback != NULL ) + { + if( listLIST_IS_EMPTY( &xCallbackList ) ) + { + /* This is the first one, start the DNS timer to check for timeouts */ + vIPReloadDNSTimer( FreeRTOS_min_uint32( 1000U, uxTimeout ) ); + } + + strcpy( pxCallback->pcName, pcHostName ); + pxCallback->pCallbackFunction = pCallbackFunction; + pxCallback->pvSearchID = pvSearchID; + pxCallback->uxRemaningTime = uxTimeout; + vTaskSetTimeOutState( &pxCallback->uxTimeoutState ); + listSET_LIST_ITEM_OWNER( &( pxCallback->xListItem ), ( void * ) pxCallback ); + listSET_LIST_ITEM_VALUE( &( pxCallback->xListItem ), uxIdentifier ); + vTaskSuspendAll(); + { + vListInsertEnd( &xCallbackList, &pxCallback->xListItem ); + } + xTaskResumeAll(); + } + } + /*-----------------------------------------------------------*/ + + /* A DNS reply was received, see if there is any matching entry and + call the handler. Returns pdTRUE if uxIdentifier was recognised. */ + static BaseType_t xDNSDoCallback( TickType_t uxIdentifier, + const char *pcName, + uint32_t ulIPAddress ); + static BaseType_t xDNSDoCallback( TickType_t uxIdentifier, + const char *pcName, + uint32_t ulIPAddress ) + { + BaseType_t xResult = pdFALSE; + const ListItem_t *pxIterator; + const MiniListItem_t * xEnd = ( const MiniListItem_t * ) listGET_END_MARKER( &xCallbackList ); + + vTaskSuspendAll(); + { + for( pxIterator = ( const ListItem_t * ) listGET_NEXT( xEnd ); + pxIterator != ( const ListItem_t * ) xEnd; + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + /* The cast will take away the 'configLIST_VOLATILE' */ + if( uxIdentifier == ( TickType_t ) listGET_LIST_ITEM_VALUE( pxIterator ) ) + { + DNSCallback_t *pxCallback = ( DNSCallback_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + + pxCallback->pCallbackFunction( pcName, pxCallback->pvSearchID, ulIPAddress ); + uxListRemove( &pxCallback->xListItem ); + vPortFree( pxCallback ); + + if( listLIST_IS_EMPTY( &xCallbackList ) ) + { + /* The list of outstanding requests is empty. No need for periodic polling. */ + vIPSetDnsTimerEnableState( pdFALSE ); + } + + xResult = pdTRUE; + break; + } + } + } + xTaskResumeAll(); + return xResult; + } + +#endif /* ipconfigDNS_USE_CALLBACKS == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigDNS_USE_CALLBACKS == 0 ) + uint32_t FreeRTOS_gethostbyname( const char *pcHostName ) +#else + uint32_t FreeRTOS_gethostbyname_a( const char *pcHostName, + FOnDNSEvent pCallback, + void *pvSearchID, + TickType_t uxTimeout ) +#endif +{ +uint32_t ulIPAddress = 0uL; +TickType_t uxReadTimeOut_ticks = ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS; +TickType_t uxIdentifier = 0u; +BaseType_t xHasRandom = pdFALSE; + + if( pcHostName != NULL ) + { + /* If the supplied hostname is IP address, convert it to uint32_t + and return. */ + #if( ipconfigINCLUDE_FULL_INET_ADDR == 1 ) + { + ulIPAddress = FreeRTOS_inet_addr( pcHostName ); + } + #endif /* ipconfigINCLUDE_FULL_INET_ADDR == 1 */ + + /* If a DNS cache is used then check the cache before issuing another DNS + request. */ + #if( ipconfigUSE_DNS_CACHE == 1 ) + { + if( ulIPAddress == 0uL ) + { + ulIPAddress = FreeRTOS_dnslookup( pcHostName ); + + if( ulIPAddress != 0 ) + { + FreeRTOS_debug_printf( ( "FreeRTOS_gethostbyname: found '%s' in cache: %lxip\n", pcHostName, ulIPAddress ) ); + } + else + { + /* prvGetHostByName will be called to start a DNS lookup. */ + } + } + } + #endif /* ipconfigUSE_DNS_CACHE == 1 */ + + /* Generate a unique identifier. */ + if( ulIPAddress == 0uL ) + { + uint32_t ulNumber; + + xHasRandom = xApplicationGetRandomNumber( &( ulNumber ) ); + /* DNS identifiers are 16-bit. */ + uxIdentifier = ( TickType_t ) ( ulNumber & 0xffffu ); + /* ipconfigRAND32() may not return a non-zero value. */ + } + + #if( ipconfigDNS_USE_CALLBACKS == 1 ) + { + if( pCallback != NULL ) + { + if( ulIPAddress == 0uL ) + { + /* The user has provided a callback function, so do not block on recvfrom() */ + if( xHasRandom != pdFALSE ) + { + uxReadTimeOut_ticks = 0u; + vDNSSetCallBack( pcHostName, pvSearchID, pCallback, uxTimeout, uxIdentifier ); + } + } + else + { + /* The IP address is known, do the call-back now. */ + pCallback( pcHostName, pvSearchID, ulIPAddress ); + } + } + } + #endif /* if ( ipconfigDNS_USE_CALLBACKS == 1 ) */ + + if( ( ulIPAddress == 0uL ) && ( xHasRandom != pdFALSE ) ) + { + ulIPAddress = prvGetHostByName( pcHostName, uxIdentifier, uxReadTimeOut_ticks ); + } + } + return ulIPAddress; +} +/*-----------------------------------------------------------*/ + +static uint32_t prvGetHostByName( const char *pcHostName, + TickType_t uxIdentifier, + TickType_t uxReadTimeOut_ticks ) +{ +struct freertos_sockaddr xAddress; +Socket_t xDNSSocket; +uint32_t ulIPAddress = 0uL; +uint8_t *pucUDPPayloadBuffer; +uint32_t ulAddressLength = sizeof( struct freertos_sockaddr ); +BaseType_t xAttempt; +int32_t lBytes; +size_t uxPayloadLength, uxExpectedPayloadLength; +TickType_t uxWriteTimeOut_ticks = ipconfigDNS_SEND_BLOCK_TIME_TICKS; + +#if( ipconfigUSE_LLMNR == 1 ) + BaseType_t bHasDot = pdFALSE; +#endif /* ipconfigUSE_LLMNR == 1 */ + + /* If LLMNR is being used then determine if the host name includes a '.' - + if not then LLMNR can be used as the lookup method. */ + #if( ipconfigUSE_LLMNR == 1 ) + { + const char *pucPtr; + + for( pucPtr = pcHostName; *pucPtr; pucPtr++ ) + { + if( *pucPtr == '.' ) + { + bHasDot = pdTRUE; + break; + } + } + } + #endif /* ipconfigUSE_LLMNR == 1 */ + + /* Two is added at the end for the count of characters in the first + subdomain part and the string end byte. */ + uxExpectedPayloadLength = sizeof( DNSMessage_t ) + strlen( pcHostName ) + sizeof( uint16_t ) + sizeof( uint16_t ) + 2u; + + xDNSSocket = prvCreateDNSSocket(); + + if( xDNSSocket != NULL ) + { + FreeRTOS_setsockopt( xDNSSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &uxWriteTimeOut_ticks, sizeof( TickType_t ) ); + FreeRTOS_setsockopt( xDNSSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &uxReadTimeOut_ticks, sizeof( TickType_t ) ); + + for( xAttempt = 0; xAttempt < ipconfigDNS_REQUEST_ATTEMPTS; xAttempt++ ) + { + /* Get a buffer. This uses a maximum delay, but the delay will be + capped to ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS so the return value + still needs to be tested. */ + pucUDPPayloadBuffer = ( uint8_t * ) FreeRTOS_GetUDPPayloadBuffer( uxExpectedPayloadLength, portMAX_DELAY ); + + if( pucUDPPayloadBuffer != NULL ) + { + /* Create the message in the obtained buffer. */ + uxPayloadLength = prvCreateDNSMessage( pucUDPPayloadBuffer, pcHostName, uxIdentifier ); + + iptraceSENDING_DNS_REQUEST(); + + /* Obtain the DNS server address. */ + FreeRTOS_GetAddressConfiguration( NULL, NULL, NULL, &ulIPAddress ); + + /* Send the DNS message. */ +#if( ipconfigUSE_LLMNR == 1 ) + if( bHasDot == pdFALSE ) + { + /* Use LLMNR addressing. */ + ( ( DNSMessage_t * ) pucUDPPayloadBuffer )->usFlags = 0; + xAddress.sin_addr = ipLLMNR_IP_ADDR; /* Is in network byte order. */ + xAddress.sin_port = FreeRTOS_ntohs( ipLLMNR_PORT ); + } + else +#endif + { + /* Use DNS server. */ + xAddress.sin_addr = ulIPAddress; + xAddress.sin_port = dnsDNS_PORT; + } + + ulIPAddress = 0uL; + + if( FreeRTOS_sendto( xDNSSocket, pucUDPPayloadBuffer, uxPayloadLength, FREERTOS_ZERO_COPY, &xAddress, sizeof( xAddress ) ) != 0 ) + { + /* Wait for the reply. */ + lBytes = FreeRTOS_recvfrom( xDNSSocket, &pucUDPPayloadBuffer, 0, FREERTOS_ZERO_COPY, &xAddress, &ulAddressLength ); + + if( lBytes > 0 ) + { + BaseType_t xExpected; + DNSMessage_t *pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; + + /* See if the identifiers match. */ + if( uxIdentifier == ( TickType_t ) pxDNSMessageHeader->usIdentifier ) + { + xExpected = pdTRUE; + } + else + { + /* The reply was not expected. */ + xExpected = pdFALSE; + } + + /* The reply was received. Process it. */ + #if( ipconfigDNS_USE_CALLBACKS == 0 ) + /* It is useless to analyse the unexpected reply + unless asynchronous look-ups are enabled. */ + if( xExpected != pdFALSE ) + #endif /* ipconfigDNS_USE_CALLBACKS == 0 */ + { + ulIPAddress = prvParseDNSReply( pucUDPPayloadBuffer, ( size_t ) lBytes, xExpected ); + } + + /* Finished with the buffer. The zero copy interface + is being used, so the buffer must be freed by the + task. */ + FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucUDPPayloadBuffer ); + + if( ulIPAddress != 0uL ) + { + /* All done. */ + break; + } + } + } + else + { + /* The message was not sent so the stack will not be + releasing the zero copy - it must be released here. */ + FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucUDPPayloadBuffer ); + } + } + + if( uxReadTimeOut_ticks == 0u ) + { + /* This DNS lookup is asynchronous, using a call-back: + send the request only once. */ + break; + } + } + + /* Finished with the socket. */ + FreeRTOS_closesocket( xDNSSocket ); + } + + return ulIPAddress; +} +/*-----------------------------------------------------------*/ + +static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, + const char *pcHostName, + TickType_t uxIdentifier ) +{ +DNSMessage_t *pxDNSMessageHeader; +uint8_t *pucStart, *pucByte; +DNSTail_t *pxTail; +static const DNSMessage_t xDefaultPartDNSHeader = +{ + 0, /* The identifier will be overwritten. */ + dnsOUTGOING_FLAGS, /* Flags set for standard query. */ + dnsONE_QUESTION, /* One question is being asked. */ + 0, /* No replies are included. */ + 0, /* No authorities. */ + 0 /* No additional authorities. */ +}; + + /* Copy in the const part of the header. */ + memcpy( ( void * ) pucUDPPayloadBuffer, ( void * ) &xDefaultPartDNSHeader, sizeof( xDefaultPartDNSHeader ) ); + + /* Write in a unique identifier. */ + pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; + pxDNSMessageHeader->usIdentifier = ( uint16_t ) uxIdentifier; + + /* Create the resource record at the end of the header. First + find the end of the header. */ + pucStart = pucUDPPayloadBuffer + sizeof( xDefaultPartDNSHeader ); + + /* Leave a gap for the first length bytes. */ + pucByte = pucStart + 1; + + /* Copy in the host name. */ + strcpy( ( char * ) pucByte, pcHostName ); + + /* Mark the end of the string. */ + pucByte += strlen( pcHostName ); + *pucByte = 0x00u; + + /* Walk the string to replace the '.' characters with byte counts. + pucStart holds the address of the byte count. Walking the string + starts after the byte count position. */ + pucByte = pucStart; + + do + { + pucByte++; + + while( ( *pucByte != 0x00 ) && ( *pucByte != '.' ) ) + { + pucByte++; + } + + /* Fill in the byte count, then move the pucStart pointer up to + the found byte position. */ + *pucStart = ( uint8_t ) ( ( uint32_t ) pucByte - ( uint32_t ) pucStart ); + ( *pucStart )--; + + pucStart = pucByte; + } while( *pucByte != 0x00 ); + + /* Finish off the record. */ + + pxTail = ( DNSTail_t * ) ( pucByte + 1 ); + + vSetField16( pxTail, DNSTail_t, usType, dnsTYPE_A_HOST ); /* Type A: host */ + vSetField16( pxTail, DNSTail_t, usClass, dnsCLASS_IN ); /* 1: Class IN */ + + /* Return the total size of the generated message, which is the space from + the last written byte to the beginning of the buffer. */ + return ( ( uint32_t ) pucByte - ( uint32_t ) pucUDPPayloadBuffer + 1 ) + sizeof( *pxTail ); +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) + + static uint8_t * prvReadNameField( uint8_t *pucByte, + size_t uxSourceLen, + char *pcName, + size_t uxDestLen ) + { + size_t uxNameLen = 0; + BaseType_t xCount; + + if( 0 == uxSourceLen ) + { + return NULL; + } + + /* Determine if the name is the fully coded name, or an offset to the name + elsewhere in the message. */ + if( ( *pucByte & dnsNAME_IS_OFFSET ) == dnsNAME_IS_OFFSET ) + { + /* Jump over the two byte offset. */ + if( uxSourceLen > sizeof( uint16_t ) ) + { + pucByte += sizeof( uint16_t ); + } + else + { + pucByte = NULL; + } + } + else + { + /* pucByte points to the full name. Walk over the string. */ + while( ( NULL != pucByte ) && ( *pucByte != 0x00u ) && ( uxSourceLen > 1u ) ) + { + /* If this is not the first time through the loop, then add a + separator in the output. */ + if( ( uxNameLen > 0 ) && ( uxNameLen < ( uxDestLen - 1u ) ) ) + { + pcName[ uxNameLen++ ] = '.'; + } + + /* Process the first/next sub-string. */ + for( xCount = *( pucByte++ ), uxSourceLen--; + xCount-- && uxSourceLen > 1u; + pucByte++, uxSourceLen-- ) + { + if( uxNameLen < uxDestLen - 1u ) + { + pcName[ uxNameLen++ ] = *( ( char * ) pucByte ); + } + else + { + /* DNS name is too big for the provided buffer. */ + pucByte = NULL; + break; + } + } + } + + /* Confirm that a fully formed name was found. */ + if( NULL != pucByte ) + { + if( 0x00 == *pucByte ) + { + pucByte++; + uxSourceLen--; + pcName[ uxNameLen++ ] = '\0'; + } + else + { + pucByte = NULL; + } + } + } + + return pucByte; + } +#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */ +/*-----------------------------------------------------------*/ + +static uint8_t * prvSkipNameField( uint8_t *pucByte, + size_t uxSourceLen ) +{ +size_t uxChunkLength; + + if( 0u == uxSourceLen ) + { + return NULL; + } + + /* Determine if the name is the fully coded name, or an offset to the name + elsewhere in the message. */ + if( ( *pucByte & dnsNAME_IS_OFFSET ) == dnsNAME_IS_OFFSET ) + { + /* Jump over the two byte offset. */ + if( uxSourceLen > sizeof( uint16_t ) ) + { + pucByte += sizeof( uint16_t ); + } + else + { + pucByte = NULL; + } + } + else + { + /* pucByte points to the full name. Walk over the string. */ + while( ( *pucByte != 0x00u ) && ( uxSourceLen > 1u ) ) + { + uxChunkLength = *pucByte + 1u; + + if( uxSourceLen > uxChunkLength ) + { + uxSourceLen -= uxChunkLength; + pucByte += uxChunkLength; + } + else + { + pucByte = NULL; + break; + } + } + + /* Confirm that a fully formed name was found. */ + if( NULL != pucByte ) + { + if( 0x00u == *pucByte ) + { + pucByte++; + } + else + { + pucByte = NULL; + } + } + } + + return pucByte; +} +/*-----------------------------------------------------------*/ + +/* The function below will only be called : +when ipconfigDNS_USE_CALLBACKS == 1 +when ipconfigUSE_LLMNR == 1 +for testing purposes, by the module iot_test_freertos_tcp.c +*/ +uint32_t ulDNSHandlePacket( NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ +DNSMessage_t *pxDNSMessageHeader; +size_t uxPayloadSize; + + /* Only proceed if the payload length indicated in the header + appears to be valid. */ + if( pxNetworkBuffer->xDataLength >= sizeof( UDPPacket_t ) ) + { + uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); + + if( uxPayloadSize >= sizeof( DNSMessage_t ) ) + { + pxDNSMessageHeader = + ( DNSMessage_t * ) ( pxNetworkBuffer->pucEthernetBuffer + sizeof( UDPPacket_t ) ); + + /* The parameter pdFALSE indicates that the reply was not expected. */ + prvParseDNSReply( ( uint8_t * ) pxDNSMessageHeader, + uxPayloadSize, + pdFALSE ); + } + } + + /* The packet was not consumed. */ + return pdFAIL; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_NBNS == 1 ) + + uint32_t ulNBNSHandlePacket( NetworkBufferDescriptor_t * pxNetworkBuffer ) + { + UDPPacket_t *pxUDPPacket = ( UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; + uint8_t *pucUDPPayloadBuffer = pxNetworkBuffer->pucEthernetBuffer + sizeof( UDPPacket_t ); + size_t uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); + + /* The network buffer data length has already been set to the + length of the UDP payload. */ + prvTreatNBNS( pucUDPPayloadBuffer, + uxPayloadSize, + pxUDPPacket->xIPHeader.ulSourceIPAddress ); + + /* The packet was not consumed. */ + return pdFAIL; + } + +#endif /* ipconfigUSE_NBNS */ +/*-----------------------------------------------------------*/ + +static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer, + size_t uxBufferLength, + BaseType_t xExpected ) +{ +DNSMessage_t *pxDNSMessageHeader; +DNSAnswerRecord_t *pxDNSAnswerRecord; +uint32_t ulIPAddress = 0uL; +#if( ipconfigUSE_LLMNR == 1 ) + char *pcRequestedName = NULL; +#endif +uint8_t *pucByte; +size_t uxSourceBytesRemaining; +uint16_t x, usDataLength, usQuestions; +BaseType_t xDoStore = xExpected; +#if( ipconfigUSE_LLMNR == 1 ) + uint16_t usType = 0, usClass = 0; +#endif +#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) + char pcName[ ipconfigDNS_CACHE_NAME_LENGTH ] = ""; +#endif + + /* Ensure that the buffer is of at least minimal DNS message length. */ + if( uxBufferLength < sizeof( DNSMessage_t ) ) + { + return dnsPARSE_ERROR; + } + + uxSourceBytesRemaining = uxBufferLength; + + /* Parse the DNS message header. */ + pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; + + /* Introduce a do {} while (0) to allow the use of breaks. */ + do + { + /* Start at the first byte after the header. */ + pucByte = pucUDPPayloadBuffer + sizeof( DNSMessage_t ); + uxSourceBytesRemaining -= sizeof( DNSMessage_t ); + + /* Skip any question records. */ + usQuestions = FreeRTOS_ntohs( pxDNSMessageHeader->usQuestions ); + + for( x = 0; x < usQuestions; x++ ) + { + #if( ipconfigUSE_LLMNR == 1 ) + { + if( x == 0 ) + { + pcRequestedName = ( char * ) pucByte; + } + } + #endif + +#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) + if( x == 0 ) + { + pucByte = prvReadNameField( pucByte, + uxSourceBytesRemaining, + pcName, + sizeof( pcName ) ); + + /* Check for a malformed response. */ + if( NULL == pucByte ) + { + return dnsPARSE_ERROR; + } + + uxSourceBytesRemaining = ( pucUDPPayloadBuffer + uxBufferLength ) - pucByte; + } + else +#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */ + { + /* Skip the variable length pcName field. */ + pucByte = prvSkipNameField( pucByte, + uxSourceBytesRemaining ); + + /* Check for a malformed response. */ + if( NULL == pucByte ) + { + return dnsPARSE_ERROR; + } + + uxSourceBytesRemaining = ( size_t ) + ( pucUDPPayloadBuffer + uxBufferLength - pucByte ); + } + + /* Check the remaining buffer size. */ + if( uxSourceBytesRemaining >= sizeof( uint32_t ) ) + { + #if( ipconfigUSE_LLMNR == 1 ) + { + /* usChar2u16 returns value in host endianness. */ + usType = usChar2u16( pucByte ); + usClass = usChar2u16( pucByte + 2 ); + } + #endif /* ipconfigUSE_LLMNR */ + + /* Skip the type and class fields. */ + pucByte += sizeof( uint32_t ); + uxSourceBytesRemaining -= sizeof( uint32_t ); + } + else + { + /* Malformed response. */ + return dnsPARSE_ERROR; + } + } + + /* Search through the answer records. */ + pxDNSMessageHeader->usAnswers = FreeRTOS_ntohs( pxDNSMessageHeader->usAnswers ); + + if( ( pxDNSMessageHeader->usFlags & dnsRX_FLAGS_MASK ) == dnsEXPECTED_RX_FLAGS ) + { + for( x = 0; x < pxDNSMessageHeader->usAnswers; x++ ) + { + pucByte = prvSkipNameField( pucByte, + uxSourceBytesRemaining ); + + /* Check for a malformed response. */ + if( NULL == pucByte ) + { + return dnsPARSE_ERROR; + } + + uxSourceBytesRemaining = ( size_t ) + ( pucUDPPayloadBuffer + uxBufferLength - pucByte ); + + /* Is there enough data for an IPv4 A record answer and, if so, + is this an A record? */ + if( ( uxSourceBytesRemaining >= ( sizeof( DNSAnswerRecord_t ) + sizeof( uint32_t ) ) ) && + ( usChar2u16( pucByte ) == dnsTYPE_A_HOST ) ) + { + /* This is the required record type and is of sufficient size. */ + pxDNSAnswerRecord = ( DNSAnswerRecord_t * ) pucByte; + + /* Sanity check the data length of an IPv4 answer. */ + if( FreeRTOS_ntohs( pxDNSAnswerRecord->usDataLength ) == sizeof( uint32_t ) ) + { + /* Copy the IP address out of the record. */ + memcpy( &ulIPAddress, + pucByte + sizeof( DNSAnswerRecord_t ), + sizeof( uint32_t ) ); + + #if( ipconfigDNS_USE_CALLBACKS == 1 ) + { + /* See if any asynchronous call was made to FreeRTOS_gethostbyname_a() */ + if( xDNSDoCallback( ( TickType_t ) pxDNSMessageHeader->usIdentifier, pcName, ulIPAddress ) != pdFALSE ) + { + /* This device has requested this DNS look-up. + The result may be stored in the DNS cache. */ + xDoStore = pdTRUE; + } + } + #endif /* ipconfigDNS_USE_CALLBACKS == 1 */ + #if( ipconfigUSE_DNS_CACHE == 1 ) + { + /* The reply will only be stored in the DNS cache when the + request was issued by this device. */ + if( xDoStore != pdFALSE ) + { + prvProcessDNSCache( pcName, &ulIPAddress, pxDNSAnswerRecord->ulTTL, pdFALSE ); + } + + /* Show what has happened. */ + FreeRTOS_printf( ( "DNS[0x%04X]: The answer to '%s' (%xip) will%s be stored\n", + ( unsigned ) pxDNSMessageHeader->usIdentifier, + pcName, + ( unsigned ) FreeRTOS_ntohl( ulIPAddress ), + ( xDoStore != 0 ) ? "" : " NOT" ) ); + } + #endif /* ipconfigUSE_DNS_CACHE */ + } + + pucByte += sizeof( DNSAnswerRecord_t ) + sizeof( uint32_t ); + uxSourceBytesRemaining -= ( sizeof( DNSAnswerRecord_t ) + sizeof( uint32_t ) ); + break; + } + else if( uxSourceBytesRemaining >= sizeof( DNSAnswerRecord_t ) ) + { + /* It's not an A record, so skip it. Get the header location + and then jump over the header. */ + pxDNSAnswerRecord = ( DNSAnswerRecord_t * ) pucByte; + pucByte += sizeof( DNSAnswerRecord_t ); + uxSourceBytesRemaining -= sizeof( DNSAnswerRecord_t ); + + /* Determine the length of the answer data from the header. */ + usDataLength = FreeRTOS_ntohs( pxDNSAnswerRecord->usDataLength ); + + /* Jump over the answer. */ + if( uxSourceBytesRemaining >= usDataLength ) + { + pucByte += usDataLength; + uxSourceBytesRemaining -= usDataLength; + } + else + { + /* Malformed response. */ + return dnsPARSE_ERROR; + } + } + } + } + +#if( ipconfigUSE_LLMNR == 1 ) + else if( usQuestions && ( usType == dnsTYPE_A_HOST ) && ( usClass == dnsCLASS_IN ) ) + { + /* If this is not a reply to our DNS request, it might an LLMNR + request. */ + if( xApplicationDNSQueryHook( ( pcRequestedName + 1 ) ) ) + { + int16_t usLength; + NetworkBufferDescriptor_t *pxNewBuffer = NULL; + NetworkBufferDescriptor_t *pxNetworkBuffer = pxUDPPayloadBuffer_to_NetworkBuffer( pucUDPPayloadBuffer ); + LLMNRAnswer_t *pxAnswer; + + if( ( xBufferAllocFixedSize == pdFALSE ) && ( pxNetworkBuffer != NULL ) ) + { + BaseType_t xDataLength = uxBufferLength + sizeof( UDPHeader_t ) + sizeof( EthernetHeader_t ) + sizeof( IPHeader_t ); + + /* Set the size of the outgoing packet. */ + pxNetworkBuffer->xDataLength = xDataLength; + pxNewBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, xDataLength + sizeof( LLMNRAnswer_t ) ); + + if( pxNewBuffer != NULL ) + { + BaseType_t xOffset1, xOffset2; + + xOffset1 = ( BaseType_t ) ( pucByte - pucUDPPayloadBuffer ); + xOffset2 = ( BaseType_t ) ( ( ( uint8_t * ) pcRequestedName ) - pucUDPPayloadBuffer ); + + pxNetworkBuffer = pxNewBuffer; + pucUDPPayloadBuffer = pxNetworkBuffer->pucEthernetBuffer + ipUDP_PAYLOAD_OFFSET_IPv4; + + pucByte = pucUDPPayloadBuffer + xOffset1; + pcRequestedName = ( char * ) ( pucUDPPayloadBuffer + xOffset2 ); + pxDNSMessageHeader = ( DNSMessage_t * ) pucUDPPayloadBuffer; + } + else + { + /* Just to indicate that the message may not be answered. */ + pxNetworkBuffer = NULL; + } + } + + if( pxNetworkBuffer != NULL ) + { + pxAnswer = ( LLMNRAnswer_t * ) pucByte; + + /* We leave 'usIdentifier' and 'usQuestions' untouched */ + vSetField16( pxDNSMessageHeader, DNSMessage_t, usFlags, dnsLLMNR_FLAGS_IS_REPONSE ); /* Set the response flag */ + vSetField16( pxDNSMessageHeader, DNSMessage_t, usAnswers, 1 ); /* Provide a single answer */ + vSetField16( pxDNSMessageHeader, DNSMessage_t, usAuthorityRRs, 0 ); /* No authority */ + vSetField16( pxDNSMessageHeader, DNSMessage_t, usAdditionalRRs, 0 ); /* No additional info */ + + pxAnswer->ucNameCode = dnsNAME_IS_OFFSET; + pxAnswer->ucNameOffset = ( uint8_t ) ( pcRequestedName - ( char * ) pucUDPPayloadBuffer ); + + vSetField16( pxAnswer, LLMNRAnswer_t, usType, dnsTYPE_A_HOST ); /* Type A: host */ + vSetField16( pxAnswer, LLMNRAnswer_t, usClass, dnsCLASS_IN ); /* 1: Class IN */ + vSetField32( pxAnswer, LLMNRAnswer_t, ulTTL, dnsLLMNR_TTL_VALUE ); + vSetField16( pxAnswer, LLMNRAnswer_t, usDataLength, 4 ); + vSetField32( pxAnswer, LLMNRAnswer_t, ulIPAddress, FreeRTOS_ntohl( *ipLOCAL_IP_ADDRESS_POINTER ) ); + + usLength = ( int16_t ) ( sizeof( *pxAnswer ) + ( size_t ) ( pucByte - pucUDPPayloadBuffer ) ); + + prvReplyDNSMessage( pxNetworkBuffer, usLength ); + + if( pxNewBuffer != NULL ) + { + vReleaseNetworkBufferAndDescriptor( pxNewBuffer ); + } + } + } + } +#endif /* ipconfigUSE_LLMNR == 1 */ + } while( 0 ); + + if( xExpected == pdFALSE ) + { + /* Do not return a valid IP-address in case the reply was not expected. */ + ulIPAddress = 0uL; + } + + return ulIPAddress; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_NBNS == 1 ) + + static void prvTreatNBNS( uint8_t *pucUDPPayloadBuffer, + size_t uxBufferLength, + uint32_t ulIPAddress ) + { + uint16_t usFlags, usType, usClass; + uint8_t *pucSource, *pucTarget; + uint8_t ucByte; + uint8_t ucNBNSName[ 17 ]; + + /* Check for minimum buffer size. */ + if( uxBufferLength < sizeof( NBNSRequest_t ) ) + { + return; + } + + /* Read the request flags in host endianness. */ + usFlags = usChar2u16( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usFlags ) ); + + if( ( usFlags & dnsNBNS_FLAGS_OPCODE_MASK ) == dnsNBNS_FLAGS_OPCODE_QUERY ) + { + usType = usChar2u16( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usType ) ); + usClass = usChar2u16( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usClass ) ); + + /* Not used for now */ + ( void ) usClass; + + /* For NBNS a name is 16 bytes long, written with capitals only. + Make sure that the copy is terminated with a zero. */ + pucTarget = ucNBNSName + sizeof( ucNBNSName ) - 2; + pucTarget[ 1 ] = '\0'; + + /* Start with decoding the last 2 bytes. */ + pucSource = pucUDPPayloadBuffer + ( offsetof( NBNSRequest_t, ucName ) + ( dnsNBNS_ENCODED_NAME_LENGTH - 2 ) ); + + for( ;; ) + { + ucByte = ( uint8_t ) ( ( ( pucSource[ 0 ] - 0x41 ) << 4 ) | ( pucSource[ 1 ] - 0x41 ) ); + + /* Make sure there are no trailing spaces in the name. */ + if( ( ucByte == ' ' ) && ( pucTarget[ 1 ] == '\0' ) ) + { + ucByte = '\0'; + } + + *pucTarget = ucByte; + + if( pucTarget == ucNBNSName ) + { + break; + } + + pucTarget -= 1; + pucSource -= 2; + } + + #if( ipconfigUSE_DNS_CACHE == 1 ) + { + if( ( usFlags & dnsNBNS_FLAGS_RESPONSE ) != 0 ) + { + /* If this is a response from another device, + add the name to the DNS cache */ + prvProcessDNSCache( ( char * ) ucNBNSName, &ulIPAddress, 0, pdFALSE ); + } + } + #else + { + /* Avoid compiler warnings. */ + ( void ) ulIPAddress; + } + #endif /* ipconfigUSE_DNS_CACHE */ + + if( ( ( usFlags & dnsNBNS_FLAGS_RESPONSE ) == 0 ) && + ( usType == dnsNBNS_TYPE_NET_BIOS ) && + ( xApplicationDNSQueryHook( ( const char * ) ucNBNSName ) != pdFALSE ) ) + { + uint16_t usLength; + DNSMessage_t *pxMessage; + NBNSAnswer_t *pxAnswer; + + /* Someone is looking for a device with ucNBNSName, + prepare a positive reply. */ + NetworkBufferDescriptor_t *pxNetworkBuffer = pxUDPPayloadBuffer_to_NetworkBuffer( pucUDPPayloadBuffer ); + + if( ( xBufferAllocFixedSize == pdFALSE ) && ( pxNetworkBuffer != NULL ) ) + { + NetworkBufferDescriptor_t *pxNewBuffer; + + /* The field xDataLength was set to the total length of the UDP packet, + i.e. the payload size plus sizeof( UDPPacket_t ). */ + pxNewBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, pxNetworkBuffer->xDataLength + sizeof( NBNSAnswer_t ) ); + + if( pxNewBuffer != NULL ) + { + pucUDPPayloadBuffer = pxNewBuffer->pucEthernetBuffer + sizeof( UDPPacket_t ); + pxNetworkBuffer = pxNewBuffer; + } + else + { + /* Just prevent that a reply will be sent */ + pxNetworkBuffer = NULL; + } + } + + /* Should not occur: pucUDPPayloadBuffer is part of a xNetworkBufferDescriptor */ + if( pxNetworkBuffer != NULL ) + { + pxMessage = ( DNSMessage_t * ) pucUDPPayloadBuffer; + + /* As the fields in the structures are not word-aligned, we have to + copy the values byte-by-byte using macro's vSetField16() and vSetField32() */ + vSetField16( pxMessage, DNSMessage_t, usFlags, dnsNBNS_QUERY_RESPONSE_FLAGS ); /* 0x8500 */ + vSetField16( pxMessage, DNSMessage_t, usQuestions, 0 ); + vSetField16( pxMessage, DNSMessage_t, usAnswers, 1 ); + vSetField16( pxMessage, DNSMessage_t, usAuthorityRRs, 0 ); + vSetField16( pxMessage, DNSMessage_t, usAdditionalRRs, 0 ); + + pxAnswer = ( NBNSAnswer_t * ) ( pucUDPPayloadBuffer + offsetof( NBNSRequest_t, usType ) ); + + vSetField16( pxAnswer, NBNSAnswer_t, usType, usType ); /* Type */ + vSetField16( pxAnswer, NBNSAnswer_t, usClass, dnsNBNS_CLASS_IN ); /* Class */ + vSetField32( pxAnswer, NBNSAnswer_t, ulTTL, dnsNBNS_TTL_VALUE ); + vSetField16( pxAnswer, NBNSAnswer_t, usDataLength, 6 ); /* 6 bytes including the length field */ + vSetField16( pxAnswer, NBNSAnswer_t, usNbFlags, dnsNBNS_NAME_FLAGS ); + vSetField32( pxAnswer, NBNSAnswer_t, ulIPAddress, FreeRTOS_ntohl( *ipLOCAL_IP_ADDRESS_POINTER ) ); + + usLength = ( uint16_t ) ( offsetof( NBNSRequest_t, usType ) + sizeof( NBNSAnswer_t ) ); + + prvReplyDNSMessage( pxNetworkBuffer, usLength ); + } + } + } + } + +#endif /* ipconfigUSE_NBNS */ +/*-----------------------------------------------------------*/ + +static Socket_t prvCreateDNSSocket( void ) +{ +Socket_t xSocket = NULL; +struct freertos_sockaddr xAddress; +BaseType_t xReturn; + + /* This must be the first time this function has been called. Create + the socket. */ + xSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP ); + + /* Auto bind the port. */ + xAddress.sin_port = 0u; + xReturn = FreeRTOS_bind( xSocket, &xAddress, sizeof( xAddress ) ); + + /* Check the bind was successful, and clean up if not. */ + if( xReturn != 0 ) + { + FreeRTOS_closesocket( xSocket ); + xSocket = NULL; + } + else + { + /* The send and receive timeouts will be set later on. */ + } + + return xSocket; +} +/*-----------------------------------------------------------*/ + +#if( ( ipconfigUSE_NBNS == 1 ) || ( ipconfigUSE_LLMNR == 1 ) ) + + static void prvReplyDNSMessage( NetworkBufferDescriptor_t *pxNetworkBuffer, + BaseType_t lNetLength ) + { + UDPPacket_t *pxUDPPacket; + IPHeader_t *pxIPHeader; + UDPHeader_t *pxUDPHeader; + + pxUDPPacket = ( UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; + pxIPHeader = &pxUDPPacket->xIPHeader; + pxUDPHeader = &pxUDPPacket->xUDPHeader; + /* HT: started using defines like 'ipSIZE_OF_xxx' */ + pxIPHeader->usLength = FreeRTOS_htons( lNetLength + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_UDP_HEADER ); + /* HT:endian: should not be translated, copying from packet to packet */ + pxIPHeader->ulDestinationIPAddress = pxIPHeader->ulSourceIPAddress; + pxIPHeader->ulSourceIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; + pxIPHeader->ucTimeToLive = ipconfigUDP_TIME_TO_LIVE; + pxIPHeader->usIdentification = FreeRTOS_htons( usPacketIdentifier ); + usPacketIdentifier++; + pxUDPHeader->usLength = FreeRTOS_htons( lNetLength + ipSIZE_OF_UDP_HEADER ); + vFlip_16( pxUDPPacket->xUDPHeader.usSourcePort, pxUDPPacket->xUDPHeader.usDestinationPort ); + + /* Important: tell NIC driver how many bytes must be sent */ + pxNetworkBuffer->xDataLength = ( size_t ) ( lNetLength + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_UDP_HEADER + ipSIZE_OF_ETH_HEADER ); + + #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) + { + /* calculate the IP header checksum */ + pxIPHeader->usHeaderChecksum = 0x00; + pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0uL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); + pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); + + /* calculate the UDP checksum for outgoing package */ + usGenerateProtocolChecksum( ( uint8_t* ) pxUDPPacket, pxNetworkBuffer->xDataLength, pdTRUE ); + } + #endif + + /* This function will fill in the eth addresses and send the packet */ + vReturnEthernetFrame( pxNetworkBuffer, pdFALSE ); + } + +#endif /* ipconfigUSE_NBNS == 1 || ipconfigUSE_LLMNR == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_DNS_CACHE == 1 ) + + static void prvProcessDNSCache( const char *pcName, + uint32_t *pulIP, + uint32_t ulTTL, + BaseType_t xLookUp ) + { + BaseType_t x; + BaseType_t xFound = pdFALSE; + uint32_t ulCurrentTimeSeconds = ( xTaskGetTickCount() / portTICK_PERIOD_MS ) / 1000; + static BaseType_t xFreeEntry = 0; + configASSERT(pcName); + + /* For each entry in the DNS cache table. */ + for( x = 0; x < ipconfigDNS_CACHE_ENTRIES; x++ ) + { + if( xDNSCache[ x ].pcName[ 0 ] == 0 ) + { + continue; + } + + if( 0 == strcmp( xDNSCache[ x ].pcName, pcName ) ) + { + /* Is this function called for a lookup or to add/update an IP address? */ + if( xLookUp != pdFALSE ) + { + /* Confirm that the record is still fresh. */ + if( ulCurrentTimeSeconds < ( xDNSCache[ x ].ulTimeWhenAddedInSeconds + FreeRTOS_ntohl( xDNSCache[ x ].ulTTL ) ) ) + { + *pulIP = xDNSCache[ x ].ulIPAddress; + } + else + { + /* Age out the old cached record. */ + xDNSCache[ x ].pcName[ 0 ] = 0; + } + } + else + { + xDNSCache[ x ].ulIPAddress = *pulIP; + xDNSCache[ x ].ulTTL = ulTTL; + xDNSCache[ x ].ulTimeWhenAddedInSeconds = ulCurrentTimeSeconds; + } + + xFound = pdTRUE; + break; + } + } + + if( xFound == pdFALSE ) + { + if( xLookUp != pdFALSE ) + { + *pulIP = 0; + } + else + { + /* Add or update the item. */ + if( strlen( pcName ) < ipconfigDNS_CACHE_NAME_LENGTH ) + { + strcpy( xDNSCache[ xFreeEntry ].pcName, pcName ); + + xDNSCache[ xFreeEntry ].ulIPAddress = *pulIP; + xDNSCache[ xFreeEntry ].ulTTL = ulTTL; + xDNSCache[ xFreeEntry ].ulTimeWhenAddedInSeconds = ulCurrentTimeSeconds; + + xFreeEntry++; + + if( xFreeEntry == ipconfigDNS_CACHE_ENTRIES ) + { + xFreeEntry = 0; + } + } + } + } + + if( ( xLookUp == 0 ) || ( *pulIP != 0 ) ) + { + FreeRTOS_debug_printf( ( "prvProcessDNSCache: %s: '%s' @ %lxip\n", xLookUp ? "look-up" : "add", pcName, FreeRTOS_ntohl( *pulIP ) ) ); + } + } + +#endif /* ipconfigUSE_DNS_CACHE */ + +#endif /* ipconfigUSE_DNS != 0 */ + +/*-----------------------------------------------------------*/ + +/* Provide access to private members for testing. */ +#ifdef AMAZON_FREERTOS_ENABLE_UNIT_TESTS + #include "iot_freertos_tcp_test_access_dns_define.h" +#endif + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c index c94f55dd7..48e632a01 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c @@ -1,2337 +1,2337 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_ARP.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_TCP_IP.h" -#include "FreeRTOS_DHCP.h" -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" -#include "FreeRTOS_DNS.h" - - -/* Used to ensure the structure packing is having the desired effect. The -'volatile' is used to prevent compiler warnings about comparing a constant with -a constant. */ -#define ipEXPECTED_EthernetHeader_t_SIZE ( ( size_t ) 14 ) -#define ipEXPECTED_ARPHeader_t_SIZE ( ( size_t ) 28 ) -#define ipEXPECTED_IPHeader_t_SIZE ( ( size_t ) 20 ) -#define ipEXPECTED_IGMPHeader__SIZE ( ( size_t ) 8 ) -#define ipEXPECTED_ICMPHeader_t_SIZE ( ( size_t ) 8 ) -#define ipEXPECTED_UDPHeader_t_SIZE ( ( size_t ) 8 ) -#define ipEXPECTED_TCPHeader_t_SIZE ( ( size_t ) 20 ) - - -/* ICMP protocol definitions. */ -#define ipICMP_ECHO_REQUEST ( ( uint8_t ) 8 ) -#define ipICMP_ECHO_REPLY ( ( uint8_t ) 0 ) - - -/* Time delay between repeated attempts to initialise the network hardware. */ -#ifndef ipINITIALISATION_RETRY_DELAY - #define ipINITIALISATION_RETRY_DELAY ( pdMS_TO_TICKS( 3000 ) ) -#endif - -/* Defines how often the ARP timer callback function is executed. The time is -shorted in the Windows simulator as simulated time is not real time. */ -#ifndef ipARP_TIMER_PERIOD_MS - #ifdef _WINDOWS_ - #define ipARP_TIMER_PERIOD_MS ( 500 ) /* For windows simulator builds. */ - #else - #define ipARP_TIMER_PERIOD_MS ( 10000 ) - #endif -#endif - -#ifndef iptraceIP_TASK_STARTING - #define iptraceIP_TASK_STARTING() do {} while( 0 ) -#endif - -#if( ( ipconfigUSE_TCP == 1 ) && !defined( ipTCP_TIMER_PERIOD_MS ) ) - /* When initialising the TCP timer, - give it an initial time-out of 1 second. */ - #define ipTCP_TIMER_PERIOD_MS ( 1000 ) -#endif - -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet -driver will filter incoming packets and only pass the stack those packets it -considers need processing. In this case ipCONSIDER_FRAME_FOR_PROCESSING() can -be #defined away. If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 0 -then the Ethernet driver will pass all received packets to the stack, and the -stack must do the filtering itself. In this case ipCONSIDER_FRAME_FOR_PROCESSING -needs to call eConsiderFrameForProcessing. */ -#if ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#else - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#endif - -/* The character used to fill ICMP echo requests, and therefore also the -character expected to fill ICMP echo replies. */ -#define ipECHO_DATA_FILL_BYTE 'x' - -#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) - /* The bits in the two byte IP header field that make up the fragment offset value. */ - #define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0xff0f ) -#else - /* The bits in the two byte IP header field that make up the fragment offset value. */ - #define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff ) -#endif /* ipconfigBYTE_ORDER */ - -/* The maximum time the IP task is allowed to remain in the Blocked state if no -events are posted to the network event queue. */ -#ifndef ipconfigMAX_IP_TASK_SLEEP_TIME - #define ipconfigMAX_IP_TASK_SLEEP_TIME ( pdMS_TO_TICKS( 10000UL ) ) -#endif - -/* When a new TCP connection is established, the value of -'ulNextInitialSequenceNumber' will be used as the initial sequence number. It -is very important that at start-up, 'ulNextInitialSequenceNumber' contains a -random value. Also its value must be increased continuously in time, to prevent -a third party guessing the next sequence number and take-over a TCP connection. -It is advised to increment it by 1 ever 4us, which makes about 256 times -per ms: */ -#define ipINITIAL_SEQUENCE_NUMBER_FACTOR 256UL - -/* Returned as the (invalid) checksum when the protocol being checked is not -handled. The value is chosen simply to be easy to spot when debugging. */ -#define ipUNHANDLED_PROTOCOL 0x4321u - -/* Returned to indicate a valid checksum when the checksum does not need to be -calculated. */ -#define ipCORRECT_CRC 0xffffu - -/* Returned as the (invalid) checksum when the length of the data being checked -had an invalid length. */ -#define ipINVALID_LENGTH 0x1234u - -/*-----------------------------------------------------------*/ - -typedef struct xIP_TIMER -{ - uint32_t - bActive : 1, /* This timer is running and must be processed. */ - bExpired : 1; /* Timer has expired and a task must be processed. */ - TimeOut_t xTimeOut; - TickType_t ulRemainingTime; - TickType_t ulReloadTime; -} IPTimer_t; - -/* Used in checksum calculation. */ -typedef union _xUnion32 -{ - uint32_t u32; - uint16_t u16[ 2 ]; - uint8_t u8[ 4 ]; -} xUnion32; - -/* Used in checksum calculation. */ -typedef union _xUnionPtr -{ - uint32_t *u32ptr; - uint16_t *u16ptr; - uint8_t *u8ptr; -} xUnionPtr; - -/*-----------------------------------------------------------*/ - -/* - * The main TCP/IP stack processing task. This task receives commands/events - * from the network hardware drivers and tasks that are using sockets. It also - * maintains a set of protocol timers. - */ -static void prvIPTask( void *pvParameters ); - -/* - * Called when new data is available from the network interface. - */ -static void prvProcessEthernetPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ); - -/* - * Process incoming IP packets. - */ -static eFrameProcessingResult_t prvProcessIPPacket( IPPacket_t * const pxIPPacket, NetworkBufferDescriptor_t * const pxNetworkBuffer ); - -#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - /* - * Process incoming ICMP packets. - */ - static eFrameProcessingResult_t prvProcessICMPPacket( ICMPPacket_t * const pxICMPPacket ); -#endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */ - -/* - * Turns around an incoming ping request to convert it into a ping reply. - */ -#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) - static eFrameProcessingResult_t prvProcessICMPEchoRequest( ICMPPacket_t * const pxICMPPacket ); -#endif /* ipconfigREPLY_TO_INCOMING_PINGS */ - -/* - * Processes incoming ping replies. The application callback function - * vApplicationPingReplyHook() is called with the results. - */ -#if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - static void prvProcessICMPEchoReply( ICMPPacket_t * const pxICMPPacket ); -#endif /* ipconfigSUPPORT_OUTGOING_PINGS */ - -/* - * Called to create a network connection when the stack is first started, or - * when the network connection is lost. - */ -static void prvProcessNetworkDownEvent( void ); - -/* - * Checks the ARP, DHCP and TCP timers to see if any periodic or timeout - * processing is required. - */ -static void prvCheckNetworkTimers( void ); - -/* - * Determine how long the IP task can sleep for, which depends on when the next - * periodic or timeout processing must be performed. - */ -static TickType_t prvCalculateSleepTime( void ); - -/* - * The network card driver has received a packet. In the case that it is part - * of a linked packet chain, walk through it to handle every message. - */ -static void prvHandleEthernetPacket( NetworkBufferDescriptor_t *pxBuffer ); - -/* - * Utility functions for the light weight IP timers. - */ -static void prvIPTimerStart( IPTimer_t *pxTimer, TickType_t xTime ); -static BaseType_t prvIPTimerCheck( IPTimer_t *pxTimer ); -static void prvIPTimerReload( IPTimer_t *pxTimer, TickType_t xTime ); - -static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPPacket, - NetworkBufferDescriptor_t * const pxNetworkBuffer, UBaseType_t uxHeaderLength ); - -/*-----------------------------------------------------------*/ - -/* The queue used to pass events into the IP-task for processing. */ -QueueHandle_t xNetworkEventQueue = NULL; - -/*_RB_ Requires comment. */ -uint16_t usPacketIdentifier = 0U; - -/* For convenience, a MAC address of all 0xffs is defined const for quick -reference. */ -const MACAddress_t xBroadcastMACAddress = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; - -/* Structure that stores the netmask, gateway address and DNS server addresses. */ -NetworkAddressingParameters_t xNetworkAddressing = { 0, 0, 0, 0, 0 }; - -/* Default values for the above struct in case DHCP -does not lead to a confirmed request. */ -NetworkAddressingParameters_t xDefaultAddressing = { 0, 0, 0, 0, 0 }; - -/* Used to ensure network down events cannot be missed when they cannot be -posted to the network event queue because the network event queue is already -full. */ -static BaseType_t xNetworkDownEventPending = pdFALSE; - -/* Stores the handle of the task that handles the stack. The handle is used -(indirectly) by some utility function to determine if the utility function is -being called by a task (in which case it is ok to block) or by the IP task -itself (in which case it is not ok to block). */ -static TaskHandle_t xIPTaskHandle = NULL; - -#if( ipconfigUSE_TCP != 0 ) - /* Set to a non-zero value if one or more TCP message have been processed - within the last round. */ - static BaseType_t xProcessedTCPMessage; -#endif - -/* Simple set to pdTRUE or pdFALSE depending on whether the network is up or -down (connected, not connected) respectively. */ -static BaseType_t xNetworkUp = pdFALSE; - -/* -A timer for each of the following processes, all of which need attention on a -regular basis: - 1. ARP, to check its table entries - 2. DPHC, to send requests and to renew a reservation - 3. TCP, to check for timeouts, resends - 4. DNS, to check for timeouts when looking-up a domain. - */ -static IPTimer_t xARPTimer; -#if( ipconfigUSE_DHCP != 0 ) - static IPTimer_t xDHCPTimer; -#endif -#if( ipconfigUSE_TCP != 0 ) - static IPTimer_t xTCPTimer; -#endif -#if( ipconfigDNS_USE_CALLBACKS != 0 ) - static IPTimer_t xDNSTimer; -#endif - -/* Set to pdTRUE when the IP task is ready to start processing packets. */ -static BaseType_t xIPTaskInitialised = pdFALSE; - -#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - /* Keep track of the lowest amount of space in 'xNetworkEventQueue'. */ - static UBaseType_t uxQueueMinimumSpace = ipconfigEVENT_QUEUE_LENGTH; -#endif - -/*-----------------------------------------------------------*/ - -static void prvIPTask( void *pvParameters ) -{ -IPStackEvent_t xReceivedEvent; -TickType_t xNextIPSleep; -FreeRTOS_Socket_t *pxSocket; -struct freertos_sockaddr xAddress; - - /* Just to prevent compiler warnings about unused parameters. */ - ( void ) pvParameters; - - /* A possibility to set some additional task properties. */ - iptraceIP_TASK_STARTING(); - - /* Generate a dummy message to say that the network connection has gone - down. This will cause this task to initialise the network interface. After - this it is the responsibility of the network interface hardware driver to - send this message if a previously connected network is disconnected. */ - FreeRTOS_NetworkDown(); - - #if( ipconfigUSE_TCP == 1 ) - { - /* Initialise the TCP timer. */ - prvIPTimerReload( &xTCPTimer, pdMS_TO_TICKS( ipTCP_TIMER_PERIOD_MS ) ); - } - #endif - - /* Initialisation is complete and events can now be processed. */ - xIPTaskInitialised = pdTRUE; - - FreeRTOS_debug_printf( ( "prvIPTask started\n" ) ); - - /* Loop, processing IP events. */ - for( ;; ) - { - ipconfigWATCHDOG_TIMER(); - - /* Check the ARP, DHCP and TCP timers to see if there is any periodic - or timeout processing to perform. */ - prvCheckNetworkTimers(); - - /* Calculate the acceptable maximum sleep time. */ - xNextIPSleep = prvCalculateSleepTime(); - - /* Wait until there is something to do. If the following call exits - * due to a time out rather than a message being received, set a - * 'NoEvent' value. */ - if ( xQueueReceive( xNetworkEventQueue, ( void * ) &xReceivedEvent, xNextIPSleep ) == pdFALSE ) - { - xReceivedEvent.eEventType = eNoEvent; - } - - #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - if( xReceivedEvent.eEventType != eNoEvent ) - { - UBaseType_t uxCount; - - uxCount = uxQueueSpacesAvailable( xNetworkEventQueue ); - if( uxQueueMinimumSpace > uxCount ) - { - uxQueueMinimumSpace = uxCount; - } - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - - iptraceNETWORK_EVENT_RECEIVED( xReceivedEvent.eEventType ); - - switch( xReceivedEvent.eEventType ) - { - case eNetworkDownEvent : - /* Attempt to establish a connection. */ - xNetworkUp = pdFALSE; - prvProcessNetworkDownEvent(); - break; - - case eNetworkRxEvent: - /* The network hardware driver has received a new packet. A - pointer to the received buffer is located in the pvData member - of the received event structure. */ - prvHandleEthernetPacket( ( NetworkBufferDescriptor_t * ) ( xReceivedEvent.pvData ) ); - break; - - case eNetworkTxEvent: - /* Send a network packet. The ownership will be transferred to - the driver, which will release it after delivery. */ - xNetworkInterfaceOutput( ( NetworkBufferDescriptor_t * ) ( xReceivedEvent.pvData ), pdTRUE ); - break; - - case eARPTimerEvent : - /* The ARP timer has expired, process the ARP cache. */ - vARPAgeCache(); - break; - - case eSocketBindEvent: - /* FreeRTOS_bind (a user API) wants the IP-task to bind a socket - to a port. The port number is communicated in the socket field - usLocalPort. vSocketBind() will actually bind the socket and the - API will unblock as soon as the eSOCKET_BOUND event is - triggered. */ - pxSocket = ( FreeRTOS_Socket_t * ) ( xReceivedEvent.pvData ); - xAddress.sin_addr = 0u; /* For the moment. */ - xAddress.sin_port = FreeRTOS_ntohs( pxSocket->usLocalPort ); - pxSocket->usLocalPort = 0u; - vSocketBind( pxSocket, &xAddress, sizeof( xAddress ), pdFALSE ); - - /* Before 'eSocketBindEvent' was sent it was tested that - ( xEventGroup != NULL ) so it can be used now to wake up the - user. */ - pxSocket->xEventBits |= eSOCKET_BOUND; - vSocketWakeUpUser( pxSocket ); - break; - - case eSocketCloseEvent : - /* The user API FreeRTOS_closesocket() has sent a message to the - IP-task to actually close a socket. This is handled in - vSocketClose(). As the socket gets closed, there is no way to - report back to the API, so the API won't wait for the result */ - vSocketClose( ( FreeRTOS_Socket_t * ) ( xReceivedEvent.pvData ) ); - break; - - case eStackTxEvent : - /* The network stack has generated a packet to send. A - pointer to the generated buffer is located in the pvData - member of the received event structure. */ - vProcessGeneratedUDPPacket( ( NetworkBufferDescriptor_t * ) ( xReceivedEvent.pvData ) ); - break; - - case eDHCPEvent: - /* The DHCP state machine needs processing. */ - #if( ipconfigUSE_DHCP == 1 ) - { - vDHCPProcess( pdFALSE ); - } - #endif /* ipconfigUSE_DHCP */ - break; - - case eSocketSelectEvent : - /* FreeRTOS_select() has got unblocked by a socket event, - vSocketSelect() will check which sockets actually have an event - and update the socket field xSocketBits. */ - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - { - vSocketSelect( ( SocketSelect_t * ) ( xReceivedEvent.pvData ) ); - } - #endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ - break; - - case eSocketSignalEvent : - #if( ipconfigSUPPORT_SIGNALS != 0 ) - { - /* Some task wants to signal the user of this socket in - order to interrupt a call to recv() or a call to select(). */ - FreeRTOS_SignalSocket( ( Socket_t ) xReceivedEvent.pvData ); - } - #endif /* ipconfigSUPPORT_SIGNALS */ - break; - - case eTCPTimerEvent : - #if( ipconfigUSE_TCP == 1 ) - { - /* Simply mark the TCP timer as expired so it gets processed - the next time prvCheckNetworkTimers() is called. */ - xTCPTimer.bExpired = pdTRUE_UNSIGNED; - } - #endif /* ipconfigUSE_TCP */ - break; - - case eTCPAcceptEvent: - /* The API FreeRTOS_accept() was called, the IP-task will now - check if the listening socket (communicated in pvData) actually - received a new connection. */ - #if( ipconfigUSE_TCP == 1 ) - { - pxSocket = ( FreeRTOS_Socket_t * ) ( xReceivedEvent.pvData ); - - if( xTCPCheckNewClient( pxSocket ) != pdFALSE ) - { - pxSocket->xEventBits |= eSOCKET_ACCEPT; - vSocketWakeUpUser( pxSocket ); - } - } - #endif /* ipconfigUSE_TCP */ - break; - - case eTCPNetStat: - /* FreeRTOS_netstat() was called to have the IP-task print an - overview of all sockets and their connections */ - #if( ( ipconfigUSE_TCP == 1 ) && ( ipconfigHAS_PRINTF == 1 ) ) - { - vTCPNetStat(); - } - #endif /* ipconfigUSE_TCP */ - break; - - default : - /* Should not get here. */ - break; - } - - if( xNetworkDownEventPending != pdFALSE ) - { - /* A network down event could not be posted to the network event - queue because the queue was full. Try posting again. */ - FreeRTOS_NetworkDown(); - } - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xIsCallingFromIPTask( void ) -{ -BaseType_t xReturn; - - if( xTaskGetCurrentTaskHandle() == xIPTaskHandle ) - { - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static void prvHandleEthernetPacket( NetworkBufferDescriptor_t *pxBuffer ) -{ - #if( ipconfigUSE_LINKED_RX_MESSAGES == 0 ) - { - /* When ipconfigUSE_LINKED_RX_MESSAGES is not set to 0 then only one - buffer will be sent at a time. This is the default way for +TCP to pass - messages from the MAC to the TCP/IP stack. */ - prvProcessEthernetPacket( pxBuffer ); - } - #else /* ipconfigUSE_LINKED_RX_MESSAGES */ - { - NetworkBufferDescriptor_t *pxNextBuffer; - - /* An optimisation that is useful when there is high network traffic. - Instead of passing received packets into the IP task one at a time the - network interface can chain received packets together and pass them into - the IP task in one go. The packets are chained using the pxNextBuffer - member. The loop below walks through the chain processing each packet - in the chain in turn. */ - do - { - /* Store a pointer to the buffer after pxBuffer for use later on. */ - pxNextBuffer = pxBuffer->pxNextBuffer; - - /* Make it NULL to avoid using it later on. */ - pxBuffer->pxNextBuffer = NULL; - - prvProcessEthernetPacket( pxBuffer ); - pxBuffer = pxNextBuffer; - - /* While there is another packet in the chain. */ - } while( pxBuffer != NULL ); - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ -} -/*-----------------------------------------------------------*/ - -static TickType_t prvCalculateSleepTime( void ) -{ -TickType_t xMaximumSleepTime; - - /* Start with the maximum sleep time, then check this against the remaining - time in any other timers that are active. */ - xMaximumSleepTime = ipconfigMAX_IP_TASK_SLEEP_TIME; - - if( xARPTimer.bActive != pdFALSE_UNSIGNED ) - { - if( xARPTimer.ulRemainingTime < xMaximumSleepTime ) - { - xMaximumSleepTime = xARPTimer.ulReloadTime; - } - } - - #if( ipconfigUSE_DHCP == 1 ) - { - if( xDHCPTimer.bActive != pdFALSE_UNSIGNED ) - { - if( xDHCPTimer.ulRemainingTime < xMaximumSleepTime ) - { - xMaximumSleepTime = xDHCPTimer.ulRemainingTime; - } - } - } - #endif /* ipconfigUSE_DHCP */ - - #if( ipconfigUSE_TCP == 1 ) - { - if( xTCPTimer.ulRemainingTime < xMaximumSleepTime ) - { - xMaximumSleepTime = xTCPTimer.ulRemainingTime; - } - } - #endif - - #if( ipconfigDNS_USE_CALLBACKS != 0 ) - { - if( xDNSTimer.bActive != pdFALSE ) - { - if( xDNSTimer.ulRemainingTime < xMaximumSleepTime ) - { - xMaximumSleepTime = xDNSTimer.ulRemainingTime; - } - } - } - #endif - - return xMaximumSleepTime; -} -/*-----------------------------------------------------------*/ - -static void prvCheckNetworkTimers( void ) -{ - /* Is it time for ARP processing? */ - if( prvIPTimerCheck( &xARPTimer ) != pdFALSE ) - { - xSendEventToIPTask( eARPTimerEvent ); - } - - #if( ipconfigUSE_DHCP == 1 ) - { - /* Is it time for DHCP processing? */ - if( prvIPTimerCheck( &xDHCPTimer ) != pdFALSE ) - { - xSendEventToIPTask( eDHCPEvent ); - } - } - #endif /* ipconfigUSE_DHCP */ - - #if( ipconfigDNS_USE_CALLBACKS != 0 ) - { - extern void vDNSCheckCallBack( void *pvSearchID ); - - /* Is it time for DNS processing? */ - if( prvIPTimerCheck( &xDNSTimer ) != pdFALSE ) - { - vDNSCheckCallBack( NULL ); - } - } - #endif /* ipconfigDNS_USE_CALLBACKS */ - - #if( ipconfigUSE_TCP == 1 ) - { - BaseType_t xWillSleep; - TickType_t xNextTime; - BaseType_t xCheckTCPSockets; - - if( uxQueueMessagesWaiting( xNetworkEventQueue ) == 0u ) - { - xWillSleep = pdTRUE; - } - else - { - xWillSleep = pdFALSE; - } - - /* Sockets need to be checked if the TCP timer has expired. */ - xCheckTCPSockets = prvIPTimerCheck( &xTCPTimer ); - - /* Sockets will also be checked if there are TCP messages but the - message queue is empty (indicated by xWillSleep being true). */ - if( ( xProcessedTCPMessage != pdFALSE ) && ( xWillSleep != pdFALSE ) ) - { - xCheckTCPSockets = pdTRUE; - } - - if( xCheckTCPSockets != pdFALSE ) - { - /* Attend to the sockets, returning the period after which the - check must be repeated. */ - xNextTime = xTCPTimerCheck( xWillSleep ); - prvIPTimerStart( &xTCPTimer, xNextTime ); - xProcessedTCPMessage = 0; - } - } - #endif /* ipconfigUSE_TCP == 1 */ -} -/*-----------------------------------------------------------*/ - -static void prvIPTimerStart( IPTimer_t *pxTimer, TickType_t xTime ) -{ - vTaskSetTimeOutState( &pxTimer->xTimeOut ); - pxTimer->ulRemainingTime = xTime; - - if( xTime == ( TickType_t ) 0 ) - { - pxTimer->bExpired = pdTRUE_UNSIGNED; - } - else - { - pxTimer->bExpired = pdFALSE_UNSIGNED; - } - - pxTimer->bActive = pdTRUE_UNSIGNED; -} -/*-----------------------------------------------------------*/ - -static void prvIPTimerReload( IPTimer_t *pxTimer, TickType_t xTime ) -{ - pxTimer->ulReloadTime = xTime; - prvIPTimerStart( pxTimer, xTime ); -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvIPTimerCheck( IPTimer_t *pxTimer ) -{ -BaseType_t xReturn; - - if( pxTimer->bActive == pdFALSE_UNSIGNED ) - { - /* The timer is not enabled. */ - xReturn = pdFALSE; - } - else - { - /* The timer might have set the bExpired flag already, if not, check the - value of xTimeOut against ulRemainingTime. */ - if( ( pxTimer->bExpired != pdFALSE_UNSIGNED ) || - ( xTaskCheckForTimeOut( &( pxTimer->xTimeOut ), &( pxTimer->ulRemainingTime ) ) != pdFALSE ) ) - { - prvIPTimerStart( pxTimer, pxTimer->ulReloadTime ); - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_NetworkDown( void ) -{ -static const IPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL }; -const TickType_t xDontBlock = ( TickType_t ) 0; - - /* Simply send the network task the appropriate event. */ - if( xSendEventStructToIPTask( &xNetworkDownEvent, xDontBlock ) != pdPASS ) - { - /* Could not send the message, so it is still pending. */ - xNetworkDownEventPending = pdTRUE; - } - else - { - /* Message was sent so it is not pending. */ - xNetworkDownEventPending = pdFALSE; - } - - iptraceNETWORK_DOWN(); -} -/*-----------------------------------------------------------*/ - -BaseType_t FreeRTOS_NetworkDownFromISR( void ) -{ -static const IPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL }; -BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - /* Simply send the network task the appropriate event. */ - if( xQueueSendToBackFromISR( xNetworkEventQueue, &xNetworkDownEvent, &xHigherPriorityTaskWoken ) != pdPASS ) - { - xNetworkDownEventPending = pdTRUE; - } - else - { - xNetworkDownEventPending = pdFALSE; - } - - iptraceNETWORK_DOWN(); - - return xHigherPriorityTaskWoken; -} -/*-----------------------------------------------------------*/ - -void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) -{ -NetworkBufferDescriptor_t *pxNetworkBuffer; -void *pvReturn; - - /* Cap the block time. The reason for this is explained where - ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS is defined (assuming an official - FreeRTOSIPConfig.h header file is being used). */ - if( xBlockTimeTicks > ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ) - { - xBlockTimeTicks = ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS; - } - - /* Obtain a network buffer with the required amount of storage. */ - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( sizeof( UDPPacket_t ) + xRequestedSizeBytes, xBlockTimeTicks ); - - if( pxNetworkBuffer != NULL ) - { - /* Set the actual packet size in case a bigger buffer was returned. */ - pxNetworkBuffer->xDataLength = sizeof( UDPPacket_t ) + xRequestedSizeBytes; - - /* Leave space for the UPD header. */ - pvReturn = ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ); - } - else - { - pvReturn = NULL; - } - - return ( void * ) pvReturn; -} -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t *pxDuplicateNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer, - size_t uxNewLength ) -{ -NetworkBufferDescriptor_t * pxNewBuffer; - - /* This function is only used when 'ipconfigZERO_COPY_TX_DRIVER' is set to 1. - The transmit routine wants to have ownership of the network buffer - descriptor, because it will pass the buffer straight to DMA. */ - pxNewBuffer = pxGetNetworkBufferWithDescriptor( uxNewLength, ( TickType_t ) 0 ); - - if( pxNewBuffer != NULL ) - { - /* Set the actual packet size in case a bigger buffer than requested - was returned. */ - pxNewBuffer->xDataLength = uxNewLength; - - /* Copy the original packet information. */ - pxNewBuffer->ulIPAddress = pxNetworkBuffer->ulIPAddress; - pxNewBuffer->usPort = pxNetworkBuffer->usPort; - pxNewBuffer->usBoundPort = pxNetworkBuffer->usBoundPort; - memcpy( pxNewBuffer->pucEthernetBuffer, pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength ); - } - - return pxNewBuffer; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) || ( ipconfigZERO_COPY_RX_DRIVER != 0 ) - - NetworkBufferDescriptor_t *pxPacketBuffer_to_NetworkBuffer( const void *pvBuffer ) - { - uint8_t *pucBuffer; - NetworkBufferDescriptor_t *pxResult; - - if( pvBuffer == NULL ) - { - pxResult = NULL; - } - else - { - /* Obtain the network buffer from the zero copy pointer. */ - pucBuffer = ( uint8_t * ) pvBuffer; - - /* The input here is a pointer to a payload buffer. Subtract the - size of the header in the network buffer, usually 8 + 2 bytes. */ - pucBuffer -= ipBUFFER_PADDING; - - /* Here a pointer was placed to the network descriptor. As a - pointer is dereferenced, make sure it is well aligned. */ - if( ( ( ( uint32_t ) pucBuffer ) & ( sizeof( pucBuffer ) - ( size_t ) 1 ) ) == ( uint32_t ) 0 ) - { - pxResult = * ( ( NetworkBufferDescriptor_t ** ) pucBuffer ); - } - else - { - pxResult = NULL; - } - } - - return pxResult; - } - -#endif /* ipconfigZERO_COPY_TX_DRIVER != 0 */ -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t *pxUDPPayloadBuffer_to_NetworkBuffer( void *pvBuffer ) -{ -uint8_t *pucBuffer; -NetworkBufferDescriptor_t *pxResult; - - if( pvBuffer == NULL ) - { - pxResult = NULL; - } - else - { - /* Obtain the network buffer from the zero copy pointer. */ - pucBuffer = ( uint8_t * ) pvBuffer; - - /* The input here is a pointer to a payload buffer. Subtract - the total size of a UDP/IP header plus the size of the header in - the network buffer, usually 8 + 2 bytes. */ - pucBuffer -= ( sizeof( UDPPacket_t ) + ipBUFFER_PADDING ); - - /* Here a pointer was placed to the network descriptor, - As a pointer is dereferenced, make sure it is well aligned */ - if( ( ( ( uint32_t ) pucBuffer ) & ( sizeof( pucBuffer ) - 1 ) ) == 0 ) - { - /* The following statement may trigger a: - warning: cast increases required alignment of target type [-Wcast-align]. - It has been confirmed though that the alignment is suitable. */ - pxResult = * ( ( NetworkBufferDescriptor_t ** ) pucBuffer ); - } - else - { - pxResult = NULL; - } - } - - return pxResult; -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_ReleaseUDPPayloadBuffer( void *pvBuffer ) -{ - vReleaseNetworkBufferAndDescriptor( pxUDPPayloadBuffer_to_NetworkBuffer( pvBuffer ) ); -} -/*-----------------------------------------------------------*/ - -/*_RB_ Should we add an error or assert if the task priorities are set such that the servers won't function as expected? */ -/*_HT_ There was a bug in FreeRTOS_TCP_IP.c that only occurred when the applications' priority was too high. - As that bug has been repaired, there is not an urgent reason to warn. - It is better though to use the advised priority scheme. */ -BaseType_t FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ) -{ -BaseType_t xReturn = pdFALSE; - - /* This function should only be called once. */ - configASSERT( xIPIsNetworkTaskReady() == pdFALSE ); - configASSERT( xNetworkEventQueue == NULL ); - configASSERT( xIPTaskHandle == NULL ); - - /* Check structure packing is correct. */ - configASSERT( sizeof( EthernetHeader_t ) == ipEXPECTED_EthernetHeader_t_SIZE ); - configASSERT( sizeof( ARPHeader_t ) == ipEXPECTED_ARPHeader_t_SIZE ); - configASSERT( sizeof( IPHeader_t ) == ipEXPECTED_IPHeader_t_SIZE ); - configASSERT( sizeof( ICMPHeader_t ) == ipEXPECTED_ICMPHeader_t_SIZE ); - configASSERT( sizeof( UDPHeader_t ) == ipEXPECTED_UDPHeader_t_SIZE ); - - /* Attempt to create the queue used to communicate with the IP task. */ - xNetworkEventQueue = xQueueCreate( ( UBaseType_t ) ipconfigEVENT_QUEUE_LENGTH, ( UBaseType_t ) sizeof( IPStackEvent_t ) ); - configASSERT( xNetworkEventQueue ); - - if( xNetworkEventQueue != NULL ) - { - #if ( configQUEUE_REGISTRY_SIZE > 0 ) - { - /* A queue registry is normally used to assist a kernel aware - debugger. If one is in use then it will be helpful for the debugger - to show information about the network event queue. */ - vQueueAddToRegistry( xNetworkEventQueue, "NetEvnt" ); - } - #endif /* configQUEUE_REGISTRY_SIZE */ - - if( xNetworkBuffersInitialise() == pdPASS ) - { - /* Store the local IP and MAC address. */ - xNetworkAddressing.ulDefaultIPAddress = FreeRTOS_inet_addr_quick( ucIPAddress[ 0 ], ucIPAddress[ 1 ], ucIPAddress[ 2 ], ucIPAddress[ 3 ] ); - xNetworkAddressing.ulNetMask = FreeRTOS_inet_addr_quick( ucNetMask[ 0 ], ucNetMask[ 1 ], ucNetMask[ 2 ], ucNetMask[ 3 ] ); - xNetworkAddressing.ulGatewayAddress = FreeRTOS_inet_addr_quick( ucGatewayAddress[ 0 ], ucGatewayAddress[ 1 ], ucGatewayAddress[ 2 ], ucGatewayAddress[ 3 ] ); - xNetworkAddressing.ulDNSServerAddress = FreeRTOS_inet_addr_quick( ucDNSServerAddress[ 0 ], ucDNSServerAddress[ 1 ], ucDNSServerAddress[ 2 ], ucDNSServerAddress[ 3 ] ); - xNetworkAddressing.ulBroadcastAddress = ( xNetworkAddressing.ulDefaultIPAddress & xNetworkAddressing.ulNetMask ) | ~xNetworkAddressing.ulNetMask; - - memcpy( &xDefaultAddressing, &xNetworkAddressing, sizeof( xDefaultAddressing ) ); - - #if ipconfigUSE_DHCP == 1 - { - /* The IP address is not set until DHCP completes. */ - *ipLOCAL_IP_ADDRESS_POINTER = 0x00UL; - } - #else - { - /* The IP address is set from the value passed in. */ - *ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress; - - /* Added to prevent ARP flood to gateway. Ensure the - gateway is on the same subnet as the IP address. */ - if( xNetworkAddressing.ulGatewayAddress != 0ul ) - { - configASSERT( ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) == ( xNetworkAddressing.ulGatewayAddress & xNetworkAddressing.ulNetMask ) ); - } - } - #endif /* ipconfigUSE_DHCP == 1 */ - - /* The MAC address is stored in the start of the default packet - header fragment, which is used when sending UDP packets. */ - memcpy( ( void * ) ipLOCAL_MAC_ADDRESS, ( void * ) ucMACAddress, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); - - /* Prepare the sockets interface. */ - xReturn = vNetworkSocketsInit(); - - if( pdTRUE == xReturn ) - { - /* Create the task that processes Ethernet and stack events. */ - xReturn = xTaskCreate( prvIPTask, "IP-task", ( uint16_t )ipconfigIP_TASK_STACK_SIZE_WORDS, NULL, ( UBaseType_t )ipconfigIP_TASK_PRIORITY, &xIPTaskHandle ); - } - } - else - { - FreeRTOS_debug_printf( ( "FreeRTOS_IPInit: xNetworkBuffersInitialise() failed\n") ); - - /* Clean up. */ - vQueueDelete( xNetworkEventQueue ); - xNetworkEventQueue = NULL; - } - } - else - { - FreeRTOS_debug_printf( ( "FreeRTOS_IPInit: Network event queue could not be created\n") ); - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetMask, uint32_t *pulGatewayAddress, uint32_t *pulDNSServerAddress ) -{ - /* Return the address configuration to the caller. */ - - if( pulIPAddress != NULL ) - { - *pulIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; - } - - if( pulNetMask != NULL ) - { - *pulNetMask = xNetworkAddressing.ulNetMask; - } - - if( pulGatewayAddress != NULL ) - { - *pulGatewayAddress = xNetworkAddressing.ulGatewayAddress; - } - - if( pulDNSServerAddress != NULL ) - { - *pulDNSServerAddress = xNetworkAddressing.ulDNSServerAddress; - } -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_SetAddressConfiguration( const uint32_t *pulIPAddress, const uint32_t *pulNetMask, const uint32_t *pulGatewayAddress, const uint32_t *pulDNSServerAddress ) -{ - /* Update the address configuration. */ - - if( pulIPAddress != NULL ) - { - *ipLOCAL_IP_ADDRESS_POINTER = *pulIPAddress; - } - - if( pulNetMask != NULL ) - { - xNetworkAddressing.ulNetMask = *pulNetMask; - } - - if( pulGatewayAddress != NULL ) - { - xNetworkAddressing.ulGatewayAddress = *pulGatewayAddress; - } - - if( pulDNSServerAddress != NULL ) - { - xNetworkAddressing.ulDNSServerAddress = *pulDNSServerAddress; - } -} -/*-----------------------------------------------------------*/ - -#if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - - BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks ) - { - NetworkBufferDescriptor_t *pxNetworkBuffer; - ICMPHeader_t *pxICMPHeader; - BaseType_t xReturn = pdFAIL; - static uint16_t usSequenceNumber = 0; - uint8_t *pucChar; - IPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL }; - - if( (xNumberOfBytesToSend >= 1 ) && ( xNumberOfBytesToSend < ( ( ipconfigNETWORK_MTU - sizeof( IPHeader_t ) ) - sizeof( ICMPHeader_t ) ) ) && ( uxGetNumberOfFreeNetworkBuffers() >= 3 ) ) - { - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( xNumberOfBytesToSend + sizeof( ICMPPacket_t ), xBlockTimeTicks ); - - if( pxNetworkBuffer != NULL ) - { - pxICMPHeader = ( ICMPHeader_t * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipIP_PAYLOAD_OFFSET ] ); - usSequenceNumber++; - - /* Fill in the basic header information. */ - pxICMPHeader->ucTypeOfMessage = ipICMP_ECHO_REQUEST; - pxICMPHeader->ucTypeOfService = 0; - pxICMPHeader->usIdentifier = usSequenceNumber; - pxICMPHeader->usSequenceNumber = usSequenceNumber; - - /* Find the start of the data. */ - pucChar = ( uint8_t * ) pxICMPHeader; - pucChar += sizeof( ICMPHeader_t ); - - /* Just memset the data to a fixed value. */ - memset( ( void * ) pucChar, ( int ) ipECHO_DATA_FILL_BYTE, xNumberOfBytesToSend ); - - /* The message is complete, IP and checksum's are handled by - vProcessGeneratedUDPPacket */ - pxNetworkBuffer->pucEthernetBuffer[ ipSOCKET_OPTIONS_OFFSET ] = FREERTOS_SO_UDPCKSUM_OUT; - pxNetworkBuffer->ulIPAddress = ulIPAddress; - pxNetworkBuffer->usPort = ipPACKET_CONTAINS_ICMP_DATA; - /* xDataLength is the size of the total packet, including the Ethernet header. */ - pxNetworkBuffer->xDataLength = xNumberOfBytesToSend + sizeof( ICMPPacket_t ); - - /* Send to the stack. */ - xStackTxEvent.pvData = pxNetworkBuffer; - - if( xSendEventStructToIPTask( &xStackTxEvent, xBlockTimeTicks) != pdPASS ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - iptraceSTACK_TX_EVENT_LOST( ipSTACK_TX_EVENT ); - } - else - { - xReturn = usSequenceNumber; - } - } - } - else - { - /* The requested number of bytes will not fit in the available space - in the network buffer. */ - } - - return xReturn; - } - -#endif /* ipconfigSUPPORT_OUTGOING_PINGS == 1 */ -/*-----------------------------------------------------------*/ - -BaseType_t xSendEventToIPTask( eIPEvent_t eEvent ) -{ -IPStackEvent_t xEventMessage; -const TickType_t xDontBlock = ( TickType_t ) 0; - - xEventMessage.eEventType = eEvent; - xEventMessage.pvData = ( void* )NULL; - - return xSendEventStructToIPTask( &xEventMessage, xDontBlock ); -} -/*-----------------------------------------------------------*/ - -BaseType_t xSendEventStructToIPTask( const IPStackEvent_t *pxEvent, TickType_t xTimeout ) -{ -BaseType_t xReturn, xSendMessage; - - if( ( xIPIsNetworkTaskReady() == pdFALSE ) && ( pxEvent->eEventType != eNetworkDownEvent ) ) - { - /* Only allow eNetworkDownEvent events if the IP task is not ready - yet. Not going to attempt to send the message so the send failed. */ - xReturn = pdFAIL; - } - else - { - xSendMessage = pdTRUE; - - #if( ipconfigUSE_TCP == 1 ) - { - if( pxEvent->eEventType == eTCPTimerEvent ) - { - /* TCP timer events are sent to wake the timer task when - xTCPTimer has expired, but there is no point sending them if the - IP task is already awake processing other message. */ - xTCPTimer.bExpired = pdTRUE_UNSIGNED; - - if( uxQueueMessagesWaiting( xNetworkEventQueue ) != 0u ) - { - /* Not actually going to send the message but this is not a - failure as the message didn't need to be sent. */ - xSendMessage = pdFALSE; - } - } - } - #endif /* ipconfigUSE_TCP */ - - if( xSendMessage != pdFALSE ) - { - /* The IP task cannot block itself while waiting for itself to - respond. */ - if( ( xIsCallingFromIPTask() == pdTRUE ) && ( xTimeout > ( TickType_t ) 0 ) ) - { - xTimeout = ( TickType_t ) 0; - } - - xReturn = xQueueSendToBack( xNetworkEventQueue, pxEvent, xTimeout ); - - if( xReturn == pdFAIL ) - { - /* A message should have been sent to the IP task, but wasn't. */ - FreeRTOS_debug_printf( ( "xSendEventStructToIPTask: CAN NOT ADD %d\n", pxEvent->eEventType ) ); - iptraceSTACK_TX_EVENT_LOST( pxEvent->eEventType ); - } - } - else - { - /* It was not necessary to send the message to process the event so - even though the message was not sent the call was successful. */ - xReturn = pdPASS; - } - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -eFrameProcessingResult_t eConsiderFrameForProcessing( const uint8_t * const pucEthernetBuffer ) -{ -eFrameProcessingResult_t eReturn; -const EthernetHeader_t *pxEthernetHeader; - - pxEthernetHeader = ( const EthernetHeader_t * ) pucEthernetBuffer; - - if( memcmp( ( void * ) ipLOCAL_MAC_ADDRESS, ( void * ) &( pxEthernetHeader->xDestinationAddress ), sizeof( MACAddress_t ) ) == 0 ) - { - /* The packet was directed to this node directly - process it. */ - eReturn = eProcessBuffer; - } - else if( memcmp( ( void * ) xBroadcastMACAddress.ucBytes, ( void * ) pxEthernetHeader->xDestinationAddress.ucBytes, sizeof( MACAddress_t ) ) == 0 ) - { - /* The packet was a broadcast - process it. */ - eReturn = eProcessBuffer; - } - else -#if( ipconfigUSE_LLMNR == 1 ) - if( memcmp( ( void * ) xLLMNR_MacAdress.ucBytes, ( void * ) pxEthernetHeader->xDestinationAddress.ucBytes, sizeof( MACAddress_t ) ) == 0 ) - { - /* The packet is a request for LLMNR - process it. */ - eReturn = eProcessBuffer; - } - else -#endif /* ipconfigUSE_LLMNR */ - { - /* The packet was not a broadcast, or for this node, just release - the buffer without taking any other action. */ - eReturn = eReleaseBuffer; - } - - #if( ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES == 1 ) - { - uint16_t usFrameType; - - if( eReturn == eProcessBuffer ) - { - usFrameType = pxEthernetHeader->usFrameType; - usFrameType = FreeRTOS_ntohs( usFrameType ); - - if( usFrameType <= 0x600U ) - { - /* Not an Ethernet II frame. */ - eReturn = eReleaseBuffer; - } - } - } - #endif /* ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES == 1 */ - - return eReturn; -} -/*-----------------------------------------------------------*/ - -static void prvProcessNetworkDownEvent( void ) -{ - /* Stop the ARP timer while there is no network. */ - xARPTimer.bActive = pdFALSE_UNSIGNED; - - #if ipconfigUSE_NETWORK_EVENT_HOOK == 1 - { - static BaseType_t xCallEventHook = pdFALSE; - - /* The first network down event is generated by the IP stack itself to - initialise the network hardware, so do not call the network down event - the first time through. */ - if( xCallEventHook == pdTRUE ) - { - vApplicationIPNetworkEventHook( eNetworkDown ); - } - xCallEventHook = pdTRUE; - } - #endif - - /* Per the ARP Cache Validation section of https://tools.ietf.org/html/rfc1122, - treat network down as a "delivery problem" and flush the ARP cache for this - interface. */ - FreeRTOS_ClearARP( ); - - /* The network has been disconnected (or is being initialised for the first - time). Perform whatever hardware processing is necessary to bring it up - again, or wait for it to be available again. This is hardware dependent. */ - if( xNetworkInterfaceInitialise() != pdPASS ) - { - /* Ideally the network interface initialisation function will only - return when the network is available. In case this is not the case, - wait a while before retrying the initialisation. */ - vTaskDelay( ipINITIALISATION_RETRY_DELAY ); - FreeRTOS_NetworkDown(); - } - else - { - /* Set remaining time to 0 so it will become active immediately. */ - #if ipconfigUSE_DHCP == 1 - { - /* The network is not up until DHCP has completed. */ - vDHCPProcess( pdTRUE ); - xSendEventToIPTask( eDHCPEvent ); - } - #else - { - /* Perform any necessary 'network up' processing. */ - vIPNetworkUpCalls(); - } - #endif - } -} -/*-----------------------------------------------------------*/ - -void vIPNetworkUpCalls( void ) -{ - xNetworkUp = pdTRUE; - - #if( ipconfigUSE_NETWORK_EVENT_HOOK == 1 ) - { - vApplicationIPNetworkEventHook( eNetworkUp ); - } - #endif /* ipconfigUSE_NETWORK_EVENT_HOOK */ - - #if( ipconfigDNS_USE_CALLBACKS != 0 ) - { - /* The following function is declared in FreeRTOS_DNS.c and 'private' to - this library */ - extern void vDNSInitialise( void ); - vDNSInitialise(); - } - #endif /* ipconfigDNS_USE_CALLBACKS != 0 */ - - /* Set remaining time to 0 so it will become active immediately. */ - prvIPTimerReload( &xARPTimer, pdMS_TO_TICKS( ipARP_TIMER_PERIOD_MS ) ); -} -/*-----------------------------------------------------------*/ - -static void prvProcessEthernetPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -EthernetHeader_t *pxEthernetHeader; -eFrameProcessingResult_t eReturned = eReleaseBuffer; - - configASSERT( pxNetworkBuffer ); - - /* Interpret the Ethernet frame. */ - if( pxNetworkBuffer->xDataLength >= sizeof( EthernetHeader_t ) ) - { - eReturned = ipCONSIDER_FRAME_FOR_PROCESSING( pxNetworkBuffer->pucEthernetBuffer ); - pxEthernetHeader = ( EthernetHeader_t * )( pxNetworkBuffer->pucEthernetBuffer ); - - if( eReturned == eProcessBuffer ) - { - /* Interpret the received Ethernet packet. */ - switch( pxEthernetHeader->usFrameType ) - { - case ipARP_FRAME_TYPE: - /* The Ethernet frame contains an ARP packet. */ - if( pxNetworkBuffer->xDataLength >= sizeof( ARPPacket_t ) ) - { - eReturned = eARPProcessPacket( ( ARPPacket_t * )pxNetworkBuffer->pucEthernetBuffer ); - } - else - { - eReturned = eReleaseBuffer; - } - break; - - case ipIPv4_FRAME_TYPE: - /* The Ethernet frame contains an IP packet. */ - if( pxNetworkBuffer->xDataLength >= sizeof( IPPacket_t ) ) - { - eReturned = prvProcessIPPacket( ( IPPacket_t * )pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer ); - } - else - { - eReturned = eReleaseBuffer; - } - break; - - default: - /* No other packet types are handled. Nothing to do. */ - eReturned = eReleaseBuffer; - break; - } - } - } - - /* Perform any actions that resulted from processing the Ethernet frame. */ - switch( eReturned ) - { - case eReturnEthernetFrame : - /* The Ethernet frame will have been updated (maybe it was - an ARP request or a PING request?) and should be sent back to - its source. */ - vReturnEthernetFrame( pxNetworkBuffer, pdTRUE ); - /* parameter pdTRUE: the buffer must be released once - the frame has been transmitted */ - break; - - case eFrameConsumed : - /* The frame is in use somewhere, don't release the buffer - yet. */ - break; - - default : - /* The frame is not being used anywhere, and the - NetworkBufferDescriptor_t structure containing the frame should - just be released back to the list of free buffers. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - break; - } -} -/*-----------------------------------------------------------*/ - -static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPPacket, - NetworkBufferDescriptor_t * const pxNetworkBuffer, UBaseType_t uxHeaderLength ) -{ -eFrameProcessingResult_t eReturn = eProcessBuffer; - -#if( ( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 0 ) || ( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 ) ) - const IPHeader_t * pxIPHeader = &( pxIPPacket->xIPHeader ); -#else - /* or else, the parameter won't be used and the function will be optimised - away */ - ( void ) pxIPPacket; -#endif - - #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 0 ) - { - /* In systems with a very small amount of RAM, it might be advantageous - to have incoming messages checked earlier, by the network card driver. - This method may decrease the usage of sparse network buffers. */ - uint32_t ulDestinationIPAddress = pxIPHeader->ulDestinationIPAddress; - - /* Ensure that the incoming packet is not fragmented (only outgoing - packets can be fragmented) as these are the only handled IP frames - currently. */ - if( ( pxIPHeader->usFragmentOffset & ipFRAGMENT_OFFSET_BIT_MASK ) != 0U ) - { - /* Can not handle, fragmented packet. */ - eReturn = eReleaseBuffer; - } - /* 0x45 means: IPv4 with an IP header of 5 x 4 = 20 bytes - * 0x47 means: IPv4 with an IP header of 7 x 4 = 28 bytes */ - else if( ( pxIPHeader->ucVersionHeaderLength < 0x45u ) || ( pxIPHeader->ucVersionHeaderLength > 0x4Fu ) ) - { - /* Can not handle, unknown or invalid header version. */ - eReturn = eReleaseBuffer; - } - /* Is the packet for this IP address? */ - else if( ( ulDestinationIPAddress != *ipLOCAL_IP_ADDRESS_POINTER ) && - /* Is it the global broadcast address 255.255.255.255 ? */ - ( ulDestinationIPAddress != ipBROADCAST_IP_ADDRESS ) && - /* Is it a specific broadcast address 192.168.1.255 ? */ - ( ulDestinationIPAddress != xNetworkAddressing.ulBroadcastAddress ) && - #if( ipconfigUSE_LLMNR == 1 ) - /* Is it the LLMNR multicast address? */ - ( ulDestinationIPAddress != ipLLMNR_IP_ADDR ) && - #endif - /* Or (during DHCP negotiation) we have no IP-address yet? */ - ( *ipLOCAL_IP_ADDRESS_POINTER != 0UL ) ) - { - /* Packet is not for this node, release it */ - eReturn = eReleaseBuffer; - } - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - - #if( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 ) - { - /* Some drivers of NIC's with checksum-offloading will enable the above - define, so that the checksum won't be checked again here */ - if (eReturn == eProcessBuffer ) - { - /* Is the IP header checksum correct? */ - if( ( pxIPHeader->ucProtocol != ( uint8_t ) ipPROTOCOL_ICMP ) && - ( usGenerateChecksum( 0UL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ( size_t ) uxHeaderLength ) != ipCORRECT_CRC ) ) - { - /* Check sum in IP-header not correct. */ - eReturn = eReleaseBuffer; - } - /* Is the upper-layer checksum (TCP/UDP/ICMP) correct? */ - else if( usGenerateProtocolChecksum( ( uint8_t * )( pxNetworkBuffer->pucEthernetBuffer ), pxNetworkBuffer->xDataLength, pdFALSE ) != ipCORRECT_CRC ) - { - /* Protocol checksum not accepted. */ - eReturn = eReleaseBuffer; - } - } - } - #else - { - /* to avoid warning unused parameters */ - ( void ) pxNetworkBuffer; - ( void ) uxHeaderLength; - } - #endif /* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 */ - - return eReturn; -} -/*-----------------------------------------------------------*/ - -static eFrameProcessingResult_t prvProcessIPPacket( IPPacket_t * const pxIPPacket, NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -eFrameProcessingResult_t eReturn; -IPHeader_t * pxIPHeader = &( pxIPPacket->xIPHeader ); -UBaseType_t uxHeaderLength = ( UBaseType_t ) ( ( pxIPHeader->ucVersionHeaderLength & 0x0Fu ) << 2 ); -uint8_t ucProtocol; - - /* Bound the calculated header length: take away the Ethernet header size, - then check if the IP header is claiming to be longer than the remaining - total packet size. Also check for minimal header field length. */ - if( ( uxHeaderLength > ( pxNetworkBuffer->xDataLength - ipSIZE_OF_ETH_HEADER ) ) || - ( uxHeaderLength < ipSIZE_OF_IPv4_HEADER ) ) - { - return eReleaseBuffer; - } - - ucProtocol = pxIPPacket->xIPHeader.ucProtocol; - /* Check if the IP headers are acceptable and if it has our destination. */ - eReturn = prvAllowIPPacket( pxIPPacket, pxNetworkBuffer, uxHeaderLength ); - - if( eReturn == eProcessBuffer ) - { - if( uxHeaderLength > ipSIZE_OF_IPv4_HEADER ) - { - /* All structs of headers expect a IP header size of 20 bytes - * IP header options were included, we'll ignore them and cut them out - * Note: IP options are mostly use in Multi-cast protocols */ - const size_t optlen = ( ( size_t ) uxHeaderLength ) - ipSIZE_OF_IPv4_HEADER; - /* From: the previous start of UDP/ICMP/TCP data */ - uint8_t *pucSource = ( uint8_t* )(pxNetworkBuffer->pucEthernetBuffer + sizeof( EthernetHeader_t ) + uxHeaderLength); - /* To: the usual start of UDP/ICMP/TCP data at offset 20 from IP header */ - uint8_t *pucTarget = ( uint8_t* )(pxNetworkBuffer->pucEthernetBuffer + sizeof( EthernetHeader_t ) + ipSIZE_OF_IPv4_HEADER); - /* How many: total length minus the options and the lower headers */ - const size_t xMoveLen = pxNetworkBuffer->xDataLength - optlen - ipSIZE_OF_IPv4_HEADER - ipSIZE_OF_ETH_HEADER; - - memmove( pucTarget, pucSource, xMoveLen ); - pxNetworkBuffer->xDataLength -= optlen; - - /* Fix-up new version/header length field in IP packet. */ - pxIPHeader->ucVersionHeaderLength = ( pxIPHeader->ucVersionHeaderLength & 0xF0 ) | /* High nibble is the version. */ - ( ( ipSIZE_OF_IPv4_HEADER >> 2 ) & 0x0F ); /* Low nibble is the header size, in bytes, divided by four. */ - } - - /* Add the IP and MAC addresses to the ARP table if they are not - already there - otherwise refresh the age of the existing - entry. */ - if( ucProtocol != ( uint8_t ) ipPROTOCOL_UDP ) - { - /* Refresh the ARP cache with the IP/MAC-address of the received packet - * For UDP packets, this will be done later in xProcessReceivedUDPPacket() - * as soon as know that the message will be handled by someone - * This will prevent that the ARP cache will get overwritten - * with the IP-address of useless broadcast packets - */ - vARPRefreshCacheEntry( &( pxIPPacket->xEthernetHeader.xSourceAddress ), pxIPHeader->ulSourceIPAddress ); - } - switch( ucProtocol ) - { - case ipPROTOCOL_ICMP : - /* The IP packet contained an ICMP frame. Don't bother - checking the ICMP checksum, as if it is wrong then the - wrong data will also be returned, and the source of the - ping will know something went wrong because it will not - be able to validate what it receives. */ - #if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - { - if( pxNetworkBuffer->xDataLength >= sizeof( ICMPPacket_t ) ) - { - ICMPPacket_t *pxICMPPacket = ( ICMPPacket_t * )( pxNetworkBuffer->pucEthernetBuffer ); - if( pxIPHeader->ulDestinationIPAddress == *ipLOCAL_IP_ADDRESS_POINTER ) - { - eReturn = prvProcessICMPPacket( pxICMPPacket ); - } - } - else - { - eReturn = eReleaseBuffer; - } - } - #endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */ - break; - - case ipPROTOCOL_UDP : - { - /* The IP packet contained a UDP frame. */ - UDPPacket_t *pxUDPPacket = ( UDPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); - - /* Only proceed if the payload length indicated in the header - appears to be valid. */ - if ( ( pxNetworkBuffer->xDataLength >= sizeof( UDPPacket_t ) ) && ( FreeRTOS_ntohs( pxUDPPacket->xUDPHeader.usLength ) >= sizeof( UDPHeader_t ) ) ) - { - size_t uxPayloadSize_1, uxPayloadSize_2; - /* The UDP payload size can be calculated by subtracting the - * header size from `xDataLength`. - * However, the `xDataLength` may be longer that expected, - * e.g. when a small packet is padded with zero's. - * The UDP header contains a field `usLength` reflecting - * the payload size plus the UDP header ( 8 bytes ). - * Set `xDataLength` to the size of the headers, - * plus the lower of the two calculated payload sizes. - */ - - uxPayloadSize_1 = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); - uxPayloadSize_2 = FreeRTOS_ntohs( pxUDPPacket->xUDPHeader.usLength ) - sizeof( UDPHeader_t ); - if( uxPayloadSize_1 > uxPayloadSize_2 ) - { - pxNetworkBuffer->xDataLength = uxPayloadSize_2 + sizeof( UDPPacket_t ); - } - - /* Fields in pxNetworkBuffer (usPort, ulIPAddress) are network order. */ - pxNetworkBuffer->usPort = pxUDPPacket->xUDPHeader.usSourcePort; - pxNetworkBuffer->ulIPAddress = pxUDPPacket->xIPHeader.ulSourceIPAddress; - - /* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM: - * In some cases, the upper-layer checksum has been calculated - * by the NIC driver. - * - * Pass the packet payload to the UDP sockets implementation. */ - if( xProcessReceivedUDPPacket( pxNetworkBuffer, - pxUDPPacket->xUDPHeader.usDestinationPort ) == pdPASS ) - { - eReturn = eFrameConsumed; - } - } - else - { - eReturn = eReleaseBuffer; - } - } - break; - -#if ipconfigUSE_TCP == 1 - case ipPROTOCOL_TCP : - { - - if( xProcessReceivedTCPPacket( pxNetworkBuffer ) == pdPASS ) - { - eReturn = eFrameConsumed; - } - - /* Setting this variable will cause xTCPTimerCheck() - to be called just before the IP-task blocks. */ - xProcessedTCPMessage++; - } - break; -#endif - default : - /* Not a supported frame type. */ - break; - } - } - - return eReturn; -} -/*-----------------------------------------------------------*/ - -#if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - - static void prvProcessICMPEchoReply( ICMPPacket_t * const pxICMPPacket ) - { - ePingReplyStatus_t eStatus = eSuccess; - uint16_t usDataLength, usCount; - uint8_t *pucByte; - - /* Find the total length of the IP packet. */ - usDataLength = pxICMPPacket->xIPHeader.usLength; - usDataLength = FreeRTOS_ntohs( usDataLength ); - - /* Remove the length of the IP headers to obtain the length of the ICMP - message itself. */ - usDataLength = ( uint16_t ) ( ( ( uint32_t ) usDataLength ) - ipSIZE_OF_IPv4_HEADER ); - - /* Remove the length of the ICMP header, to obtain the length of - data contained in the ping. */ - usDataLength = ( uint16_t ) ( ( ( uint32_t ) usDataLength ) - ipSIZE_OF_ICMP_HEADER ); - - /* Checksum has already been checked before in prvProcessIPPacket */ - - /* Find the first byte of the data within the ICMP packet. */ - pucByte = ( uint8_t * ) pxICMPPacket; - pucByte += sizeof( ICMPPacket_t ); - - /* Check each byte. */ - for( usCount = 0; usCount < usDataLength; usCount++ ) - { - if( *pucByte != ipECHO_DATA_FILL_BYTE ) - { - eStatus = eInvalidData; - break; - } - - pucByte++; - } - - /* Call back into the application to pass it the result. */ - vApplicationPingReplyHook( eStatus, pxICMPPacket->xICMPHeader.usIdentifier ); - } - -#endif -/*-----------------------------------------------------------*/ - -#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) - - static eFrameProcessingResult_t prvProcessICMPEchoRequest( ICMPPacket_t * const pxICMPPacket ) - { - ICMPHeader_t *pxICMPHeader; - IPHeader_t *pxIPHeader; - uint16_t usRequest; - - pxICMPHeader = &( pxICMPPacket->xICMPHeader ); - pxIPHeader = &( pxICMPPacket->xIPHeader ); - - /* HT:endian: changed back */ - iptraceSENDING_PING_REPLY( pxIPHeader->ulSourceIPAddress ); - - /* The checksum can be checked here - but a ping reply should be - returned even if the checksum is incorrect so the other end can - tell that the ping was received - even if the ping reply contains - invalid data. */ - pxICMPHeader->ucTypeOfMessage = ( uint8_t ) ipICMP_ECHO_REPLY; - pxIPHeader->ulDestinationIPAddress = pxIPHeader->ulSourceIPAddress; - pxIPHeader->ulSourceIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; - - /* Update the checksum because the ucTypeOfMessage member in the header - has been changed to ipICMP_ECHO_REPLY. This is faster than calling - usGenerateChecksum(). */ - - /* due to compiler warning "integer operation result is out of range" */ - - usRequest = ( uint16_t ) ( ( uint16_t )ipICMP_ECHO_REQUEST << 8 ); - - if( pxICMPHeader->usChecksum >= FreeRTOS_htons( 0xFFFFu - usRequest ) ) - { - pxICMPHeader->usChecksum = ( uint16_t ) - ( ( ( uint32_t ) pxICMPHeader->usChecksum ) + - FreeRTOS_htons( usRequest + 1UL ) ); - } - else - { - pxICMPHeader->usChecksum = ( uint16_t ) - ( ( ( uint32_t ) pxICMPHeader->usChecksum ) + - FreeRTOS_htons( usRequest ) ); - } - return eReturnEthernetFrame; - } - -#endif /* ipconfigREPLY_TO_INCOMING_PINGS == 1 */ -/*-----------------------------------------------------------*/ - -#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - - static eFrameProcessingResult_t prvProcessICMPPacket( ICMPPacket_t * const pxICMPPacket ) - { - eFrameProcessingResult_t eReturn = eReleaseBuffer; - - iptraceICMP_PACKET_RECEIVED(); - switch( pxICMPPacket->xICMPHeader.ucTypeOfMessage ) - { - case ipICMP_ECHO_REQUEST : - #if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) - { - eReturn = prvProcessICMPEchoRequest( pxICMPPacket ); - } - #endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) */ - break; - - case ipICMP_ECHO_REPLY : - #if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - { - prvProcessICMPEchoReply( pxICMPPacket ); - } - #endif /* ipconfigSUPPORT_OUTGOING_PINGS */ - break; - - default : - break; - } - - return eReturn; - } - -#endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */ -/*-----------------------------------------------------------*/ - -uint16_t usGenerateProtocolChecksum( const uint8_t * const pucEthernetBuffer, size_t uxBufferLength, BaseType_t xOutgoingPacket ) -{ -uint32_t ulLength; -uint16_t usChecksum, *pusChecksum; -const IPPacket_t * pxIPPacket; -UBaseType_t uxIPHeaderLength; -ProtocolPacket_t *pxProtPack; -uint8_t ucProtocol; -#if( ipconfigHAS_DEBUG_PRINTF != 0 ) - const char *pcType; -#endif - - /* Check for minimum packet size. */ - if( uxBufferLength < sizeof( IPPacket_t ) ) - { - return ipINVALID_LENGTH; - } - - /* Parse the packet length. */ - pxIPPacket = ( const IPPacket_t * ) pucEthernetBuffer; - - /* Per https://tools.ietf.org/html/rfc791, the four-bit Internet Header - Length field contains the length of the internet header in 32-bit words. */ - uxIPHeaderLength = ( UBaseType_t ) ( sizeof( uint32_t ) * ( pxIPPacket->xIPHeader.ucVersionHeaderLength & 0x0Fu ) ); - - /* Check for minimum packet size. */ - if( uxBufferLength < sizeof( IPPacket_t ) + uxIPHeaderLength - ipSIZE_OF_IPv4_HEADER ) - { - return ipINVALID_LENGTH; - } - if( uxBufferLength < ( size_t ) ( ipSIZE_OF_ETH_HEADER + FreeRTOS_ntohs( pxIPPacket->xIPHeader.usLength ) ) ) - { - return ipINVALID_LENGTH; - } - - /* Identify the next protocol. */ - ucProtocol = pxIPPacket->xIPHeader.ucProtocol; - - /* N.B., if this IP packet header includes Options, then the following - assignment results in a pointer into the protocol packet with the Ethernet - and IP headers incorrectly aligned. However, either way, the "third" - protocol (Layer 3 or 4) header will be aligned, which is the convenience - of this calculation. */ - pxProtPack = ( ProtocolPacket_t * ) ( pucEthernetBuffer + ( uxIPHeaderLength - ipSIZE_OF_IPv4_HEADER ) ); - - /* Switch on the Layer 3/4 protocol. */ - if( ucProtocol == ( uint8_t ) ipPROTOCOL_UDP ) - { - if( uxBufferLength < ( uxIPHeaderLength + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_UDP_HEADER ) ) - { - return ipINVALID_LENGTH; - } - - pusChecksum = ( uint16_t * ) ( &( pxProtPack->xUDPPacket.xUDPHeader.usChecksum ) ); - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - pcType = "UDP"; - } - #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - } - else if( ucProtocol == ( uint8_t ) ipPROTOCOL_TCP ) - { - if( uxBufferLength < ( uxIPHeaderLength + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_TCP_HEADER ) ) - { - return ipINVALID_LENGTH; - } - - pusChecksum = ( uint16_t * ) ( &( pxProtPack->xTCPPacket.xTCPHeader.usChecksum ) ); - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - pcType = "TCP"; - } - #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - } - else if( ( ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) || - ( ucProtocol == ( uint8_t ) ipPROTOCOL_IGMP ) ) - { - if( uxBufferLength < ( uxIPHeaderLength + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_ICMP_HEADER ) ) - { - return ipINVALID_LENGTH; - } - - pusChecksum = ( uint16_t * ) ( &( pxProtPack->xICMPPacket.xICMPHeader.usChecksum ) ); - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - if( ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) - { - pcType = "ICMP"; - } - else - { - pcType = "IGMP"; - } - } - #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - } - else - { - /* Unhandled protocol, other than ICMP, IGMP, UDP, or TCP. */ - return ipUNHANDLED_PROTOCOL; - } - - /* The protocol and checksum field have been identified. Check the direction - of the packet. */ - if( xOutgoingPacket != pdFALSE ) - { - /* This is an outgoing packet. Before calculating the checksum, set it - to zero. */ - *( pusChecksum ) = 0u; - } - else if( ( *pusChecksum == 0u ) && ( ucProtocol == ( uint8_t ) ipPROTOCOL_UDP ) ) - { - /* Sender hasn't set the checksum, no use to calculate it. */ - return ipCORRECT_CRC; - } - - ulLength = ( uint32_t ) - ( FreeRTOS_ntohs( pxIPPacket->xIPHeader.usLength ) - ( ( uint16_t ) uxIPHeaderLength ) ); /* normally minus 20 */ - - if( ( ulLength < sizeof( pxProtPack->xUDPPacket.xUDPHeader ) ) || - ( ulLength > ( uint32_t )( ipconfigNETWORK_MTU - uxIPHeaderLength ) ) ) - { - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - FreeRTOS_debug_printf( ( "usGenerateProtocolChecksum[%s]: len invalid: %lu\n", pcType, ulLength ) ); - } - #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - - /* Again, in a 16-bit return value there is no space to indicate an - error. For incoming packets, 0x1234 will cause dropping of the packet. - For outgoing packets, there is a serious problem with the - format/length */ - return ipINVALID_LENGTH; - } - if( ucProtocol <= ( uint8_t ) ipPROTOCOL_IGMP ) - { - /* ICMP/IGMP do not have a pseudo header for CRC-calculation. */ - usChecksum = ( uint16_t ) - ( ~usGenerateChecksum( 0UL, - ( uint8_t * ) &( pxProtPack->xTCPPacket.xTCPHeader ), ( size_t ) ulLength ) ); - } - else - { - /* For UDP and TCP, sum the pseudo header, i.e. IP protocol + length - fields */ - usChecksum = ( uint16_t ) ( ulLength + ( ( uint16_t ) ucProtocol ) ); - - /* And then continue at the IPv4 source and destination addresses. */ - usChecksum = ( uint16_t ) - ( ~usGenerateChecksum( ( uint32_t ) usChecksum, ( uint8_t * )&( pxIPPacket->xIPHeader.ulSourceIPAddress ), - ( 2u * sizeof( pxIPPacket->xIPHeader.ulSourceIPAddress ) + ulLength ) ) ); - - /* Sum TCP header and data. */ - } - - if( xOutgoingPacket == pdFALSE ) - { - /* This is in incoming packet. If the CRC is correct, it should be zero. */ - if( usChecksum == 0u ) - { - usChecksum = ( uint16_t )ipCORRECT_CRC; - } - } - else - { - if( ( usChecksum == 0u ) && ( ucProtocol == ( uint8_t ) ipPROTOCOL_UDP ) ) - { - /* In case of UDP, a calculated checksum of 0x0000 is transmitted - as 0xffff. A value of zero would mean that the checksum is not used. */ - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - if( xOutgoingPacket != pdFALSE ) - { - FreeRTOS_debug_printf( ( "usGenerateProtocolChecksum[%s]: crc swap: %04X\n", pcType, usChecksum ) ); - } - } - #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - - usChecksum = ( uint16_t )0xffffu; - } - } - usChecksum = FreeRTOS_htons( usChecksum ); - - if( xOutgoingPacket != pdFALSE ) - { - *( pusChecksum ) = usChecksum; - } - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - else if( ( xOutgoingPacket == pdFALSE ) && ( usChecksum != ipCORRECT_CRC ) ) - { - FreeRTOS_debug_printf( ( "usGenerateProtocolChecksum[%s]: ID %04X: from %lxip to %lxip bad crc: %04X\n", - pcType, - FreeRTOS_ntohs( pxIPPacket->xIPHeader.usIdentification ), - FreeRTOS_ntohl( pxIPPacket->xIPHeader.ulSourceIPAddress ), - FreeRTOS_ntohl( pxIPPacket->xIPHeader.ulDestinationIPAddress ), - FreeRTOS_ntohs( *pusChecksum ) ) ); - } - #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - - return usChecksum; -} -/*-----------------------------------------------------------*/ - -/** - * This method generates a checksum for a given IPv4 header, per RFC791 (page 14). - * The checksum algorithm is decribed as: - * "[T]he 16 bit one's complement of the one's complement sum of all 16 bit words in the - * header. For purposes of computing the checksum, the value of the checksum field is zero." - * - * In a nutshell, that means that each 16-bit 'word' must be summed, after which - * the number of 'carries' (overflows) is added to the result. If that addition - * produces an overflow, that 'carry' must also be added to the final result. The final checksum - * should be the bitwise 'not' (ones-complement) of the result if the packet is - * meant to be transmitted, but this method simply returns the raw value, probably - * because when a packet is received, the checksum is verified by checking that - * ((received & calculated) == 0) without applying a bitwise 'not' to the 'calculated' checksum. - * - * This logic is optimized for microcontrollers which have limited resources, so the logic looks odd. - * It iterates over the full range of 16-bit words, but it does so by processing several 32-bit - * words at once whenever possible. Its first step is to align the memory pointer to a 32-bit boundary, - * after which it runs a fast loop to process multiple 32-bit words at once and adding their 'carries'. - * Finally, it finishes up by processing any remaining 16-bit words, and adding up all of the 'carries'. - * With 32-bit arithmetic, the number of 16-bit 'carries' produced by sequential additions can be found - * by looking at the 16 most-significant bits of the 32-bit integer, since a 32-bit int will continue - * counting up instead of overflowing after 16 bits. That is why the actual checksum calculations look like: - * union.u32 = ( uint32_t ) union.u16[ 0 ] + union.u16[ 1 ]; - * - * Arguments: - * ulSum: This argument provides a value to initialize the progressive summation - * of the header's values to. It is often 0, but protocols like TCP or UDP - * can have pseudo-header fields which need to be included in the checksum. - * pucNextData: This argument contains the address of the first byte which this - * method should process. The method's memory iterator is initialized to this value. - * uxDataLengthBytes: This argument contains the number of bytes that this method - * should process. - */ -uint16_t usGenerateChecksum( uint32_t ulSum, const uint8_t * pucNextData, size_t uxDataLengthBytes ) -{ -xUnion32 xSum2, xSum, xTerm; -xUnionPtr xSource; /* Points to first byte */ -xUnionPtr xLastSource; /* Points to last byte plus one */ -uint32_t ulAlignBits, ulCarry = 0ul; - - /* Small MCUs often spend up to 30% of the time doing checksum calculations - This function is optimised for 32-bit CPUs; Each time it will try to fetch - 32-bits, sums it with an accumulator and counts the number of carries. */ - - /* Swap the input (little endian platform only). */ - xSum.u32 = FreeRTOS_ntohs( ulSum ); - xTerm.u32 = 0ul; - - xSource.u8ptr = ( uint8_t * ) pucNextData; - ulAlignBits = ( ( ( uint32_t ) pucNextData ) & 0x03u ); /* gives 0, 1, 2, or 3 */ - - /* If byte (8-bit) aligned... */ - if( ( ( ulAlignBits & 1ul ) != 0ul ) && ( uxDataLengthBytes >= ( size_t ) 1 ) ) - { - xTerm.u8[ 1 ] = *( xSource.u8ptr ); - ( xSource.u8ptr )++; - uxDataLengthBytes--; - /* Now xSource is word (16-bit) aligned. */ - } - - /* If half-word (16-bit) aligned... */ - if( ( ( ulAlignBits == 1u ) || ( ulAlignBits == 2u ) ) && ( uxDataLengthBytes >= 2u ) ) - { - xSum.u32 += *(xSource.u16ptr); - ( xSource.u16ptr )++; - uxDataLengthBytes -= 2u; - /* Now xSource is word (32-bit) aligned. */ - } - - /* Word (32-bit) aligned, do the most part. */ - xLastSource.u32ptr = ( xSource.u32ptr + ( uxDataLengthBytes / 4u ) ) - 3u; - - /* In this loop, four 32-bit additions will be done, in total 16 bytes. - Indexing with constants (0,1,2,3) gives faster code than using - post-increments. */ - while( xSource.u32ptr < xLastSource.u32ptr ) - { - /* Use a secondary Sum2, just to see if the addition produced an - overflow. */ - xSum2.u32 = xSum.u32 + xSource.u32ptr[ 0 ]; - if( xSum2.u32 < xSum.u32 ) - { - ulCarry++; - } - - /* Now add the secondary sum to the major sum, and remember if there was - a carry. */ - xSum.u32 = xSum2.u32 + xSource.u32ptr[ 1 ]; - if( xSum2.u32 > xSum.u32 ) - { - ulCarry++; - } - - /* And do the same trick once again for indexes 2 and 3 */ - xSum2.u32 = xSum.u32 + xSource.u32ptr[ 2 ]; - if( xSum2.u32 < xSum.u32 ) - { - ulCarry++; - } - - xSum.u32 = xSum2.u32 + xSource.u32ptr[ 3 ]; - - if( xSum2.u32 > xSum.u32 ) - { - ulCarry++; - } - - /* And finally advance the pointer 4 * 4 = 16 bytes. */ - xSource.u32ptr += 4; - } - - /* Now add all carries. */ - xSum.u32 = ( uint32_t )xSum.u16[ 0 ] + xSum.u16[ 1 ] + ulCarry; - - uxDataLengthBytes %= 16u; - xLastSource.u8ptr = ( uint8_t * ) ( xSource.u8ptr + ( uxDataLengthBytes & ~( ( size_t ) 1 ) ) ); - - /* Half-word aligned. */ - while( xSource.u16ptr < xLastSource.u16ptr ) - { - /* At least one more short. */ - xSum.u32 += xSource.u16ptr[ 0 ]; - xSource.u16ptr++; - } - - if( ( uxDataLengthBytes & ( size_t ) 1 ) != 0u ) /* Maybe one more ? */ - { - xTerm.u8[ 0 ] = xSource.u8ptr[ 0 ]; - } - xSum.u32 += xTerm.u32; - - /* Now add all carries again. */ - xSum.u32 = ( uint32_t ) xSum.u16[ 0 ] + xSum.u16[ 1 ]; - - /* The previous summation might have given a 16-bit carry. */ - xSum.u32 = ( uint32_t ) xSum.u16[ 0 ] + xSum.u16[ 1 ]; - - if( ( ulAlignBits & 1u ) != 0u ) - { - /* Quite unlikely, but pucNextData might be non-aligned, which would - mean that a checksum is calculated starting at an odd position. */ - xSum.u32 = ( ( xSum.u32 & 0xffu ) << 8 ) | ( ( xSum.u32 & 0xff00u ) >> 8 ); - } - - /* swap the output (little endian platform only). */ - return FreeRTOS_htons( ( (uint16_t) xSum.u32 ) ); -} -/*-----------------------------------------------------------*/ - -void vReturnEthernetFrame( NetworkBufferDescriptor_t * pxNetworkBuffer, BaseType_t xReleaseAfterSend ) -{ -EthernetHeader_t *pxEthernetHeader; - -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - NetworkBufferDescriptor_t *pxNewBuffer; -#endif - - #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - BaseType_t xIndex; - - FreeRTOS_printf( ( "vReturnEthernetFrame: length %lu\n", ( uint32_t )pxNetworkBuffer->xDataLength ) ); - for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) - { - pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; - } - pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; - } - } - #endif - -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - - if( xReleaseAfterSend == pdFALSE ) - { - pxNewBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, ( BaseType_t ) pxNetworkBuffer->xDataLength ); - xReleaseAfterSend = pdTRUE; - pxNetworkBuffer = pxNewBuffer; - } - - if( pxNetworkBuffer != NULL ) -#endif - { - pxEthernetHeader = ( EthernetHeader_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); - - /* Swap source and destination MAC addresses. */ - memcpy( ( void * ) &( pxEthernetHeader->xDestinationAddress ), ( void * ) &( pxEthernetHeader->xSourceAddress ), sizeof( pxEthernetHeader->xDestinationAddress ) ); - memcpy( ( void * ) &( pxEthernetHeader->xSourceAddress) , ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); - - /* Send! */ - xNetworkInterfaceOutput( pxNetworkBuffer, xReleaseAfterSend ); - } -} -/*-----------------------------------------------------------*/ - -uint32_t FreeRTOS_GetIPAddress( void ) -{ - /* Returns the IP address of the NIC. */ - return *ipLOCAL_IP_ADDRESS_POINTER; -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_SetIPAddress( uint32_t ulIPAddress ) -{ - /* Sets the IP address of the NIC. */ - *ipLOCAL_IP_ADDRESS_POINTER = ulIPAddress; -} -/*-----------------------------------------------------------*/ - -uint32_t FreeRTOS_GetGatewayAddress( void ) -{ - return xNetworkAddressing.ulGatewayAddress; -} -/*-----------------------------------------------------------*/ - -uint32_t FreeRTOS_GetDNSServerAddress( void ) -{ - return xNetworkAddressing.ulDNSServerAddress; -} -/*-----------------------------------------------------------*/ - -uint32_t FreeRTOS_GetNetmask( void ) -{ - return xNetworkAddressing.ulNetMask; -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_UpdateMACAddress( const uint8_t ucMACAddress[ipMAC_ADDRESS_LENGTH_BYTES] ) -{ - /* Copy the MAC address at the start of the default packet header fragment. */ - memcpy( ( void * )ipLOCAL_MAC_ADDRESS, ( void * )ucMACAddress, ( size_t )ipMAC_ADDRESS_LENGTH_BYTES ); -} -/*-----------------------------------------------------------*/ - -const uint8_t * FreeRTOS_GetMACAddress( void ) -{ - return ipLOCAL_MAC_ADDRESS; -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_SetNetmask ( uint32_t ulNetmask ) -{ - xNetworkAddressing.ulNetMask = ulNetmask; -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_SetGatewayAddress ( uint32_t ulGatewayAddress ) -{ - xNetworkAddressing.ulGatewayAddress = ulGatewayAddress; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_DHCP == 1 ) - void vIPSetDHCPTimerEnableState( BaseType_t xEnableState ) - { - if( xEnableState != pdFALSE ) - { - xDHCPTimer.bActive = pdTRUE_UNSIGNED; - } - else - { - xDHCPTimer.bActive = pdFALSE_UNSIGNED; - } - } -#endif /* ipconfigUSE_DHCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_DHCP == 1 ) - void vIPReloadDHCPTimer( uint32_t ulLeaseTime ) - { - prvIPTimerReload( &xDHCPTimer, ulLeaseTime ); - } -#endif /* ipconfigUSE_DHCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigDNS_USE_CALLBACKS == 1 ) - void vIPSetDnsTimerEnableState( BaseType_t xEnableState ) - { - if( xEnableState != 0 ) - { - xDNSTimer.bActive = pdTRUE; - } - else - { - xDNSTimer.bActive = pdFALSE; - } - } -#endif /* ipconfigUSE_DHCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigDNS_USE_CALLBACKS != 0 ) - void vIPReloadDNSTimer( uint32_t ulCheckTime ) - { - prvIPTimerReload( &xDNSTimer, ulCheckTime ); - } -#endif /* ipconfigDNS_USE_CALLBACKS != 0 */ -/*-----------------------------------------------------------*/ - -BaseType_t xIPIsNetworkTaskReady( void ) -{ - return xIPTaskInitialised; -} -/*-----------------------------------------------------------*/ - -BaseType_t FreeRTOS_IsNetworkUp( void ) -{ - return xNetworkUp; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - UBaseType_t uxGetMinimumIPQueueSpace( void ) - { - return uxQueueMinimumSpace; - } -#endif -/*-----------------------------------------------------------*/ - -/* Provide access to private members for verification. */ -#ifdef FREERTOS_TCP_ENABLE_VERIFICATION - #include "aws_freertos_ip_verification_access_ip_define.h" -#endif - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* Standard includes. */ +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_ARP.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_TCP_IP.h" +#include "FreeRTOS_DHCP.h" +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" +#include "FreeRTOS_DNS.h" + + +/* Used to ensure the structure packing is having the desired effect. The +'volatile' is used to prevent compiler warnings about comparing a constant with +a constant. */ +#define ipEXPECTED_EthernetHeader_t_SIZE ( ( size_t ) 14 ) +#define ipEXPECTED_ARPHeader_t_SIZE ( ( size_t ) 28 ) +#define ipEXPECTED_IPHeader_t_SIZE ( ( size_t ) 20 ) +#define ipEXPECTED_IGMPHeader__SIZE ( ( size_t ) 8 ) +#define ipEXPECTED_ICMPHeader_t_SIZE ( ( size_t ) 8 ) +#define ipEXPECTED_UDPHeader_t_SIZE ( ( size_t ) 8 ) +#define ipEXPECTED_TCPHeader_t_SIZE ( ( size_t ) 20 ) + + +/* ICMP protocol definitions. */ +#define ipICMP_ECHO_REQUEST ( ( uint8_t ) 8 ) +#define ipICMP_ECHO_REPLY ( ( uint8_t ) 0 ) + + +/* Time delay between repeated attempts to initialise the network hardware. */ +#ifndef ipINITIALISATION_RETRY_DELAY + #define ipINITIALISATION_RETRY_DELAY ( pdMS_TO_TICKS( 3000 ) ) +#endif + +/* Defines how often the ARP timer callback function is executed. The time is +shorted in the Windows simulator as simulated time is not real time. */ +#ifndef ipARP_TIMER_PERIOD_MS + #ifdef _WINDOWS_ + #define ipARP_TIMER_PERIOD_MS ( 500 ) /* For windows simulator builds. */ + #else + #define ipARP_TIMER_PERIOD_MS ( 10000 ) + #endif +#endif + +#ifndef iptraceIP_TASK_STARTING + #define iptraceIP_TASK_STARTING() do {} while( 0 ) +#endif + +#if( ( ipconfigUSE_TCP == 1 ) && !defined( ipTCP_TIMER_PERIOD_MS ) ) + /* When initialising the TCP timer, + give it an initial time-out of 1 second. */ + #define ipTCP_TIMER_PERIOD_MS ( 1000 ) +#endif + +/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet +driver will filter incoming packets and only pass the stack those packets it +considers need processing. In this case ipCONSIDER_FRAME_FOR_PROCESSING() can +be #defined away. If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 0 +then the Ethernet driver will pass all received packets to the stack, and the +stack must do the filtering itself. In this case ipCONSIDER_FRAME_FOR_PROCESSING +needs to call eConsiderFrameForProcessing. */ +#if ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +#else + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +#endif + +/* The character used to fill ICMP echo requests, and therefore also the +character expected to fill ICMP echo replies. */ +#define ipECHO_DATA_FILL_BYTE 'x' + +#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) + /* The bits in the two byte IP header field that make up the fragment offset value. */ + #define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0xff0f ) +#else + /* The bits in the two byte IP header field that make up the fragment offset value. */ + #define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff ) +#endif /* ipconfigBYTE_ORDER */ + +/* The maximum time the IP task is allowed to remain in the Blocked state if no +events are posted to the network event queue. */ +#ifndef ipconfigMAX_IP_TASK_SLEEP_TIME + #define ipconfigMAX_IP_TASK_SLEEP_TIME ( pdMS_TO_TICKS( 10000UL ) ) +#endif + +/* When a new TCP connection is established, the value of +'ulNextInitialSequenceNumber' will be used as the initial sequence number. It +is very important that at start-up, 'ulNextInitialSequenceNumber' contains a +random value. Also its value must be increased continuously in time, to prevent +a third party guessing the next sequence number and take-over a TCP connection. +It is advised to increment it by 1 ever 4us, which makes about 256 times +per ms: */ +#define ipINITIAL_SEQUENCE_NUMBER_FACTOR 256UL + +/* Returned as the (invalid) checksum when the protocol being checked is not +handled. The value is chosen simply to be easy to spot when debugging. */ +#define ipUNHANDLED_PROTOCOL 0x4321u + +/* Returned to indicate a valid checksum when the checksum does not need to be +calculated. */ +#define ipCORRECT_CRC 0xffffu + +/* Returned as the (invalid) checksum when the length of the data being checked +had an invalid length. */ +#define ipINVALID_LENGTH 0x1234u + +/*-----------------------------------------------------------*/ + +typedef struct xIP_TIMER +{ + uint32_t + bActive : 1, /* This timer is running and must be processed. */ + bExpired : 1; /* Timer has expired and a task must be processed. */ + TimeOut_t xTimeOut; + TickType_t ulRemainingTime; + TickType_t ulReloadTime; +} IPTimer_t; + +/* Used in checksum calculation. */ +typedef union _xUnion32 +{ + uint32_t u32; + uint16_t u16[ 2 ]; + uint8_t u8[ 4 ]; +} xUnion32; + +/* Used in checksum calculation. */ +typedef union _xUnionPtr +{ + uint32_t *u32ptr; + uint16_t *u16ptr; + uint8_t *u8ptr; +} xUnionPtr; + +/*-----------------------------------------------------------*/ + +/* + * The main TCP/IP stack processing task. This task receives commands/events + * from the network hardware drivers and tasks that are using sockets. It also + * maintains a set of protocol timers. + */ +static void prvIPTask( void *pvParameters ); + +/* + * Called when new data is available from the network interface. + */ +static void prvProcessEthernetPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ); + +/* + * Process incoming IP packets. + */ +static eFrameProcessingResult_t prvProcessIPPacket( IPPacket_t * const pxIPPacket, NetworkBufferDescriptor_t * const pxNetworkBuffer ); + +#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + /* + * Process incoming ICMP packets. + */ + static eFrameProcessingResult_t prvProcessICMPPacket( ICMPPacket_t * const pxICMPPacket ); +#endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */ + +/* + * Turns around an incoming ping request to convert it into a ping reply. + */ +#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) + static eFrameProcessingResult_t prvProcessICMPEchoRequest( ICMPPacket_t * const pxICMPPacket ); +#endif /* ipconfigREPLY_TO_INCOMING_PINGS */ + +/* + * Processes incoming ping replies. The application callback function + * vApplicationPingReplyHook() is called with the results. + */ +#if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + static void prvProcessICMPEchoReply( ICMPPacket_t * const pxICMPPacket ); +#endif /* ipconfigSUPPORT_OUTGOING_PINGS */ + +/* + * Called to create a network connection when the stack is first started, or + * when the network connection is lost. + */ +static void prvProcessNetworkDownEvent( void ); + +/* + * Checks the ARP, DHCP and TCP timers to see if any periodic or timeout + * processing is required. + */ +static void prvCheckNetworkTimers( void ); + +/* + * Determine how long the IP task can sleep for, which depends on when the next + * periodic or timeout processing must be performed. + */ +static TickType_t prvCalculateSleepTime( void ); + +/* + * The network card driver has received a packet. In the case that it is part + * of a linked packet chain, walk through it to handle every message. + */ +static void prvHandleEthernetPacket( NetworkBufferDescriptor_t *pxBuffer ); + +/* + * Utility functions for the light weight IP timers. + */ +static void prvIPTimerStart( IPTimer_t *pxTimer, TickType_t xTime ); +static BaseType_t prvIPTimerCheck( IPTimer_t *pxTimer ); +static void prvIPTimerReload( IPTimer_t *pxTimer, TickType_t xTime ); + +static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPPacket, + NetworkBufferDescriptor_t * const pxNetworkBuffer, UBaseType_t uxHeaderLength ); + +/*-----------------------------------------------------------*/ + +/* The queue used to pass events into the IP-task for processing. */ +QueueHandle_t xNetworkEventQueue = NULL; + +/*_RB_ Requires comment. */ +uint16_t usPacketIdentifier = 0U; + +/* For convenience, a MAC address of all 0xffs is defined const for quick +reference. */ +const MACAddress_t xBroadcastMACAddress = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; + +/* Structure that stores the netmask, gateway address and DNS server addresses. */ +NetworkAddressingParameters_t xNetworkAddressing = { 0, 0, 0, 0, 0 }; + +/* Default values for the above struct in case DHCP +does not lead to a confirmed request. */ +NetworkAddressingParameters_t xDefaultAddressing = { 0, 0, 0, 0, 0 }; + +/* Used to ensure network down events cannot be missed when they cannot be +posted to the network event queue because the network event queue is already +full. */ +static BaseType_t xNetworkDownEventPending = pdFALSE; + +/* Stores the handle of the task that handles the stack. The handle is used +(indirectly) by some utility function to determine if the utility function is +being called by a task (in which case it is ok to block) or by the IP task +itself (in which case it is not ok to block). */ +static TaskHandle_t xIPTaskHandle = NULL; + +#if( ipconfigUSE_TCP != 0 ) + /* Set to a non-zero value if one or more TCP message have been processed + within the last round. */ + static BaseType_t xProcessedTCPMessage; +#endif + +/* Simple set to pdTRUE or pdFALSE depending on whether the network is up or +down (connected, not connected) respectively. */ +static BaseType_t xNetworkUp = pdFALSE; + +/* +A timer for each of the following processes, all of which need attention on a +regular basis: + 1. ARP, to check its table entries + 2. DPHC, to send requests and to renew a reservation + 3. TCP, to check for timeouts, resends + 4. DNS, to check for timeouts when looking-up a domain. + */ +static IPTimer_t xARPTimer; +#if( ipconfigUSE_DHCP != 0 ) + static IPTimer_t xDHCPTimer; +#endif +#if( ipconfigUSE_TCP != 0 ) + static IPTimer_t xTCPTimer; +#endif +#if( ipconfigDNS_USE_CALLBACKS != 0 ) + static IPTimer_t xDNSTimer; +#endif + +/* Set to pdTRUE when the IP task is ready to start processing packets. */ +static BaseType_t xIPTaskInitialised = pdFALSE; + +#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + /* Keep track of the lowest amount of space in 'xNetworkEventQueue'. */ + static UBaseType_t uxQueueMinimumSpace = ipconfigEVENT_QUEUE_LENGTH; +#endif + +/*-----------------------------------------------------------*/ + +static void prvIPTask( void *pvParameters ) +{ +IPStackEvent_t xReceivedEvent; +TickType_t xNextIPSleep; +FreeRTOS_Socket_t *pxSocket; +struct freertos_sockaddr xAddress; + + /* Just to prevent compiler warnings about unused parameters. */ + ( void ) pvParameters; + + /* A possibility to set some additional task properties. */ + iptraceIP_TASK_STARTING(); + + /* Generate a dummy message to say that the network connection has gone + down. This will cause this task to initialise the network interface. After + this it is the responsibility of the network interface hardware driver to + send this message if a previously connected network is disconnected. */ + FreeRTOS_NetworkDown(); + + #if( ipconfigUSE_TCP == 1 ) + { + /* Initialise the TCP timer. */ + prvIPTimerReload( &xTCPTimer, pdMS_TO_TICKS( ipTCP_TIMER_PERIOD_MS ) ); + } + #endif + + /* Initialisation is complete and events can now be processed. */ + xIPTaskInitialised = pdTRUE; + + FreeRTOS_debug_printf( ( "prvIPTask started\n" ) ); + + /* Loop, processing IP events. */ + for( ;; ) + { + ipconfigWATCHDOG_TIMER(); + + /* Check the ARP, DHCP and TCP timers to see if there is any periodic + or timeout processing to perform. */ + prvCheckNetworkTimers(); + + /* Calculate the acceptable maximum sleep time. */ + xNextIPSleep = prvCalculateSleepTime(); + + /* Wait until there is something to do. If the following call exits + * due to a time out rather than a message being received, set a + * 'NoEvent' value. */ + if ( xQueueReceive( xNetworkEventQueue, ( void * ) &xReceivedEvent, xNextIPSleep ) == pdFALSE ) + { + xReceivedEvent.eEventType = eNoEvent; + } + + #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + { + if( xReceivedEvent.eEventType != eNoEvent ) + { + UBaseType_t uxCount; + + uxCount = uxQueueSpacesAvailable( xNetworkEventQueue ); + if( uxQueueMinimumSpace > uxCount ) + { + uxQueueMinimumSpace = uxCount; + } + } + } + #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ + + iptraceNETWORK_EVENT_RECEIVED( xReceivedEvent.eEventType ); + + switch( xReceivedEvent.eEventType ) + { + case eNetworkDownEvent : + /* Attempt to establish a connection. */ + xNetworkUp = pdFALSE; + prvProcessNetworkDownEvent(); + break; + + case eNetworkRxEvent: + /* The network hardware driver has received a new packet. A + pointer to the received buffer is located in the pvData member + of the received event structure. */ + prvHandleEthernetPacket( ( NetworkBufferDescriptor_t * ) ( xReceivedEvent.pvData ) ); + break; + + case eNetworkTxEvent: + /* Send a network packet. The ownership will be transferred to + the driver, which will release it after delivery. */ + xNetworkInterfaceOutput( ( NetworkBufferDescriptor_t * ) ( xReceivedEvent.pvData ), pdTRUE ); + break; + + case eARPTimerEvent : + /* The ARP timer has expired, process the ARP cache. */ + vARPAgeCache(); + break; + + case eSocketBindEvent: + /* FreeRTOS_bind (a user API) wants the IP-task to bind a socket + to a port. The port number is communicated in the socket field + usLocalPort. vSocketBind() will actually bind the socket and the + API will unblock as soon as the eSOCKET_BOUND event is + triggered. */ + pxSocket = ( FreeRTOS_Socket_t * ) ( xReceivedEvent.pvData ); + xAddress.sin_addr = 0u; /* For the moment. */ + xAddress.sin_port = FreeRTOS_ntohs( pxSocket->usLocalPort ); + pxSocket->usLocalPort = 0u; + vSocketBind( pxSocket, &xAddress, sizeof( xAddress ), pdFALSE ); + + /* Before 'eSocketBindEvent' was sent it was tested that + ( xEventGroup != NULL ) so it can be used now to wake up the + user. */ + pxSocket->xEventBits |= eSOCKET_BOUND; + vSocketWakeUpUser( pxSocket ); + break; + + case eSocketCloseEvent : + /* The user API FreeRTOS_closesocket() has sent a message to the + IP-task to actually close a socket. This is handled in + vSocketClose(). As the socket gets closed, there is no way to + report back to the API, so the API won't wait for the result */ + vSocketClose( ( FreeRTOS_Socket_t * ) ( xReceivedEvent.pvData ) ); + break; + + case eStackTxEvent : + /* The network stack has generated a packet to send. A + pointer to the generated buffer is located in the pvData + member of the received event structure. */ + vProcessGeneratedUDPPacket( ( NetworkBufferDescriptor_t * ) ( xReceivedEvent.pvData ) ); + break; + + case eDHCPEvent: + /* The DHCP state machine needs processing. */ + #if( ipconfigUSE_DHCP == 1 ) + { + vDHCPProcess( pdFALSE ); + } + #endif /* ipconfigUSE_DHCP */ + break; + + case eSocketSelectEvent : + /* FreeRTOS_select() has got unblocked by a socket event, + vSocketSelect() will check which sockets actually have an event + and update the socket field xSocketBits. */ + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + { + vSocketSelect( ( SocketSelect_t * ) ( xReceivedEvent.pvData ) ); + } + #endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ + break; + + case eSocketSignalEvent : + #if( ipconfigSUPPORT_SIGNALS != 0 ) + { + /* Some task wants to signal the user of this socket in + order to interrupt a call to recv() or a call to select(). */ + FreeRTOS_SignalSocket( ( Socket_t ) xReceivedEvent.pvData ); + } + #endif /* ipconfigSUPPORT_SIGNALS */ + break; + + case eTCPTimerEvent : + #if( ipconfigUSE_TCP == 1 ) + { + /* Simply mark the TCP timer as expired so it gets processed + the next time prvCheckNetworkTimers() is called. */ + xTCPTimer.bExpired = pdTRUE_UNSIGNED; + } + #endif /* ipconfigUSE_TCP */ + break; + + case eTCPAcceptEvent: + /* The API FreeRTOS_accept() was called, the IP-task will now + check if the listening socket (communicated in pvData) actually + received a new connection. */ + #if( ipconfigUSE_TCP == 1 ) + { + pxSocket = ( FreeRTOS_Socket_t * ) ( xReceivedEvent.pvData ); + + if( xTCPCheckNewClient( pxSocket ) != pdFALSE ) + { + pxSocket->xEventBits |= eSOCKET_ACCEPT; + vSocketWakeUpUser( pxSocket ); + } + } + #endif /* ipconfigUSE_TCP */ + break; + + case eTCPNetStat: + /* FreeRTOS_netstat() was called to have the IP-task print an + overview of all sockets and their connections */ + #if( ( ipconfigUSE_TCP == 1 ) && ( ipconfigHAS_PRINTF == 1 ) ) + { + vTCPNetStat(); + } + #endif /* ipconfigUSE_TCP */ + break; + + default : + /* Should not get here. */ + break; + } + + if( xNetworkDownEventPending != pdFALSE ) + { + /* A network down event could not be posted to the network event + queue because the queue was full. Try posting again. */ + FreeRTOS_NetworkDown(); + } + } +} +/*-----------------------------------------------------------*/ + +BaseType_t xIsCallingFromIPTask( void ) +{ +BaseType_t xReturn; + + if( xTaskGetCurrentTaskHandle() == xIPTaskHandle ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static void prvHandleEthernetPacket( NetworkBufferDescriptor_t *pxBuffer ) +{ + #if( ipconfigUSE_LINKED_RX_MESSAGES == 0 ) + { + /* When ipconfigUSE_LINKED_RX_MESSAGES is not set to 0 then only one + buffer will be sent at a time. This is the default way for +TCP to pass + messages from the MAC to the TCP/IP stack. */ + prvProcessEthernetPacket( pxBuffer ); + } + #else /* ipconfigUSE_LINKED_RX_MESSAGES */ + { + NetworkBufferDescriptor_t *pxNextBuffer; + + /* An optimisation that is useful when there is high network traffic. + Instead of passing received packets into the IP task one at a time the + network interface can chain received packets together and pass them into + the IP task in one go. The packets are chained using the pxNextBuffer + member. The loop below walks through the chain processing each packet + in the chain in turn. */ + do + { + /* Store a pointer to the buffer after pxBuffer for use later on. */ + pxNextBuffer = pxBuffer->pxNextBuffer; + + /* Make it NULL to avoid using it later on. */ + pxBuffer->pxNextBuffer = NULL; + + prvProcessEthernetPacket( pxBuffer ); + pxBuffer = pxNextBuffer; + + /* While there is another packet in the chain. */ + } while( pxBuffer != NULL ); + } + #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ +} +/*-----------------------------------------------------------*/ + +static TickType_t prvCalculateSleepTime( void ) +{ +TickType_t xMaximumSleepTime; + + /* Start with the maximum sleep time, then check this against the remaining + time in any other timers that are active. */ + xMaximumSleepTime = ipconfigMAX_IP_TASK_SLEEP_TIME; + + if( xARPTimer.bActive != pdFALSE_UNSIGNED ) + { + if( xARPTimer.ulRemainingTime < xMaximumSleepTime ) + { + xMaximumSleepTime = xARPTimer.ulReloadTime; + } + } + + #if( ipconfigUSE_DHCP == 1 ) + { + if( xDHCPTimer.bActive != pdFALSE_UNSIGNED ) + { + if( xDHCPTimer.ulRemainingTime < xMaximumSleepTime ) + { + xMaximumSleepTime = xDHCPTimer.ulRemainingTime; + } + } + } + #endif /* ipconfigUSE_DHCP */ + + #if( ipconfigUSE_TCP == 1 ) + { + if( xTCPTimer.ulRemainingTime < xMaximumSleepTime ) + { + xMaximumSleepTime = xTCPTimer.ulRemainingTime; + } + } + #endif + + #if( ipconfigDNS_USE_CALLBACKS != 0 ) + { + if( xDNSTimer.bActive != pdFALSE ) + { + if( xDNSTimer.ulRemainingTime < xMaximumSleepTime ) + { + xMaximumSleepTime = xDNSTimer.ulRemainingTime; + } + } + } + #endif + + return xMaximumSleepTime; +} +/*-----------------------------------------------------------*/ + +static void prvCheckNetworkTimers( void ) +{ + /* Is it time for ARP processing? */ + if( prvIPTimerCheck( &xARPTimer ) != pdFALSE ) + { + xSendEventToIPTask( eARPTimerEvent ); + } + + #if( ipconfigUSE_DHCP == 1 ) + { + /* Is it time for DHCP processing? */ + if( prvIPTimerCheck( &xDHCPTimer ) != pdFALSE ) + { + xSendEventToIPTask( eDHCPEvent ); + } + } + #endif /* ipconfigUSE_DHCP */ + + #if( ipconfigDNS_USE_CALLBACKS != 0 ) + { + extern void vDNSCheckCallBack( void *pvSearchID ); + + /* Is it time for DNS processing? */ + if( prvIPTimerCheck( &xDNSTimer ) != pdFALSE ) + { + vDNSCheckCallBack( NULL ); + } + } + #endif /* ipconfigDNS_USE_CALLBACKS */ + + #if( ipconfigUSE_TCP == 1 ) + { + BaseType_t xWillSleep; + TickType_t xNextTime; + BaseType_t xCheckTCPSockets; + + if( uxQueueMessagesWaiting( xNetworkEventQueue ) == 0u ) + { + xWillSleep = pdTRUE; + } + else + { + xWillSleep = pdFALSE; + } + + /* Sockets need to be checked if the TCP timer has expired. */ + xCheckTCPSockets = prvIPTimerCheck( &xTCPTimer ); + + /* Sockets will also be checked if there are TCP messages but the + message queue is empty (indicated by xWillSleep being true). */ + if( ( xProcessedTCPMessage != pdFALSE ) && ( xWillSleep != pdFALSE ) ) + { + xCheckTCPSockets = pdTRUE; + } + + if( xCheckTCPSockets != pdFALSE ) + { + /* Attend to the sockets, returning the period after which the + check must be repeated. */ + xNextTime = xTCPTimerCheck( xWillSleep ); + prvIPTimerStart( &xTCPTimer, xNextTime ); + xProcessedTCPMessage = 0; + } + } + #endif /* ipconfigUSE_TCP == 1 */ +} +/*-----------------------------------------------------------*/ + +static void prvIPTimerStart( IPTimer_t *pxTimer, TickType_t xTime ) +{ + vTaskSetTimeOutState( &pxTimer->xTimeOut ); + pxTimer->ulRemainingTime = xTime; + + if( xTime == ( TickType_t ) 0 ) + { + pxTimer->bExpired = pdTRUE_UNSIGNED; + } + else + { + pxTimer->bExpired = pdFALSE_UNSIGNED; + } + + pxTimer->bActive = pdTRUE_UNSIGNED; +} +/*-----------------------------------------------------------*/ + +static void prvIPTimerReload( IPTimer_t *pxTimer, TickType_t xTime ) +{ + pxTimer->ulReloadTime = xTime; + prvIPTimerStart( pxTimer, xTime ); +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvIPTimerCheck( IPTimer_t *pxTimer ) +{ +BaseType_t xReturn; + + if( pxTimer->bActive == pdFALSE_UNSIGNED ) + { + /* The timer is not enabled. */ + xReturn = pdFALSE; + } + else + { + /* The timer might have set the bExpired flag already, if not, check the + value of xTimeOut against ulRemainingTime. */ + if( ( pxTimer->bExpired != pdFALSE_UNSIGNED ) || + ( xTaskCheckForTimeOut( &( pxTimer->xTimeOut ), &( pxTimer->ulRemainingTime ) ) != pdFALSE ) ) + { + prvIPTimerStart( pxTimer, pxTimer->ulReloadTime ); + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_NetworkDown( void ) +{ +static const IPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL }; +const TickType_t xDontBlock = ( TickType_t ) 0; + + /* Simply send the network task the appropriate event. */ + if( xSendEventStructToIPTask( &xNetworkDownEvent, xDontBlock ) != pdPASS ) + { + /* Could not send the message, so it is still pending. */ + xNetworkDownEventPending = pdTRUE; + } + else + { + /* Message was sent so it is not pending. */ + xNetworkDownEventPending = pdFALSE; + } + + iptraceNETWORK_DOWN(); +} +/*-----------------------------------------------------------*/ + +BaseType_t FreeRTOS_NetworkDownFromISR( void ) +{ +static const IPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL }; +BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + /* Simply send the network task the appropriate event. */ + if( xQueueSendToBackFromISR( xNetworkEventQueue, &xNetworkDownEvent, &xHigherPriorityTaskWoken ) != pdPASS ) + { + xNetworkDownEventPending = pdTRUE; + } + else + { + xNetworkDownEventPending = pdFALSE; + } + + iptraceNETWORK_DOWN(); + + return xHigherPriorityTaskWoken; +} +/*-----------------------------------------------------------*/ + +void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) +{ +NetworkBufferDescriptor_t *pxNetworkBuffer; +void *pvReturn; + + /* Cap the block time. The reason for this is explained where + ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS is defined (assuming an official + FreeRTOSIPConfig.h header file is being used). */ + if( xBlockTimeTicks > ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ) + { + xBlockTimeTicks = ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS; + } + + /* Obtain a network buffer with the required amount of storage. */ + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( sizeof( UDPPacket_t ) + xRequestedSizeBytes, xBlockTimeTicks ); + + if( pxNetworkBuffer != NULL ) + { + /* Set the actual packet size in case a bigger buffer was returned. */ + pxNetworkBuffer->xDataLength = sizeof( UDPPacket_t ) + xRequestedSizeBytes; + + /* Leave space for the UPD header. */ + pvReturn = ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ); + } + else + { + pvReturn = NULL; + } + + return ( void * ) pvReturn; +} +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t *pxDuplicateNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer, + size_t uxNewLength ) +{ +NetworkBufferDescriptor_t * pxNewBuffer; + + /* This function is only used when 'ipconfigZERO_COPY_TX_DRIVER' is set to 1. + The transmit routine wants to have ownership of the network buffer + descriptor, because it will pass the buffer straight to DMA. */ + pxNewBuffer = pxGetNetworkBufferWithDescriptor( uxNewLength, ( TickType_t ) 0 ); + + if( pxNewBuffer != NULL ) + { + /* Set the actual packet size in case a bigger buffer than requested + was returned. */ + pxNewBuffer->xDataLength = uxNewLength; + + /* Copy the original packet information. */ + pxNewBuffer->ulIPAddress = pxNetworkBuffer->ulIPAddress; + pxNewBuffer->usPort = pxNetworkBuffer->usPort; + pxNewBuffer->usBoundPort = pxNetworkBuffer->usBoundPort; + memcpy( pxNewBuffer->pucEthernetBuffer, pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength ); + } + + return pxNewBuffer; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) || ( ipconfigZERO_COPY_RX_DRIVER != 0 ) + + NetworkBufferDescriptor_t *pxPacketBuffer_to_NetworkBuffer( const void *pvBuffer ) + { + uint8_t *pucBuffer; + NetworkBufferDescriptor_t *pxResult; + + if( pvBuffer == NULL ) + { + pxResult = NULL; + } + else + { + /* Obtain the network buffer from the zero copy pointer. */ + pucBuffer = ( uint8_t * ) pvBuffer; + + /* The input here is a pointer to a payload buffer. Subtract the + size of the header in the network buffer, usually 8 + 2 bytes. */ + pucBuffer -= ipBUFFER_PADDING; + + /* Here a pointer was placed to the network descriptor. As a + pointer is dereferenced, make sure it is well aligned. */ + if( ( ( ( uint32_t ) pucBuffer ) & ( sizeof( pucBuffer ) - ( size_t ) 1 ) ) == ( uint32_t ) 0 ) + { + pxResult = * ( ( NetworkBufferDescriptor_t ** ) pucBuffer ); + } + else + { + pxResult = NULL; + } + } + + return pxResult; + } + +#endif /* ipconfigZERO_COPY_TX_DRIVER != 0 */ +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t *pxUDPPayloadBuffer_to_NetworkBuffer( void *pvBuffer ) +{ +uint8_t *pucBuffer; +NetworkBufferDescriptor_t *pxResult; + + if( pvBuffer == NULL ) + { + pxResult = NULL; + } + else + { + /* Obtain the network buffer from the zero copy pointer. */ + pucBuffer = ( uint8_t * ) pvBuffer; + + /* The input here is a pointer to a payload buffer. Subtract + the total size of a UDP/IP header plus the size of the header in + the network buffer, usually 8 + 2 bytes. */ + pucBuffer -= ( sizeof( UDPPacket_t ) + ipBUFFER_PADDING ); + + /* Here a pointer was placed to the network descriptor, + As a pointer is dereferenced, make sure it is well aligned */ + if( ( ( ( uint32_t ) pucBuffer ) & ( sizeof( pucBuffer ) - 1 ) ) == 0 ) + { + /* The following statement may trigger a: + warning: cast increases required alignment of target type [-Wcast-align]. + It has been confirmed though that the alignment is suitable. */ + pxResult = * ( ( NetworkBufferDescriptor_t ** ) pucBuffer ); + } + else + { + pxResult = NULL; + } + } + + return pxResult; +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_ReleaseUDPPayloadBuffer( void *pvBuffer ) +{ + vReleaseNetworkBufferAndDescriptor( pxUDPPayloadBuffer_to_NetworkBuffer( pvBuffer ) ); +} +/*-----------------------------------------------------------*/ + +/*_RB_ Should we add an error or assert if the task priorities are set such that the servers won't function as expected? */ +/*_HT_ There was a bug in FreeRTOS_TCP_IP.c that only occurred when the applications' priority was too high. + As that bug has been repaired, there is not an urgent reason to warn. + It is better though to use the advised priority scheme. */ +BaseType_t FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ) +{ +BaseType_t xReturn = pdFALSE; + + /* This function should only be called once. */ + configASSERT( xIPIsNetworkTaskReady() == pdFALSE ); + configASSERT( xNetworkEventQueue == NULL ); + configASSERT( xIPTaskHandle == NULL ); + + /* Check structure packing is correct. */ + configASSERT( sizeof( EthernetHeader_t ) == ipEXPECTED_EthernetHeader_t_SIZE ); + configASSERT( sizeof( ARPHeader_t ) == ipEXPECTED_ARPHeader_t_SIZE ); + configASSERT( sizeof( IPHeader_t ) == ipEXPECTED_IPHeader_t_SIZE ); + configASSERT( sizeof( ICMPHeader_t ) == ipEXPECTED_ICMPHeader_t_SIZE ); + configASSERT( sizeof( UDPHeader_t ) == ipEXPECTED_UDPHeader_t_SIZE ); + + /* Attempt to create the queue used to communicate with the IP task. */ + xNetworkEventQueue = xQueueCreate( ( UBaseType_t ) ipconfigEVENT_QUEUE_LENGTH, ( UBaseType_t ) sizeof( IPStackEvent_t ) ); + configASSERT( xNetworkEventQueue ); + + if( xNetworkEventQueue != NULL ) + { + #if ( configQUEUE_REGISTRY_SIZE > 0 ) + { + /* A queue registry is normally used to assist a kernel aware + debugger. If one is in use then it will be helpful for the debugger + to show information about the network event queue. */ + vQueueAddToRegistry( xNetworkEventQueue, "NetEvnt" ); + } + #endif /* configQUEUE_REGISTRY_SIZE */ + + if( xNetworkBuffersInitialise() == pdPASS ) + { + /* Store the local IP and MAC address. */ + xNetworkAddressing.ulDefaultIPAddress = FreeRTOS_inet_addr_quick( ucIPAddress[ 0 ], ucIPAddress[ 1 ], ucIPAddress[ 2 ], ucIPAddress[ 3 ] ); + xNetworkAddressing.ulNetMask = FreeRTOS_inet_addr_quick( ucNetMask[ 0 ], ucNetMask[ 1 ], ucNetMask[ 2 ], ucNetMask[ 3 ] ); + xNetworkAddressing.ulGatewayAddress = FreeRTOS_inet_addr_quick( ucGatewayAddress[ 0 ], ucGatewayAddress[ 1 ], ucGatewayAddress[ 2 ], ucGatewayAddress[ 3 ] ); + xNetworkAddressing.ulDNSServerAddress = FreeRTOS_inet_addr_quick( ucDNSServerAddress[ 0 ], ucDNSServerAddress[ 1 ], ucDNSServerAddress[ 2 ], ucDNSServerAddress[ 3 ] ); + xNetworkAddressing.ulBroadcastAddress = ( xNetworkAddressing.ulDefaultIPAddress & xNetworkAddressing.ulNetMask ) | ~xNetworkAddressing.ulNetMask; + + memcpy( &xDefaultAddressing, &xNetworkAddressing, sizeof( xDefaultAddressing ) ); + + #if ipconfigUSE_DHCP == 1 + { + /* The IP address is not set until DHCP completes. */ + *ipLOCAL_IP_ADDRESS_POINTER = 0x00UL; + } + #else + { + /* The IP address is set from the value passed in. */ + *ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress; + + /* Added to prevent ARP flood to gateway. Ensure the + gateway is on the same subnet as the IP address. */ + if( xNetworkAddressing.ulGatewayAddress != 0ul ) + { + configASSERT( ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) == ( xNetworkAddressing.ulGatewayAddress & xNetworkAddressing.ulNetMask ) ); + } + } + #endif /* ipconfigUSE_DHCP == 1 */ + + /* The MAC address is stored in the start of the default packet + header fragment, which is used when sending UDP packets. */ + memcpy( ( void * ) ipLOCAL_MAC_ADDRESS, ( void * ) ucMACAddress, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); + + /* Prepare the sockets interface. */ + xReturn = vNetworkSocketsInit(); + + if( pdTRUE == xReturn ) + { + /* Create the task that processes Ethernet and stack events. */ + xReturn = xTaskCreate( prvIPTask, "IP-task", ( uint16_t )ipconfigIP_TASK_STACK_SIZE_WORDS, NULL, ( UBaseType_t )ipconfigIP_TASK_PRIORITY, &xIPTaskHandle ); + } + } + else + { + FreeRTOS_debug_printf( ( "FreeRTOS_IPInit: xNetworkBuffersInitialise() failed\n") ); + + /* Clean up. */ + vQueueDelete( xNetworkEventQueue ); + xNetworkEventQueue = NULL; + } + } + else + { + FreeRTOS_debug_printf( ( "FreeRTOS_IPInit: Network event queue could not be created\n") ); + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetMask, uint32_t *pulGatewayAddress, uint32_t *pulDNSServerAddress ) +{ + /* Return the address configuration to the caller. */ + + if( pulIPAddress != NULL ) + { + *pulIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; + } + + if( pulNetMask != NULL ) + { + *pulNetMask = xNetworkAddressing.ulNetMask; + } + + if( pulGatewayAddress != NULL ) + { + *pulGatewayAddress = xNetworkAddressing.ulGatewayAddress; + } + + if( pulDNSServerAddress != NULL ) + { + *pulDNSServerAddress = xNetworkAddressing.ulDNSServerAddress; + } +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_SetAddressConfiguration( const uint32_t *pulIPAddress, const uint32_t *pulNetMask, const uint32_t *pulGatewayAddress, const uint32_t *pulDNSServerAddress ) +{ + /* Update the address configuration. */ + + if( pulIPAddress != NULL ) + { + *ipLOCAL_IP_ADDRESS_POINTER = *pulIPAddress; + } + + if( pulNetMask != NULL ) + { + xNetworkAddressing.ulNetMask = *pulNetMask; + } + + if( pulGatewayAddress != NULL ) + { + xNetworkAddressing.ulGatewayAddress = *pulGatewayAddress; + } + + if( pulDNSServerAddress != NULL ) + { + xNetworkAddressing.ulDNSServerAddress = *pulDNSServerAddress; + } +} +/*-----------------------------------------------------------*/ + +#if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + + BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks ) + { + NetworkBufferDescriptor_t *pxNetworkBuffer; + ICMPHeader_t *pxICMPHeader; + BaseType_t xReturn = pdFAIL; + static uint16_t usSequenceNumber = 0; + uint8_t *pucChar; + IPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL }; + + if( (xNumberOfBytesToSend >= 1 ) && ( xNumberOfBytesToSend < ( ( ipconfigNETWORK_MTU - sizeof( IPHeader_t ) ) - sizeof( ICMPHeader_t ) ) ) && ( uxGetNumberOfFreeNetworkBuffers() >= 3 ) ) + { + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( xNumberOfBytesToSend + sizeof( ICMPPacket_t ), xBlockTimeTicks ); + + if( pxNetworkBuffer != NULL ) + { + pxICMPHeader = ( ICMPHeader_t * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipIP_PAYLOAD_OFFSET ] ); + usSequenceNumber++; + + /* Fill in the basic header information. */ + pxICMPHeader->ucTypeOfMessage = ipICMP_ECHO_REQUEST; + pxICMPHeader->ucTypeOfService = 0; + pxICMPHeader->usIdentifier = usSequenceNumber; + pxICMPHeader->usSequenceNumber = usSequenceNumber; + + /* Find the start of the data. */ + pucChar = ( uint8_t * ) pxICMPHeader; + pucChar += sizeof( ICMPHeader_t ); + + /* Just memset the data to a fixed value. */ + memset( ( void * ) pucChar, ( int ) ipECHO_DATA_FILL_BYTE, xNumberOfBytesToSend ); + + /* The message is complete, IP and checksum's are handled by + vProcessGeneratedUDPPacket */ + pxNetworkBuffer->pucEthernetBuffer[ ipSOCKET_OPTIONS_OFFSET ] = FREERTOS_SO_UDPCKSUM_OUT; + pxNetworkBuffer->ulIPAddress = ulIPAddress; + pxNetworkBuffer->usPort = ipPACKET_CONTAINS_ICMP_DATA; + /* xDataLength is the size of the total packet, including the Ethernet header. */ + pxNetworkBuffer->xDataLength = xNumberOfBytesToSend + sizeof( ICMPPacket_t ); + + /* Send to the stack. */ + xStackTxEvent.pvData = pxNetworkBuffer; + + if( xSendEventStructToIPTask( &xStackTxEvent, xBlockTimeTicks) != pdPASS ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + iptraceSTACK_TX_EVENT_LOST( ipSTACK_TX_EVENT ); + } + else + { + xReturn = usSequenceNumber; + } + } + } + else + { + /* The requested number of bytes will not fit in the available space + in the network buffer. */ + } + + return xReturn; + } + +#endif /* ipconfigSUPPORT_OUTGOING_PINGS == 1 */ +/*-----------------------------------------------------------*/ + +BaseType_t xSendEventToIPTask( eIPEvent_t eEvent ) +{ +IPStackEvent_t xEventMessage; +const TickType_t xDontBlock = ( TickType_t ) 0; + + xEventMessage.eEventType = eEvent; + xEventMessage.pvData = ( void* )NULL; + + return xSendEventStructToIPTask( &xEventMessage, xDontBlock ); +} +/*-----------------------------------------------------------*/ + +BaseType_t xSendEventStructToIPTask( const IPStackEvent_t *pxEvent, TickType_t xTimeout ) +{ +BaseType_t xReturn, xSendMessage; + + if( ( xIPIsNetworkTaskReady() == pdFALSE ) && ( pxEvent->eEventType != eNetworkDownEvent ) ) + { + /* Only allow eNetworkDownEvent events if the IP task is not ready + yet. Not going to attempt to send the message so the send failed. */ + xReturn = pdFAIL; + } + else + { + xSendMessage = pdTRUE; + + #if( ipconfigUSE_TCP == 1 ) + { + if( pxEvent->eEventType == eTCPTimerEvent ) + { + /* TCP timer events are sent to wake the timer task when + xTCPTimer has expired, but there is no point sending them if the + IP task is already awake processing other message. */ + xTCPTimer.bExpired = pdTRUE_UNSIGNED; + + if( uxQueueMessagesWaiting( xNetworkEventQueue ) != 0u ) + { + /* Not actually going to send the message but this is not a + failure as the message didn't need to be sent. */ + xSendMessage = pdFALSE; + } + } + } + #endif /* ipconfigUSE_TCP */ + + if( xSendMessage != pdFALSE ) + { + /* The IP task cannot block itself while waiting for itself to + respond. */ + if( ( xIsCallingFromIPTask() == pdTRUE ) && ( xTimeout > ( TickType_t ) 0 ) ) + { + xTimeout = ( TickType_t ) 0; + } + + xReturn = xQueueSendToBack( xNetworkEventQueue, pxEvent, xTimeout ); + + if( xReturn == pdFAIL ) + { + /* A message should have been sent to the IP task, but wasn't. */ + FreeRTOS_debug_printf( ( "xSendEventStructToIPTask: CAN NOT ADD %d\n", pxEvent->eEventType ) ); + iptraceSTACK_TX_EVENT_LOST( pxEvent->eEventType ); + } + } + else + { + /* It was not necessary to send the message to process the event so + even though the message was not sent the call was successful. */ + xReturn = pdPASS; + } + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +eFrameProcessingResult_t eConsiderFrameForProcessing( const uint8_t * const pucEthernetBuffer ) +{ +eFrameProcessingResult_t eReturn; +const EthernetHeader_t *pxEthernetHeader; + + pxEthernetHeader = ( const EthernetHeader_t * ) pucEthernetBuffer; + + if( memcmp( ( void * ) ipLOCAL_MAC_ADDRESS, ( void * ) &( pxEthernetHeader->xDestinationAddress ), sizeof( MACAddress_t ) ) == 0 ) + { + /* The packet was directed to this node directly - process it. */ + eReturn = eProcessBuffer; + } + else if( memcmp( ( void * ) xBroadcastMACAddress.ucBytes, ( void * ) pxEthernetHeader->xDestinationAddress.ucBytes, sizeof( MACAddress_t ) ) == 0 ) + { + /* The packet was a broadcast - process it. */ + eReturn = eProcessBuffer; + } + else +#if( ipconfigUSE_LLMNR == 1 ) + if( memcmp( ( void * ) xLLMNR_MacAdress.ucBytes, ( void * ) pxEthernetHeader->xDestinationAddress.ucBytes, sizeof( MACAddress_t ) ) == 0 ) + { + /* The packet is a request for LLMNR - process it. */ + eReturn = eProcessBuffer; + } + else +#endif /* ipconfigUSE_LLMNR */ + { + /* The packet was not a broadcast, or for this node, just release + the buffer without taking any other action. */ + eReturn = eReleaseBuffer; + } + + #if( ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES == 1 ) + { + uint16_t usFrameType; + + if( eReturn == eProcessBuffer ) + { + usFrameType = pxEthernetHeader->usFrameType; + usFrameType = FreeRTOS_ntohs( usFrameType ); + + if( usFrameType <= 0x600U ) + { + /* Not an Ethernet II frame. */ + eReturn = eReleaseBuffer; + } + } + } + #endif /* ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES == 1 */ + + return eReturn; +} +/*-----------------------------------------------------------*/ + +static void prvProcessNetworkDownEvent( void ) +{ + /* Stop the ARP timer while there is no network. */ + xARPTimer.bActive = pdFALSE_UNSIGNED; + + #if ipconfigUSE_NETWORK_EVENT_HOOK == 1 + { + static BaseType_t xCallEventHook = pdFALSE; + + /* The first network down event is generated by the IP stack itself to + initialise the network hardware, so do not call the network down event + the first time through. */ + if( xCallEventHook == pdTRUE ) + { + vApplicationIPNetworkEventHook( eNetworkDown ); + } + xCallEventHook = pdTRUE; + } + #endif + + /* Per the ARP Cache Validation section of https://tools.ietf.org/html/rfc1122, + treat network down as a "delivery problem" and flush the ARP cache for this + interface. */ + FreeRTOS_ClearARP( ); + + /* The network has been disconnected (or is being initialised for the first + time). Perform whatever hardware processing is necessary to bring it up + again, or wait for it to be available again. This is hardware dependent. */ + if( xNetworkInterfaceInitialise() != pdPASS ) + { + /* Ideally the network interface initialisation function will only + return when the network is available. In case this is not the case, + wait a while before retrying the initialisation. */ + vTaskDelay( ipINITIALISATION_RETRY_DELAY ); + FreeRTOS_NetworkDown(); + } + else + { + /* Set remaining time to 0 so it will become active immediately. */ + #if ipconfigUSE_DHCP == 1 + { + /* The network is not up until DHCP has completed. */ + vDHCPProcess( pdTRUE ); + xSendEventToIPTask( eDHCPEvent ); + } + #else + { + /* Perform any necessary 'network up' processing. */ + vIPNetworkUpCalls(); + } + #endif + } +} +/*-----------------------------------------------------------*/ + +void vIPNetworkUpCalls( void ) +{ + xNetworkUp = pdTRUE; + + #if( ipconfigUSE_NETWORK_EVENT_HOOK == 1 ) + { + vApplicationIPNetworkEventHook( eNetworkUp ); + } + #endif /* ipconfigUSE_NETWORK_EVENT_HOOK */ + + #if( ipconfigDNS_USE_CALLBACKS != 0 ) + { + /* The following function is declared in FreeRTOS_DNS.c and 'private' to + this library */ + extern void vDNSInitialise( void ); + vDNSInitialise(); + } + #endif /* ipconfigDNS_USE_CALLBACKS != 0 */ + + /* Set remaining time to 0 so it will become active immediately. */ + prvIPTimerReload( &xARPTimer, pdMS_TO_TICKS( ipARP_TIMER_PERIOD_MS ) ); +} +/*-----------------------------------------------------------*/ + +static void prvProcessEthernetPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +EthernetHeader_t *pxEthernetHeader; +eFrameProcessingResult_t eReturned = eReleaseBuffer; + + configASSERT( pxNetworkBuffer ); + + /* Interpret the Ethernet frame. */ + if( pxNetworkBuffer->xDataLength >= sizeof( EthernetHeader_t ) ) + { + eReturned = ipCONSIDER_FRAME_FOR_PROCESSING( pxNetworkBuffer->pucEthernetBuffer ); + pxEthernetHeader = ( EthernetHeader_t * )( pxNetworkBuffer->pucEthernetBuffer ); + + if( eReturned == eProcessBuffer ) + { + /* Interpret the received Ethernet packet. */ + switch( pxEthernetHeader->usFrameType ) + { + case ipARP_FRAME_TYPE: + /* The Ethernet frame contains an ARP packet. */ + if( pxNetworkBuffer->xDataLength >= sizeof( ARPPacket_t ) ) + { + eReturned = eARPProcessPacket( ( ARPPacket_t * )pxNetworkBuffer->pucEthernetBuffer ); + } + else + { + eReturned = eReleaseBuffer; + } + break; + + case ipIPv4_FRAME_TYPE: + /* The Ethernet frame contains an IP packet. */ + if( pxNetworkBuffer->xDataLength >= sizeof( IPPacket_t ) ) + { + eReturned = prvProcessIPPacket( ( IPPacket_t * )pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer ); + } + else + { + eReturned = eReleaseBuffer; + } + break; + + default: + /* No other packet types are handled. Nothing to do. */ + eReturned = eReleaseBuffer; + break; + } + } + } + + /* Perform any actions that resulted from processing the Ethernet frame. */ + switch( eReturned ) + { + case eReturnEthernetFrame : + /* The Ethernet frame will have been updated (maybe it was + an ARP request or a PING request?) and should be sent back to + its source. */ + vReturnEthernetFrame( pxNetworkBuffer, pdTRUE ); + /* parameter pdTRUE: the buffer must be released once + the frame has been transmitted */ + break; + + case eFrameConsumed : + /* The frame is in use somewhere, don't release the buffer + yet. */ + break; + + default : + /* The frame is not being used anywhere, and the + NetworkBufferDescriptor_t structure containing the frame should + just be released back to the list of free buffers. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + break; + } +} +/*-----------------------------------------------------------*/ + +static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPPacket, + NetworkBufferDescriptor_t * const pxNetworkBuffer, UBaseType_t uxHeaderLength ) +{ +eFrameProcessingResult_t eReturn = eProcessBuffer; + +#if( ( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 0 ) || ( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 ) ) + const IPHeader_t * pxIPHeader = &( pxIPPacket->xIPHeader ); +#else + /* or else, the parameter won't be used and the function will be optimised + away */ + ( void ) pxIPPacket; +#endif + + #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 0 ) + { + /* In systems with a very small amount of RAM, it might be advantageous + to have incoming messages checked earlier, by the network card driver. + This method may decrease the usage of sparse network buffers. */ + uint32_t ulDestinationIPAddress = pxIPHeader->ulDestinationIPAddress; + + /* Ensure that the incoming packet is not fragmented (only outgoing + packets can be fragmented) as these are the only handled IP frames + currently. */ + if( ( pxIPHeader->usFragmentOffset & ipFRAGMENT_OFFSET_BIT_MASK ) != 0U ) + { + /* Can not handle, fragmented packet. */ + eReturn = eReleaseBuffer; + } + /* 0x45 means: IPv4 with an IP header of 5 x 4 = 20 bytes + * 0x47 means: IPv4 with an IP header of 7 x 4 = 28 bytes */ + else if( ( pxIPHeader->ucVersionHeaderLength < 0x45u ) || ( pxIPHeader->ucVersionHeaderLength > 0x4Fu ) ) + { + /* Can not handle, unknown or invalid header version. */ + eReturn = eReleaseBuffer; + } + /* Is the packet for this IP address? */ + else if( ( ulDestinationIPAddress != *ipLOCAL_IP_ADDRESS_POINTER ) && + /* Is it the global broadcast address 255.255.255.255 ? */ + ( ulDestinationIPAddress != ipBROADCAST_IP_ADDRESS ) && + /* Is it a specific broadcast address 192.168.1.255 ? */ + ( ulDestinationIPAddress != xNetworkAddressing.ulBroadcastAddress ) && + #if( ipconfigUSE_LLMNR == 1 ) + /* Is it the LLMNR multicast address? */ + ( ulDestinationIPAddress != ipLLMNR_IP_ADDR ) && + #endif + /* Or (during DHCP negotiation) we have no IP-address yet? */ + ( *ipLOCAL_IP_ADDRESS_POINTER != 0UL ) ) + { + /* Packet is not for this node, release it */ + eReturn = eReleaseBuffer; + } + } + #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ + + #if( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 ) + { + /* Some drivers of NIC's with checksum-offloading will enable the above + define, so that the checksum won't be checked again here */ + if (eReturn == eProcessBuffer ) + { + /* Is the IP header checksum correct? */ + if( ( pxIPHeader->ucProtocol != ( uint8_t ) ipPROTOCOL_ICMP ) && + ( usGenerateChecksum( 0UL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ( size_t ) uxHeaderLength ) != ipCORRECT_CRC ) ) + { + /* Check sum in IP-header not correct. */ + eReturn = eReleaseBuffer; + } + /* Is the upper-layer checksum (TCP/UDP/ICMP) correct? */ + else if( usGenerateProtocolChecksum( ( uint8_t * )( pxNetworkBuffer->pucEthernetBuffer ), pxNetworkBuffer->xDataLength, pdFALSE ) != ipCORRECT_CRC ) + { + /* Protocol checksum not accepted. */ + eReturn = eReleaseBuffer; + } + } + } + #else + { + /* to avoid warning unused parameters */ + ( void ) pxNetworkBuffer; + ( void ) uxHeaderLength; + } + #endif /* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 */ + + return eReturn; +} +/*-----------------------------------------------------------*/ + +static eFrameProcessingResult_t prvProcessIPPacket( IPPacket_t * const pxIPPacket, NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +eFrameProcessingResult_t eReturn; +IPHeader_t * pxIPHeader = &( pxIPPacket->xIPHeader ); +UBaseType_t uxHeaderLength = ( UBaseType_t ) ( ( pxIPHeader->ucVersionHeaderLength & 0x0Fu ) << 2 ); +uint8_t ucProtocol; + + /* Bound the calculated header length: take away the Ethernet header size, + then check if the IP header is claiming to be longer than the remaining + total packet size. Also check for minimal header field length. */ + if( ( uxHeaderLength > ( pxNetworkBuffer->xDataLength - ipSIZE_OF_ETH_HEADER ) ) || + ( uxHeaderLength < ipSIZE_OF_IPv4_HEADER ) ) + { + return eReleaseBuffer; + } + + ucProtocol = pxIPPacket->xIPHeader.ucProtocol; + /* Check if the IP headers are acceptable and if it has our destination. */ + eReturn = prvAllowIPPacket( pxIPPacket, pxNetworkBuffer, uxHeaderLength ); + + if( eReturn == eProcessBuffer ) + { + if( uxHeaderLength > ipSIZE_OF_IPv4_HEADER ) + { + /* All structs of headers expect a IP header size of 20 bytes + * IP header options were included, we'll ignore them and cut them out + * Note: IP options are mostly use in Multi-cast protocols */ + const size_t optlen = ( ( size_t ) uxHeaderLength ) - ipSIZE_OF_IPv4_HEADER; + /* From: the previous start of UDP/ICMP/TCP data */ + uint8_t *pucSource = ( uint8_t* )(pxNetworkBuffer->pucEthernetBuffer + sizeof( EthernetHeader_t ) + uxHeaderLength); + /* To: the usual start of UDP/ICMP/TCP data at offset 20 from IP header */ + uint8_t *pucTarget = ( uint8_t* )(pxNetworkBuffer->pucEthernetBuffer + sizeof( EthernetHeader_t ) + ipSIZE_OF_IPv4_HEADER); + /* How many: total length minus the options and the lower headers */ + const size_t xMoveLen = pxNetworkBuffer->xDataLength - optlen - ipSIZE_OF_IPv4_HEADER - ipSIZE_OF_ETH_HEADER; + + memmove( pucTarget, pucSource, xMoveLen ); + pxNetworkBuffer->xDataLength -= optlen; + + /* Fix-up new version/header length field in IP packet. */ + pxIPHeader->ucVersionHeaderLength = ( pxIPHeader->ucVersionHeaderLength & 0xF0 ) | /* High nibble is the version. */ + ( ( ipSIZE_OF_IPv4_HEADER >> 2 ) & 0x0F ); /* Low nibble is the header size, in bytes, divided by four. */ + } + + /* Add the IP and MAC addresses to the ARP table if they are not + already there - otherwise refresh the age of the existing + entry. */ + if( ucProtocol != ( uint8_t ) ipPROTOCOL_UDP ) + { + /* Refresh the ARP cache with the IP/MAC-address of the received packet + * For UDP packets, this will be done later in xProcessReceivedUDPPacket() + * as soon as know that the message will be handled by someone + * This will prevent that the ARP cache will get overwritten + * with the IP-address of useless broadcast packets + */ + vARPRefreshCacheEntry( &( pxIPPacket->xEthernetHeader.xSourceAddress ), pxIPHeader->ulSourceIPAddress ); + } + switch( ucProtocol ) + { + case ipPROTOCOL_ICMP : + /* The IP packet contained an ICMP frame. Don't bother + checking the ICMP checksum, as if it is wrong then the + wrong data will also be returned, and the source of the + ping will know something went wrong because it will not + be able to validate what it receives. */ + #if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + { + if( pxNetworkBuffer->xDataLength >= sizeof( ICMPPacket_t ) ) + { + ICMPPacket_t *pxICMPPacket = ( ICMPPacket_t * )( pxNetworkBuffer->pucEthernetBuffer ); + if( pxIPHeader->ulDestinationIPAddress == *ipLOCAL_IP_ADDRESS_POINTER ) + { + eReturn = prvProcessICMPPacket( pxICMPPacket ); + } + } + else + { + eReturn = eReleaseBuffer; + } + } + #endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */ + break; + + case ipPROTOCOL_UDP : + { + /* The IP packet contained a UDP frame. */ + UDPPacket_t *pxUDPPacket = ( UDPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); + + /* Only proceed if the payload length indicated in the header + appears to be valid. */ + if ( ( pxNetworkBuffer->xDataLength >= sizeof( UDPPacket_t ) ) && ( FreeRTOS_ntohs( pxUDPPacket->xUDPHeader.usLength ) >= sizeof( UDPHeader_t ) ) ) + { + size_t uxPayloadSize_1, uxPayloadSize_2; + /* The UDP payload size can be calculated by subtracting the + * header size from `xDataLength`. + * However, the `xDataLength` may be longer that expected, + * e.g. when a small packet is padded with zero's. + * The UDP header contains a field `usLength` reflecting + * the payload size plus the UDP header ( 8 bytes ). + * Set `xDataLength` to the size of the headers, + * plus the lower of the two calculated payload sizes. + */ + + uxPayloadSize_1 = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); + uxPayloadSize_2 = FreeRTOS_ntohs( pxUDPPacket->xUDPHeader.usLength ) - sizeof( UDPHeader_t ); + if( uxPayloadSize_1 > uxPayloadSize_2 ) + { + pxNetworkBuffer->xDataLength = uxPayloadSize_2 + sizeof( UDPPacket_t ); + } + + /* Fields in pxNetworkBuffer (usPort, ulIPAddress) are network order. */ + pxNetworkBuffer->usPort = pxUDPPacket->xUDPHeader.usSourcePort; + pxNetworkBuffer->ulIPAddress = pxUDPPacket->xIPHeader.ulSourceIPAddress; + + /* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM: + * In some cases, the upper-layer checksum has been calculated + * by the NIC driver. + * + * Pass the packet payload to the UDP sockets implementation. */ + if( xProcessReceivedUDPPacket( pxNetworkBuffer, + pxUDPPacket->xUDPHeader.usDestinationPort ) == pdPASS ) + { + eReturn = eFrameConsumed; + } + } + else + { + eReturn = eReleaseBuffer; + } + } + break; + +#if ipconfigUSE_TCP == 1 + case ipPROTOCOL_TCP : + { + + if( xProcessReceivedTCPPacket( pxNetworkBuffer ) == pdPASS ) + { + eReturn = eFrameConsumed; + } + + /* Setting this variable will cause xTCPTimerCheck() + to be called just before the IP-task blocks. */ + xProcessedTCPMessage++; + } + break; +#endif + default : + /* Not a supported frame type. */ + break; + } + } + + return eReturn; +} +/*-----------------------------------------------------------*/ + +#if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + + static void prvProcessICMPEchoReply( ICMPPacket_t * const pxICMPPacket ) + { + ePingReplyStatus_t eStatus = eSuccess; + uint16_t usDataLength, usCount; + uint8_t *pucByte; + + /* Find the total length of the IP packet. */ + usDataLength = pxICMPPacket->xIPHeader.usLength; + usDataLength = FreeRTOS_ntohs( usDataLength ); + + /* Remove the length of the IP headers to obtain the length of the ICMP + message itself. */ + usDataLength = ( uint16_t ) ( ( ( uint32_t ) usDataLength ) - ipSIZE_OF_IPv4_HEADER ); + + /* Remove the length of the ICMP header, to obtain the length of + data contained in the ping. */ + usDataLength = ( uint16_t ) ( ( ( uint32_t ) usDataLength ) - ipSIZE_OF_ICMP_HEADER ); + + /* Checksum has already been checked before in prvProcessIPPacket */ + + /* Find the first byte of the data within the ICMP packet. */ + pucByte = ( uint8_t * ) pxICMPPacket; + pucByte += sizeof( ICMPPacket_t ); + + /* Check each byte. */ + for( usCount = 0; usCount < usDataLength; usCount++ ) + { + if( *pucByte != ipECHO_DATA_FILL_BYTE ) + { + eStatus = eInvalidData; + break; + } + + pucByte++; + } + + /* Call back into the application to pass it the result. */ + vApplicationPingReplyHook( eStatus, pxICMPPacket->xICMPHeader.usIdentifier ); + } + +#endif +/*-----------------------------------------------------------*/ + +#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) + + static eFrameProcessingResult_t prvProcessICMPEchoRequest( ICMPPacket_t * const pxICMPPacket ) + { + ICMPHeader_t *pxICMPHeader; + IPHeader_t *pxIPHeader; + uint16_t usRequest; + + pxICMPHeader = &( pxICMPPacket->xICMPHeader ); + pxIPHeader = &( pxICMPPacket->xIPHeader ); + + /* HT:endian: changed back */ + iptraceSENDING_PING_REPLY( pxIPHeader->ulSourceIPAddress ); + + /* The checksum can be checked here - but a ping reply should be + returned even if the checksum is incorrect so the other end can + tell that the ping was received - even if the ping reply contains + invalid data. */ + pxICMPHeader->ucTypeOfMessage = ( uint8_t ) ipICMP_ECHO_REPLY; + pxIPHeader->ulDestinationIPAddress = pxIPHeader->ulSourceIPAddress; + pxIPHeader->ulSourceIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; + + /* Update the checksum because the ucTypeOfMessage member in the header + has been changed to ipICMP_ECHO_REPLY. This is faster than calling + usGenerateChecksum(). */ + + /* due to compiler warning "integer operation result is out of range" */ + + usRequest = ( uint16_t ) ( ( uint16_t )ipICMP_ECHO_REQUEST << 8 ); + + if( pxICMPHeader->usChecksum >= FreeRTOS_htons( 0xFFFFu - usRequest ) ) + { + pxICMPHeader->usChecksum = ( uint16_t ) + ( ( ( uint32_t ) pxICMPHeader->usChecksum ) + + FreeRTOS_htons( usRequest + 1UL ) ); + } + else + { + pxICMPHeader->usChecksum = ( uint16_t ) + ( ( ( uint32_t ) pxICMPHeader->usChecksum ) + + FreeRTOS_htons( usRequest ) ); + } + return eReturnEthernetFrame; + } + +#endif /* ipconfigREPLY_TO_INCOMING_PINGS == 1 */ +/*-----------------------------------------------------------*/ + +#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + + static eFrameProcessingResult_t prvProcessICMPPacket( ICMPPacket_t * const pxICMPPacket ) + { + eFrameProcessingResult_t eReturn = eReleaseBuffer; + + iptraceICMP_PACKET_RECEIVED(); + switch( pxICMPPacket->xICMPHeader.ucTypeOfMessage ) + { + case ipICMP_ECHO_REQUEST : + #if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) + { + eReturn = prvProcessICMPEchoRequest( pxICMPPacket ); + } + #endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) */ + break; + + case ipICMP_ECHO_REPLY : + #if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + { + prvProcessICMPEchoReply( pxICMPPacket ); + } + #endif /* ipconfigSUPPORT_OUTGOING_PINGS */ + break; + + default : + break; + } + + return eReturn; + } + +#endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */ +/*-----------------------------------------------------------*/ + +uint16_t usGenerateProtocolChecksum( const uint8_t * const pucEthernetBuffer, size_t uxBufferLength, BaseType_t xOutgoingPacket ) +{ +uint32_t ulLength; +uint16_t usChecksum, *pusChecksum; +const IPPacket_t * pxIPPacket; +UBaseType_t uxIPHeaderLength; +ProtocolPacket_t *pxProtPack; +uint8_t ucProtocol; +#if( ipconfigHAS_DEBUG_PRINTF != 0 ) + const char *pcType; +#endif + + /* Check for minimum packet size. */ + if( uxBufferLength < sizeof( IPPacket_t ) ) + { + return ipINVALID_LENGTH; + } + + /* Parse the packet length. */ + pxIPPacket = ( const IPPacket_t * ) pucEthernetBuffer; + + /* Per https://tools.ietf.org/html/rfc791, the four-bit Internet Header + Length field contains the length of the internet header in 32-bit words. */ + uxIPHeaderLength = ( UBaseType_t ) ( sizeof( uint32_t ) * ( pxIPPacket->xIPHeader.ucVersionHeaderLength & 0x0Fu ) ); + + /* Check for minimum packet size. */ + if( uxBufferLength < sizeof( IPPacket_t ) + uxIPHeaderLength - ipSIZE_OF_IPv4_HEADER ) + { + return ipINVALID_LENGTH; + } + if( uxBufferLength < ( size_t ) ( ipSIZE_OF_ETH_HEADER + FreeRTOS_ntohs( pxIPPacket->xIPHeader.usLength ) ) ) + { + return ipINVALID_LENGTH; + } + + /* Identify the next protocol. */ + ucProtocol = pxIPPacket->xIPHeader.ucProtocol; + + /* N.B., if this IP packet header includes Options, then the following + assignment results in a pointer into the protocol packet with the Ethernet + and IP headers incorrectly aligned. However, either way, the "third" + protocol (Layer 3 or 4) header will be aligned, which is the convenience + of this calculation. */ + pxProtPack = ( ProtocolPacket_t * ) ( pucEthernetBuffer + ( uxIPHeaderLength - ipSIZE_OF_IPv4_HEADER ) ); + + /* Switch on the Layer 3/4 protocol. */ + if( ucProtocol == ( uint8_t ) ipPROTOCOL_UDP ) + { + if( uxBufferLength < ( uxIPHeaderLength + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_UDP_HEADER ) ) + { + return ipINVALID_LENGTH; + } + + pusChecksum = ( uint16_t * ) ( &( pxProtPack->xUDPPacket.xUDPHeader.usChecksum ) ); + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + pcType = "UDP"; + } + #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + } + else if( ucProtocol == ( uint8_t ) ipPROTOCOL_TCP ) + { + if( uxBufferLength < ( uxIPHeaderLength + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_TCP_HEADER ) ) + { + return ipINVALID_LENGTH; + } + + pusChecksum = ( uint16_t * ) ( &( pxProtPack->xTCPPacket.xTCPHeader.usChecksum ) ); + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + pcType = "TCP"; + } + #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + } + else if( ( ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) || + ( ucProtocol == ( uint8_t ) ipPROTOCOL_IGMP ) ) + { + if( uxBufferLength < ( uxIPHeaderLength + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_ICMP_HEADER ) ) + { + return ipINVALID_LENGTH; + } + + pusChecksum = ( uint16_t * ) ( &( pxProtPack->xICMPPacket.xICMPHeader.usChecksum ) ); + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + if( ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) + { + pcType = "ICMP"; + } + else + { + pcType = "IGMP"; + } + } + #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + } + else + { + /* Unhandled protocol, other than ICMP, IGMP, UDP, or TCP. */ + return ipUNHANDLED_PROTOCOL; + } + + /* The protocol and checksum field have been identified. Check the direction + of the packet. */ + if( xOutgoingPacket != pdFALSE ) + { + /* This is an outgoing packet. Before calculating the checksum, set it + to zero. */ + *( pusChecksum ) = 0u; + } + else if( ( *pusChecksum == 0u ) && ( ucProtocol == ( uint8_t ) ipPROTOCOL_UDP ) ) + { + /* Sender hasn't set the checksum, no use to calculate it. */ + return ipCORRECT_CRC; + } + + ulLength = ( uint32_t ) + ( FreeRTOS_ntohs( pxIPPacket->xIPHeader.usLength ) - ( ( uint16_t ) uxIPHeaderLength ) ); /* normally minus 20 */ + + if( ( ulLength < sizeof( pxProtPack->xUDPPacket.xUDPHeader ) ) || + ( ulLength > ( uint32_t )( ipconfigNETWORK_MTU - uxIPHeaderLength ) ) ) + { + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + FreeRTOS_debug_printf( ( "usGenerateProtocolChecksum[%s]: len invalid: %lu\n", pcType, ulLength ) ); + } + #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + + /* Again, in a 16-bit return value there is no space to indicate an + error. For incoming packets, 0x1234 will cause dropping of the packet. + For outgoing packets, there is a serious problem with the + format/length */ + return ipINVALID_LENGTH; + } + if( ucProtocol <= ( uint8_t ) ipPROTOCOL_IGMP ) + { + /* ICMP/IGMP do not have a pseudo header for CRC-calculation. */ + usChecksum = ( uint16_t ) + ( ~usGenerateChecksum( 0UL, + ( uint8_t * ) &( pxProtPack->xTCPPacket.xTCPHeader ), ( size_t ) ulLength ) ); + } + else + { + /* For UDP and TCP, sum the pseudo header, i.e. IP protocol + length + fields */ + usChecksum = ( uint16_t ) ( ulLength + ( ( uint16_t ) ucProtocol ) ); + + /* And then continue at the IPv4 source and destination addresses. */ + usChecksum = ( uint16_t ) + ( ~usGenerateChecksum( ( uint32_t ) usChecksum, ( uint8_t * )&( pxIPPacket->xIPHeader.ulSourceIPAddress ), + ( 2u * sizeof( pxIPPacket->xIPHeader.ulSourceIPAddress ) + ulLength ) ) ); + + /* Sum TCP header and data. */ + } + + if( xOutgoingPacket == pdFALSE ) + { + /* This is in incoming packet. If the CRC is correct, it should be zero. */ + if( usChecksum == 0u ) + { + usChecksum = ( uint16_t )ipCORRECT_CRC; + } + } + else + { + if( ( usChecksum == 0u ) && ( ucProtocol == ( uint8_t ) ipPROTOCOL_UDP ) ) + { + /* In case of UDP, a calculated checksum of 0x0000 is transmitted + as 0xffff. A value of zero would mean that the checksum is not used. */ + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + if( xOutgoingPacket != pdFALSE ) + { + FreeRTOS_debug_printf( ( "usGenerateProtocolChecksum[%s]: crc swap: %04X\n", pcType, usChecksum ) ); + } + } + #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + + usChecksum = ( uint16_t )0xffffu; + } + } + usChecksum = FreeRTOS_htons( usChecksum ); + + if( xOutgoingPacket != pdFALSE ) + { + *( pusChecksum ) = usChecksum; + } + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + else if( ( xOutgoingPacket == pdFALSE ) && ( usChecksum != ipCORRECT_CRC ) ) + { + FreeRTOS_debug_printf( ( "usGenerateProtocolChecksum[%s]: ID %04X: from %lxip to %lxip bad crc: %04X\n", + pcType, + FreeRTOS_ntohs( pxIPPacket->xIPHeader.usIdentification ), + FreeRTOS_ntohl( pxIPPacket->xIPHeader.ulSourceIPAddress ), + FreeRTOS_ntohl( pxIPPacket->xIPHeader.ulDestinationIPAddress ), + FreeRTOS_ntohs( *pusChecksum ) ) ); + } + #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + + return usChecksum; +} +/*-----------------------------------------------------------*/ + +/** + * This method generates a checksum for a given IPv4 header, per RFC791 (page 14). + * The checksum algorithm is decribed as: + * "[T]he 16 bit one's complement of the one's complement sum of all 16 bit words in the + * header. For purposes of computing the checksum, the value of the checksum field is zero." + * + * In a nutshell, that means that each 16-bit 'word' must be summed, after which + * the number of 'carries' (overflows) is added to the result. If that addition + * produces an overflow, that 'carry' must also be added to the final result. The final checksum + * should be the bitwise 'not' (ones-complement) of the result if the packet is + * meant to be transmitted, but this method simply returns the raw value, probably + * because when a packet is received, the checksum is verified by checking that + * ((received & calculated) == 0) without applying a bitwise 'not' to the 'calculated' checksum. + * + * This logic is optimized for microcontrollers which have limited resources, so the logic looks odd. + * It iterates over the full range of 16-bit words, but it does so by processing several 32-bit + * words at once whenever possible. Its first step is to align the memory pointer to a 32-bit boundary, + * after which it runs a fast loop to process multiple 32-bit words at once and adding their 'carries'. + * Finally, it finishes up by processing any remaining 16-bit words, and adding up all of the 'carries'. + * With 32-bit arithmetic, the number of 16-bit 'carries' produced by sequential additions can be found + * by looking at the 16 most-significant bits of the 32-bit integer, since a 32-bit int will continue + * counting up instead of overflowing after 16 bits. That is why the actual checksum calculations look like: + * union.u32 = ( uint32_t ) union.u16[ 0 ] + union.u16[ 1 ]; + * + * Arguments: + * ulSum: This argument provides a value to initialize the progressive summation + * of the header's values to. It is often 0, but protocols like TCP or UDP + * can have pseudo-header fields which need to be included in the checksum. + * pucNextData: This argument contains the address of the first byte which this + * method should process. The method's memory iterator is initialized to this value. + * uxDataLengthBytes: This argument contains the number of bytes that this method + * should process. + */ +uint16_t usGenerateChecksum( uint32_t ulSum, const uint8_t * pucNextData, size_t uxDataLengthBytes ) +{ +xUnion32 xSum2, xSum, xTerm; +xUnionPtr xSource; /* Points to first byte */ +xUnionPtr xLastSource; /* Points to last byte plus one */ +uint32_t ulAlignBits, ulCarry = 0ul; + + /* Small MCUs often spend up to 30% of the time doing checksum calculations + This function is optimised for 32-bit CPUs; Each time it will try to fetch + 32-bits, sums it with an accumulator and counts the number of carries. */ + + /* Swap the input (little endian platform only). */ + xSum.u32 = FreeRTOS_ntohs( ulSum ); + xTerm.u32 = 0ul; + + xSource.u8ptr = ( uint8_t * ) pucNextData; + ulAlignBits = ( ( ( uint32_t ) pucNextData ) & 0x03u ); /* gives 0, 1, 2, or 3 */ + + /* If byte (8-bit) aligned... */ + if( ( ( ulAlignBits & 1ul ) != 0ul ) && ( uxDataLengthBytes >= ( size_t ) 1 ) ) + { + xTerm.u8[ 1 ] = *( xSource.u8ptr ); + ( xSource.u8ptr )++; + uxDataLengthBytes--; + /* Now xSource is word (16-bit) aligned. */ + } + + /* If half-word (16-bit) aligned... */ + if( ( ( ulAlignBits == 1u ) || ( ulAlignBits == 2u ) ) && ( uxDataLengthBytes >= 2u ) ) + { + xSum.u32 += *(xSource.u16ptr); + ( xSource.u16ptr )++; + uxDataLengthBytes -= 2u; + /* Now xSource is word (32-bit) aligned. */ + } + + /* Word (32-bit) aligned, do the most part. */ + xLastSource.u32ptr = ( xSource.u32ptr + ( uxDataLengthBytes / 4u ) ) - 3u; + + /* In this loop, four 32-bit additions will be done, in total 16 bytes. + Indexing with constants (0,1,2,3) gives faster code than using + post-increments. */ + while( xSource.u32ptr < xLastSource.u32ptr ) + { + /* Use a secondary Sum2, just to see if the addition produced an + overflow. */ + xSum2.u32 = xSum.u32 + xSource.u32ptr[ 0 ]; + if( xSum2.u32 < xSum.u32 ) + { + ulCarry++; + } + + /* Now add the secondary sum to the major sum, and remember if there was + a carry. */ + xSum.u32 = xSum2.u32 + xSource.u32ptr[ 1 ]; + if( xSum2.u32 > xSum.u32 ) + { + ulCarry++; + } + + /* And do the same trick once again for indexes 2 and 3 */ + xSum2.u32 = xSum.u32 + xSource.u32ptr[ 2 ]; + if( xSum2.u32 < xSum.u32 ) + { + ulCarry++; + } + + xSum.u32 = xSum2.u32 + xSource.u32ptr[ 3 ]; + + if( xSum2.u32 > xSum.u32 ) + { + ulCarry++; + } + + /* And finally advance the pointer 4 * 4 = 16 bytes. */ + xSource.u32ptr += 4; + } + + /* Now add all carries. */ + xSum.u32 = ( uint32_t )xSum.u16[ 0 ] + xSum.u16[ 1 ] + ulCarry; + + uxDataLengthBytes %= 16u; + xLastSource.u8ptr = ( uint8_t * ) ( xSource.u8ptr + ( uxDataLengthBytes & ~( ( size_t ) 1 ) ) ); + + /* Half-word aligned. */ + while( xSource.u16ptr < xLastSource.u16ptr ) + { + /* At least one more short. */ + xSum.u32 += xSource.u16ptr[ 0 ]; + xSource.u16ptr++; + } + + if( ( uxDataLengthBytes & ( size_t ) 1 ) != 0u ) /* Maybe one more ? */ + { + xTerm.u8[ 0 ] = xSource.u8ptr[ 0 ]; + } + xSum.u32 += xTerm.u32; + + /* Now add all carries again. */ + xSum.u32 = ( uint32_t ) xSum.u16[ 0 ] + xSum.u16[ 1 ]; + + /* The previous summation might have given a 16-bit carry. */ + xSum.u32 = ( uint32_t ) xSum.u16[ 0 ] + xSum.u16[ 1 ]; + + if( ( ulAlignBits & 1u ) != 0u ) + { + /* Quite unlikely, but pucNextData might be non-aligned, which would + mean that a checksum is calculated starting at an odd position. */ + xSum.u32 = ( ( xSum.u32 & 0xffu ) << 8 ) | ( ( xSum.u32 & 0xff00u ) >> 8 ); + } + + /* swap the output (little endian platform only). */ + return FreeRTOS_htons( ( (uint16_t) xSum.u32 ) ); +} +/*-----------------------------------------------------------*/ + +void vReturnEthernetFrame( NetworkBufferDescriptor_t * pxNetworkBuffer, BaseType_t xReleaseAfterSend ) +{ +EthernetHeader_t *pxEthernetHeader; + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + NetworkBufferDescriptor_t *pxNewBuffer; +#endif + + #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + BaseType_t xIndex; + + FreeRTOS_printf( ( "vReturnEthernetFrame: length %lu\n", ( uint32_t )pxNetworkBuffer->xDataLength ) ); + for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) + { + pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; + } + pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; + } + } + #endif + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + + if( xReleaseAfterSend == pdFALSE ) + { + pxNewBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, ( BaseType_t ) pxNetworkBuffer->xDataLength ); + xReleaseAfterSend = pdTRUE; + pxNetworkBuffer = pxNewBuffer; + } + + if( pxNetworkBuffer != NULL ) +#endif + { + pxEthernetHeader = ( EthernetHeader_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); + + /* Swap source and destination MAC addresses. */ + memcpy( ( void * ) &( pxEthernetHeader->xDestinationAddress ), ( void * ) &( pxEthernetHeader->xSourceAddress ), sizeof( pxEthernetHeader->xDestinationAddress ) ); + memcpy( ( void * ) &( pxEthernetHeader->xSourceAddress) , ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); + + /* Send! */ + xNetworkInterfaceOutput( pxNetworkBuffer, xReleaseAfterSend ); + } +} +/*-----------------------------------------------------------*/ + +uint32_t FreeRTOS_GetIPAddress( void ) +{ + /* Returns the IP address of the NIC. */ + return *ipLOCAL_IP_ADDRESS_POINTER; +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_SetIPAddress( uint32_t ulIPAddress ) +{ + /* Sets the IP address of the NIC. */ + *ipLOCAL_IP_ADDRESS_POINTER = ulIPAddress; +} +/*-----------------------------------------------------------*/ + +uint32_t FreeRTOS_GetGatewayAddress( void ) +{ + return xNetworkAddressing.ulGatewayAddress; +} +/*-----------------------------------------------------------*/ + +uint32_t FreeRTOS_GetDNSServerAddress( void ) +{ + return xNetworkAddressing.ulDNSServerAddress; +} +/*-----------------------------------------------------------*/ + +uint32_t FreeRTOS_GetNetmask( void ) +{ + return xNetworkAddressing.ulNetMask; +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_UpdateMACAddress( const uint8_t ucMACAddress[ipMAC_ADDRESS_LENGTH_BYTES] ) +{ + /* Copy the MAC address at the start of the default packet header fragment. */ + memcpy( ( void * )ipLOCAL_MAC_ADDRESS, ( void * )ucMACAddress, ( size_t )ipMAC_ADDRESS_LENGTH_BYTES ); +} +/*-----------------------------------------------------------*/ + +const uint8_t * FreeRTOS_GetMACAddress( void ) +{ + return ipLOCAL_MAC_ADDRESS; +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_SetNetmask ( uint32_t ulNetmask ) +{ + xNetworkAddressing.ulNetMask = ulNetmask; +} +/*-----------------------------------------------------------*/ + +void FreeRTOS_SetGatewayAddress ( uint32_t ulGatewayAddress ) +{ + xNetworkAddressing.ulGatewayAddress = ulGatewayAddress; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_DHCP == 1 ) + void vIPSetDHCPTimerEnableState( BaseType_t xEnableState ) + { + if( xEnableState != pdFALSE ) + { + xDHCPTimer.bActive = pdTRUE_UNSIGNED; + } + else + { + xDHCPTimer.bActive = pdFALSE_UNSIGNED; + } + } +#endif /* ipconfigUSE_DHCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_DHCP == 1 ) + void vIPReloadDHCPTimer( uint32_t ulLeaseTime ) + { + prvIPTimerReload( &xDHCPTimer, ulLeaseTime ); + } +#endif /* ipconfigUSE_DHCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigDNS_USE_CALLBACKS == 1 ) + void vIPSetDnsTimerEnableState( BaseType_t xEnableState ) + { + if( xEnableState != 0 ) + { + xDNSTimer.bActive = pdTRUE; + } + else + { + xDNSTimer.bActive = pdFALSE; + } + } +#endif /* ipconfigUSE_DHCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigDNS_USE_CALLBACKS != 0 ) + void vIPReloadDNSTimer( uint32_t ulCheckTime ) + { + prvIPTimerReload( &xDNSTimer, ulCheckTime ); + } +#endif /* ipconfigDNS_USE_CALLBACKS != 0 */ +/*-----------------------------------------------------------*/ + +BaseType_t xIPIsNetworkTaskReady( void ) +{ + return xIPTaskInitialised; +} +/*-----------------------------------------------------------*/ + +BaseType_t FreeRTOS_IsNetworkUp( void ) +{ + return xNetworkUp; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + UBaseType_t uxGetMinimumIPQueueSpace( void ) + { + return uxQueueMinimumSpace; + } +#endif +/*-----------------------------------------------------------*/ + +/* Provide access to private members for verification. */ +#ifdef FREERTOS_TCP_ENABLE_VERIFICATION + #include "aws_freertos_ip_verification_access_ip_define.h" +#endif + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c index e15834849..87099ecf1 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c @@ -1,3675 +1,3675 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* Standard includes. */ -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_DNS.h" -#include "NetworkBufferManagement.h" - -/* The ItemValue of the sockets xBoundSocketListItem member holds the socket's -port number. */ -#define socketSET_SOCKET_PORT( pxSocket, usPort ) listSET_LIST_ITEM_VALUE( ( &( ( pxSocket )->xBoundSocketListItem ) ), ( usPort ) ) -#define socketGET_SOCKET_PORT( pxSocket ) listGET_LIST_ITEM_VALUE( ( &( ( pxSocket )->xBoundSocketListItem ) ) ) - -/* Test if a socket it bound which means it is either included in -xBoundUDPSocketsList or xBoundTCPSocketsList */ -#define socketSOCKET_IS_BOUND( pxSocket ) ( listLIST_ITEM_CONTAINER( & ( pxSocket )->xBoundSocketListItem ) != NULL ) - -/* If FreeRTOS_sendto() is called on a socket that is not bound to a port -number then, depending on the FreeRTOSIPConfig.h settings, it might be that a -port number is automatically generated for the socket. Automatically generated -port numbers will be between socketAUTO_PORT_ALLOCATION_START_NUMBER and -0xffff. - -Per https://tools.ietf.org/html/rfc6056, "the dynamic ports consist of the range -49152-65535. However, ephemeral port selection algorithms should use the whole -range 1024-65535" excluding those already in use (inbound or outbound). */ -#if !defined( socketAUTO_PORT_ALLOCATION_START_NUMBER ) - #define socketAUTO_PORT_ALLOCATION_START_NUMBER ( ( uint16_t ) 0x0400 ) -#endif - -#define socketAUTO_PORT_ALLOCATION_MAX_NUMBER ( ( uint16_t ) 0xffff ) - -/* The number of octets that make up an IP address. */ -#define socketMAX_IP_ADDRESS_OCTETS 4u - -/* A block time of 0 simply means "don't block". */ -#define socketDONT_BLOCK ( ( TickType_t ) 0 ) - -#if( ( ipconfigUSE_TCP == 1 ) && !defined( ipTCP_TIMER_PERIOD_MS ) ) - #define ipTCP_TIMER_PERIOD_MS ( 1000 ) -#endif - -/* The next private port number to use when binding a client socket is stored in -the usNextPortToUse[] array - which has either 1 or two indexes depending on -whether TCP is being supported. */ -#if( ipconfigUSE_TCP == 1 ) - #define socketPROTOCOL_COUNT 2 -#else - #define socketPROTOCOL_COUNT 1 -#endif - -/* Indexes into the usNextPortToUse[] array for UDP and TCP sockets -respectively. */ -#define socketNEXT_UDP_PORT_NUMBER_INDEX 0 -#define socketNEXT_TCP_PORT_NUMBER_INDEX 1 - -/* Some helper macro's for defining the 20/80 % limits of uxLittleSpace / uxEnoughSpace. */ -#define sock20_PERCENT 20 -#define sock80_PERCENT 80 -#define sock100_PERCENT 100 - - -/*-----------------------------------------------------------*/ - -/* - * Allocate the next port number from the private allocation range. - * TCP and UDP each have their own series of port numbers - * ulProtocol is either ipPROTOCOL_UDP or ipPROTOCOL_TCP - */ -static uint16_t prvGetPrivatePortNumber( BaseType_t xProtocol ); - -/* - * Return the list item from within pxList that has an item value of - * xWantedItemValue. If there is no such list item return NULL. - */ -static const ListItem_t * pxListFindListItemWithValue( const List_t *pxList, TickType_t xWantedItemValue ); - -/* - * Return pdTRUE only if pxSocket is valid and bound, as far as can be - * determined. - */ -static BaseType_t prvValidSocket( FreeRTOS_Socket_t *pxSocket, BaseType_t xProtocol, BaseType_t xIsBound ); - -/* - * Before creating a socket, check the validity of the parameters used - * and find the size of the socket space, which is different for UDP and TCP - */ -static BaseType_t prvDetermineSocketSize( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol, size_t *pxSocketSize ); - -#if( ipconfigUSE_TCP == 1 ) - /* - * Create a txStream or a rxStream, depending on the parameter 'xIsInputStream' - */ - static StreamBuffer_t *prvTCPCreateStream (FreeRTOS_Socket_t *pxSocket, BaseType_t xIsInputStream ); -#endif /* ipconfigUSE_TCP == 1 */ - -#if( ipconfigUSE_TCP == 1 ) - /* - * Called from FreeRTOS_send(): some checks which will be done before - * sending a TCP packed. - */ - static int32_t prvTCPSendCheck( FreeRTOS_Socket_t *pxSocket, size_t xDataLength ); -#endif /* ipconfigUSE_TCP */ - -#if( ipconfigUSE_TCP == 1 ) - /* - * When a child socket gets closed, make sure to update the child-count of the parent - */ - static void prvTCPSetSocketCount( FreeRTOS_Socket_t *pxSocketToDelete ); -#endif /* ipconfigUSE_TCP == 1 */ - -#if( ipconfigUSE_TCP == 1 ) - /* - * Called from FreeRTOS_connect(): make some checks and if allowed, send a - * message to the IP-task to start connecting to a remote socket - */ - static BaseType_t prvTCPConnectStart( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr *pxAddress ); -#endif /* ipconfigUSE_TCP */ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - /* Executed by the IP-task, it will check all sockets belonging to a set */ - static FreeRTOS_Socket_t *prvFindSelectedSocket( SocketSelect_t *pxSocketSet ); - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - -/* The list that contains mappings between sockets and port numbers. Accesses -to this list must be protected by critical sections of one kind or another. */ -List_t xBoundUDPSocketsList; - -#if ipconfigUSE_TCP == 1 - List_t xBoundTCPSocketsList; -#endif /* ipconfigUSE_TCP == 1 */ - -/*-----------------------------------------------------------*/ - -static BaseType_t prvValidSocket( FreeRTOS_Socket_t *pxSocket, BaseType_t xProtocol, BaseType_t xIsBound ) -{ -BaseType_t xReturn = pdTRUE; - - if( ( pxSocket == NULL ) || ( pxSocket == FREERTOS_INVALID_SOCKET ) ) - { - xReturn = pdFALSE; - } - else if( ( xIsBound != pdFALSE ) && ( socketSOCKET_IS_BOUND( pxSocket ) == pdFALSE ) ) - { - /* The caller expects the socket to be bound, but it isn't. */ - xReturn = pdFALSE; - } - else if( pxSocket->ucProtocol != ( uint8_t ) xProtocol ) - { - /* Socket has a wrong type (UDP != TCP). */ - xReturn = pdFALSE; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -BaseType_t vNetworkSocketsInit( void ) -{ - vListInitialise( &xBoundUDPSocketsList ); - - #if( ipconfigUSE_TCP == 1 ) - { - vListInitialise( &xBoundTCPSocketsList ); - } - #endif /* ipconfigUSE_TCP == 1 */ - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvDetermineSocketSize( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol, size_t *pxSocketSize ) -{ -BaseType_t xReturn = pdPASS; -FreeRTOS_Socket_t *pxSocket; - - /* Asserts must not appear before it has been determined that the network - task is ready - otherwise the asserts will fail. */ - if( xIPIsNetworkTaskReady() == pdFALSE ) - { - xReturn = pdFAIL; - } - else - { - /* Only Ethernet is currently supported. */ - configASSERT( xDomain == FREERTOS_AF_INET ); - - /* Check if the UDP socket-list has been initialised. */ - configASSERT( listLIST_IS_INITIALISED( &xBoundUDPSocketsList ) ); - #if( ipconfigUSE_TCP == 1 ) - { - /* Check if the TCP socket-list has been initialised. */ - configASSERT( listLIST_IS_INITIALISED( &xBoundTCPSocketsList ) ); - } - #endif /* ipconfigUSE_TCP == 1 */ - - if( xProtocol == FREERTOS_IPPROTO_UDP ) - { - if( xType != FREERTOS_SOCK_DGRAM ) - { - xReturn = pdFAIL; - configASSERT( xReturn ); - } - /* In case a UDP socket is created, do not allocate space for TCP data. */ - *pxSocketSize = ( sizeof( *pxSocket ) - sizeof( pxSocket->u ) ) + sizeof( pxSocket->u.xUDP ); - } -#if( ipconfigUSE_TCP == 1 ) - else if( xProtocol == FREERTOS_IPPROTO_TCP ) - { - if( xType != FREERTOS_SOCK_STREAM ) - { - xReturn = pdFAIL; - configASSERT( xReturn ); - } - - *pxSocketSize = ( sizeof( *pxSocket ) - sizeof( pxSocket->u ) ) + sizeof( pxSocket->u.xTCP ); - } -#endif /* ipconfigUSE_TCP == 1 */ - else - { - xReturn = pdFAIL; - configASSERT( xReturn ); - } - } - /* In case configASSERT() is not used */ - ( void )xDomain; - return xReturn; -} -/*-----------------------------------------------------------*/ - -/* FreeRTOS_socket() allocates and initiates a socket */ -Socket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol ) -{ -FreeRTOS_Socket_t *pxSocket; -size_t uxSocketSize; -EventGroupHandle_t xEventGroup; -Socket_t xReturn; - - if( prvDetermineSocketSize( xDomain, xType, xProtocol, &uxSocketSize ) == pdFAIL ) - { - xReturn = FREERTOS_INVALID_SOCKET; - } - else - { - /* Allocate the structure that will hold the socket information. The - size depends on the type of socket: UDP sockets need less space. A - define 'pvPortMallocSocket' will used to allocate the necessary space. - By default it points to the FreeRTOS function 'pvPortMalloc()'. */ - pxSocket = ( FreeRTOS_Socket_t * ) pvPortMallocSocket( uxSocketSize ); - - if( pxSocket == NULL ) - { - pxSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; - iptraceFAILED_TO_CREATE_SOCKET(); - } - else if( ( xEventGroup = xEventGroupCreate() ) == NULL ) - { - vPortFreeSocket( pxSocket ); - pxSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; - iptraceFAILED_TO_CREATE_EVENT_GROUP(); - } - else - { - /* Clear the entire space to avoid nulling individual entries */ - memset( pxSocket, '\0', uxSocketSize ); - - pxSocket->xEventGroup = xEventGroup; - - /* Initialise the socket's members. The semaphore will be created - if the socket is bound to an address, for now the pointer to the - semaphore is just set to NULL to show it has not been created. */ - if( xProtocol == FREERTOS_IPPROTO_UDP ) - { - vListInitialise( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); - - #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) - { - pxSocket->u.xUDP.uxMaxPackets = ( UBaseType_t ) ipconfigUDP_MAX_RX_PACKETS; - } - #endif /* ipconfigUDP_MAX_RX_PACKETS > 0 */ - } - - vListInitialiseItem( &( pxSocket->xBoundSocketListItem ) ); - listSET_LIST_ITEM_OWNER( &( pxSocket->xBoundSocketListItem ), ( void * ) pxSocket ); - - pxSocket->xReceiveBlockTime = ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME; - pxSocket->xSendBlockTime = ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME; - pxSocket->ucSocketOptions = ( uint8_t ) FREERTOS_SO_UDPCKSUM_OUT; - pxSocket->ucProtocol = ( uint8_t ) xProtocol; /* protocol: UDP or TCP */ - - #if( ipconfigUSE_TCP == 1 ) - { - if( xProtocol == FREERTOS_IPPROTO_TCP ) - { - /* StreamSize is expressed in number of bytes */ - /* Round up buffer sizes to nearest multiple of MSS */ - pxSocket->u.xTCP.usInitMSS = pxSocket->u.xTCP.usCurMSS = ipconfigTCP_MSS; - pxSocket->u.xTCP.uxRxStreamSize = ( size_t ) ipconfigTCP_RX_BUFFER_LENGTH; - pxSocket->u.xTCP.uxTxStreamSize = ( size_t ) FreeRTOS_round_up( ipconfigTCP_TX_BUFFER_LENGTH, ipconfigTCP_MSS ); - /* Use half of the buffer size of the TCP windows */ - #if ( ipconfigUSE_TCP_WIN == 1 ) - { - pxSocket->u.xTCP.uxRxWinSize = FreeRTOS_max_uint32( 1UL, ( uint32_t ) ( pxSocket->u.xTCP.uxRxStreamSize / 2 ) / ipconfigTCP_MSS ); - pxSocket->u.xTCP.uxTxWinSize = FreeRTOS_max_uint32( 1UL, ( uint32_t ) ( pxSocket->u.xTCP.uxTxStreamSize / 2 ) / ipconfigTCP_MSS ); - } - #else - { - pxSocket->u.xTCP.uxRxWinSize = 1u; - pxSocket->u.xTCP.uxTxWinSize = 1u; - } - #endif - /* The above values are just defaults, and can be overridden by - calling FreeRTOS_setsockopt(). No buffers will be allocated until a - socket is connected and data is exchanged. */ - } - } - #endif /* ipconfigUSE_TCP == 1 */ - } - - xReturn = ( Socket_t ) pxSocket; - } - - /* Remove compiler warnings in the case the configASSERT() is not defined. */ - ( void ) xDomain; - - return xReturn; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - SocketSet_t FreeRTOS_CreateSocketSet( void ) - { - SocketSelect_t *pxSocketSet; - - pxSocketSet = ( SocketSelect_t * ) pvPortMalloc( sizeof( *pxSocketSet ) ); - - if( pxSocketSet != NULL ) - { - memset( pxSocketSet, '\0', sizeof( *pxSocketSet ) ); - pxSocketSet->xSelectGroup = xEventGroupCreate(); - - if( pxSocketSet->xSelectGroup == NULL ) - { - vPortFree( ( void* ) pxSocketSet ); - pxSocketSet = NULL; - } - } - - return ( SocketSet_t ) pxSocketSet; - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - void FreeRTOS_DeleteSocketSet( SocketSet_t xSocketSet ) - { - SocketSelect_t *pxSocketSet = ( SocketSelect_t*) xSocketSet; - - vEventGroupDelete( pxSocketSet->xSelectGroup ); - vPortFree( ( void* ) pxSocketSet ); - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - /* Add a socket to a set */ - void FreeRTOS_FD_SET( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xSelectBits ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - SocketSelect_t *pxSocketSet = ( SocketSelect_t * ) xSocketSet; - - configASSERT( pxSocket != NULL ); - configASSERT( xSocketSet != NULL ); - - /* Make sure we're not adding bits which are reserved for internal use, - such as eSELECT_CALL_IP */ - pxSocket->xSelectBits |= ( xSelectBits & eSELECT_ALL ); - - if( ( pxSocket->xSelectBits & eSELECT_ALL ) != 0 ) - { - /* Adding a socket to a socket set. */ - pxSocket->pxSocketSet = ( SocketSelect_t * ) xSocketSet; - - /* Now have the IP-task call vSocketSelect() to see if the set contains - any sockets which are 'ready' and set the proper bits. - By setting 'bApiCalled = false', vSocketSelect() knows that it was - not called from a user API */ - pxSocketSet->bApiCalled = pdFALSE; - prvFindSelectedSocket( pxSocketSet ); - } - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - /* Clear select bits for a socket - If the mask becomes 0, remove the socket from the set */ - void FreeRTOS_FD_CLR( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xSelectBits ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - - configASSERT( pxSocket != NULL ); - configASSERT( xSocketSet != NULL ); - - pxSocket->xSelectBits &= ~( xSelectBits & eSELECT_ALL ); - if( ( pxSocket->xSelectBits & eSELECT_ALL ) != 0 ) - { - pxSocket->pxSocketSet = ( SocketSelect_t *)xSocketSet; - } - else - { - /* disconnect it from the socket set */ - pxSocket->pxSocketSet = ( SocketSelect_t *)NULL; - } - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - /* Test if a socket belongs to a socket-set */ - EventBits_t FreeRTOS_FD_ISSET( Socket_t xSocket, SocketSet_t xSocketSet ) - { - EventBits_t xReturn; - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - - configASSERT( pxSocket != NULL ); - configASSERT( xSocketSet != NULL ); - - if( xSocketSet == ( SocketSet_t ) pxSocket->pxSocketSet ) - { - /* Make sure we're not adding bits which are reserved for internal - use. */ - xReturn = pxSocket->xSocketBits & eSELECT_ALL; - } - else - { - xReturn = 0; - } - - return xReturn; - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - /* The select() statement: wait for an event to occur on any of the sockets - included in a socket set */ - BaseType_t FreeRTOS_select( SocketSet_t xSocketSet, TickType_t xBlockTimeTicks ) - { - TimeOut_t xTimeOut; - TickType_t xRemainingTime; - SocketSelect_t *pxSocketSet = ( SocketSelect_t*) xSocketSet; - BaseType_t xResult; - - configASSERT( xSocketSet != NULL ); - - /* Only in the first round, check for non-blocking */ - xRemainingTime = xBlockTimeTicks; - - /* Fetch the current time */ - vTaskSetTimeOutState( &xTimeOut ); - - for( ;; ) - { - /* Find a socket which might have triggered the bit - This function might return immediately or block for a limited time */ - xResult = ( BaseType_t ) xEventGroupWaitBits( pxSocketSet->xSelectGroup, eSELECT_ALL, pdFALSE, pdFALSE, xRemainingTime ); - - #if( ipconfigSUPPORT_SIGNALS != 0 ) - { - if( ( xResult & eSELECT_INTR ) != 0u ) - { - xEventGroupClearBits( pxSocketSet->xSelectGroup, eSELECT_INTR ); - FreeRTOS_debug_printf( ( "FreeRTOS_select: interrupted\n" ) ); - break; - } - } - #endif /* ipconfigSUPPORT_SIGNALS */ - - /* Have the IP-task find the socket which had an event */ - pxSocketSet->bApiCalled = pdTRUE; - prvFindSelectedSocket( pxSocketSet ); - - xResult = ( BaseType_t ) xEventGroupGetBits( pxSocketSet->xSelectGroup ); - - if( xResult != 0 ) - { - break; - } - - /* Has the timeout been reached? */ - if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) - { - break; - } - } - - return xResult; - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - /* Send a message to the IP-task to have it check all sockets belonging to - 'pxSocketSet' */ - static FreeRTOS_Socket_t *prvFindSelectedSocket( SocketSelect_t *pxSocketSet ) - { - IPStackEvent_t xSelectEvent; - FreeRTOS_Socket_t *xReturn; - - xSelectEvent.eEventType = eSocketSelectEvent; - xSelectEvent.pvData = ( void * ) pxSocketSet; - - /* while the IP-task works on the request, the API will block on - 'eSELECT_CALL_IP'. So clear it first. */ - xEventGroupClearBits( pxSocketSet->xSelectGroup, eSELECT_CALL_IP ); - - /* Now send the socket select event */ - if( xSendEventStructToIPTask( &xSelectEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL ) - { - /* Oops, we failed to wake-up the IP task. No use to wait for it. */ - FreeRTOS_debug_printf( ( "prvFindSelectedSocket: failed\n" ) ); - xReturn = NULL; - } - else - { - /* As soon as the IP-task is ready, it will set 'eSELECT_CALL_IP' to - wakeup the calling API */ - xEventGroupWaitBits( pxSocketSet->xSelectGroup, eSELECT_CALL_IP, pdTRUE, pdFALSE, portMAX_DELAY ); - - /* Return 'pxSocket' which is set by the IP-task */ - xReturn = pxSocketSet->pxSocket; - } - - return xReturn; - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - -/* - * FreeRTOS_recvfrom: receive data from a bound socket - * In this library, the function can only be used with connectionsless sockets - * (UDP) - */ -int32_t FreeRTOS_recvfrom( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags, struct freertos_sockaddr *pxSourceAddress, socklen_t *pxSourceAddressLength ) -{ -BaseType_t lPacketCount = 0; -NetworkBufferDescriptor_t *pxNetworkBuffer; -FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; -TickType_t xRemainingTime = ( TickType_t ) 0; /* Obsolete assignment, but some compilers output a warning if its not done. */ -BaseType_t xTimed = pdFALSE; -TimeOut_t xTimeOut; -int32_t lReturn; -EventBits_t xEventBits = ( EventBits_t ) 0; - - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_UDP, pdTRUE ) == pdFALSE ) - { - return -pdFREERTOS_ERRNO_EINVAL; - } - - lPacketCount = ( BaseType_t ) listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); - - /* The function prototype is designed to maintain the expected Berkeley - sockets standard, but this implementation does not use all the parameters. */ - ( void ) pxSourceAddressLength; - - while( lPacketCount == 0 ) - { - if( xTimed == pdFALSE ) - { - /* Check to see if the socket is non blocking on the first - iteration. */ - xRemainingTime = pxSocket->xReceiveBlockTime; - - if( xRemainingTime == ( TickType_t ) 0 ) - { - #if( ipconfigSUPPORT_SIGNALS != 0 ) - { - /* Just check for the interrupt flag. */ - xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_INTR, - pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, socketDONT_BLOCK ); - } - #endif /* ipconfigSUPPORT_SIGNALS */ - break; - } - - if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) - { - break; - } - - /* To ensure this part only executes once. */ - xTimed = pdTRUE; - - /* Fetch the current time. */ - vTaskSetTimeOutState( &xTimeOut ); - } - - /* Wait for arrival of data. While waiting, the IP-task may set the - 'eSOCKET_RECEIVE' bit in 'xEventGroup', if it receives data for this - socket, thus unblocking this API call. */ - xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_RECEIVE | eSOCKET_INTR, - pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); - - #if( ipconfigSUPPORT_SIGNALS != 0 ) - { - if( ( xEventBits & eSOCKET_INTR ) != 0 ) - { - if( ( xEventBits & eSOCKET_RECEIVE ) != 0 ) - { - /* Shouldn't have cleared the eSOCKET_RECEIVE flag. */ - xEventGroupSetBits( pxSocket->xEventGroup, eSOCKET_RECEIVE ); - } - break; - } - } - #else - { - ( void ) xEventBits; - } - #endif /* ipconfigSUPPORT_SIGNALS */ - - lPacketCount = ( BaseType_t ) listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); - - if( lPacketCount != 0 ) - { - break; - } - - /* Has the timeout been reached ? */ - if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) ) - { - break; - } - } /* while( lPacketCount == 0 ) */ - - if( lPacketCount != 0 ) - { - taskENTER_CRITICAL(); - { - /* The owner of the list item is the network buffer. */ - pxNetworkBuffer = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); - - if( ( xFlags & FREERTOS_MSG_PEEK ) == 0 ) - { - /* Remove the network buffer from the list of buffers waiting to - be processed by the socket. */ - uxListRemove( &( pxNetworkBuffer->xBufferListItem ) ); - } - } - taskEXIT_CRITICAL(); - - /* The returned value is the length of the payload data, which is - calculated at the total packet size minus the headers. - The validity of `xDataLength` prvProcessIPPacket has been confirmed - in 'prvProcessIPPacket()'. */ - lReturn = ( int32_t ) ( pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ) ); - - if( pxSourceAddress != NULL ) - { - pxSourceAddress->sin_port = pxNetworkBuffer->usPort; - pxSourceAddress->sin_addr = pxNetworkBuffer->ulIPAddress; - } - - if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) - { - /* The zero copy flag is not set. Truncate the length if it won't - fit in the provided buffer. */ - if( lReturn > ( int32_t ) xBufferLength ) - { - iptraceRECVFROM_DISCARDING_BYTES( ( xBufferLength - lReturn ) ); - lReturn = ( int32_t )xBufferLength; - } - - /* Copy the received data into the provided buffer, then release the - network buffer. */ - memcpy( pvBuffer, ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ), ( size_t )lReturn ); - - if( ( xFlags & FREERTOS_MSG_PEEK ) == 0 ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - } - else - { - /* The zero copy flag was set. pvBuffer is not a buffer into which - the received data can be copied, but a pointer that must be set to - point to the buffer in which the received data has already been - placed. */ - *( ( void** ) pvBuffer ) = ( void * ) ( &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ) ); - } - - } -#if( ipconfigSUPPORT_SIGNALS != 0 ) - else if( ( xEventBits & eSOCKET_INTR ) != 0 ) - { - lReturn = -pdFREERTOS_ERRNO_EINTR; - iptraceRECVFROM_INTERRUPTED(); - } -#endif /* ipconfigSUPPORT_SIGNALS */ - else - { - lReturn = -pdFREERTOS_ERRNO_EWOULDBLOCK; - iptraceRECVFROM_TIMEOUT(); - } - - return lReturn; -} -/*-----------------------------------------------------------*/ - -int32_t FreeRTOS_sendto( Socket_t xSocket, const void *pvBuffer, size_t xTotalDataLength, BaseType_t xFlags, const struct freertos_sockaddr *pxDestinationAddress, socklen_t xDestinationAddressLength ) -{ -NetworkBufferDescriptor_t *pxNetworkBuffer; -IPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL }; -TimeOut_t xTimeOut; -TickType_t xTicksToWait; -int32_t lReturn = 0; -FreeRTOS_Socket_t *pxSocket; - - pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - - /* The function prototype is designed to maintain the expected Berkeley - sockets standard, but this implementation does not use all the - parameters. */ - ( void ) xDestinationAddressLength; - configASSERT( pvBuffer ); - - if( xTotalDataLength <= ( size_t ) ipMAX_UDP_PAYLOAD_LENGTH ) - { - /* If the socket is not already bound to an address, bind it now. - Passing NULL as the address parameter tells FreeRTOS_bind() to select - the address to bind to. */ - if( ( socketSOCKET_IS_BOUND( pxSocket ) != pdFALSE ) || - ( FreeRTOS_bind( xSocket, NULL, 0u ) == 0 ) ) - { - xTicksToWait = pxSocket->xSendBlockTime; - - #if( ipconfigUSE_CALLBACKS != 0 ) - { - if( xIsCallingFromIPTask() != pdFALSE ) - { - /* If this send function is called from within a call-back - handler it may not block, otherwise chances would be big to - get a deadlock: the IP-task waiting for itself. */ - xTicksToWait = ( TickType_t )0; - } - } - #endif /* ipconfigUSE_CALLBACKS */ - - if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) - { - xTicksToWait = ( TickType_t ) 0; - } - - if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) - { - /* Zero copy is not set, so obtain a network buffer into - which the payload will be copied. */ - vTaskSetTimeOutState( &xTimeOut ); - - /* Block until a buffer becomes available, or until a - timeout has been reached */ - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( xTotalDataLength + sizeof( UDPPacket_t ), xTicksToWait ); - - if( pxNetworkBuffer != NULL ) - { - memcpy( ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ), ( void * ) pvBuffer, xTotalDataLength ); - - if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdTRUE ) - { - /* The entire block time has been used up. */ - xTicksToWait = ( TickType_t ) 0; - } - } - } - else - { - /* When zero copy is used, pvBuffer is a pointer to the - payload of a buffer that has already been obtained from the - stack. Obtain the network buffer pointer from the buffer. */ - pxNetworkBuffer = pxUDPPayloadBuffer_to_NetworkBuffer( (void*)pvBuffer ); - } - - if( pxNetworkBuffer != NULL ) - { - /* xDataLength is the size of the total packet, including the Ethernet header. */ - pxNetworkBuffer->xDataLength = xTotalDataLength + sizeof( UDPPacket_t ); - pxNetworkBuffer->usPort = pxDestinationAddress->sin_port; - pxNetworkBuffer->usBoundPort = ( uint16_t ) socketGET_SOCKET_PORT( pxSocket ); - pxNetworkBuffer->ulIPAddress = pxDestinationAddress->sin_addr; - - /* The socket options are passed to the IP layer in the - space that will eventually get used by the Ethernet header. */ - pxNetworkBuffer->pucEthernetBuffer[ ipSOCKET_OPTIONS_OFFSET ] = pxSocket->ucSocketOptions; - - /* Tell the networking task that the packet needs sending. */ - xStackTxEvent.pvData = pxNetworkBuffer; - - /* Ask the IP-task to send this packet */ - if( xSendEventStructToIPTask( &xStackTxEvent, xTicksToWait ) == pdPASS ) - { - /* The packet was successfully sent to the IP task. */ - lReturn = ( int32_t ) xTotalDataLength; - #if( ipconfigUSE_CALLBACKS == 1 ) - { - if( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xUDP.pxHandleSent ) ) - { - pxSocket->u.xUDP.pxHandleSent( ( Socket_t )pxSocket, xTotalDataLength ); - } - } - #endif /* ipconfigUSE_CALLBACKS */ - } - else - { - /* If the buffer was allocated in this function, release - it. */ - if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - iptraceSTACK_TX_EVENT_LOST( ipSTACK_TX_EVENT ); - } - } - else - { - /* If errno was available, errno would be set to - FREERTOS_ENOPKTS. As it is, the function must return the - number of transmitted bytes, so the calling function knows - how much data was actually sent. */ - iptraceNO_BUFFER_FOR_SENDTO(); - } - } - else - { - iptraceSENDTO_SOCKET_NOT_BOUND(); - } - } - else - { - /* The data is longer than the available buffer space. */ - iptraceSENDTO_DATA_TOO_LONG(); - } - - return lReturn; -} /* Tested */ -/*-----------------------------------------------------------*/ - -/* - * FreeRTOS_bind() : binds a sockt to a local port number. If port 0 is - * provided, a system provided port number will be assigned. This function can - * be used for both UDP and TCP sockets. The actual binding will be performed - * by the IP-task to avoid mutual access to the bound-socket-lists - * (xBoundUDPSocketsList or xBoundTCPSocketsList). - */ -BaseType_t FreeRTOS_bind( Socket_t xSocket, struct freertos_sockaddr * pxAddress, socklen_t xAddressLength ) -{ -IPStackEvent_t xBindEvent; -FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; -BaseType_t xReturn = 0; - - ( void ) xAddressLength; - - if( ( pxSocket == NULL ) || ( pxSocket == FREERTOS_INVALID_SOCKET ) ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - /* Once a socket is bound to a port, it can not be bound to a different - port number */ - else if( socketSOCKET_IS_BOUND( pxSocket) != pdFALSE ) - { - /* The socket is already bound. */ - FreeRTOS_debug_printf( ( "vSocketBind: Socket already bound to %d\n", pxSocket->usLocalPort ) ); - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - /* Prepare a messages to the IP-task in order to perform the binding. - The desired port number will be passed in usLocalPort. */ - xBindEvent.eEventType = eSocketBindEvent; - xBindEvent.pvData = ( void * ) xSocket; - if( pxAddress != NULL ) - { - pxSocket->usLocalPort = FreeRTOS_ntohs( pxAddress->sin_port ); - } - else - { - /* Caller wants to bind to a random port number. */ - pxSocket->usLocalPort = 0u; - } - - /* portMAX_DELAY is used as a the time-out parameter, as binding *must* - succeed before the socket can be used. _RB_ The use of an infinite - block time needs be changed as it could result in the task hanging. */ - if( xSendEventStructToIPTask( &xBindEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL ) - { - /* Failed to wake-up the IP-task, no use to wait for it */ - FreeRTOS_debug_printf( ( "FreeRTOS_bind: send event failed\n" ) ); - xReturn = -pdFREERTOS_ERRNO_ECANCELED; - } - else - { - /* The IP-task will set the 'eSOCKET_BOUND' bit when it has done its - job. */ - xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_BOUND, pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, portMAX_DELAY ); - if( socketSOCKET_IS_BOUND( pxSocket ) == pdFALSE ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - } - } - - return xReturn; -} - -/* - * vSocketBind(): internal version of bind() that should not be called directly. - * 'xInternal' is used for TCP sockets only: it allows to have several - * (connected) child sockets bound to the same server port. - */ -BaseType_t vSocketBind( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr * pxAddress, size_t uxAddressLength, BaseType_t xInternal ) -{ -BaseType_t xReturn = 0; /* In Berkeley sockets, 0 means pass for bind(). */ -List_t *pxSocketList; -#if( ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1 ) - struct freertos_sockaddr xAddress; -#endif /* ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND */ - -#if( ipconfigUSE_TCP == 1 ) - if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - pxSocketList = &xBoundTCPSocketsList; - } - else -#endif /* ipconfigUSE_TCP == 1 */ - { - pxSocketList = &xBoundUDPSocketsList; - } - - /* The function prototype is designed to maintain the expected Berkeley - sockets standard, but this implementation does not use all the parameters. */ - ( void ) uxAddressLength; - - configASSERT( pxSocket ); - configASSERT( pxSocket != FREERTOS_INVALID_SOCKET ); - - #if( ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1 ) - { - /* pxAddress will be NULL if sendto() was called on a socket without the - socket being bound to an address. In this case, automatically allocate - an address and port to the socket. */ - if( pxAddress == NULL ) - { - pxAddress = &xAddress; - /* Put the port to zero to be assigned later. */ - pxAddress->sin_port = 0u; - } - } - #endif /* ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1 */ - - /* Sockets must be bound before calling FreeRTOS_sendto() if - ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is not set to 1. */ - configASSERT( pxAddress ); - - if( pxAddress != NULL ) - { - if( pxAddress->sin_port == 0u ) - { - pxAddress->sin_port = prvGetPrivatePortNumber( ( BaseType_t )pxSocket->ucProtocol ); - if( 0 == pxAddress->sin_port ) - { - return -pdFREERTOS_ERRNO_EADDRNOTAVAIL; - } - } - - /* If vSocketBind() is called from the API FreeRTOS_bind() it has been - confirmed that the socket was not yet bound to a port. If it is called - from the IP-task, no such check is necessary. */ - - /* Check to ensure the port is not already in use. If the bind is - called internally, a port MAY be used by more than one socket. */ - if( ( ( xInternal == pdFALSE ) || ( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) ) && - ( pxListFindListItemWithValue( pxSocketList, ( TickType_t ) pxAddress->sin_port ) != NULL ) ) - { - FreeRTOS_debug_printf( ( "vSocketBind: %sP port %d in use\n", - pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ? "TC" : "UD", - FreeRTOS_ntohs( pxAddress->sin_port ) ) ); - xReturn = -pdFREERTOS_ERRNO_EADDRINUSE; - } - else - { - /* Allocate the port number to the socket. - This macro will set 'xBoundSocketListItem->xItemValue' */ - socketSET_SOCKET_PORT( pxSocket, pxAddress->sin_port ); - - /* And also store it in a socket field 'usLocalPort' in host-byte-order, - mostly used for logging and debugging purposes */ - pxSocket->usLocalPort = FreeRTOS_ntohs( pxAddress->sin_port ); - - /* Add the socket to the list of bound ports. */ - { - /* If the network driver can iterate through 'xBoundUDPSocketsList', - by calling xPortHasUDPSocket() then the IP-task must temporarily - suspend the scheduler to keep the list in a consistent state. */ - #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - { - vTaskSuspendAll(); - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - - /* Add the socket to 'xBoundUDPSocketsList' or 'xBoundTCPSocketsList' */ - vListInsertEnd( pxSocketList, &( pxSocket->xBoundSocketListItem ) ); - - #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - { - xTaskResumeAll(); - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - } - } - } - else - { - xReturn = -pdFREERTOS_ERRNO_EADDRNOTAVAIL; - FreeRTOS_debug_printf( ( "vSocketBind: Socket no addr\n" ) ); - } - - if( xReturn != 0 ) - { - iptraceBIND_FAILED( xSocket, ( FreeRTOS_ntohs( pxAddress->sin_port ) ) ); - } - - return xReturn; -} /* Tested */ -/*-----------------------------------------------------------*/ - -/* - * Close a socket and free the allocated space - * In case of a TCP socket: the connection will not be closed automatically - * Subsequent messages for the closed socket will be responded to with a RST - * The IP-task will actually close the socket, after receiving a 'eSocketCloseEvent' message - */ -BaseType_t FreeRTOS_closesocket( Socket_t xSocket ) -{ -BaseType_t xResult; -#if( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_CALLBACKS == 1 ) - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * )xSocket; -#endif -IPStackEvent_t xCloseEvent; -xCloseEvent.eEventType = eSocketCloseEvent; -xCloseEvent.pvData = ( void * ) xSocket; - - if( ( xSocket == NULL ) || ( xSocket == FREERTOS_INVALID_SOCKET ) ) - { - xResult = 0; - } - else - { - #if( ( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_CALLBACKS == 1 ) ) - { - if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - /* Make sure that IP-task won't call the user callback's anymore */ - pxSocket->u.xTCP.pxHandleConnected = NULL; - pxSocket->u.xTCP.pxHandleReceive = NULL; - pxSocket->u.xTCP.pxHandleSent = NULL; - } - } - #endif /* ( ( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_CALLBACKS == 1 ) ) */ - - /* Let the IP task close the socket to keep it synchronised with the - packet handling. */ - - /* Note when changing the time-out value below, it must be checked who is calling - this function. If it is called by the IP-task, a deadlock could occur. - The IP-task would only call it in case of a user call-back */ - if( xSendEventStructToIPTask( &xCloseEvent, ( TickType_t ) 0 ) == pdFAIL ) - { - FreeRTOS_debug_printf( ( "FreeRTOS_closesocket: failed\n" ) ); - xResult = -1; - } - else - { - xResult = 1; - } - } - - return xResult; -} - -/* This is the internal version of FreeRTOS_closesocket() - * It will be called by the IPtask only to avoid problems with synchronicity - */ -void *vSocketClose( FreeRTOS_Socket_t *pxSocket ) -{ -NetworkBufferDescriptor_t *pxNetworkBuffer; - - #if( ipconfigUSE_TCP == 1 ) - { - /* For TCP: clean up a little more. */ - if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - #if( ipconfigUSE_TCP_WIN == 1 ) - { - if( pxSocket->u.xTCP.pxAckMessage != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); - } - /* Free the resources which were claimed by the tcpWin member */ - vTCPWindowDestroy( &pxSocket->u.xTCP.xTCPWindow ); - } - #endif /* ipconfigUSE_TCP_WIN */ - - /* Free the input and output streams */ - if( pxSocket->u.xTCP.rxStream != NULL ) - { - vPortFreeLarge( pxSocket->u.xTCP.rxStream ); - } - - if( pxSocket->u.xTCP.txStream != NULL ) - { - vPortFreeLarge( pxSocket->u.xTCP.txStream ); - } - - /* In case this is a child socket, make sure the child-count of the - parent socket is decreased. */ - prvTCPSetSocketCount( pxSocket ); - } - } - #endif /* ipconfigUSE_TCP == 1 */ - - /* Socket must be unbound first, to ensure no more packets are queued on - it. */ - if( socketSOCKET_IS_BOUND( pxSocket ) != pdFALSE ) - { - /* If the network driver can iterate through 'xBoundUDPSocketsList', - by calling xPortHasUDPSocket(), then the IP-task must temporarily - suspend the scheduler to keep the list in a consistent state. */ - #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - { - vTaskSuspendAll(); - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - - uxListRemove( &( pxSocket->xBoundSocketListItem ) ); - - #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - { - xTaskResumeAll(); - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - } - - /* Now the socket is not bound the list of waiting packets can be - drained. */ - if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_UDP ) - { - while( listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ) > 0U ) - { - pxNetworkBuffer = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); - uxListRemove( &( pxNetworkBuffer->xBufferListItem ) ); - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - } - - if( pxSocket->xEventGroup ) - { - vEventGroupDelete( pxSocket->xEventGroup ); - } - - #if( ipconfigUSE_TCP == 1 ) && ( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - FreeRTOS_debug_printf( ( "FreeRTOS_closesocket[%u to %lxip:%u]: buffers %lu socks %lu\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort, - uxGetNumberOfFreeNetworkBuffers(), - listCURRENT_LIST_LENGTH( &xBoundTCPSocketsList ) ) ); - } - } - #endif /* ( ipconfigUSE_TCP == 1 ) && ( ipconfigHAS_DEBUG_PRINTF != 0 ) */ - - /* Anf finally, after all resources have been freed, free the socket space */ - vPortFreeSocket( pxSocket ); - - return 0; -} /* Tested */ - -/*-----------------------------------------------------------*/ - -#if ipconfigUSE_TCP == 1 - - /* - * When a child socket gets closed, make sure to update the child-count of the - * parent. When a listening parent socket is closed, make sure no child-sockets - * keep a pointer to it. - */ - static void prvTCPSetSocketCount( FreeRTOS_Socket_t *pxSocketToDelete ) - { - const ListItem_t *pxIterator; - const MiniListItem_t *pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &xBoundTCPSocketsList ); - FreeRTOS_Socket_t *pxOtherSocket; - uint16_t usLocalPort = pxSocketToDelete->usLocalPort; - - for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); - pxIterator != ( const ListItem_t * ) pxEnd; - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - pxOtherSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - if( ( pxOtherSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) && - ( pxOtherSocket->usLocalPort == usLocalPort ) && - ( pxOtherSocket->u.xTCP.usChildCount ) ) - { - pxOtherSocket->u.xTCP.usChildCount--; - FreeRTOS_debug_printf( ( "Lost: Socket %u now has %u / %u child%s\n", - pxOtherSocket->usLocalPort, - pxOtherSocket->u.xTCP.usChildCount, - pxOtherSocket->u.xTCP.usBacklog, - pxOtherSocket->u.xTCP.usChildCount == 1u ? "" : "ren" ) ); - break; - } - } - } - -#endif /* ipconfigUSE_TCP == 1 */ - -/*-----------------------------------------------------------*/ - -BaseType_t FreeRTOS_setsockopt( Socket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ) -{ -/* The standard Berkeley function returns 0 for success. */ -BaseType_t xReturn = -pdFREERTOS_ERRNO_EINVAL; -BaseType_t lOptionValue; -FreeRTOS_Socket_t *pxSocket; - - pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - - /* The function prototype is designed to maintain the expected Berkeley - sockets standard, but this implementation does not use all the parameters. */ - ( void ) lLevel; - ( void ) xOptionLength; - - configASSERT( xSocket ); - - switch( lOptionName ) - { - case FREERTOS_SO_RCVTIMEO : - /* Receive time out. */ - pxSocket->xReceiveBlockTime = *( ( TickType_t * ) pvOptionValue ); - xReturn = 0; - break; - - case FREERTOS_SO_SNDTIMEO : - pxSocket->xSendBlockTime = *( ( TickType_t * ) pvOptionValue ); - if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_UDP ) - { - /* The send time out is capped for the reason stated in the - comments where ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS is defined - in FreeRTOSIPConfig.h (assuming an official configuration file - is being used. */ - if( pxSocket->xSendBlockTime > ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ) - { - pxSocket->xSendBlockTime = ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS; - } - } - else - { - /* For TCP socket, it isn't necessary to limit the blocking time - because the FreeRTOS_send() function does not wait for a network - buffer to become available. */ - } - xReturn = 0; - break; - #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) - case FREERTOS_SO_UDP_MAX_RX_PACKETS: - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_UDP ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - pxSocket->u.xUDP.uxMaxPackets = *( ( UBaseType_t * ) pvOptionValue ); - xReturn = 0; - break; - #endif /* ipconfigUDP_MAX_RX_PACKETS */ - - case FREERTOS_SO_UDPCKSUM_OUT : - /* Turn calculating of the UDP checksum on/off for this socket. */ - lOptionValue = ( BaseType_t ) pvOptionValue; - - if( lOptionValue == 0 ) - { - pxSocket->ucSocketOptions &= ( uint8_t ) ~FREERTOS_SO_UDPCKSUM_OUT; - } - else - { - pxSocket->ucSocketOptions |= ( uint8_t ) FREERTOS_SO_UDPCKSUM_OUT; - } - xReturn = 0; - break; - - #if( ipconfigUSE_CALLBACKS == 1 ) - #if( ipconfigUSE_TCP == 1 ) - case FREERTOS_SO_TCP_CONN_HANDLER: /* Set a callback for (dis)connection events */ - case FREERTOS_SO_TCP_RECV_HANDLER: /* Install a callback for receiving TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - case FREERTOS_SO_TCP_SENT_HANDLER: /* Install a callback for sending TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - #endif /* ipconfigUSE_TCP */ - case FREERTOS_SO_UDP_RECV_HANDLER: /* Install a callback for receiving UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - case FREERTOS_SO_UDP_SENT_HANDLER: /* Install a callback for sending UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - { - #if( ipconfigUSE_TCP == 1 ) - { - UBaseType_t uxProtocol; - if( ( lOptionName == FREERTOS_SO_UDP_RECV_HANDLER ) || - ( lOptionName == FREERTOS_SO_UDP_SENT_HANDLER ) ) - { - uxProtocol = ( UBaseType_t ) FREERTOS_IPPROTO_UDP; - } - else - { - uxProtocol = ( UBaseType_t ) FREERTOS_IPPROTO_TCP; - } - - if( pxSocket->ucProtocol != ( uint8_t ) uxProtocol ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - } - #else - { - /* No need to check if the socket has the right - protocol, because only UDP socket can be created. */ - } - #endif /* ipconfigUSE_TCP */ - - switch( lOptionName ) - { - #if ipconfigUSE_TCP == 1 - case FREERTOS_SO_TCP_CONN_HANDLER: - pxSocket->u.xTCP.pxHandleConnected = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnTCPConnected; - break; - case FREERTOS_SO_TCP_RECV_HANDLER: - pxSocket->u.xTCP.pxHandleReceive = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnTCPReceive; - break; - case FREERTOS_SO_TCP_SENT_HANDLER: - pxSocket->u.xTCP.pxHandleSent = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnTCPSent; - break; - #endif /* ipconfigUSE_TCP */ - case FREERTOS_SO_UDP_RECV_HANDLER: - pxSocket->u.xUDP.pxHandleReceive = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnUDPReceive; - break; - case FREERTOS_SO_UDP_SENT_HANDLER: - pxSocket->u.xUDP.pxHandleSent = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnUDPSent; - break; - default: - break; - } - } - - xReturn = 0; - break; - #endif /* ipconfigUSE_CALLBACKS */ - - #if( ipconfigUSE_TCP != 0 ) - #if( ipconfigSOCKET_HAS_USER_SEMAPHORE != 0 ) - /* Each socket has a semaphore on which the using task normally - sleeps. */ - case FREERTOS_SO_SET_SEMAPHORE: - { - pxSocket->pxUserSemaphore = *( ( SemaphoreHandle_t * ) pvOptionValue ); - xReturn = 0; - } - break; - #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ - - #if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK != 0 ) - case FREERTOS_SO_WAKEUP_CALLBACK: - { - /* Each socket can have a callback function that is executed - when there is an event the socket's owner might want to - process. */ - pxSocket->pxUserWakeCallback = ( SocketWakeupCallback_t ) pvOptionValue; - xReturn = 0; - } - break; - #endif /* ipconfigSOCKET_HAS_USER_WAKE_CALLBACK */ - - case FREERTOS_SO_SET_LOW_HIGH_WATER: - { - LowHighWater_t *pxLowHighWater = ( LowHighWater_t * ) pvOptionValue; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - /* It is not allowed to access 'pxSocket->u.xTCP'. */ - FreeRTOS_debug_printf( ( "FREERTOS_SO_SET_LOW_HIGH_WATER: wrong socket type\n" ) ); - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - if( ( pxLowHighWater->uxLittleSpace >= pxLowHighWater->uxEnoughSpace ) || - ( pxLowHighWater->uxEnoughSpace > pxSocket->u.xTCP.uxRxStreamSize ) ) - { - /* Impossible values. */ - FreeRTOS_debug_printf( ( "FREERTOS_SO_SET_LOW_HIGH_WATER: bad values\n" ) ); - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - /* Send a STOP when buffer space drops below 'uxLittleSpace' bytes. */ - pxSocket->u.xTCP.uxLittleSpace = pxLowHighWater->uxLittleSpace; - /* Send a GO when buffer space grows above 'uxEnoughSpace' bytes. */ - pxSocket->u.xTCP.uxEnoughSpace = pxLowHighWater->uxEnoughSpace; - xReturn = 0; - } - break; - - case FREERTOS_SO_SNDBUF: /* Set the size of the send buffer, in units of MSS (TCP only) */ - case FREERTOS_SO_RCVBUF: /* Set the size of the receive buffer, in units of MSS (TCP only) */ - { - uint32_t ulNewValue; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - FreeRTOS_debug_printf( ( "Set SO_%sBUF: wrong socket type\n", - ( lOptionName == FREERTOS_SO_SNDBUF ) ? "SND" : "RCV" ) ); - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - if( ( ( lOptionName == FREERTOS_SO_SNDBUF ) && ( pxSocket->u.xTCP.txStream != NULL ) ) || - ( ( lOptionName == FREERTOS_SO_RCVBUF ) && ( pxSocket->u.xTCP.rxStream != NULL ) ) ) - { - FreeRTOS_debug_printf( ( "Set SO_%sBUF: buffer already created\n", - ( lOptionName == FREERTOS_SO_SNDBUF ) ? "SND" : "RCV" ) ); - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - ulNewValue = *( ( uint32_t * ) pvOptionValue ); - - if( lOptionName == FREERTOS_SO_SNDBUF ) - { - /* Round up to nearest MSS size */ - ulNewValue = FreeRTOS_round_up( ulNewValue, ( uint32_t ) pxSocket->u.xTCP.usInitMSS ); - pxSocket->u.xTCP.uxTxStreamSize = ulNewValue; - } - else - { - pxSocket->u.xTCP.uxRxStreamSize = ulNewValue; - } - } - xReturn = 0; - break; - - case FREERTOS_SO_WIN_PROPERTIES: /* Set all buffer and window properties in one call, parameter is pointer to WinProperties_t */ - { - WinProperties_t* pxProps; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - FreeRTOS_debug_printf( ( "Set SO_WIN_PROP: wrong socket type\n" ) ); - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - if( ( pxSocket->u.xTCP.txStream != NULL ) || ( pxSocket->u.xTCP.rxStream != NULL ) ) - { - FreeRTOS_debug_printf( ( "Set SO_WIN_PROP: buffer already created\n" ) ); - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - pxProps = ( ( WinProperties_t * ) pvOptionValue ); - - if ( FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDBUF, &( pxProps->lTxBufSize ), sizeof( pxProps->lTxBufSize ) ) != 0 ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - if ( FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVBUF, &( pxProps->lRxBufSize ), sizeof( pxProps->lRxBufSize ) ) != 0 ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - #if( ipconfigUSE_TCP_WIN == 1 ) - { - pxSocket->u.xTCP.uxRxWinSize = ( uint32_t )pxProps->lRxWinSize; /* Fixed value: size of the TCP reception window */ - pxSocket->u.xTCP.uxTxWinSize = ( uint32_t )pxProps->lTxWinSize; /* Fixed value: size of the TCP transmit window */ - } - #else - { - pxSocket->u.xTCP.uxRxWinSize = 1u; - pxSocket->u.xTCP.uxTxWinSize = 1u; - } - #endif - - /* In case the socket has already initialised its tcpWin, - adapt the window size parameters */ - if( pxSocket->u.xTCP.xTCPWindow.u.bits.bHasInit != pdFALSE_UNSIGNED ) - { - pxSocket->u.xTCP.xTCPWindow.xSize.ulRxWindowLength = pxSocket->u.xTCP.uxRxWinSize * pxSocket->u.xTCP.usInitMSS; - pxSocket->u.xTCP.xTCPWindow.xSize.ulTxWindowLength = pxSocket->u.xTCP.uxTxWinSize * pxSocket->u.xTCP.usInitMSS; - } - } - - xReturn = 0; - break; - - case FREERTOS_SO_REUSE_LISTEN_SOCKET: /* If true, the server-socket will turn into a connected socket */ - { - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) - { - pxSocket->u.xTCP.bits.bReuseSocket = pdTRUE_UNSIGNED; - } - else - { - pxSocket->u.xTCP.bits.bReuseSocket = pdFALSE_UNSIGNED; - } - } - xReturn = 0; - break; - - case FREERTOS_SO_CLOSE_AFTER_SEND: /* As soon as the last byte has been transmitted, finalise the connection */ - { - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) - { - pxSocket->u.xTCP.bits.bCloseAfterSend = pdTRUE_UNSIGNED; - } - else - { - pxSocket->u.xTCP.bits.bCloseAfterSend = pdFALSE_UNSIGNED; - } - } - xReturn = 0; - break; - - case FREERTOS_SO_SET_FULL_SIZE: /* Refuse to send packets smaller than MSS */ - { - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) - { - pxSocket->u.xTCP.xTCPWindow.u.bits.bSendFullSize = pdTRUE_UNSIGNED; - } - else - { - pxSocket->u.xTCP.xTCPWindow.u.bits.bSendFullSize = pdFALSE_UNSIGNED; - } - - if( ( pxSocket->u.xTCP.xTCPWindow.u.bits.bSendFullSize == pdFALSE_UNSIGNED ) && - ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && - ( FreeRTOS_outstanding( pxSocket ) != 0 ) ) - { - pxSocket->u.xTCP.usTimeout = 1u; /* to set/clear bSendFullSize */ - xSendEventToIPTask( eTCPTimerEvent ); - } - } - xReturn = 0; - break; - - case FREERTOS_SO_STOP_RX: /* Refuse to receive more packts */ - { - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - break; /* will return -pdFREERTOS_ERRNO_EINVAL */ - } - - if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) - { - pxSocket->u.xTCP.bits.bRxStopped = pdTRUE_UNSIGNED; - } - else - { - pxSocket->u.xTCP.bits.bRxStopped = pdFALSE_UNSIGNED; - } - - pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; - pxSocket->u.xTCP.usTimeout = 1u; /* to set/clear bRxStopped */ - xSendEventToIPTask( eTCPTimerEvent ); - } - xReturn = 0; - break; - - #endif /* ipconfigUSE_TCP == 1 */ - - default : - /* No other options are handled. */ - xReturn = -pdFREERTOS_ERRNO_ENOPROTOOPT; - break; - } - - return xReturn; -} /* Tested */ - -/*-----------------------------------------------------------*/ - -/* Find an available port number per https://tools.ietf.org/html/rfc6056. */ -static uint16_t prvGetPrivatePortNumber( BaseType_t xProtocol ) -{ -const uint16_t usEphemeralPortCount = - socketAUTO_PORT_ALLOCATION_MAX_NUMBER - socketAUTO_PORT_ALLOCATION_START_NUMBER + 1; -uint16_t usIterations = usEphemeralPortCount; -uint32_t ulRandomSeed = 0; -uint16_t usResult = 0; -const List_t *pxList; - -#if ipconfigUSE_TCP == 1 - if( xProtocol == ( BaseType_t ) FREERTOS_IPPROTO_TCP ) - { - pxList = &xBoundTCPSocketsList; - } - else -#endif - { - pxList = &xBoundUDPSocketsList; - } - - /* Avoid compiler warnings if ipconfigUSE_TCP is not defined. */ - ( void ) xProtocol; - - /* Find the next available port using the random seed as a starting - point. */ - do - { - /* Only proceed if the random number generator succeeded. */ - if( xApplicationGetRandomNumber( &( ulRandomSeed ) ) == pdFALSE ) - { - break; - } - - /* Map the random to a candidate port. */ - usResult = - socketAUTO_PORT_ALLOCATION_START_NUMBER + - ( ( ( uint16_t )ulRandomSeed ) % usEphemeralPortCount ); - - /* Check if there's already an open socket with the same protocol - and port. */ - if( NULL == pxListFindListItemWithValue( - pxList, - ( TickType_t )FreeRTOS_htons( usResult ) ) ) - { - usResult = FreeRTOS_htons( usResult ); - break; - } - else - { - usResult = 0; - } - - usIterations--; - } - while( usIterations > 0 ); - - return usResult; -} -/*-----------------------------------------------------------*/ - -/* pxListFindListItemWithValue: find a list item in a bound socket list -'xWantedItemValue' refers to a port number */ -static const ListItem_t * pxListFindListItemWithValue( const List_t *pxList, TickType_t xWantedItemValue ) -{ -const ListItem_t * pxResult = NULL; - - if( ( xIPIsNetworkTaskReady() != pdFALSE ) && ( pxList != NULL ) ) - { - const ListItem_t *pxIterator; - const MiniListItem_t *pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( pxList ); - for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); - pxIterator != ( const ListItem_t * ) pxEnd; - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - if( listGET_LIST_ITEM_VALUE( pxIterator ) == xWantedItemValue ) - { - pxResult = pxIterator; - break; - } - } - } - - return pxResult; -} /* Tested */ - -/*-----------------------------------------------------------*/ - -FreeRTOS_Socket_t *pxUDPSocketLookup( UBaseType_t uxLocalPort ) -{ -const ListItem_t *pxListItem; -FreeRTOS_Socket_t *pxSocket = NULL; - - /* Looking up a socket is quite simple, find a match with the local port. - - See if there is a list item associated with the port number on the - list of bound sockets. */ - pxListItem = pxListFindListItemWithValue( &xBoundUDPSocketsList, ( TickType_t ) uxLocalPort ); - - if( pxListItem != NULL ) - { - /* The owner of the list item is the socket itself. */ - pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxListItem ); - configASSERT( pxSocket != NULL ); - } - return pxSocket; -} - -/*-----------------------------------------------------------*/ - -#if ipconfigINCLUDE_FULL_INET_ADDR == 1 - - uint32_t FreeRTOS_inet_addr( const char * pcIPAddress ) - { - const uint32_t ulDecimalBase = 10u; - uint8_t ucOctet[ socketMAX_IP_ADDRESS_OCTETS ]; - const char *pcPointerOnEntering; - uint32_t ulReturn = 0UL, ulValue; - UBaseType_t uxOctetNumber; - BaseType_t xResult = pdPASS; - - for( uxOctetNumber = 0u; uxOctetNumber < socketMAX_IP_ADDRESS_OCTETS; uxOctetNumber++ ) - { - ulValue = 0ul; - pcPointerOnEntering = pcIPAddress; - - while( ( *pcIPAddress >= '0' ) && ( *pcIPAddress <= '9' ) ) - { - /* Move previous read characters into the next decimal - position. */ - ulValue *= ulDecimalBase; - - /* Add the binary value of the ascii character. */ - ulValue += ( ( uint32_t ) ( *pcIPAddress ) - ( uint32_t ) '0' ); - - /* Move to next character in the string. */ - pcIPAddress++; - } - - /* Check characters were read. */ - if( pcIPAddress == pcPointerOnEntering ) - { - xResult = pdFAIL; - } - - /* Check the value fits in an 8-bit number. */ - if( ulValue > 0xffUL ) - { - xResult = pdFAIL; - } - else - { - ucOctet[ uxOctetNumber ] = ( uint8_t ) ulValue; - - /* Check the next character is as expected. */ - if( uxOctetNumber < ( socketMAX_IP_ADDRESS_OCTETS - 1u ) ) - { - if( *pcIPAddress != '.' ) - { - xResult = pdFAIL; - } - else - { - /* Move past the dot. */ - pcIPAddress++; - } - } - } - - if( xResult == pdFAIL ) - { - /* No point going on. */ - break; - } - } - - if( *pcIPAddress != ( char ) 0 ) - { - /* Expected the end of the string. */ - xResult = pdFAIL; - } - - if( uxOctetNumber != socketMAX_IP_ADDRESS_OCTETS ) - { - /* Didn't read enough octets. */ - xResult = pdFAIL; - } - - if( xResult == pdPASS ) - { - ulReturn = FreeRTOS_inet_addr_quick( ucOctet[ 0 ], ucOctet[ 1 ], ucOctet[ 2 ], ucOctet[ 3 ] ); - } - - return ulReturn; - } - -#endif /* ipconfigINCLUDE_FULL_INET_ADDR */ - -/*-----------------------------------------------------------*/ - -/* Function to get the local address and IP port */ -size_t FreeRTOS_GetLocalAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ) -{ -FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - - /* IP address of local machine. */ - pxAddress->sin_addr = *ipLOCAL_IP_ADDRESS_POINTER; - - /* Local port on this machine. */ - pxAddress->sin_port = FreeRTOS_htons( pxSocket->usLocalPort ); - - return sizeof( *pxAddress ); -} - -/*-----------------------------------------------------------*/ - -void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket ) -{ -/* _HT_ must work this out, now vSocketWakeUpUser will be called for any important - * event or transition */ - #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) - { - if( pxSocket->pxUserSemaphore != NULL ) - { - xSemaphoreGive( pxSocket->pxUserSemaphore ); - } - } - #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ - - #if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) - { - if( pxSocket->pxUserWakeCallback != NULL ) - { - pxSocket->pxUserWakeCallback( pxSocket ); - } - } - #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ - - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - { - if( pxSocket->pxSocketSet != NULL ) - { - EventBits_t xSelectBits = ( pxSocket->xEventBits >> SOCKET_EVENT_BIT_COUNT ) & eSELECT_ALL; - if( xSelectBits != 0ul ) - { - pxSocket->xSocketBits |= xSelectBits; - xEventGroupSetBits( pxSocket->pxSocketSet->xSelectGroup, xSelectBits ); - } - } - - pxSocket->xEventBits &= eSOCKET_ALL; - } - #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ - - if( ( pxSocket->xEventGroup != NULL ) && ( pxSocket->xEventBits != 0u ) ) - { - xEventGroupSetBits( pxSocket->xEventGroup, pxSocket->xEventBits ); - } - - pxSocket->xEventBits = 0ul; -} - -/*-----------------------------------------------------------*/ - -#if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - - /* This define makes it possible for network-card drivers to inspect - * UDP message and see if there is any UDP socket bound to a given port - * number. - * This is probably only usefull in systems with a minimum of RAM and - * when lots of anonymous broadcast messages come in - */ - BaseType_t xPortHasUDPSocket( uint16_t usPortNr ) - { - BaseType_t xFound = pdFALSE; - - vTaskSuspendAll(); - { - if( ( pxListFindListItemWithValue( &xBoundUDPSocketsList, ( TickType_t ) usPortNr ) != NULL ) ) - { - xFound = pdTRUE; - } - } - xTaskResumeAll(); - - return xFound; - } - -#endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - static BaseType_t bMayConnect( FreeRTOS_Socket_t *pxSocket ); - static BaseType_t bMayConnect( FreeRTOS_Socket_t *pxSocket ) - { - switch( pxSocket->u.xTCP.ucTCPState ) - { - case eCLOSED: - case eCLOSE_WAIT: return 0; - case eCONNECT_SYN: return -pdFREERTOS_ERRNO_EINPROGRESS; - default: return -pdFREERTOS_ERRNO_EAGAIN; - } - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - static BaseType_t prvTCPConnectStart( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr *pxAddress ) - { - BaseType_t xResult = 0; - - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdFALSE ) == pdFALSE ) - { - /* Not a valid socket or wrong type */ - xResult = -pdFREERTOS_ERRNO_EBADF; - } - else if( FreeRTOS_issocketconnected( pxSocket ) > 0 ) - { - /* The socket is already connected. */ - xResult = -pdFREERTOS_ERRNO_EISCONN; - } - else if( socketSOCKET_IS_BOUND( pxSocket ) == pdFALSE ) - { - /* Bind the socket to the port that the client task will send from. - Non-standard, so the error returned is that returned by bind(). */ - xResult = FreeRTOS_bind( ( Socket_t ) pxSocket, NULL, 0u ); - } - - if( xResult == 0 ) - { - /* Check if it makes any sense to wait for a connect event, this condition - might change while sleeping, so it must be checked within each loop */ - xResult = bMayConnect( pxSocket ); /* -EINPROGRESS, -EAGAIN, or 0 for OK */ - - /* Start the connect procedure, kernel will start working on it */ - if( xResult == 0 ) - { - pxSocket->u.xTCP.bits.bConnPrepared = pdFALSE_UNSIGNED; - pxSocket->u.xTCP.ucRepCount = 0u; - - FreeRTOS_debug_printf( ( "FreeRTOS_connect: %u to %lxip:%u\n", - pxSocket->usLocalPort, FreeRTOS_ntohl( pxAddress->sin_addr ), FreeRTOS_ntohs( pxAddress->sin_port ) ) ); - - /* Port on remote machine. */ - pxSocket->u.xTCP.usRemotePort = FreeRTOS_ntohs( pxAddress->sin_port ); - - /* IP address of remote machine. */ - pxSocket->u.xTCP.ulRemoteIP = FreeRTOS_ntohl( pxAddress->sin_addr ); - - /* (client) internal state: socket wants to send a connect. */ - vTCPStateChange( pxSocket, eCONNECT_SYN ); - - /* To start an active connect. */ - pxSocket->u.xTCP.usTimeout = 1u; - - if( xSendEventToIPTask( eTCPTimerEvent ) != pdPASS ) - { - xResult = -pdFREERTOS_ERRNO_ECANCELED; - } - } - } - - return xResult; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * FreeRTOS_connect: socket wants to connect to a remote port - */ - BaseType_t FreeRTOS_connect( Socket_t xClientSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t* ) xClientSocket; - TickType_t xRemainingTime; - BaseType_t xTimed = pdFALSE; - BaseType_t xResult; - TimeOut_t xTimeOut; - - ( void ) xAddressLength; - - xResult = prvTCPConnectStart( pxSocket, pxAddress ); - - if( xResult == 0 ) - { - /* And wait for the result */ - for( ;; ) - { - if( xTimed == pdFALSE ) - { - /* Only in the first round, check for non-blocking */ - xRemainingTime = pxSocket->xReceiveBlockTime; - if( xRemainingTime == ( TickType_t )0 ) - { - /* Not yet connected, correct state, non-blocking. */ - xResult = -pdFREERTOS_ERRNO_EWOULDBLOCK; - break; - } - - /* Don't get here a second time. */ - xTimed = pdTRUE; - - /* Fetch the current time */ - vTaskSetTimeOutState( &xTimeOut ); - } - - /* Did it get connected while sleeping ? */ - xResult = FreeRTOS_issocketconnected( pxSocket ); - - /* Returns positive when connected, negative means an error */ - if( xResult < 0 ) - { - /* Return the error */ - break; - } - - if( xResult > 0 ) - { - /* Socket now connected, return a zero */ - xResult = 0; - break; - } - - /* Is it allowed to sleep more? */ - if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) ) - { - xResult = -pdFREERTOS_ERRNO_ETIMEDOUT; - break; - } - - /* Go sleeping until we get any down-stream event */ - xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_CONNECT, pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); - } - } - - return xResult; - } -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * FreeRTOS_accept: can return a new connected socket - * if the server socket is in listen mode and receives a connection request - * The new socket will be bound already to the same port number as the listing - * socket. - */ - Socket_t FreeRTOS_accept( Socket_t xServerSocket, struct freertos_sockaddr *pxAddress, socklen_t *pxAddressLength ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xServerSocket; - FreeRTOS_Socket_t *pxClientSocket = NULL; - TickType_t xRemainingTime; - BaseType_t xTimed = pdFALSE, xAsk = pdFALSE; - TimeOut_t xTimeOut; - IPStackEvent_t xAskEvent; - - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) - { - /* Not a valid socket or wrong type */ - pxClientSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; - } - else if( ( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) && - ( pxSocket->u.xTCP.ucTCPState != eTCP_LISTEN ) ) - { - /* Parent socket is not in listening mode */ - pxClientSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; - } - else - { - /* Loop will stop with breaks. */ - for( ; ; ) - { - /* Is there a new client? */ - vTaskSuspendAll(); - { - if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) - { - pxClientSocket = pxSocket->u.xTCP.pxPeerSocket; - } - else - { - pxClientSocket = pxSocket; - } - if( pxClientSocket != NULL ) - { - pxSocket->u.xTCP.pxPeerSocket = NULL; - - /* Is it still not taken ? */ - if( pxClientSocket->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) - { - pxClientSocket->u.xTCP.bits.bPassAccept = pdFALSE_UNSIGNED; - } - else - { - pxClientSocket = NULL; - } - } - } - xTaskResumeAll(); - - if( pxClientSocket != NULL ) - { - if( pxAddress != NULL ) - { - /* IP address of remote machine. */ - pxAddress->sin_addr = FreeRTOS_ntohl( pxClientSocket->u.xTCP.ulRemoteIP ); - - /* Port on remote machine. */ - pxAddress->sin_port = FreeRTOS_ntohs( pxClientSocket->u.xTCP.usRemotePort ); - } - if( pxAddressLength != NULL ) - { - *pxAddressLength = sizeof( *pxAddress ); - } - - if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) - { - xAsk = pdTRUE; - } - } - - if( xAsk != pdFALSE ) - { - /* Ask to set an event in 'xEventGroup' as soon as a new - client gets connected for this listening socket. */ - xAskEvent.eEventType = eTCPAcceptEvent; - xAskEvent.pvData = ( void * ) pxSocket; - xSendEventStructToIPTask( &xAskEvent, portMAX_DELAY ); - } - - if( pxClientSocket != NULL ) - { - break; - } - - if( xTimed == pdFALSE ) - { - /* Only in the first round, check for non-blocking */ - xRemainingTime = pxSocket->xReceiveBlockTime; - if( xRemainingTime == ( TickType_t ) 0 ) - { - break; - } - - /* Don't get here a second time */ - xTimed = pdTRUE; - - /* Fetch the current time */ - vTaskSetTimeOutState( &xTimeOut ); - } - - /* Has the timeout been reached? */ - if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) - { - break; - } - - /* Go sleeping until we get any down-stream event */ - xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_ACCEPT, pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); - } - } - - return ( Socket_t ) pxClientSocket; - } -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * Read incoming data from a TCP socket - * Only after the last byte has been read, a close error might be returned - */ - BaseType_t FreeRTOS_recv( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags ) - { - BaseType_t xByteCount; - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - TickType_t xRemainingTime; - BaseType_t xTimed = pdFALSE; - TimeOut_t xTimeOut; - EventBits_t xEventBits = ( EventBits_t ) 0; - - /* Check if the socket is valid, has type TCP and if it is bound to a - port. */ - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) - { - xByteCount = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - if( pxSocket->u.xTCP.rxStream != NULL ) - { - xByteCount = ( BaseType_t )uxStreamBufferGetSize ( pxSocket->u.xTCP.rxStream ); - } - else - { - xByteCount = 0; - } - - while( xByteCount == 0 ) - { - switch( pxSocket->u.xTCP.ucTCPState ) - { - case eCLOSED: - case eCLOSE_WAIT: /* (server + client) waiting for a connection termination request from the local user. */ - case eCLOSING: /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */ - if( pxSocket->u.xTCP.bits.bMallocError != pdFALSE_UNSIGNED ) - { - /* The no-memory error has priority above the non-connected error. - Both are fatal and will elad to closing the socket. */ - xByteCount = -pdFREERTOS_ERRNO_ENOMEM; - } - else - { - xByteCount = -pdFREERTOS_ERRNO_ENOTCONN; - } - /* Call continue to break out of the switch and also the while - loop. */ - continue; - default: - break; - } - - if( xTimed == pdFALSE ) - { - /* Only in the first round, check for non-blocking. */ - xRemainingTime = pxSocket->xReceiveBlockTime; - - if( xRemainingTime == ( TickType_t ) 0 ) - { - #if( ipconfigSUPPORT_SIGNALS != 0 ) - { - /* Just check for the interrupt flag. */ - xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_INTR, - pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, socketDONT_BLOCK ); - } - #endif /* ipconfigSUPPORT_SIGNALS */ - break; - } - - if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) - { - break; - } - - /* Don't get here a second time. */ - xTimed = pdTRUE; - - /* Fetch the current time. */ - vTaskSetTimeOutState( &xTimeOut ); - } - - /* Has the timeout been reached? */ - if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) - { - break; - } - - /* Block until there is a down-stream event. */ - xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, - eSOCKET_RECEIVE | eSOCKET_CLOSED | eSOCKET_INTR, - pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); - #if( ipconfigSUPPORT_SIGNALS != 0 ) - { - if( ( xEventBits & eSOCKET_INTR ) != 0u ) - { - break; - } - } - #else - { - ( void ) xEventBits; - } - #endif /* ipconfigSUPPORT_SIGNALS */ - - if( pxSocket->u.xTCP.rxStream != NULL ) - { - xByteCount = ( BaseType_t ) uxStreamBufferGetSize ( pxSocket->u.xTCP.rxStream ); - } - else - { - xByteCount = 0; - } - } - - #if( ipconfigSUPPORT_SIGNALS != 0 ) - if( ( xEventBits & eSOCKET_INTR ) != 0 ) - { - if( ( xEventBits & ( eSOCKET_RECEIVE | eSOCKET_CLOSED ) ) != 0 ) - { - /* Shouldn't have cleared other flags. */ - xEventBits &= ~eSOCKET_INTR; - xEventGroupSetBits( pxSocket->xEventGroup, xEventBits ); - } - xByteCount = -pdFREERTOS_ERRNO_EINTR; - } - else - #endif /* ipconfigSUPPORT_SIGNALS */ - if( xByteCount > 0 ) - { - if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) - { - xByteCount = ( BaseType_t ) uxStreamBufferGet( pxSocket->u.xTCP.rxStream, 0ul, ( uint8_t * ) pvBuffer, ( size_t ) xBufferLength, ( xFlags & FREERTOS_MSG_PEEK ) != 0 ); - if( pxSocket->u.xTCP.bits.bLowWater != pdFALSE_UNSIGNED ) - { - /* We had reached the low-water mark, now see if the flag - can be cleared */ - size_t uxFrontSpace = uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ); - - if( uxFrontSpace >= pxSocket->u.xTCP.uxEnoughSpace ) - { - pxSocket->u.xTCP.bits.bLowWater = pdFALSE_UNSIGNED; - pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; - pxSocket->u.xTCP.usTimeout = 1u; /* because bLowWater is cleared. */ - xSendEventToIPTask( eTCPTimerEvent ); - } - } - } - else - { - /* Zero-copy reception of data: pvBuffer is a pointer to a pointer. */ - xByteCount = ( BaseType_t ) uxStreamBufferGetPtr( pxSocket->u.xTCP.rxStream, (uint8_t **)pvBuffer ); - } - } - } /* prvValidSocket() */ - - return xByteCount; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - static int32_t prvTCPSendCheck( FreeRTOS_Socket_t *pxSocket, size_t xDataLength ) - { - int32_t xResult = 1; - - /* Is this a socket of type TCP and is it already bound to a port number ? */ - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) - { - xResult = -pdFREERTOS_ERRNO_EINVAL; - } - else if( pxSocket->u.xTCP.bits.bMallocError != pdFALSE_UNSIGNED ) - { - xResult = -pdFREERTOS_ERRNO_ENOMEM; - } - else if( pxSocket->u.xTCP.ucTCPState == eCLOSED || - pxSocket->u.xTCP.ucTCPState == eCLOSE_WAIT || - pxSocket->u.xTCP.ucTCPState == eCLOSING ) - { - xResult = -pdFREERTOS_ERRNO_ENOTCONN; - } - else if( pxSocket->u.xTCP.bits.bFinSent != pdFALSE_UNSIGNED ) - { - /* This TCP connection is closing already, the FIN flag has been sent. - Maybe it is still delivering or receiving data. - Return OK in order not to get closed/deleted too quickly */ - xResult = 0; - } - else if( xDataLength == 0ul ) - { - /* send() is being called to send zero bytes */ - xResult = 0; - } - else if( pxSocket->u.xTCP.txStream == NULL ) - { - /* Create the outgoing stream only when it is needed */ - prvTCPCreateStream( pxSocket, pdFALSE ); - - if( pxSocket->u.xTCP.txStream == NULL ) - { - xResult = -pdFREERTOS_ERRNO_ENOMEM; - } - } - - return xResult; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* Get a direct pointer to the circular transmit buffer. - '*pxLength' will contain the number of bytes that may be written. */ - uint8_t *FreeRTOS_get_tx_head( Socket_t xSocket, BaseType_t *pxLength ) - { - uint8_t *pucReturn = NULL; - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - StreamBuffer_t *pxBuffer = NULL; - - *pxLength = 0; - - /* Confirm that this is a TCP socket before dereferencing structure - member pointers. */ - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdFALSE ) == pdTRUE ) - { - pxBuffer = pxSocket->u.xTCP.txStream; - if( pxBuffer != NULL ) - { - BaseType_t xSpace = ( BaseType_t )uxStreamBufferGetSpace( pxBuffer ); - BaseType_t xRemain = ( BaseType_t )( pxBuffer->LENGTH - pxBuffer->uxHead ); - - *pxLength = FreeRTOS_min_BaseType( xSpace, xRemain ); - pucReturn = pxBuffer->ucArray + pxBuffer->uxHead; - } - } - - return pucReturn; - } -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - /* - * Send data using a TCP socket. It is not necessary to have the socket - * connected already. Outgoing data will be stored and delivered as soon as - * the socket gets connected. - */ - BaseType_t FreeRTOS_send( Socket_t xSocket, const void *pvBuffer, size_t uxDataLength, BaseType_t xFlags ) - { - BaseType_t xByteCount; - BaseType_t xBytesLeft; - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - TickType_t xRemainingTime; - BaseType_t xTimed = pdFALSE; - TimeOut_t xTimeOut; - BaseType_t xCloseAfterSend; - - /* Prevent compiler warnings about unused parameters. The parameter - may be used in future versions. */ - ( void ) xFlags; - - xByteCount = ( BaseType_t ) prvTCPSendCheck( pxSocket, uxDataLength ); - - if( xByteCount > 0 ) - { - /* xBytesLeft is number of bytes to send, will count to zero. */ - xBytesLeft = ( BaseType_t ) uxDataLength; - - /* xByteCount is number of bytes that can be sent now. */ - xByteCount = ( BaseType_t ) uxStreamBufferGetSpace( pxSocket->u.xTCP.txStream ); - - /* While there are still bytes to be sent. */ - while( xBytesLeft > 0 ) - { - /* If txStream has space. */ - if( xByteCount > 0 ) - { - /* Don't send more than necessary. */ - if( xByteCount > xBytesLeft ) - { - xByteCount = xBytesLeft; - } - - /* Is the close-after-send flag set and is this really the - last transmission? */ - if( ( pxSocket->u.xTCP.bits.bCloseAfterSend != pdFALSE_UNSIGNED ) && ( xByteCount == xBytesLeft ) ) - { - xCloseAfterSend = pdTRUE; - } - else - { - xCloseAfterSend = pdFALSE; - } - - /* The flag 'bCloseAfterSend' can be set before sending data - using setsockopt() - - When the last data packet is being sent out, a FIN flag will - be included to let the peer know that no more data is to be - expected. The use of 'bCloseAfterSend' is not mandatory, it - is just a faster way of transferring files (e.g. when using - FTP). */ - if( xCloseAfterSend != pdFALSE ) - { - /* Now suspend the scheduler: sending the last data and - setting bCloseRequested must be done together */ - vTaskSuspendAll(); - pxSocket->u.xTCP.bits.bCloseRequested = pdTRUE_UNSIGNED; - } - - xByteCount = ( BaseType_t ) uxStreamBufferAdd( pxSocket->u.xTCP.txStream, 0ul, ( const uint8_t * ) pvBuffer, ( size_t ) xByteCount ); - - if( xCloseAfterSend != pdFALSE ) - { - /* Now when the IP-task transmits the data, it will also - see that bCloseRequested is true and include the FIN - flag to start closure of the connection. */ - xTaskResumeAll(); - } - - /* Send a message to the IP-task so it can work on this - socket. Data is sent, let the IP-task work on it. */ - pxSocket->u.xTCP.usTimeout = 1u; - - if( xIsCallingFromIPTask() == pdFALSE ) - { - /* Only send a TCP timer event when not called from the - IP-task. */ - xSendEventToIPTask( eTCPTimerEvent ); - } - - xBytesLeft -= xByteCount; - - if( xBytesLeft == 0 ) - { - break; - } - - /* As there are still bytes left to be sent, increase the - data pointer. */ - pvBuffer = ( void * ) ( ( ( const uint8_t * ) pvBuffer) + xByteCount ); - } - - /* Not all bytes have been sent. In case the socket is marked as - blocking sleep for a while. */ - if( xTimed == pdFALSE ) - { - /* Only in the first round, check for non-blocking. */ - xRemainingTime = pxSocket->xSendBlockTime; - - #if( ipconfigUSE_CALLBACKS != 0 ) - { - if( xIsCallingFromIPTask() != pdFALSE ) - { - /* If this send function is called from within a - call-back handler it may not block, otherwise - chances would be big to get a deadlock: the IP-task - waiting for itself. */ - xRemainingTime = ( TickType_t ) 0; - } - } - #endif /* ipconfigUSE_CALLBACKS */ - - if( xRemainingTime == ( TickType_t ) 0 ) - { - break; - } - - if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) - { - break; - } - - /* Don't get here a second time. */ - xTimed = pdTRUE; - - /* Fetch the current time. */ - vTaskSetTimeOutState( &xTimeOut ); - } - else - { - /* Has the timeout been reached? */ - if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) - { - break; - } - } - - /* Go sleeping until down-stream events are received. */ - xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_SEND | eSOCKET_CLOSED, - pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); - - xByteCount = ( BaseType_t ) uxStreamBufferGetSpace( pxSocket->u.xTCP.txStream ); - } - - /* How much was actually sent? */ - xByteCount = ( ( BaseType_t ) uxDataLength ) - xBytesLeft; - - if( xByteCount == 0 ) - { - if( pxSocket->u.xTCP.ucTCPState > eESTABLISHED ) - { - xByteCount = ( BaseType_t ) -pdFREERTOS_ERRNO_ENOTCONN; - } - else - { - if( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) - { - FreeRTOS_debug_printf( ( "FreeRTOS_send: %u -> %lxip:%d: no space\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort ) ); - } - - xByteCount = ( BaseType_t ) -pdFREERTOS_ERRNO_ENOSPC; - } - } - } - - return xByteCount; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * Request to put a socket in listen mode - */ - BaseType_t FreeRTOS_listen( Socket_t xSocket, BaseType_t xBacklog ) - { - FreeRTOS_Socket_t *pxSocket; - BaseType_t xResult = 0; - - pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - - /* listen() is allowed for a valid TCP socket in Closed state and already - bound. */ - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) - { - xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; - } - else if( ( pxSocket->u.xTCP.ucTCPState != eCLOSED ) && ( pxSocket->u.xTCP.ucTCPState != eCLOSE_WAIT ) ) - { - /* Socket is in a wrong state. */ - xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; - } - else - { - /* Backlog is interpreted here as "the maximum number of child - sockets. */ - pxSocket->u.xTCP.usBacklog = ( uint16_t )FreeRTOS_min_int32( ( int32_t ) 0xffff, ( int32_t ) xBacklog ); - - /* This cleaning is necessary only if a listening socket is being - reused as it might have had a previous connection. */ - if( pxSocket->u.xTCP.bits.bReuseSocket ) - { - if( pxSocket->u.xTCP.rxStream != NULL ) - { - vStreamBufferClear( pxSocket->u.xTCP.rxStream ); - } - - if( pxSocket->u.xTCP.txStream != NULL ) - { - vStreamBufferClear( pxSocket->u.xTCP.txStream ); - } - - memset( pxSocket->u.xTCP.xPacket.u.ucLastPacket, '\0', sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ) ); - memset( &pxSocket->u.xTCP.xTCPWindow, '\0', sizeof( pxSocket->u.xTCP.xTCPWindow ) ); - memset( &pxSocket->u.xTCP.bits, '\0', sizeof( pxSocket->u.xTCP.bits ) ); - - /* Now set the bReuseSocket flag again, because the bits have - just been cleared. */ - pxSocket->u.xTCP.bits.bReuseSocket = pdTRUE_UNSIGNED; - } - - vTCPStateChange( pxSocket, eTCP_LISTEN ); - } - - return xResult; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* shutdown - shut down part of a full-duplex connection */ - BaseType_t FreeRTOS_shutdown( Socket_t xSocket, BaseType_t xHow ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xResult; - - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) - { - /*_RB_ Is this comment correct? The socket is not of a type that - supports the listen() operation. */ - xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; - } - else if ( pxSocket->u.xTCP.ucTCPState != eESTABLISHED ) - { - /*_RB_ Is this comment correct? The socket is not of a type that - supports the listen() operation. */ - xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; - } - else - { - pxSocket->u.xTCP.bits.bUserShutdown = pdTRUE_UNSIGNED; - - /* Let the IP-task perform the shutdown of the connection. */ - pxSocket->u.xTCP.usTimeout = 1u; - xSendEventToIPTask( eTCPTimerEvent ); - xResult = 0; - } - (void) xHow; - - return xResult; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * A TCP timer has expired, now check all TCP sockets for: - * - Active connect - * - Send a delayed ACK - * - Send new data - * - Send a keep-alive packet - * - Check for timeout (in non-connected states only) - */ - TickType_t xTCPTimerCheck( BaseType_t xWillSleep ) - { - FreeRTOS_Socket_t *pxSocket; - TickType_t xShortest = pdMS_TO_TICKS( ( TickType_t ) ipTCP_TIMER_PERIOD_MS ); - TickType_t xNow = xTaskGetTickCount(); - static TickType_t xLastTime = 0u; - TickType_t xDelta = xNow - xLastTime; - ListItem_t* pxEnd = ( ListItem_t * ) listGET_END_MARKER( &xBoundTCPSocketsList ); - ListItem_t *pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundTCPSocketsList ); - - xLastTime = xNow; - - if( xDelta == 0u ) - { - xDelta = 1u; - } - - while( pxIterator != pxEnd ) - { - pxSocket = ( FreeRTOS_Socket_t * )listGET_LIST_ITEM_OWNER( pxIterator ); - pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ); - - /* Sockets with 'tmout == 0' do not need any regular attention. */ - if( pxSocket->u.xTCP.usTimeout == 0u ) - { - continue; - } - - if( xDelta < ( TickType_t ) pxSocket->u.xTCP.usTimeout ) - { - pxSocket->u.xTCP.usTimeout = ( uint16_t ) ( ( ( TickType_t ) pxSocket->u.xTCP.usTimeout ) - xDelta ); - } - else - { - int rc ; - pxSocket->u.xTCP.usTimeout = 0u; - rc = xTCPSocketCheck( pxSocket ); - - /* Within this function, the socket might want to send a delayed - ack or send out data or whatever it needs to do. */ - if( rc < 0 ) - { - /* Continue because the socket was deleted. */ - continue; - } - } - - /* In xEventBits the driver may indicate that the socket has - important events for the user. These are only done just before the - IP-task goes to sleep. */ - if( pxSocket->xEventBits != 0u ) - { - if( xWillSleep != pdFALSE ) - { - /* The IP-task is about to go to sleep, so messages can be - sent to the socket owners. */ - vSocketWakeUpUser( pxSocket ); - } - else - { - /* Or else make sure this will be called again to wake-up - the sockets' owner. */ - xShortest = ( TickType_t ) 0; - } - } - - if( ( pxSocket->u.xTCP.usTimeout != 0u ) && ( xShortest > ( TickType_t ) pxSocket->u.xTCP.usTimeout ) ) - { - xShortest = ( TickType_t ) pxSocket->u.xTCP.usTimeout; - } - } - - return xShortest; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * TCP: as multiple sockets may be bound to the same local port number - * looking up a socket is a little more complex: - * Both a local port, and a remote port and IP address are being used - * For a socket in listening mode, the remote port and IP address are both 0 - */ - FreeRTOS_Socket_t *pxTCPSocketLookup( uint32_t ulLocalIP, UBaseType_t uxLocalPort, uint32_t ulRemoteIP, UBaseType_t uxRemotePort ) - { - ListItem_t *pxIterator; - FreeRTOS_Socket_t *pxResult = NULL, *pxListenSocket = NULL; - MiniListItem_t *pxEnd = ( MiniListItem_t* )listGET_END_MARKER( &xBoundTCPSocketsList ); - - /* Parameter not yet supported. */ - ( void ) ulLocalIP; - - for( pxIterator = ( ListItem_t * ) listGET_NEXT( pxEnd ); - pxIterator != ( ListItem_t * ) pxEnd; - pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - - if( pxSocket->usLocalPort == ( uint16_t ) uxLocalPort ) - { - if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) - { - /* If this is a socket listening to uxLocalPort, remember it - in case there is no perfect match. */ - pxListenSocket = pxSocket; - } - else if( ( pxSocket->u.xTCP.usRemotePort == ( uint16_t ) uxRemotePort ) && ( pxSocket->u.xTCP.ulRemoteIP == ulRemoteIP ) ) - { - /* For sockets not in listening mode, find a match with - xLocalPort, ulRemoteIP AND xRemotePort. */ - pxResult = pxSocket; - break; - } - } - } - if( pxResult == NULL ) - { - /* An exact match was not found, maybe a listening socket was - found. */ - pxResult = pxListenSocket; - } - - return pxResult; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - const struct xSTREAM_BUFFER *FreeRTOS_get_rx_buf( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * )xSocket; - struct xSTREAM_BUFFER *pxReturn = NULL; - - /* Confirm that this is a TCP socket before dereferencing structure - member pointers. */ - if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdFALSE ) == pdTRUE ) - { - pxReturn = pxSocket->u.xTCP.rxStream; - } - - return pxReturn; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - static StreamBuffer_t *prvTCPCreateStream ( FreeRTOS_Socket_t *pxSocket, BaseType_t xIsInputStream ) - { - StreamBuffer_t *pxBuffer; - size_t uxLength; - size_t uxSize; - - /* Now that a stream is created, the maximum size is fixed before - creation, it could still be changed with setsockopt(). */ - if( xIsInputStream != pdFALSE ) - { - uxLength = pxSocket->u.xTCP.uxRxStreamSize; - - if( pxSocket->u.xTCP.uxLittleSpace == 0ul ) - { - pxSocket->u.xTCP.uxLittleSpace = ( sock20_PERCENT * pxSocket->u.xTCP.uxRxStreamSize ) / sock100_PERCENT; - } - - if( pxSocket->u.xTCP.uxEnoughSpace == 0ul ) - { - pxSocket->u.xTCP.uxEnoughSpace = ( sock80_PERCENT * pxSocket->u.xTCP.uxRxStreamSize ) / sock100_PERCENT; - } - } - else - { - uxLength = pxSocket->u.xTCP.uxTxStreamSize; - } - - /* Add an extra 4 (or 8) bytes. */ - uxLength += sizeof( size_t ); - - /* And make the length a multiple of sizeof( size_t ). */ - uxLength &= ~( sizeof( size_t ) - 1u ); - - uxSize = sizeof( *pxBuffer ) - sizeof( pxBuffer->ucArray ) + uxLength; - - pxBuffer = ( StreamBuffer_t * )pvPortMallocLarge( uxSize ); - - if( pxBuffer == NULL ) - { - FreeRTOS_debug_printf( ( "prvTCPCreateStream: malloc failed\n" ) ); - pxSocket->u.xTCP.bits.bMallocError = pdTRUE_UNSIGNED; - vTCPStateChange( pxSocket, eCLOSE_WAIT ); - } - else - { - /* Clear the markers of the stream */ - memset( pxBuffer, '\0', sizeof( *pxBuffer ) - sizeof( pxBuffer->ucArray ) ); - pxBuffer->LENGTH = ( size_t ) uxLength ; - - if( xTCPWindowLoggingLevel != 0 ) - { - FreeRTOS_debug_printf( ( "prvTCPCreateStream: %cxStream created %lu bytes (total %lu)\n", xIsInputStream ? 'R' : 'T', uxLength, uxSize ) ); - } - - if( xIsInputStream != 0 ) - { - pxSocket->u.xTCP.rxStream = pxBuffer; - } - else - { - pxSocket->u.xTCP.txStream = pxBuffer; - } - } - - return pxBuffer; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * Add data to the RxStream. When uxOffset > 0, data has come in out-of-order - * and will be put in front of the head so it can not be popped by the user. - */ - int32_t lTCPAddRxdata( FreeRTOS_Socket_t *pxSocket, size_t uxOffset, const uint8_t *pcData, uint32_t ulByteCount ) - { - StreamBuffer_t *pxStream = pxSocket->u.xTCP.rxStream; - int32_t xResult; - #if( ipconfigUSE_CALLBACKS == 1 ) - BaseType_t bHasHandler = ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xTCP.pxHandleReceive ); - const uint8_t *pucBuffer = NULL; - #endif /* ipconfigUSE_CALLBACKS */ - - /* int32_t uxStreamBufferAdd( pxBuffer, uxOffset, pucData, aCount ) - if( pucData != NULL ) copy data the the buffer - if( pucData == NULL ) no copying, just advance rxHead - if( uxOffset != 0 ) Just store data which has come out-of-order - if( uxOffset == 0 ) Also advance rxHead */ - if( pxStream == NULL ) - { - pxStream = prvTCPCreateStream( pxSocket, pdTRUE ); - if( pxStream == NULL ) - { - return -1; - } - } - - #if( ipconfigUSE_CALLBACKS == 1 ) - { - if( ( bHasHandler != pdFALSE ) && ( uxStreamBufferGetSize( pxStream ) == 0u ) && ( uxOffset == 0ul ) && ( pcData != NULL ) ) - { - /* Data can be passed directly to the user */ - pucBuffer = pcData; - - /* Zero-copy for call-back: no need to add the bytes to the - stream, only the pointer will be advanced by uxStreamBufferAdd(). */ - pcData = NULL; - } - } - #endif /* ipconfigUSE_CALLBACKS */ - - xResult = ( int32_t ) uxStreamBufferAdd( pxStream, uxOffset, pcData, ( size_t ) ulByteCount ); - - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - if( xResult != ( int32_t ) ulByteCount ) - { - FreeRTOS_debug_printf( ( "lTCPAddRxdata: at %ld: %ld/%lu bytes (tail %lu head %lu space %lu front %lu)\n", - uxOffset, xResult, ulByteCount, - pxStream->uxTail, - pxStream->uxHead, - uxStreamBufferFrontSpace( pxStream ), - pxStream->uxFront ) ); - } - } - #endif /* ipconfigHAS_DEBUG_PRINTF */ - - if( uxOffset == 0u ) - { - /* Data is being added to rxStream at the head (offs = 0) */ - #if( ipconfigUSE_CALLBACKS == 1 ) - if( bHasHandler != pdFALSE ) - { - /* The socket owner has installed an OnReceive handler. Pass the - Rx data, without copying from the rxStream, to the user. */ - for (;;) - { - uint8_t *ucReadPtr = NULL; - uint32_t ulCount; - if( pucBuffer != NULL ) - { - ucReadPtr = ( uint8_t * )pucBuffer; - ulCount = ulByteCount; - pucBuffer = NULL; - } - else - { - ulCount = ( uint32_t ) uxStreamBufferGetPtr( pxStream, &( ucReadPtr ) ); - } - - if( ulCount == 0ul ) - { - break; - } - - pxSocket->u.xTCP.pxHandleReceive( ( Socket_t )pxSocket, ( void* )ucReadPtr, ( size_t ) ulCount ); - uxStreamBufferGet( pxStream, 0ul, NULL, ( size_t ) ulCount, pdFALSE ); - } - } else - #endif /* ipconfigUSE_CALLBACKS */ - { - /* See if running out of space. */ - if( pxSocket->u.xTCP.bits.bLowWater == pdFALSE_UNSIGNED ) - { - size_t uxFrontSpace = uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ); - if( uxFrontSpace <= pxSocket->u.xTCP.uxLittleSpace ) - { - pxSocket->u.xTCP.bits.bLowWater = pdTRUE_UNSIGNED; - pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; - - /* bLowWater was reached, send the changed window size. */ - pxSocket->u.xTCP.usTimeout = 1u; - xSendEventToIPTask( eTCPTimerEvent ); - } - } - - /* New incoming data is available, wake up the user. User's - semaphores will be set just before the IP-task goes asleep. */ - pxSocket->xEventBits |= eSOCKET_RECEIVE; - - #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - { - if( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) - { - pxSocket->xEventBits |= ( eSELECT_READ << SOCKET_EVENT_BIT_COUNT ); - } - } - #endif - } - } - - return xResult; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* Function to get the remote address and IP port */ - BaseType_t FreeRTOS_GetRemoteAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xResult; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xResult = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - /* BSD style sockets communicate IP and port addresses in network - byte order. - - IP address of remote machine. */ - pxAddress->sin_addr = FreeRTOS_htonl ( pxSocket->u.xTCP.ulRemoteIP ); - - /* Port on remote machine. */ - pxAddress->sin_port = FreeRTOS_htons ( pxSocket->u.xTCP.usRemotePort ); - - xResult = ( BaseType_t ) sizeof( ( *pxAddress ) ); - } - - return xResult; - } - -#endif /* ipconfigUSE_TCP */ - -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* Returns the number of bytes that may be added to txStream */ - BaseType_t FreeRTOS_maywrite( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xResult; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xResult = -pdFREERTOS_ERRNO_EINVAL; - } - else if( pxSocket->u.xTCP.ucTCPState != eESTABLISHED ) - { - if( ( pxSocket->u.xTCP.ucTCPState < eCONNECT_SYN ) || ( pxSocket->u.xTCP.ucTCPState > eESTABLISHED ) ) - { - xResult = -1; - } - else - { - xResult = 0; - } - } - else if( pxSocket->u.xTCP.txStream == NULL ) - { - xResult = ( BaseType_t ) pxSocket->u.xTCP.uxTxStreamSize; - } - else - { - xResult = ( BaseType_t ) uxStreamBufferGetSpace( pxSocket->u.xTCP.txStream ); - } - - return xResult; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP ==1 ) - - BaseType_t FreeRTOS_tx_space( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - if( pxSocket->u.xTCP.txStream != NULL ) - { - xReturn = ( BaseType_t ) uxStreamBufferGetSpace ( pxSocket->u.xTCP.txStream ); - } - else - { - xReturn = ( BaseType_t ) pxSocket->u.xTCP.uxTxStreamSize; - } - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - BaseType_t FreeRTOS_tx_size( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - if( pxSocket->u.xTCP.txStream != NULL ) - { - xReturn = ( BaseType_t ) uxStreamBufferGetSize ( pxSocket->u.xTCP.txStream ); - } - else - { - xReturn = 0; - } - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* Returns pdTRUE if TCP socket is connected. */ - BaseType_t FreeRTOS_issocketconnected( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn = pdFALSE; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - if( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) - { - if( pxSocket->u.xTCP.ucTCPState < eCLOSE_WAIT ) - { - xReturn = pdTRUE; - } - } - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* returns the actual size of MSS being used */ - BaseType_t FreeRTOS_mss( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - /* usCurMSS is declared as uint16_t to save space. FreeRTOS_mss() - will often be used in signed native-size expressions cast it to - BaseType_t. */ - xReturn = ( BaseType_t ) ( pxSocket->u.xTCP.usCurMSS ); - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* HT: for internal use only: return the connection status */ - BaseType_t FreeRTOS_connstatus( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else - { - /* Cast it to BaseType_t */ - xReturn = ( BaseType_t ) ( pxSocket->u.xTCP.ucTCPState ); - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - /* - * Returns the number of bytes which can be read. - */ - BaseType_t FreeRTOS_rx_size( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn; - - if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else if( pxSocket->u.xTCP.rxStream != NULL ) - { - xReturn = ( BaseType_t ) uxStreamBufferGetSize( pxSocket->u.xTCP.rxStream ); - } - else - { - xReturn = 0; - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP == 1 ) - - void FreeRTOS_netstat( void ) - { - IPStackEvent_t xAskEvent; - - /* Ask the IP-task to call vTCPNetStat() - * to avoid accessing xBoundTCPSocketsList - */ - xAskEvent.eEventType = eTCPNetStat; - xAskEvent.pvData = ( void * ) NULL; - xSendEventStructToIPTask( &xAskEvent, 1000u ); - } - -#endif /* ipconfigUSE_TCP */ -/*-----------------------------------------------------------*/ - -#if( ( ipconfigHAS_PRINTF != 0 ) && ( ipconfigUSE_TCP == 1 ) ) - - void vTCPNetStat( void ) - { - /* Show a simple listing of all created sockets and their connections */ - ListItem_t *pxIterator; - BaseType_t count = 0; - - if( listLIST_IS_INITIALISED( &xBoundTCPSocketsList ) == pdFALSE ) - { - FreeRTOS_printf( ( "PLUS-TCP not initialized\n" ) ); - } - else - { - FreeRTOS_printf( ( "Prot Port IP-Remote : Port R/T Status Alive tmout Child\n" ) ); - for( pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundTCPSocketsList ); - pxIterator != ( ListItem_t * ) listGET_END_MARKER( &xBoundTCPSocketsList ); - pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - #if( ipconfigTCP_KEEP_ALIVE == 1 ) - TickType_t age = xTaskGetTickCount() - pxSocket->u.xTCP.xLastAliveTime; - #else - TickType_t age = 0u; - #endif - #if( ipconfigUSE_CALLBACKS == 1 ) - void *pxHandleReceive = (void*)pxSocket->u.xTCP.pxHandleReceive; - #else - void *pxHandleReceive = (void*)NULL; - #endif - char ucChildText[16] = ""; - if (pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN) - { - const int32_t copied_len = snprintf( ucChildText, sizeof( ucChildText ), " %d/%d", - ( int ) pxSocket->u.xTCP.usChildCount, - ( int ) pxSocket->u.xTCP.usBacklog); - /* These should never evaluate to false since the buffers are both shorter than 5-6 characters (<=65535) */ - configASSERT( copied_len >= 0 ); - configASSERT( copied_len < sizeof( ucChildText ) ); - } - FreeRTOS_printf( ( "TCP %5d %-16lxip:%5d %d/%d %-13.13s %6lu %6u%s\n", - pxSocket->usLocalPort, /* Local port on this machine */ - pxSocket->u.xTCP.ulRemoteIP, /* IP address of remote machine */ - pxSocket->u.xTCP.usRemotePort, /* Port on remote machine */ - pxSocket->u.xTCP.rxStream != NULL, - pxSocket->u.xTCP.txStream != NULL, - FreeRTOS_GetTCPStateName( pxSocket->u.xTCP.ucTCPState ), - (age > 999999 ? 999999 : age), /* Format 'age' for printing */ - pxSocket->u.xTCP.usTimeout, - ucChildText ) ); - /* Remove compiler warnings if FreeRTOS_debug_printf() is not defined. */ - ( void ) pxHandleReceive; - count++; - } - - for( pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundUDPSocketsList ); - pxIterator != ( ListItem_t * ) listGET_END_MARKER( &xBoundUDPSocketsList ); - pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - /* Local port on this machine */ - FreeRTOS_printf( ( "UDP Port %5u\n", - FreeRTOS_ntohs( listGET_LIST_ITEM_VALUE( pxIterator ) ) ) ); - count++; - } - - FreeRTOS_printf( ( "FreeRTOS_netstat: %lu sockets %lu < %lu < %d buffers free\n", - count, - uxGetMinimumFreeNetworkBuffers( ), - uxGetNumberOfFreeNetworkBuffers( ), - ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) ); - } - } - -#endif /* ( ( ipconfigHAS_PRINTF != 0 ) && ( ipconfigUSE_TCP == 1 ) ) */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - - void vSocketSelect( SocketSelect_t *pxSocketSet ) - { - BaseType_t xRound; - EventBits_t xSocketBits, xBitsToClear; - #if ipconfigUSE_TCP == 1 - BaseType_t xLastRound = 1; - #else - BaseType_t xLastRound = 0; - #endif - - /* These flags will be switched on after checking the socket status. */ - EventBits_t xGroupBits = 0; - pxSocketSet->pxSocket = NULL; - - for( xRound = 0; xRound <= xLastRound; xRound++ ) - { - const ListItem_t *pxIterator; - const MiniListItem_t *pxEnd; - if( xRound == 0 ) - { - pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &xBoundUDPSocketsList ); - } - #if ipconfigUSE_TCP == 1 - else - { - pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &xBoundTCPSocketsList ); - } - #endif /* ipconfigUSE_TCP == 1 */ - for( pxIterator = ( const ListItem_t * ) ( listGET_NEXT( pxEnd ) ); - pxIterator != ( const ListItem_t * ) pxEnd; - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - if( pxSocket->pxSocketSet != pxSocketSet ) - { - /* Socket does not belong to this select group. */ - continue; - } - xSocketBits = 0; - - #if( ipconfigUSE_TCP == 1 ) - if( pxSocket->ucProtocol == FREERTOS_IPPROTO_TCP ) - { - /* Check if the socket has already been accepted by the - owner. If not, it is useless to return it from a - select(). */ - BaseType_t bAccepted = pdFALSE; - - if( pxSocket->u.xTCP.bits.bPassQueued == pdFALSE_UNSIGNED ) - { - if( pxSocket->u.xTCP.bits.bPassAccept == pdFALSE_UNSIGNED ) - { - bAccepted = pdTRUE; - } - } - - /* Is the set owner interested in READ events? */ - if( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) - { - if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) - { - if( ( pxSocket->u.xTCP.pxPeerSocket != NULL ) && ( pxSocket->u.xTCP.pxPeerSocket->u.xTCP.bits.bPassAccept != 0 ) ) - { - xSocketBits |= eSELECT_READ; - } - } - else if( ( pxSocket->u.xTCP.bits.bReuseSocket != pdFALSE_UNSIGNED ) && ( pxSocket->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) ) - { - /* This socket has the re-use flag. After connecting it turns into - aconnected socket. Set the READ event, so that accept() will be called. */ - xSocketBits |= eSELECT_READ; - } - else if( ( bAccepted != 0 ) && ( FreeRTOS_recvcount( pxSocket ) > 0 ) ) - { - xSocketBits |= eSELECT_READ; - } - } - /* Is the set owner interested in EXCEPTION events? */ - if( ( pxSocket->xSelectBits & eSELECT_EXCEPT ) != 0 ) - { - if( ( pxSocket->u.xTCP.ucTCPState == eCLOSE_WAIT ) || ( pxSocket->u.xTCP.ucTCPState == eCLOSED ) ) - { - xSocketBits |= eSELECT_EXCEPT; - } - } - - /* Is the set owner interested in WRITE events? */ - if( ( pxSocket->xSelectBits & eSELECT_WRITE ) != 0 ) - { - BaseType_t bMatch = pdFALSE; - - if( bAccepted != 0 ) - { - if( FreeRTOS_tx_space( pxSocket ) > 0 ) - { - bMatch = pdTRUE; - } - } - - if( bMatch == pdFALSE ) - { - if( ( pxSocket->u.xTCP.bits.bConnPrepared != pdFALSE_UNSIGNED ) && - ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && - ( pxSocket->u.xTCP.bits.bConnPassed == pdFALSE_UNSIGNED ) ) - { - pxSocket->u.xTCP.bits.bConnPassed = pdTRUE_UNSIGNED; - bMatch = pdTRUE; - } - } - - if( bMatch != pdFALSE ) - { - xSocketBits |= eSELECT_WRITE; - } - } - } - else - #endif /* ipconfigUSE_TCP == 1 */ - { - /* Select events for UDP are simpler. */ - if( ( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) && - ( listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ) > 0U ) ) - { - xSocketBits |= eSELECT_READ; - } - /* The WRITE and EXCEPT bits are not used for UDP */ - } /* if( pxSocket->ucProtocol == FREERTOS_IPPROTO_TCP ) */ - - /* Each socket keeps its own event flags, which are looked-up - by FreeRTOS_FD_ISSSET() */ - pxSocket->xSocketBits = xSocketBits; - - /* The ORed value will be used to set the bits in the event - group. */ - xGroupBits |= xSocketBits; - - } /* for( pxIterator ... ) */ - } /* for( xRound = 0; xRound <= xLastRound; xRound++ ) */ - - xBitsToClear = xEventGroupGetBits( pxSocketSet->xSelectGroup ); - - /* Now set the necessary bits. */ - xBitsToClear = ( xBitsToClear & ~xGroupBits ) & eSELECT_ALL; - - #if( ipconfigSUPPORT_SIGNALS != 0 ) - { - /* Maybe the socketset was signalled, but don't - clear the 'eSELECT_INTR' bit here, as it will be used - and cleared in FreeRTOS_select(). */ - xBitsToClear &= ( EventBits_t ) ~eSELECT_INTR; - } - #endif /* ipconfigSUPPORT_SIGNALS */ - - if( xBitsToClear != 0 ) - { - xEventGroupClearBits( pxSocketSet->xSelectGroup, xBitsToClear ); - } - - /* Now include eSELECT_CALL_IP to wakeup the caller. */ - xEventGroupSetBits( pxSocketSet->xSelectGroup, xGroupBits | eSELECT_CALL_IP ); - } - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SIGNALS != 0 ) - - /* Send a signal to the task which reads from this socket. */ - BaseType_t FreeRTOS_SignalSocket( Socket_t xSocket ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn; - - if( pxSocket == NULL ) - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - else - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - if( ( pxSocket->pxSocketSet != NULL ) && ( pxSocket->pxSocketSet->xSelectGroup != NULL ) ) - { - xEventGroupSetBits( pxSocket->pxSocketSet->xSelectGroup, eSELECT_INTR ); - xReturn = 0; - } - else - #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ - if( pxSocket->xEventGroup != NULL ) - { - xEventGroupSetBits( pxSocket->xEventGroup, eSOCKET_INTR ); - xReturn = 0; - } - else - { - xReturn = -pdFREERTOS_ERRNO_EINVAL; - } - - return xReturn; - } - -#endif /* ipconfigSUPPORT_SIGNALS */ -/*-----------------------------------------------------------*/ - -#if( ipconfigSUPPORT_SIGNALS != 0 ) - - /* Send a signal to the task which reads from this socket (FromISR version). */ - BaseType_t FreeRTOS_SignalSocketFromISR( Socket_t xSocket, BaseType_t *pxHigherPriorityTaskWoken ) - { - FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; - BaseType_t xReturn; - IPStackEvent_t xEvent; - extern QueueHandle_t xNetworkEventQueue; - - configASSERT( pxSocket != NULL ); - configASSERT( pxSocket->ucProtocol == FREERTOS_IPPROTO_TCP ); - configASSERT( pxSocket->xEventGroup ); - - xEvent.eEventType = eSocketSignalEvent; - xEvent.pvData = ( void * )pxSocket; - - /* The IP-task will call FreeRTOS_SignalSocket for this socket. */ - xReturn = xQueueSendToBackFromISR( xNetworkEventQueue, &xEvent, pxHigherPriorityTaskWoken ); - - return xReturn; - } - -#endif /* ipconfigSUPPORT_SIGNALS */ -/*-----------------------------------------------------------*/ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* Standard includes. */ +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_DNS.h" +#include "NetworkBufferManagement.h" + +/* The ItemValue of the sockets xBoundSocketListItem member holds the socket's +port number. */ +#define socketSET_SOCKET_PORT( pxSocket, usPort ) listSET_LIST_ITEM_VALUE( ( &( ( pxSocket )->xBoundSocketListItem ) ), ( usPort ) ) +#define socketGET_SOCKET_PORT( pxSocket ) listGET_LIST_ITEM_VALUE( ( &( ( pxSocket )->xBoundSocketListItem ) ) ) + +/* Test if a socket it bound which means it is either included in +xBoundUDPSocketsList or xBoundTCPSocketsList */ +#define socketSOCKET_IS_BOUND( pxSocket ) ( listLIST_ITEM_CONTAINER( & ( pxSocket )->xBoundSocketListItem ) != NULL ) + +/* If FreeRTOS_sendto() is called on a socket that is not bound to a port +number then, depending on the FreeRTOSIPConfig.h settings, it might be that a +port number is automatically generated for the socket. Automatically generated +port numbers will be between socketAUTO_PORT_ALLOCATION_START_NUMBER and +0xffff. + +Per https://tools.ietf.org/html/rfc6056, "the dynamic ports consist of the range +49152-65535. However, ephemeral port selection algorithms should use the whole +range 1024-65535" excluding those already in use (inbound or outbound). */ +#if !defined( socketAUTO_PORT_ALLOCATION_START_NUMBER ) + #define socketAUTO_PORT_ALLOCATION_START_NUMBER ( ( uint16_t ) 0x0400 ) +#endif + +#define socketAUTO_PORT_ALLOCATION_MAX_NUMBER ( ( uint16_t ) 0xffff ) + +/* The number of octets that make up an IP address. */ +#define socketMAX_IP_ADDRESS_OCTETS 4u + +/* A block time of 0 simply means "don't block". */ +#define socketDONT_BLOCK ( ( TickType_t ) 0 ) + +#if( ( ipconfigUSE_TCP == 1 ) && !defined( ipTCP_TIMER_PERIOD_MS ) ) + #define ipTCP_TIMER_PERIOD_MS ( 1000 ) +#endif + +/* The next private port number to use when binding a client socket is stored in +the usNextPortToUse[] array - which has either 1 or two indexes depending on +whether TCP is being supported. */ +#if( ipconfigUSE_TCP == 1 ) + #define socketPROTOCOL_COUNT 2 +#else + #define socketPROTOCOL_COUNT 1 +#endif + +/* Indexes into the usNextPortToUse[] array for UDP and TCP sockets +respectively. */ +#define socketNEXT_UDP_PORT_NUMBER_INDEX 0 +#define socketNEXT_TCP_PORT_NUMBER_INDEX 1 + +/* Some helper macro's for defining the 20/80 % limits of uxLittleSpace / uxEnoughSpace. */ +#define sock20_PERCENT 20 +#define sock80_PERCENT 80 +#define sock100_PERCENT 100 + + +/*-----------------------------------------------------------*/ + +/* + * Allocate the next port number from the private allocation range. + * TCP and UDP each have their own series of port numbers + * ulProtocol is either ipPROTOCOL_UDP or ipPROTOCOL_TCP + */ +static uint16_t prvGetPrivatePortNumber( BaseType_t xProtocol ); + +/* + * Return the list item from within pxList that has an item value of + * xWantedItemValue. If there is no such list item return NULL. + */ +static const ListItem_t * pxListFindListItemWithValue( const List_t *pxList, TickType_t xWantedItemValue ); + +/* + * Return pdTRUE only if pxSocket is valid and bound, as far as can be + * determined. + */ +static BaseType_t prvValidSocket( FreeRTOS_Socket_t *pxSocket, BaseType_t xProtocol, BaseType_t xIsBound ); + +/* + * Before creating a socket, check the validity of the parameters used + * and find the size of the socket space, which is different for UDP and TCP + */ +static BaseType_t prvDetermineSocketSize( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol, size_t *pxSocketSize ); + +#if( ipconfigUSE_TCP == 1 ) + /* + * Create a txStream or a rxStream, depending on the parameter 'xIsInputStream' + */ + static StreamBuffer_t *prvTCPCreateStream (FreeRTOS_Socket_t *pxSocket, BaseType_t xIsInputStream ); +#endif /* ipconfigUSE_TCP == 1 */ + +#if( ipconfigUSE_TCP == 1 ) + /* + * Called from FreeRTOS_send(): some checks which will be done before + * sending a TCP packed. + */ + static int32_t prvTCPSendCheck( FreeRTOS_Socket_t *pxSocket, size_t xDataLength ); +#endif /* ipconfigUSE_TCP */ + +#if( ipconfigUSE_TCP == 1 ) + /* + * When a child socket gets closed, make sure to update the child-count of the parent + */ + static void prvTCPSetSocketCount( FreeRTOS_Socket_t *pxSocketToDelete ); +#endif /* ipconfigUSE_TCP == 1 */ + +#if( ipconfigUSE_TCP == 1 ) + /* + * Called from FreeRTOS_connect(): make some checks and if allowed, send a + * message to the IP-task to start connecting to a remote socket + */ + static BaseType_t prvTCPConnectStart( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr *pxAddress ); +#endif /* ipconfigUSE_TCP */ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + /* Executed by the IP-task, it will check all sockets belonging to a set */ + static FreeRTOS_Socket_t *prvFindSelectedSocket( SocketSelect_t *pxSocketSet ); + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + +/* The list that contains mappings between sockets and port numbers. Accesses +to this list must be protected by critical sections of one kind or another. */ +List_t xBoundUDPSocketsList; + +#if ipconfigUSE_TCP == 1 + List_t xBoundTCPSocketsList; +#endif /* ipconfigUSE_TCP == 1 */ + +/*-----------------------------------------------------------*/ + +static BaseType_t prvValidSocket( FreeRTOS_Socket_t *pxSocket, BaseType_t xProtocol, BaseType_t xIsBound ) +{ +BaseType_t xReturn = pdTRUE; + + if( ( pxSocket == NULL ) || ( pxSocket == FREERTOS_INVALID_SOCKET ) ) + { + xReturn = pdFALSE; + } + else if( ( xIsBound != pdFALSE ) && ( socketSOCKET_IS_BOUND( pxSocket ) == pdFALSE ) ) + { + /* The caller expects the socket to be bound, but it isn't. */ + xReturn = pdFALSE; + } + else if( pxSocket->ucProtocol != ( uint8_t ) xProtocol ) + { + /* Socket has a wrong type (UDP != TCP). */ + xReturn = pdFALSE; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +BaseType_t vNetworkSocketsInit( void ) +{ + vListInitialise( &xBoundUDPSocketsList ); + + #if( ipconfigUSE_TCP == 1 ) + { + vListInitialise( &xBoundTCPSocketsList ); + } + #endif /* ipconfigUSE_TCP == 1 */ + + return pdTRUE; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvDetermineSocketSize( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol, size_t *pxSocketSize ) +{ +BaseType_t xReturn = pdPASS; +FreeRTOS_Socket_t *pxSocket; + + /* Asserts must not appear before it has been determined that the network + task is ready - otherwise the asserts will fail. */ + if( xIPIsNetworkTaskReady() == pdFALSE ) + { + xReturn = pdFAIL; + } + else + { + /* Only Ethernet is currently supported. */ + configASSERT( xDomain == FREERTOS_AF_INET ); + + /* Check if the UDP socket-list has been initialised. */ + configASSERT( listLIST_IS_INITIALISED( &xBoundUDPSocketsList ) ); + #if( ipconfigUSE_TCP == 1 ) + { + /* Check if the TCP socket-list has been initialised. */ + configASSERT( listLIST_IS_INITIALISED( &xBoundTCPSocketsList ) ); + } + #endif /* ipconfigUSE_TCP == 1 */ + + if( xProtocol == FREERTOS_IPPROTO_UDP ) + { + if( xType != FREERTOS_SOCK_DGRAM ) + { + xReturn = pdFAIL; + configASSERT( xReturn ); + } + /* In case a UDP socket is created, do not allocate space for TCP data. */ + *pxSocketSize = ( sizeof( *pxSocket ) - sizeof( pxSocket->u ) ) + sizeof( pxSocket->u.xUDP ); + } +#if( ipconfigUSE_TCP == 1 ) + else if( xProtocol == FREERTOS_IPPROTO_TCP ) + { + if( xType != FREERTOS_SOCK_STREAM ) + { + xReturn = pdFAIL; + configASSERT( xReturn ); + } + + *pxSocketSize = ( sizeof( *pxSocket ) - sizeof( pxSocket->u ) ) + sizeof( pxSocket->u.xTCP ); + } +#endif /* ipconfigUSE_TCP == 1 */ + else + { + xReturn = pdFAIL; + configASSERT( xReturn ); + } + } + /* In case configASSERT() is not used */ + ( void )xDomain; + return xReturn; +} +/*-----------------------------------------------------------*/ + +/* FreeRTOS_socket() allocates and initiates a socket */ +Socket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol ) +{ +FreeRTOS_Socket_t *pxSocket; +size_t uxSocketSize; +EventGroupHandle_t xEventGroup; +Socket_t xReturn; + + if( prvDetermineSocketSize( xDomain, xType, xProtocol, &uxSocketSize ) == pdFAIL ) + { + xReturn = FREERTOS_INVALID_SOCKET; + } + else + { + /* Allocate the structure that will hold the socket information. The + size depends on the type of socket: UDP sockets need less space. A + define 'pvPortMallocSocket' will used to allocate the necessary space. + By default it points to the FreeRTOS function 'pvPortMalloc()'. */ + pxSocket = ( FreeRTOS_Socket_t * ) pvPortMallocSocket( uxSocketSize ); + + if( pxSocket == NULL ) + { + pxSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; + iptraceFAILED_TO_CREATE_SOCKET(); + } + else if( ( xEventGroup = xEventGroupCreate() ) == NULL ) + { + vPortFreeSocket( pxSocket ); + pxSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; + iptraceFAILED_TO_CREATE_EVENT_GROUP(); + } + else + { + /* Clear the entire space to avoid nulling individual entries */ + memset( pxSocket, '\0', uxSocketSize ); + + pxSocket->xEventGroup = xEventGroup; + + /* Initialise the socket's members. The semaphore will be created + if the socket is bound to an address, for now the pointer to the + semaphore is just set to NULL to show it has not been created. */ + if( xProtocol == FREERTOS_IPPROTO_UDP ) + { + vListInitialise( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); + + #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) + { + pxSocket->u.xUDP.uxMaxPackets = ( UBaseType_t ) ipconfigUDP_MAX_RX_PACKETS; + } + #endif /* ipconfigUDP_MAX_RX_PACKETS > 0 */ + } + + vListInitialiseItem( &( pxSocket->xBoundSocketListItem ) ); + listSET_LIST_ITEM_OWNER( &( pxSocket->xBoundSocketListItem ), ( void * ) pxSocket ); + + pxSocket->xReceiveBlockTime = ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME; + pxSocket->xSendBlockTime = ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME; + pxSocket->ucSocketOptions = ( uint8_t ) FREERTOS_SO_UDPCKSUM_OUT; + pxSocket->ucProtocol = ( uint8_t ) xProtocol; /* protocol: UDP or TCP */ + + #if( ipconfigUSE_TCP == 1 ) + { + if( xProtocol == FREERTOS_IPPROTO_TCP ) + { + /* StreamSize is expressed in number of bytes */ + /* Round up buffer sizes to nearest multiple of MSS */ + pxSocket->u.xTCP.usInitMSS = pxSocket->u.xTCP.usCurMSS = ipconfigTCP_MSS; + pxSocket->u.xTCP.uxRxStreamSize = ( size_t ) ipconfigTCP_RX_BUFFER_LENGTH; + pxSocket->u.xTCP.uxTxStreamSize = ( size_t ) FreeRTOS_round_up( ipconfigTCP_TX_BUFFER_LENGTH, ipconfigTCP_MSS ); + /* Use half of the buffer size of the TCP windows */ + #if ( ipconfigUSE_TCP_WIN == 1 ) + { + pxSocket->u.xTCP.uxRxWinSize = FreeRTOS_max_uint32( 1UL, ( uint32_t ) ( pxSocket->u.xTCP.uxRxStreamSize / 2 ) / ipconfigTCP_MSS ); + pxSocket->u.xTCP.uxTxWinSize = FreeRTOS_max_uint32( 1UL, ( uint32_t ) ( pxSocket->u.xTCP.uxTxStreamSize / 2 ) / ipconfigTCP_MSS ); + } + #else + { + pxSocket->u.xTCP.uxRxWinSize = 1u; + pxSocket->u.xTCP.uxTxWinSize = 1u; + } + #endif + /* The above values are just defaults, and can be overridden by + calling FreeRTOS_setsockopt(). No buffers will be allocated until a + socket is connected and data is exchanged. */ + } + } + #endif /* ipconfigUSE_TCP == 1 */ + } + + xReturn = ( Socket_t ) pxSocket; + } + + /* Remove compiler warnings in the case the configASSERT() is not defined. */ + ( void ) xDomain; + + return xReturn; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + SocketSet_t FreeRTOS_CreateSocketSet( void ) + { + SocketSelect_t *pxSocketSet; + + pxSocketSet = ( SocketSelect_t * ) pvPortMalloc( sizeof( *pxSocketSet ) ); + + if( pxSocketSet != NULL ) + { + memset( pxSocketSet, '\0', sizeof( *pxSocketSet ) ); + pxSocketSet->xSelectGroup = xEventGroupCreate(); + + if( pxSocketSet->xSelectGroup == NULL ) + { + vPortFree( ( void* ) pxSocketSet ); + pxSocketSet = NULL; + } + } + + return ( SocketSet_t ) pxSocketSet; + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + void FreeRTOS_DeleteSocketSet( SocketSet_t xSocketSet ) + { + SocketSelect_t *pxSocketSet = ( SocketSelect_t*) xSocketSet; + + vEventGroupDelete( pxSocketSet->xSelectGroup ); + vPortFree( ( void* ) pxSocketSet ); + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + /* Add a socket to a set */ + void FreeRTOS_FD_SET( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xSelectBits ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + SocketSelect_t *pxSocketSet = ( SocketSelect_t * ) xSocketSet; + + configASSERT( pxSocket != NULL ); + configASSERT( xSocketSet != NULL ); + + /* Make sure we're not adding bits which are reserved for internal use, + such as eSELECT_CALL_IP */ + pxSocket->xSelectBits |= ( xSelectBits & eSELECT_ALL ); + + if( ( pxSocket->xSelectBits & eSELECT_ALL ) != 0 ) + { + /* Adding a socket to a socket set. */ + pxSocket->pxSocketSet = ( SocketSelect_t * ) xSocketSet; + + /* Now have the IP-task call vSocketSelect() to see if the set contains + any sockets which are 'ready' and set the proper bits. + By setting 'bApiCalled = false', vSocketSelect() knows that it was + not called from a user API */ + pxSocketSet->bApiCalled = pdFALSE; + prvFindSelectedSocket( pxSocketSet ); + } + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + /* Clear select bits for a socket + If the mask becomes 0, remove the socket from the set */ + void FreeRTOS_FD_CLR( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xSelectBits ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + + configASSERT( pxSocket != NULL ); + configASSERT( xSocketSet != NULL ); + + pxSocket->xSelectBits &= ~( xSelectBits & eSELECT_ALL ); + if( ( pxSocket->xSelectBits & eSELECT_ALL ) != 0 ) + { + pxSocket->pxSocketSet = ( SocketSelect_t *)xSocketSet; + } + else + { + /* disconnect it from the socket set */ + pxSocket->pxSocketSet = ( SocketSelect_t *)NULL; + } + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + /* Test if a socket belongs to a socket-set */ + EventBits_t FreeRTOS_FD_ISSET( Socket_t xSocket, SocketSet_t xSocketSet ) + { + EventBits_t xReturn; + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + + configASSERT( pxSocket != NULL ); + configASSERT( xSocketSet != NULL ); + + if( xSocketSet == ( SocketSet_t ) pxSocket->pxSocketSet ) + { + /* Make sure we're not adding bits which are reserved for internal + use. */ + xReturn = pxSocket->xSocketBits & eSELECT_ALL; + } + else + { + xReturn = 0; + } + + return xReturn; + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + /* The select() statement: wait for an event to occur on any of the sockets + included in a socket set */ + BaseType_t FreeRTOS_select( SocketSet_t xSocketSet, TickType_t xBlockTimeTicks ) + { + TimeOut_t xTimeOut; + TickType_t xRemainingTime; + SocketSelect_t *pxSocketSet = ( SocketSelect_t*) xSocketSet; + BaseType_t xResult; + + configASSERT( xSocketSet != NULL ); + + /* Only in the first round, check for non-blocking */ + xRemainingTime = xBlockTimeTicks; + + /* Fetch the current time */ + vTaskSetTimeOutState( &xTimeOut ); + + for( ;; ) + { + /* Find a socket which might have triggered the bit + This function might return immediately or block for a limited time */ + xResult = ( BaseType_t ) xEventGroupWaitBits( pxSocketSet->xSelectGroup, eSELECT_ALL, pdFALSE, pdFALSE, xRemainingTime ); + + #if( ipconfigSUPPORT_SIGNALS != 0 ) + { + if( ( xResult & eSELECT_INTR ) != 0u ) + { + xEventGroupClearBits( pxSocketSet->xSelectGroup, eSELECT_INTR ); + FreeRTOS_debug_printf( ( "FreeRTOS_select: interrupted\n" ) ); + break; + } + } + #endif /* ipconfigSUPPORT_SIGNALS */ + + /* Have the IP-task find the socket which had an event */ + pxSocketSet->bApiCalled = pdTRUE; + prvFindSelectedSocket( pxSocketSet ); + + xResult = ( BaseType_t ) xEventGroupGetBits( pxSocketSet->xSelectGroup ); + + if( xResult != 0 ) + { + break; + } + + /* Has the timeout been reached? */ + if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) + { + break; + } + } + + return xResult; + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + /* Send a message to the IP-task to have it check all sockets belonging to + 'pxSocketSet' */ + static FreeRTOS_Socket_t *prvFindSelectedSocket( SocketSelect_t *pxSocketSet ) + { + IPStackEvent_t xSelectEvent; + FreeRTOS_Socket_t *xReturn; + + xSelectEvent.eEventType = eSocketSelectEvent; + xSelectEvent.pvData = ( void * ) pxSocketSet; + + /* while the IP-task works on the request, the API will block on + 'eSELECT_CALL_IP'. So clear it first. */ + xEventGroupClearBits( pxSocketSet->xSelectGroup, eSELECT_CALL_IP ); + + /* Now send the socket select event */ + if( xSendEventStructToIPTask( &xSelectEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL ) + { + /* Oops, we failed to wake-up the IP task. No use to wait for it. */ + FreeRTOS_debug_printf( ( "prvFindSelectedSocket: failed\n" ) ); + xReturn = NULL; + } + else + { + /* As soon as the IP-task is ready, it will set 'eSELECT_CALL_IP' to + wakeup the calling API */ + xEventGroupWaitBits( pxSocketSet->xSelectGroup, eSELECT_CALL_IP, pdTRUE, pdFALSE, portMAX_DELAY ); + + /* Return 'pxSocket' which is set by the IP-task */ + xReturn = pxSocketSet->pxSocket; + } + + return xReturn; + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + +/* + * FreeRTOS_recvfrom: receive data from a bound socket + * In this library, the function can only be used with connectionsless sockets + * (UDP) + */ +int32_t FreeRTOS_recvfrom( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags, struct freertos_sockaddr *pxSourceAddress, socklen_t *pxSourceAddressLength ) +{ +BaseType_t lPacketCount = 0; +NetworkBufferDescriptor_t *pxNetworkBuffer; +FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; +TickType_t xRemainingTime = ( TickType_t ) 0; /* Obsolete assignment, but some compilers output a warning if its not done. */ +BaseType_t xTimed = pdFALSE; +TimeOut_t xTimeOut; +int32_t lReturn; +EventBits_t xEventBits = ( EventBits_t ) 0; + + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_UDP, pdTRUE ) == pdFALSE ) + { + return -pdFREERTOS_ERRNO_EINVAL; + } + + lPacketCount = ( BaseType_t ) listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); + + /* The function prototype is designed to maintain the expected Berkeley + sockets standard, but this implementation does not use all the parameters. */ + ( void ) pxSourceAddressLength; + + while( lPacketCount == 0 ) + { + if( xTimed == pdFALSE ) + { + /* Check to see if the socket is non blocking on the first + iteration. */ + xRemainingTime = pxSocket->xReceiveBlockTime; + + if( xRemainingTime == ( TickType_t ) 0 ) + { + #if( ipconfigSUPPORT_SIGNALS != 0 ) + { + /* Just check for the interrupt flag. */ + xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_INTR, + pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, socketDONT_BLOCK ); + } + #endif /* ipconfigSUPPORT_SIGNALS */ + break; + } + + if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) + { + break; + } + + /* To ensure this part only executes once. */ + xTimed = pdTRUE; + + /* Fetch the current time. */ + vTaskSetTimeOutState( &xTimeOut ); + } + + /* Wait for arrival of data. While waiting, the IP-task may set the + 'eSOCKET_RECEIVE' bit in 'xEventGroup', if it receives data for this + socket, thus unblocking this API call. */ + xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_RECEIVE | eSOCKET_INTR, + pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); + + #if( ipconfigSUPPORT_SIGNALS != 0 ) + { + if( ( xEventBits & eSOCKET_INTR ) != 0 ) + { + if( ( xEventBits & eSOCKET_RECEIVE ) != 0 ) + { + /* Shouldn't have cleared the eSOCKET_RECEIVE flag. */ + xEventGroupSetBits( pxSocket->xEventGroup, eSOCKET_RECEIVE ); + } + break; + } + } + #else + { + ( void ) xEventBits; + } + #endif /* ipconfigSUPPORT_SIGNALS */ + + lPacketCount = ( BaseType_t ) listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); + + if( lPacketCount != 0 ) + { + break; + } + + /* Has the timeout been reached ? */ + if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) ) + { + break; + } + } /* while( lPacketCount == 0 ) */ + + if( lPacketCount != 0 ) + { + taskENTER_CRITICAL(); + { + /* The owner of the list item is the network buffer. */ + pxNetworkBuffer = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); + + if( ( xFlags & FREERTOS_MSG_PEEK ) == 0 ) + { + /* Remove the network buffer from the list of buffers waiting to + be processed by the socket. */ + uxListRemove( &( pxNetworkBuffer->xBufferListItem ) ); + } + } + taskEXIT_CRITICAL(); + + /* The returned value is the length of the payload data, which is + calculated at the total packet size minus the headers. + The validity of `xDataLength` prvProcessIPPacket has been confirmed + in 'prvProcessIPPacket()'. */ + lReturn = ( int32_t ) ( pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ) ); + + if( pxSourceAddress != NULL ) + { + pxSourceAddress->sin_port = pxNetworkBuffer->usPort; + pxSourceAddress->sin_addr = pxNetworkBuffer->ulIPAddress; + } + + if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) + { + /* The zero copy flag is not set. Truncate the length if it won't + fit in the provided buffer. */ + if( lReturn > ( int32_t ) xBufferLength ) + { + iptraceRECVFROM_DISCARDING_BYTES( ( xBufferLength - lReturn ) ); + lReturn = ( int32_t )xBufferLength; + } + + /* Copy the received data into the provided buffer, then release the + network buffer. */ + memcpy( pvBuffer, ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ), ( size_t )lReturn ); + + if( ( xFlags & FREERTOS_MSG_PEEK ) == 0 ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + } + else + { + /* The zero copy flag was set. pvBuffer is not a buffer into which + the received data can be copied, but a pointer that must be set to + point to the buffer in which the received data has already been + placed. */ + *( ( void** ) pvBuffer ) = ( void * ) ( &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ) ); + } + + } +#if( ipconfigSUPPORT_SIGNALS != 0 ) + else if( ( xEventBits & eSOCKET_INTR ) != 0 ) + { + lReturn = -pdFREERTOS_ERRNO_EINTR; + iptraceRECVFROM_INTERRUPTED(); + } +#endif /* ipconfigSUPPORT_SIGNALS */ + else + { + lReturn = -pdFREERTOS_ERRNO_EWOULDBLOCK; + iptraceRECVFROM_TIMEOUT(); + } + + return lReturn; +} +/*-----------------------------------------------------------*/ + +int32_t FreeRTOS_sendto( Socket_t xSocket, const void *pvBuffer, size_t xTotalDataLength, BaseType_t xFlags, const struct freertos_sockaddr *pxDestinationAddress, socklen_t xDestinationAddressLength ) +{ +NetworkBufferDescriptor_t *pxNetworkBuffer; +IPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL }; +TimeOut_t xTimeOut; +TickType_t xTicksToWait; +int32_t lReturn = 0; +FreeRTOS_Socket_t *pxSocket; + + pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + + /* The function prototype is designed to maintain the expected Berkeley + sockets standard, but this implementation does not use all the + parameters. */ + ( void ) xDestinationAddressLength; + configASSERT( pvBuffer ); + + if( xTotalDataLength <= ( size_t ) ipMAX_UDP_PAYLOAD_LENGTH ) + { + /* If the socket is not already bound to an address, bind it now. + Passing NULL as the address parameter tells FreeRTOS_bind() to select + the address to bind to. */ + if( ( socketSOCKET_IS_BOUND( pxSocket ) != pdFALSE ) || + ( FreeRTOS_bind( xSocket, NULL, 0u ) == 0 ) ) + { + xTicksToWait = pxSocket->xSendBlockTime; + + #if( ipconfigUSE_CALLBACKS != 0 ) + { + if( xIsCallingFromIPTask() != pdFALSE ) + { + /* If this send function is called from within a call-back + handler it may not block, otherwise chances would be big to + get a deadlock: the IP-task waiting for itself. */ + xTicksToWait = ( TickType_t )0; + } + } + #endif /* ipconfigUSE_CALLBACKS */ + + if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) + { + xTicksToWait = ( TickType_t ) 0; + } + + if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) + { + /* Zero copy is not set, so obtain a network buffer into + which the payload will be copied. */ + vTaskSetTimeOutState( &xTimeOut ); + + /* Block until a buffer becomes available, or until a + timeout has been reached */ + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( xTotalDataLength + sizeof( UDPPacket_t ), xTicksToWait ); + + if( pxNetworkBuffer != NULL ) + { + memcpy( ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ), ( void * ) pvBuffer, xTotalDataLength ); + + if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdTRUE ) + { + /* The entire block time has been used up. */ + xTicksToWait = ( TickType_t ) 0; + } + } + } + else + { + /* When zero copy is used, pvBuffer is a pointer to the + payload of a buffer that has already been obtained from the + stack. Obtain the network buffer pointer from the buffer. */ + pxNetworkBuffer = pxUDPPayloadBuffer_to_NetworkBuffer( (void*)pvBuffer ); + } + + if( pxNetworkBuffer != NULL ) + { + /* xDataLength is the size of the total packet, including the Ethernet header. */ + pxNetworkBuffer->xDataLength = xTotalDataLength + sizeof( UDPPacket_t ); + pxNetworkBuffer->usPort = pxDestinationAddress->sin_port; + pxNetworkBuffer->usBoundPort = ( uint16_t ) socketGET_SOCKET_PORT( pxSocket ); + pxNetworkBuffer->ulIPAddress = pxDestinationAddress->sin_addr; + + /* The socket options are passed to the IP layer in the + space that will eventually get used by the Ethernet header. */ + pxNetworkBuffer->pucEthernetBuffer[ ipSOCKET_OPTIONS_OFFSET ] = pxSocket->ucSocketOptions; + + /* Tell the networking task that the packet needs sending. */ + xStackTxEvent.pvData = pxNetworkBuffer; + + /* Ask the IP-task to send this packet */ + if( xSendEventStructToIPTask( &xStackTxEvent, xTicksToWait ) == pdPASS ) + { + /* The packet was successfully sent to the IP task. */ + lReturn = ( int32_t ) xTotalDataLength; + #if( ipconfigUSE_CALLBACKS == 1 ) + { + if( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xUDP.pxHandleSent ) ) + { + pxSocket->u.xUDP.pxHandleSent( ( Socket_t )pxSocket, xTotalDataLength ); + } + } + #endif /* ipconfigUSE_CALLBACKS */ + } + else + { + /* If the buffer was allocated in this function, release + it. */ + if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + iptraceSTACK_TX_EVENT_LOST( ipSTACK_TX_EVENT ); + } + } + else + { + /* If errno was available, errno would be set to + FREERTOS_ENOPKTS. As it is, the function must return the + number of transmitted bytes, so the calling function knows + how much data was actually sent. */ + iptraceNO_BUFFER_FOR_SENDTO(); + } + } + else + { + iptraceSENDTO_SOCKET_NOT_BOUND(); + } + } + else + { + /* The data is longer than the available buffer space. */ + iptraceSENDTO_DATA_TOO_LONG(); + } + + return lReturn; +} /* Tested */ +/*-----------------------------------------------------------*/ + +/* + * FreeRTOS_bind() : binds a sockt to a local port number. If port 0 is + * provided, a system provided port number will be assigned. This function can + * be used for both UDP and TCP sockets. The actual binding will be performed + * by the IP-task to avoid mutual access to the bound-socket-lists + * (xBoundUDPSocketsList or xBoundTCPSocketsList). + */ +BaseType_t FreeRTOS_bind( Socket_t xSocket, struct freertos_sockaddr * pxAddress, socklen_t xAddressLength ) +{ +IPStackEvent_t xBindEvent; +FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; +BaseType_t xReturn = 0; + + ( void ) xAddressLength; + + if( ( pxSocket == NULL ) || ( pxSocket == FREERTOS_INVALID_SOCKET ) ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + /* Once a socket is bound to a port, it can not be bound to a different + port number */ + else if( socketSOCKET_IS_BOUND( pxSocket) != pdFALSE ) + { + /* The socket is already bound. */ + FreeRTOS_debug_printf( ( "vSocketBind: Socket already bound to %d\n", pxSocket->usLocalPort ) ); + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + /* Prepare a messages to the IP-task in order to perform the binding. + The desired port number will be passed in usLocalPort. */ + xBindEvent.eEventType = eSocketBindEvent; + xBindEvent.pvData = ( void * ) xSocket; + if( pxAddress != NULL ) + { + pxSocket->usLocalPort = FreeRTOS_ntohs( pxAddress->sin_port ); + } + else + { + /* Caller wants to bind to a random port number. */ + pxSocket->usLocalPort = 0u; + } + + /* portMAX_DELAY is used as a the time-out parameter, as binding *must* + succeed before the socket can be used. _RB_ The use of an infinite + block time needs be changed as it could result in the task hanging. */ + if( xSendEventStructToIPTask( &xBindEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL ) + { + /* Failed to wake-up the IP-task, no use to wait for it */ + FreeRTOS_debug_printf( ( "FreeRTOS_bind: send event failed\n" ) ); + xReturn = -pdFREERTOS_ERRNO_ECANCELED; + } + else + { + /* The IP-task will set the 'eSOCKET_BOUND' bit when it has done its + job. */ + xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_BOUND, pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, portMAX_DELAY ); + if( socketSOCKET_IS_BOUND( pxSocket ) == pdFALSE ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + } + } + + return xReturn; +} + +/* + * vSocketBind(): internal version of bind() that should not be called directly. + * 'xInternal' is used for TCP sockets only: it allows to have several + * (connected) child sockets bound to the same server port. + */ +BaseType_t vSocketBind( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr * pxAddress, size_t uxAddressLength, BaseType_t xInternal ) +{ +BaseType_t xReturn = 0; /* In Berkeley sockets, 0 means pass for bind(). */ +List_t *pxSocketList; +#if( ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1 ) + struct freertos_sockaddr xAddress; +#endif /* ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND */ + +#if( ipconfigUSE_TCP == 1 ) + if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + pxSocketList = &xBoundTCPSocketsList; + } + else +#endif /* ipconfigUSE_TCP == 1 */ + { + pxSocketList = &xBoundUDPSocketsList; + } + + /* The function prototype is designed to maintain the expected Berkeley + sockets standard, but this implementation does not use all the parameters. */ + ( void ) uxAddressLength; + + configASSERT( pxSocket ); + configASSERT( pxSocket != FREERTOS_INVALID_SOCKET ); + + #if( ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1 ) + { + /* pxAddress will be NULL if sendto() was called on a socket without the + socket being bound to an address. In this case, automatically allocate + an address and port to the socket. */ + if( pxAddress == NULL ) + { + pxAddress = &xAddress; + /* Put the port to zero to be assigned later. */ + pxAddress->sin_port = 0u; + } + } + #endif /* ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1 */ + + /* Sockets must be bound before calling FreeRTOS_sendto() if + ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is not set to 1. */ + configASSERT( pxAddress ); + + if( pxAddress != NULL ) + { + if( pxAddress->sin_port == 0u ) + { + pxAddress->sin_port = prvGetPrivatePortNumber( ( BaseType_t )pxSocket->ucProtocol ); + if( 0 == pxAddress->sin_port ) + { + return -pdFREERTOS_ERRNO_EADDRNOTAVAIL; + } + } + + /* If vSocketBind() is called from the API FreeRTOS_bind() it has been + confirmed that the socket was not yet bound to a port. If it is called + from the IP-task, no such check is necessary. */ + + /* Check to ensure the port is not already in use. If the bind is + called internally, a port MAY be used by more than one socket. */ + if( ( ( xInternal == pdFALSE ) || ( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) ) && + ( pxListFindListItemWithValue( pxSocketList, ( TickType_t ) pxAddress->sin_port ) != NULL ) ) + { + FreeRTOS_debug_printf( ( "vSocketBind: %sP port %d in use\n", + pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ? "TC" : "UD", + FreeRTOS_ntohs( pxAddress->sin_port ) ) ); + xReturn = -pdFREERTOS_ERRNO_EADDRINUSE; + } + else + { + /* Allocate the port number to the socket. + This macro will set 'xBoundSocketListItem->xItemValue' */ + socketSET_SOCKET_PORT( pxSocket, pxAddress->sin_port ); + + /* And also store it in a socket field 'usLocalPort' in host-byte-order, + mostly used for logging and debugging purposes */ + pxSocket->usLocalPort = FreeRTOS_ntohs( pxAddress->sin_port ); + + /* Add the socket to the list of bound ports. */ + { + /* If the network driver can iterate through 'xBoundUDPSocketsList', + by calling xPortHasUDPSocket() then the IP-task must temporarily + suspend the scheduler to keep the list in a consistent state. */ + #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) + { + vTaskSuspendAll(); + } + #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ + + /* Add the socket to 'xBoundUDPSocketsList' or 'xBoundTCPSocketsList' */ + vListInsertEnd( pxSocketList, &( pxSocket->xBoundSocketListItem ) ); + + #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) + { + xTaskResumeAll(); + } + #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ + } + } + } + else + { + xReturn = -pdFREERTOS_ERRNO_EADDRNOTAVAIL; + FreeRTOS_debug_printf( ( "vSocketBind: Socket no addr\n" ) ); + } + + if( xReturn != 0 ) + { + iptraceBIND_FAILED( xSocket, ( FreeRTOS_ntohs( pxAddress->sin_port ) ) ); + } + + return xReturn; +} /* Tested */ +/*-----------------------------------------------------------*/ + +/* + * Close a socket and free the allocated space + * In case of a TCP socket: the connection will not be closed automatically + * Subsequent messages for the closed socket will be responded to with a RST + * The IP-task will actually close the socket, after receiving a 'eSocketCloseEvent' message + */ +BaseType_t FreeRTOS_closesocket( Socket_t xSocket ) +{ +BaseType_t xResult; +#if( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_CALLBACKS == 1 ) + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * )xSocket; +#endif +IPStackEvent_t xCloseEvent; +xCloseEvent.eEventType = eSocketCloseEvent; +xCloseEvent.pvData = ( void * ) xSocket; + + if( ( xSocket == NULL ) || ( xSocket == FREERTOS_INVALID_SOCKET ) ) + { + xResult = 0; + } + else + { + #if( ( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_CALLBACKS == 1 ) ) + { + if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + /* Make sure that IP-task won't call the user callback's anymore */ + pxSocket->u.xTCP.pxHandleConnected = NULL; + pxSocket->u.xTCP.pxHandleReceive = NULL; + pxSocket->u.xTCP.pxHandleSent = NULL; + } + } + #endif /* ( ( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_CALLBACKS == 1 ) ) */ + + /* Let the IP task close the socket to keep it synchronised with the + packet handling. */ + + /* Note when changing the time-out value below, it must be checked who is calling + this function. If it is called by the IP-task, a deadlock could occur. + The IP-task would only call it in case of a user call-back */ + if( xSendEventStructToIPTask( &xCloseEvent, ( TickType_t ) 0 ) == pdFAIL ) + { + FreeRTOS_debug_printf( ( "FreeRTOS_closesocket: failed\n" ) ); + xResult = -1; + } + else + { + xResult = 1; + } + } + + return xResult; +} + +/* This is the internal version of FreeRTOS_closesocket() + * It will be called by the IPtask only to avoid problems with synchronicity + */ +void *vSocketClose( FreeRTOS_Socket_t *pxSocket ) +{ +NetworkBufferDescriptor_t *pxNetworkBuffer; + + #if( ipconfigUSE_TCP == 1 ) + { + /* For TCP: clean up a little more. */ + if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + #if( ipconfigUSE_TCP_WIN == 1 ) + { + if( pxSocket->u.xTCP.pxAckMessage != NULL ) + { + vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); + } + /* Free the resources which were claimed by the tcpWin member */ + vTCPWindowDestroy( &pxSocket->u.xTCP.xTCPWindow ); + } + #endif /* ipconfigUSE_TCP_WIN */ + + /* Free the input and output streams */ + if( pxSocket->u.xTCP.rxStream != NULL ) + { + vPortFreeLarge( pxSocket->u.xTCP.rxStream ); + } + + if( pxSocket->u.xTCP.txStream != NULL ) + { + vPortFreeLarge( pxSocket->u.xTCP.txStream ); + } + + /* In case this is a child socket, make sure the child-count of the + parent socket is decreased. */ + prvTCPSetSocketCount( pxSocket ); + } + } + #endif /* ipconfigUSE_TCP == 1 */ + + /* Socket must be unbound first, to ensure no more packets are queued on + it. */ + if( socketSOCKET_IS_BOUND( pxSocket ) != pdFALSE ) + { + /* If the network driver can iterate through 'xBoundUDPSocketsList', + by calling xPortHasUDPSocket(), then the IP-task must temporarily + suspend the scheduler to keep the list in a consistent state. */ + #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) + { + vTaskSuspendAll(); + } + #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ + + uxListRemove( &( pxSocket->xBoundSocketListItem ) ); + + #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) + { + xTaskResumeAll(); + } + #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ + } + + /* Now the socket is not bound the list of waiting packets can be + drained. */ + if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_UDP ) + { + while( listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ) > 0U ) + { + pxNetworkBuffer = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); + uxListRemove( &( pxNetworkBuffer->xBufferListItem ) ); + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + } + + if( pxSocket->xEventGroup ) + { + vEventGroupDelete( pxSocket->xEventGroup ); + } + + #if( ipconfigUSE_TCP == 1 ) && ( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + FreeRTOS_debug_printf( ( "FreeRTOS_closesocket[%u to %lxip:%u]: buffers %lu socks %lu\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort, + uxGetNumberOfFreeNetworkBuffers(), + listCURRENT_LIST_LENGTH( &xBoundTCPSocketsList ) ) ); + } + } + #endif /* ( ipconfigUSE_TCP == 1 ) && ( ipconfigHAS_DEBUG_PRINTF != 0 ) */ + + /* Anf finally, after all resources have been freed, free the socket space */ + vPortFreeSocket( pxSocket ); + + return 0; +} /* Tested */ + +/*-----------------------------------------------------------*/ + +#if ipconfigUSE_TCP == 1 + + /* + * When a child socket gets closed, make sure to update the child-count of the + * parent. When a listening parent socket is closed, make sure no child-sockets + * keep a pointer to it. + */ + static void prvTCPSetSocketCount( FreeRTOS_Socket_t *pxSocketToDelete ) + { + const ListItem_t *pxIterator; + const MiniListItem_t *pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &xBoundTCPSocketsList ); + FreeRTOS_Socket_t *pxOtherSocket; + uint16_t usLocalPort = pxSocketToDelete->usLocalPort; + + for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); + pxIterator != ( const ListItem_t * ) pxEnd; + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + pxOtherSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + if( ( pxOtherSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) && + ( pxOtherSocket->usLocalPort == usLocalPort ) && + ( pxOtherSocket->u.xTCP.usChildCount ) ) + { + pxOtherSocket->u.xTCP.usChildCount--; + FreeRTOS_debug_printf( ( "Lost: Socket %u now has %u / %u child%s\n", + pxOtherSocket->usLocalPort, + pxOtherSocket->u.xTCP.usChildCount, + pxOtherSocket->u.xTCP.usBacklog, + pxOtherSocket->u.xTCP.usChildCount == 1u ? "" : "ren" ) ); + break; + } + } + } + +#endif /* ipconfigUSE_TCP == 1 */ + +/*-----------------------------------------------------------*/ + +BaseType_t FreeRTOS_setsockopt( Socket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ) +{ +/* The standard Berkeley function returns 0 for success. */ +BaseType_t xReturn = -pdFREERTOS_ERRNO_EINVAL; +BaseType_t lOptionValue; +FreeRTOS_Socket_t *pxSocket; + + pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + + /* The function prototype is designed to maintain the expected Berkeley + sockets standard, but this implementation does not use all the parameters. */ + ( void ) lLevel; + ( void ) xOptionLength; + + configASSERT( xSocket ); + + switch( lOptionName ) + { + case FREERTOS_SO_RCVTIMEO : + /* Receive time out. */ + pxSocket->xReceiveBlockTime = *( ( TickType_t * ) pvOptionValue ); + xReturn = 0; + break; + + case FREERTOS_SO_SNDTIMEO : + pxSocket->xSendBlockTime = *( ( TickType_t * ) pvOptionValue ); + if( pxSocket->ucProtocol == ( uint8_t ) FREERTOS_IPPROTO_UDP ) + { + /* The send time out is capped for the reason stated in the + comments where ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS is defined + in FreeRTOSIPConfig.h (assuming an official configuration file + is being used. */ + if( pxSocket->xSendBlockTime > ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ) + { + pxSocket->xSendBlockTime = ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS; + } + } + else + { + /* For TCP socket, it isn't necessary to limit the blocking time + because the FreeRTOS_send() function does not wait for a network + buffer to become available. */ + } + xReturn = 0; + break; + #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) + case FREERTOS_SO_UDP_MAX_RX_PACKETS: + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_UDP ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + pxSocket->u.xUDP.uxMaxPackets = *( ( UBaseType_t * ) pvOptionValue ); + xReturn = 0; + break; + #endif /* ipconfigUDP_MAX_RX_PACKETS */ + + case FREERTOS_SO_UDPCKSUM_OUT : + /* Turn calculating of the UDP checksum on/off for this socket. */ + lOptionValue = ( BaseType_t ) pvOptionValue; + + if( lOptionValue == 0 ) + { + pxSocket->ucSocketOptions &= ( uint8_t ) ~FREERTOS_SO_UDPCKSUM_OUT; + } + else + { + pxSocket->ucSocketOptions |= ( uint8_t ) FREERTOS_SO_UDPCKSUM_OUT; + } + xReturn = 0; + break; + + #if( ipconfigUSE_CALLBACKS == 1 ) + #if( ipconfigUSE_TCP == 1 ) + case FREERTOS_SO_TCP_CONN_HANDLER: /* Set a callback for (dis)connection events */ + case FREERTOS_SO_TCP_RECV_HANDLER: /* Install a callback for receiving TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + case FREERTOS_SO_TCP_SENT_HANDLER: /* Install a callback for sending TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + #endif /* ipconfigUSE_TCP */ + case FREERTOS_SO_UDP_RECV_HANDLER: /* Install a callback for receiving UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + case FREERTOS_SO_UDP_SENT_HANDLER: /* Install a callback for sending UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + { + #if( ipconfigUSE_TCP == 1 ) + { + UBaseType_t uxProtocol; + if( ( lOptionName == FREERTOS_SO_UDP_RECV_HANDLER ) || + ( lOptionName == FREERTOS_SO_UDP_SENT_HANDLER ) ) + { + uxProtocol = ( UBaseType_t ) FREERTOS_IPPROTO_UDP; + } + else + { + uxProtocol = ( UBaseType_t ) FREERTOS_IPPROTO_TCP; + } + + if( pxSocket->ucProtocol != ( uint8_t ) uxProtocol ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + } + #else + { + /* No need to check if the socket has the right + protocol, because only UDP socket can be created. */ + } + #endif /* ipconfigUSE_TCP */ + + switch( lOptionName ) + { + #if ipconfigUSE_TCP == 1 + case FREERTOS_SO_TCP_CONN_HANDLER: + pxSocket->u.xTCP.pxHandleConnected = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnTCPConnected; + break; + case FREERTOS_SO_TCP_RECV_HANDLER: + pxSocket->u.xTCP.pxHandleReceive = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnTCPReceive; + break; + case FREERTOS_SO_TCP_SENT_HANDLER: + pxSocket->u.xTCP.pxHandleSent = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnTCPSent; + break; + #endif /* ipconfigUSE_TCP */ + case FREERTOS_SO_UDP_RECV_HANDLER: + pxSocket->u.xUDP.pxHandleReceive = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnUDPReceive; + break; + case FREERTOS_SO_UDP_SENT_HANDLER: + pxSocket->u.xUDP.pxHandleSent = ((F_TCP_UDP_Handler_t *)pvOptionValue)->pxOnUDPSent; + break; + default: + break; + } + } + + xReturn = 0; + break; + #endif /* ipconfigUSE_CALLBACKS */ + + #if( ipconfigUSE_TCP != 0 ) + #if( ipconfigSOCKET_HAS_USER_SEMAPHORE != 0 ) + /* Each socket has a semaphore on which the using task normally + sleeps. */ + case FREERTOS_SO_SET_SEMAPHORE: + { + pxSocket->pxUserSemaphore = *( ( SemaphoreHandle_t * ) pvOptionValue ); + xReturn = 0; + } + break; + #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ + + #if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK != 0 ) + case FREERTOS_SO_WAKEUP_CALLBACK: + { + /* Each socket can have a callback function that is executed + when there is an event the socket's owner might want to + process. */ + pxSocket->pxUserWakeCallback = ( SocketWakeupCallback_t ) pvOptionValue; + xReturn = 0; + } + break; + #endif /* ipconfigSOCKET_HAS_USER_WAKE_CALLBACK */ + + case FREERTOS_SO_SET_LOW_HIGH_WATER: + { + LowHighWater_t *pxLowHighWater = ( LowHighWater_t * ) pvOptionValue; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + /* It is not allowed to access 'pxSocket->u.xTCP'. */ + FreeRTOS_debug_printf( ( "FREERTOS_SO_SET_LOW_HIGH_WATER: wrong socket type\n" ) ); + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + if( ( pxLowHighWater->uxLittleSpace >= pxLowHighWater->uxEnoughSpace ) || + ( pxLowHighWater->uxEnoughSpace > pxSocket->u.xTCP.uxRxStreamSize ) ) + { + /* Impossible values. */ + FreeRTOS_debug_printf( ( "FREERTOS_SO_SET_LOW_HIGH_WATER: bad values\n" ) ); + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + /* Send a STOP when buffer space drops below 'uxLittleSpace' bytes. */ + pxSocket->u.xTCP.uxLittleSpace = pxLowHighWater->uxLittleSpace; + /* Send a GO when buffer space grows above 'uxEnoughSpace' bytes. */ + pxSocket->u.xTCP.uxEnoughSpace = pxLowHighWater->uxEnoughSpace; + xReturn = 0; + } + break; + + case FREERTOS_SO_SNDBUF: /* Set the size of the send buffer, in units of MSS (TCP only) */ + case FREERTOS_SO_RCVBUF: /* Set the size of the receive buffer, in units of MSS (TCP only) */ + { + uint32_t ulNewValue; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + FreeRTOS_debug_printf( ( "Set SO_%sBUF: wrong socket type\n", + ( lOptionName == FREERTOS_SO_SNDBUF ) ? "SND" : "RCV" ) ); + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + if( ( ( lOptionName == FREERTOS_SO_SNDBUF ) && ( pxSocket->u.xTCP.txStream != NULL ) ) || + ( ( lOptionName == FREERTOS_SO_RCVBUF ) && ( pxSocket->u.xTCP.rxStream != NULL ) ) ) + { + FreeRTOS_debug_printf( ( "Set SO_%sBUF: buffer already created\n", + ( lOptionName == FREERTOS_SO_SNDBUF ) ? "SND" : "RCV" ) ); + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + ulNewValue = *( ( uint32_t * ) pvOptionValue ); + + if( lOptionName == FREERTOS_SO_SNDBUF ) + { + /* Round up to nearest MSS size */ + ulNewValue = FreeRTOS_round_up( ulNewValue, ( uint32_t ) pxSocket->u.xTCP.usInitMSS ); + pxSocket->u.xTCP.uxTxStreamSize = ulNewValue; + } + else + { + pxSocket->u.xTCP.uxRxStreamSize = ulNewValue; + } + } + xReturn = 0; + break; + + case FREERTOS_SO_WIN_PROPERTIES: /* Set all buffer and window properties in one call, parameter is pointer to WinProperties_t */ + { + WinProperties_t* pxProps; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + FreeRTOS_debug_printf( ( "Set SO_WIN_PROP: wrong socket type\n" ) ); + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + if( ( pxSocket->u.xTCP.txStream != NULL ) || ( pxSocket->u.xTCP.rxStream != NULL ) ) + { + FreeRTOS_debug_printf( ( "Set SO_WIN_PROP: buffer already created\n" ) ); + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + pxProps = ( ( WinProperties_t * ) pvOptionValue ); + + if ( FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDBUF, &( pxProps->lTxBufSize ), sizeof( pxProps->lTxBufSize ) ) != 0 ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + if ( FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVBUF, &( pxProps->lRxBufSize ), sizeof( pxProps->lRxBufSize ) ) != 0 ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + #if( ipconfigUSE_TCP_WIN == 1 ) + { + pxSocket->u.xTCP.uxRxWinSize = ( uint32_t )pxProps->lRxWinSize; /* Fixed value: size of the TCP reception window */ + pxSocket->u.xTCP.uxTxWinSize = ( uint32_t )pxProps->lTxWinSize; /* Fixed value: size of the TCP transmit window */ + } + #else + { + pxSocket->u.xTCP.uxRxWinSize = 1u; + pxSocket->u.xTCP.uxTxWinSize = 1u; + } + #endif + + /* In case the socket has already initialised its tcpWin, + adapt the window size parameters */ + if( pxSocket->u.xTCP.xTCPWindow.u.bits.bHasInit != pdFALSE_UNSIGNED ) + { + pxSocket->u.xTCP.xTCPWindow.xSize.ulRxWindowLength = pxSocket->u.xTCP.uxRxWinSize * pxSocket->u.xTCP.usInitMSS; + pxSocket->u.xTCP.xTCPWindow.xSize.ulTxWindowLength = pxSocket->u.xTCP.uxTxWinSize * pxSocket->u.xTCP.usInitMSS; + } + } + + xReturn = 0; + break; + + case FREERTOS_SO_REUSE_LISTEN_SOCKET: /* If true, the server-socket will turn into a connected socket */ + { + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) + { + pxSocket->u.xTCP.bits.bReuseSocket = pdTRUE_UNSIGNED; + } + else + { + pxSocket->u.xTCP.bits.bReuseSocket = pdFALSE_UNSIGNED; + } + } + xReturn = 0; + break; + + case FREERTOS_SO_CLOSE_AFTER_SEND: /* As soon as the last byte has been transmitted, finalise the connection */ + { + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) + { + pxSocket->u.xTCP.bits.bCloseAfterSend = pdTRUE_UNSIGNED; + } + else + { + pxSocket->u.xTCP.bits.bCloseAfterSend = pdFALSE_UNSIGNED; + } + } + xReturn = 0; + break; + + case FREERTOS_SO_SET_FULL_SIZE: /* Refuse to send packets smaller than MSS */ + { + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) + { + pxSocket->u.xTCP.xTCPWindow.u.bits.bSendFullSize = pdTRUE_UNSIGNED; + } + else + { + pxSocket->u.xTCP.xTCPWindow.u.bits.bSendFullSize = pdFALSE_UNSIGNED; + } + + if( ( pxSocket->u.xTCP.xTCPWindow.u.bits.bSendFullSize == pdFALSE_UNSIGNED ) && + ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && + ( FreeRTOS_outstanding( pxSocket ) != 0 ) ) + { + pxSocket->u.xTCP.usTimeout = 1u; /* to set/clear bSendFullSize */ + xSendEventToIPTask( eTCPTimerEvent ); + } + } + xReturn = 0; + break; + + case FREERTOS_SO_STOP_RX: /* Refuse to receive more packts */ + { + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + break; /* will return -pdFREERTOS_ERRNO_EINVAL */ + } + + if( *( ( BaseType_t * ) pvOptionValue ) != 0 ) + { + pxSocket->u.xTCP.bits.bRxStopped = pdTRUE_UNSIGNED; + } + else + { + pxSocket->u.xTCP.bits.bRxStopped = pdFALSE_UNSIGNED; + } + + pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; + pxSocket->u.xTCP.usTimeout = 1u; /* to set/clear bRxStopped */ + xSendEventToIPTask( eTCPTimerEvent ); + } + xReturn = 0; + break; + + #endif /* ipconfigUSE_TCP == 1 */ + + default : + /* No other options are handled. */ + xReturn = -pdFREERTOS_ERRNO_ENOPROTOOPT; + break; + } + + return xReturn; +} /* Tested */ + +/*-----------------------------------------------------------*/ + +/* Find an available port number per https://tools.ietf.org/html/rfc6056. */ +static uint16_t prvGetPrivatePortNumber( BaseType_t xProtocol ) +{ +const uint16_t usEphemeralPortCount = + socketAUTO_PORT_ALLOCATION_MAX_NUMBER - socketAUTO_PORT_ALLOCATION_START_NUMBER + 1; +uint16_t usIterations = usEphemeralPortCount; +uint32_t ulRandomSeed = 0; +uint16_t usResult = 0; +const List_t *pxList; + +#if ipconfigUSE_TCP == 1 + if( xProtocol == ( BaseType_t ) FREERTOS_IPPROTO_TCP ) + { + pxList = &xBoundTCPSocketsList; + } + else +#endif + { + pxList = &xBoundUDPSocketsList; + } + + /* Avoid compiler warnings if ipconfigUSE_TCP is not defined. */ + ( void ) xProtocol; + + /* Find the next available port using the random seed as a starting + point. */ + do + { + /* Only proceed if the random number generator succeeded. */ + if( xApplicationGetRandomNumber( &( ulRandomSeed ) ) == pdFALSE ) + { + break; + } + + /* Map the random to a candidate port. */ + usResult = + socketAUTO_PORT_ALLOCATION_START_NUMBER + + ( ( ( uint16_t )ulRandomSeed ) % usEphemeralPortCount ); + + /* Check if there's already an open socket with the same protocol + and port. */ + if( NULL == pxListFindListItemWithValue( + pxList, + ( TickType_t )FreeRTOS_htons( usResult ) ) ) + { + usResult = FreeRTOS_htons( usResult ); + break; + } + else + { + usResult = 0; + } + + usIterations--; + } + while( usIterations > 0 ); + + return usResult; +} +/*-----------------------------------------------------------*/ + +/* pxListFindListItemWithValue: find a list item in a bound socket list +'xWantedItemValue' refers to a port number */ +static const ListItem_t * pxListFindListItemWithValue( const List_t *pxList, TickType_t xWantedItemValue ) +{ +const ListItem_t * pxResult = NULL; + + if( ( xIPIsNetworkTaskReady() != pdFALSE ) && ( pxList != NULL ) ) + { + const ListItem_t *pxIterator; + const MiniListItem_t *pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( pxList ); + for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); + pxIterator != ( const ListItem_t * ) pxEnd; + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + if( listGET_LIST_ITEM_VALUE( pxIterator ) == xWantedItemValue ) + { + pxResult = pxIterator; + break; + } + } + } + + return pxResult; +} /* Tested */ + +/*-----------------------------------------------------------*/ + +FreeRTOS_Socket_t *pxUDPSocketLookup( UBaseType_t uxLocalPort ) +{ +const ListItem_t *pxListItem; +FreeRTOS_Socket_t *pxSocket = NULL; + + /* Looking up a socket is quite simple, find a match with the local port. + + See if there is a list item associated with the port number on the + list of bound sockets. */ + pxListItem = pxListFindListItemWithValue( &xBoundUDPSocketsList, ( TickType_t ) uxLocalPort ); + + if( pxListItem != NULL ) + { + /* The owner of the list item is the socket itself. */ + pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxListItem ); + configASSERT( pxSocket != NULL ); + } + return pxSocket; +} + +/*-----------------------------------------------------------*/ + +#if ipconfigINCLUDE_FULL_INET_ADDR == 1 + + uint32_t FreeRTOS_inet_addr( const char * pcIPAddress ) + { + const uint32_t ulDecimalBase = 10u; + uint8_t ucOctet[ socketMAX_IP_ADDRESS_OCTETS ]; + const char *pcPointerOnEntering; + uint32_t ulReturn = 0UL, ulValue; + UBaseType_t uxOctetNumber; + BaseType_t xResult = pdPASS; + + for( uxOctetNumber = 0u; uxOctetNumber < socketMAX_IP_ADDRESS_OCTETS; uxOctetNumber++ ) + { + ulValue = 0ul; + pcPointerOnEntering = pcIPAddress; + + while( ( *pcIPAddress >= '0' ) && ( *pcIPAddress <= '9' ) ) + { + /* Move previous read characters into the next decimal + position. */ + ulValue *= ulDecimalBase; + + /* Add the binary value of the ascii character. */ + ulValue += ( ( uint32_t ) ( *pcIPAddress ) - ( uint32_t ) '0' ); + + /* Move to next character in the string. */ + pcIPAddress++; + } + + /* Check characters were read. */ + if( pcIPAddress == pcPointerOnEntering ) + { + xResult = pdFAIL; + } + + /* Check the value fits in an 8-bit number. */ + if( ulValue > 0xffUL ) + { + xResult = pdFAIL; + } + else + { + ucOctet[ uxOctetNumber ] = ( uint8_t ) ulValue; + + /* Check the next character is as expected. */ + if( uxOctetNumber < ( socketMAX_IP_ADDRESS_OCTETS - 1u ) ) + { + if( *pcIPAddress != '.' ) + { + xResult = pdFAIL; + } + else + { + /* Move past the dot. */ + pcIPAddress++; + } + } + } + + if( xResult == pdFAIL ) + { + /* No point going on. */ + break; + } + } + + if( *pcIPAddress != ( char ) 0 ) + { + /* Expected the end of the string. */ + xResult = pdFAIL; + } + + if( uxOctetNumber != socketMAX_IP_ADDRESS_OCTETS ) + { + /* Didn't read enough octets. */ + xResult = pdFAIL; + } + + if( xResult == pdPASS ) + { + ulReturn = FreeRTOS_inet_addr_quick( ucOctet[ 0 ], ucOctet[ 1 ], ucOctet[ 2 ], ucOctet[ 3 ] ); + } + + return ulReturn; + } + +#endif /* ipconfigINCLUDE_FULL_INET_ADDR */ + +/*-----------------------------------------------------------*/ + +/* Function to get the local address and IP port */ +size_t FreeRTOS_GetLocalAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ) +{ +FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + + /* IP address of local machine. */ + pxAddress->sin_addr = *ipLOCAL_IP_ADDRESS_POINTER; + + /* Local port on this machine. */ + pxAddress->sin_port = FreeRTOS_htons( pxSocket->usLocalPort ); + + return sizeof( *pxAddress ); +} + +/*-----------------------------------------------------------*/ + +void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket ) +{ +/* _HT_ must work this out, now vSocketWakeUpUser will be called for any important + * event or transition */ + #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) + { + if( pxSocket->pxUserSemaphore != NULL ) + { + xSemaphoreGive( pxSocket->pxUserSemaphore ); + } + } + #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ + + #if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) + { + if( pxSocket->pxUserWakeCallback != NULL ) + { + pxSocket->pxUserWakeCallback( pxSocket ); + } + } + #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ + + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + { + if( pxSocket->pxSocketSet != NULL ) + { + EventBits_t xSelectBits = ( pxSocket->xEventBits >> SOCKET_EVENT_BIT_COUNT ) & eSELECT_ALL; + if( xSelectBits != 0ul ) + { + pxSocket->xSocketBits |= xSelectBits; + xEventGroupSetBits( pxSocket->pxSocketSet->xSelectGroup, xSelectBits ); + } + } + + pxSocket->xEventBits &= eSOCKET_ALL; + } + #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ + + if( ( pxSocket->xEventGroup != NULL ) && ( pxSocket->xEventBits != 0u ) ) + { + xEventGroupSetBits( pxSocket->xEventGroup, pxSocket->xEventBits ); + } + + pxSocket->xEventBits = 0ul; +} + +/*-----------------------------------------------------------*/ + +#if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) + + /* This define makes it possible for network-card drivers to inspect + * UDP message and see if there is any UDP socket bound to a given port + * number. + * This is probably only usefull in systems with a minimum of RAM and + * when lots of anonymous broadcast messages come in + */ + BaseType_t xPortHasUDPSocket( uint16_t usPortNr ) + { + BaseType_t xFound = pdFALSE; + + vTaskSuspendAll(); + { + if( ( pxListFindListItemWithValue( &xBoundUDPSocketsList, ( TickType_t ) usPortNr ) != NULL ) ) + { + xFound = pdTRUE; + } + } + xTaskResumeAll(); + + return xFound; + } + +#endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ + +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + static BaseType_t bMayConnect( FreeRTOS_Socket_t *pxSocket ); + static BaseType_t bMayConnect( FreeRTOS_Socket_t *pxSocket ) + { + switch( pxSocket->u.xTCP.ucTCPState ) + { + case eCLOSED: + case eCLOSE_WAIT: return 0; + case eCONNECT_SYN: return -pdFREERTOS_ERRNO_EINPROGRESS; + default: return -pdFREERTOS_ERRNO_EAGAIN; + } + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + static BaseType_t prvTCPConnectStart( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr *pxAddress ) + { + BaseType_t xResult = 0; + + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdFALSE ) == pdFALSE ) + { + /* Not a valid socket or wrong type */ + xResult = -pdFREERTOS_ERRNO_EBADF; + } + else if( FreeRTOS_issocketconnected( pxSocket ) > 0 ) + { + /* The socket is already connected. */ + xResult = -pdFREERTOS_ERRNO_EISCONN; + } + else if( socketSOCKET_IS_BOUND( pxSocket ) == pdFALSE ) + { + /* Bind the socket to the port that the client task will send from. + Non-standard, so the error returned is that returned by bind(). */ + xResult = FreeRTOS_bind( ( Socket_t ) pxSocket, NULL, 0u ); + } + + if( xResult == 0 ) + { + /* Check if it makes any sense to wait for a connect event, this condition + might change while sleeping, so it must be checked within each loop */ + xResult = bMayConnect( pxSocket ); /* -EINPROGRESS, -EAGAIN, or 0 for OK */ + + /* Start the connect procedure, kernel will start working on it */ + if( xResult == 0 ) + { + pxSocket->u.xTCP.bits.bConnPrepared = pdFALSE_UNSIGNED; + pxSocket->u.xTCP.ucRepCount = 0u; + + FreeRTOS_debug_printf( ( "FreeRTOS_connect: %u to %lxip:%u\n", + pxSocket->usLocalPort, FreeRTOS_ntohl( pxAddress->sin_addr ), FreeRTOS_ntohs( pxAddress->sin_port ) ) ); + + /* Port on remote machine. */ + pxSocket->u.xTCP.usRemotePort = FreeRTOS_ntohs( pxAddress->sin_port ); + + /* IP address of remote machine. */ + pxSocket->u.xTCP.ulRemoteIP = FreeRTOS_ntohl( pxAddress->sin_addr ); + + /* (client) internal state: socket wants to send a connect. */ + vTCPStateChange( pxSocket, eCONNECT_SYN ); + + /* To start an active connect. */ + pxSocket->u.xTCP.usTimeout = 1u; + + if( xSendEventToIPTask( eTCPTimerEvent ) != pdPASS ) + { + xResult = -pdFREERTOS_ERRNO_ECANCELED; + } + } + } + + return xResult; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * FreeRTOS_connect: socket wants to connect to a remote port + */ + BaseType_t FreeRTOS_connect( Socket_t xClientSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t* ) xClientSocket; + TickType_t xRemainingTime; + BaseType_t xTimed = pdFALSE; + BaseType_t xResult; + TimeOut_t xTimeOut; + + ( void ) xAddressLength; + + xResult = prvTCPConnectStart( pxSocket, pxAddress ); + + if( xResult == 0 ) + { + /* And wait for the result */ + for( ;; ) + { + if( xTimed == pdFALSE ) + { + /* Only in the first round, check for non-blocking */ + xRemainingTime = pxSocket->xReceiveBlockTime; + if( xRemainingTime == ( TickType_t )0 ) + { + /* Not yet connected, correct state, non-blocking. */ + xResult = -pdFREERTOS_ERRNO_EWOULDBLOCK; + break; + } + + /* Don't get here a second time. */ + xTimed = pdTRUE; + + /* Fetch the current time */ + vTaskSetTimeOutState( &xTimeOut ); + } + + /* Did it get connected while sleeping ? */ + xResult = FreeRTOS_issocketconnected( pxSocket ); + + /* Returns positive when connected, negative means an error */ + if( xResult < 0 ) + { + /* Return the error */ + break; + } + + if( xResult > 0 ) + { + /* Socket now connected, return a zero */ + xResult = 0; + break; + } + + /* Is it allowed to sleep more? */ + if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) ) + { + xResult = -pdFREERTOS_ERRNO_ETIMEDOUT; + break; + } + + /* Go sleeping until we get any down-stream event */ + xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_CONNECT, pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); + } + } + + return xResult; + } +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * FreeRTOS_accept: can return a new connected socket + * if the server socket is in listen mode and receives a connection request + * The new socket will be bound already to the same port number as the listing + * socket. + */ + Socket_t FreeRTOS_accept( Socket_t xServerSocket, struct freertos_sockaddr *pxAddress, socklen_t *pxAddressLength ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xServerSocket; + FreeRTOS_Socket_t *pxClientSocket = NULL; + TickType_t xRemainingTime; + BaseType_t xTimed = pdFALSE, xAsk = pdFALSE; + TimeOut_t xTimeOut; + IPStackEvent_t xAskEvent; + + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) + { + /* Not a valid socket or wrong type */ + pxClientSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; + } + else if( ( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) && + ( pxSocket->u.xTCP.ucTCPState != eTCP_LISTEN ) ) + { + /* Parent socket is not in listening mode */ + pxClientSocket = ( FreeRTOS_Socket_t * ) FREERTOS_INVALID_SOCKET; + } + else + { + /* Loop will stop with breaks. */ + for( ; ; ) + { + /* Is there a new client? */ + vTaskSuspendAll(); + { + if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) + { + pxClientSocket = pxSocket->u.xTCP.pxPeerSocket; + } + else + { + pxClientSocket = pxSocket; + } + if( pxClientSocket != NULL ) + { + pxSocket->u.xTCP.pxPeerSocket = NULL; + + /* Is it still not taken ? */ + if( pxClientSocket->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) + { + pxClientSocket->u.xTCP.bits.bPassAccept = pdFALSE_UNSIGNED; + } + else + { + pxClientSocket = NULL; + } + } + } + xTaskResumeAll(); + + if( pxClientSocket != NULL ) + { + if( pxAddress != NULL ) + { + /* IP address of remote machine. */ + pxAddress->sin_addr = FreeRTOS_ntohl( pxClientSocket->u.xTCP.ulRemoteIP ); + + /* Port on remote machine. */ + pxAddress->sin_port = FreeRTOS_ntohs( pxClientSocket->u.xTCP.usRemotePort ); + } + if( pxAddressLength != NULL ) + { + *pxAddressLength = sizeof( *pxAddress ); + } + + if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) + { + xAsk = pdTRUE; + } + } + + if( xAsk != pdFALSE ) + { + /* Ask to set an event in 'xEventGroup' as soon as a new + client gets connected for this listening socket. */ + xAskEvent.eEventType = eTCPAcceptEvent; + xAskEvent.pvData = ( void * ) pxSocket; + xSendEventStructToIPTask( &xAskEvent, portMAX_DELAY ); + } + + if( pxClientSocket != NULL ) + { + break; + } + + if( xTimed == pdFALSE ) + { + /* Only in the first round, check for non-blocking */ + xRemainingTime = pxSocket->xReceiveBlockTime; + if( xRemainingTime == ( TickType_t ) 0 ) + { + break; + } + + /* Don't get here a second time */ + xTimed = pdTRUE; + + /* Fetch the current time */ + vTaskSetTimeOutState( &xTimeOut ); + } + + /* Has the timeout been reached? */ + if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) + { + break; + } + + /* Go sleeping until we get any down-stream event */ + xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_ACCEPT, pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); + } + } + + return ( Socket_t ) pxClientSocket; + } +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * Read incoming data from a TCP socket + * Only after the last byte has been read, a close error might be returned + */ + BaseType_t FreeRTOS_recv( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags ) + { + BaseType_t xByteCount; + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + TickType_t xRemainingTime; + BaseType_t xTimed = pdFALSE; + TimeOut_t xTimeOut; + EventBits_t xEventBits = ( EventBits_t ) 0; + + /* Check if the socket is valid, has type TCP and if it is bound to a + port. */ + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) + { + xByteCount = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + if( pxSocket->u.xTCP.rxStream != NULL ) + { + xByteCount = ( BaseType_t )uxStreamBufferGetSize ( pxSocket->u.xTCP.rxStream ); + } + else + { + xByteCount = 0; + } + + while( xByteCount == 0 ) + { + switch( pxSocket->u.xTCP.ucTCPState ) + { + case eCLOSED: + case eCLOSE_WAIT: /* (server + client) waiting for a connection termination request from the local user. */ + case eCLOSING: /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */ + if( pxSocket->u.xTCP.bits.bMallocError != pdFALSE_UNSIGNED ) + { + /* The no-memory error has priority above the non-connected error. + Both are fatal and will elad to closing the socket. */ + xByteCount = -pdFREERTOS_ERRNO_ENOMEM; + } + else + { + xByteCount = -pdFREERTOS_ERRNO_ENOTCONN; + } + /* Call continue to break out of the switch and also the while + loop. */ + continue; + default: + break; + } + + if( xTimed == pdFALSE ) + { + /* Only in the first round, check for non-blocking. */ + xRemainingTime = pxSocket->xReceiveBlockTime; + + if( xRemainingTime == ( TickType_t ) 0 ) + { + #if( ipconfigSUPPORT_SIGNALS != 0 ) + { + /* Just check for the interrupt flag. */ + xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_INTR, + pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, socketDONT_BLOCK ); + } + #endif /* ipconfigSUPPORT_SIGNALS */ + break; + } + + if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) + { + break; + } + + /* Don't get here a second time. */ + xTimed = pdTRUE; + + /* Fetch the current time. */ + vTaskSetTimeOutState( &xTimeOut ); + } + + /* Has the timeout been reached? */ + if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) + { + break; + } + + /* Block until there is a down-stream event. */ + xEventBits = xEventGroupWaitBits( pxSocket->xEventGroup, + eSOCKET_RECEIVE | eSOCKET_CLOSED | eSOCKET_INTR, + pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); + #if( ipconfigSUPPORT_SIGNALS != 0 ) + { + if( ( xEventBits & eSOCKET_INTR ) != 0u ) + { + break; + } + } + #else + { + ( void ) xEventBits; + } + #endif /* ipconfigSUPPORT_SIGNALS */ + + if( pxSocket->u.xTCP.rxStream != NULL ) + { + xByteCount = ( BaseType_t ) uxStreamBufferGetSize ( pxSocket->u.xTCP.rxStream ); + } + else + { + xByteCount = 0; + } + } + + #if( ipconfigSUPPORT_SIGNALS != 0 ) + if( ( xEventBits & eSOCKET_INTR ) != 0 ) + { + if( ( xEventBits & ( eSOCKET_RECEIVE | eSOCKET_CLOSED ) ) != 0 ) + { + /* Shouldn't have cleared other flags. */ + xEventBits &= ~eSOCKET_INTR; + xEventGroupSetBits( pxSocket->xEventGroup, xEventBits ); + } + xByteCount = -pdFREERTOS_ERRNO_EINTR; + } + else + #endif /* ipconfigSUPPORT_SIGNALS */ + if( xByteCount > 0 ) + { + if( ( xFlags & FREERTOS_ZERO_COPY ) == 0 ) + { + xByteCount = ( BaseType_t ) uxStreamBufferGet( pxSocket->u.xTCP.rxStream, 0ul, ( uint8_t * ) pvBuffer, ( size_t ) xBufferLength, ( xFlags & FREERTOS_MSG_PEEK ) != 0 ); + if( pxSocket->u.xTCP.bits.bLowWater != pdFALSE_UNSIGNED ) + { + /* We had reached the low-water mark, now see if the flag + can be cleared */ + size_t uxFrontSpace = uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ); + + if( uxFrontSpace >= pxSocket->u.xTCP.uxEnoughSpace ) + { + pxSocket->u.xTCP.bits.bLowWater = pdFALSE_UNSIGNED; + pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; + pxSocket->u.xTCP.usTimeout = 1u; /* because bLowWater is cleared. */ + xSendEventToIPTask( eTCPTimerEvent ); + } + } + } + else + { + /* Zero-copy reception of data: pvBuffer is a pointer to a pointer. */ + xByteCount = ( BaseType_t ) uxStreamBufferGetPtr( pxSocket->u.xTCP.rxStream, (uint8_t **)pvBuffer ); + } + } + } /* prvValidSocket() */ + + return xByteCount; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + static int32_t prvTCPSendCheck( FreeRTOS_Socket_t *pxSocket, size_t xDataLength ) + { + int32_t xResult = 1; + + /* Is this a socket of type TCP and is it already bound to a port number ? */ + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) + { + xResult = -pdFREERTOS_ERRNO_EINVAL; + } + else if( pxSocket->u.xTCP.bits.bMallocError != pdFALSE_UNSIGNED ) + { + xResult = -pdFREERTOS_ERRNO_ENOMEM; + } + else if( pxSocket->u.xTCP.ucTCPState == eCLOSED || + pxSocket->u.xTCP.ucTCPState == eCLOSE_WAIT || + pxSocket->u.xTCP.ucTCPState == eCLOSING ) + { + xResult = -pdFREERTOS_ERRNO_ENOTCONN; + } + else if( pxSocket->u.xTCP.bits.bFinSent != pdFALSE_UNSIGNED ) + { + /* This TCP connection is closing already, the FIN flag has been sent. + Maybe it is still delivering or receiving data. + Return OK in order not to get closed/deleted too quickly */ + xResult = 0; + } + else if( xDataLength == 0ul ) + { + /* send() is being called to send zero bytes */ + xResult = 0; + } + else if( pxSocket->u.xTCP.txStream == NULL ) + { + /* Create the outgoing stream only when it is needed */ + prvTCPCreateStream( pxSocket, pdFALSE ); + + if( pxSocket->u.xTCP.txStream == NULL ) + { + xResult = -pdFREERTOS_ERRNO_ENOMEM; + } + } + + return xResult; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* Get a direct pointer to the circular transmit buffer. + '*pxLength' will contain the number of bytes that may be written. */ + uint8_t *FreeRTOS_get_tx_head( Socket_t xSocket, BaseType_t *pxLength ) + { + uint8_t *pucReturn = NULL; + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + StreamBuffer_t *pxBuffer = NULL; + + *pxLength = 0; + + /* Confirm that this is a TCP socket before dereferencing structure + member pointers. */ + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdFALSE ) == pdTRUE ) + { + pxBuffer = pxSocket->u.xTCP.txStream; + if( pxBuffer != NULL ) + { + BaseType_t xSpace = ( BaseType_t )uxStreamBufferGetSpace( pxBuffer ); + BaseType_t xRemain = ( BaseType_t )( pxBuffer->LENGTH - pxBuffer->uxHead ); + + *pxLength = FreeRTOS_min_BaseType( xSpace, xRemain ); + pucReturn = pxBuffer->ucArray + pxBuffer->uxHead; + } + } + + return pucReturn; + } +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + /* + * Send data using a TCP socket. It is not necessary to have the socket + * connected already. Outgoing data will be stored and delivered as soon as + * the socket gets connected. + */ + BaseType_t FreeRTOS_send( Socket_t xSocket, const void *pvBuffer, size_t uxDataLength, BaseType_t xFlags ) + { + BaseType_t xByteCount; + BaseType_t xBytesLeft; + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + TickType_t xRemainingTime; + BaseType_t xTimed = pdFALSE; + TimeOut_t xTimeOut; + BaseType_t xCloseAfterSend; + + /* Prevent compiler warnings about unused parameters. The parameter + may be used in future versions. */ + ( void ) xFlags; + + xByteCount = ( BaseType_t ) prvTCPSendCheck( pxSocket, uxDataLength ); + + if( xByteCount > 0 ) + { + /* xBytesLeft is number of bytes to send, will count to zero. */ + xBytesLeft = ( BaseType_t ) uxDataLength; + + /* xByteCount is number of bytes that can be sent now. */ + xByteCount = ( BaseType_t ) uxStreamBufferGetSpace( pxSocket->u.xTCP.txStream ); + + /* While there are still bytes to be sent. */ + while( xBytesLeft > 0 ) + { + /* If txStream has space. */ + if( xByteCount > 0 ) + { + /* Don't send more than necessary. */ + if( xByteCount > xBytesLeft ) + { + xByteCount = xBytesLeft; + } + + /* Is the close-after-send flag set and is this really the + last transmission? */ + if( ( pxSocket->u.xTCP.bits.bCloseAfterSend != pdFALSE_UNSIGNED ) && ( xByteCount == xBytesLeft ) ) + { + xCloseAfterSend = pdTRUE; + } + else + { + xCloseAfterSend = pdFALSE; + } + + /* The flag 'bCloseAfterSend' can be set before sending data + using setsockopt() + + When the last data packet is being sent out, a FIN flag will + be included to let the peer know that no more data is to be + expected. The use of 'bCloseAfterSend' is not mandatory, it + is just a faster way of transferring files (e.g. when using + FTP). */ + if( xCloseAfterSend != pdFALSE ) + { + /* Now suspend the scheduler: sending the last data and + setting bCloseRequested must be done together */ + vTaskSuspendAll(); + pxSocket->u.xTCP.bits.bCloseRequested = pdTRUE_UNSIGNED; + } + + xByteCount = ( BaseType_t ) uxStreamBufferAdd( pxSocket->u.xTCP.txStream, 0ul, ( const uint8_t * ) pvBuffer, ( size_t ) xByteCount ); + + if( xCloseAfterSend != pdFALSE ) + { + /* Now when the IP-task transmits the data, it will also + see that bCloseRequested is true and include the FIN + flag to start closure of the connection. */ + xTaskResumeAll(); + } + + /* Send a message to the IP-task so it can work on this + socket. Data is sent, let the IP-task work on it. */ + pxSocket->u.xTCP.usTimeout = 1u; + + if( xIsCallingFromIPTask() == pdFALSE ) + { + /* Only send a TCP timer event when not called from the + IP-task. */ + xSendEventToIPTask( eTCPTimerEvent ); + } + + xBytesLeft -= xByteCount; + + if( xBytesLeft == 0 ) + { + break; + } + + /* As there are still bytes left to be sent, increase the + data pointer. */ + pvBuffer = ( void * ) ( ( ( const uint8_t * ) pvBuffer) + xByteCount ); + } + + /* Not all bytes have been sent. In case the socket is marked as + blocking sleep for a while. */ + if( xTimed == pdFALSE ) + { + /* Only in the first round, check for non-blocking. */ + xRemainingTime = pxSocket->xSendBlockTime; + + #if( ipconfigUSE_CALLBACKS != 0 ) + { + if( xIsCallingFromIPTask() != pdFALSE ) + { + /* If this send function is called from within a + call-back handler it may not block, otherwise + chances would be big to get a deadlock: the IP-task + waiting for itself. */ + xRemainingTime = ( TickType_t ) 0; + } + } + #endif /* ipconfigUSE_CALLBACKS */ + + if( xRemainingTime == ( TickType_t ) 0 ) + { + break; + } + + if( ( xFlags & FREERTOS_MSG_DONTWAIT ) != 0 ) + { + break; + } + + /* Don't get here a second time. */ + xTimed = pdTRUE; + + /* Fetch the current time. */ + vTaskSetTimeOutState( &xTimeOut ); + } + else + { + /* Has the timeout been reached? */ + if( xTaskCheckForTimeOut( &xTimeOut, &xRemainingTime ) != pdFALSE ) + { + break; + } + } + + /* Go sleeping until down-stream events are received. */ + xEventGroupWaitBits( pxSocket->xEventGroup, eSOCKET_SEND | eSOCKET_CLOSED, + pdTRUE /*xClearOnExit*/, pdFALSE /*xWaitAllBits*/, xRemainingTime ); + + xByteCount = ( BaseType_t ) uxStreamBufferGetSpace( pxSocket->u.xTCP.txStream ); + } + + /* How much was actually sent? */ + xByteCount = ( ( BaseType_t ) uxDataLength ) - xBytesLeft; + + if( xByteCount == 0 ) + { + if( pxSocket->u.xTCP.ucTCPState > eESTABLISHED ) + { + xByteCount = ( BaseType_t ) -pdFREERTOS_ERRNO_ENOTCONN; + } + else + { + if( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) + { + FreeRTOS_debug_printf( ( "FreeRTOS_send: %u -> %lxip:%d: no space\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort ) ); + } + + xByteCount = ( BaseType_t ) -pdFREERTOS_ERRNO_ENOSPC; + } + } + } + + return xByteCount; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * Request to put a socket in listen mode + */ + BaseType_t FreeRTOS_listen( Socket_t xSocket, BaseType_t xBacklog ) + { + FreeRTOS_Socket_t *pxSocket; + BaseType_t xResult = 0; + + pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + + /* listen() is allowed for a valid TCP socket in Closed state and already + bound. */ + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) + { + xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; + } + else if( ( pxSocket->u.xTCP.ucTCPState != eCLOSED ) && ( pxSocket->u.xTCP.ucTCPState != eCLOSE_WAIT ) ) + { + /* Socket is in a wrong state. */ + xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; + } + else + { + /* Backlog is interpreted here as "the maximum number of child + sockets. */ + pxSocket->u.xTCP.usBacklog = ( uint16_t )FreeRTOS_min_int32( ( int32_t ) 0xffff, ( int32_t ) xBacklog ); + + /* This cleaning is necessary only if a listening socket is being + reused as it might have had a previous connection. */ + if( pxSocket->u.xTCP.bits.bReuseSocket ) + { + if( pxSocket->u.xTCP.rxStream != NULL ) + { + vStreamBufferClear( pxSocket->u.xTCP.rxStream ); + } + + if( pxSocket->u.xTCP.txStream != NULL ) + { + vStreamBufferClear( pxSocket->u.xTCP.txStream ); + } + + memset( pxSocket->u.xTCP.xPacket.u.ucLastPacket, '\0', sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ) ); + memset( &pxSocket->u.xTCP.xTCPWindow, '\0', sizeof( pxSocket->u.xTCP.xTCPWindow ) ); + memset( &pxSocket->u.xTCP.bits, '\0', sizeof( pxSocket->u.xTCP.bits ) ); + + /* Now set the bReuseSocket flag again, because the bits have + just been cleared. */ + pxSocket->u.xTCP.bits.bReuseSocket = pdTRUE_UNSIGNED; + } + + vTCPStateChange( pxSocket, eTCP_LISTEN ); + } + + return xResult; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* shutdown - shut down part of a full-duplex connection */ + BaseType_t FreeRTOS_shutdown( Socket_t xSocket, BaseType_t xHow ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xResult; + + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdTRUE ) == pdFALSE ) + { + /*_RB_ Is this comment correct? The socket is not of a type that + supports the listen() operation. */ + xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; + } + else if ( pxSocket->u.xTCP.ucTCPState != eESTABLISHED ) + { + /*_RB_ Is this comment correct? The socket is not of a type that + supports the listen() operation. */ + xResult = -pdFREERTOS_ERRNO_EOPNOTSUPP; + } + else + { + pxSocket->u.xTCP.bits.bUserShutdown = pdTRUE_UNSIGNED; + + /* Let the IP-task perform the shutdown of the connection. */ + pxSocket->u.xTCP.usTimeout = 1u; + xSendEventToIPTask( eTCPTimerEvent ); + xResult = 0; + } + (void) xHow; + + return xResult; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * A TCP timer has expired, now check all TCP sockets for: + * - Active connect + * - Send a delayed ACK + * - Send new data + * - Send a keep-alive packet + * - Check for timeout (in non-connected states only) + */ + TickType_t xTCPTimerCheck( BaseType_t xWillSleep ) + { + FreeRTOS_Socket_t *pxSocket; + TickType_t xShortest = pdMS_TO_TICKS( ( TickType_t ) ipTCP_TIMER_PERIOD_MS ); + TickType_t xNow = xTaskGetTickCount(); + static TickType_t xLastTime = 0u; + TickType_t xDelta = xNow - xLastTime; + ListItem_t* pxEnd = ( ListItem_t * ) listGET_END_MARKER( &xBoundTCPSocketsList ); + ListItem_t *pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundTCPSocketsList ); + + xLastTime = xNow; + + if( xDelta == 0u ) + { + xDelta = 1u; + } + + while( pxIterator != pxEnd ) + { + pxSocket = ( FreeRTOS_Socket_t * )listGET_LIST_ITEM_OWNER( pxIterator ); + pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ); + + /* Sockets with 'tmout == 0' do not need any regular attention. */ + if( pxSocket->u.xTCP.usTimeout == 0u ) + { + continue; + } + + if( xDelta < ( TickType_t ) pxSocket->u.xTCP.usTimeout ) + { + pxSocket->u.xTCP.usTimeout = ( uint16_t ) ( ( ( TickType_t ) pxSocket->u.xTCP.usTimeout ) - xDelta ); + } + else + { + int rc ; + pxSocket->u.xTCP.usTimeout = 0u; + rc = xTCPSocketCheck( pxSocket ); + + /* Within this function, the socket might want to send a delayed + ack or send out data or whatever it needs to do. */ + if( rc < 0 ) + { + /* Continue because the socket was deleted. */ + continue; + } + } + + /* In xEventBits the driver may indicate that the socket has + important events for the user. These are only done just before the + IP-task goes to sleep. */ + if( pxSocket->xEventBits != 0u ) + { + if( xWillSleep != pdFALSE ) + { + /* The IP-task is about to go to sleep, so messages can be + sent to the socket owners. */ + vSocketWakeUpUser( pxSocket ); + } + else + { + /* Or else make sure this will be called again to wake-up + the sockets' owner. */ + xShortest = ( TickType_t ) 0; + } + } + + if( ( pxSocket->u.xTCP.usTimeout != 0u ) && ( xShortest > ( TickType_t ) pxSocket->u.xTCP.usTimeout ) ) + { + xShortest = ( TickType_t ) pxSocket->u.xTCP.usTimeout; + } + } + + return xShortest; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * TCP: as multiple sockets may be bound to the same local port number + * looking up a socket is a little more complex: + * Both a local port, and a remote port and IP address are being used + * For a socket in listening mode, the remote port and IP address are both 0 + */ + FreeRTOS_Socket_t *pxTCPSocketLookup( uint32_t ulLocalIP, UBaseType_t uxLocalPort, uint32_t ulRemoteIP, UBaseType_t uxRemotePort ) + { + ListItem_t *pxIterator; + FreeRTOS_Socket_t *pxResult = NULL, *pxListenSocket = NULL; + MiniListItem_t *pxEnd = ( MiniListItem_t* )listGET_END_MARKER( &xBoundTCPSocketsList ); + + /* Parameter not yet supported. */ + ( void ) ulLocalIP; + + for( pxIterator = ( ListItem_t * ) listGET_NEXT( pxEnd ); + pxIterator != ( ListItem_t * ) pxEnd; + pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + + if( pxSocket->usLocalPort == ( uint16_t ) uxLocalPort ) + { + if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) + { + /* If this is a socket listening to uxLocalPort, remember it + in case there is no perfect match. */ + pxListenSocket = pxSocket; + } + else if( ( pxSocket->u.xTCP.usRemotePort == ( uint16_t ) uxRemotePort ) && ( pxSocket->u.xTCP.ulRemoteIP == ulRemoteIP ) ) + { + /* For sockets not in listening mode, find a match with + xLocalPort, ulRemoteIP AND xRemotePort. */ + pxResult = pxSocket; + break; + } + } + } + if( pxResult == NULL ) + { + /* An exact match was not found, maybe a listening socket was + found. */ + pxResult = pxListenSocket; + } + + return pxResult; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + const struct xSTREAM_BUFFER *FreeRTOS_get_rx_buf( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * )xSocket; + struct xSTREAM_BUFFER *pxReturn = NULL; + + /* Confirm that this is a TCP socket before dereferencing structure + member pointers. */ + if( prvValidSocket( pxSocket, FREERTOS_IPPROTO_TCP, pdFALSE ) == pdTRUE ) + { + pxReturn = pxSocket->u.xTCP.rxStream; + } + + return pxReturn; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + static StreamBuffer_t *prvTCPCreateStream ( FreeRTOS_Socket_t *pxSocket, BaseType_t xIsInputStream ) + { + StreamBuffer_t *pxBuffer; + size_t uxLength; + size_t uxSize; + + /* Now that a stream is created, the maximum size is fixed before + creation, it could still be changed with setsockopt(). */ + if( xIsInputStream != pdFALSE ) + { + uxLength = pxSocket->u.xTCP.uxRxStreamSize; + + if( pxSocket->u.xTCP.uxLittleSpace == 0ul ) + { + pxSocket->u.xTCP.uxLittleSpace = ( sock20_PERCENT * pxSocket->u.xTCP.uxRxStreamSize ) / sock100_PERCENT; + } + + if( pxSocket->u.xTCP.uxEnoughSpace == 0ul ) + { + pxSocket->u.xTCP.uxEnoughSpace = ( sock80_PERCENT * pxSocket->u.xTCP.uxRxStreamSize ) / sock100_PERCENT; + } + } + else + { + uxLength = pxSocket->u.xTCP.uxTxStreamSize; + } + + /* Add an extra 4 (or 8) bytes. */ + uxLength += sizeof( size_t ); + + /* And make the length a multiple of sizeof( size_t ). */ + uxLength &= ~( sizeof( size_t ) - 1u ); + + uxSize = sizeof( *pxBuffer ) - sizeof( pxBuffer->ucArray ) + uxLength; + + pxBuffer = ( StreamBuffer_t * )pvPortMallocLarge( uxSize ); + + if( pxBuffer == NULL ) + { + FreeRTOS_debug_printf( ( "prvTCPCreateStream: malloc failed\n" ) ); + pxSocket->u.xTCP.bits.bMallocError = pdTRUE_UNSIGNED; + vTCPStateChange( pxSocket, eCLOSE_WAIT ); + } + else + { + /* Clear the markers of the stream */ + memset( pxBuffer, '\0', sizeof( *pxBuffer ) - sizeof( pxBuffer->ucArray ) ); + pxBuffer->LENGTH = ( size_t ) uxLength ; + + if( xTCPWindowLoggingLevel != 0 ) + { + FreeRTOS_debug_printf( ( "prvTCPCreateStream: %cxStream created %lu bytes (total %lu)\n", xIsInputStream ? 'R' : 'T', uxLength, uxSize ) ); + } + + if( xIsInputStream != 0 ) + { + pxSocket->u.xTCP.rxStream = pxBuffer; + } + else + { + pxSocket->u.xTCP.txStream = pxBuffer; + } + } + + return pxBuffer; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * Add data to the RxStream. When uxOffset > 0, data has come in out-of-order + * and will be put in front of the head so it can not be popped by the user. + */ + int32_t lTCPAddRxdata( FreeRTOS_Socket_t *pxSocket, size_t uxOffset, const uint8_t *pcData, uint32_t ulByteCount ) + { + StreamBuffer_t *pxStream = pxSocket->u.xTCP.rxStream; + int32_t xResult; + #if( ipconfigUSE_CALLBACKS == 1 ) + BaseType_t bHasHandler = ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xTCP.pxHandleReceive ); + const uint8_t *pucBuffer = NULL; + #endif /* ipconfigUSE_CALLBACKS */ + + /* int32_t uxStreamBufferAdd( pxBuffer, uxOffset, pucData, aCount ) + if( pucData != NULL ) copy data the the buffer + if( pucData == NULL ) no copying, just advance rxHead + if( uxOffset != 0 ) Just store data which has come out-of-order + if( uxOffset == 0 ) Also advance rxHead */ + if( pxStream == NULL ) + { + pxStream = prvTCPCreateStream( pxSocket, pdTRUE ); + if( pxStream == NULL ) + { + return -1; + } + } + + #if( ipconfigUSE_CALLBACKS == 1 ) + { + if( ( bHasHandler != pdFALSE ) && ( uxStreamBufferGetSize( pxStream ) == 0u ) && ( uxOffset == 0ul ) && ( pcData != NULL ) ) + { + /* Data can be passed directly to the user */ + pucBuffer = pcData; + + /* Zero-copy for call-back: no need to add the bytes to the + stream, only the pointer will be advanced by uxStreamBufferAdd(). */ + pcData = NULL; + } + } + #endif /* ipconfigUSE_CALLBACKS */ + + xResult = ( int32_t ) uxStreamBufferAdd( pxStream, uxOffset, pcData, ( size_t ) ulByteCount ); + + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + if( xResult != ( int32_t ) ulByteCount ) + { + FreeRTOS_debug_printf( ( "lTCPAddRxdata: at %ld: %ld/%lu bytes (tail %lu head %lu space %lu front %lu)\n", + uxOffset, xResult, ulByteCount, + pxStream->uxTail, + pxStream->uxHead, + uxStreamBufferFrontSpace( pxStream ), + pxStream->uxFront ) ); + } + } + #endif /* ipconfigHAS_DEBUG_PRINTF */ + + if( uxOffset == 0u ) + { + /* Data is being added to rxStream at the head (offs = 0) */ + #if( ipconfigUSE_CALLBACKS == 1 ) + if( bHasHandler != pdFALSE ) + { + /* The socket owner has installed an OnReceive handler. Pass the + Rx data, without copying from the rxStream, to the user. */ + for (;;) + { + uint8_t *ucReadPtr = NULL; + uint32_t ulCount; + if( pucBuffer != NULL ) + { + ucReadPtr = ( uint8_t * )pucBuffer; + ulCount = ulByteCount; + pucBuffer = NULL; + } + else + { + ulCount = ( uint32_t ) uxStreamBufferGetPtr( pxStream, &( ucReadPtr ) ); + } + + if( ulCount == 0ul ) + { + break; + } + + pxSocket->u.xTCP.pxHandleReceive( ( Socket_t )pxSocket, ( void* )ucReadPtr, ( size_t ) ulCount ); + uxStreamBufferGet( pxStream, 0ul, NULL, ( size_t ) ulCount, pdFALSE ); + } + } else + #endif /* ipconfigUSE_CALLBACKS */ + { + /* See if running out of space. */ + if( pxSocket->u.xTCP.bits.bLowWater == pdFALSE_UNSIGNED ) + { + size_t uxFrontSpace = uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ); + if( uxFrontSpace <= pxSocket->u.xTCP.uxLittleSpace ) + { + pxSocket->u.xTCP.bits.bLowWater = pdTRUE_UNSIGNED; + pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; + + /* bLowWater was reached, send the changed window size. */ + pxSocket->u.xTCP.usTimeout = 1u; + xSendEventToIPTask( eTCPTimerEvent ); + } + } + + /* New incoming data is available, wake up the user. User's + semaphores will be set just before the IP-task goes asleep. */ + pxSocket->xEventBits |= eSOCKET_RECEIVE; + + #if ipconfigSUPPORT_SELECT_FUNCTION == 1 + { + if( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) + { + pxSocket->xEventBits |= ( eSELECT_READ << SOCKET_EVENT_BIT_COUNT ); + } + } + #endif + } + } + + return xResult; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* Function to get the remote address and IP port */ + BaseType_t FreeRTOS_GetRemoteAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xResult; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xResult = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + /* BSD style sockets communicate IP and port addresses in network + byte order. + + IP address of remote machine. */ + pxAddress->sin_addr = FreeRTOS_htonl ( pxSocket->u.xTCP.ulRemoteIP ); + + /* Port on remote machine. */ + pxAddress->sin_port = FreeRTOS_htons ( pxSocket->u.xTCP.usRemotePort ); + + xResult = ( BaseType_t ) sizeof( ( *pxAddress ) ); + } + + return xResult; + } + +#endif /* ipconfigUSE_TCP */ + +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* Returns the number of bytes that may be added to txStream */ + BaseType_t FreeRTOS_maywrite( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xResult; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xResult = -pdFREERTOS_ERRNO_EINVAL; + } + else if( pxSocket->u.xTCP.ucTCPState != eESTABLISHED ) + { + if( ( pxSocket->u.xTCP.ucTCPState < eCONNECT_SYN ) || ( pxSocket->u.xTCP.ucTCPState > eESTABLISHED ) ) + { + xResult = -1; + } + else + { + xResult = 0; + } + } + else if( pxSocket->u.xTCP.txStream == NULL ) + { + xResult = ( BaseType_t ) pxSocket->u.xTCP.uxTxStreamSize; + } + else + { + xResult = ( BaseType_t ) uxStreamBufferGetSpace( pxSocket->u.xTCP.txStream ); + } + + return xResult; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP ==1 ) + + BaseType_t FreeRTOS_tx_space( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + if( pxSocket->u.xTCP.txStream != NULL ) + { + xReturn = ( BaseType_t ) uxStreamBufferGetSpace ( pxSocket->u.xTCP.txStream ); + } + else + { + xReturn = ( BaseType_t ) pxSocket->u.xTCP.uxTxStreamSize; + } + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + BaseType_t FreeRTOS_tx_size( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + if( pxSocket->u.xTCP.txStream != NULL ) + { + xReturn = ( BaseType_t ) uxStreamBufferGetSize ( pxSocket->u.xTCP.txStream ); + } + else + { + xReturn = 0; + } + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* Returns pdTRUE if TCP socket is connected. */ + BaseType_t FreeRTOS_issocketconnected( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn = pdFALSE; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + if( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) + { + if( pxSocket->u.xTCP.ucTCPState < eCLOSE_WAIT ) + { + xReturn = pdTRUE; + } + } + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* returns the actual size of MSS being used */ + BaseType_t FreeRTOS_mss( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + /* usCurMSS is declared as uint16_t to save space. FreeRTOS_mss() + will often be used in signed native-size expressions cast it to + BaseType_t. */ + xReturn = ( BaseType_t ) ( pxSocket->u.xTCP.usCurMSS ); + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* HT: for internal use only: return the connection status */ + BaseType_t FreeRTOS_connstatus( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else + { + /* Cast it to BaseType_t */ + xReturn = ( BaseType_t ) ( pxSocket->u.xTCP.ucTCPState ); + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + /* + * Returns the number of bytes which can be read. + */ + BaseType_t FreeRTOS_rx_size( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn; + + if( pxSocket->ucProtocol != ( uint8_t ) FREERTOS_IPPROTO_TCP ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else if( pxSocket->u.xTCP.rxStream != NULL ) + { + xReturn = ( BaseType_t ) uxStreamBufferGetSize( pxSocket->u.xTCP.rxStream ); + } + else + { + xReturn = 0; + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP == 1 ) + + void FreeRTOS_netstat( void ) + { + IPStackEvent_t xAskEvent; + + /* Ask the IP-task to call vTCPNetStat() + * to avoid accessing xBoundTCPSocketsList + */ + xAskEvent.eEventType = eTCPNetStat; + xAskEvent.pvData = ( void * ) NULL; + xSendEventStructToIPTask( &xAskEvent, 1000u ); + } + +#endif /* ipconfigUSE_TCP */ +/*-----------------------------------------------------------*/ + +#if( ( ipconfigHAS_PRINTF != 0 ) && ( ipconfigUSE_TCP == 1 ) ) + + void vTCPNetStat( void ) + { + /* Show a simple listing of all created sockets and their connections */ + ListItem_t *pxIterator; + BaseType_t count = 0; + + if( listLIST_IS_INITIALISED( &xBoundTCPSocketsList ) == pdFALSE ) + { + FreeRTOS_printf( ( "PLUS-TCP not initialized\n" ) ); + } + else + { + FreeRTOS_printf( ( "Prot Port IP-Remote : Port R/T Status Alive tmout Child\n" ) ); + for( pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundTCPSocketsList ); + pxIterator != ( ListItem_t * ) listGET_END_MARKER( &xBoundTCPSocketsList ); + pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + #if( ipconfigTCP_KEEP_ALIVE == 1 ) + TickType_t age = xTaskGetTickCount() - pxSocket->u.xTCP.xLastAliveTime; + #else + TickType_t age = 0u; + #endif + #if( ipconfigUSE_CALLBACKS == 1 ) + void *pxHandleReceive = (void*)pxSocket->u.xTCP.pxHandleReceive; + #else + void *pxHandleReceive = (void*)NULL; + #endif + char ucChildText[16] = ""; + if (pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN) + { + const int32_t copied_len = snprintf( ucChildText, sizeof( ucChildText ), " %d/%d", + ( int ) pxSocket->u.xTCP.usChildCount, + ( int ) pxSocket->u.xTCP.usBacklog); + /* These should never evaluate to false since the buffers are both shorter than 5-6 characters (<=65535) */ + configASSERT( copied_len >= 0 ); + configASSERT( copied_len < sizeof( ucChildText ) ); + } + FreeRTOS_printf( ( "TCP %5d %-16lxip:%5d %d/%d %-13.13s %6lu %6u%s\n", + pxSocket->usLocalPort, /* Local port on this machine */ + pxSocket->u.xTCP.ulRemoteIP, /* IP address of remote machine */ + pxSocket->u.xTCP.usRemotePort, /* Port on remote machine */ + pxSocket->u.xTCP.rxStream != NULL, + pxSocket->u.xTCP.txStream != NULL, + FreeRTOS_GetTCPStateName( pxSocket->u.xTCP.ucTCPState ), + (age > 999999 ? 999999 : age), /* Format 'age' for printing */ + pxSocket->u.xTCP.usTimeout, + ucChildText ) ); + /* Remove compiler warnings if FreeRTOS_debug_printf() is not defined. */ + ( void ) pxHandleReceive; + count++; + } + + for( pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundUDPSocketsList ); + pxIterator != ( ListItem_t * ) listGET_END_MARKER( &xBoundUDPSocketsList ); + pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + /* Local port on this machine */ + FreeRTOS_printf( ( "UDP Port %5u\n", + FreeRTOS_ntohs( listGET_LIST_ITEM_VALUE( pxIterator ) ) ) ); + count++; + } + + FreeRTOS_printf( ( "FreeRTOS_netstat: %lu sockets %lu < %lu < %d buffers free\n", + count, + uxGetMinimumFreeNetworkBuffers( ), + uxGetNumberOfFreeNetworkBuffers( ), + ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) ); + } + } + +#endif /* ( ( ipconfigHAS_PRINTF != 0 ) && ( ipconfigUSE_TCP == 1 ) ) */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + + void vSocketSelect( SocketSelect_t *pxSocketSet ) + { + BaseType_t xRound; + EventBits_t xSocketBits, xBitsToClear; + #if ipconfigUSE_TCP == 1 + BaseType_t xLastRound = 1; + #else + BaseType_t xLastRound = 0; + #endif + + /* These flags will be switched on after checking the socket status. */ + EventBits_t xGroupBits = 0; + pxSocketSet->pxSocket = NULL; + + for( xRound = 0; xRound <= xLastRound; xRound++ ) + { + const ListItem_t *pxIterator; + const MiniListItem_t *pxEnd; + if( xRound == 0 ) + { + pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &xBoundUDPSocketsList ); + } + #if ipconfigUSE_TCP == 1 + else + { + pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &xBoundTCPSocketsList ); + } + #endif /* ipconfigUSE_TCP == 1 */ + for( pxIterator = ( const ListItem_t * ) ( listGET_NEXT( pxEnd ) ); + pxIterator != ( const ListItem_t * ) pxEnd; + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + if( pxSocket->pxSocketSet != pxSocketSet ) + { + /* Socket does not belong to this select group. */ + continue; + } + xSocketBits = 0; + + #if( ipconfigUSE_TCP == 1 ) + if( pxSocket->ucProtocol == FREERTOS_IPPROTO_TCP ) + { + /* Check if the socket has already been accepted by the + owner. If not, it is useless to return it from a + select(). */ + BaseType_t bAccepted = pdFALSE; + + if( pxSocket->u.xTCP.bits.bPassQueued == pdFALSE_UNSIGNED ) + { + if( pxSocket->u.xTCP.bits.bPassAccept == pdFALSE_UNSIGNED ) + { + bAccepted = pdTRUE; + } + } + + /* Is the set owner interested in READ events? */ + if( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) + { + if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) + { + if( ( pxSocket->u.xTCP.pxPeerSocket != NULL ) && ( pxSocket->u.xTCP.pxPeerSocket->u.xTCP.bits.bPassAccept != 0 ) ) + { + xSocketBits |= eSELECT_READ; + } + } + else if( ( pxSocket->u.xTCP.bits.bReuseSocket != pdFALSE_UNSIGNED ) && ( pxSocket->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) ) + { + /* This socket has the re-use flag. After connecting it turns into + aconnected socket. Set the READ event, so that accept() will be called. */ + xSocketBits |= eSELECT_READ; + } + else if( ( bAccepted != 0 ) && ( FreeRTOS_recvcount( pxSocket ) > 0 ) ) + { + xSocketBits |= eSELECT_READ; + } + } + /* Is the set owner interested in EXCEPTION events? */ + if( ( pxSocket->xSelectBits & eSELECT_EXCEPT ) != 0 ) + { + if( ( pxSocket->u.xTCP.ucTCPState == eCLOSE_WAIT ) || ( pxSocket->u.xTCP.ucTCPState == eCLOSED ) ) + { + xSocketBits |= eSELECT_EXCEPT; + } + } + + /* Is the set owner interested in WRITE events? */ + if( ( pxSocket->xSelectBits & eSELECT_WRITE ) != 0 ) + { + BaseType_t bMatch = pdFALSE; + + if( bAccepted != 0 ) + { + if( FreeRTOS_tx_space( pxSocket ) > 0 ) + { + bMatch = pdTRUE; + } + } + + if( bMatch == pdFALSE ) + { + if( ( pxSocket->u.xTCP.bits.bConnPrepared != pdFALSE_UNSIGNED ) && + ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && + ( pxSocket->u.xTCP.bits.bConnPassed == pdFALSE_UNSIGNED ) ) + { + pxSocket->u.xTCP.bits.bConnPassed = pdTRUE_UNSIGNED; + bMatch = pdTRUE; + } + } + + if( bMatch != pdFALSE ) + { + xSocketBits |= eSELECT_WRITE; + } + } + } + else + #endif /* ipconfigUSE_TCP == 1 */ + { + /* Select events for UDP are simpler. */ + if( ( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) && + ( listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ) > 0U ) ) + { + xSocketBits |= eSELECT_READ; + } + /* The WRITE and EXCEPT bits are not used for UDP */ + } /* if( pxSocket->ucProtocol == FREERTOS_IPPROTO_TCP ) */ + + /* Each socket keeps its own event flags, which are looked-up + by FreeRTOS_FD_ISSSET() */ + pxSocket->xSocketBits = xSocketBits; + + /* The ORed value will be used to set the bits in the event + group. */ + xGroupBits |= xSocketBits; + + } /* for( pxIterator ... ) */ + } /* for( xRound = 0; xRound <= xLastRound; xRound++ ) */ + + xBitsToClear = xEventGroupGetBits( pxSocketSet->xSelectGroup ); + + /* Now set the necessary bits. */ + xBitsToClear = ( xBitsToClear & ~xGroupBits ) & eSELECT_ALL; + + #if( ipconfigSUPPORT_SIGNALS != 0 ) + { + /* Maybe the socketset was signalled, but don't + clear the 'eSELECT_INTR' bit here, as it will be used + and cleared in FreeRTOS_select(). */ + xBitsToClear &= ( EventBits_t ) ~eSELECT_INTR; + } + #endif /* ipconfigSUPPORT_SIGNALS */ + + if( xBitsToClear != 0 ) + { + xEventGroupClearBits( pxSocketSet->xSelectGroup, xBitsToClear ); + } + + /* Now include eSELECT_CALL_IP to wakeup the caller. */ + xEventGroupSetBits( pxSocketSet->xSelectGroup, xGroupBits | eSELECT_CALL_IP ); + } + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SIGNALS != 0 ) + + /* Send a signal to the task which reads from this socket. */ + BaseType_t FreeRTOS_SignalSocket( Socket_t xSocket ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn; + + if( pxSocket == NULL ) + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + else + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + if( ( pxSocket->pxSocketSet != NULL ) && ( pxSocket->pxSocketSet->xSelectGroup != NULL ) ) + { + xEventGroupSetBits( pxSocket->pxSocketSet->xSelectGroup, eSELECT_INTR ); + xReturn = 0; + } + else + #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ + if( pxSocket->xEventGroup != NULL ) + { + xEventGroupSetBits( pxSocket->xEventGroup, eSOCKET_INTR ); + xReturn = 0; + } + else + { + xReturn = -pdFREERTOS_ERRNO_EINVAL; + } + + return xReturn; + } + +#endif /* ipconfigSUPPORT_SIGNALS */ +/*-----------------------------------------------------------*/ + +#if( ipconfigSUPPORT_SIGNALS != 0 ) + + /* Send a signal to the task which reads from this socket (FromISR version). */ + BaseType_t FreeRTOS_SignalSocketFromISR( Socket_t xSocket, BaseType_t *pxHigherPriorityTaskWoken ) + { + FreeRTOS_Socket_t *pxSocket = ( FreeRTOS_Socket_t * ) xSocket; + BaseType_t xReturn; + IPStackEvent_t xEvent; + extern QueueHandle_t xNetworkEventQueue; + + configASSERT( pxSocket != NULL ); + configASSERT( pxSocket->ucProtocol == FREERTOS_IPPROTO_TCP ); + configASSERT( pxSocket->xEventGroup ); + + xEvent.eEventType = eSocketSignalEvent; + xEvent.pvData = ( void * )pxSocket; + + /* The IP-task will call FreeRTOS_SignalSocket for this socket. */ + xReturn = xQueueSendToBackFromISR( xNetworkEventQueue, &xEvent, pxHigherPriorityTaskWoken ); + + return xReturn; + } + +#endif /* ipconfigSUPPORT_SIGNALS */ +/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Stream_Buffer.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Stream_Buffer.c index 53a5c69c6..0bda99317 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Stream_Buffer.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Stream_Buffer.c @@ -1,199 +1,199 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" - -/* - * uxStreamBufferAdd( ) - * Adds data to a stream buffer. If uxOffset > 0, data will be written at - * an offset from uxHead while uxHead will not be moved yet. This possibility - * will be used when TCP data is received while earlier data is still missing. - * If 'pucData' equals NULL, the function is called to advance 'uxHead' only. - */ -size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount ) -{ -size_t uxSpace, uxNextHead, uxFirst; - - uxSpace = uxStreamBufferGetSpace( pxBuffer ); - - /* If uxOffset > 0, items can be placed in front of uxHead */ - if( uxSpace > uxOffset ) - { - uxSpace -= uxOffset; - } - else - { - uxSpace = 0u; - } - - /* The number of bytes that can be written is the minimum of the number of - bytes requested and the number available. */ - uxCount = FreeRTOS_min_uint32( uxSpace, uxCount ); - - if( uxCount != 0u ) - { - uxNextHead = pxBuffer->uxHead; - - if( uxOffset != 0u ) - { - /* ( uxOffset > 0 ) means: write in front if the uxHead marker */ - uxNextHead += uxOffset; - if( uxNextHead >= pxBuffer->LENGTH ) - { - uxNextHead -= pxBuffer->LENGTH; - } - } - - if( pucData != NULL ) - { - /* Calculate the number of bytes that can be added in the first - write - which may be less than the total number of bytes that need - to be added if the buffer will wrap back to the beginning. */ - uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextHead, uxCount ); - - /* Write as many bytes as can be written in the first write. */ - memcpy( ( void* ) ( pxBuffer->ucArray + uxNextHead ), pucData, uxFirst ); - - /* If the number of bytes written was less than the number that - could be written in the first write... */ - if( uxCount > uxFirst ) - { - /* ...then write the remaining bytes to the start of the - buffer. */ - memcpy( ( void * )pxBuffer->ucArray, pucData + uxFirst, uxCount - uxFirst ); - } - } - - if( uxOffset == 0u ) - { - /* ( uxOffset == 0 ) means: write at uxHead position */ - uxNextHead += uxCount; - if( uxNextHead >= pxBuffer->LENGTH ) - { - uxNextHead -= pxBuffer->LENGTH; - } - pxBuffer->uxHead = uxNextHead; - } - - if( xStreamBufferLessThenEqual( pxBuffer, pxBuffer->uxFront, uxNextHead ) != pdFALSE ) - { - /* Advance the front pointer */ - pxBuffer->uxFront = uxNextHead; - } - } - - return uxCount; -} -/*-----------------------------------------------------------*/ - -/* - * uxStreamBufferGet( ) - * 'uxOffset' can be used to read data located at a certain offset from 'lTail'. - * If 'pucData' equals NULL, the function is called to advance 'lTail' only. - * if 'xPeek' is pdTRUE, or if 'uxOffset' is non-zero, the 'lTail' pointer will - * not be advanced. - */ -size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek ) -{ -size_t uxSize, uxCount, uxFirst, uxNextTail; - - /* How much data is available? */ - uxSize = uxStreamBufferGetSize( pxBuffer ); - - if( uxSize > uxOffset ) - { - uxSize -= uxOffset; - } - else - { - uxSize = 0u; - } - - /* Use the minimum of the wanted bytes and the available bytes. */ - uxCount = FreeRTOS_min_uint32( uxSize, uxMaxCount ); - - if( uxCount > 0u ) - { - uxNextTail = pxBuffer->uxTail; - - if( uxOffset != 0u ) - { - uxNextTail += uxOffset; - if( uxNextTail >= pxBuffer->LENGTH ) - { - uxNextTail -= pxBuffer->LENGTH; - } - } - - if( pucData != NULL ) - { - /* Calculate the number of bytes that can be read - which may be - less than the number wanted if the data wraps around to the start of - the buffer. */ - uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextTail, uxCount ); - - /* Obtain the number of bytes it is possible to obtain in the first - read. */ - memcpy( pucData, pxBuffer->ucArray + uxNextTail, uxFirst ); - - /* If the total number of wanted bytes is greater than the number - that could be read in the first read... */ - if( uxCount > uxFirst ) - { - /*...then read the remaining bytes from the start of the buffer. */ - memcpy( pucData + uxFirst, pxBuffer->ucArray, uxCount - uxFirst ); - } - } - - if( ( xPeek == pdFALSE ) && ( uxOffset == 0UL ) ) - { - /* Move the tail pointer to effecively remove the data read from - the buffer. */ - uxNextTail += uxCount; - - if( uxNextTail >= pxBuffer->LENGTH ) - { - uxNextTail -= pxBuffer->LENGTH; - } - - pxBuffer->uxTail = uxNextTail; - } - } - - return uxCount; -} - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" + +/* + * uxStreamBufferAdd( ) + * Adds data to a stream buffer. If uxOffset > 0, data will be written at + * an offset from uxHead while uxHead will not be moved yet. This possibility + * will be used when TCP data is received while earlier data is still missing. + * If 'pucData' equals NULL, the function is called to advance 'uxHead' only. + */ +size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount ) +{ +size_t uxSpace, uxNextHead, uxFirst; + + uxSpace = uxStreamBufferGetSpace( pxBuffer ); + + /* If uxOffset > 0, items can be placed in front of uxHead */ + if( uxSpace > uxOffset ) + { + uxSpace -= uxOffset; + } + else + { + uxSpace = 0u; + } + + /* The number of bytes that can be written is the minimum of the number of + bytes requested and the number available. */ + uxCount = FreeRTOS_min_uint32( uxSpace, uxCount ); + + if( uxCount != 0u ) + { + uxNextHead = pxBuffer->uxHead; + + if( uxOffset != 0u ) + { + /* ( uxOffset > 0 ) means: write in front if the uxHead marker */ + uxNextHead += uxOffset; + if( uxNextHead >= pxBuffer->LENGTH ) + { + uxNextHead -= pxBuffer->LENGTH; + } + } + + if( pucData != NULL ) + { + /* Calculate the number of bytes that can be added in the first + write - which may be less than the total number of bytes that need + to be added if the buffer will wrap back to the beginning. */ + uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextHead, uxCount ); + + /* Write as many bytes as can be written in the first write. */ + memcpy( ( void* ) ( pxBuffer->ucArray + uxNextHead ), pucData, uxFirst ); + + /* If the number of bytes written was less than the number that + could be written in the first write... */ + if( uxCount > uxFirst ) + { + /* ...then write the remaining bytes to the start of the + buffer. */ + memcpy( ( void * )pxBuffer->ucArray, pucData + uxFirst, uxCount - uxFirst ); + } + } + + if( uxOffset == 0u ) + { + /* ( uxOffset == 0 ) means: write at uxHead position */ + uxNextHead += uxCount; + if( uxNextHead >= pxBuffer->LENGTH ) + { + uxNextHead -= pxBuffer->LENGTH; + } + pxBuffer->uxHead = uxNextHead; + } + + if( xStreamBufferLessThenEqual( pxBuffer, pxBuffer->uxFront, uxNextHead ) != pdFALSE ) + { + /* Advance the front pointer */ + pxBuffer->uxFront = uxNextHead; + } + } + + return uxCount; +} +/*-----------------------------------------------------------*/ + +/* + * uxStreamBufferGet( ) + * 'uxOffset' can be used to read data located at a certain offset from 'lTail'. + * If 'pucData' equals NULL, the function is called to advance 'lTail' only. + * if 'xPeek' is pdTRUE, or if 'uxOffset' is non-zero, the 'lTail' pointer will + * not be advanced. + */ +size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek ) +{ +size_t uxSize, uxCount, uxFirst, uxNextTail; + + /* How much data is available? */ + uxSize = uxStreamBufferGetSize( pxBuffer ); + + if( uxSize > uxOffset ) + { + uxSize -= uxOffset; + } + else + { + uxSize = 0u; + } + + /* Use the minimum of the wanted bytes and the available bytes. */ + uxCount = FreeRTOS_min_uint32( uxSize, uxMaxCount ); + + if( uxCount > 0u ) + { + uxNextTail = pxBuffer->uxTail; + + if( uxOffset != 0u ) + { + uxNextTail += uxOffset; + if( uxNextTail >= pxBuffer->LENGTH ) + { + uxNextTail -= pxBuffer->LENGTH; + } + } + + if( pucData != NULL ) + { + /* Calculate the number of bytes that can be read - which may be + less than the number wanted if the data wraps around to the start of + the buffer. */ + uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextTail, uxCount ); + + /* Obtain the number of bytes it is possible to obtain in the first + read. */ + memcpy( pucData, pxBuffer->ucArray + uxNextTail, uxFirst ); + + /* If the total number of wanted bytes is greater than the number + that could be read in the first read... */ + if( uxCount > uxFirst ) + { + /*...then read the remaining bytes from the start of the buffer. */ + memcpy( pucData + uxFirst, pxBuffer->ucArray, uxCount - uxFirst ); + } + } + + if( ( xPeek == pdFALSE ) && ( uxOffset == 0UL ) ) + { + /* Move the tail pointer to effecively remove the data read from + the buffer. */ + uxNextTail += uxCount; + + if( uxNextTail >= pxBuffer->LENGTH ) + { + uxNextTail -= pxBuffer->LENGTH; + } + + pxBuffer->uxTail = uxNextTail; + } + } + + return uxCount; +} + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c index d26756589..849796508 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c @@ -1,3390 +1,3390 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* - * FreeRTOS_TCP_IP.c - * Module which handles the TCP connections for FreeRTOS+TCP. - * It depends on FreeRTOS_TCP_WIN.c, which handles the TCP windowing - * schemes. - * - * Endianness: in this module all ports and IP addresses are stored in - * host byte-order, except fields in the IP-packets - */ - -/* Standard includes. */ -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_TCP_IP.h" -#include "FreeRTOS_DHCP.h" -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" -#include "FreeRTOS_ARP.h" -#include "FreeRTOS_TCP_WIN.h" - - -/* Just make sure the contents doesn't get compiled if TCP is not enabled. */ -#if ipconfigUSE_TCP == 1 - -/* This compile-time test was moved to here because some macro's -were unknown within 'FreeRTOSIPConfigDefaults.h'. It tests whether -the defined MTU size can contain at least a complete TCP packet. */ - -#if ( ( ipconfigTCP_MSS + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) > ipconfigNETWORK_MTU ) - #error The ipconfigTCP_MSS setting in FreeRTOSIPConfig.h is too large. -#endif - -/* - * The meaning of the TCP flags: - */ -#define ipTCP_FLAG_FIN 0x0001u /* No more data from sender */ -#define ipTCP_FLAG_SYN 0x0002u /* Synchronize sequence numbers */ -#define ipTCP_FLAG_RST 0x0004u /* Reset the connection */ -#define ipTCP_FLAG_PSH 0x0008u /* Push function: please push buffered data to the recv application */ -#define ipTCP_FLAG_ACK 0x0010u /* Acknowledgment field is significant */ -#define ipTCP_FLAG_URG 0x0020u /* Urgent pointer field is significant */ -#define ipTCP_FLAG_ECN 0x0040u /* ECN-Echo */ -#define ipTCP_FLAG_CWR 0x0080u /* Congestion Window Reduced */ -#define ipTCP_FLAG_NS 0x0100u /* ECN-nonce concealment protection */ -#define ipTCP_FLAG_RSV 0x0E00u /* Reserved, keep 0 */ - -/* A mask to filter all protocol flags. */ -#define ipTCP_FLAG_CTRL 0x001Fu - -/* - * A few values of the TCP options: - */ -#define TCP_OPT_END 0u /* End of TCP options list */ -#define TCP_OPT_NOOP 1u /* "No-operation" TCP option */ -#define TCP_OPT_MSS 2u /* Maximum segment size TCP option */ -#define TCP_OPT_WSOPT 3u /* TCP Window Scale Option (3-byte long) */ -#define TCP_OPT_SACK_P 4u /* Advertize that SACK is permitted */ -#define TCP_OPT_SACK_A 5u /* SACK option with first/last */ -#define TCP_OPT_TIMESTAMP 8u /* Time-stamp option */ - -#define TCP_OPT_MSS_LEN 4u /* Length of TCP MSS option. */ -#define TCP_OPT_WSOPT_LEN 3u /* Length of TCP WSOPT option. */ - -#define TCP_OPT_TIMESTAMP_LEN 10 /* fixed length of the time-stamp option */ - -#ifndef ipconfigTCP_ACK_EARLIER_PACKET - #define ipconfigTCP_ACK_EARLIER_PACKET 1 -#endif - -/* - * The macro NOW_CONNECTED() is use to determine if the connection makes a - * transition from connected to non-connected and vice versa. - * NOW_CONNECTED() returns true when the status has one of these values: - * eESTABLISHED, eFIN_WAIT_1, eFIN_WAIT_2, eCLOSING, eLAST_ACK, eTIME_WAIT - * Technically the connection status is closed earlier, but the library wants - * to prevent that the socket will be deleted before the last ACK has been - * and thus causing a 'RST' packet on either side. - */ -#define NOW_CONNECTED( status )\ - ( ( status >= eESTABLISHED ) && ( status != eCLOSE_WAIT ) ) - -/* - * The highest 4 bits in the TCP offset byte indicate the total length of the - * TCP header, divided by 4. - */ -#define VALID_BITS_IN_TCP_OFFSET_BYTE ( 0xF0u ) - -/* - * Acknowledgements to TCP data packets may be delayed as long as more is being expected. - * A normal delay would be 200ms. Here a much shorter delay of 20 ms is being used to - * gain performance. - */ -#define DELAYED_ACK_SHORT_DELAY_MS ( 2 ) -#define DELAYED_ACK_LONGER_DELAY_MS ( 20 ) - -/* - * The MSS (Maximum Segment Size) will be taken as large as possible. However, packets with - * an MSS of 1460 bytes won't be transported through the internet. The MSS will be reduced - * to 1400 bytes. - */ -#define REDUCED_MSS_THROUGH_INTERNET ( 1400 ) - -/* - * When there are no TCP options, the TCP offset equals 20 bytes, which is stored as - * the number 5 (words) in the higher niblle of the TCP-offset byte. - */ -#define TCP_OFFSET_LENGTH_BITS ( 0xf0u ) -#define TCP_OFFSET_STANDARD_LENGTH ( 0x50u ) - -/* - * Each TCP socket is checked regularly to see if it can send data packets. - * By default, the maximum number of packets sent during one check is limited to 8. - * This amount may be further limited by setting the socket's TX window size. - */ -#if( !defined( SEND_REPEATED_COUNT ) ) - #define SEND_REPEATED_COUNT ( 8 ) -#endif /* !defined( SEND_REPEATED_COUNT ) */ - -/* - * Define a maximum perdiod of time (ms) to leave a TCP-socket unattended. - * When a TCP timer expires, retries and keep-alive messages will be checked. - */ -#ifndef tcpMAXIMUM_TCP_WAKEUP_TIME_MS - #define tcpMAXIMUM_TCP_WAKEUP_TIME_MS 20000u -#endif - -/* - * The names of the different TCP states may be useful in logging. - */ -#if( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) - static const char *pcStateNames[] = { - "eCLOSED", - "eTCP_LISTEN", - "eCONNECT_SYN", - "eSYN_FIRST", - "eSYN_RECEIVED", - "eESTABLISHED", - "eFIN_WAIT_1", - "eFIN_WAIT_2", - "eCLOSE_WAIT", - "eCLOSING", - "eLAST_ACK", - "eTIME_WAIT", - "eUNKNOWN", -}; -#endif /* ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) */ - -/* - * Returns true if the socket must be checked. Non-active sockets are waiting - * for user action, either connect() or close(). - */ -static BaseType_t prvTCPSocketIsActive( UBaseType_t uxStatus ); - -/* - * Either sends a SYN or calls prvTCPSendRepeated (for regular messages). - */ -static int32_t prvTCPSendPacket( FreeRTOS_Socket_t *pxSocket ); - -/* - * Try to send a series of messages. - */ -static int32_t prvTCPSendRepeated( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ); - -/* - * Return or send a packet to the other party. - */ -static void prvTCPReturnPacket( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, - uint32_t ulLen, BaseType_t xReleaseAfterSend ); - -/* - * Initialise the data structures which keep track of the TCP windowing system. - */ -static void prvTCPCreateWindow( FreeRTOS_Socket_t *pxSocket ); - -/* - * Let ARP look-up the MAC-address of the peer and initialise the first SYN - * packet. - */ -static BaseType_t prvTCPPrepareConnect( FreeRTOS_Socket_t *pxSocket ); - -#if( ipconfigHAS_DEBUG_PRINTF != 0 ) - /* - * For logging and debugging: make a string showing the TCP flags. - */ - static const char *prvTCPFlagMeaning( UBaseType_t xFlags); -#endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - -/* - * Parse the TCP option(s) received, if present. - */ -static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); - -/* - * Identify and deal with a single TCP header option, advancing the pointer to - * the header. This function returns pdTRUE or pdFALSE depending on whether the - * caller should continue to parse more header options or break the loop. - */ -static BaseType_t prvSingleStepTCPHeaderOptions( const unsigned char ** const ppucPtr, const unsigned char ** const ppucLast, FreeRTOS_Socket_t ** const ppxSocket, TCPWindow_t ** const ppxTCPWindow); - -/* - * Skip past TCP header options when doing Selective ACK, until there are no - * more options left. - */ -static void prvSkipPastRemainingOptions( const unsigned char ** const ppucPtr, FreeRTOS_Socket_t ** const ppxSocket, unsigned char * const ppucLen ); - -/* - * Set the initial properties in the options fields, like the preferred - * value of MSS and whether SACK allowed. Will be transmitted in the state - * 'eCONNECT_SYN'. - */ -static UBaseType_t prvSetSynAckOptions( FreeRTOS_Socket_t *pxSocket, TCPPacket_t * pxTCPPacket ); - -/* - * For anti-hang protection and TCP keep-alive messages. Called in two places: - * after receiving a packet and after a state change. The socket's alive timer - * may be reset. - */ -static void prvTCPTouchSocket( FreeRTOS_Socket_t *pxSocket ); - -/* - * Prepare an outgoing message, if anything has to be sent. - */ -static int32_t prvTCPPrepareSend( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, UBaseType_t uxOptionsLength ); - -/* - * Calculate when this socket needs to be checked to do (re-)transmissions. - */ -static TickType_t prvTCPNextTimeout( FreeRTOS_Socket_t *pxSocket ); - -/* - * The API FreeRTOS_send() adds data to the TX stream. Add - * this data to the windowing system to it can be transmitted. - */ -static void prvTCPAddTxData( FreeRTOS_Socket_t *pxSocket ); - -/* - * Called to handle the closure of a TCP connection. - */ -static BaseType_t prvTCPHandleFin( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); - -/* - * Called from prvTCPHandleState(). Find the TCP payload data and check and - * return its length. - */ -static BaseType_t prvCheckRxData( NetworkBufferDescriptor_t *pxNetworkBuffer, uint8_t **ppucRecvData ); - -/* - * Called from prvTCPHandleState(). Check if the payload data may be accepted. - * If so, it will be added to the socket's reception queue. - */ -static BaseType_t prvStoreRxData( FreeRTOS_Socket_t *pxSocket, uint8_t *pucRecvData, - NetworkBufferDescriptor_t *pxNetworkBuffer, uint32_t ulReceiveLength ); - -/* - * Set the TCP options (if any) for the outgoing packet. - */ -static UBaseType_t prvSetOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); - -/* - * Called from prvTCPHandleState() as long as the TCP status is eSYN_RECEIVED to - * eCONNECT_SYN. - */ -static BaseType_t prvHandleSynReceived( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, - uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ); - -/* - * Called from prvTCPHandleState() as long as the TCP status is eESTABLISHED. - */ -static BaseType_t prvHandleEstablished( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, - uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ); - -/* - * Called from prvTCPHandleState(). There is data to be sent. - * If ipconfigUSE_TCP_WIN is defined, and if only an ACK must be sent, it will - * be checked if it would better be postponed for efficiency. - */ -static BaseType_t prvSendData( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, - uint32_t ulReceiveLength, BaseType_t xSendLength ); - -/* - * The heart of all: check incoming packet for valid data and acks and do what - * is necessary in each state. - */ -static BaseType_t prvTCPHandleState( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ); - -/* - * Common code for sending a TCP protocol control packet (i.e. no options, no - * payload, just flags). - */ -static BaseType_t prvTCPSendSpecialPacketHelper( NetworkBufferDescriptor_t *pxNetworkBuffer, - uint8_t ucTCPFlags ); - -/* - * A "challenge ACK" is as per https://tools.ietf.org/html/rfc5961#section-3.2, - * case #3. In summary, an RST was received with a sequence number that is - * unexpected but still within the window. - */ -static BaseType_t prvTCPSendChallengeAck( NetworkBufferDescriptor_t *pxNetworkBuffer ); - -/* - * Reply to a peer with the RST flag on, in case a packet can not be handled. - */ -static BaseType_t prvTCPSendReset( NetworkBufferDescriptor_t *pxNetworkBuffer ); - -/* - * Set the initial value for MSS (Maximum Segment Size) to be used. - */ -static void prvSocketSetMSS( FreeRTOS_Socket_t *pxSocket ); - -/* - * Return either a newly created socket, or the current socket in a connected - * state (depends on the 'bReuseSocket' flag). - */ -static FreeRTOS_Socket_t *prvHandleListen( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); - -/* - * After a listening socket receives a new connection, it may duplicate itself. - * The copying takes place in prvTCPSocketCopy. - */ -static BaseType_t prvTCPSocketCopy( FreeRTOS_Socket_t *pxNewSocket, FreeRTOS_Socket_t *pxSocket ); - -/* - * prvTCPStatusAgeCheck() will see if the socket has been in a non-connected - * state for too long. If so, the socket will be closed, and -1 will be - * returned. - */ -#if( ipconfigTCP_HANG_PROTECTION == 1 ) - static BaseType_t prvTCPStatusAgeCheck( FreeRTOS_Socket_t *pxSocket ); -#endif - -static NetworkBufferDescriptor_t *prvTCPBufferResize( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, - int32_t lDataLen, UBaseType_t uxOptionsLength ); - -#if( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) - const char *FreeRTOS_GetTCPStateName( UBaseType_t ulState ); -#endif - -#if( ipconfigUSE_TCP_WIN != 0 ) - static uint8_t prvWinScaleFactor( FreeRTOS_Socket_t *pxSocket ); -#endif - -/* - * Generate a randomized TCP Initial Sequence Number per RFC. - */ -extern uint32_t ulApplicationGetNextSequenceNumber( uint32_t ulSourceAddress, - uint16_t usSourcePort, - uint32_t ulDestinationAddress, - uint16_t usDestinationPort ); - -/*-----------------------------------------------------------*/ - -/* prvTCPSocketIsActive() returns true if the socket must be checked. - * Non-active sockets are waiting for user action, either connect() - * or close(). */ -static BaseType_t prvTCPSocketIsActive( UBaseType_t uxStatus ) -{ - switch( uxStatus ) - { - case eCLOSED: - case eCLOSE_WAIT: - case eFIN_WAIT_2: - case eCLOSING: - case eTIME_WAIT: - return pdFALSE; - default: - return pdTRUE; - } -} -/*-----------------------------------------------------------*/ - -#if( ipconfigTCP_HANG_PROTECTION == 1 ) - - static BaseType_t prvTCPStatusAgeCheck( FreeRTOS_Socket_t *pxSocket ) - { - BaseType_t xResult; - switch( pxSocket->u.xTCP.ucTCPState ) - { - case eESTABLISHED: - /* If the 'ipconfigTCP_KEEP_ALIVE' option is enabled, sockets in - state ESTABLISHED can be protected using keep-alive messages. */ - xResult = pdFALSE; - break; - case eCLOSED: - case eTCP_LISTEN: - case eCLOSE_WAIT: - /* These 3 states may last for ever, up to the owner. */ - xResult = pdFALSE; - break; - default: - /* All other (non-connected) states will get anti-hanging - protection. */ - xResult = pdTRUE; - break; - } - if( xResult != pdFALSE ) - { - /* How much time has past since the last active moment which is - defined as A) a state change or B) a packet has arrived. */ - TickType_t xAge = xTaskGetTickCount( ) - pxSocket->u.xTCP.xLastActTime; - - /* ipconfigTCP_HANG_PROTECTION_TIME is in units of seconds. */ - if( xAge > ( ipconfigTCP_HANG_PROTECTION_TIME * configTICK_RATE_HZ ) ) - { - #if( ipconfigHAS_DEBUG_PRINTF == 1 ) - { - FreeRTOS_debug_printf( ( "Inactive socket closed: port %u rem %lxip:%u status %s\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort, - FreeRTOS_GetTCPStateName( ( UBaseType_t ) pxSocket->u.xTCP.ucTCPState ) ) ); - } - #endif /* ipconfigHAS_DEBUG_PRINTF */ - - /* Move to eCLOSE_WAIT, user may close the socket. */ - vTCPStateChange( pxSocket, eCLOSE_WAIT ); - - /* When 'bPassQueued' true, this socket is an orphan until it - gets connected. */ - if( pxSocket->u.xTCP.bits.bPassQueued != pdFALSE_UNSIGNED ) - { - if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) - { - /* As it did not get connected, and the user can never - accept() it anymore, it will be deleted now. Called from - the IP-task, so it's safe to call the internal Close - function: vSocketClose(). */ - vSocketClose( pxSocket ); - } - /* Return a negative value to tell to inform the caller - xTCPTimerCheck() - that the socket got closed and may not be accessed anymore. */ - xResult = -1; - } - } - } - return xResult; - } - /*-----------------------------------------------------------*/ - -#endif - -/* - * As soon as a TCP socket timer expires, this function xTCPSocketCheck - * will be called (from xTCPTimerCheck) - * It can send a delayed ACK or new data - * Sequence of calling (normally) : - * IP-Task: - * xTCPTimerCheck() // Check all sockets ( declared in FreeRTOS_Sockets.c ) - * xTCPSocketCheck() // Either send a delayed ACK or call prvTCPSendPacket() - * prvTCPSendPacket() // Either send a SYN or call prvTCPSendRepeated ( regular messages ) - * prvTCPSendRepeated() // Send at most 8 messages on a row - * prvTCPReturnPacket() // Prepare for returning - * xNetworkInterfaceOutput() // Sends data to the NIC ( declared in portable/NetworkInterface/xxx ) - */ -BaseType_t xTCPSocketCheck( FreeRTOS_Socket_t *pxSocket ) -{ -BaseType_t xResult = 0; -BaseType_t xReady = pdFALSE; - - if( ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && ( pxSocket->u.xTCP.txStream != NULL ) ) - { - /* The API FreeRTOS_send() might have added data to the TX stream. Add - this data to the windowing system to it can be transmitted. */ - prvTCPAddTxData( pxSocket ); - } - - #if ipconfigUSE_TCP_WIN == 1 - { - if( pxSocket->u.xTCP.pxAckMessage != NULL ) - { - /* The first task of this regular socket check is to send-out delayed - ACK's. */ - if( pxSocket->u.xTCP.bits.bUserShutdown == pdFALSE_UNSIGNED ) - { - /* Earlier data was received but not yet acknowledged. This - function is called when the TCP timer for the socket expires, the - ACK may be sent now. */ - if( pxSocket->u.xTCP.ucTCPState != eCLOSED ) - { - if( xTCPWindowLoggingLevel > 1 && ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) ) - { - FreeRTOS_debug_printf( ( "Send[%u->%u] del ACK %lu SEQ %lu (len %u)\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.usRemotePort, - pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber, - pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber - pxSocket->u.xTCP.xTCPWindow.tx.ulFirstSequenceNumber, - ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) ); - } - - prvTCPReturnPacket( pxSocket, pxSocket->u.xTCP.pxAckMessage, ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER, ipconfigZERO_COPY_TX_DRIVER ); - - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* The ownership has been passed to the SEND routine, - clear the pointer to it. */ - pxSocket->u.xTCP.pxAckMessage = NULL; - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - } - if( prvTCPNextTimeout( pxSocket ) > 1 ) - { - /* Tell the code below that this function is ready. */ - xReady = pdTRUE; - } - } - else - { - /* The user wants to perform an active shutdown(), skip sending - the delayed ACK. The function prvTCPSendPacket() will send the - FIN along with the ACK's. */ - } - - if( pxSocket->u.xTCP.pxAckMessage != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); - pxSocket->u.xTCP.pxAckMessage = NULL; - } - } - } - #endif /* ipconfigUSE_TCP_WIN */ - - if( xReady == pdFALSE ) - { - /* The second task of this regular socket check is sending out data. */ - if( ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) || - ( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) ) - { - prvTCPSendPacket( pxSocket ); - } - - /* Set the time-out for the next wakeup for this socket. */ - prvTCPNextTimeout( pxSocket ); - - #if( ipconfigTCP_HANG_PROTECTION == 1 ) - { - /* In all (non-connected) states in which keep-alive messages can not be sent - the anti-hang protocol will close sockets that are 'hanging'. */ - xResult = prvTCPStatusAgeCheck( pxSocket ); - } - #endif - } - - return xResult; -} -/*-----------------------------------------------------------*/ - -/* - * prvTCPSendPacket() will be called when the socket time-out has been reached. - * It is only called by xTCPSocketCheck(). - */ -static int32_t prvTCPSendPacket( FreeRTOS_Socket_t *pxSocket ) -{ -int32_t lResult = 0; -UBaseType_t uxOptionsLength; -TCPPacket_t *pxTCPPacket; -NetworkBufferDescriptor_t *pxNetworkBuffer; - - if( pxSocket->u.xTCP.ucTCPState != eCONNECT_SYN ) - { - /* The connection is in s state other than SYN. */ - pxNetworkBuffer = NULL; - - /* prvTCPSendRepeated() will only create a network buffer if necessary, - i.e. when data must be sent to the peer. */ - lResult = prvTCPSendRepeated( pxSocket, &pxNetworkBuffer ); - - if( pxNetworkBuffer != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - } - else - { - if( pxSocket->u.xTCP.ucRepCount >= 3u ) - { - /* The connection is in the SYN status. The packet will be repeated - to most 3 times. When there is no response, the socket get the - status 'eCLOSE_WAIT'. */ - FreeRTOS_debug_printf( ( "Connect: giving up %lxip:%u\n", - pxSocket->u.xTCP.ulRemoteIP, /* IP address of remote machine. */ - pxSocket->u.xTCP.usRemotePort ) ); /* Port on remote machine. */ - vTCPStateChange( pxSocket, eCLOSE_WAIT ); - } - else if( ( pxSocket->u.xTCP.bits.bConnPrepared != pdFALSE_UNSIGNED ) || ( prvTCPPrepareConnect( pxSocket ) == pdTRUE ) ) - { - /* Or else, if the connection has been prepared, or can be prepared - now, proceed to send the packet with the SYN flag. - prvTCPPrepareConnect() prepares 'xPacket' and returns pdTRUE if - the Ethernet address of the peer or the gateway is found. */ - pxTCPPacket = ( TCPPacket_t * )pxSocket->u.xTCP.xPacket.u.ucLastPacket; - - /* About to send a SYN packet. Call prvSetSynAckOptions() to set - the proper options: The size of MSS and whether SACK's are - allowed. */ - uxOptionsLength = prvSetSynAckOptions( pxSocket, pxTCPPacket ); - - /* Return the number of bytes to be sent. */ - lResult = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); - - /* Set the TCP offset field: ipSIZE_OF_TCP_HEADER equals 20 and - uxOptionsLength is always a multiple of 4. The complete expression - would be: - ucTCPOffset = ( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) / 4 ) << 4 */ - pxTCPPacket->xTCPHeader.ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - - /* Repeat Count is used for a connecting socket, to limit the number - of tries. */ - pxSocket->u.xTCP.ucRepCount++; - - /* Send the SYN message to make a connection. The messages is - stored in the socket field 'xPacket'. It will be wrapped in a - pseudo network buffer descriptor before it will be sent. */ - prvTCPReturnPacket( pxSocket, NULL, ( uint32_t ) lResult, pdFALSE ); - } - } - - /* Return the total number of bytes sent. */ - return lResult; -} -/*-----------------------------------------------------------*/ - -/* - * prvTCPSendRepeated will try to send a series of messages, as long as there is - * data to be sent and as long as the transmit window isn't full. - */ -static int32_t prvTCPSendRepeated( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ) -{ -UBaseType_t uxIndex; -int32_t lResult = 0; -UBaseType_t uxOptionsLength = 0u; -int32_t xSendLength; - - for( uxIndex = 0u; uxIndex < ( UBaseType_t ) SEND_REPEATED_COUNT; uxIndex++ ) - { - /* prvTCPPrepareSend() might allocate a network buffer if there is data - to be sent. */ - xSendLength = prvTCPPrepareSend( pxSocket, ppxNetworkBuffer, uxOptionsLength ); - if( xSendLength <= 0 ) - { - break; - } - - /* And return the packet to the peer. */ - prvTCPReturnPacket( pxSocket, *ppxNetworkBuffer, ( uint32_t ) xSendLength, ipconfigZERO_COPY_TX_DRIVER ); - - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - *ppxNetworkBuffer = NULL; - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - lResult += xSendLength; - } - - /* Return the total number of bytes sent. */ - return lResult; -} -/*-----------------------------------------------------------*/ - -/* - * Return (or send) a packet the the peer. The data is stored in pxBuffer, - * which may either point to a real network buffer or to a TCP socket field - * called 'xTCP.xPacket'. A temporary xNetworkBuffer will be used to pass - * the data to the NIC. - */ -static void prvTCPReturnPacket( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, uint32_t ulLen, BaseType_t xReleaseAfterSend ) -{ -TCPPacket_t * pxTCPPacket; -IPHeader_t *pxIPHeader; -EthernetHeader_t *pxEthernetHeader; -uint32_t ulFrontSpace, ulSpace, ulSourceAddress, ulWinSize; -TCPWindow_t *pxTCPWindow; -NetworkBufferDescriptor_t xTempBuffer; -/* For sending, a pseudo network buffer will be used, as explained above. */ - - if( pxNetworkBuffer == NULL ) - { - pxNetworkBuffer = &xTempBuffer; - - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - xTempBuffer.pxNextBuffer = NULL; - } - #endif - xTempBuffer.pucEthernetBuffer = pxSocket->u.xTCP.xPacket.u.ucLastPacket; - xTempBuffer.xDataLength = sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ); - xReleaseAfterSend = pdFALSE; - } - - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - if( xReleaseAfterSend == pdFALSE ) - { - pxNetworkBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, ( BaseType_t ) pxNetworkBuffer->xDataLength ); - if( pxNetworkBuffer == NULL ) - { - FreeRTOS_debug_printf( ( "prvTCPReturnPacket: duplicate failed\n" ) ); - } - xReleaseAfterSend = pdTRUE; - } - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - if( pxNetworkBuffer != NULL ) - { - pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); - pxIPHeader = &pxTCPPacket->xIPHeader; - pxEthernetHeader = &pxTCPPacket->xEthernetHeader; - - /* Fill the packet, using hton translations. */ - if( pxSocket != NULL ) - { - /* Calculate the space in the RX buffer in order to advertise the - size of this socket's reception window. */ - pxTCPWindow = &( pxSocket->u.xTCP.xTCPWindow ); - - if( pxSocket->u.xTCP.rxStream != NULL ) - { - /* An RX stream was created already, see how much space is - available. */ - ulFrontSpace = ( uint32_t ) uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ); - } - else - { - /* No RX stream has been created, the full stream size is - available. */ - ulFrontSpace = ( uint32_t ) pxSocket->u.xTCP.uxRxStreamSize; - } - - /* Take the minimum of the RX buffer space and the RX window size. */ - ulSpace = FreeRTOS_min_uint32( pxTCPWindow->xSize.ulRxWindowLength, ulFrontSpace ); - - if( ( pxSocket->u.xTCP.bits.bLowWater != pdFALSE_UNSIGNED ) || ( pxSocket->u.xTCP.bits.bRxStopped != pdFALSE_UNSIGNED ) ) - { - /* The low-water mark was reached, meaning there was little - space left. The socket will wait until the application has read - or flushed the incoming data, and 'zero-window' will be - advertised. */ - ulSpace = 0u; - } - - /* If possible, advertise an RX window size of at least 1 MSS, otherwise - the peer might start 'zero window probing', i.e. sending small packets - (1, 2, 4, 8... bytes). */ - if( ( ulSpace < pxSocket->u.xTCP.usCurMSS ) && ( ulFrontSpace >= pxSocket->u.xTCP.usCurMSS ) ) - { - ulSpace = pxSocket->u.xTCP.usCurMSS; - } - - /* Avoid overflow of the 16-bit win field. */ - #if( ipconfigUSE_TCP_WIN != 0 ) - { - ulWinSize = ( ulSpace >> pxSocket->u.xTCP.ucMyWinScaleFactor ); - } - #else - { - ulWinSize = ulSpace; - } - #endif - if( ulWinSize > 0xfffcUL ) - { - ulWinSize = 0xfffcUL; - } - - pxTCPPacket->xTCPHeader.usWindow = FreeRTOS_htons( ( uint16_t ) ulWinSize ); - - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - if( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) - { - if( ( xTCPWindowLoggingLevel != 0 ) && ( pxSocket->u.xTCP.bits.bWinChange != pdFALSE_UNSIGNED ) ) - { - size_t uxFrontSpace; - - if(pxSocket->u.xTCP.rxStream != NULL) - { - uxFrontSpace = uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ) ; - } - else - { - uxFrontSpace = 0u; - } - - FreeRTOS_debug_printf( ( "%s: %lxip:%u: [%lu < %lu] winSize %ld\n", - pxSocket->u.xTCP.bits.bLowWater ? "STOP" : "GO ", - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort, - pxSocket->u.xTCP.bits.bLowWater ? pxSocket->u.xTCP.uxLittleSpace : uxFrontSpace, pxSocket->u.xTCP.uxEnoughSpace, - (int32_t) ( pxTCPWindow->rx.ulHighestSequenceNumber - pxTCPWindow->rx.ulCurrentSequenceNumber ) ) ); - } - } - } - #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ - - /* The new window size has been advertised, switch off the flag. */ - pxSocket->u.xTCP.bits.bWinChange = pdFALSE_UNSIGNED; - - /* Later on, when deciding to delay an ACK, a precise estimate is needed - of the free RX space. At this moment, 'ulHighestRxAllowed' would be the - highest sequence number minus 1 that the socket will accept. */ - pxSocket->u.xTCP.ulHighestRxAllowed = pxTCPWindow->rx.ulCurrentSequenceNumber + ulSpace; - - #if( ipconfigTCP_KEEP_ALIVE == 1 ) - if( pxSocket->u.xTCP.bits.bSendKeepAlive != pdFALSE_UNSIGNED ) - { - /* Sending a keep-alive packet, send the current sequence number - minus 1, which will be recognised as a keep-alive packet an - responded to by acknowledging the last byte. */ - pxSocket->u.xTCP.bits.bSendKeepAlive = pdFALSE_UNSIGNED; - pxSocket->u.xTCP.bits.bWaitKeepAlive = pdTRUE_UNSIGNED; - - pxTCPPacket->xTCPHeader.ulSequenceNumber = pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber - 1UL; - pxTCPPacket->xTCPHeader.ulSequenceNumber = FreeRTOS_htonl( pxTCPPacket->xTCPHeader.ulSequenceNumber ); - } - else - #endif - { - pxTCPPacket->xTCPHeader.ulSequenceNumber = FreeRTOS_htonl( pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber ); - - if( ( pxTCPPacket->xTCPHeader.ucTCPFlags & ( uint8_t ) ipTCP_FLAG_FIN ) != 0u ) - { - /* Suppress FIN in case this packet carries earlier data to be - retransmitted. */ - uint32_t ulDataLen = ( uint32_t ) ( ulLen - ( ipSIZE_OF_TCP_HEADER + ipSIZE_OF_IPv4_HEADER ) ); - if( ( pxTCPWindow->ulOurSequenceNumber + ulDataLen ) != pxTCPWindow->tx.ulFINSequenceNumber ) - { - pxTCPPacket->xTCPHeader.ucTCPFlags &= ( ( uint8_t ) ~ipTCP_FLAG_FIN ); - FreeRTOS_debug_printf( ( "Suppress FIN for %lu + %lu < %lu\n", - pxTCPWindow->ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, - ulDataLen, - pxTCPWindow->tx.ulFINSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber ) ); - } - } - } - - /* Tell which sequence number is expected next time */ - pxTCPPacket->xTCPHeader.ulAckNr = FreeRTOS_htonl( pxTCPWindow->rx.ulCurrentSequenceNumber ); - } - else - { - /* Sending data without a socket, probably replying with a RST flag - Just swap the two sequence numbers. */ - vFlip_32( pxTCPPacket->xTCPHeader.ulSequenceNumber, pxTCPPacket->xTCPHeader.ulAckNr ); - } - - pxIPHeader->ucTimeToLive = ( uint8_t ) ipconfigTCP_TIME_TO_LIVE; - pxIPHeader->usLength = FreeRTOS_htons( ulLen ); - if( ( pxSocket == NULL ) || ( *ipLOCAL_IP_ADDRESS_POINTER == 0ul ) ) - { - /* When pxSocket is NULL, this function is called by prvTCPSendReset() - and the IP-addresses must be swapped. - Also swap the IP-addresses in case the IP-tack doesn't have an - IP-address yet, i.e. when ( *ipLOCAL_IP_ADDRESS_POINTER == 0ul ). */ - ulSourceAddress = pxIPHeader->ulDestinationIPAddress; - } - else - { - ulSourceAddress = *ipLOCAL_IP_ADDRESS_POINTER; - } - pxIPHeader->ulDestinationIPAddress = pxIPHeader->ulSourceIPAddress; - pxIPHeader->ulSourceIPAddress = ulSourceAddress; - vFlip_16( pxTCPPacket->xTCPHeader.usSourcePort, pxTCPPacket->xTCPHeader.usDestinationPort ); - - /* Just an increasing number. */ - pxIPHeader->usIdentification = FreeRTOS_htons( usPacketIdentifier ); - usPacketIdentifier++; - pxIPHeader->usFragmentOffset = 0u; - - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) - { - /* calculate the IP header checksum, in case the driver won't do that. */ - pxIPHeader->usHeaderChecksum = 0x00u; - pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0UL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); - pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); - - /* calculate the TCP checksum for an outgoing packet. */ - usGenerateProtocolChecksum( (uint8_t*)pxTCPPacket, pxNetworkBuffer->xDataLength, pdTRUE ); - - /* A calculated checksum of 0 must be inverted as 0 means the checksum - is disabled. */ - if( pxTCPPacket->xTCPHeader.usChecksum == 0x00u ) - { - pxTCPPacket->xTCPHeader.usChecksum = 0xffffU; - } - } - #endif - - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - pxNetworkBuffer->pxNextBuffer = NULL; - #endif - - /* Important: tell NIC driver how many bytes must be sent. */ - pxNetworkBuffer->xDataLength = ulLen + ipSIZE_OF_ETH_HEADER; - - /* Fill in the destination MAC addresses. */ - memcpy( ( void * ) &( pxEthernetHeader->xDestinationAddress ), ( void * ) &( pxEthernetHeader->xSourceAddress ), - sizeof( pxEthernetHeader->xDestinationAddress ) ); - - /* The source MAC addresses is fixed to 'ipLOCAL_MAC_ADDRESS'. */ - memcpy( ( void * ) &( pxEthernetHeader->xSourceAddress) , ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); - - #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - BaseType_t xIndex; - - for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) - { - pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; - } - pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; - } - } - #endif - - /* Send! */ - xNetworkInterfaceOutput( pxNetworkBuffer, xReleaseAfterSend ); - - if( xReleaseAfterSend == pdFALSE ) - { - /* Swap-back some fields, as pxBuffer probably points to a socket field - containing the packet header. */ - vFlip_16( pxTCPPacket->xTCPHeader.usSourcePort, pxTCPPacket->xTCPHeader.usDestinationPort); - pxTCPPacket->xIPHeader.ulSourceIPAddress = pxTCPPacket->xIPHeader.ulDestinationIPAddress; - memcpy( pxEthernetHeader->xSourceAddress.ucBytes, pxEthernetHeader->xDestinationAddress.ucBytes, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); - } - else - { - /* Nothing to do: the buffer has been passed to DMA and will be released after use */ - } - } /* if( pxNetworkBuffer != NULL ) */ -} -/*-----------------------------------------------------------*/ - -/* - * The SYN event is very important: the sequence numbers, which have a kind of - * random starting value, are being synchronised. The sliding window manager - * (in FreeRTOS_TCP_WIN.c) needs to know them, along with the Maximum Segment - * Size (MSS) in use. - */ -static void prvTCPCreateWindow( FreeRTOS_Socket_t *pxSocket ) -{ - if( xTCPWindowLoggingLevel ) - FreeRTOS_debug_printf( ( "Limits (using): TCP Win size %lu Water %lu <= %lu <= %lu\n", - pxSocket->u.xTCP.uxRxWinSize * ipconfigTCP_MSS, - pxSocket->u.xTCP.uxLittleSpace , - pxSocket->u.xTCP.uxEnoughSpace, - pxSocket->u.xTCP.uxRxStreamSize ) ); - vTCPWindowCreate( - &pxSocket->u.xTCP.xTCPWindow, - ipconfigTCP_MSS * pxSocket->u.xTCP.uxRxWinSize, - ipconfigTCP_MSS * pxSocket->u.xTCP.uxTxWinSize, - pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber, - pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber, - ( uint32_t ) pxSocket->u.xTCP.usInitMSS ); -} -/*-----------------------------------------------------------*/ - -/* - * Connecting sockets have a special state: eCONNECT_SYN. In this phase, - * the Ethernet address of the target will be found using ARP. In case the - * target IP address is not within the netmask, the hardware address of the - * gateway will be used. - */ -static BaseType_t prvTCPPrepareConnect( FreeRTOS_Socket_t *pxSocket ) -{ -TCPPacket_t *pxTCPPacket; -IPHeader_t *pxIPHeader; -eARPLookupResult_t eReturned; -uint32_t ulRemoteIP; -MACAddress_t xEthAddress; -BaseType_t xReturn = pdTRUE; -uint32_t ulInitialSequenceNumber = 0; - - #if( ipconfigHAS_PRINTF != 0 ) - { - /* Only necessary for nicer logging. */ - memset( xEthAddress.ucBytes, '\0', sizeof( xEthAddress.ucBytes ) ); - } - #endif /* ipconfigHAS_PRINTF != 0 */ - - ulRemoteIP = FreeRTOS_htonl( pxSocket->u.xTCP.ulRemoteIP ); - - /* Determine the ARP cache status for the requested IP address. */ - eReturned = eARPGetCacheEntry( &( ulRemoteIP ), &( xEthAddress ) ); - - switch( eReturned ) - { - case eARPCacheHit: /* An ARP table lookup found a valid entry. */ - break; /* We can now prepare the SYN packet. */ - case eARPCacheMiss: /* An ARP table lookup did not find a valid entry. */ - case eCantSendPacket: /* There is no IP address, or an ARP is still in progress. */ - default: - /* Count the number of times it couldn't find the ARP address. */ - pxSocket->u.xTCP.ucRepCount++; - - FreeRTOS_debug_printf( ( "ARP for %lxip (using %lxip): rc=%d %02X:%02X:%02X %02X:%02X:%02X\n", - pxSocket->u.xTCP.ulRemoteIP, - FreeRTOS_htonl( ulRemoteIP ), - eReturned, - xEthAddress.ucBytes[ 0 ], - xEthAddress.ucBytes[ 1 ], - xEthAddress.ucBytes[ 2 ], - xEthAddress.ucBytes[ 3 ], - xEthAddress.ucBytes[ 4 ], - xEthAddress.ucBytes[ 5 ] ) ); - - /* And issue a (new) ARP request */ - FreeRTOS_OutputARPRequest( ulRemoteIP ); - - xReturn = pdFALSE; - } - - if( xReturn != pdFALSE ) - { - /* Get a difficult-to-predict initial sequence number for this 4-tuple. */ - ulInitialSequenceNumber = ulApplicationGetNextSequenceNumber( *ipLOCAL_IP_ADDRESS_POINTER, - pxSocket->usLocalPort, - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort ); - - /* Check for a random number generation error. */ - if( 0 == ulInitialSequenceNumber ) - { - xReturn = pdFALSE; - } - } - - if( xReturn != pdFALSE ) - { - /* The MAC-address of the peer (or gateway) has been found, - now prepare the initial TCP packet and some fields in the socket. */ - pxTCPPacket = ( TCPPacket_t * )pxSocket->u.xTCP.xPacket.u.ucLastPacket; - pxIPHeader = &pxTCPPacket->xIPHeader; - - /* reset the retry counter to zero. */ - pxSocket->u.xTCP.ucRepCount = 0u; - - /* And remember that the connect/SYN data are prepared. */ - pxSocket->u.xTCP.bits.bConnPrepared = pdTRUE_UNSIGNED; - - /* Now that the Ethernet address is known, the initial packet can be - prepared. */ - memset( pxSocket->u.xTCP.xPacket.u.ucLastPacket, '\0', sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ) ); - - /* Write the Ethernet address in Source, because it will be swapped by - prvTCPReturnPacket(). */ - memcpy( &pxTCPPacket->xEthernetHeader.xSourceAddress, &xEthAddress, sizeof( xEthAddress ) ); - - /* 'ipIPv4_FRAME_TYPE' is already in network-byte-order. */ - pxTCPPacket->xEthernetHeader.usFrameType = ipIPv4_FRAME_TYPE; - - pxIPHeader->ucVersionHeaderLength = 0x45u; - pxIPHeader->usLength = FreeRTOS_htons( sizeof( TCPPacket_t ) - sizeof( pxTCPPacket->xEthernetHeader ) ); - pxIPHeader->ucTimeToLive = ( uint8_t ) ipconfigTCP_TIME_TO_LIVE; - - pxIPHeader->ucProtocol = ( uint8_t ) ipPROTOCOL_TCP; - - /* Addresses and ports will be stored swapped because prvTCPReturnPacket - will swap them back while replying. */ - pxIPHeader->ulDestinationIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; - pxIPHeader->ulSourceIPAddress = FreeRTOS_htonl( pxSocket->u.xTCP.ulRemoteIP ); - - pxTCPPacket->xTCPHeader.usSourcePort = FreeRTOS_htons( pxSocket->u.xTCP.usRemotePort ); - pxTCPPacket->xTCPHeader.usDestinationPort = FreeRTOS_htons( pxSocket->usLocalPort ); - - /* We are actively connecting, so the peer's Initial Sequence Number (ISN) - isn't known yet. */ - pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber = 0ul; - - /* Start with ISN (Initial Sequence Number). */ - pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber = ulInitialSequenceNumber; - - /* The TCP header size is 20 bytes, divided by 4 equals 5, which is put in - the high nibble of the TCP offset field. */ - pxTCPPacket->xTCPHeader.ucTCPOffset = 0x50u; - - /* Only set the SYN flag. */ - pxTCPPacket->xTCPHeader.ucTCPFlags = ipTCP_FLAG_SYN; - - /* Set the values of usInitMSS / usCurMSS for this socket. */ - prvSocketSetMSS( pxSocket ); - - /* The initial sequence numbers at our side are known. Later - vTCPWindowInit() will be called to fill in the peer's sequence numbers, but - first wait for a SYN+ACK reply. */ - prvTCPCreateWindow( pxSocket ); - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -/* For logging and debugging: make a string showing the TCP flags -*/ -#if( ipconfigHAS_DEBUG_PRINTF != 0 ) - - static const char *prvTCPFlagMeaning( UBaseType_t xFlags) - { - static char retString[10]; - snprintf(retString, sizeof( retString ), "%c%c%c%c%c%c%c%c%c", - ( xFlags & ipTCP_FLAG_FIN ) ? 'F' : '.', /* 0x0001: No more data from sender */ - ( xFlags & ipTCP_FLAG_SYN ) ? 'S' : '.', /* 0x0002: Synchronize sequence numbers */ - ( xFlags & ipTCP_FLAG_RST ) ? 'R' : '.', /* 0x0004: Reset the connection */ - ( xFlags & ipTCP_FLAG_PSH ) ? 'P' : '.', /* 0x0008: Push function: please push buffered data to the recv application */ - ( xFlags & ipTCP_FLAG_ACK ) ? 'A' : '.', /* 0x0010: Acknowledgment field is significant */ - ( xFlags & ipTCP_FLAG_URG ) ? 'U' : '.', /* 0x0020: Urgent pointer field is significant */ - ( xFlags & ipTCP_FLAG_ECN ) ? 'E' : '.', /* 0x0040: ECN-Echo */ - ( xFlags & ipTCP_FLAG_CWR ) ? 'C' : '.', /* 0x0080: Congestion Window Reduced */ - ( xFlags & ipTCP_FLAG_NS ) ? 'N' : '.'); /* 0x0100: ECN-nonce concealment protection */ - return retString; - } - /*-----------------------------------------------------------*/ - -#endif /* ipconfigHAS_DEBUG_PRINTF */ - -/* - * Parse the TCP option(s) received, if present. It has already been verified - * that: ((pxTCPHeader->ucTCPOffset & 0xf0) > 0x50), meaning that the TP header - * is longer than the usual 20 (5 x 4) bytes. - */ -static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ -TCPPacket_t * pxTCPPacket; -TCPHeader_t * pxTCPHeader; -const unsigned char *pucPtr; -const unsigned char *pucLast; -TCPWindow_t *pxTCPWindow; -BaseType_t xShouldContinueLoop; - - pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); - pxTCPHeader = &pxTCPPacket->xTCPHeader; - - /* A character pointer to iterate through the option data */ - pucPtr = pxTCPHeader->ucOptdata; - pucLast = pucPtr + (((pxTCPHeader->ucTCPOffset >> 4) - 5) << 2); - pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; - - /* Validate options size calculation. */ - if( pucLast > ( pxNetworkBuffer->pucEthernetBuffer + pxNetworkBuffer->xDataLength ) ) - { - return; - } - - /* The comparison with pucLast is only necessary in case the option data are - corrupted, we don't like to run into invalid memory and crash. */ - xShouldContinueLoop = pdTRUE; - while( ( pucPtr < pucLast ) && ( xShouldContinueLoop == pdTRUE ) ) - { - xShouldContinueLoop = prvSingleStepTCPHeaderOptions( &pucPtr, &pucLast, &pxSocket, &pxTCPWindow ); - } -} - -/*-----------------------------------------------------------*/ - -static BaseType_t prvSingleStepTCPHeaderOptions( const unsigned char ** const ppucPtr, const unsigned char ** const ppucLast, FreeRTOS_Socket_t ** const ppxSocket, TCPWindow_t ** const ppxTCPWindow) -{ - UBaseType_t uxNewMSS; - UBaseType_t xRemainingOptionsBytes = ( *ppucLast ) - ( *ppucPtr ); - unsigned char ucLen; - - if( ( *ppucPtr )[ 0 ] == TCP_OPT_END ) - { - /* End of options. */ - return pdFALSE; - } - if( ( *ppucPtr )[ 0 ] == TCP_OPT_NOOP) - { - /* NOP option, inserted to make the length a multiple of 4. */ - ( *ppucPtr )++; - return pdTRUE; - } - - /* Any other well-formed option must be at least two bytes: the option - type byte followed by a length byte. */ - if( xRemainingOptionsBytes < 2 ) - { - return pdFALSE; - } -#if( ipconfigUSE_TCP_WIN != 0 ) - else if( ( *ppucPtr )[ 0 ] == TCP_OPT_WSOPT ) - { - /* Confirm that the option fits in the remaining buffer space. */ - if( ( xRemainingOptionsBytes < TCP_OPT_WSOPT_LEN ) || ( ( *ppucPtr )[ 1 ] != TCP_OPT_WSOPT_LEN ) ) - { - return pdFALSE; - } - - ( *ppxSocket )->u.xTCP.ucPeerWinScaleFactor = ( *ppucPtr )[ 2 ]; - ( *ppxSocket )->u.xTCP.bits.bWinScaling = pdTRUE_UNSIGNED; - ( *ppucPtr ) += TCP_OPT_WSOPT_LEN; - } -#endif /* ipconfigUSE_TCP_WIN */ - else if( ( *ppucPtr )[ 0 ] == TCP_OPT_MSS ) - { - /* Confirm that the option fits in the remaining buffer space. */ - if( ( xRemainingOptionsBytes < TCP_OPT_MSS_LEN )|| ( ( *ppucPtr )[ 1 ] != TCP_OPT_MSS_LEN ) ) - { - return pdFALSE; - } - - /* An MSS option with the correct option length. FreeRTOS_htons() - is not needed here because usChar2u16() already returns a host - endian number. */ - uxNewMSS = usChar2u16( ( *ppucPtr ) + 2 ); - - if( ( *ppxSocket )->u.xTCP.usInitMSS != uxNewMSS ) - { - /* Perform a basic check on the the new MSS. */ - if( uxNewMSS == 0 ) - { - return pdFALSE; - } - - FreeRTOS_debug_printf( ( "MSS change %u -> %lu\n", ( *ppxSocket )->u.xTCP.usInitMSS, uxNewMSS ) ); - } - - if( ( *ppxSocket )->u.xTCP.usInitMSS > uxNewMSS ) - { - /* our MSS was bigger than the MSS of the other party: adapt it. */ - ( *ppxSocket )->u.xTCP.bits.bMssChange = pdTRUE_UNSIGNED; - if( ( ( *ppxTCPWindow ) != NULL ) && ( ( *ppxSocket )->u.xTCP.usCurMSS > uxNewMSS ) ) - { - /* The peer advertises a smaller MSS than this socket was - using. Use that as well. */ - FreeRTOS_debug_printf( ( "Change mss %d => %lu\n", ( *ppxSocket )->u.xTCP.usCurMSS, uxNewMSS ) ); - ( *ppxSocket )->u.xTCP.usCurMSS = ( uint16_t ) uxNewMSS; - } - ( *ppxTCPWindow )->xSize.ulRxWindowLength = ( ( uint32_t ) uxNewMSS ) * ( ( *ppxTCPWindow )->xSize.ulRxWindowLength / ( ( uint32_t ) uxNewMSS ) ); - ( *ppxTCPWindow )->usMSSInit = ( uint16_t ) uxNewMSS; - ( *ppxTCPWindow )->usMSS = ( uint16_t ) uxNewMSS; - ( *ppxSocket )->u.xTCP.usInitMSS = ( uint16_t ) uxNewMSS; - ( *ppxSocket )->u.xTCP.usCurMSS = ( uint16_t ) uxNewMSS; - } - - #if( ipconfigUSE_TCP_WIN != 1 ) - /* Without scaled windows, MSS is the only interesting option. */ - return pdFALSE; - #else - /* Or else we continue to check another option: selective ACK. */ - ( *ppucPtr ) += TCP_OPT_MSS_LEN; - #endif /* ipconfigUSE_TCP_WIN != 1 */ - } - else - { - /* All other options have a length field, so that we easily - can skip past them. */ - ucLen = ( *ppucPtr )[ 1 ]; - if( ( ucLen < 2 ) || ( ucLen > xRemainingOptionsBytes ) ) - { - /* If the length field is too small or too big, the options are - * malformed, don't process them further. - */ - return pdFALSE; - } - - #if( ipconfigUSE_TCP_WIN == 1 ) - { - /* Selective ACK: the peer has received a packet but it is missing - * earlier packets. At least this packet does not need retransmission - * anymore. ulTCPWindowTxSack( ) takes care of this administration. - */ - if( ( *ppucPtr )[0] == TCP_OPT_SACK_A ) - { - ucLen -= 2; - ( *ppucPtr ) += 2; - - while( ucLen >= 8 ) - { - prvSkipPastRemainingOptions( ppucPtr, ppxSocket, &ucLen ); - } - /* ucLen should be 0 by now. */ - } - } - #endif /* ipconfigUSE_TCP_WIN == 1 */ - - ( *ppucPtr ) += ucLen; - } - return pdTRUE; -} - -/*-----------------------------------------------------------*/ - -static void prvSkipPastRemainingOptions( const unsigned char ** const ppucPtr, FreeRTOS_Socket_t ** const ppxSocket, unsigned char * const pucLen ) -{ -uint32_t ulFirst = ulChar2u32( ( *ppucPtr ) ); -uint32_t ulLast = ulChar2u32( ( *ppucPtr ) + 4 ); -uint32_t ulCount = ulTCPWindowTxSack( &( *ppxSocket )->u.xTCP.xTCPWindow, ulFirst, ulLast ); - /* ulTCPWindowTxSack( ) returns the number of bytes which have been acked - * starting from the head position. Advance the tail pointer in txStream. - */ - if( ( ( *ppxSocket )->u.xTCP.txStream != NULL ) && ( ulCount > 0 ) ) - { - /* Just advancing the tail index, 'ulCount' bytes have been confirmed. */ - uxStreamBufferGet( ( *ppxSocket )->u.xTCP.txStream, 0, NULL, ( size_t ) ulCount, pdFALSE ); - ( *ppxSocket )->xEventBits |= eSOCKET_SEND; - - #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - { - if( ( *ppxSocket )->xSelectBits & eSELECT_WRITE ) - { - /* The field 'xEventBits' is used to store regular socket events - * (at most 8), as well as 'select events', which will be left-shifted. - */ - ( *ppxSocket )->xEventBits |= ( eSELECT_WRITE << SOCKET_EVENT_BIT_COUNT ); - } - } - #endif - - /* In case the socket owner has installed an OnSent handler, call it now. - */ - #if( ipconfigUSE_CALLBACKS == 1 ) - { - if( ipconfigIS_VALID_PROG_ADDRESS( ( *ppxSocket )->u.xTCP.pxHandleSent ) ) - { - ( *ppxSocket )->u.xTCP.pxHandleSent( (Socket_t )( *ppxSocket ), ulCount ); - } - } - #endif /* ipconfigUSE_CALLBACKS == 1 */ - } - ( *ppucPtr ) += 8; - ( *pucLen ) -= 8; -} - -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN != 0 ) - - static uint8_t prvWinScaleFactor( FreeRTOS_Socket_t *pxSocket ) - { - size_t uxWinSize; - uint8_t ucFactor; - - /* 'xTCP.uxRxWinSize' is the size of the reception window in units of MSS. */ - uxWinSize = pxSocket->u.xTCP.uxRxWinSize * ( size_t ) pxSocket->u.xTCP.usInitMSS; - ucFactor = 0u; - while( uxWinSize > 0xfffful ) - { - /* Divide by two and increase the binary factor by 1. */ - uxWinSize >>= 1; - ucFactor++; - } - - FreeRTOS_debug_printf( ( "prvWinScaleFactor: uxRxWinSize %lu MSS %lu Factor %u\n", - pxSocket->u.xTCP.uxRxWinSize, - pxSocket->u.xTCP.usInitMSS, - ucFactor ) ); - - return ucFactor; - } - -#endif -/*-----------------------------------------------------------*/ - -/* - * When opening a TCP connection, while SYN's are being sent, the parties may - * communicate what MSS (Maximum Segment Size) they intend to use. MSS is the - * nett size of the payload, always smaller than MTU. -*/ -static UBaseType_t prvSetSynAckOptions( FreeRTOS_Socket_t *pxSocket, TCPPacket_t * pxTCPPacket ) -{ -TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; -uint16_t usMSS = pxSocket->u.xTCP.usInitMSS; -UBaseType_t uxOptionsLength; - - /* We send out the TCP Maximum Segment Size option with our SYN[+ACK]. */ - - pxTCPHeader->ucOptdata[ 0 ] = ( uint8_t ) TCP_OPT_MSS; - pxTCPHeader->ucOptdata[ 1 ] = ( uint8_t ) TCP_OPT_MSS_LEN; - pxTCPHeader->ucOptdata[ 2 ] = ( uint8_t ) ( usMSS >> 8 ); - pxTCPHeader->ucOptdata[ 3 ] = ( uint8_t ) ( usMSS & 0xffu ); - - #if( ipconfigUSE_TCP_WIN != 0 ) - { - pxSocket->u.xTCP.ucMyWinScaleFactor = prvWinScaleFactor( pxSocket ); - - pxTCPHeader->ucOptdata[ 4 ] = TCP_OPT_NOOP; - pxTCPHeader->ucOptdata[ 5 ] = ( uint8_t ) ( TCP_OPT_WSOPT ); - pxTCPHeader->ucOptdata[ 6 ] = ( uint8_t ) ( TCP_OPT_WSOPT_LEN ); - pxTCPHeader->ucOptdata[ 7 ] = ( uint8_t ) pxSocket->u.xTCP.ucMyWinScaleFactor; - uxOptionsLength = 8u; - } - #else - { - uxOptionsLength = 4u; - } - #endif - - #if( ipconfigUSE_TCP_WIN == 0 ) - { - return uxOptionsLength; - } - #else - { - pxTCPHeader->ucOptdata[ uxOptionsLength + 0 ] = TCP_OPT_NOOP; - pxTCPHeader->ucOptdata[ uxOptionsLength + 1 ] = TCP_OPT_NOOP; - pxTCPHeader->ucOptdata[ uxOptionsLength + 2 ] = TCP_OPT_SACK_P; /* 4: Sack-Permitted Option. */ - pxTCPHeader->ucOptdata[ uxOptionsLength + 3 ] = 2; /* 2: length of this option. */ - uxOptionsLength += 4u; - - return uxOptionsLength; /* bytes, not words. */ - } - #endif /* ipconfigUSE_TCP_WIN == 0 */ -} - -/* - * For anti-hanging protection and TCP keep-alive messages. Called in two - * places: after receiving a packet and after a state change. The socket's - * alive timer may be reset. - */ -static void prvTCPTouchSocket( FreeRTOS_Socket_t *pxSocket ) -{ - #if( ipconfigTCP_HANG_PROTECTION == 1 ) - { - pxSocket->u.xTCP.xLastActTime = xTaskGetTickCount( ); - } - #endif - - #if( ipconfigTCP_KEEP_ALIVE == 1 ) - { - pxSocket->u.xTCP.bits.bWaitKeepAlive = pdFALSE_UNSIGNED; - pxSocket->u.xTCP.bits.bSendKeepAlive = pdFALSE_UNSIGNED; - pxSocket->u.xTCP.ucKeepRepCount = 0u; - pxSocket->u.xTCP.xLastAliveTime = xTaskGetTickCount(); - } - #endif - - ( void ) pxSocket; -} -/*-----------------------------------------------------------*/ - -/* - * Changing to a new state. Centralised here to do specific actions such as - * resetting the alive timer, calling the user's OnConnect handler to notify - * that a socket has got (dis)connected, and setting bit to unblock a call to - * FreeRTOS_select() - */ -void vTCPStateChange( FreeRTOS_Socket_t *pxSocket, enum eTCP_STATE eTCPState ) -{ -FreeRTOS_Socket_t *xParent = NULL; -BaseType_t bBefore = ( BaseType_t ) NOW_CONNECTED( pxSocket->u.xTCP.ucTCPState ); /* Was it connected ? */ -BaseType_t bAfter = ( BaseType_t ) NOW_CONNECTED( eTCPState ); /* Is it connected now ? */ -#if( ipconfigHAS_DEBUG_PRINTF != 0 ) - BaseType_t xPreviousState = ( BaseType_t ) pxSocket->u.xTCP.ucTCPState; -#endif -#if( ipconfigUSE_CALLBACKS == 1 ) - FreeRTOS_Socket_t *xConnected = NULL; -#endif - - /* Has the connected status changed? */ - if( bBefore != bAfter ) - { - /* Is the socket connected now ? */ - if( bAfter != pdFALSE ) - { - /* if bPassQueued is true, this socket is an orphan until it gets connected. */ - if( pxSocket->u.xTCP.bits.bPassQueued != pdFALSE_UNSIGNED ) - { - /* Now that it is connected, find it's parent. */ - if( pxSocket->u.xTCP.bits.bReuseSocket != pdFALSE_UNSIGNED ) - { - xParent = pxSocket; - } - else - { - xParent = pxSocket->u.xTCP.pxPeerSocket; - configASSERT( xParent != NULL ); - } - if( xParent != NULL ) - { - if( xParent->u.xTCP.pxPeerSocket == NULL ) - { - xParent->u.xTCP.pxPeerSocket = pxSocket; - } - - xParent->xEventBits |= eSOCKET_ACCEPT; - - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - { - /* Library support FreeRTOS_select(). Receiving a new - connection is being translated as a READ event. */ - if( ( xParent->xSelectBits & eSELECT_READ ) != 0 ) - { - xParent->xEventBits |= ( eSELECT_READ << SOCKET_EVENT_BIT_COUNT ); - } - } - #endif - - #if( ipconfigUSE_CALLBACKS == 1 ) - { - if( ( ipconfigIS_VALID_PROG_ADDRESS( xParent->u.xTCP.pxHandleConnected ) != pdFALSE ) && - ( xParent->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) ) - { - /* The listening socket does not become connected itself, in stead - a child socket is created. - Postpone a call the OnConnect event until the end of this function. */ - xConnected = xParent; - } - } - #endif - } - - /* Don't need to access the parent socket anymore, so the - reference 'pxPeerSocket' may be cleared. */ - pxSocket->u.xTCP.pxPeerSocket = NULL; - pxSocket->u.xTCP.bits.bPassQueued = pdFALSE_UNSIGNED; - - /* When true, this socket may be returned in a call to accept(). */ - pxSocket->u.xTCP.bits.bPassAccept = pdTRUE_UNSIGNED; - } - else - { - pxSocket->xEventBits |= eSOCKET_CONNECT; - - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - { - if( pxSocket->xSelectBits & eSELECT_WRITE ) - { - pxSocket->xEventBits |= ( eSELECT_WRITE << SOCKET_EVENT_BIT_COUNT ); - } - } - #endif - } - } - else /* bAfter == pdFALSE, connection is closed. */ - { - /* Notify/wake-up the socket-owner by setting a semaphore. */ - pxSocket->xEventBits |= eSOCKET_CLOSED; - - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - { - if( ( pxSocket->xSelectBits & eSELECT_EXCEPT ) != 0 ) - { - pxSocket->xEventBits |= ( eSELECT_EXCEPT << SOCKET_EVENT_BIT_COUNT ); - } - } - #endif - } - #if( ipconfigUSE_CALLBACKS == 1 ) - { - if( ( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xTCP.pxHandleConnected ) != pdFALSE ) && ( xConnected == NULL ) ) - { - /* The 'connected' state has changed, call the user handler. */ - xConnected = pxSocket; - } - } - #endif /* ipconfigUSE_CALLBACKS */ - - if( prvTCPSocketIsActive( ( UBaseType_t ) pxSocket->u.xTCP.ucTCPState ) == pdFALSE ) - { - /* Now the socket isn't in an active state anymore so it - won't need further attention of the IP-task. - Setting time-out to zero means that the socket won't get checked during - timer events. */ - pxSocket->u.xTCP.usTimeout = 0u; - } - } - else - { - if( eTCPState == eCLOSED ) - { - /* Socket goes to status eCLOSED because of a RST. - When nobody owns the socket yet, delete it. */ - if( ( pxSocket->u.xTCP.bits.bPassQueued != pdFALSE_UNSIGNED ) || - ( pxSocket->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) ) - { - FreeRTOS_debug_printf( ( "vTCPStateChange: Closing socket\n" ) ); - if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) - { - FreeRTOS_closesocket( pxSocket ); - } - } - } - } - - /* Fill in the new state. */ - pxSocket->u.xTCP.ucTCPState = ( uint8_t ) eTCPState; - - /* touch the alive timers because moving to another state. */ - prvTCPTouchSocket( pxSocket ); - - #if( ipconfigHAS_DEBUG_PRINTF == 1 ) - { - if( ( xTCPWindowLoggingLevel >= 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) ) - FreeRTOS_debug_printf( ( "Socket %d -> %lxip:%u State %s->%s\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort, - FreeRTOS_GetTCPStateName( ( UBaseType_t ) xPreviousState ), - FreeRTOS_GetTCPStateName( ( UBaseType_t ) eTCPState ) ) ); - } - #endif /* ipconfigHAS_DEBUG_PRINTF */ - - #if( ipconfigUSE_CALLBACKS == 1 ) - { - if( xConnected != NULL ) - { - /* The 'connected' state has changed, call the OnConnect handler of the parent. */ - xConnected->u.xTCP.pxHandleConnected( ( Socket_t ) xConnected, bAfter ); - } - } - #endif - if( xParent != NULL ) - { - vSocketWakeUpUser( xParent ); - } -} -/*-----------------------------------------------------------*/ - -static NetworkBufferDescriptor_t *prvTCPBufferResize( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, - int32_t lDataLen, UBaseType_t uxOptionsLength ) -{ -NetworkBufferDescriptor_t *pxReturn; -int32_t lNeeded; -BaseType_t xResize; - - if( xBufferAllocFixedSize != pdFALSE ) - { - /* Network buffers are created with a fixed size and can hold the largest - MTU. */ - lNeeded = ( int32_t ) ipTOTAL_ETHERNET_FRAME_SIZE; - /* and therefore, the buffer won't be too small. - Only ask for a new network buffer in case none was supplied. */ - xResize = ( pxNetworkBuffer == NULL ); - } - else - { - /* Network buffers are created with a variable size. See if it must - grow. */ - lNeeded = FreeRTOS_max_int32( ( int32_t ) sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ), - ( int32_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ) + lDataLen ); - /* In case we were called from a TCP timer event, a buffer must be - created. Otherwise, test 'xDataLength' of the provided buffer. */ - xResize = ( pxNetworkBuffer == NULL ) || ( pxNetworkBuffer->xDataLength < (size_t)lNeeded ); - } - - if( xResize != pdFALSE ) - { - /* The caller didn't provide a network buffer or the provided buffer is - too small. As we must send-out a data packet, a buffer will be created - here. */ - pxReturn = pxGetNetworkBufferWithDescriptor( ( uint32_t ) lNeeded, 0u ); - - if( pxReturn != NULL ) - { - /* Set the actual packet size, in case the returned buffer is larger. */ - pxReturn->xDataLength = lNeeded; - - /* Copy the existing data to the new created buffer. */ - if( pxNetworkBuffer ) - { - /* Either from the previous buffer... */ - memcpy( pxReturn->pucEthernetBuffer, pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength ); - - /* ...and release it. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - else - { - /* Or from the socket field 'xTCP.xPacket'. */ - memcpy( pxReturn->pucEthernetBuffer, pxSocket->u.xTCP.xPacket.u.ucLastPacket, sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ) ); - } - } - } - else - { - /* xResize is false, the network buffer provided was big enough. */ - pxReturn = pxNetworkBuffer; - - /* Thanks to Andrey Ivanov from swissEmbedded for reporting that the - xDataLength member must get the correct length too! */ - pxNetworkBuffer->xDataLength = ( size_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ) + ( size_t ) lDataLen; - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ - -/* - * Prepare an outgoing message, in case anything has to be sent. - */ -static int32_t prvTCPPrepareSend( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, UBaseType_t uxOptionsLength ) -{ -int32_t lDataLen; -uint8_t *pucEthernetBuffer, *pucSendData; -TCPPacket_t *pxTCPPacket; -size_t uxOffset; -uint32_t ulDataGot, ulDistance; -TCPWindow_t *pxTCPWindow; -NetworkBufferDescriptor_t *pxNewBuffer; -int32_t lStreamPos; - - if( ( *ppxNetworkBuffer ) != NULL ) - { - /* A network buffer descriptor was already supplied */ - pucEthernetBuffer = ( *ppxNetworkBuffer )->pucEthernetBuffer; - } - else - { - /* For now let it point to the last packet header */ - pucEthernetBuffer = pxSocket->u.xTCP.xPacket.u.ucLastPacket; - } - - pxTCPPacket = ( TCPPacket_t * ) ( pucEthernetBuffer ); - pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; - lDataLen = 0; - lStreamPos = 0; - pxTCPPacket->xTCPHeader.ucTCPFlags |= ipTCP_FLAG_ACK; - - if( pxSocket->u.xTCP.txStream != NULL ) - { - /* ulTCPWindowTxGet will return the amount of data which may be sent - along with the position in the txStream. - Why check for MSS > 1 ? - Because some TCP-stacks (like uIP) use it for flow-control. */ - if( pxSocket->u.xTCP.usCurMSS > 1u ) - { - lDataLen = ( int32_t ) ulTCPWindowTxGet( pxTCPWindow, pxSocket->u.xTCP.ulWindowSize, &lStreamPos ); - } - - if( lDataLen > 0 ) - { - /* Check if the current network buffer is big enough, if not, - resize it. */ - pxNewBuffer = prvTCPBufferResize( pxSocket, *ppxNetworkBuffer, lDataLen, uxOptionsLength ); - - if( pxNewBuffer != NULL ) - { - *ppxNetworkBuffer = pxNewBuffer; - pucEthernetBuffer = pxNewBuffer->pucEthernetBuffer; - pxTCPPacket = ( TCPPacket_t * ) ( pucEthernetBuffer ); - - pucSendData = pucEthernetBuffer + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength; - - /* Translate the position in txStream to an offset from the tail - marker. */ - uxOffset = uxStreamBufferDistance( pxSocket->u.xTCP.txStream, pxSocket->u.xTCP.txStream->uxTail, ( size_t ) lStreamPos ); - - /* Here data is copied from the txStream in 'peek' mode. Only - when the packets are acked, the tail marker will be updated. */ - ulDataGot = ( uint32_t ) uxStreamBufferGet( pxSocket->u.xTCP.txStream, uxOffset, pucSendData, ( size_t ) lDataLen, pdTRUE ); - - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - if( ulDataGot != ( uint32_t ) lDataLen ) - { - FreeRTOS_debug_printf( ( "uxStreamBufferGet: pos %lu offs %lu only %lu != %lu\n", - lStreamPos, uxOffset, ulDataGot, lDataLen ) ); - } - } - #endif - - /* If the owner of the socket requests a closure, add the FIN - flag to the last packet. */ - if( ( pxSocket->u.xTCP.bits.bCloseRequested != pdFALSE_UNSIGNED ) && ( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) ) - { - ulDistance = ( uint32_t ) uxStreamBufferDistance( pxSocket->u.xTCP.txStream, ( size_t ) lStreamPos, pxSocket->u.xTCP.txStream->uxHead ); - - if( ulDistance == ulDataGot ) - { - #if (ipconfigHAS_DEBUG_PRINTF == 1) - { - /* the order of volatile accesses is undefined - so such workaround */ - size_t uxHead = pxSocket->u.xTCP.txStream->uxHead; - size_t uxMid = pxSocket->u.xTCP.txStream->uxMid; - size_t uxTail = pxSocket->u.xTCP.txStream->uxTail; - - FreeRTOS_debug_printf( ( "CheckClose %lu <= %lu (%lu <= %lu <= %lu)\n", ulDataGot, ulDistance, - uxTail, uxMid, uxHead ) ); - } - #endif - /* Although the socket sends a FIN, it will stay in - ESTABLISHED until all current data has been received or - delivered. */ - pxTCPPacket->xTCPHeader.ucTCPFlags |= ipTCP_FLAG_FIN; - pxTCPWindow->tx.ulFINSequenceNumber = pxTCPWindow->ulOurSequenceNumber + ( uint32_t ) lDataLen; - pxSocket->u.xTCP.bits.bFinSent = pdTRUE_UNSIGNED; - } - } - } - else - { - lDataLen = -1; - } - } - } - - if( ( lDataLen >= 0 ) && ( pxSocket->u.xTCP.ucTCPState == eESTABLISHED ) ) - { - /* See if the socket owner wants to shutdown this connection. */ - if( ( pxSocket->u.xTCP.bits.bUserShutdown != pdFALSE_UNSIGNED ) && - ( xTCPWindowTxDone( pxTCPWindow ) != pdFALSE ) ) - { - pxSocket->u.xTCP.bits.bUserShutdown = pdFALSE_UNSIGNED; - pxTCPPacket->xTCPHeader.ucTCPFlags |= ipTCP_FLAG_FIN; - pxSocket->u.xTCP.bits.bFinSent = pdTRUE_UNSIGNED; - pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; - pxTCPWindow->tx.ulFINSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; - vTCPStateChange( pxSocket, eFIN_WAIT_1 ); - } - - #if( ipconfigTCP_KEEP_ALIVE != 0 ) - { - if( pxSocket->u.xTCP.ucKeepRepCount > 3u ) - { - FreeRTOS_debug_printf( ( "keep-alive: giving up %lxip:%u\n", - pxSocket->u.xTCP.ulRemoteIP, /* IP address of remote machine. */ - pxSocket->u.xTCP.usRemotePort ) ); /* Port on remote machine. */ - vTCPStateChange( pxSocket, eCLOSE_WAIT ); - lDataLen = -1; - } - if( ( lDataLen == 0 ) && ( pxSocket->u.xTCP.bits.bWinChange == pdFALSE_UNSIGNED ) ) - { - /* If there is no data to be sent, and no window-update message, - we might want to send a keep-alive message. */ - TickType_t xAge = xTaskGetTickCount( ) - pxSocket->u.xTCP.xLastAliveTime; - TickType_t xMax; - xMax = ( ( TickType_t ) ipconfigTCP_KEEP_ALIVE_INTERVAL * configTICK_RATE_HZ ); - if( pxSocket->u.xTCP.ucKeepRepCount ) - { - xMax = ( 3u * configTICK_RATE_HZ ); - } - if( xAge > xMax ) - { - pxSocket->u.xTCP.xLastAliveTime = xTaskGetTickCount( ); - if( xTCPWindowLoggingLevel ) - FreeRTOS_debug_printf( ( "keep-alive: %lxip:%u count %u\n", - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort, - pxSocket->u.xTCP.ucKeepRepCount ) ); - pxSocket->u.xTCP.bits.bSendKeepAlive = pdTRUE_UNSIGNED; - pxSocket->u.xTCP.usTimeout = ( ( uint16_t ) pdMS_TO_TICKS( 2500 ) ); - pxSocket->u.xTCP.ucKeepRepCount++; - } - } - } - #endif /* ipconfigTCP_KEEP_ALIVE */ - } - - /* Anything to send, a change of the advertised window size, or maybe send a - keep-alive message? */ - if( ( lDataLen > 0 ) || - ( pxSocket->u.xTCP.bits.bWinChange != pdFALSE_UNSIGNED ) || - ( pxSocket->u.xTCP.bits.bSendKeepAlive != pdFALSE_UNSIGNED ) ) - { - pxTCPPacket->xTCPHeader.ucTCPFlags &= ( ( uint8_t ) ~ipTCP_FLAG_PSH ); - pxTCPPacket->xTCPHeader.ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - - pxTCPPacket->xTCPHeader.ucTCPFlags |= ( uint8_t ) ipTCP_FLAG_ACK; - - if( lDataLen != 0l ) - { - pxTCPPacket->xTCPHeader.ucTCPFlags |= ( uint8_t ) ipTCP_FLAG_PSH; - } - - lDataLen += ( int32_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); - } - - return lDataLen; -} -/*-----------------------------------------------------------*/ - -/* - * Calculate after how much time this socket needs to be checked again. - */ -static TickType_t prvTCPNextTimeout ( FreeRTOS_Socket_t *pxSocket ) -{ -TickType_t ulDelayMs = ( TickType_t ) tcpMAXIMUM_TCP_WAKEUP_TIME_MS; - - if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) - { - /* The socket is actively connecting to a peer. */ - if( pxSocket->u.xTCP.bits.bConnPrepared ) - { - /* Ethernet address has been found, use progressive timeout for - active connect(). */ - if( pxSocket->u.xTCP.ucRepCount < 3u ) - { - ulDelayMs = ( 3000UL << ( pxSocket->u.xTCP.ucRepCount - 1u ) ); - } - else - { - ulDelayMs = 11000UL; - } - } - else - { - /* Still in the ARP phase: check every half second. */ - ulDelayMs = 500UL; - } - - FreeRTOS_debug_printf( ( "Connect[%lxip:%u]: next timeout %u: %lu ms\n", - pxSocket->u.xTCP.ulRemoteIP, pxSocket->u.xTCP.usRemotePort, - pxSocket->u.xTCP.ucRepCount, ulDelayMs ) ); - pxSocket->u.xTCP.usTimeout = ( uint16_t )pdMS_TO_MIN_TICKS( ulDelayMs ); - } - else if( pxSocket->u.xTCP.usTimeout == 0u ) - { - /* Let the sliding window mechanism decide what time-out is appropriate. */ - BaseType_t xResult = xTCPWindowTxHasData( &pxSocket->u.xTCP.xTCPWindow, pxSocket->u.xTCP.ulWindowSize, &ulDelayMs ); - if( ulDelayMs == 0u ) - { - if( xResult != ( BaseType_t )0 ) - { - ulDelayMs = 1UL; - } - else - { - ulDelayMs = tcpMAXIMUM_TCP_WAKEUP_TIME_MS; - } - } - else - { - /* ulDelayMs contains the time to wait before a re-transmission. */ - } - pxSocket->u.xTCP.usTimeout = ( uint16_t )pdMS_TO_MIN_TICKS( ulDelayMs ); - } - else - { - /* field '.usTimeout' has already been set (by the - keep-alive/delayed-ACK mechanism). */ - } - - /* Return the number of clock ticks before the timer expires. */ - return ( TickType_t ) pxSocket->u.xTCP.usTimeout; -} -/*-----------------------------------------------------------*/ - -static void prvTCPAddTxData( FreeRTOS_Socket_t *pxSocket ) -{ -int32_t lCount, lLength; - - /* A txStream has been created already, see if the socket has new data for - the sliding window. - - uxStreamBufferMidSpace() returns the distance between rxHead and rxMid. It contains new - Tx data which has not been passed to the sliding window yet. The oldest - data not-yet-confirmed can be found at rxTail. */ - lLength = ( int32_t ) uxStreamBufferMidSpace( pxSocket->u.xTCP.txStream ); - - if( lLength > 0 ) - { - /* All data between txMid and rxHead will now be passed to the sliding - window manager, so it can start transmitting them. - - Hand over the new data to the sliding window handler. It will be - split-up in chunks of 1460 bytes each (or less, depending on - ipconfigTCP_MSS). */ - lCount = lTCPWindowTxAdd( &pxSocket->u.xTCP.xTCPWindow, - ( uint32_t ) lLength, - ( int32_t ) pxSocket->u.xTCP.txStream->uxMid, - ( int32_t ) pxSocket->u.xTCP.txStream->LENGTH ); - - /* Move the rxMid pointer forward up to rxHead. */ - if( lCount > 0 ) - { - vStreamBufferMoveMid( pxSocket->u.xTCP.txStream, ( size_t ) lCount ); - } - } -} -/*-----------------------------------------------------------*/ - -/* - * prvTCPHandleFin() will be called to handle socket closure - * The Closure starts when either a FIN has been received and accepted, - * Or when the socket has sent a FIN flag to the peer - * Before being called, it has been checked that both reception and transmission - * are complete. - */ -static BaseType_t prvTCPHandleFin( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; -uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; -TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; -BaseType_t xSendLength = 0; -uint32_t ulAckNr = FreeRTOS_ntohl( pxTCPHeader->ulAckNr ); - - if( ( ucTCPFlags & ipTCP_FLAG_FIN ) != 0u ) - { - pxTCPWindow->rx.ulCurrentSequenceNumber = pxTCPWindow->rx.ulFINSequenceNumber + 1u; - } - if( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) - { - /* We haven't yet replied with a FIN, do so now. */ - pxTCPWindow->tx.ulFINSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; - pxSocket->u.xTCP.bits.bFinSent = pdTRUE_UNSIGNED; - } - else - { - /* We did send a FIN already, see if it's ACK'd. */ - if( ulAckNr == pxTCPWindow->tx.ulFINSequenceNumber + 1u ) - { - pxSocket->u.xTCP.bits.bFinAcked = pdTRUE_UNSIGNED; - } - } - - if( pxSocket->u.xTCP.bits.bFinAcked == pdFALSE_UNSIGNED ) - { - pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->tx.ulFINSequenceNumber; - pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK | ipTCP_FLAG_FIN; - - /* And wait for the final ACK. */ - vTCPStateChange( pxSocket, eLAST_ACK ); - } - else - { - /* Our FIN has been ACK'd, the outgoing sequence number is now fixed. */ - pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->tx.ulFINSequenceNumber + 1u; - if( pxSocket->u.xTCP.bits.bFinRecv == pdFALSE_UNSIGNED ) - { - /* We have sent out a FIN but the peer hasn't replied with a FIN - yet. Do nothing for the moment. */ - pxTCPHeader->ucTCPFlags = 0u; - } - else - { - if( pxSocket->u.xTCP.bits.bFinLast == pdFALSE_UNSIGNED ) - { - /* This is the third of the three-way hand shake: the last - ACK. */ - pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK; - } - else - { - /* The other party started the closure, so we just wait for the - last ACK. */ - pxTCPHeader->ucTCPFlags = 0u; - } - - /* And wait for the user to close this socket. */ - vTCPStateChange( pxSocket, eCLOSE_WAIT ); - } - } - - pxTCPWindow->ulOurSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; - - if( pxTCPHeader->ucTCPFlags != 0u ) - { - xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + pxTCPWindow->ucOptionLength ); - } - - pxTCPHeader->ucTCPOffset = ( uint8_t ) ( ( ipSIZE_OF_TCP_HEADER + pxTCPWindow->ucOptionLength ) << 2 ); - - if( xTCPWindowLoggingLevel != 0 ) - { - FreeRTOS_debug_printf( ( "TCP: send FIN+ACK (ack %lu, cur/nxt %lu/%lu) ourSeqNr %lu | Rx %lu\n", - ulAckNr - pxTCPWindow->tx.ulFirstSequenceNumber, - pxTCPWindow->tx.ulCurrentSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, - pxTCPWindow->ulNextTxSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, - pxTCPWindow->ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, - pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber ) ); - } - - return xSendLength; -} -/*-----------------------------------------------------------*/ - -/* - * prvCheckRxData(): called from prvTCPHandleState() - * - * The first thing that will be done is find the TCP payload data - * and check the length of this data. - */ -static BaseType_t prvCheckRxData( NetworkBufferDescriptor_t *pxNetworkBuffer, uint8_t **ppucRecvData ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &( pxTCPPacket->xTCPHeader ); -int32_t lLength, lTCPHeaderLength, lReceiveLength, lUrgentLength; - - /* Determine the length and the offset of the user-data sent to this - node. - - The size of the TCP header is given in a multiple of 4-byte words (single - byte, needs no ntoh() translation). A shift-right 2: is the same as - (offset >> 4) * 4. */ - lTCPHeaderLength = ( BaseType_t ) ( ( pxTCPHeader->ucTCPOffset & VALID_BITS_IN_TCP_OFFSET_BYTE ) >> 2 ); - - /* Let pucRecvData point to the first byte received. */ - *ppucRecvData = pxNetworkBuffer->pucEthernetBuffer + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + lTCPHeaderLength; - - /* Calculate lReceiveLength - the length of the TCP data received. This is - equal to the total packet length minus: - ( LinkLayer length (14) + IP header length (20) + size of TCP header(20 +) ).*/ - lReceiveLength = ( ( int32_t ) pxNetworkBuffer->xDataLength ) - ( int32_t ) ipSIZE_OF_ETH_HEADER; - lLength = ( int32_t )FreeRTOS_htons( pxTCPPacket->xIPHeader.usLength ); - - if( lReceiveLength > lLength ) - { - /* More bytes were received than the reported length, often because of - padding bytes at the end. */ - lReceiveLength = lLength; - } - - /* Subtract the size of the TCP and IP headers and the actual data size is - known. */ - if( lReceiveLength > ( lTCPHeaderLength + ( int32_t ) ipSIZE_OF_IPv4_HEADER ) ) - { - lReceiveLength -= ( lTCPHeaderLength + ( int32_t ) ipSIZE_OF_IPv4_HEADER ); - } - else - { - lReceiveLength = 0; - } - - /* Urgent Pointer: - This field communicates the current value of the urgent pointer as a - positive offset from the sequence number in this segment. The urgent - pointer points to the sequence number of the octet following the urgent - data. This field is only be interpreted in segments with the URG control - bit set. */ - if( ( pxTCPHeader->ucTCPFlags & ipTCP_FLAG_URG ) != 0u ) - { - /* Although we ignore the urgent data, we have to skip it. */ - lUrgentLength = ( int32_t ) FreeRTOS_htons( pxTCPHeader->usUrgent ); - *ppucRecvData += lUrgentLength; - lReceiveLength -= FreeRTOS_min_int32( lReceiveLength, lUrgentLength ); - } - - return ( BaseType_t ) lReceiveLength; -} -/*-----------------------------------------------------------*/ - -/* - * prvStoreRxData(): called from prvTCPHandleState() - * - * The second thing is to do is check if the payload data may be accepted - * If so, they will be added to the reception queue. - */ -static BaseType_t prvStoreRxData( FreeRTOS_Socket_t *pxSocket, uint8_t *pucRecvData, - NetworkBufferDescriptor_t *pxNetworkBuffer, uint32_t ulReceiveLength ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; -TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; -uint32_t ulSequenceNumber, ulSpace; -int32_t lOffset, lStored; -BaseType_t xResult = 0; - - ulSequenceNumber = FreeRTOS_ntohl( pxTCPHeader->ulSequenceNumber ); - - if( ( ulReceiveLength > 0u ) && ( pxSocket->u.xTCP.ucTCPState >= eSYN_RECEIVED ) ) - { - /* See if way may accept the data contents and forward it to the socket - owner. - - If it can't be "accept"ed it may have to be stored and send a selective - ack (SACK) option to confirm it. In that case, xTCPWindowRxStore() will be - called later to store an out-of-order packet (in case lOffset is - negative). */ - if ( pxSocket->u.xTCP.rxStream ) - { - ulSpace = ( uint32_t )uxStreamBufferGetSpace ( pxSocket->u.xTCP.rxStream ); - } - else - { - ulSpace = ( uint32_t )pxSocket->u.xTCP.uxRxStreamSize; - } - - lOffset = lTCPWindowRxCheck( pxTCPWindow, ulSequenceNumber, ulReceiveLength, ulSpace ); - - if( lOffset >= 0 ) - { - /* New data has arrived and may be made available to the user. See - if the head marker in rxStream may be advanced, only if lOffset == 0. - In case the low-water mark is reached, bLowWater will be set - "low-water" here stands for "little space". */ - lStored = lTCPAddRxdata( pxSocket, ( uint32_t ) lOffset, pucRecvData, ulReceiveLength ); - - if( lStored != ( int32_t ) ulReceiveLength ) - { - FreeRTOS_debug_printf( ( "lTCPAddRxdata: stored %ld / %lu bytes??\n", lStored, ulReceiveLength ) ); - - /* Received data could not be stored. The socket's flag - bMallocError has been set. The socket now has the status - eCLOSE_WAIT and a RST packet will be sent back. */ - prvTCPSendReset( pxNetworkBuffer ); - xResult = -1; - } - } - - /* After a missing packet has come in, higher packets may be passed to - the user. */ - #if( ipconfigUSE_TCP_WIN == 1 ) - { - /* Now lTCPAddRxdata() will move the rxHead pointer forward - so data becomes available to the user immediately - In case the low-water mark is reached, bLowWater will be set. */ - if( ( xResult == 0 ) && ( pxTCPWindow->ulUserDataLength > 0 ) ) - { - lTCPAddRxdata( pxSocket, 0ul, NULL, pxTCPWindow->ulUserDataLength ); - pxTCPWindow->ulUserDataLength = 0; - } - } - #endif /* ipconfigUSE_TCP_WIN */ - } - else - { - pxTCPWindow->ucOptionLength = 0u; - } - - return xResult; -} -/*-----------------------------------------------------------*/ - -/* Set the TCP options (if any) for the outgoing packet. */ -static UBaseType_t prvSetOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; -TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; -UBaseType_t uxOptionsLength = pxTCPWindow->ucOptionLength; - - #if( ipconfigUSE_TCP_WIN == 1 ) - if( uxOptionsLength != 0u ) - { - /* TCP options must be sent because a packet which is out-of-order - was received. */ - if( xTCPWindowLoggingLevel >= 0 ) - FreeRTOS_debug_printf( ( "SACK[%d,%d]: optlen %lu sending %lu - %lu\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.usRemotePort, - uxOptionsLength, - FreeRTOS_ntohl( pxTCPWindow->ulOptionsData[ 1 ] ) - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber, - FreeRTOS_ntohl( pxTCPWindow->ulOptionsData[ 2 ] ) - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber ) ); - memcpy( pxTCPHeader->ucOptdata, pxTCPWindow->ulOptionsData, ( size_t ) uxOptionsLength ); - - /* The header length divided by 4, goes into the higher nibble, - effectively a shift-left 2. */ - pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - } - else - #endif /* ipconfigUSE_TCP_WIN */ - if( ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && ( pxSocket->u.xTCP.bits.bMssChange != pdFALSE_UNSIGNED ) ) - { - /* TCP options must be sent because the MSS has changed. */ - pxSocket->u.xTCP.bits.bMssChange = pdFALSE_UNSIGNED; - if( xTCPWindowLoggingLevel >= 0 ) - { - FreeRTOS_debug_printf( ( "MSS: sending %d\n", pxSocket->u.xTCP.usCurMSS ) ); - } - - pxTCPHeader->ucOptdata[ 0 ] = TCP_OPT_MSS; - pxTCPHeader->ucOptdata[ 1 ] = TCP_OPT_MSS_LEN; - pxTCPHeader->ucOptdata[ 2 ] = ( uint8_t ) ( ( pxSocket->u.xTCP.usCurMSS ) >> 8 ); - pxTCPHeader->ucOptdata[ 3 ] = ( uint8_t ) ( ( pxSocket->u.xTCP.usCurMSS ) & 0xffu ); - uxOptionsLength = 4u; - pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - } - - return uxOptionsLength; -} -/*-----------------------------------------------------------*/ - -/* - * prvHandleSynReceived(): called from prvTCPHandleState() - * - * Called from the states: eSYN_RECEIVED and eCONNECT_SYN - * If the flags received are correct, the socket will move to eESTABLISHED. - */ -static BaseType_t prvHandleSynReceived( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, - uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; -TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; -uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; -uint32_t ulSequenceNumber = FreeRTOS_ntohl( pxTCPHeader->ulSequenceNumber ); -BaseType_t xSendLength = 0; - - /* Either expect a ACK or a SYN+ACK. */ - uint16_t usExpect = ( uint16_t ) ipTCP_FLAG_ACK; - if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) - { - usExpect |= ( uint16_t ) ipTCP_FLAG_SYN; - } - - if( ( ucTCPFlags & 0x17u ) != usExpect ) - { - /* eSYN_RECEIVED: flags 0010 expected, not 0002. */ - /* eSYN_RECEIVED: flags ACK expected, not SYN. */ - FreeRTOS_debug_printf( ( "%s: flags %04X expected, not %04X\n", - pxSocket->u.xTCP.ucTCPState == eSYN_RECEIVED ? "eSYN_RECEIVED" : "eCONNECT_SYN", - usExpect, ucTCPFlags ) ); - vTCPStateChange( pxSocket, eCLOSE_WAIT ); - pxTCPHeader->ucTCPFlags |= ipTCP_FLAG_RST; - xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); - pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - } - else - { - pxTCPWindow->usPeerPortNumber = pxSocket->u.xTCP.usRemotePort; - pxTCPWindow->usOurPortNumber = pxSocket->usLocalPort; - - if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) - { - TCPPacket_t *pxLastTCPPacket = ( TCPPacket_t * ) ( pxSocket->u.xTCP.xPacket.u.ucLastPacket ); - - /* Clear the SYN flag in lastPacket. */ - pxLastTCPPacket->xTCPHeader.ucTCPFlags = ipTCP_FLAG_ACK; - - /* This socket was the one connecting actively so now perofmr the - synchronisation. */ - vTCPWindowInit( &pxSocket->u.xTCP.xTCPWindow, - ulSequenceNumber, pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber, ( uint32_t ) pxSocket->u.xTCP.usCurMSS ); - pxTCPWindow->rx.ulCurrentSequenceNumber = pxTCPWindow->rx.ulHighestSequenceNumber = ulSequenceNumber + 1u; - pxTCPWindow->tx.ulCurrentSequenceNumber++; /* because we send a TCP_SYN [ | TCP_ACK ]; */ - pxTCPWindow->ulNextTxSequenceNumber++; - } - else if( ulReceiveLength == 0u ) - { - pxTCPWindow->rx.ulCurrentSequenceNumber = ulSequenceNumber; - } - - /* The SYN+ACK has been confirmed, increase the next sequence number by - 1. */ - pxTCPWindow->ulOurSequenceNumber = pxTCPWindow->tx.ulFirstSequenceNumber + 1u; - - #if( ipconfigUSE_TCP_WIN == 1 ) - { - FreeRTOS_debug_printf( ( "TCP: %s %d => %lxip:%d set ESTAB (scaling %u)\n", - pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ? "active" : "passive", - pxSocket->usLocalPort, - pxSocket->u.xTCP.ulRemoteIP, - pxSocket->u.xTCP.usRemotePort, - ( unsigned ) pxSocket->u.xTCP.bits.bWinScaling ) ); - } - #endif /* ipconfigUSE_TCP_WIN */ - - if( ( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) || ( ulReceiveLength != 0u ) ) - { - pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK; - xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); - pxTCPHeader->ucTCPOffset = ( uint8_t ) ( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - } - #if( ipconfigUSE_TCP_WIN != 0 ) - { - if( pxSocket->u.xTCP.bits.bWinScaling == pdFALSE_UNSIGNED ) - { - /* The other party did not send a scaling factor. - A shifting factor in this side must be canceled. */ - pxSocket->u.xTCP.ucMyWinScaleFactor = 0; - pxSocket->u.xTCP.ucPeerWinScaleFactor = 0; - } - } - #endif /* ipconfigUSE_TCP_WIN */ - /* This was the third step of connecting: SYN, SYN+ACK, ACK so now the - connection is established. */ - vTCPStateChange( pxSocket, eESTABLISHED ); - } - - return xSendLength; -} -/*-----------------------------------------------------------*/ - -/* - * prvHandleEstablished(): called from prvTCPHandleState() - * - * Called if the status is eESTABLISHED. Data reception has been handled - * earlier. Here the ACK's from peer will be checked, and if a FIN is received, - * the code will check if it may be accepted, i.e. if all expected data has been - * completely received. - */ -static BaseType_t prvHandleEstablished( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, - uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; -TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; -uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; -uint32_t ulSequenceNumber = FreeRTOS_ntohl( pxTCPHeader->ulSequenceNumber ), ulCount; -BaseType_t xSendLength = 0, xMayClose = pdFALSE, bRxComplete, bTxDone; -int32_t lDistance, lSendResult; - - /* Remember the window size the peer is advertising. */ - pxSocket->u.xTCP.ulWindowSize = FreeRTOS_ntohs( pxTCPHeader->usWindow ); - #if( ipconfigUSE_TCP_WIN != 0 ) - { - pxSocket->u.xTCP.ulWindowSize = - ( pxSocket->u.xTCP.ulWindowSize << pxSocket->u.xTCP.ucPeerWinScaleFactor ); - } - #endif - - if( ( ucTCPFlags & ( uint8_t ) ipTCP_FLAG_ACK ) != 0u ) - { - ulCount = ulTCPWindowTxAck( pxTCPWindow, FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulAckNr ) ); - - /* ulTCPWindowTxAck() returns the number of bytes which have been acked, - starting at 'tx.ulCurrentSequenceNumber'. Advance the tail pointer in - txStream. */ - if( ( pxSocket->u.xTCP.txStream != NULL ) && ( ulCount > 0u ) ) - { - /* Just advancing the tail index, 'ulCount' bytes have been - confirmed, and because there is new space in the txStream, the - user/owner should be woken up. */ - /* _HT_ : only in case the socket's waiting? */ - if( uxStreamBufferGet( pxSocket->u.xTCP.txStream, 0u, NULL, ( size_t ) ulCount, pdFALSE ) != 0u ) - { - pxSocket->xEventBits |= eSOCKET_SEND; - - #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - { - if( ( pxSocket->xSelectBits & eSELECT_WRITE ) != 0 ) - { - pxSocket->xEventBits |= ( eSELECT_WRITE << SOCKET_EVENT_BIT_COUNT ); - } - } - #endif - /* In case the socket owner has installed an OnSent handler, - call it now. */ - #if( ipconfigUSE_CALLBACKS == 1 ) - { - if( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xTCP.pxHandleSent ) ) - { - pxSocket->u.xTCP.pxHandleSent( ( Socket_t )pxSocket, ulCount ); - } - } - #endif /* ipconfigUSE_CALLBACKS == 1 */ - } - } - } - - /* If this socket has a stream for transmission, add the data to the - outgoing segment(s). */ - if( pxSocket->u.xTCP.txStream != NULL ) - { - prvTCPAddTxData( pxSocket ); - } - - pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; - - if( ( pxSocket->u.xTCP.bits.bFinAccepted != pdFALSE_UNSIGNED ) || ( ( ucTCPFlags & ( uint8_t ) ipTCP_FLAG_FIN ) != 0u ) ) - { - /* Peer is requesting to stop, see if we're really finished. */ - xMayClose = pdTRUE; - - /* Checks are only necessary if we haven't sent a FIN yet. */ - if( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) - { - /* xTCPWindowTxDone returns true when all Tx queues are empty. */ - bRxComplete = xTCPWindowRxEmpty( pxTCPWindow ); - bTxDone = xTCPWindowTxDone( pxTCPWindow ); - - if( ( bRxComplete == 0 ) || ( bTxDone == 0 ) ) - { - /* Refusing FIN: Rx incomp 1 optlen 4 tx done 1. */ - FreeRTOS_debug_printf( ( "Refusing FIN[%u,%u]: RxCompl %lu tx done %ld\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.usRemotePort, - bRxComplete, bTxDone ) ); - xMayClose = pdFALSE; - } - else - { - lDistance = ( int32_t ) ( ulSequenceNumber + ulReceiveLength - pxTCPWindow->rx.ulCurrentSequenceNumber ); - - if( lDistance > 1 ) - { - FreeRTOS_debug_printf( ( "Refusing FIN: Rx not complete %ld (cur %lu high %lu)\n", - lDistance, pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber, - pxTCPWindow->rx.ulHighestSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber ) ); - - xMayClose = pdFALSE; - } - } - } - - if( xTCPWindowLoggingLevel > 0 ) - { - FreeRTOS_debug_printf( ( "TCP: FIN received, mayClose = %ld (Rx %lu Len %ld, Tx %lu)\n", - xMayClose, ulSequenceNumber - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber, ulReceiveLength, - pxTCPWindow->tx.ulCurrentSequenceNumber - pxSocket->u.xTCP.xTCPWindow.tx.ulFirstSequenceNumber ) ); - } - - if( xMayClose != pdFALSE ) - { - pxSocket->u.xTCP.bits.bFinAccepted = pdTRUE_UNSIGNED; - xSendLength = prvTCPHandleFin( pxSocket, *ppxNetworkBuffer ); - } - } - - if( xMayClose == pdFALSE ) - { - pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK; - - if( ulReceiveLength != 0u ) - { - xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); - /* TCP-offsett equals '( ( length / 4 ) << 4 )', resulting in a shift-left 2 */ - pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - - if( pxSocket->u.xTCP.bits.bFinSent != pdFALSE_UNSIGNED ) - { - pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->tx.ulFINSequenceNumber; - } - } - - /* Now get data to be transmitted. */ - /* _HT_ patch: since the MTU has be fixed at 1500 in stead of 1526, TCP - can not send-out both TCP options and also a full packet. Sending - options (SACK) is always more urgent than sending data, which can be - sent later. */ - if( uxOptionsLength == 0u ) - { - /* prvTCPPrepareSend might allocate a bigger network buffer, if - necessary. */ - lSendResult = prvTCPPrepareSend( pxSocket, ppxNetworkBuffer, uxOptionsLength ); - if( lSendResult > 0 ) - { - xSendLength = ( BaseType_t ) lSendResult; - } - } - } - - return xSendLength; -} -/*-----------------------------------------------------------*/ - -/* - * Called from prvTCPHandleState(). There is data to be sent. If - * ipconfigUSE_TCP_WIN is defined, and if only an ACK must be sent, it will be - * checked if it would better be postponed for efficiency. - */ -static BaseType_t prvSendData( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, - uint32_t ulReceiveLength, BaseType_t xSendLength ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; -TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; -/* Find out what window size we may advertised. */ -int32_t lRxSpace; -#if( ipconfigUSE_TCP_WIN == 1 ) - #if( ipconfigTCP_ACK_EARLIER_PACKET == 0 ) - const int32_t lMinLength = 0; - #else - int32_t lMinLength; - #endif -#endif - - /* Set the time-out field, so that we'll be called by the IP-task in case no - next message will be received. */ - lRxSpace = (int32_t)( pxSocket->u.xTCP.ulHighestRxAllowed - pxTCPWindow->rx.ulCurrentSequenceNumber ); - #if ipconfigUSE_TCP_WIN == 1 - { - - #if( ipconfigTCP_ACK_EARLIER_PACKET != 0 ) - { - lMinLength = ( ( int32_t ) 2 ) * ( ( int32_t ) pxSocket->u.xTCP.usCurMSS ); - } - #endif /* ipconfigTCP_ACK_EARLIER_PACKET */ - - /* In case we're receiving data continuously, we might postpone sending - an ACK to gain performance. */ - if( ( ulReceiveLength > 0 ) && /* Data was sent to this socket. */ - ( lRxSpace >= lMinLength ) && /* There is Rx space for more data. */ - ( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) && /* Not in a closure phase. */ - ( xSendLength == ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) ) && /* No Tx data or options to be sent. */ - ( pxSocket->u.xTCP.ucTCPState == eESTABLISHED ) && /* Connection established. */ - ( pxTCPHeader->ucTCPFlags == ipTCP_FLAG_ACK ) ) /* There are no other flags than an ACK. */ - { - if( pxSocket->u.xTCP.pxAckMessage != *ppxNetworkBuffer ) - { - /* There was still a delayed in queue, delete it. */ - if( pxSocket->u.xTCP.pxAckMessage != 0 ) - { - vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); - } - - pxSocket->u.xTCP.pxAckMessage = *ppxNetworkBuffer; - } - if( ( ulReceiveLength < ( uint32_t ) pxSocket->u.xTCP.usCurMSS ) || /* Received a small message. */ - ( lRxSpace < ( int32_t ) ( 2U * pxSocket->u.xTCP.usCurMSS ) ) ) /* There are less than 2 x MSS space in the Rx buffer. */ - { - pxSocket->u.xTCP.usTimeout = ( uint16_t ) pdMS_TO_MIN_TICKS( DELAYED_ACK_SHORT_DELAY_MS ); - } - else - { - /* Normally a delayed ACK should wait 200 ms for a next incoming - packet. Only wait 20 ms here to gain performance. A slow ACK - for full-size message. */ - pxSocket->u.xTCP.usTimeout = ( uint16_t ) pdMS_TO_MIN_TICKS( DELAYED_ACK_LONGER_DELAY_MS ); - } - - if( ( xTCPWindowLoggingLevel > 1 ) && ( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "Send[%u->%u] del ACK %lu SEQ %lu (len %lu) tmout %u d %lu\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.usRemotePort, - pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber, - pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, - xSendLength, - pxSocket->u.xTCP.usTimeout, lRxSpace ) ); - } - - *ppxNetworkBuffer = NULL; - xSendLength = 0; - } - else if( pxSocket->u.xTCP.pxAckMessage != NULL ) - { - /* As an ACK is not being delayed, remove any earlier delayed ACK - message. */ - if( pxSocket->u.xTCP.pxAckMessage != *ppxNetworkBuffer ) - { - vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); - } - - pxSocket->u.xTCP.pxAckMessage = NULL; - } - } - #else - { - /* Remove compiler warnings. */ - ( void ) ulReceiveLength; - ( void ) pxTCPHeader; - ( void ) lRxSpace; - } - #endif /* ipconfigUSE_TCP_WIN */ - - if( xSendLength != 0 ) - { - if( ( xTCPWindowLoggingLevel > 1 ) && ( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "Send[%u->%u] imm ACK %lu SEQ %lu (len %lu)\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.usRemotePort, - pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber, - pxTCPWindow->ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, - xSendLength ) ); - } - - /* Set the parameter 'xReleaseAfterSend' to the value of - ipconfigZERO_COPY_TX_DRIVER. */ - prvTCPReturnPacket( pxSocket, *ppxNetworkBuffer, ( uint32_t ) xSendLength, ipconfigZERO_COPY_TX_DRIVER ); - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* The driver has taken ownership of the Network Buffer. */ - *ppxNetworkBuffer = NULL; - } - #endif - } - - return xSendLength; -} -/*-----------------------------------------------------------*/ - -/* - * prvTCPHandleState() - * is the most important function of this TCP stack - * We've tried to keep it (relatively short) by putting a lot of code in - * the static functions above: - * - * prvCheckRxData() - * prvStoreRxData() - * prvSetOptions() - * prvHandleSynReceived() - * prvHandleEstablished() - * prvSendData() - * - * As these functions are declared static, and they're called from one location - * only, most compilers will inline them, thus avoiding a call and return. - */ -static BaseType_t prvTCPHandleState( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ) -{ -TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); -TCPHeader_t *pxTCPHeader = &( pxTCPPacket->xTCPHeader ); -BaseType_t xSendLength = 0; -uint32_t ulReceiveLength; /* Number of bytes contained in the TCP message. */ -uint8_t *pucRecvData; -uint32_t ulSequenceNumber = FreeRTOS_ntohl (pxTCPHeader->ulSequenceNumber); - - /* uxOptionsLength: the size of the options to be sent (always a multiple of - 4 bytes) - 1. in the SYN phase, we shall communicate the MSS - 2. in case of a SACK, Selective ACK, ack a segment which comes in - out-of-order. */ -UBaseType_t uxOptionsLength = 0u; -uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; -TCPWindow_t *pxTCPWindow = &( pxSocket->u.xTCP.xTCPWindow ); - - /* First get the length and the position of the received data, if any. - pucRecvData will point to the first byte of the TCP payload. */ - ulReceiveLength = ( uint32_t ) prvCheckRxData( *ppxNetworkBuffer, &pucRecvData ); - - if( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) - { - if ( pxTCPWindow->rx.ulCurrentSequenceNumber == ulSequenceNumber + 1u ) - { - /* This is most probably a keep-alive message from peer. Setting - 'bWinChange' doesn't cause a window-size-change, the flag is used - here to force sending an immediate ACK. */ - pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; - } - } - - /* Keep track of the highest sequence number that might be expected within - this connection. */ - if( ( ( int32_t ) ( ulSequenceNumber + ulReceiveLength - pxTCPWindow->rx.ulHighestSequenceNumber ) ) > 0 ) - { - pxTCPWindow->rx.ulHighestSequenceNumber = ulSequenceNumber + ulReceiveLength; - } - - /* Storing data may result in a fatal error if malloc() fails. */ - if( prvStoreRxData( pxSocket, pucRecvData, *ppxNetworkBuffer, ulReceiveLength ) < 0 ) - { - xSendLength = -1; - } - else - { - uxOptionsLength = prvSetOptions( pxSocket, *ppxNetworkBuffer ); - - if( ( pxSocket->u.xTCP.ucTCPState == eSYN_RECEIVED ) && ( ( ucTCPFlags & ipTCP_FLAG_CTRL ) == ipTCP_FLAG_SYN ) ) - { - FreeRTOS_debug_printf( ( "eSYN_RECEIVED: ACK expected, not SYN: peer missed our SYN+ACK\n" ) ); - - /* In eSYN_RECEIVED a simple ACK is expected, but apparently the - 'SYN+ACK' didn't arrive. Step back to the previous state in which - a first incoming SYN is handled. The SYN was counted already so - decrease it first. */ - vTCPStateChange( pxSocket, eSYN_FIRST ); - } - - if( ( ( ucTCPFlags & ipTCP_FLAG_FIN ) != 0u ) && ( pxSocket->u.xTCP.bits.bFinRecv == pdFALSE_UNSIGNED ) ) - { - /* It's the first time a FIN has been received, remember its - sequence number. */ - pxTCPWindow->rx.ulFINSequenceNumber = ulSequenceNumber + ulReceiveLength; - pxSocket->u.xTCP.bits.bFinRecv = pdTRUE_UNSIGNED; - - /* Was peer the first one to send a FIN? */ - if( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) - { - /* If so, don't send the-last-ACK. */ - pxSocket->u.xTCP.bits.bFinLast = pdTRUE_UNSIGNED; - } - } - - switch (pxSocket->u.xTCP.ucTCPState) - { - case eCLOSED: /* (server + client) no connection state at all. */ - /* Nothing to do for a closed socket, except waiting for the - owner. */ - break; - - case eTCP_LISTEN: /* (server) waiting for a connection request from - any remote TCP and port. */ - /* The listen state was handled in xProcessReceivedTCPPacket(). - Should not come here. */ - break; - - case eSYN_FIRST: /* (server) Just received a SYN request for a server - socket. */ - { - /* A new socket has been created, reply with a SYN+ACK. - Acknowledge with seq+1 because the SYN is seen as pseudo data - with len = 1. */ - uxOptionsLength = prvSetSynAckOptions( pxSocket, pxTCPPacket ); - pxTCPHeader->ucTCPFlags = ipTCP_FLAG_SYN | ipTCP_FLAG_ACK; - - xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); - - /* Set the TCP offset field: ipSIZE_OF_TCP_HEADER equals 20 and - uxOptionsLength is a multiple of 4. The complete expression is: - ucTCPOffset = ( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) / 4 ) << 4 */ - pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); - vTCPStateChange( pxSocket, eSYN_RECEIVED ); - - pxTCPWindow->rx.ulCurrentSequenceNumber = pxTCPWindow->rx.ulHighestSequenceNumber = ulSequenceNumber + 1u; - pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->ulNextTxSequenceNumber = pxTCPWindow->tx.ulFirstSequenceNumber + 1u; /* because we send a TCP_SYN. */ - } - break; - - case eCONNECT_SYN: /* (client) also called SYN_SENT: we've just send a - SYN, expect a SYN+ACK and send a ACK now. */ - /* Fall through */ - case eSYN_RECEIVED: /* (server) we've had a SYN, replied with SYN+SCK - expect a ACK and do nothing. */ - xSendLength = prvHandleSynReceived( pxSocket, ppxNetworkBuffer, ulReceiveLength, uxOptionsLength ); - break; - - case eESTABLISHED: /* (server + client) an open connection, data - received can be delivered to the user. The normal - state for the data transfer phase of the connection - The closing states are also handled here with the - use of some flags. */ - xSendLength = prvHandleEstablished( pxSocket, ppxNetworkBuffer, ulReceiveLength, uxOptionsLength ); - break; - - case eLAST_ACK: /* (server + client) waiting for an acknowledgement - of the connection termination request previously - sent to the remote TCP (which includes an - acknowledgement of its connection termination - request). */ - /* Fall through */ - case eFIN_WAIT_1: /* (server + client) waiting for a connection termination request from the remote TCP, - * or an acknowledgement of the connection termination request previously sent. */ - /* Fall through */ - case eFIN_WAIT_2: /* (server + client) waiting for a connection termination request from the remote TCP. */ - xSendLength = prvTCPHandleFin( pxSocket, *ppxNetworkBuffer ); - break; - - case eCLOSE_WAIT: /* (server + client) waiting for a connection - termination request from the local user. Nothing to - do, connection is closed, wait for owner to close - this socket. */ - break; - - case eCLOSING: /* (server + client) waiting for a connection - termination request acknowledgement from the remote - TCP. */ - break; - - case eTIME_WAIT: /* (either server or client) waiting for enough time - to pass to be sure the remote TCP received the - acknowledgement of its connection termination - request. [According to RFC 793 a connection can stay - in TIME-WAIT for a maximum of four minutes known as - a MSL (maximum segment lifetime).] These states are - implemented implicitly by settings flags like - 'bFinSent', 'bFinRecv', and 'bFinAcked'. */ - break; - default: - break; - } - } - - if( xSendLength > 0 ) - { - xSendLength = prvSendData( pxSocket, ppxNetworkBuffer, ulReceiveLength, xSendLength ); - } - - return xSendLength; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvTCPSendSpecialPacketHelper( NetworkBufferDescriptor_t *pxNetworkBuffer, - uint8_t ucTCPFlags ) -{ -#if( ipconfigIGNORE_UNKNOWN_PACKETS == 0 ) - { - TCPPacket_t *pxTCPPacket = ( TCPPacket_t * )( pxNetworkBuffer->pucEthernetBuffer ); - const BaseType_t xSendLength = ( BaseType_t ) - ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + 0u ); /* Plus 0 options. */ - - pxTCPPacket->xTCPHeader.ucTCPFlags = ucTCPFlags; - pxTCPPacket->xTCPHeader.ucTCPOffset = ( ipSIZE_OF_TCP_HEADER + 0u ) << 2; - - prvTCPReturnPacket( NULL, pxNetworkBuffer, ( uint32_t )xSendLength, pdFALSE ); - } -#endif /* !ipconfigIGNORE_UNKNOWN_PACKETS */ - - /* Remove compiler warnings if ipconfigIGNORE_UNKNOWN_PACKETS == 1. */ - ( void )pxNetworkBuffer; - ( void )ucTCPFlags; - - /* The packet was not consumed. */ - return pdFAIL; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvTCPSendChallengeAck( NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ - return prvTCPSendSpecialPacketHelper( pxNetworkBuffer, ipTCP_FLAG_ACK ); -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvTCPSendReset( NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ - return prvTCPSendSpecialPacketHelper( pxNetworkBuffer, - ipTCP_FLAG_ACK | ipTCP_FLAG_RST ); -} -/*-----------------------------------------------------------*/ - -static void prvSocketSetMSS( FreeRTOS_Socket_t *pxSocket ) -{ -uint32_t ulMSS = ipconfigTCP_MSS; - - if( ( ( FreeRTOS_ntohl( pxSocket->u.xTCP.ulRemoteIP ) ^ *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) != 0ul ) - { - /* Data for this peer will pass through a router, and maybe through - the internet. Limit the MSS to 1400 bytes or less. */ - ulMSS = FreeRTOS_min_uint32( ( uint32_t ) REDUCED_MSS_THROUGH_INTERNET, ulMSS ); - } - - FreeRTOS_debug_printf( ( "prvSocketSetMSS: %lu bytes for %lxip:%u\n", ulMSS, pxSocket->u.xTCP.ulRemoteIP, pxSocket->u.xTCP.usRemotePort ) ); - - pxSocket->u.xTCP.usInitMSS = pxSocket->u.xTCP.usCurMSS = ( uint16_t ) ulMSS; -} -/*-----------------------------------------------------------*/ - -/* - * FreeRTOS_TCP_IP has only 2 public functions, this is the second one: - * xProcessReceivedTCPPacket() - * prvTCPHandleState() - * prvTCPPrepareSend() - * prvTCPReturnPacket() - * xNetworkInterfaceOutput() // Sends data to the NIC - * prvTCPSendRepeated() - * prvTCPReturnPacket() // Prepare for returning - * xNetworkInterfaceOutput() // Sends data to the NIC -*/ -BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ -FreeRTOS_Socket_t *pxSocket; -TCPPacket_t * pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); -uint16_t ucTCPFlags; -uint32_t ulLocalIP; -uint16_t xLocalPort; -uint32_t ulRemoteIP; -uint16_t xRemotePort; -uint32_t ulSequenceNumber; -uint32_t ulAckNumber; -BaseType_t xResult = pdPASS; -configASSERT(pxNetworkBuffer); -configASSERT(pxNetworkBuffer->pucEthernetBuffer); - - /* Check for a minimum packet size. */ - if( pxNetworkBuffer->xDataLength >= ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) ) - { - ucTCPFlags = pxTCPPacket->xTCPHeader.ucTCPFlags; - ulLocalIP = FreeRTOS_htonl( pxTCPPacket->xIPHeader.ulDestinationIPAddress ); - xLocalPort = FreeRTOS_htons( pxTCPPacket->xTCPHeader.usDestinationPort ); - ulRemoteIP = FreeRTOS_htonl( pxTCPPacket->xIPHeader.ulSourceIPAddress ); - xRemotePort = FreeRTOS_htons( pxTCPPacket->xTCPHeader.usSourcePort ); - ulSequenceNumber = FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulSequenceNumber ); - ulAckNumber = FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulAckNr ); - - /* Find the destination socket, and if not found: return a socket listing to - the destination PORT. */ - pxSocket = ( FreeRTOS_Socket_t * )pxTCPSocketLookup( ulLocalIP, xLocalPort, ulRemoteIP, xRemotePort ); - } - else - { - return pdFAIL; - } - - if( ( pxSocket == NULL ) || ( prvTCPSocketIsActive( ( UBaseType_t ) pxSocket->u.xTCP.ucTCPState ) == pdFALSE ) ) - { - /* A TCP messages is received but either there is no socket with the - given port number or the there is a socket, but it is in one of these - non-active states: eCLOSED, eCLOSE_WAIT, eFIN_WAIT_2, eCLOSING, or - eTIME_WAIT. */ - - FreeRTOS_debug_printf( ( "TCP: No active socket on port %d (%lxip:%d)\n", xLocalPort, ulRemoteIP, xRemotePort ) ); - - /* Send a RST to all packets that can not be handled. As a result - the other party will get a ECONN error. There are two exceptions: - 1) A packet that already has the RST flag set. - 2) A packet that only has the ACK flag set. - A packet with only the ACK flag set might be the last ACK in - a three-way hand-shake that closes a connection. */ - if( ( ( ucTCPFlags & ipTCP_FLAG_CTRL ) != ipTCP_FLAG_ACK ) && - ( ( ucTCPFlags & ipTCP_FLAG_RST ) == 0u ) ) - { - prvTCPSendReset( pxNetworkBuffer ); - } - - /* The packet can't be handled. */ - xResult = pdFAIL; - } - else - { - pxSocket->u.xTCP.ucRepCount = 0u; - - if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) - { - /* The matching socket is in a listening state. Test if the peer - has set the SYN flag. */ - if( ( ucTCPFlags & ipTCP_FLAG_CTRL ) != ipTCP_FLAG_SYN ) - { - /* What happens: maybe after a reboot, a client doesn't know the - connection had gone. Send a RST in order to get a new connect - request. */ - #if( ipconfigHAS_DEBUG_PRINTF == 1 ) - { - FreeRTOS_debug_printf( ( "TCP: Server can't handle flags: %s from %lxip:%u to port %u\n", - prvTCPFlagMeaning( ( UBaseType_t ) ucTCPFlags ), ulRemoteIP, xRemotePort, xLocalPort ) ); - } - #endif /* ipconfigHAS_DEBUG_PRINTF */ - - if( ( ucTCPFlags & ipTCP_FLAG_RST ) == 0u ) - { - prvTCPSendReset( pxNetworkBuffer ); - } - xResult = pdFAIL; - } - else - { - /* prvHandleListen() will either return a newly created socket - (if bReuseSocket is false), otherwise it returns the current - socket which will later get connected. */ - pxSocket = prvHandleListen( pxSocket, pxNetworkBuffer ); - - if( pxSocket == NULL ) - { - xResult = pdFAIL; - } - } - } /* if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ). */ - else - { - /* This is not a socket in listening mode. Check for the RST - flag. */ - if( ( ucTCPFlags & ipTCP_FLAG_RST ) != 0u ) - { - FreeRTOS_debug_printf( ( "TCP: RST received from %lxip:%u for %u\n", ulRemoteIP, xRemotePort, xLocalPort ) ); - - /* Implement https://tools.ietf.org/html/rfc5961#section-3.2. */ - if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) - { - /* Per the above RFC, "In the SYN-SENT state ... the RST is - acceptable if the ACK field acknowledges the SYN." */ - if( ulAckNumber == pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber + 1 ) - { - vTCPStateChange( pxSocket, eCLOSED ); - } - } - else - { - /* Check whether the packet matches the next expected sequence number. */ - if( ulSequenceNumber == pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber ) - { - vTCPStateChange( pxSocket, eCLOSED ); - } - /* Otherwise, check whether the packet is within the receive window. */ - else if( ulSequenceNumber > pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber && - ulSequenceNumber < ( pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber + - pxSocket->u.xTCP.xTCPWindow.xSize.ulRxWindowLength ) ) - { - /* Send a challenge ACK. */ - prvTCPSendChallengeAck( pxNetworkBuffer ); - } - } - - /* Otherwise, do nothing. In any case, the packet cannot be handled. */ - xResult = pdFAIL; - } - else if( ( ( ucTCPFlags & ipTCP_FLAG_CTRL ) == ipTCP_FLAG_SYN ) && ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) ) - { - /* SYN flag while this socket is already connected. */ - FreeRTOS_debug_printf( ( "TCP: SYN unexpected from %lxip:%u\n", ulRemoteIP, xRemotePort ) ); - - /* The packet cannot be handled. */ - xResult = pdFAIL; - } - else - { - /* Update the copy of the TCP header only (skipping eth and IP - headers). It might be used later on, whenever data must be sent - to the peer. */ - const BaseType_t lOffset = ( BaseType_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER ); - memcpy( pxSocket->u.xTCP.xPacket.u.ucLastPacket + lOffset, pxNetworkBuffer->pucEthernetBuffer + lOffset, ipSIZE_OF_TCP_HEADER ); - } - } - } - - if( xResult != pdFAIL ) - { - /* Touch the alive timers because we received a message for this - socket. */ - prvTCPTouchSocket( pxSocket ); - - /* Parse the TCP option(s), if present. */ - /* _HT_ : if we're in the SYN phase, and peer does not send a MSS option, - then we MUST assume an MSS size of 536 bytes for backward compatibility. */ - - /* When there are no TCP options, the TCP offset equals 20 bytes, which is stored as - the number 5 (words) in the higher niblle of the TCP-offset byte. */ - if( ( pxTCPPacket->xTCPHeader.ucTCPOffset & TCP_OFFSET_LENGTH_BITS ) > TCP_OFFSET_STANDARD_LENGTH ) - { - prvCheckOptions( pxSocket, pxNetworkBuffer ); - } - - - #if( ipconfigUSE_TCP_WIN == 1 ) - { - pxSocket->u.xTCP.ulWindowSize = FreeRTOS_ntohs( pxTCPPacket->xTCPHeader.usWindow ); - pxSocket->u.xTCP.ulWindowSize = - ( pxSocket->u.xTCP.ulWindowSize << pxSocket->u.xTCP.ucPeerWinScaleFactor ); - } - #endif - - /* In prvTCPHandleState() the incoming messages will be handled - depending on the current state of the connection. */ - if( prvTCPHandleState( pxSocket, &pxNetworkBuffer ) > 0 ) - { - /* prvTCPHandleState() has sent a message, see if there are more to - be transmitted. */ - #if( ipconfigUSE_TCP_WIN == 1 ) - { - prvTCPSendRepeated( pxSocket, &pxNetworkBuffer ); - } - #endif /* ipconfigUSE_TCP_WIN */ - } - - if( pxNetworkBuffer != NULL ) - { - /* We must check if the buffer is unequal to NULL, because the - socket might keep a reference to it in case a delayed ACK must be - sent. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - pxNetworkBuffer = NULL; - } - - /* And finally, calculate when this socket wants to be woken up. */ - prvTCPNextTimeout ( pxSocket ); - /* Return pdPASS to tell that the network buffer is 'consumed'. */ - xResult = pdPASS; - } - - /* pdPASS being returned means the buffer has been consumed. */ - return xResult; -} -/*-----------------------------------------------------------*/ - -static FreeRTOS_Socket_t *prvHandleListen( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) -{ -TCPPacket_t * pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); -FreeRTOS_Socket_t *pxReturn = NULL; -uint32_t ulInitialSequenceNumber; - - /* Assume that a new Initial Sequence Number will be required. Request - it now in order to fail out if necessary. */ - ulInitialSequenceNumber = ulApplicationGetNextSequenceNumber( *ipLOCAL_IP_ADDRESS_POINTER, - pxSocket->usLocalPort, - pxTCPPacket->xIPHeader.ulSourceIPAddress, - pxTCPPacket->xTCPHeader.usSourcePort ); - - /* A pure SYN (without ACK) has come in, create a new socket to answer - it. */ - if( 0 != ulInitialSequenceNumber ) - { - if( pxSocket->u.xTCP.bits.bReuseSocket != pdFALSE_UNSIGNED ) - { - /* The flag bReuseSocket indicates that the same instance of the - listening socket should be used for the connection. */ - pxReturn = pxSocket; - pxSocket->u.xTCP.bits.bPassQueued = pdTRUE_UNSIGNED; - pxSocket->u.xTCP.pxPeerSocket = pxSocket; - } - else - { - /* The socket does not have the bReuseSocket flag set meaning create a - new socket when a connection comes in. */ - pxReturn = NULL; - - if( pxSocket->u.xTCP.usChildCount >= pxSocket->u.xTCP.usBacklog ) - { - FreeRTOS_printf( ( "Check: Socket %u already has %u / %u child%s\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.usChildCount, - pxSocket->u.xTCP.usBacklog, - pxSocket->u.xTCP.usChildCount == 1 ? "" : "ren" ) ); - prvTCPSendReset( pxNetworkBuffer ); - } - else - { - FreeRTOS_Socket_t *pxNewSocket = ( FreeRTOS_Socket_t * ) - FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_STREAM, FREERTOS_IPPROTO_TCP ); - - if( ( pxNewSocket == NULL ) || ( pxNewSocket == FREERTOS_INVALID_SOCKET ) ) - { - FreeRTOS_debug_printf( ( "TCP: Listen: new socket failed\n" ) ); - prvTCPSendReset( pxNetworkBuffer ); - } - else if( prvTCPSocketCopy( pxNewSocket, pxSocket ) != pdFALSE ) - { - /* The socket will be connected immediately, no time for the - owner to setsockopt's, therefore copy properties of the server - socket to the new socket. Only the binding might fail (due to - lack of resources). */ - pxReturn = pxNewSocket; - } - } - } - } - - if( ( 0 != ulInitialSequenceNumber ) && ( pxReturn != NULL ) ) - { - pxReturn->u.xTCP.usRemotePort = FreeRTOS_htons( pxTCPPacket->xTCPHeader.usSourcePort ); - pxReturn->u.xTCP.ulRemoteIP = FreeRTOS_htonl( pxTCPPacket->xIPHeader.ulSourceIPAddress ); - pxReturn->u.xTCP.xTCPWindow.ulOurSequenceNumber = ulInitialSequenceNumber; - - /* Here is the SYN action. */ - pxReturn->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber = FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulSequenceNumber ); - prvSocketSetMSS( pxReturn ); - - prvTCPCreateWindow( pxReturn ); - - vTCPStateChange( pxReturn, eSYN_FIRST ); - - /* Make a copy of the header up to the TCP header. It is needed later - on, whenever data must be sent to the peer. */ - memcpy( pxReturn->u.xTCP.xPacket.u.ucLastPacket, pxNetworkBuffer->pucEthernetBuffer, sizeof( pxReturn->u.xTCP.xPacket.u.ucLastPacket ) ); - } - return pxReturn; -} -/*-----------------------------------------------------------*/ - -/* - * Duplicates a socket after a listening socket receives a connection. - */ -static BaseType_t prvTCPSocketCopy( FreeRTOS_Socket_t *pxNewSocket, FreeRTOS_Socket_t *pxSocket ) -{ -struct freertos_sockaddr xAddress; - - pxNewSocket->xReceiveBlockTime = pxSocket->xReceiveBlockTime; - pxNewSocket->xSendBlockTime = pxSocket->xSendBlockTime; - pxNewSocket->ucSocketOptions = pxSocket->ucSocketOptions; - pxNewSocket->u.xTCP.uxRxStreamSize = pxSocket->u.xTCP.uxRxStreamSize; - pxNewSocket->u.xTCP.uxTxStreamSize = pxSocket->u.xTCP.uxTxStreamSize; - pxNewSocket->u.xTCP.uxLittleSpace = pxSocket->u.xTCP.uxLittleSpace; - pxNewSocket->u.xTCP.uxEnoughSpace = pxSocket->u.xTCP.uxEnoughSpace; - pxNewSocket->u.xTCP.uxRxWinSize = pxSocket->u.xTCP.uxRxWinSize; - pxNewSocket->u.xTCP.uxTxWinSize = pxSocket->u.xTCP.uxTxWinSize; - - #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) - { - pxNewSocket->pxUserSemaphore = pxSocket->pxUserSemaphore; - } - #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ - - #if( ipconfigUSE_CALLBACKS == 1 ) - { - /* In case call-backs are used, copy them from parent to child. */ - pxNewSocket->u.xTCP.pxHandleConnected = pxSocket->u.xTCP.pxHandleConnected; - pxNewSocket->u.xTCP.pxHandleReceive = pxSocket->u.xTCP.pxHandleReceive; - pxNewSocket->u.xTCP.pxHandleSent = pxSocket->u.xTCP.pxHandleSent; - } - #endif /* ipconfigUSE_CALLBACKS */ - - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - { - /* Child socket of listening sockets will inherit the Socket Set - Otherwise the owner has no chance of including it into the set. */ - if( pxSocket->pxSocketSet ) - { - pxNewSocket->pxSocketSet = pxSocket->pxSocketSet; - pxNewSocket->xSelectBits = pxSocket->xSelectBits | eSELECT_READ | eSELECT_EXCEPT; - } - } - #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ - - /* And bind it to the same local port as its parent. */ - xAddress.sin_addr = *ipLOCAL_IP_ADDRESS_POINTER; - xAddress.sin_port = FreeRTOS_htons( pxSocket->usLocalPort ); - - #if( ipconfigTCP_HANG_PROTECTION == 1 ) - { - /* Only when there is anti-hanging protection, a socket may become an - orphan temporarily. Once this socket is really connected, the owner of - the server socket will be notified. */ - - /* When bPassQueued is true, the socket is an orphan until it gets - connected. */ - pxNewSocket->u.xTCP.bits.bPassQueued = pdTRUE_UNSIGNED; - pxNewSocket->u.xTCP.pxPeerSocket = pxSocket; - } - #else - { - /* A reference to the new socket may be stored and the socket is marked - as 'passable'. */ - - /* When bPassAccept is pdTRUE_UNSIGNED this socket may be returned in a call to - accept(). */ - pxNewSocket->u.xTCP.bits.bPassAccept = pdTRUE_UNSIGNED; - if(pxSocket->u.xTCP.pxPeerSocket == NULL ) - { - pxSocket->u.xTCP.pxPeerSocket = pxNewSocket; - } - } - #endif - - pxSocket->u.xTCP.usChildCount++; - - FreeRTOS_debug_printf( ( "Gain: Socket %u now has %u / %u child%s\n", - pxSocket->usLocalPort, - pxSocket->u.xTCP.usChildCount, - pxSocket->u.xTCP.usBacklog, - pxSocket->u.xTCP.usChildCount == 1u ? "" : "ren" ) ); - - /* Now bind the child socket to the same port as the listening socket. */ - if( vSocketBind ( pxNewSocket, &xAddress, sizeof( xAddress ), pdTRUE ) != 0 ) - { - FreeRTOS_debug_printf( ( "TCP: Listen: new socket bind error\n" ) ); - vSocketClose( pxNewSocket ); - return pdFALSE; - } - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -#if( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) - - const char *FreeRTOS_GetTCPStateName( UBaseType_t ulState ) - { - if( ulState >= ( UBaseType_t ) ARRAY_SIZE( pcStateNames ) ) - { - ulState = ( UBaseType_t ) ARRAY_SIZE( pcStateNames ) - 1u; - } - return pcStateNames[ ulState ]; - } - -#endif /* ( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) */ -/*-----------------------------------------------------------*/ - -/* - * In the API accept(), the user asks is there is a new client? As API's can - * not walk through the xBoundTCPSocketsList the IP-task will do this. - */ -BaseType_t xTCPCheckNewClient( FreeRTOS_Socket_t *pxSocket ) -{ -TickType_t xLocalPort = FreeRTOS_htons( pxSocket->usLocalPort ); -ListItem_t *pxIterator; -FreeRTOS_Socket_t *pxFound; -BaseType_t xResult = pdFALSE; - - /* Here xBoundTCPSocketsList can be accessed safely IP-task is the only one - who has access. */ - for( pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundTCPSocketsList ); - pxIterator != ( ListItem_t * ) listGET_END_MARKER( &xBoundTCPSocketsList ); - pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - if( listGET_LIST_ITEM_VALUE( pxIterator ) == xLocalPort ) - { - pxFound = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - if( ( pxFound->ucProtocol == FREERTOS_IPPROTO_TCP ) && ( pxFound->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) ) - { - pxSocket->u.xTCP.pxPeerSocket = pxFound; - FreeRTOS_debug_printf( ( "xTCPCheckNewClient[0]: client on port %u\n", pxSocket->usLocalPort ) ); - xResult = pdTRUE; - break; - } - } - } - return xResult; -} -/*-----------------------------------------------------------*/ - -#endif /* ipconfigUSE_TCP == 1 */ - -/* Provide access to private members for testing. */ -#ifdef AMAZON_FREERTOS_ENABLE_UNIT_TESTS - #include "iot_freertos_tcp_test_access_tcp_define.h" -#endif - -/* Provide access to private members for verification. */ -#ifdef FREERTOS_TCP_ENABLE_VERIFICATION - #include "aws_freertos_tcp_verification_access_tcp_define.h" -#endif - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* + * FreeRTOS_TCP_IP.c + * Module which handles the TCP connections for FreeRTOS+TCP. + * It depends on FreeRTOS_TCP_WIN.c, which handles the TCP windowing + * schemes. + * + * Endianness: in this module all ports and IP addresses are stored in + * host byte-order, except fields in the IP-packets + */ + +/* Standard includes. */ +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_TCP_IP.h" +#include "FreeRTOS_DHCP.h" +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" +#include "FreeRTOS_ARP.h" +#include "FreeRTOS_TCP_WIN.h" + + +/* Just make sure the contents doesn't get compiled if TCP is not enabled. */ +#if ipconfigUSE_TCP == 1 + +/* This compile-time test was moved to here because some macro's +were unknown within 'FreeRTOSIPConfigDefaults.h'. It tests whether +the defined MTU size can contain at least a complete TCP packet. */ + +#if ( ( ipconfigTCP_MSS + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) > ipconfigNETWORK_MTU ) + #error The ipconfigTCP_MSS setting in FreeRTOSIPConfig.h is too large. +#endif + +/* + * The meaning of the TCP flags: + */ +#define ipTCP_FLAG_FIN 0x0001u /* No more data from sender */ +#define ipTCP_FLAG_SYN 0x0002u /* Synchronize sequence numbers */ +#define ipTCP_FLAG_RST 0x0004u /* Reset the connection */ +#define ipTCP_FLAG_PSH 0x0008u /* Push function: please push buffered data to the recv application */ +#define ipTCP_FLAG_ACK 0x0010u /* Acknowledgment field is significant */ +#define ipTCP_FLAG_URG 0x0020u /* Urgent pointer field is significant */ +#define ipTCP_FLAG_ECN 0x0040u /* ECN-Echo */ +#define ipTCP_FLAG_CWR 0x0080u /* Congestion Window Reduced */ +#define ipTCP_FLAG_NS 0x0100u /* ECN-nonce concealment protection */ +#define ipTCP_FLAG_RSV 0x0E00u /* Reserved, keep 0 */ + +/* A mask to filter all protocol flags. */ +#define ipTCP_FLAG_CTRL 0x001Fu + +/* + * A few values of the TCP options: + */ +#define TCP_OPT_END 0u /* End of TCP options list */ +#define TCP_OPT_NOOP 1u /* "No-operation" TCP option */ +#define TCP_OPT_MSS 2u /* Maximum segment size TCP option */ +#define TCP_OPT_WSOPT 3u /* TCP Window Scale Option (3-byte long) */ +#define TCP_OPT_SACK_P 4u /* Advertize that SACK is permitted */ +#define TCP_OPT_SACK_A 5u /* SACK option with first/last */ +#define TCP_OPT_TIMESTAMP 8u /* Time-stamp option */ + +#define TCP_OPT_MSS_LEN 4u /* Length of TCP MSS option. */ +#define TCP_OPT_WSOPT_LEN 3u /* Length of TCP WSOPT option. */ + +#define TCP_OPT_TIMESTAMP_LEN 10 /* fixed length of the time-stamp option */ + +#ifndef ipconfigTCP_ACK_EARLIER_PACKET + #define ipconfigTCP_ACK_EARLIER_PACKET 1 +#endif + +/* + * The macro NOW_CONNECTED() is use to determine if the connection makes a + * transition from connected to non-connected and vice versa. + * NOW_CONNECTED() returns true when the status has one of these values: + * eESTABLISHED, eFIN_WAIT_1, eFIN_WAIT_2, eCLOSING, eLAST_ACK, eTIME_WAIT + * Technically the connection status is closed earlier, but the library wants + * to prevent that the socket will be deleted before the last ACK has been + * and thus causing a 'RST' packet on either side. + */ +#define NOW_CONNECTED( status )\ + ( ( status >= eESTABLISHED ) && ( status != eCLOSE_WAIT ) ) + +/* + * The highest 4 bits in the TCP offset byte indicate the total length of the + * TCP header, divided by 4. + */ +#define VALID_BITS_IN_TCP_OFFSET_BYTE ( 0xF0u ) + +/* + * Acknowledgements to TCP data packets may be delayed as long as more is being expected. + * A normal delay would be 200ms. Here a much shorter delay of 20 ms is being used to + * gain performance. + */ +#define DELAYED_ACK_SHORT_DELAY_MS ( 2 ) +#define DELAYED_ACK_LONGER_DELAY_MS ( 20 ) + +/* + * The MSS (Maximum Segment Size) will be taken as large as possible. However, packets with + * an MSS of 1460 bytes won't be transported through the internet. The MSS will be reduced + * to 1400 bytes. + */ +#define REDUCED_MSS_THROUGH_INTERNET ( 1400 ) + +/* + * When there are no TCP options, the TCP offset equals 20 bytes, which is stored as + * the number 5 (words) in the higher niblle of the TCP-offset byte. + */ +#define TCP_OFFSET_LENGTH_BITS ( 0xf0u ) +#define TCP_OFFSET_STANDARD_LENGTH ( 0x50u ) + +/* + * Each TCP socket is checked regularly to see if it can send data packets. + * By default, the maximum number of packets sent during one check is limited to 8. + * This amount may be further limited by setting the socket's TX window size. + */ +#if( !defined( SEND_REPEATED_COUNT ) ) + #define SEND_REPEATED_COUNT ( 8 ) +#endif /* !defined( SEND_REPEATED_COUNT ) */ + +/* + * Define a maximum perdiod of time (ms) to leave a TCP-socket unattended. + * When a TCP timer expires, retries and keep-alive messages will be checked. + */ +#ifndef tcpMAXIMUM_TCP_WAKEUP_TIME_MS + #define tcpMAXIMUM_TCP_WAKEUP_TIME_MS 20000u +#endif + +/* + * The names of the different TCP states may be useful in logging. + */ +#if( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) + static const char *pcStateNames[] = { + "eCLOSED", + "eTCP_LISTEN", + "eCONNECT_SYN", + "eSYN_FIRST", + "eSYN_RECEIVED", + "eESTABLISHED", + "eFIN_WAIT_1", + "eFIN_WAIT_2", + "eCLOSE_WAIT", + "eCLOSING", + "eLAST_ACK", + "eTIME_WAIT", + "eUNKNOWN", +}; +#endif /* ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) */ + +/* + * Returns true if the socket must be checked. Non-active sockets are waiting + * for user action, either connect() or close(). + */ +static BaseType_t prvTCPSocketIsActive( UBaseType_t uxStatus ); + +/* + * Either sends a SYN or calls prvTCPSendRepeated (for regular messages). + */ +static int32_t prvTCPSendPacket( FreeRTOS_Socket_t *pxSocket ); + +/* + * Try to send a series of messages. + */ +static int32_t prvTCPSendRepeated( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ); + +/* + * Return or send a packet to the other party. + */ +static void prvTCPReturnPacket( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, + uint32_t ulLen, BaseType_t xReleaseAfterSend ); + +/* + * Initialise the data structures which keep track of the TCP windowing system. + */ +static void prvTCPCreateWindow( FreeRTOS_Socket_t *pxSocket ); + +/* + * Let ARP look-up the MAC-address of the peer and initialise the first SYN + * packet. + */ +static BaseType_t prvTCPPrepareConnect( FreeRTOS_Socket_t *pxSocket ); + +#if( ipconfigHAS_DEBUG_PRINTF != 0 ) + /* + * For logging and debugging: make a string showing the TCP flags. + */ + static const char *prvTCPFlagMeaning( UBaseType_t xFlags); +#endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + +/* + * Parse the TCP option(s) received, if present. + */ +static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); + +/* + * Identify and deal with a single TCP header option, advancing the pointer to + * the header. This function returns pdTRUE or pdFALSE depending on whether the + * caller should continue to parse more header options or break the loop. + */ +static BaseType_t prvSingleStepTCPHeaderOptions( const unsigned char ** const ppucPtr, const unsigned char ** const ppucLast, FreeRTOS_Socket_t ** const ppxSocket, TCPWindow_t ** const ppxTCPWindow); + +/* + * Skip past TCP header options when doing Selective ACK, until there are no + * more options left. + */ +static void prvSkipPastRemainingOptions( const unsigned char ** const ppucPtr, FreeRTOS_Socket_t ** const ppxSocket, unsigned char * const ppucLen ); + +/* + * Set the initial properties in the options fields, like the preferred + * value of MSS and whether SACK allowed. Will be transmitted in the state + * 'eCONNECT_SYN'. + */ +static UBaseType_t prvSetSynAckOptions( FreeRTOS_Socket_t *pxSocket, TCPPacket_t * pxTCPPacket ); + +/* + * For anti-hang protection and TCP keep-alive messages. Called in two places: + * after receiving a packet and after a state change. The socket's alive timer + * may be reset. + */ +static void prvTCPTouchSocket( FreeRTOS_Socket_t *pxSocket ); + +/* + * Prepare an outgoing message, if anything has to be sent. + */ +static int32_t prvTCPPrepareSend( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, UBaseType_t uxOptionsLength ); + +/* + * Calculate when this socket needs to be checked to do (re-)transmissions. + */ +static TickType_t prvTCPNextTimeout( FreeRTOS_Socket_t *pxSocket ); + +/* + * The API FreeRTOS_send() adds data to the TX stream. Add + * this data to the windowing system to it can be transmitted. + */ +static void prvTCPAddTxData( FreeRTOS_Socket_t *pxSocket ); + +/* + * Called to handle the closure of a TCP connection. + */ +static BaseType_t prvTCPHandleFin( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); + +/* + * Called from prvTCPHandleState(). Find the TCP payload data and check and + * return its length. + */ +static BaseType_t prvCheckRxData( NetworkBufferDescriptor_t *pxNetworkBuffer, uint8_t **ppucRecvData ); + +/* + * Called from prvTCPHandleState(). Check if the payload data may be accepted. + * If so, it will be added to the socket's reception queue. + */ +static BaseType_t prvStoreRxData( FreeRTOS_Socket_t *pxSocket, uint8_t *pucRecvData, + NetworkBufferDescriptor_t *pxNetworkBuffer, uint32_t ulReceiveLength ); + +/* + * Set the TCP options (if any) for the outgoing packet. + */ +static UBaseType_t prvSetOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); + +/* + * Called from prvTCPHandleState() as long as the TCP status is eSYN_RECEIVED to + * eCONNECT_SYN. + */ +static BaseType_t prvHandleSynReceived( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, + uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ); + +/* + * Called from prvTCPHandleState() as long as the TCP status is eESTABLISHED. + */ +static BaseType_t prvHandleEstablished( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, + uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ); + +/* + * Called from prvTCPHandleState(). There is data to be sent. + * If ipconfigUSE_TCP_WIN is defined, and if only an ACK must be sent, it will + * be checked if it would better be postponed for efficiency. + */ +static BaseType_t prvSendData( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, + uint32_t ulReceiveLength, BaseType_t xSendLength ); + +/* + * The heart of all: check incoming packet for valid data and acks and do what + * is necessary in each state. + */ +static BaseType_t prvTCPHandleState( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ); + +/* + * Common code for sending a TCP protocol control packet (i.e. no options, no + * payload, just flags). + */ +static BaseType_t prvTCPSendSpecialPacketHelper( NetworkBufferDescriptor_t *pxNetworkBuffer, + uint8_t ucTCPFlags ); + +/* + * A "challenge ACK" is as per https://tools.ietf.org/html/rfc5961#section-3.2, + * case #3. In summary, an RST was received with a sequence number that is + * unexpected but still within the window. + */ +static BaseType_t prvTCPSendChallengeAck( NetworkBufferDescriptor_t *pxNetworkBuffer ); + +/* + * Reply to a peer with the RST flag on, in case a packet can not be handled. + */ +static BaseType_t prvTCPSendReset( NetworkBufferDescriptor_t *pxNetworkBuffer ); + +/* + * Set the initial value for MSS (Maximum Segment Size) to be used. + */ +static void prvSocketSetMSS( FreeRTOS_Socket_t *pxSocket ); + +/* + * Return either a newly created socket, or the current socket in a connected + * state (depends on the 'bReuseSocket' flag). + */ +static FreeRTOS_Socket_t *prvHandleListen( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ); + +/* + * After a listening socket receives a new connection, it may duplicate itself. + * The copying takes place in prvTCPSocketCopy. + */ +static BaseType_t prvTCPSocketCopy( FreeRTOS_Socket_t *pxNewSocket, FreeRTOS_Socket_t *pxSocket ); + +/* + * prvTCPStatusAgeCheck() will see if the socket has been in a non-connected + * state for too long. If so, the socket will be closed, and -1 will be + * returned. + */ +#if( ipconfigTCP_HANG_PROTECTION == 1 ) + static BaseType_t prvTCPStatusAgeCheck( FreeRTOS_Socket_t *pxSocket ); +#endif + +static NetworkBufferDescriptor_t *prvTCPBufferResize( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, + int32_t lDataLen, UBaseType_t uxOptionsLength ); + +#if( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) + const char *FreeRTOS_GetTCPStateName( UBaseType_t ulState ); +#endif + +#if( ipconfigUSE_TCP_WIN != 0 ) + static uint8_t prvWinScaleFactor( FreeRTOS_Socket_t *pxSocket ); +#endif + +/* + * Generate a randomized TCP Initial Sequence Number per RFC. + */ +extern uint32_t ulApplicationGetNextSequenceNumber( uint32_t ulSourceAddress, + uint16_t usSourcePort, + uint32_t ulDestinationAddress, + uint16_t usDestinationPort ); + +/*-----------------------------------------------------------*/ + +/* prvTCPSocketIsActive() returns true if the socket must be checked. + * Non-active sockets are waiting for user action, either connect() + * or close(). */ +static BaseType_t prvTCPSocketIsActive( UBaseType_t uxStatus ) +{ + switch( uxStatus ) + { + case eCLOSED: + case eCLOSE_WAIT: + case eFIN_WAIT_2: + case eCLOSING: + case eTIME_WAIT: + return pdFALSE; + default: + return pdTRUE; + } +} +/*-----------------------------------------------------------*/ + +#if( ipconfigTCP_HANG_PROTECTION == 1 ) + + static BaseType_t prvTCPStatusAgeCheck( FreeRTOS_Socket_t *pxSocket ) + { + BaseType_t xResult; + switch( pxSocket->u.xTCP.ucTCPState ) + { + case eESTABLISHED: + /* If the 'ipconfigTCP_KEEP_ALIVE' option is enabled, sockets in + state ESTABLISHED can be protected using keep-alive messages. */ + xResult = pdFALSE; + break; + case eCLOSED: + case eTCP_LISTEN: + case eCLOSE_WAIT: + /* These 3 states may last for ever, up to the owner. */ + xResult = pdFALSE; + break; + default: + /* All other (non-connected) states will get anti-hanging + protection. */ + xResult = pdTRUE; + break; + } + if( xResult != pdFALSE ) + { + /* How much time has past since the last active moment which is + defined as A) a state change or B) a packet has arrived. */ + TickType_t xAge = xTaskGetTickCount( ) - pxSocket->u.xTCP.xLastActTime; + + /* ipconfigTCP_HANG_PROTECTION_TIME is in units of seconds. */ + if( xAge > ( ipconfigTCP_HANG_PROTECTION_TIME * configTICK_RATE_HZ ) ) + { + #if( ipconfigHAS_DEBUG_PRINTF == 1 ) + { + FreeRTOS_debug_printf( ( "Inactive socket closed: port %u rem %lxip:%u status %s\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort, + FreeRTOS_GetTCPStateName( ( UBaseType_t ) pxSocket->u.xTCP.ucTCPState ) ) ); + } + #endif /* ipconfigHAS_DEBUG_PRINTF */ + + /* Move to eCLOSE_WAIT, user may close the socket. */ + vTCPStateChange( pxSocket, eCLOSE_WAIT ); + + /* When 'bPassQueued' true, this socket is an orphan until it + gets connected. */ + if( pxSocket->u.xTCP.bits.bPassQueued != pdFALSE_UNSIGNED ) + { + if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) + { + /* As it did not get connected, and the user can never + accept() it anymore, it will be deleted now. Called from + the IP-task, so it's safe to call the internal Close + function: vSocketClose(). */ + vSocketClose( pxSocket ); + } + /* Return a negative value to tell to inform the caller + xTCPTimerCheck() + that the socket got closed and may not be accessed anymore. */ + xResult = -1; + } + } + } + return xResult; + } + /*-----------------------------------------------------------*/ + +#endif + +/* + * As soon as a TCP socket timer expires, this function xTCPSocketCheck + * will be called (from xTCPTimerCheck) + * It can send a delayed ACK or new data + * Sequence of calling (normally) : + * IP-Task: + * xTCPTimerCheck() // Check all sockets ( declared in FreeRTOS_Sockets.c ) + * xTCPSocketCheck() // Either send a delayed ACK or call prvTCPSendPacket() + * prvTCPSendPacket() // Either send a SYN or call prvTCPSendRepeated ( regular messages ) + * prvTCPSendRepeated() // Send at most 8 messages on a row + * prvTCPReturnPacket() // Prepare for returning + * xNetworkInterfaceOutput() // Sends data to the NIC ( declared in portable/NetworkInterface/xxx ) + */ +BaseType_t xTCPSocketCheck( FreeRTOS_Socket_t *pxSocket ) +{ +BaseType_t xResult = 0; +BaseType_t xReady = pdFALSE; + + if( ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && ( pxSocket->u.xTCP.txStream != NULL ) ) + { + /* The API FreeRTOS_send() might have added data to the TX stream. Add + this data to the windowing system to it can be transmitted. */ + prvTCPAddTxData( pxSocket ); + } + + #if ipconfigUSE_TCP_WIN == 1 + { + if( pxSocket->u.xTCP.pxAckMessage != NULL ) + { + /* The first task of this regular socket check is to send-out delayed + ACK's. */ + if( pxSocket->u.xTCP.bits.bUserShutdown == pdFALSE_UNSIGNED ) + { + /* Earlier data was received but not yet acknowledged. This + function is called when the TCP timer for the socket expires, the + ACK may be sent now. */ + if( pxSocket->u.xTCP.ucTCPState != eCLOSED ) + { + if( xTCPWindowLoggingLevel > 1 && ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) ) + { + FreeRTOS_debug_printf( ( "Send[%u->%u] del ACK %lu SEQ %lu (len %u)\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.usRemotePort, + pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber, + pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber - pxSocket->u.xTCP.xTCPWindow.tx.ulFirstSequenceNumber, + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) ); + } + + prvTCPReturnPacket( pxSocket, pxSocket->u.xTCP.pxAckMessage, ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER, ipconfigZERO_COPY_TX_DRIVER ); + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* The ownership has been passed to the SEND routine, + clear the pointer to it. */ + pxSocket->u.xTCP.pxAckMessage = NULL; + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + } + if( prvTCPNextTimeout( pxSocket ) > 1 ) + { + /* Tell the code below that this function is ready. */ + xReady = pdTRUE; + } + } + else + { + /* The user wants to perform an active shutdown(), skip sending + the delayed ACK. The function prvTCPSendPacket() will send the + FIN along with the ACK's. */ + } + + if( pxSocket->u.xTCP.pxAckMessage != NULL ) + { + vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); + pxSocket->u.xTCP.pxAckMessage = NULL; + } + } + } + #endif /* ipconfigUSE_TCP_WIN */ + + if( xReady == pdFALSE ) + { + /* The second task of this regular socket check is sending out data. */ + if( ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) || + ( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) ) + { + prvTCPSendPacket( pxSocket ); + } + + /* Set the time-out for the next wakeup for this socket. */ + prvTCPNextTimeout( pxSocket ); + + #if( ipconfigTCP_HANG_PROTECTION == 1 ) + { + /* In all (non-connected) states in which keep-alive messages can not be sent + the anti-hang protocol will close sockets that are 'hanging'. */ + xResult = prvTCPStatusAgeCheck( pxSocket ); + } + #endif + } + + return xResult; +} +/*-----------------------------------------------------------*/ + +/* + * prvTCPSendPacket() will be called when the socket time-out has been reached. + * It is only called by xTCPSocketCheck(). + */ +static int32_t prvTCPSendPacket( FreeRTOS_Socket_t *pxSocket ) +{ +int32_t lResult = 0; +UBaseType_t uxOptionsLength; +TCPPacket_t *pxTCPPacket; +NetworkBufferDescriptor_t *pxNetworkBuffer; + + if( pxSocket->u.xTCP.ucTCPState != eCONNECT_SYN ) + { + /* The connection is in s state other than SYN. */ + pxNetworkBuffer = NULL; + + /* prvTCPSendRepeated() will only create a network buffer if necessary, + i.e. when data must be sent to the peer. */ + lResult = prvTCPSendRepeated( pxSocket, &pxNetworkBuffer ); + + if( pxNetworkBuffer != NULL ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + } + else + { + if( pxSocket->u.xTCP.ucRepCount >= 3u ) + { + /* The connection is in the SYN status. The packet will be repeated + to most 3 times. When there is no response, the socket get the + status 'eCLOSE_WAIT'. */ + FreeRTOS_debug_printf( ( "Connect: giving up %lxip:%u\n", + pxSocket->u.xTCP.ulRemoteIP, /* IP address of remote machine. */ + pxSocket->u.xTCP.usRemotePort ) ); /* Port on remote machine. */ + vTCPStateChange( pxSocket, eCLOSE_WAIT ); + } + else if( ( pxSocket->u.xTCP.bits.bConnPrepared != pdFALSE_UNSIGNED ) || ( prvTCPPrepareConnect( pxSocket ) == pdTRUE ) ) + { + /* Or else, if the connection has been prepared, or can be prepared + now, proceed to send the packet with the SYN flag. + prvTCPPrepareConnect() prepares 'xPacket' and returns pdTRUE if + the Ethernet address of the peer or the gateway is found. */ + pxTCPPacket = ( TCPPacket_t * )pxSocket->u.xTCP.xPacket.u.ucLastPacket; + + /* About to send a SYN packet. Call prvSetSynAckOptions() to set + the proper options: The size of MSS and whether SACK's are + allowed. */ + uxOptionsLength = prvSetSynAckOptions( pxSocket, pxTCPPacket ); + + /* Return the number of bytes to be sent. */ + lResult = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); + + /* Set the TCP offset field: ipSIZE_OF_TCP_HEADER equals 20 and + uxOptionsLength is always a multiple of 4. The complete expression + would be: + ucTCPOffset = ( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) / 4 ) << 4 */ + pxTCPPacket->xTCPHeader.ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + + /* Repeat Count is used for a connecting socket, to limit the number + of tries. */ + pxSocket->u.xTCP.ucRepCount++; + + /* Send the SYN message to make a connection. The messages is + stored in the socket field 'xPacket'. It will be wrapped in a + pseudo network buffer descriptor before it will be sent. */ + prvTCPReturnPacket( pxSocket, NULL, ( uint32_t ) lResult, pdFALSE ); + } + } + + /* Return the total number of bytes sent. */ + return lResult; +} +/*-----------------------------------------------------------*/ + +/* + * prvTCPSendRepeated will try to send a series of messages, as long as there is + * data to be sent and as long as the transmit window isn't full. + */ +static int32_t prvTCPSendRepeated( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ) +{ +UBaseType_t uxIndex; +int32_t lResult = 0; +UBaseType_t uxOptionsLength = 0u; +int32_t xSendLength; + + for( uxIndex = 0u; uxIndex < ( UBaseType_t ) SEND_REPEATED_COUNT; uxIndex++ ) + { + /* prvTCPPrepareSend() might allocate a network buffer if there is data + to be sent. */ + xSendLength = prvTCPPrepareSend( pxSocket, ppxNetworkBuffer, uxOptionsLength ); + if( xSendLength <= 0 ) + { + break; + } + + /* And return the packet to the peer. */ + prvTCPReturnPacket( pxSocket, *ppxNetworkBuffer, ( uint32_t ) xSendLength, ipconfigZERO_COPY_TX_DRIVER ); + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + *ppxNetworkBuffer = NULL; + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + lResult += xSendLength; + } + + /* Return the total number of bytes sent. */ + return lResult; +} +/*-----------------------------------------------------------*/ + +/* + * Return (or send) a packet the the peer. The data is stored in pxBuffer, + * which may either point to a real network buffer or to a TCP socket field + * called 'xTCP.xPacket'. A temporary xNetworkBuffer will be used to pass + * the data to the NIC. + */ +static void prvTCPReturnPacket( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, uint32_t ulLen, BaseType_t xReleaseAfterSend ) +{ +TCPPacket_t * pxTCPPacket; +IPHeader_t *pxIPHeader; +EthernetHeader_t *pxEthernetHeader; +uint32_t ulFrontSpace, ulSpace, ulSourceAddress, ulWinSize; +TCPWindow_t *pxTCPWindow; +NetworkBufferDescriptor_t xTempBuffer; +/* For sending, a pseudo network buffer will be used, as explained above. */ + + if( pxNetworkBuffer == NULL ) + { + pxNetworkBuffer = &xTempBuffer; + + #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) + { + xTempBuffer.pxNextBuffer = NULL; + } + #endif + xTempBuffer.pucEthernetBuffer = pxSocket->u.xTCP.xPacket.u.ucLastPacket; + xTempBuffer.xDataLength = sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ); + xReleaseAfterSend = pdFALSE; + } + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + if( xReleaseAfterSend == pdFALSE ) + { + pxNetworkBuffer = pxDuplicateNetworkBufferWithDescriptor( pxNetworkBuffer, ( BaseType_t ) pxNetworkBuffer->xDataLength ); + if( pxNetworkBuffer == NULL ) + { + FreeRTOS_debug_printf( ( "prvTCPReturnPacket: duplicate failed\n" ) ); + } + xReleaseAfterSend = pdTRUE; + } + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + if( pxNetworkBuffer != NULL ) + { + pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); + pxIPHeader = &pxTCPPacket->xIPHeader; + pxEthernetHeader = &pxTCPPacket->xEthernetHeader; + + /* Fill the packet, using hton translations. */ + if( pxSocket != NULL ) + { + /* Calculate the space in the RX buffer in order to advertise the + size of this socket's reception window. */ + pxTCPWindow = &( pxSocket->u.xTCP.xTCPWindow ); + + if( pxSocket->u.xTCP.rxStream != NULL ) + { + /* An RX stream was created already, see how much space is + available. */ + ulFrontSpace = ( uint32_t ) uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ); + } + else + { + /* No RX stream has been created, the full stream size is + available. */ + ulFrontSpace = ( uint32_t ) pxSocket->u.xTCP.uxRxStreamSize; + } + + /* Take the minimum of the RX buffer space and the RX window size. */ + ulSpace = FreeRTOS_min_uint32( pxTCPWindow->xSize.ulRxWindowLength, ulFrontSpace ); + + if( ( pxSocket->u.xTCP.bits.bLowWater != pdFALSE_UNSIGNED ) || ( pxSocket->u.xTCP.bits.bRxStopped != pdFALSE_UNSIGNED ) ) + { + /* The low-water mark was reached, meaning there was little + space left. The socket will wait until the application has read + or flushed the incoming data, and 'zero-window' will be + advertised. */ + ulSpace = 0u; + } + + /* If possible, advertise an RX window size of at least 1 MSS, otherwise + the peer might start 'zero window probing', i.e. sending small packets + (1, 2, 4, 8... bytes). */ + if( ( ulSpace < pxSocket->u.xTCP.usCurMSS ) && ( ulFrontSpace >= pxSocket->u.xTCP.usCurMSS ) ) + { + ulSpace = pxSocket->u.xTCP.usCurMSS; + } + + /* Avoid overflow of the 16-bit win field. */ + #if( ipconfigUSE_TCP_WIN != 0 ) + { + ulWinSize = ( ulSpace >> pxSocket->u.xTCP.ucMyWinScaleFactor ); + } + #else + { + ulWinSize = ulSpace; + } + #endif + if( ulWinSize > 0xfffcUL ) + { + ulWinSize = 0xfffcUL; + } + + pxTCPPacket->xTCPHeader.usWindow = FreeRTOS_htons( ( uint16_t ) ulWinSize ); + + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + if( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) + { + if( ( xTCPWindowLoggingLevel != 0 ) && ( pxSocket->u.xTCP.bits.bWinChange != pdFALSE_UNSIGNED ) ) + { + size_t uxFrontSpace; + + if(pxSocket->u.xTCP.rxStream != NULL) + { + uxFrontSpace = uxStreamBufferFrontSpace( pxSocket->u.xTCP.rxStream ) ; + } + else + { + uxFrontSpace = 0u; + } + + FreeRTOS_debug_printf( ( "%s: %lxip:%u: [%lu < %lu] winSize %ld\n", + pxSocket->u.xTCP.bits.bLowWater ? "STOP" : "GO ", + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort, + pxSocket->u.xTCP.bits.bLowWater ? pxSocket->u.xTCP.uxLittleSpace : uxFrontSpace, pxSocket->u.xTCP.uxEnoughSpace, + (int32_t) ( pxTCPWindow->rx.ulHighestSequenceNumber - pxTCPWindow->rx.ulCurrentSequenceNumber ) ) ); + } + } + } + #endif /* ipconfigHAS_DEBUG_PRINTF != 0 */ + + /* The new window size has been advertised, switch off the flag. */ + pxSocket->u.xTCP.bits.bWinChange = pdFALSE_UNSIGNED; + + /* Later on, when deciding to delay an ACK, a precise estimate is needed + of the free RX space. At this moment, 'ulHighestRxAllowed' would be the + highest sequence number minus 1 that the socket will accept. */ + pxSocket->u.xTCP.ulHighestRxAllowed = pxTCPWindow->rx.ulCurrentSequenceNumber + ulSpace; + + #if( ipconfigTCP_KEEP_ALIVE == 1 ) + if( pxSocket->u.xTCP.bits.bSendKeepAlive != pdFALSE_UNSIGNED ) + { + /* Sending a keep-alive packet, send the current sequence number + minus 1, which will be recognised as a keep-alive packet an + responded to by acknowledging the last byte. */ + pxSocket->u.xTCP.bits.bSendKeepAlive = pdFALSE_UNSIGNED; + pxSocket->u.xTCP.bits.bWaitKeepAlive = pdTRUE_UNSIGNED; + + pxTCPPacket->xTCPHeader.ulSequenceNumber = pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber - 1UL; + pxTCPPacket->xTCPHeader.ulSequenceNumber = FreeRTOS_htonl( pxTCPPacket->xTCPHeader.ulSequenceNumber ); + } + else + #endif + { + pxTCPPacket->xTCPHeader.ulSequenceNumber = FreeRTOS_htonl( pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber ); + + if( ( pxTCPPacket->xTCPHeader.ucTCPFlags & ( uint8_t ) ipTCP_FLAG_FIN ) != 0u ) + { + /* Suppress FIN in case this packet carries earlier data to be + retransmitted. */ + uint32_t ulDataLen = ( uint32_t ) ( ulLen - ( ipSIZE_OF_TCP_HEADER + ipSIZE_OF_IPv4_HEADER ) ); + if( ( pxTCPWindow->ulOurSequenceNumber + ulDataLen ) != pxTCPWindow->tx.ulFINSequenceNumber ) + { + pxTCPPacket->xTCPHeader.ucTCPFlags &= ( ( uint8_t ) ~ipTCP_FLAG_FIN ); + FreeRTOS_debug_printf( ( "Suppress FIN for %lu + %lu < %lu\n", + pxTCPWindow->ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, + ulDataLen, + pxTCPWindow->tx.ulFINSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber ) ); + } + } + } + + /* Tell which sequence number is expected next time */ + pxTCPPacket->xTCPHeader.ulAckNr = FreeRTOS_htonl( pxTCPWindow->rx.ulCurrentSequenceNumber ); + } + else + { + /* Sending data without a socket, probably replying with a RST flag + Just swap the two sequence numbers. */ + vFlip_32( pxTCPPacket->xTCPHeader.ulSequenceNumber, pxTCPPacket->xTCPHeader.ulAckNr ); + } + + pxIPHeader->ucTimeToLive = ( uint8_t ) ipconfigTCP_TIME_TO_LIVE; + pxIPHeader->usLength = FreeRTOS_htons( ulLen ); + if( ( pxSocket == NULL ) || ( *ipLOCAL_IP_ADDRESS_POINTER == 0ul ) ) + { + /* When pxSocket is NULL, this function is called by prvTCPSendReset() + and the IP-addresses must be swapped. + Also swap the IP-addresses in case the IP-tack doesn't have an + IP-address yet, i.e. when ( *ipLOCAL_IP_ADDRESS_POINTER == 0ul ). */ + ulSourceAddress = pxIPHeader->ulDestinationIPAddress; + } + else + { + ulSourceAddress = *ipLOCAL_IP_ADDRESS_POINTER; + } + pxIPHeader->ulDestinationIPAddress = pxIPHeader->ulSourceIPAddress; + pxIPHeader->ulSourceIPAddress = ulSourceAddress; + vFlip_16( pxTCPPacket->xTCPHeader.usSourcePort, pxTCPPacket->xTCPHeader.usDestinationPort ); + + /* Just an increasing number. */ + pxIPHeader->usIdentification = FreeRTOS_htons( usPacketIdentifier ); + usPacketIdentifier++; + pxIPHeader->usFragmentOffset = 0u; + + #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) + { + /* calculate the IP header checksum, in case the driver won't do that. */ + pxIPHeader->usHeaderChecksum = 0x00u; + pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0UL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); + pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); + + /* calculate the TCP checksum for an outgoing packet. */ + usGenerateProtocolChecksum( (uint8_t*)pxTCPPacket, pxNetworkBuffer->xDataLength, pdTRUE ); + + /* A calculated checksum of 0 must be inverted as 0 means the checksum + is disabled. */ + if( pxTCPPacket->xTCPHeader.usChecksum == 0x00u ) + { + pxTCPPacket->xTCPHeader.usChecksum = 0xffffU; + } + } + #endif + + #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) + pxNetworkBuffer->pxNextBuffer = NULL; + #endif + + /* Important: tell NIC driver how many bytes must be sent. */ + pxNetworkBuffer->xDataLength = ulLen + ipSIZE_OF_ETH_HEADER; + + /* Fill in the destination MAC addresses. */ + memcpy( ( void * ) &( pxEthernetHeader->xDestinationAddress ), ( void * ) &( pxEthernetHeader->xSourceAddress ), + sizeof( pxEthernetHeader->xDestinationAddress ) ); + + /* The source MAC addresses is fixed to 'ipLOCAL_MAC_ADDRESS'. */ + memcpy( ( void * ) &( pxEthernetHeader->xSourceAddress) , ( void * ) ipLOCAL_MAC_ADDRESS, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); + + #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + BaseType_t xIndex; + + for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) + { + pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; + } + pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; + } + } + #endif + + /* Send! */ + xNetworkInterfaceOutput( pxNetworkBuffer, xReleaseAfterSend ); + + if( xReleaseAfterSend == pdFALSE ) + { + /* Swap-back some fields, as pxBuffer probably points to a socket field + containing the packet header. */ + vFlip_16( pxTCPPacket->xTCPHeader.usSourcePort, pxTCPPacket->xTCPHeader.usDestinationPort); + pxTCPPacket->xIPHeader.ulSourceIPAddress = pxTCPPacket->xIPHeader.ulDestinationIPAddress; + memcpy( pxEthernetHeader->xSourceAddress.ucBytes, pxEthernetHeader->xDestinationAddress.ucBytes, ( size_t ) ipMAC_ADDRESS_LENGTH_BYTES ); + } + else + { + /* Nothing to do: the buffer has been passed to DMA and will be released after use */ + } + } /* if( pxNetworkBuffer != NULL ) */ +} +/*-----------------------------------------------------------*/ + +/* + * The SYN event is very important: the sequence numbers, which have a kind of + * random starting value, are being synchronised. The sliding window manager + * (in FreeRTOS_TCP_WIN.c) needs to know them, along with the Maximum Segment + * Size (MSS) in use. + */ +static void prvTCPCreateWindow( FreeRTOS_Socket_t *pxSocket ) +{ + if( xTCPWindowLoggingLevel ) + FreeRTOS_debug_printf( ( "Limits (using): TCP Win size %lu Water %lu <= %lu <= %lu\n", + pxSocket->u.xTCP.uxRxWinSize * ipconfigTCP_MSS, + pxSocket->u.xTCP.uxLittleSpace , + pxSocket->u.xTCP.uxEnoughSpace, + pxSocket->u.xTCP.uxRxStreamSize ) ); + vTCPWindowCreate( + &pxSocket->u.xTCP.xTCPWindow, + ipconfigTCP_MSS * pxSocket->u.xTCP.uxRxWinSize, + ipconfigTCP_MSS * pxSocket->u.xTCP.uxTxWinSize, + pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber, + pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber, + ( uint32_t ) pxSocket->u.xTCP.usInitMSS ); +} +/*-----------------------------------------------------------*/ + +/* + * Connecting sockets have a special state: eCONNECT_SYN. In this phase, + * the Ethernet address of the target will be found using ARP. In case the + * target IP address is not within the netmask, the hardware address of the + * gateway will be used. + */ +static BaseType_t prvTCPPrepareConnect( FreeRTOS_Socket_t *pxSocket ) +{ +TCPPacket_t *pxTCPPacket; +IPHeader_t *pxIPHeader; +eARPLookupResult_t eReturned; +uint32_t ulRemoteIP; +MACAddress_t xEthAddress; +BaseType_t xReturn = pdTRUE; +uint32_t ulInitialSequenceNumber = 0; + + #if( ipconfigHAS_PRINTF != 0 ) + { + /* Only necessary for nicer logging. */ + memset( xEthAddress.ucBytes, '\0', sizeof( xEthAddress.ucBytes ) ); + } + #endif /* ipconfigHAS_PRINTF != 0 */ + + ulRemoteIP = FreeRTOS_htonl( pxSocket->u.xTCP.ulRemoteIP ); + + /* Determine the ARP cache status for the requested IP address. */ + eReturned = eARPGetCacheEntry( &( ulRemoteIP ), &( xEthAddress ) ); + + switch( eReturned ) + { + case eARPCacheHit: /* An ARP table lookup found a valid entry. */ + break; /* We can now prepare the SYN packet. */ + case eARPCacheMiss: /* An ARP table lookup did not find a valid entry. */ + case eCantSendPacket: /* There is no IP address, or an ARP is still in progress. */ + default: + /* Count the number of times it couldn't find the ARP address. */ + pxSocket->u.xTCP.ucRepCount++; + + FreeRTOS_debug_printf( ( "ARP for %lxip (using %lxip): rc=%d %02X:%02X:%02X %02X:%02X:%02X\n", + pxSocket->u.xTCP.ulRemoteIP, + FreeRTOS_htonl( ulRemoteIP ), + eReturned, + xEthAddress.ucBytes[ 0 ], + xEthAddress.ucBytes[ 1 ], + xEthAddress.ucBytes[ 2 ], + xEthAddress.ucBytes[ 3 ], + xEthAddress.ucBytes[ 4 ], + xEthAddress.ucBytes[ 5 ] ) ); + + /* And issue a (new) ARP request */ + FreeRTOS_OutputARPRequest( ulRemoteIP ); + + xReturn = pdFALSE; + } + + if( xReturn != pdFALSE ) + { + /* Get a difficult-to-predict initial sequence number for this 4-tuple. */ + ulInitialSequenceNumber = ulApplicationGetNextSequenceNumber( *ipLOCAL_IP_ADDRESS_POINTER, + pxSocket->usLocalPort, + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort ); + + /* Check for a random number generation error. */ + if( 0 == ulInitialSequenceNumber ) + { + xReturn = pdFALSE; + } + } + + if( xReturn != pdFALSE ) + { + /* The MAC-address of the peer (or gateway) has been found, + now prepare the initial TCP packet and some fields in the socket. */ + pxTCPPacket = ( TCPPacket_t * )pxSocket->u.xTCP.xPacket.u.ucLastPacket; + pxIPHeader = &pxTCPPacket->xIPHeader; + + /* reset the retry counter to zero. */ + pxSocket->u.xTCP.ucRepCount = 0u; + + /* And remember that the connect/SYN data are prepared. */ + pxSocket->u.xTCP.bits.bConnPrepared = pdTRUE_UNSIGNED; + + /* Now that the Ethernet address is known, the initial packet can be + prepared. */ + memset( pxSocket->u.xTCP.xPacket.u.ucLastPacket, '\0', sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ) ); + + /* Write the Ethernet address in Source, because it will be swapped by + prvTCPReturnPacket(). */ + memcpy( &pxTCPPacket->xEthernetHeader.xSourceAddress, &xEthAddress, sizeof( xEthAddress ) ); + + /* 'ipIPv4_FRAME_TYPE' is already in network-byte-order. */ + pxTCPPacket->xEthernetHeader.usFrameType = ipIPv4_FRAME_TYPE; + + pxIPHeader->ucVersionHeaderLength = 0x45u; + pxIPHeader->usLength = FreeRTOS_htons( sizeof( TCPPacket_t ) - sizeof( pxTCPPacket->xEthernetHeader ) ); + pxIPHeader->ucTimeToLive = ( uint8_t ) ipconfigTCP_TIME_TO_LIVE; + + pxIPHeader->ucProtocol = ( uint8_t ) ipPROTOCOL_TCP; + + /* Addresses and ports will be stored swapped because prvTCPReturnPacket + will swap them back while replying. */ + pxIPHeader->ulDestinationIPAddress = *ipLOCAL_IP_ADDRESS_POINTER; + pxIPHeader->ulSourceIPAddress = FreeRTOS_htonl( pxSocket->u.xTCP.ulRemoteIP ); + + pxTCPPacket->xTCPHeader.usSourcePort = FreeRTOS_htons( pxSocket->u.xTCP.usRemotePort ); + pxTCPPacket->xTCPHeader.usDestinationPort = FreeRTOS_htons( pxSocket->usLocalPort ); + + /* We are actively connecting, so the peer's Initial Sequence Number (ISN) + isn't known yet. */ + pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber = 0ul; + + /* Start with ISN (Initial Sequence Number). */ + pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber = ulInitialSequenceNumber; + + /* The TCP header size is 20 bytes, divided by 4 equals 5, which is put in + the high nibble of the TCP offset field. */ + pxTCPPacket->xTCPHeader.ucTCPOffset = 0x50u; + + /* Only set the SYN flag. */ + pxTCPPacket->xTCPHeader.ucTCPFlags = ipTCP_FLAG_SYN; + + /* Set the values of usInitMSS / usCurMSS for this socket. */ + prvSocketSetMSS( pxSocket ); + + /* The initial sequence numbers at our side are known. Later + vTCPWindowInit() will be called to fill in the peer's sequence numbers, but + first wait for a SYN+ACK reply. */ + prvTCPCreateWindow( pxSocket ); + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +/* For logging and debugging: make a string showing the TCP flags +*/ +#if( ipconfigHAS_DEBUG_PRINTF != 0 ) + + static const char *prvTCPFlagMeaning( UBaseType_t xFlags) + { + static char retString[10]; + snprintf(retString, sizeof( retString ), "%c%c%c%c%c%c%c%c%c", + ( xFlags & ipTCP_FLAG_FIN ) ? 'F' : '.', /* 0x0001: No more data from sender */ + ( xFlags & ipTCP_FLAG_SYN ) ? 'S' : '.', /* 0x0002: Synchronize sequence numbers */ + ( xFlags & ipTCP_FLAG_RST ) ? 'R' : '.', /* 0x0004: Reset the connection */ + ( xFlags & ipTCP_FLAG_PSH ) ? 'P' : '.', /* 0x0008: Push function: please push buffered data to the recv application */ + ( xFlags & ipTCP_FLAG_ACK ) ? 'A' : '.', /* 0x0010: Acknowledgment field is significant */ + ( xFlags & ipTCP_FLAG_URG ) ? 'U' : '.', /* 0x0020: Urgent pointer field is significant */ + ( xFlags & ipTCP_FLAG_ECN ) ? 'E' : '.', /* 0x0040: ECN-Echo */ + ( xFlags & ipTCP_FLAG_CWR ) ? 'C' : '.', /* 0x0080: Congestion Window Reduced */ + ( xFlags & ipTCP_FLAG_NS ) ? 'N' : '.'); /* 0x0100: ECN-nonce concealment protection */ + return retString; + } + /*-----------------------------------------------------------*/ + +#endif /* ipconfigHAS_DEBUG_PRINTF */ + +/* + * Parse the TCP option(s) received, if present. It has already been verified + * that: ((pxTCPHeader->ucTCPOffset & 0xf0) > 0x50), meaning that the TP header + * is longer than the usual 20 (5 x 4) bytes. + */ +static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ +TCPPacket_t * pxTCPPacket; +TCPHeader_t * pxTCPHeader; +const unsigned char *pucPtr; +const unsigned char *pucLast; +TCPWindow_t *pxTCPWindow; +BaseType_t xShouldContinueLoop; + + pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); + pxTCPHeader = &pxTCPPacket->xTCPHeader; + + /* A character pointer to iterate through the option data */ + pucPtr = pxTCPHeader->ucOptdata; + pucLast = pucPtr + (((pxTCPHeader->ucTCPOffset >> 4) - 5) << 2); + pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; + + /* Validate options size calculation. */ + if( pucLast > ( pxNetworkBuffer->pucEthernetBuffer + pxNetworkBuffer->xDataLength ) ) + { + return; + } + + /* The comparison with pucLast is only necessary in case the option data are + corrupted, we don't like to run into invalid memory and crash. */ + xShouldContinueLoop = pdTRUE; + while( ( pucPtr < pucLast ) && ( xShouldContinueLoop == pdTRUE ) ) + { + xShouldContinueLoop = prvSingleStepTCPHeaderOptions( &pucPtr, &pucLast, &pxSocket, &pxTCPWindow ); + } +} + +/*-----------------------------------------------------------*/ + +static BaseType_t prvSingleStepTCPHeaderOptions( const unsigned char ** const ppucPtr, const unsigned char ** const ppucLast, FreeRTOS_Socket_t ** const ppxSocket, TCPWindow_t ** const ppxTCPWindow) +{ + UBaseType_t uxNewMSS; + UBaseType_t xRemainingOptionsBytes = ( *ppucLast ) - ( *ppucPtr ); + unsigned char ucLen; + + if( ( *ppucPtr )[ 0 ] == TCP_OPT_END ) + { + /* End of options. */ + return pdFALSE; + } + if( ( *ppucPtr )[ 0 ] == TCP_OPT_NOOP) + { + /* NOP option, inserted to make the length a multiple of 4. */ + ( *ppucPtr )++; + return pdTRUE; + } + + /* Any other well-formed option must be at least two bytes: the option + type byte followed by a length byte. */ + if( xRemainingOptionsBytes < 2 ) + { + return pdFALSE; + } +#if( ipconfigUSE_TCP_WIN != 0 ) + else if( ( *ppucPtr )[ 0 ] == TCP_OPT_WSOPT ) + { + /* Confirm that the option fits in the remaining buffer space. */ + if( ( xRemainingOptionsBytes < TCP_OPT_WSOPT_LEN ) || ( ( *ppucPtr )[ 1 ] != TCP_OPT_WSOPT_LEN ) ) + { + return pdFALSE; + } + + ( *ppxSocket )->u.xTCP.ucPeerWinScaleFactor = ( *ppucPtr )[ 2 ]; + ( *ppxSocket )->u.xTCP.bits.bWinScaling = pdTRUE_UNSIGNED; + ( *ppucPtr ) += TCP_OPT_WSOPT_LEN; + } +#endif /* ipconfigUSE_TCP_WIN */ + else if( ( *ppucPtr )[ 0 ] == TCP_OPT_MSS ) + { + /* Confirm that the option fits in the remaining buffer space. */ + if( ( xRemainingOptionsBytes < TCP_OPT_MSS_LEN )|| ( ( *ppucPtr )[ 1 ] != TCP_OPT_MSS_LEN ) ) + { + return pdFALSE; + } + + /* An MSS option with the correct option length. FreeRTOS_htons() + is not needed here because usChar2u16() already returns a host + endian number. */ + uxNewMSS = usChar2u16( ( *ppucPtr ) + 2 ); + + if( ( *ppxSocket )->u.xTCP.usInitMSS != uxNewMSS ) + { + /* Perform a basic check on the the new MSS. */ + if( uxNewMSS == 0 ) + { + return pdFALSE; + } + + FreeRTOS_debug_printf( ( "MSS change %u -> %lu\n", ( *ppxSocket )->u.xTCP.usInitMSS, uxNewMSS ) ); + } + + if( ( *ppxSocket )->u.xTCP.usInitMSS > uxNewMSS ) + { + /* our MSS was bigger than the MSS of the other party: adapt it. */ + ( *ppxSocket )->u.xTCP.bits.bMssChange = pdTRUE_UNSIGNED; + if( ( ( *ppxTCPWindow ) != NULL ) && ( ( *ppxSocket )->u.xTCP.usCurMSS > uxNewMSS ) ) + { + /* The peer advertises a smaller MSS than this socket was + using. Use that as well. */ + FreeRTOS_debug_printf( ( "Change mss %d => %lu\n", ( *ppxSocket )->u.xTCP.usCurMSS, uxNewMSS ) ); + ( *ppxSocket )->u.xTCP.usCurMSS = ( uint16_t ) uxNewMSS; + } + ( *ppxTCPWindow )->xSize.ulRxWindowLength = ( ( uint32_t ) uxNewMSS ) * ( ( *ppxTCPWindow )->xSize.ulRxWindowLength / ( ( uint32_t ) uxNewMSS ) ); + ( *ppxTCPWindow )->usMSSInit = ( uint16_t ) uxNewMSS; + ( *ppxTCPWindow )->usMSS = ( uint16_t ) uxNewMSS; + ( *ppxSocket )->u.xTCP.usInitMSS = ( uint16_t ) uxNewMSS; + ( *ppxSocket )->u.xTCP.usCurMSS = ( uint16_t ) uxNewMSS; + } + + #if( ipconfigUSE_TCP_WIN != 1 ) + /* Without scaled windows, MSS is the only interesting option. */ + return pdFALSE; + #else + /* Or else we continue to check another option: selective ACK. */ + ( *ppucPtr ) += TCP_OPT_MSS_LEN; + #endif /* ipconfigUSE_TCP_WIN != 1 */ + } + else + { + /* All other options have a length field, so that we easily + can skip past them. */ + ucLen = ( *ppucPtr )[ 1 ]; + if( ( ucLen < 2 ) || ( ucLen > xRemainingOptionsBytes ) ) + { + /* If the length field is too small or too big, the options are + * malformed, don't process them further. + */ + return pdFALSE; + } + + #if( ipconfigUSE_TCP_WIN == 1 ) + { + /* Selective ACK: the peer has received a packet but it is missing + * earlier packets. At least this packet does not need retransmission + * anymore. ulTCPWindowTxSack( ) takes care of this administration. + */ + if( ( *ppucPtr )[0] == TCP_OPT_SACK_A ) + { + ucLen -= 2; + ( *ppucPtr ) += 2; + + while( ucLen >= 8 ) + { + prvSkipPastRemainingOptions( ppucPtr, ppxSocket, &ucLen ); + } + /* ucLen should be 0 by now. */ + } + } + #endif /* ipconfigUSE_TCP_WIN == 1 */ + + ( *ppucPtr ) += ucLen; + } + return pdTRUE; +} + +/*-----------------------------------------------------------*/ + +static void prvSkipPastRemainingOptions( const unsigned char ** const ppucPtr, FreeRTOS_Socket_t ** const ppxSocket, unsigned char * const pucLen ) +{ +uint32_t ulFirst = ulChar2u32( ( *ppucPtr ) ); +uint32_t ulLast = ulChar2u32( ( *ppucPtr ) + 4 ); +uint32_t ulCount = ulTCPWindowTxSack( &( *ppxSocket )->u.xTCP.xTCPWindow, ulFirst, ulLast ); + /* ulTCPWindowTxSack( ) returns the number of bytes which have been acked + * starting from the head position. Advance the tail pointer in txStream. + */ + if( ( ( *ppxSocket )->u.xTCP.txStream != NULL ) && ( ulCount > 0 ) ) + { + /* Just advancing the tail index, 'ulCount' bytes have been confirmed. */ + uxStreamBufferGet( ( *ppxSocket )->u.xTCP.txStream, 0, NULL, ( size_t ) ulCount, pdFALSE ); + ( *ppxSocket )->xEventBits |= eSOCKET_SEND; + + #if ipconfigSUPPORT_SELECT_FUNCTION == 1 + { + if( ( *ppxSocket )->xSelectBits & eSELECT_WRITE ) + { + /* The field 'xEventBits' is used to store regular socket events + * (at most 8), as well as 'select events', which will be left-shifted. + */ + ( *ppxSocket )->xEventBits |= ( eSELECT_WRITE << SOCKET_EVENT_BIT_COUNT ); + } + } + #endif + + /* In case the socket owner has installed an OnSent handler, call it now. + */ + #if( ipconfigUSE_CALLBACKS == 1 ) + { + if( ipconfigIS_VALID_PROG_ADDRESS( ( *ppxSocket )->u.xTCP.pxHandleSent ) ) + { + ( *ppxSocket )->u.xTCP.pxHandleSent( (Socket_t )( *ppxSocket ), ulCount ); + } + } + #endif /* ipconfigUSE_CALLBACKS == 1 */ + } + ( *ppucPtr ) += 8; + ( *pucLen ) -= 8; +} + +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN != 0 ) + + static uint8_t prvWinScaleFactor( FreeRTOS_Socket_t *pxSocket ) + { + size_t uxWinSize; + uint8_t ucFactor; + + /* 'xTCP.uxRxWinSize' is the size of the reception window in units of MSS. */ + uxWinSize = pxSocket->u.xTCP.uxRxWinSize * ( size_t ) pxSocket->u.xTCP.usInitMSS; + ucFactor = 0u; + while( uxWinSize > 0xfffful ) + { + /* Divide by two and increase the binary factor by 1. */ + uxWinSize >>= 1; + ucFactor++; + } + + FreeRTOS_debug_printf( ( "prvWinScaleFactor: uxRxWinSize %lu MSS %lu Factor %u\n", + pxSocket->u.xTCP.uxRxWinSize, + pxSocket->u.xTCP.usInitMSS, + ucFactor ) ); + + return ucFactor; + } + +#endif +/*-----------------------------------------------------------*/ + +/* + * When opening a TCP connection, while SYN's are being sent, the parties may + * communicate what MSS (Maximum Segment Size) they intend to use. MSS is the + * nett size of the payload, always smaller than MTU. +*/ +static UBaseType_t prvSetSynAckOptions( FreeRTOS_Socket_t *pxSocket, TCPPacket_t * pxTCPPacket ) +{ +TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; +uint16_t usMSS = pxSocket->u.xTCP.usInitMSS; +UBaseType_t uxOptionsLength; + + /* We send out the TCP Maximum Segment Size option with our SYN[+ACK]. */ + + pxTCPHeader->ucOptdata[ 0 ] = ( uint8_t ) TCP_OPT_MSS; + pxTCPHeader->ucOptdata[ 1 ] = ( uint8_t ) TCP_OPT_MSS_LEN; + pxTCPHeader->ucOptdata[ 2 ] = ( uint8_t ) ( usMSS >> 8 ); + pxTCPHeader->ucOptdata[ 3 ] = ( uint8_t ) ( usMSS & 0xffu ); + + #if( ipconfigUSE_TCP_WIN != 0 ) + { + pxSocket->u.xTCP.ucMyWinScaleFactor = prvWinScaleFactor( pxSocket ); + + pxTCPHeader->ucOptdata[ 4 ] = TCP_OPT_NOOP; + pxTCPHeader->ucOptdata[ 5 ] = ( uint8_t ) ( TCP_OPT_WSOPT ); + pxTCPHeader->ucOptdata[ 6 ] = ( uint8_t ) ( TCP_OPT_WSOPT_LEN ); + pxTCPHeader->ucOptdata[ 7 ] = ( uint8_t ) pxSocket->u.xTCP.ucMyWinScaleFactor; + uxOptionsLength = 8u; + } + #else + { + uxOptionsLength = 4u; + } + #endif + + #if( ipconfigUSE_TCP_WIN == 0 ) + { + return uxOptionsLength; + } + #else + { + pxTCPHeader->ucOptdata[ uxOptionsLength + 0 ] = TCP_OPT_NOOP; + pxTCPHeader->ucOptdata[ uxOptionsLength + 1 ] = TCP_OPT_NOOP; + pxTCPHeader->ucOptdata[ uxOptionsLength + 2 ] = TCP_OPT_SACK_P; /* 4: Sack-Permitted Option. */ + pxTCPHeader->ucOptdata[ uxOptionsLength + 3 ] = 2; /* 2: length of this option. */ + uxOptionsLength += 4u; + + return uxOptionsLength; /* bytes, not words. */ + } + #endif /* ipconfigUSE_TCP_WIN == 0 */ +} + +/* + * For anti-hanging protection and TCP keep-alive messages. Called in two + * places: after receiving a packet and after a state change. The socket's + * alive timer may be reset. + */ +static void prvTCPTouchSocket( FreeRTOS_Socket_t *pxSocket ) +{ + #if( ipconfigTCP_HANG_PROTECTION == 1 ) + { + pxSocket->u.xTCP.xLastActTime = xTaskGetTickCount( ); + } + #endif + + #if( ipconfigTCP_KEEP_ALIVE == 1 ) + { + pxSocket->u.xTCP.bits.bWaitKeepAlive = pdFALSE_UNSIGNED; + pxSocket->u.xTCP.bits.bSendKeepAlive = pdFALSE_UNSIGNED; + pxSocket->u.xTCP.ucKeepRepCount = 0u; + pxSocket->u.xTCP.xLastAliveTime = xTaskGetTickCount(); + } + #endif + + ( void ) pxSocket; +} +/*-----------------------------------------------------------*/ + +/* + * Changing to a new state. Centralised here to do specific actions such as + * resetting the alive timer, calling the user's OnConnect handler to notify + * that a socket has got (dis)connected, and setting bit to unblock a call to + * FreeRTOS_select() + */ +void vTCPStateChange( FreeRTOS_Socket_t *pxSocket, enum eTCP_STATE eTCPState ) +{ +FreeRTOS_Socket_t *xParent = NULL; +BaseType_t bBefore = ( BaseType_t ) NOW_CONNECTED( pxSocket->u.xTCP.ucTCPState ); /* Was it connected ? */ +BaseType_t bAfter = ( BaseType_t ) NOW_CONNECTED( eTCPState ); /* Is it connected now ? */ +#if( ipconfigHAS_DEBUG_PRINTF != 0 ) + BaseType_t xPreviousState = ( BaseType_t ) pxSocket->u.xTCP.ucTCPState; +#endif +#if( ipconfigUSE_CALLBACKS == 1 ) + FreeRTOS_Socket_t *xConnected = NULL; +#endif + + /* Has the connected status changed? */ + if( bBefore != bAfter ) + { + /* Is the socket connected now ? */ + if( bAfter != pdFALSE ) + { + /* if bPassQueued is true, this socket is an orphan until it gets connected. */ + if( pxSocket->u.xTCP.bits.bPassQueued != pdFALSE_UNSIGNED ) + { + /* Now that it is connected, find it's parent. */ + if( pxSocket->u.xTCP.bits.bReuseSocket != pdFALSE_UNSIGNED ) + { + xParent = pxSocket; + } + else + { + xParent = pxSocket->u.xTCP.pxPeerSocket; + configASSERT( xParent != NULL ); + } + if( xParent != NULL ) + { + if( xParent->u.xTCP.pxPeerSocket == NULL ) + { + xParent->u.xTCP.pxPeerSocket = pxSocket; + } + + xParent->xEventBits |= eSOCKET_ACCEPT; + + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + { + /* Library support FreeRTOS_select(). Receiving a new + connection is being translated as a READ event. */ + if( ( xParent->xSelectBits & eSELECT_READ ) != 0 ) + { + xParent->xEventBits |= ( eSELECT_READ << SOCKET_EVENT_BIT_COUNT ); + } + } + #endif + + #if( ipconfigUSE_CALLBACKS == 1 ) + { + if( ( ipconfigIS_VALID_PROG_ADDRESS( xParent->u.xTCP.pxHandleConnected ) != pdFALSE ) && + ( xParent->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) ) + { + /* The listening socket does not become connected itself, in stead + a child socket is created. + Postpone a call the OnConnect event until the end of this function. */ + xConnected = xParent; + } + } + #endif + } + + /* Don't need to access the parent socket anymore, so the + reference 'pxPeerSocket' may be cleared. */ + pxSocket->u.xTCP.pxPeerSocket = NULL; + pxSocket->u.xTCP.bits.bPassQueued = pdFALSE_UNSIGNED; + + /* When true, this socket may be returned in a call to accept(). */ + pxSocket->u.xTCP.bits.bPassAccept = pdTRUE_UNSIGNED; + } + else + { + pxSocket->xEventBits |= eSOCKET_CONNECT; + + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + { + if( pxSocket->xSelectBits & eSELECT_WRITE ) + { + pxSocket->xEventBits |= ( eSELECT_WRITE << SOCKET_EVENT_BIT_COUNT ); + } + } + #endif + } + } + else /* bAfter == pdFALSE, connection is closed. */ + { + /* Notify/wake-up the socket-owner by setting a semaphore. */ + pxSocket->xEventBits |= eSOCKET_CLOSED; + + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + { + if( ( pxSocket->xSelectBits & eSELECT_EXCEPT ) != 0 ) + { + pxSocket->xEventBits |= ( eSELECT_EXCEPT << SOCKET_EVENT_BIT_COUNT ); + } + } + #endif + } + #if( ipconfigUSE_CALLBACKS == 1 ) + { + if( ( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xTCP.pxHandleConnected ) != pdFALSE ) && ( xConnected == NULL ) ) + { + /* The 'connected' state has changed, call the user handler. */ + xConnected = pxSocket; + } + } + #endif /* ipconfigUSE_CALLBACKS */ + + if( prvTCPSocketIsActive( ( UBaseType_t ) pxSocket->u.xTCP.ucTCPState ) == pdFALSE ) + { + /* Now the socket isn't in an active state anymore so it + won't need further attention of the IP-task. + Setting time-out to zero means that the socket won't get checked during + timer events. */ + pxSocket->u.xTCP.usTimeout = 0u; + } + } + else + { + if( eTCPState == eCLOSED ) + { + /* Socket goes to status eCLOSED because of a RST. + When nobody owns the socket yet, delete it. */ + if( ( pxSocket->u.xTCP.bits.bPassQueued != pdFALSE_UNSIGNED ) || + ( pxSocket->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) ) + { + FreeRTOS_debug_printf( ( "vTCPStateChange: Closing socket\n" ) ); + if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED ) + { + FreeRTOS_closesocket( pxSocket ); + } + } + } + } + + /* Fill in the new state. */ + pxSocket->u.xTCP.ucTCPState = ( uint8_t ) eTCPState; + + /* touch the alive timers because moving to another state. */ + prvTCPTouchSocket( pxSocket ); + + #if( ipconfigHAS_DEBUG_PRINTF == 1 ) + { + if( ( xTCPWindowLoggingLevel >= 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) ) + FreeRTOS_debug_printf( ( "Socket %d -> %lxip:%u State %s->%s\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort, + FreeRTOS_GetTCPStateName( ( UBaseType_t ) xPreviousState ), + FreeRTOS_GetTCPStateName( ( UBaseType_t ) eTCPState ) ) ); + } + #endif /* ipconfigHAS_DEBUG_PRINTF */ + + #if( ipconfigUSE_CALLBACKS == 1 ) + { + if( xConnected != NULL ) + { + /* The 'connected' state has changed, call the OnConnect handler of the parent. */ + xConnected->u.xTCP.pxHandleConnected( ( Socket_t ) xConnected, bAfter ); + } + } + #endif + if( xParent != NULL ) + { + vSocketWakeUpUser( xParent ); + } +} +/*-----------------------------------------------------------*/ + +static NetworkBufferDescriptor_t *prvTCPBufferResize( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer, + int32_t lDataLen, UBaseType_t uxOptionsLength ) +{ +NetworkBufferDescriptor_t *pxReturn; +int32_t lNeeded; +BaseType_t xResize; + + if( xBufferAllocFixedSize != pdFALSE ) + { + /* Network buffers are created with a fixed size and can hold the largest + MTU. */ + lNeeded = ( int32_t ) ipTOTAL_ETHERNET_FRAME_SIZE; + /* and therefore, the buffer won't be too small. + Only ask for a new network buffer in case none was supplied. */ + xResize = ( pxNetworkBuffer == NULL ); + } + else + { + /* Network buffers are created with a variable size. See if it must + grow. */ + lNeeded = FreeRTOS_max_int32( ( int32_t ) sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ), + ( int32_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ) + lDataLen ); + /* In case we were called from a TCP timer event, a buffer must be + created. Otherwise, test 'xDataLength' of the provided buffer. */ + xResize = ( pxNetworkBuffer == NULL ) || ( pxNetworkBuffer->xDataLength < (size_t)lNeeded ); + } + + if( xResize != pdFALSE ) + { + /* The caller didn't provide a network buffer or the provided buffer is + too small. As we must send-out a data packet, a buffer will be created + here. */ + pxReturn = pxGetNetworkBufferWithDescriptor( ( uint32_t ) lNeeded, 0u ); + + if( pxReturn != NULL ) + { + /* Set the actual packet size, in case the returned buffer is larger. */ + pxReturn->xDataLength = lNeeded; + + /* Copy the existing data to the new created buffer. */ + if( pxNetworkBuffer ) + { + /* Either from the previous buffer... */ + memcpy( pxReturn->pucEthernetBuffer, pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength ); + + /* ...and release it. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + else + { + /* Or from the socket field 'xTCP.xPacket'. */ + memcpy( pxReturn->pucEthernetBuffer, pxSocket->u.xTCP.xPacket.u.ucLastPacket, sizeof( pxSocket->u.xTCP.xPacket.u.ucLastPacket ) ); + } + } + } + else + { + /* xResize is false, the network buffer provided was big enough. */ + pxReturn = pxNetworkBuffer; + + /* Thanks to Andrey Ivanov from swissEmbedded for reporting that the + xDataLength member must get the correct length too! */ + pxNetworkBuffer->xDataLength = ( size_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ) + ( size_t ) lDataLen; + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ + +/* + * Prepare an outgoing message, in case anything has to be sent. + */ +static int32_t prvTCPPrepareSend( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, UBaseType_t uxOptionsLength ) +{ +int32_t lDataLen; +uint8_t *pucEthernetBuffer, *pucSendData; +TCPPacket_t *pxTCPPacket; +size_t uxOffset; +uint32_t ulDataGot, ulDistance; +TCPWindow_t *pxTCPWindow; +NetworkBufferDescriptor_t *pxNewBuffer; +int32_t lStreamPos; + + if( ( *ppxNetworkBuffer ) != NULL ) + { + /* A network buffer descriptor was already supplied */ + pucEthernetBuffer = ( *ppxNetworkBuffer )->pucEthernetBuffer; + } + else + { + /* For now let it point to the last packet header */ + pucEthernetBuffer = pxSocket->u.xTCP.xPacket.u.ucLastPacket; + } + + pxTCPPacket = ( TCPPacket_t * ) ( pucEthernetBuffer ); + pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; + lDataLen = 0; + lStreamPos = 0; + pxTCPPacket->xTCPHeader.ucTCPFlags |= ipTCP_FLAG_ACK; + + if( pxSocket->u.xTCP.txStream != NULL ) + { + /* ulTCPWindowTxGet will return the amount of data which may be sent + along with the position in the txStream. + Why check for MSS > 1 ? + Because some TCP-stacks (like uIP) use it for flow-control. */ + if( pxSocket->u.xTCP.usCurMSS > 1u ) + { + lDataLen = ( int32_t ) ulTCPWindowTxGet( pxTCPWindow, pxSocket->u.xTCP.ulWindowSize, &lStreamPos ); + } + + if( lDataLen > 0 ) + { + /* Check if the current network buffer is big enough, if not, + resize it. */ + pxNewBuffer = prvTCPBufferResize( pxSocket, *ppxNetworkBuffer, lDataLen, uxOptionsLength ); + + if( pxNewBuffer != NULL ) + { + *ppxNetworkBuffer = pxNewBuffer; + pucEthernetBuffer = pxNewBuffer->pucEthernetBuffer; + pxTCPPacket = ( TCPPacket_t * ) ( pucEthernetBuffer ); + + pucSendData = pucEthernetBuffer + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength; + + /* Translate the position in txStream to an offset from the tail + marker. */ + uxOffset = uxStreamBufferDistance( pxSocket->u.xTCP.txStream, pxSocket->u.xTCP.txStream->uxTail, ( size_t ) lStreamPos ); + + /* Here data is copied from the txStream in 'peek' mode. Only + when the packets are acked, the tail marker will be updated. */ + ulDataGot = ( uint32_t ) uxStreamBufferGet( pxSocket->u.xTCP.txStream, uxOffset, pucSendData, ( size_t ) lDataLen, pdTRUE ); + + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + if( ulDataGot != ( uint32_t ) lDataLen ) + { + FreeRTOS_debug_printf( ( "uxStreamBufferGet: pos %lu offs %lu only %lu != %lu\n", + lStreamPos, uxOffset, ulDataGot, lDataLen ) ); + } + } + #endif + + /* If the owner of the socket requests a closure, add the FIN + flag to the last packet. */ + if( ( pxSocket->u.xTCP.bits.bCloseRequested != pdFALSE_UNSIGNED ) && ( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) ) + { + ulDistance = ( uint32_t ) uxStreamBufferDistance( pxSocket->u.xTCP.txStream, ( size_t ) lStreamPos, pxSocket->u.xTCP.txStream->uxHead ); + + if( ulDistance == ulDataGot ) + { + #if (ipconfigHAS_DEBUG_PRINTF == 1) + { + /* the order of volatile accesses is undefined + so such workaround */ + size_t uxHead = pxSocket->u.xTCP.txStream->uxHead; + size_t uxMid = pxSocket->u.xTCP.txStream->uxMid; + size_t uxTail = pxSocket->u.xTCP.txStream->uxTail; + + FreeRTOS_debug_printf( ( "CheckClose %lu <= %lu (%lu <= %lu <= %lu)\n", ulDataGot, ulDistance, + uxTail, uxMid, uxHead ) ); + } + #endif + /* Although the socket sends a FIN, it will stay in + ESTABLISHED until all current data has been received or + delivered. */ + pxTCPPacket->xTCPHeader.ucTCPFlags |= ipTCP_FLAG_FIN; + pxTCPWindow->tx.ulFINSequenceNumber = pxTCPWindow->ulOurSequenceNumber + ( uint32_t ) lDataLen; + pxSocket->u.xTCP.bits.bFinSent = pdTRUE_UNSIGNED; + } + } + } + else + { + lDataLen = -1; + } + } + } + + if( ( lDataLen >= 0 ) && ( pxSocket->u.xTCP.ucTCPState == eESTABLISHED ) ) + { + /* See if the socket owner wants to shutdown this connection. */ + if( ( pxSocket->u.xTCP.bits.bUserShutdown != pdFALSE_UNSIGNED ) && + ( xTCPWindowTxDone( pxTCPWindow ) != pdFALSE ) ) + { + pxSocket->u.xTCP.bits.bUserShutdown = pdFALSE_UNSIGNED; + pxTCPPacket->xTCPHeader.ucTCPFlags |= ipTCP_FLAG_FIN; + pxSocket->u.xTCP.bits.bFinSent = pdTRUE_UNSIGNED; + pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; + pxTCPWindow->tx.ulFINSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; + vTCPStateChange( pxSocket, eFIN_WAIT_1 ); + } + + #if( ipconfigTCP_KEEP_ALIVE != 0 ) + { + if( pxSocket->u.xTCP.ucKeepRepCount > 3u ) + { + FreeRTOS_debug_printf( ( "keep-alive: giving up %lxip:%u\n", + pxSocket->u.xTCP.ulRemoteIP, /* IP address of remote machine. */ + pxSocket->u.xTCP.usRemotePort ) ); /* Port on remote machine. */ + vTCPStateChange( pxSocket, eCLOSE_WAIT ); + lDataLen = -1; + } + if( ( lDataLen == 0 ) && ( pxSocket->u.xTCP.bits.bWinChange == pdFALSE_UNSIGNED ) ) + { + /* If there is no data to be sent, and no window-update message, + we might want to send a keep-alive message. */ + TickType_t xAge = xTaskGetTickCount( ) - pxSocket->u.xTCP.xLastAliveTime; + TickType_t xMax; + xMax = ( ( TickType_t ) ipconfigTCP_KEEP_ALIVE_INTERVAL * configTICK_RATE_HZ ); + if( pxSocket->u.xTCP.ucKeepRepCount ) + { + xMax = ( 3u * configTICK_RATE_HZ ); + } + if( xAge > xMax ) + { + pxSocket->u.xTCP.xLastAliveTime = xTaskGetTickCount( ); + if( xTCPWindowLoggingLevel ) + FreeRTOS_debug_printf( ( "keep-alive: %lxip:%u count %u\n", + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort, + pxSocket->u.xTCP.ucKeepRepCount ) ); + pxSocket->u.xTCP.bits.bSendKeepAlive = pdTRUE_UNSIGNED; + pxSocket->u.xTCP.usTimeout = ( ( uint16_t ) pdMS_TO_TICKS( 2500 ) ); + pxSocket->u.xTCP.ucKeepRepCount++; + } + } + } + #endif /* ipconfigTCP_KEEP_ALIVE */ + } + + /* Anything to send, a change of the advertised window size, or maybe send a + keep-alive message? */ + if( ( lDataLen > 0 ) || + ( pxSocket->u.xTCP.bits.bWinChange != pdFALSE_UNSIGNED ) || + ( pxSocket->u.xTCP.bits.bSendKeepAlive != pdFALSE_UNSIGNED ) ) + { + pxTCPPacket->xTCPHeader.ucTCPFlags &= ( ( uint8_t ) ~ipTCP_FLAG_PSH ); + pxTCPPacket->xTCPHeader.ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + + pxTCPPacket->xTCPHeader.ucTCPFlags |= ( uint8_t ) ipTCP_FLAG_ACK; + + if( lDataLen != 0l ) + { + pxTCPPacket->xTCPHeader.ucTCPFlags |= ( uint8_t ) ipTCP_FLAG_PSH; + } + + lDataLen += ( int32_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); + } + + return lDataLen; +} +/*-----------------------------------------------------------*/ + +/* + * Calculate after how much time this socket needs to be checked again. + */ +static TickType_t prvTCPNextTimeout ( FreeRTOS_Socket_t *pxSocket ) +{ +TickType_t ulDelayMs = ( TickType_t ) tcpMAXIMUM_TCP_WAKEUP_TIME_MS; + + if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) + { + /* The socket is actively connecting to a peer. */ + if( pxSocket->u.xTCP.bits.bConnPrepared ) + { + /* Ethernet address has been found, use progressive timeout for + active connect(). */ + if( pxSocket->u.xTCP.ucRepCount < 3u ) + { + ulDelayMs = ( 3000UL << ( pxSocket->u.xTCP.ucRepCount - 1u ) ); + } + else + { + ulDelayMs = 11000UL; + } + } + else + { + /* Still in the ARP phase: check every half second. */ + ulDelayMs = 500UL; + } + + FreeRTOS_debug_printf( ( "Connect[%lxip:%u]: next timeout %u: %lu ms\n", + pxSocket->u.xTCP.ulRemoteIP, pxSocket->u.xTCP.usRemotePort, + pxSocket->u.xTCP.ucRepCount, ulDelayMs ) ); + pxSocket->u.xTCP.usTimeout = ( uint16_t )pdMS_TO_MIN_TICKS( ulDelayMs ); + } + else if( pxSocket->u.xTCP.usTimeout == 0u ) + { + /* Let the sliding window mechanism decide what time-out is appropriate. */ + BaseType_t xResult = xTCPWindowTxHasData( &pxSocket->u.xTCP.xTCPWindow, pxSocket->u.xTCP.ulWindowSize, &ulDelayMs ); + if( ulDelayMs == 0u ) + { + if( xResult != ( BaseType_t )0 ) + { + ulDelayMs = 1UL; + } + else + { + ulDelayMs = tcpMAXIMUM_TCP_WAKEUP_TIME_MS; + } + } + else + { + /* ulDelayMs contains the time to wait before a re-transmission. */ + } + pxSocket->u.xTCP.usTimeout = ( uint16_t )pdMS_TO_MIN_TICKS( ulDelayMs ); + } + else + { + /* field '.usTimeout' has already been set (by the + keep-alive/delayed-ACK mechanism). */ + } + + /* Return the number of clock ticks before the timer expires. */ + return ( TickType_t ) pxSocket->u.xTCP.usTimeout; +} +/*-----------------------------------------------------------*/ + +static void prvTCPAddTxData( FreeRTOS_Socket_t *pxSocket ) +{ +int32_t lCount, lLength; + + /* A txStream has been created already, see if the socket has new data for + the sliding window. + + uxStreamBufferMidSpace() returns the distance between rxHead and rxMid. It contains new + Tx data which has not been passed to the sliding window yet. The oldest + data not-yet-confirmed can be found at rxTail. */ + lLength = ( int32_t ) uxStreamBufferMidSpace( pxSocket->u.xTCP.txStream ); + + if( lLength > 0 ) + { + /* All data between txMid and rxHead will now be passed to the sliding + window manager, so it can start transmitting them. + + Hand over the new data to the sliding window handler. It will be + split-up in chunks of 1460 bytes each (or less, depending on + ipconfigTCP_MSS). */ + lCount = lTCPWindowTxAdd( &pxSocket->u.xTCP.xTCPWindow, + ( uint32_t ) lLength, + ( int32_t ) pxSocket->u.xTCP.txStream->uxMid, + ( int32_t ) pxSocket->u.xTCP.txStream->LENGTH ); + + /* Move the rxMid pointer forward up to rxHead. */ + if( lCount > 0 ) + { + vStreamBufferMoveMid( pxSocket->u.xTCP.txStream, ( size_t ) lCount ); + } + } +} +/*-----------------------------------------------------------*/ + +/* + * prvTCPHandleFin() will be called to handle socket closure + * The Closure starts when either a FIN has been received and accepted, + * Or when the socket has sent a FIN flag to the peer + * Before being called, it has been checked that both reception and transmission + * are complete. + */ +static BaseType_t prvTCPHandleFin( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; +uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; +TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; +BaseType_t xSendLength = 0; +uint32_t ulAckNr = FreeRTOS_ntohl( pxTCPHeader->ulAckNr ); + + if( ( ucTCPFlags & ipTCP_FLAG_FIN ) != 0u ) + { + pxTCPWindow->rx.ulCurrentSequenceNumber = pxTCPWindow->rx.ulFINSequenceNumber + 1u; + } + if( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) + { + /* We haven't yet replied with a FIN, do so now. */ + pxTCPWindow->tx.ulFINSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; + pxSocket->u.xTCP.bits.bFinSent = pdTRUE_UNSIGNED; + } + else + { + /* We did send a FIN already, see if it's ACK'd. */ + if( ulAckNr == pxTCPWindow->tx.ulFINSequenceNumber + 1u ) + { + pxSocket->u.xTCP.bits.bFinAcked = pdTRUE_UNSIGNED; + } + } + + if( pxSocket->u.xTCP.bits.bFinAcked == pdFALSE_UNSIGNED ) + { + pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->tx.ulFINSequenceNumber; + pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK | ipTCP_FLAG_FIN; + + /* And wait for the final ACK. */ + vTCPStateChange( pxSocket, eLAST_ACK ); + } + else + { + /* Our FIN has been ACK'd, the outgoing sequence number is now fixed. */ + pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->tx.ulFINSequenceNumber + 1u; + if( pxSocket->u.xTCP.bits.bFinRecv == pdFALSE_UNSIGNED ) + { + /* We have sent out a FIN but the peer hasn't replied with a FIN + yet. Do nothing for the moment. */ + pxTCPHeader->ucTCPFlags = 0u; + } + else + { + if( pxSocket->u.xTCP.bits.bFinLast == pdFALSE_UNSIGNED ) + { + /* This is the third of the three-way hand shake: the last + ACK. */ + pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK; + } + else + { + /* The other party started the closure, so we just wait for the + last ACK. */ + pxTCPHeader->ucTCPFlags = 0u; + } + + /* And wait for the user to close this socket. */ + vTCPStateChange( pxSocket, eCLOSE_WAIT ); + } + } + + pxTCPWindow->ulOurSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; + + if( pxTCPHeader->ucTCPFlags != 0u ) + { + xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + pxTCPWindow->ucOptionLength ); + } + + pxTCPHeader->ucTCPOffset = ( uint8_t ) ( ( ipSIZE_OF_TCP_HEADER + pxTCPWindow->ucOptionLength ) << 2 ); + + if( xTCPWindowLoggingLevel != 0 ) + { + FreeRTOS_debug_printf( ( "TCP: send FIN+ACK (ack %lu, cur/nxt %lu/%lu) ourSeqNr %lu | Rx %lu\n", + ulAckNr - pxTCPWindow->tx.ulFirstSequenceNumber, + pxTCPWindow->tx.ulCurrentSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, + pxTCPWindow->ulNextTxSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, + pxTCPWindow->ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, + pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber ) ); + } + + return xSendLength; +} +/*-----------------------------------------------------------*/ + +/* + * prvCheckRxData(): called from prvTCPHandleState() + * + * The first thing that will be done is find the TCP payload data + * and check the length of this data. + */ +static BaseType_t prvCheckRxData( NetworkBufferDescriptor_t *pxNetworkBuffer, uint8_t **ppucRecvData ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &( pxTCPPacket->xTCPHeader ); +int32_t lLength, lTCPHeaderLength, lReceiveLength, lUrgentLength; + + /* Determine the length and the offset of the user-data sent to this + node. + + The size of the TCP header is given in a multiple of 4-byte words (single + byte, needs no ntoh() translation). A shift-right 2: is the same as + (offset >> 4) * 4. */ + lTCPHeaderLength = ( BaseType_t ) ( ( pxTCPHeader->ucTCPOffset & VALID_BITS_IN_TCP_OFFSET_BYTE ) >> 2 ); + + /* Let pucRecvData point to the first byte received. */ + *ppucRecvData = pxNetworkBuffer->pucEthernetBuffer + ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + lTCPHeaderLength; + + /* Calculate lReceiveLength - the length of the TCP data received. This is + equal to the total packet length minus: + ( LinkLayer length (14) + IP header length (20) + size of TCP header(20 +) ).*/ + lReceiveLength = ( ( int32_t ) pxNetworkBuffer->xDataLength ) - ( int32_t ) ipSIZE_OF_ETH_HEADER; + lLength = ( int32_t )FreeRTOS_htons( pxTCPPacket->xIPHeader.usLength ); + + if( lReceiveLength > lLength ) + { + /* More bytes were received than the reported length, often because of + padding bytes at the end. */ + lReceiveLength = lLength; + } + + /* Subtract the size of the TCP and IP headers and the actual data size is + known. */ + if( lReceiveLength > ( lTCPHeaderLength + ( int32_t ) ipSIZE_OF_IPv4_HEADER ) ) + { + lReceiveLength -= ( lTCPHeaderLength + ( int32_t ) ipSIZE_OF_IPv4_HEADER ); + } + else + { + lReceiveLength = 0; + } + + /* Urgent Pointer: + This field communicates the current value of the urgent pointer as a + positive offset from the sequence number in this segment. The urgent + pointer points to the sequence number of the octet following the urgent + data. This field is only be interpreted in segments with the URG control + bit set. */ + if( ( pxTCPHeader->ucTCPFlags & ipTCP_FLAG_URG ) != 0u ) + { + /* Although we ignore the urgent data, we have to skip it. */ + lUrgentLength = ( int32_t ) FreeRTOS_htons( pxTCPHeader->usUrgent ); + *ppucRecvData += lUrgentLength; + lReceiveLength -= FreeRTOS_min_int32( lReceiveLength, lUrgentLength ); + } + + return ( BaseType_t ) lReceiveLength; +} +/*-----------------------------------------------------------*/ + +/* + * prvStoreRxData(): called from prvTCPHandleState() + * + * The second thing is to do is check if the payload data may be accepted + * If so, they will be added to the reception queue. + */ +static BaseType_t prvStoreRxData( FreeRTOS_Socket_t *pxSocket, uint8_t *pucRecvData, + NetworkBufferDescriptor_t *pxNetworkBuffer, uint32_t ulReceiveLength ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; +TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; +uint32_t ulSequenceNumber, ulSpace; +int32_t lOffset, lStored; +BaseType_t xResult = 0; + + ulSequenceNumber = FreeRTOS_ntohl( pxTCPHeader->ulSequenceNumber ); + + if( ( ulReceiveLength > 0u ) && ( pxSocket->u.xTCP.ucTCPState >= eSYN_RECEIVED ) ) + { + /* See if way may accept the data contents and forward it to the socket + owner. + + If it can't be "accept"ed it may have to be stored and send a selective + ack (SACK) option to confirm it. In that case, xTCPWindowRxStore() will be + called later to store an out-of-order packet (in case lOffset is + negative). */ + if ( pxSocket->u.xTCP.rxStream ) + { + ulSpace = ( uint32_t )uxStreamBufferGetSpace ( pxSocket->u.xTCP.rxStream ); + } + else + { + ulSpace = ( uint32_t )pxSocket->u.xTCP.uxRxStreamSize; + } + + lOffset = lTCPWindowRxCheck( pxTCPWindow, ulSequenceNumber, ulReceiveLength, ulSpace ); + + if( lOffset >= 0 ) + { + /* New data has arrived and may be made available to the user. See + if the head marker in rxStream may be advanced, only if lOffset == 0. + In case the low-water mark is reached, bLowWater will be set + "low-water" here stands for "little space". */ + lStored = lTCPAddRxdata( pxSocket, ( uint32_t ) lOffset, pucRecvData, ulReceiveLength ); + + if( lStored != ( int32_t ) ulReceiveLength ) + { + FreeRTOS_debug_printf( ( "lTCPAddRxdata: stored %ld / %lu bytes??\n", lStored, ulReceiveLength ) ); + + /* Received data could not be stored. The socket's flag + bMallocError has been set. The socket now has the status + eCLOSE_WAIT and a RST packet will be sent back. */ + prvTCPSendReset( pxNetworkBuffer ); + xResult = -1; + } + } + + /* After a missing packet has come in, higher packets may be passed to + the user. */ + #if( ipconfigUSE_TCP_WIN == 1 ) + { + /* Now lTCPAddRxdata() will move the rxHead pointer forward + so data becomes available to the user immediately + In case the low-water mark is reached, bLowWater will be set. */ + if( ( xResult == 0 ) && ( pxTCPWindow->ulUserDataLength > 0 ) ) + { + lTCPAddRxdata( pxSocket, 0ul, NULL, pxTCPWindow->ulUserDataLength ); + pxTCPWindow->ulUserDataLength = 0; + } + } + #endif /* ipconfigUSE_TCP_WIN */ + } + else + { + pxTCPWindow->ucOptionLength = 0u; + } + + return xResult; +} +/*-----------------------------------------------------------*/ + +/* Set the TCP options (if any) for the outgoing packet. */ +static UBaseType_t prvSetOptions( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; +TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; +UBaseType_t uxOptionsLength = pxTCPWindow->ucOptionLength; + + #if( ipconfigUSE_TCP_WIN == 1 ) + if( uxOptionsLength != 0u ) + { + /* TCP options must be sent because a packet which is out-of-order + was received. */ + if( xTCPWindowLoggingLevel >= 0 ) + FreeRTOS_debug_printf( ( "SACK[%d,%d]: optlen %lu sending %lu - %lu\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.usRemotePort, + uxOptionsLength, + FreeRTOS_ntohl( pxTCPWindow->ulOptionsData[ 1 ] ) - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber, + FreeRTOS_ntohl( pxTCPWindow->ulOptionsData[ 2 ] ) - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber ) ); + memcpy( pxTCPHeader->ucOptdata, pxTCPWindow->ulOptionsData, ( size_t ) uxOptionsLength ); + + /* The header length divided by 4, goes into the higher nibble, + effectively a shift-left 2. */ + pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + } + else + #endif /* ipconfigUSE_TCP_WIN */ + if( ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) && ( pxSocket->u.xTCP.bits.bMssChange != pdFALSE_UNSIGNED ) ) + { + /* TCP options must be sent because the MSS has changed. */ + pxSocket->u.xTCP.bits.bMssChange = pdFALSE_UNSIGNED; + if( xTCPWindowLoggingLevel >= 0 ) + { + FreeRTOS_debug_printf( ( "MSS: sending %d\n", pxSocket->u.xTCP.usCurMSS ) ); + } + + pxTCPHeader->ucOptdata[ 0 ] = TCP_OPT_MSS; + pxTCPHeader->ucOptdata[ 1 ] = TCP_OPT_MSS_LEN; + pxTCPHeader->ucOptdata[ 2 ] = ( uint8_t ) ( ( pxSocket->u.xTCP.usCurMSS ) >> 8 ); + pxTCPHeader->ucOptdata[ 3 ] = ( uint8_t ) ( ( pxSocket->u.xTCP.usCurMSS ) & 0xffu ); + uxOptionsLength = 4u; + pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + } + + return uxOptionsLength; +} +/*-----------------------------------------------------------*/ + +/* + * prvHandleSynReceived(): called from prvTCPHandleState() + * + * Called from the states: eSYN_RECEIVED and eCONNECT_SYN + * If the flags received are correct, the socket will move to eESTABLISHED. + */ +static BaseType_t prvHandleSynReceived( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, + uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; +TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; +uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; +uint32_t ulSequenceNumber = FreeRTOS_ntohl( pxTCPHeader->ulSequenceNumber ); +BaseType_t xSendLength = 0; + + /* Either expect a ACK or a SYN+ACK. */ + uint16_t usExpect = ( uint16_t ) ipTCP_FLAG_ACK; + if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) + { + usExpect |= ( uint16_t ) ipTCP_FLAG_SYN; + } + + if( ( ucTCPFlags & 0x17u ) != usExpect ) + { + /* eSYN_RECEIVED: flags 0010 expected, not 0002. */ + /* eSYN_RECEIVED: flags ACK expected, not SYN. */ + FreeRTOS_debug_printf( ( "%s: flags %04X expected, not %04X\n", + pxSocket->u.xTCP.ucTCPState == eSYN_RECEIVED ? "eSYN_RECEIVED" : "eCONNECT_SYN", + usExpect, ucTCPFlags ) ); + vTCPStateChange( pxSocket, eCLOSE_WAIT ); + pxTCPHeader->ucTCPFlags |= ipTCP_FLAG_RST; + xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); + pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + } + else + { + pxTCPWindow->usPeerPortNumber = pxSocket->u.xTCP.usRemotePort; + pxTCPWindow->usOurPortNumber = pxSocket->usLocalPort; + + if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) + { + TCPPacket_t *pxLastTCPPacket = ( TCPPacket_t * ) ( pxSocket->u.xTCP.xPacket.u.ucLastPacket ); + + /* Clear the SYN flag in lastPacket. */ + pxLastTCPPacket->xTCPHeader.ucTCPFlags = ipTCP_FLAG_ACK; + + /* This socket was the one connecting actively so now perofmr the + synchronisation. */ + vTCPWindowInit( &pxSocket->u.xTCP.xTCPWindow, + ulSequenceNumber, pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber, ( uint32_t ) pxSocket->u.xTCP.usCurMSS ); + pxTCPWindow->rx.ulCurrentSequenceNumber = pxTCPWindow->rx.ulHighestSequenceNumber = ulSequenceNumber + 1u; + pxTCPWindow->tx.ulCurrentSequenceNumber++; /* because we send a TCP_SYN [ | TCP_ACK ]; */ + pxTCPWindow->ulNextTxSequenceNumber++; + } + else if( ulReceiveLength == 0u ) + { + pxTCPWindow->rx.ulCurrentSequenceNumber = ulSequenceNumber; + } + + /* The SYN+ACK has been confirmed, increase the next sequence number by + 1. */ + pxTCPWindow->ulOurSequenceNumber = pxTCPWindow->tx.ulFirstSequenceNumber + 1u; + + #if( ipconfigUSE_TCP_WIN == 1 ) + { + FreeRTOS_debug_printf( ( "TCP: %s %d => %lxip:%d set ESTAB (scaling %u)\n", + pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ? "active" : "passive", + pxSocket->usLocalPort, + pxSocket->u.xTCP.ulRemoteIP, + pxSocket->u.xTCP.usRemotePort, + ( unsigned ) pxSocket->u.xTCP.bits.bWinScaling ) ); + } + #endif /* ipconfigUSE_TCP_WIN */ + + if( ( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) || ( ulReceiveLength != 0u ) ) + { + pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK; + xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); + pxTCPHeader->ucTCPOffset = ( uint8_t ) ( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + } + #if( ipconfigUSE_TCP_WIN != 0 ) + { + if( pxSocket->u.xTCP.bits.bWinScaling == pdFALSE_UNSIGNED ) + { + /* The other party did not send a scaling factor. + A shifting factor in this side must be canceled. */ + pxSocket->u.xTCP.ucMyWinScaleFactor = 0; + pxSocket->u.xTCP.ucPeerWinScaleFactor = 0; + } + } + #endif /* ipconfigUSE_TCP_WIN */ + /* This was the third step of connecting: SYN, SYN+ACK, ACK so now the + connection is established. */ + vTCPStateChange( pxSocket, eESTABLISHED ); + } + + return xSendLength; +} +/*-----------------------------------------------------------*/ + +/* + * prvHandleEstablished(): called from prvTCPHandleState() + * + * Called if the status is eESTABLISHED. Data reception has been handled + * earlier. Here the ACK's from peer will be checked, and if a FIN is received, + * the code will check if it may be accepted, i.e. if all expected data has been + * completely received. + */ +static BaseType_t prvHandleEstablished( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, + uint32_t ulReceiveLength, UBaseType_t uxOptionsLength ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; +TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; +uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; +uint32_t ulSequenceNumber = FreeRTOS_ntohl( pxTCPHeader->ulSequenceNumber ), ulCount; +BaseType_t xSendLength = 0, xMayClose = pdFALSE, bRxComplete, bTxDone; +int32_t lDistance, lSendResult; + + /* Remember the window size the peer is advertising. */ + pxSocket->u.xTCP.ulWindowSize = FreeRTOS_ntohs( pxTCPHeader->usWindow ); + #if( ipconfigUSE_TCP_WIN != 0 ) + { + pxSocket->u.xTCP.ulWindowSize = + ( pxSocket->u.xTCP.ulWindowSize << pxSocket->u.xTCP.ucPeerWinScaleFactor ); + } + #endif + + if( ( ucTCPFlags & ( uint8_t ) ipTCP_FLAG_ACK ) != 0u ) + { + ulCount = ulTCPWindowTxAck( pxTCPWindow, FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulAckNr ) ); + + /* ulTCPWindowTxAck() returns the number of bytes which have been acked, + starting at 'tx.ulCurrentSequenceNumber'. Advance the tail pointer in + txStream. */ + if( ( pxSocket->u.xTCP.txStream != NULL ) && ( ulCount > 0u ) ) + { + /* Just advancing the tail index, 'ulCount' bytes have been + confirmed, and because there is new space in the txStream, the + user/owner should be woken up. */ + /* _HT_ : only in case the socket's waiting? */ + if( uxStreamBufferGet( pxSocket->u.xTCP.txStream, 0u, NULL, ( size_t ) ulCount, pdFALSE ) != 0u ) + { + pxSocket->xEventBits |= eSOCKET_SEND; + + #if ipconfigSUPPORT_SELECT_FUNCTION == 1 + { + if( ( pxSocket->xSelectBits & eSELECT_WRITE ) != 0 ) + { + pxSocket->xEventBits |= ( eSELECT_WRITE << SOCKET_EVENT_BIT_COUNT ); + } + } + #endif + /* In case the socket owner has installed an OnSent handler, + call it now. */ + #if( ipconfigUSE_CALLBACKS == 1 ) + { + if( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xTCP.pxHandleSent ) ) + { + pxSocket->u.xTCP.pxHandleSent( ( Socket_t )pxSocket, ulCount ); + } + } + #endif /* ipconfigUSE_CALLBACKS == 1 */ + } + } + } + + /* If this socket has a stream for transmission, add the data to the + outgoing segment(s). */ + if( pxSocket->u.xTCP.txStream != NULL ) + { + prvTCPAddTxData( pxSocket ); + } + + pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber = pxTCPWindow->tx.ulCurrentSequenceNumber; + + if( ( pxSocket->u.xTCP.bits.bFinAccepted != pdFALSE_UNSIGNED ) || ( ( ucTCPFlags & ( uint8_t ) ipTCP_FLAG_FIN ) != 0u ) ) + { + /* Peer is requesting to stop, see if we're really finished. */ + xMayClose = pdTRUE; + + /* Checks are only necessary if we haven't sent a FIN yet. */ + if( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) + { + /* xTCPWindowTxDone returns true when all Tx queues are empty. */ + bRxComplete = xTCPWindowRxEmpty( pxTCPWindow ); + bTxDone = xTCPWindowTxDone( pxTCPWindow ); + + if( ( bRxComplete == 0 ) || ( bTxDone == 0 ) ) + { + /* Refusing FIN: Rx incomp 1 optlen 4 tx done 1. */ + FreeRTOS_debug_printf( ( "Refusing FIN[%u,%u]: RxCompl %lu tx done %ld\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.usRemotePort, + bRxComplete, bTxDone ) ); + xMayClose = pdFALSE; + } + else + { + lDistance = ( int32_t ) ( ulSequenceNumber + ulReceiveLength - pxTCPWindow->rx.ulCurrentSequenceNumber ); + + if( lDistance > 1 ) + { + FreeRTOS_debug_printf( ( "Refusing FIN: Rx not complete %ld (cur %lu high %lu)\n", + lDistance, pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber, + pxTCPWindow->rx.ulHighestSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber ) ); + + xMayClose = pdFALSE; + } + } + } + + if( xTCPWindowLoggingLevel > 0 ) + { + FreeRTOS_debug_printf( ( "TCP: FIN received, mayClose = %ld (Rx %lu Len %ld, Tx %lu)\n", + xMayClose, ulSequenceNumber - pxSocket->u.xTCP.xTCPWindow.rx.ulFirstSequenceNumber, ulReceiveLength, + pxTCPWindow->tx.ulCurrentSequenceNumber - pxSocket->u.xTCP.xTCPWindow.tx.ulFirstSequenceNumber ) ); + } + + if( xMayClose != pdFALSE ) + { + pxSocket->u.xTCP.bits.bFinAccepted = pdTRUE_UNSIGNED; + xSendLength = prvTCPHandleFin( pxSocket, *ppxNetworkBuffer ); + } + } + + if( xMayClose == pdFALSE ) + { + pxTCPHeader->ucTCPFlags = ipTCP_FLAG_ACK; + + if( ulReceiveLength != 0u ) + { + xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); + /* TCP-offsett equals '( ( length / 4 ) << 4 )', resulting in a shift-left 2 */ + pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + + if( pxSocket->u.xTCP.bits.bFinSent != pdFALSE_UNSIGNED ) + { + pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->tx.ulFINSequenceNumber; + } + } + + /* Now get data to be transmitted. */ + /* _HT_ patch: since the MTU has be fixed at 1500 in stead of 1526, TCP + can not send-out both TCP options and also a full packet. Sending + options (SACK) is always more urgent than sending data, which can be + sent later. */ + if( uxOptionsLength == 0u ) + { + /* prvTCPPrepareSend might allocate a bigger network buffer, if + necessary. */ + lSendResult = prvTCPPrepareSend( pxSocket, ppxNetworkBuffer, uxOptionsLength ); + if( lSendResult > 0 ) + { + xSendLength = ( BaseType_t ) lSendResult; + } + } + } + + return xSendLength; +} +/*-----------------------------------------------------------*/ + +/* + * Called from prvTCPHandleState(). There is data to be sent. If + * ipconfigUSE_TCP_WIN is defined, and if only an ACK must be sent, it will be + * checked if it would better be postponed for efficiency. + */ +static BaseType_t prvSendData( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer, + uint32_t ulReceiveLength, BaseType_t xSendLength ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &pxTCPPacket->xTCPHeader; +TCPWindow_t *pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; +/* Find out what window size we may advertised. */ +int32_t lRxSpace; +#if( ipconfigUSE_TCP_WIN == 1 ) + #if( ipconfigTCP_ACK_EARLIER_PACKET == 0 ) + const int32_t lMinLength = 0; + #else + int32_t lMinLength; + #endif +#endif + + /* Set the time-out field, so that we'll be called by the IP-task in case no + next message will be received. */ + lRxSpace = (int32_t)( pxSocket->u.xTCP.ulHighestRxAllowed - pxTCPWindow->rx.ulCurrentSequenceNumber ); + #if ipconfigUSE_TCP_WIN == 1 + { + + #if( ipconfigTCP_ACK_EARLIER_PACKET != 0 ) + { + lMinLength = ( ( int32_t ) 2 ) * ( ( int32_t ) pxSocket->u.xTCP.usCurMSS ); + } + #endif /* ipconfigTCP_ACK_EARLIER_PACKET */ + + /* In case we're receiving data continuously, we might postpone sending + an ACK to gain performance. */ + if( ( ulReceiveLength > 0 ) && /* Data was sent to this socket. */ + ( lRxSpace >= lMinLength ) && /* There is Rx space for more data. */ + ( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) && /* Not in a closure phase. */ + ( xSendLength == ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) ) && /* No Tx data or options to be sent. */ + ( pxSocket->u.xTCP.ucTCPState == eESTABLISHED ) && /* Connection established. */ + ( pxTCPHeader->ucTCPFlags == ipTCP_FLAG_ACK ) ) /* There are no other flags than an ACK. */ + { + if( pxSocket->u.xTCP.pxAckMessage != *ppxNetworkBuffer ) + { + /* There was still a delayed in queue, delete it. */ + if( pxSocket->u.xTCP.pxAckMessage != 0 ) + { + vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); + } + + pxSocket->u.xTCP.pxAckMessage = *ppxNetworkBuffer; + } + if( ( ulReceiveLength < ( uint32_t ) pxSocket->u.xTCP.usCurMSS ) || /* Received a small message. */ + ( lRxSpace < ( int32_t ) ( 2U * pxSocket->u.xTCP.usCurMSS ) ) ) /* There are less than 2 x MSS space in the Rx buffer. */ + { + pxSocket->u.xTCP.usTimeout = ( uint16_t ) pdMS_TO_MIN_TICKS( DELAYED_ACK_SHORT_DELAY_MS ); + } + else + { + /* Normally a delayed ACK should wait 200 ms for a next incoming + packet. Only wait 20 ms here to gain performance. A slow ACK + for full-size message. */ + pxSocket->u.xTCP.usTimeout = ( uint16_t ) pdMS_TO_MIN_TICKS( DELAYED_ACK_LONGER_DELAY_MS ); + } + + if( ( xTCPWindowLoggingLevel > 1 ) && ( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "Send[%u->%u] del ACK %lu SEQ %lu (len %lu) tmout %u d %lu\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.usRemotePort, + pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber, + pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, + xSendLength, + pxSocket->u.xTCP.usTimeout, lRxSpace ) ); + } + + *ppxNetworkBuffer = NULL; + xSendLength = 0; + } + else if( pxSocket->u.xTCP.pxAckMessage != NULL ) + { + /* As an ACK is not being delayed, remove any earlier delayed ACK + message. */ + if( pxSocket->u.xTCP.pxAckMessage != *ppxNetworkBuffer ) + { + vReleaseNetworkBufferAndDescriptor( pxSocket->u.xTCP.pxAckMessage ); + } + + pxSocket->u.xTCP.pxAckMessage = NULL; + } + } + #else + { + /* Remove compiler warnings. */ + ( void ) ulReceiveLength; + ( void ) pxTCPHeader; + ( void ) lRxSpace; + } + #endif /* ipconfigUSE_TCP_WIN */ + + if( xSendLength != 0 ) + { + if( ( xTCPWindowLoggingLevel > 1 ) && ( ipconfigTCP_MAY_LOG_PORT( pxSocket->usLocalPort ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "Send[%u->%u] imm ACK %lu SEQ %lu (len %lu)\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.usRemotePort, + pxTCPWindow->rx.ulCurrentSequenceNumber - pxTCPWindow->rx.ulFirstSequenceNumber, + pxTCPWindow->ulOurSequenceNumber - pxTCPWindow->tx.ulFirstSequenceNumber, + xSendLength ) ); + } + + /* Set the parameter 'xReleaseAfterSend' to the value of + ipconfigZERO_COPY_TX_DRIVER. */ + prvTCPReturnPacket( pxSocket, *ppxNetworkBuffer, ( uint32_t ) xSendLength, ipconfigZERO_COPY_TX_DRIVER ); + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* The driver has taken ownership of the Network Buffer. */ + *ppxNetworkBuffer = NULL; + } + #endif + } + + return xSendLength; +} +/*-----------------------------------------------------------*/ + +/* + * prvTCPHandleState() + * is the most important function of this TCP stack + * We've tried to keep it (relatively short) by putting a lot of code in + * the static functions above: + * + * prvCheckRxData() + * prvStoreRxData() + * prvSetOptions() + * prvHandleSynReceived() + * prvHandleEstablished() + * prvSendData() + * + * As these functions are declared static, and they're called from one location + * only, most compilers will inline them, thus avoiding a call and return. + */ +static BaseType_t prvTCPHandleState( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t **ppxNetworkBuffer ) +{ +TCPPacket_t *pxTCPPacket = ( TCPPacket_t * ) ( (*ppxNetworkBuffer)->pucEthernetBuffer ); +TCPHeader_t *pxTCPHeader = &( pxTCPPacket->xTCPHeader ); +BaseType_t xSendLength = 0; +uint32_t ulReceiveLength; /* Number of bytes contained in the TCP message. */ +uint8_t *pucRecvData; +uint32_t ulSequenceNumber = FreeRTOS_ntohl (pxTCPHeader->ulSequenceNumber); + + /* uxOptionsLength: the size of the options to be sent (always a multiple of + 4 bytes) + 1. in the SYN phase, we shall communicate the MSS + 2. in case of a SACK, Selective ACK, ack a segment which comes in + out-of-order. */ +UBaseType_t uxOptionsLength = 0u; +uint8_t ucTCPFlags = pxTCPHeader->ucTCPFlags; +TCPWindow_t *pxTCPWindow = &( pxSocket->u.xTCP.xTCPWindow ); + + /* First get the length and the position of the received data, if any. + pucRecvData will point to the first byte of the TCP payload. */ + ulReceiveLength = ( uint32_t ) prvCheckRxData( *ppxNetworkBuffer, &pucRecvData ); + + if( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) + { + if ( pxTCPWindow->rx.ulCurrentSequenceNumber == ulSequenceNumber + 1u ) + { + /* This is most probably a keep-alive message from peer. Setting + 'bWinChange' doesn't cause a window-size-change, the flag is used + here to force sending an immediate ACK. */ + pxSocket->u.xTCP.bits.bWinChange = pdTRUE_UNSIGNED; + } + } + + /* Keep track of the highest sequence number that might be expected within + this connection. */ + if( ( ( int32_t ) ( ulSequenceNumber + ulReceiveLength - pxTCPWindow->rx.ulHighestSequenceNumber ) ) > 0 ) + { + pxTCPWindow->rx.ulHighestSequenceNumber = ulSequenceNumber + ulReceiveLength; + } + + /* Storing data may result in a fatal error if malloc() fails. */ + if( prvStoreRxData( pxSocket, pucRecvData, *ppxNetworkBuffer, ulReceiveLength ) < 0 ) + { + xSendLength = -1; + } + else + { + uxOptionsLength = prvSetOptions( pxSocket, *ppxNetworkBuffer ); + + if( ( pxSocket->u.xTCP.ucTCPState == eSYN_RECEIVED ) && ( ( ucTCPFlags & ipTCP_FLAG_CTRL ) == ipTCP_FLAG_SYN ) ) + { + FreeRTOS_debug_printf( ( "eSYN_RECEIVED: ACK expected, not SYN: peer missed our SYN+ACK\n" ) ); + + /* In eSYN_RECEIVED a simple ACK is expected, but apparently the + 'SYN+ACK' didn't arrive. Step back to the previous state in which + a first incoming SYN is handled. The SYN was counted already so + decrease it first. */ + vTCPStateChange( pxSocket, eSYN_FIRST ); + } + + if( ( ( ucTCPFlags & ipTCP_FLAG_FIN ) != 0u ) && ( pxSocket->u.xTCP.bits.bFinRecv == pdFALSE_UNSIGNED ) ) + { + /* It's the first time a FIN has been received, remember its + sequence number. */ + pxTCPWindow->rx.ulFINSequenceNumber = ulSequenceNumber + ulReceiveLength; + pxSocket->u.xTCP.bits.bFinRecv = pdTRUE_UNSIGNED; + + /* Was peer the first one to send a FIN? */ + if( pxSocket->u.xTCP.bits.bFinSent == pdFALSE_UNSIGNED ) + { + /* If so, don't send the-last-ACK. */ + pxSocket->u.xTCP.bits.bFinLast = pdTRUE_UNSIGNED; + } + } + + switch (pxSocket->u.xTCP.ucTCPState) + { + case eCLOSED: /* (server + client) no connection state at all. */ + /* Nothing to do for a closed socket, except waiting for the + owner. */ + break; + + case eTCP_LISTEN: /* (server) waiting for a connection request from + any remote TCP and port. */ + /* The listen state was handled in xProcessReceivedTCPPacket(). + Should not come here. */ + break; + + case eSYN_FIRST: /* (server) Just received a SYN request for a server + socket. */ + { + /* A new socket has been created, reply with a SYN+ACK. + Acknowledge with seq+1 because the SYN is seen as pseudo data + with len = 1. */ + uxOptionsLength = prvSetSynAckOptions( pxSocket, pxTCPPacket ); + pxTCPHeader->ucTCPFlags = ipTCP_FLAG_SYN | ipTCP_FLAG_ACK; + + xSendLength = ( BaseType_t ) ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + uxOptionsLength ); + + /* Set the TCP offset field: ipSIZE_OF_TCP_HEADER equals 20 and + uxOptionsLength is a multiple of 4. The complete expression is: + ucTCPOffset = ( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) / 4 ) << 4 */ + pxTCPHeader->ucTCPOffset = ( uint8_t )( ( ipSIZE_OF_TCP_HEADER + uxOptionsLength ) << 2 ); + vTCPStateChange( pxSocket, eSYN_RECEIVED ); + + pxTCPWindow->rx.ulCurrentSequenceNumber = pxTCPWindow->rx.ulHighestSequenceNumber = ulSequenceNumber + 1u; + pxTCPWindow->tx.ulCurrentSequenceNumber = pxTCPWindow->ulNextTxSequenceNumber = pxTCPWindow->tx.ulFirstSequenceNumber + 1u; /* because we send a TCP_SYN. */ + } + break; + + case eCONNECT_SYN: /* (client) also called SYN_SENT: we've just send a + SYN, expect a SYN+ACK and send a ACK now. */ + /* Fall through */ + case eSYN_RECEIVED: /* (server) we've had a SYN, replied with SYN+SCK + expect a ACK and do nothing. */ + xSendLength = prvHandleSynReceived( pxSocket, ppxNetworkBuffer, ulReceiveLength, uxOptionsLength ); + break; + + case eESTABLISHED: /* (server + client) an open connection, data + received can be delivered to the user. The normal + state for the data transfer phase of the connection + The closing states are also handled here with the + use of some flags. */ + xSendLength = prvHandleEstablished( pxSocket, ppxNetworkBuffer, ulReceiveLength, uxOptionsLength ); + break; + + case eLAST_ACK: /* (server + client) waiting for an acknowledgement + of the connection termination request previously + sent to the remote TCP (which includes an + acknowledgement of its connection termination + request). */ + /* Fall through */ + case eFIN_WAIT_1: /* (server + client) waiting for a connection termination request from the remote TCP, + * or an acknowledgement of the connection termination request previously sent. */ + /* Fall through */ + case eFIN_WAIT_2: /* (server + client) waiting for a connection termination request from the remote TCP. */ + xSendLength = prvTCPHandleFin( pxSocket, *ppxNetworkBuffer ); + break; + + case eCLOSE_WAIT: /* (server + client) waiting for a connection + termination request from the local user. Nothing to + do, connection is closed, wait for owner to close + this socket. */ + break; + + case eCLOSING: /* (server + client) waiting for a connection + termination request acknowledgement from the remote + TCP. */ + break; + + case eTIME_WAIT: /* (either server or client) waiting for enough time + to pass to be sure the remote TCP received the + acknowledgement of its connection termination + request. [According to RFC 793 a connection can stay + in TIME-WAIT for a maximum of four minutes known as + a MSL (maximum segment lifetime).] These states are + implemented implicitly by settings flags like + 'bFinSent', 'bFinRecv', and 'bFinAcked'. */ + break; + default: + break; + } + } + + if( xSendLength > 0 ) + { + xSendLength = prvSendData( pxSocket, ppxNetworkBuffer, ulReceiveLength, xSendLength ); + } + + return xSendLength; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvTCPSendSpecialPacketHelper( NetworkBufferDescriptor_t *pxNetworkBuffer, + uint8_t ucTCPFlags ) +{ +#if( ipconfigIGNORE_UNKNOWN_PACKETS == 0 ) + { + TCPPacket_t *pxTCPPacket = ( TCPPacket_t * )( pxNetworkBuffer->pucEthernetBuffer ); + const BaseType_t xSendLength = ( BaseType_t ) + ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER + 0u ); /* Plus 0 options. */ + + pxTCPPacket->xTCPHeader.ucTCPFlags = ucTCPFlags; + pxTCPPacket->xTCPHeader.ucTCPOffset = ( ipSIZE_OF_TCP_HEADER + 0u ) << 2; + + prvTCPReturnPacket( NULL, pxNetworkBuffer, ( uint32_t )xSendLength, pdFALSE ); + } +#endif /* !ipconfigIGNORE_UNKNOWN_PACKETS */ + + /* Remove compiler warnings if ipconfigIGNORE_UNKNOWN_PACKETS == 1. */ + ( void )pxNetworkBuffer; + ( void )ucTCPFlags; + + /* The packet was not consumed. */ + return pdFAIL; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvTCPSendChallengeAck( NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ + return prvTCPSendSpecialPacketHelper( pxNetworkBuffer, ipTCP_FLAG_ACK ); +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvTCPSendReset( NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ + return prvTCPSendSpecialPacketHelper( pxNetworkBuffer, + ipTCP_FLAG_ACK | ipTCP_FLAG_RST ); +} +/*-----------------------------------------------------------*/ + +static void prvSocketSetMSS( FreeRTOS_Socket_t *pxSocket ) +{ +uint32_t ulMSS = ipconfigTCP_MSS; + + if( ( ( FreeRTOS_ntohl( pxSocket->u.xTCP.ulRemoteIP ) ^ *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) != 0ul ) + { + /* Data for this peer will pass through a router, and maybe through + the internet. Limit the MSS to 1400 bytes or less. */ + ulMSS = FreeRTOS_min_uint32( ( uint32_t ) REDUCED_MSS_THROUGH_INTERNET, ulMSS ); + } + + FreeRTOS_debug_printf( ( "prvSocketSetMSS: %lu bytes for %lxip:%u\n", ulMSS, pxSocket->u.xTCP.ulRemoteIP, pxSocket->u.xTCP.usRemotePort ) ); + + pxSocket->u.xTCP.usInitMSS = pxSocket->u.xTCP.usCurMSS = ( uint16_t ) ulMSS; +} +/*-----------------------------------------------------------*/ + +/* + * FreeRTOS_TCP_IP has only 2 public functions, this is the second one: + * xProcessReceivedTCPPacket() + * prvTCPHandleState() + * prvTCPPrepareSend() + * prvTCPReturnPacket() + * xNetworkInterfaceOutput() // Sends data to the NIC + * prvTCPSendRepeated() + * prvTCPReturnPacket() // Prepare for returning + * xNetworkInterfaceOutput() // Sends data to the NIC +*/ +BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ +FreeRTOS_Socket_t *pxSocket; +TCPPacket_t * pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); +uint16_t ucTCPFlags; +uint32_t ulLocalIP; +uint16_t xLocalPort; +uint32_t ulRemoteIP; +uint16_t xRemotePort; +uint32_t ulSequenceNumber; +uint32_t ulAckNumber; +BaseType_t xResult = pdPASS; +configASSERT(pxNetworkBuffer); +configASSERT(pxNetworkBuffer->pucEthernetBuffer); + + /* Check for a minimum packet size. */ + if( pxNetworkBuffer->xDataLength >= ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) ) + { + ucTCPFlags = pxTCPPacket->xTCPHeader.ucTCPFlags; + ulLocalIP = FreeRTOS_htonl( pxTCPPacket->xIPHeader.ulDestinationIPAddress ); + xLocalPort = FreeRTOS_htons( pxTCPPacket->xTCPHeader.usDestinationPort ); + ulRemoteIP = FreeRTOS_htonl( pxTCPPacket->xIPHeader.ulSourceIPAddress ); + xRemotePort = FreeRTOS_htons( pxTCPPacket->xTCPHeader.usSourcePort ); + ulSequenceNumber = FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulSequenceNumber ); + ulAckNumber = FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulAckNr ); + + /* Find the destination socket, and if not found: return a socket listing to + the destination PORT. */ + pxSocket = ( FreeRTOS_Socket_t * )pxTCPSocketLookup( ulLocalIP, xLocalPort, ulRemoteIP, xRemotePort ); + } + else + { + return pdFAIL; + } + + if( ( pxSocket == NULL ) || ( prvTCPSocketIsActive( ( UBaseType_t ) pxSocket->u.xTCP.ucTCPState ) == pdFALSE ) ) + { + /* A TCP messages is received but either there is no socket with the + given port number or the there is a socket, but it is in one of these + non-active states: eCLOSED, eCLOSE_WAIT, eFIN_WAIT_2, eCLOSING, or + eTIME_WAIT. */ + + FreeRTOS_debug_printf( ( "TCP: No active socket on port %d (%lxip:%d)\n", xLocalPort, ulRemoteIP, xRemotePort ) ); + + /* Send a RST to all packets that can not be handled. As a result + the other party will get a ECONN error. There are two exceptions: + 1) A packet that already has the RST flag set. + 2) A packet that only has the ACK flag set. + A packet with only the ACK flag set might be the last ACK in + a three-way hand-shake that closes a connection. */ + if( ( ( ucTCPFlags & ipTCP_FLAG_CTRL ) != ipTCP_FLAG_ACK ) && + ( ( ucTCPFlags & ipTCP_FLAG_RST ) == 0u ) ) + { + prvTCPSendReset( pxNetworkBuffer ); + } + + /* The packet can't be handled. */ + xResult = pdFAIL; + } + else + { + pxSocket->u.xTCP.ucRepCount = 0u; + + if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ) + { + /* The matching socket is in a listening state. Test if the peer + has set the SYN flag. */ + if( ( ucTCPFlags & ipTCP_FLAG_CTRL ) != ipTCP_FLAG_SYN ) + { + /* What happens: maybe after a reboot, a client doesn't know the + connection had gone. Send a RST in order to get a new connect + request. */ + #if( ipconfigHAS_DEBUG_PRINTF == 1 ) + { + FreeRTOS_debug_printf( ( "TCP: Server can't handle flags: %s from %lxip:%u to port %u\n", + prvTCPFlagMeaning( ( UBaseType_t ) ucTCPFlags ), ulRemoteIP, xRemotePort, xLocalPort ) ); + } + #endif /* ipconfigHAS_DEBUG_PRINTF */ + + if( ( ucTCPFlags & ipTCP_FLAG_RST ) == 0u ) + { + prvTCPSendReset( pxNetworkBuffer ); + } + xResult = pdFAIL; + } + else + { + /* prvHandleListen() will either return a newly created socket + (if bReuseSocket is false), otherwise it returns the current + socket which will later get connected. */ + pxSocket = prvHandleListen( pxSocket, pxNetworkBuffer ); + + if( pxSocket == NULL ) + { + xResult = pdFAIL; + } + } + } /* if( pxSocket->u.xTCP.ucTCPState == eTCP_LISTEN ). */ + else + { + /* This is not a socket in listening mode. Check for the RST + flag. */ + if( ( ucTCPFlags & ipTCP_FLAG_RST ) != 0u ) + { + FreeRTOS_debug_printf( ( "TCP: RST received from %lxip:%u for %u\n", ulRemoteIP, xRemotePort, xLocalPort ) ); + + /* Implement https://tools.ietf.org/html/rfc5961#section-3.2. */ + if( pxSocket->u.xTCP.ucTCPState == eCONNECT_SYN ) + { + /* Per the above RFC, "In the SYN-SENT state ... the RST is + acceptable if the ACK field acknowledges the SYN." */ + if( ulAckNumber == pxSocket->u.xTCP.xTCPWindow.ulOurSequenceNumber + 1 ) + { + vTCPStateChange( pxSocket, eCLOSED ); + } + } + else + { + /* Check whether the packet matches the next expected sequence number. */ + if( ulSequenceNumber == pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber ) + { + vTCPStateChange( pxSocket, eCLOSED ); + } + /* Otherwise, check whether the packet is within the receive window. */ + else if( ulSequenceNumber > pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber && + ulSequenceNumber < ( pxSocket->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber + + pxSocket->u.xTCP.xTCPWindow.xSize.ulRxWindowLength ) ) + { + /* Send a challenge ACK. */ + prvTCPSendChallengeAck( pxNetworkBuffer ); + } + } + + /* Otherwise, do nothing. In any case, the packet cannot be handled. */ + xResult = pdFAIL; + } + else if( ( ( ucTCPFlags & ipTCP_FLAG_CTRL ) == ipTCP_FLAG_SYN ) && ( pxSocket->u.xTCP.ucTCPState >= eESTABLISHED ) ) + { + /* SYN flag while this socket is already connected. */ + FreeRTOS_debug_printf( ( "TCP: SYN unexpected from %lxip:%u\n", ulRemoteIP, xRemotePort ) ); + + /* The packet cannot be handled. */ + xResult = pdFAIL; + } + else + { + /* Update the copy of the TCP header only (skipping eth and IP + headers). It might be used later on, whenever data must be sent + to the peer. */ + const BaseType_t lOffset = ( BaseType_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv4_HEADER ); + memcpy( pxSocket->u.xTCP.xPacket.u.ucLastPacket + lOffset, pxNetworkBuffer->pucEthernetBuffer + lOffset, ipSIZE_OF_TCP_HEADER ); + } + } + } + + if( xResult != pdFAIL ) + { + /* Touch the alive timers because we received a message for this + socket. */ + prvTCPTouchSocket( pxSocket ); + + /* Parse the TCP option(s), if present. */ + /* _HT_ : if we're in the SYN phase, and peer does not send a MSS option, + then we MUST assume an MSS size of 536 bytes for backward compatibility. */ + + /* When there are no TCP options, the TCP offset equals 20 bytes, which is stored as + the number 5 (words) in the higher niblle of the TCP-offset byte. */ + if( ( pxTCPPacket->xTCPHeader.ucTCPOffset & TCP_OFFSET_LENGTH_BITS ) > TCP_OFFSET_STANDARD_LENGTH ) + { + prvCheckOptions( pxSocket, pxNetworkBuffer ); + } + + + #if( ipconfigUSE_TCP_WIN == 1 ) + { + pxSocket->u.xTCP.ulWindowSize = FreeRTOS_ntohs( pxTCPPacket->xTCPHeader.usWindow ); + pxSocket->u.xTCP.ulWindowSize = + ( pxSocket->u.xTCP.ulWindowSize << pxSocket->u.xTCP.ucPeerWinScaleFactor ); + } + #endif + + /* In prvTCPHandleState() the incoming messages will be handled + depending on the current state of the connection. */ + if( prvTCPHandleState( pxSocket, &pxNetworkBuffer ) > 0 ) + { + /* prvTCPHandleState() has sent a message, see if there are more to + be transmitted. */ + #if( ipconfigUSE_TCP_WIN == 1 ) + { + prvTCPSendRepeated( pxSocket, &pxNetworkBuffer ); + } + #endif /* ipconfigUSE_TCP_WIN */ + } + + if( pxNetworkBuffer != NULL ) + { + /* We must check if the buffer is unequal to NULL, because the + socket might keep a reference to it in case a delayed ACK must be + sent. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + pxNetworkBuffer = NULL; + } + + /* And finally, calculate when this socket wants to be woken up. */ + prvTCPNextTimeout ( pxSocket ); + /* Return pdPASS to tell that the network buffer is 'consumed'. */ + xResult = pdPASS; + } + + /* pdPASS being returned means the buffer has been consumed. */ + return xResult; +} +/*-----------------------------------------------------------*/ + +static FreeRTOS_Socket_t *prvHandleListen( FreeRTOS_Socket_t *pxSocket, NetworkBufferDescriptor_t *pxNetworkBuffer ) +{ +TCPPacket_t * pxTCPPacket = ( TCPPacket_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); +FreeRTOS_Socket_t *pxReturn = NULL; +uint32_t ulInitialSequenceNumber; + + /* Assume that a new Initial Sequence Number will be required. Request + it now in order to fail out if necessary. */ + ulInitialSequenceNumber = ulApplicationGetNextSequenceNumber( *ipLOCAL_IP_ADDRESS_POINTER, + pxSocket->usLocalPort, + pxTCPPacket->xIPHeader.ulSourceIPAddress, + pxTCPPacket->xTCPHeader.usSourcePort ); + + /* A pure SYN (without ACK) has come in, create a new socket to answer + it. */ + if( 0 != ulInitialSequenceNumber ) + { + if( pxSocket->u.xTCP.bits.bReuseSocket != pdFALSE_UNSIGNED ) + { + /* The flag bReuseSocket indicates that the same instance of the + listening socket should be used for the connection. */ + pxReturn = pxSocket; + pxSocket->u.xTCP.bits.bPassQueued = pdTRUE_UNSIGNED; + pxSocket->u.xTCP.pxPeerSocket = pxSocket; + } + else + { + /* The socket does not have the bReuseSocket flag set meaning create a + new socket when a connection comes in. */ + pxReturn = NULL; + + if( pxSocket->u.xTCP.usChildCount >= pxSocket->u.xTCP.usBacklog ) + { + FreeRTOS_printf( ( "Check: Socket %u already has %u / %u child%s\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.usChildCount, + pxSocket->u.xTCP.usBacklog, + pxSocket->u.xTCP.usChildCount == 1 ? "" : "ren" ) ); + prvTCPSendReset( pxNetworkBuffer ); + } + else + { + FreeRTOS_Socket_t *pxNewSocket = ( FreeRTOS_Socket_t * ) + FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_STREAM, FREERTOS_IPPROTO_TCP ); + + if( ( pxNewSocket == NULL ) || ( pxNewSocket == FREERTOS_INVALID_SOCKET ) ) + { + FreeRTOS_debug_printf( ( "TCP: Listen: new socket failed\n" ) ); + prvTCPSendReset( pxNetworkBuffer ); + } + else if( prvTCPSocketCopy( pxNewSocket, pxSocket ) != pdFALSE ) + { + /* The socket will be connected immediately, no time for the + owner to setsockopt's, therefore copy properties of the server + socket to the new socket. Only the binding might fail (due to + lack of resources). */ + pxReturn = pxNewSocket; + } + } + } + } + + if( ( 0 != ulInitialSequenceNumber ) && ( pxReturn != NULL ) ) + { + pxReturn->u.xTCP.usRemotePort = FreeRTOS_htons( pxTCPPacket->xTCPHeader.usSourcePort ); + pxReturn->u.xTCP.ulRemoteIP = FreeRTOS_htonl( pxTCPPacket->xIPHeader.ulSourceIPAddress ); + pxReturn->u.xTCP.xTCPWindow.ulOurSequenceNumber = ulInitialSequenceNumber; + + /* Here is the SYN action. */ + pxReturn->u.xTCP.xTCPWindow.rx.ulCurrentSequenceNumber = FreeRTOS_ntohl( pxTCPPacket->xTCPHeader.ulSequenceNumber ); + prvSocketSetMSS( pxReturn ); + + prvTCPCreateWindow( pxReturn ); + + vTCPStateChange( pxReturn, eSYN_FIRST ); + + /* Make a copy of the header up to the TCP header. It is needed later + on, whenever data must be sent to the peer. */ + memcpy( pxReturn->u.xTCP.xPacket.u.ucLastPacket, pxNetworkBuffer->pucEthernetBuffer, sizeof( pxReturn->u.xTCP.xPacket.u.ucLastPacket ) ); + } + return pxReturn; +} +/*-----------------------------------------------------------*/ + +/* + * Duplicates a socket after a listening socket receives a connection. + */ +static BaseType_t prvTCPSocketCopy( FreeRTOS_Socket_t *pxNewSocket, FreeRTOS_Socket_t *pxSocket ) +{ +struct freertos_sockaddr xAddress; + + pxNewSocket->xReceiveBlockTime = pxSocket->xReceiveBlockTime; + pxNewSocket->xSendBlockTime = pxSocket->xSendBlockTime; + pxNewSocket->ucSocketOptions = pxSocket->ucSocketOptions; + pxNewSocket->u.xTCP.uxRxStreamSize = pxSocket->u.xTCP.uxRxStreamSize; + pxNewSocket->u.xTCP.uxTxStreamSize = pxSocket->u.xTCP.uxTxStreamSize; + pxNewSocket->u.xTCP.uxLittleSpace = pxSocket->u.xTCP.uxLittleSpace; + pxNewSocket->u.xTCP.uxEnoughSpace = pxSocket->u.xTCP.uxEnoughSpace; + pxNewSocket->u.xTCP.uxRxWinSize = pxSocket->u.xTCP.uxRxWinSize; + pxNewSocket->u.xTCP.uxTxWinSize = pxSocket->u.xTCP.uxTxWinSize; + + #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) + { + pxNewSocket->pxUserSemaphore = pxSocket->pxUserSemaphore; + } + #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ + + #if( ipconfigUSE_CALLBACKS == 1 ) + { + /* In case call-backs are used, copy them from parent to child. */ + pxNewSocket->u.xTCP.pxHandleConnected = pxSocket->u.xTCP.pxHandleConnected; + pxNewSocket->u.xTCP.pxHandleReceive = pxSocket->u.xTCP.pxHandleReceive; + pxNewSocket->u.xTCP.pxHandleSent = pxSocket->u.xTCP.pxHandleSent; + } + #endif /* ipconfigUSE_CALLBACKS */ + + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + { + /* Child socket of listening sockets will inherit the Socket Set + Otherwise the owner has no chance of including it into the set. */ + if( pxSocket->pxSocketSet ) + { + pxNewSocket->pxSocketSet = pxSocket->pxSocketSet; + pxNewSocket->xSelectBits = pxSocket->xSelectBits | eSELECT_READ | eSELECT_EXCEPT; + } + } + #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ + + /* And bind it to the same local port as its parent. */ + xAddress.sin_addr = *ipLOCAL_IP_ADDRESS_POINTER; + xAddress.sin_port = FreeRTOS_htons( pxSocket->usLocalPort ); + + #if( ipconfigTCP_HANG_PROTECTION == 1 ) + { + /* Only when there is anti-hanging protection, a socket may become an + orphan temporarily. Once this socket is really connected, the owner of + the server socket will be notified. */ + + /* When bPassQueued is true, the socket is an orphan until it gets + connected. */ + pxNewSocket->u.xTCP.bits.bPassQueued = pdTRUE_UNSIGNED; + pxNewSocket->u.xTCP.pxPeerSocket = pxSocket; + } + #else + { + /* A reference to the new socket may be stored and the socket is marked + as 'passable'. */ + + /* When bPassAccept is pdTRUE_UNSIGNED this socket may be returned in a call to + accept(). */ + pxNewSocket->u.xTCP.bits.bPassAccept = pdTRUE_UNSIGNED; + if(pxSocket->u.xTCP.pxPeerSocket == NULL ) + { + pxSocket->u.xTCP.pxPeerSocket = pxNewSocket; + } + } + #endif + + pxSocket->u.xTCP.usChildCount++; + + FreeRTOS_debug_printf( ( "Gain: Socket %u now has %u / %u child%s\n", + pxSocket->usLocalPort, + pxSocket->u.xTCP.usChildCount, + pxSocket->u.xTCP.usBacklog, + pxSocket->u.xTCP.usChildCount == 1u ? "" : "ren" ) ); + + /* Now bind the child socket to the same port as the listening socket. */ + if( vSocketBind ( pxNewSocket, &xAddress, sizeof( xAddress ), pdTRUE ) != 0 ) + { + FreeRTOS_debug_printf( ( "TCP: Listen: new socket bind error\n" ) ); + vSocketClose( pxNewSocket ); + return pdFALSE; + } + + return pdTRUE; +} +/*-----------------------------------------------------------*/ + +#if( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) + + const char *FreeRTOS_GetTCPStateName( UBaseType_t ulState ) + { + if( ulState >= ( UBaseType_t ) ARRAY_SIZE( pcStateNames ) ) + { + ulState = ( UBaseType_t ) ARRAY_SIZE( pcStateNames ) - 1u; + } + return pcStateNames[ ulState ]; + } + +#endif /* ( ( ipconfigHAS_DEBUG_PRINTF != 0 ) || ( ipconfigHAS_PRINTF != 0 ) ) */ +/*-----------------------------------------------------------*/ + +/* + * In the API accept(), the user asks is there is a new client? As API's can + * not walk through the xBoundTCPSocketsList the IP-task will do this. + */ +BaseType_t xTCPCheckNewClient( FreeRTOS_Socket_t *pxSocket ) +{ +TickType_t xLocalPort = FreeRTOS_htons( pxSocket->usLocalPort ); +ListItem_t *pxIterator; +FreeRTOS_Socket_t *pxFound; +BaseType_t xResult = pdFALSE; + + /* Here xBoundTCPSocketsList can be accessed safely IP-task is the only one + who has access. */ + for( pxIterator = ( ListItem_t * ) listGET_HEAD_ENTRY( &xBoundTCPSocketsList ); + pxIterator != ( ListItem_t * ) listGET_END_MARKER( &xBoundTCPSocketsList ); + pxIterator = ( ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + if( listGET_LIST_ITEM_VALUE( pxIterator ) == xLocalPort ) + { + pxFound = ( FreeRTOS_Socket_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + if( ( pxFound->ucProtocol == FREERTOS_IPPROTO_TCP ) && ( pxFound->u.xTCP.bits.bPassAccept != pdFALSE_UNSIGNED ) ) + { + pxSocket->u.xTCP.pxPeerSocket = pxFound; + FreeRTOS_debug_printf( ( "xTCPCheckNewClient[0]: client on port %u\n", pxSocket->usLocalPort ) ); + xResult = pdTRUE; + break; + } + } + } + return xResult; +} +/*-----------------------------------------------------------*/ + +#endif /* ipconfigUSE_TCP == 1 */ + +/* Provide access to private members for testing. */ +#ifdef AMAZON_FREERTOS_ENABLE_UNIT_TESTS + #include "iot_freertos_tcp_test_access_tcp_define.h" +#endif + +/* Provide access to private members for verification. */ +#ifdef FREERTOS_TCP_ENABLE_VERIFICATION + #include "aws_freertos_tcp_verification_access_tcp_define.h" +#endif + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c index cda8acd1c..804088009 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c @@ -1,1998 +1,1998 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* - * FreeRTOS_TCP_WIN.c - * Module which handles the TCP windowing schemes for FreeRTOS+TCP. Many - * functions have two versions - one for FreeRTOS+TCP (full) and one for - * FreeRTOS+TCP (lite). - * - * In this module all ports and IP addresses and sequence numbers are - * being stored in host byte-order. - */ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" -#include "FreeRTOS_TCP_WIN.h" - -/* Constants used for Smoothed Round Trip Time (SRTT). */ -#define winSRTT_INCREMENT_NEW 2 -#define winSRTT_INCREMENT_CURRENT 6 -#define winSRTT_DECREMENT_NEW 1 -#define winSRTT_DECREMENT_CURRENT 7 -#define winSRTT_CAP_mS 50 - -#if( ipconfigUSE_TCP_WIN == 1 ) - - #define xTCPWindowRxNew( pxWindow, ulSequenceNumber, lCount ) xTCPWindowNew( pxWindow, ulSequenceNumber, lCount, pdTRUE ) - - #define xTCPWindowTxNew( pxWindow, ulSequenceNumber, lCount ) xTCPWindowNew( pxWindow, ulSequenceNumber, lCount, pdFALSE ) - - /* The code to send a single Selective ACK (SACK): - * NOP (0x01), NOP (0x01), SACK (0x05), LEN (0x0a), - * followed by a lower and a higher sequence number, - * where LEN is 2 + 2*4 = 10 bytes. */ - #if( ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN ) - #define OPTION_CODE_SINGLE_SACK ( 0x0101050aUL ) - #else - #define OPTION_CODE_SINGLE_SACK ( 0x0a050101UL ) - #endif - - /* Normal retransmission: - * A packet will be retransmitted after a Retransmit Time-Out (RTO). - * Fast retransmission: - * When 3 packets with a higher sequence number have been acknowledged - * by the peer, it is very unlikely a current packet will ever arrive. - * It will be retransmitted far before the RTO. - */ - #define DUPLICATE_ACKS_BEFORE_FAST_RETRANSMIT ( 3u ) - - /* If there have been several retransmissions (4), decrease the - * size of the transmission window to at most 2 times MSS. - */ - #define MAX_TRANSMIT_COUNT_USING_LARGE_WINDOW ( 4u ) - -#endif /* configUSE_TCP_WIN */ -/*-----------------------------------------------------------*/ - -extern void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, MiniListItem_t * const pxWhere ); - -/* - * All TCP sockets share a pool of segment descriptors (TCPSegment_t) - * Available descriptors are stored in the 'xSegmentList' - * When a socket owns a descriptor, it will either be stored in - * 'xTxSegments' or 'xRxSegments' - * As soon as a package has been confirmed, the descriptor will be returned - * to the segment pool - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static BaseType_t prvCreateSectors( void ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * Find a segment with a given sequence number in the list of received - * segments: 'pxWindow->xRxSegments'. - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static TCPSegment_t *xTCPWindowRxFind( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * Allocate a new segment - * The socket will borrow all segments from a common pool: 'xSegmentList', - * which is a list of 'TCPSegment_t' - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static TCPSegment_t *xTCPWindowNew( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, int32_t lCount, BaseType_t xIsForRx ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* When the peer has a close request (FIN flag), the driver will check if - * there are missing packets in the Rx-queue - * It will accept the closure of the connection if both conditions are true: - * - the Rx-queue is empty - * - we've ACK'd the highest Rx sequence number seen - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * Detaches and returns the head of a queue - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static TCPSegment_t *xTCPWindowGetHead( List_t *pxList ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * Returns the head of a queue but it won't be detached - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static TCPSegment_t *xTCPWindowPeekHead( List_t *pxList ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * Free entry pxSegment because it's not used anymore - * The ownership will be passed back to the segment pool - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static void vTCPWindowFree( TCPSegment_t *pxSegment ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * A segment has been received with sequence number 'ulSequenceNumber', where - * 'ulCurrentSequenceNumber == ulSequenceNumber', which means that exactly this - * segment was expected. xTCPWindowRxConfirm() will check if there is already - * another segment with a sequence number between (ulSequenceNumber) and - * (ulSequenceNumber+xLength). Normally none will be found, because the next Rx - * segment should have a sequence number equal to '(ulSequenceNumber+xLength)'. - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static TCPSegment_t *xTCPWindowRxConfirm( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * FreeRTOS+TCP stores data in circular buffers. Calculate the next position to - * store. - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static int32_t lTCPIncrementTxPosition( int32_t lPosition, int32_t lMax, int32_t lCount ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * This function will look if there is new transmission data. It will return - * true if there is data to be sent. - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * An acknowledge was received. See if some outstanding data may be removed - * from the transmission queue(s). - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static uint32_t prvTCPWindowTxCheckAck( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* - * A higher Tx block has been acknowledged. Now iterate through the xWaitQueue - * to find a possible condition for a FAST retransmission. - */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static uint32_t prvTCPWindowFastRetransmit( TCPWindow_t *pxWindow, uint32_t ulFirst ); -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/*-----------------------------------------------------------*/ - -/* TCP segment pool. */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static TCPSegment_t *xTCPSegments = NULL; -#endif /* ipconfigUSE_TCP_WIN == 1 */ - -/* List of free TCP segments. */ -#if( ipconfigUSE_TCP_WIN == 1 ) - static List_t xSegmentList; -#endif - -/* Logging verbosity level. */ -BaseType_t xTCPWindowLoggingLevel = 0; - -#if( ipconfigUSE_TCP_WIN == 1 ) - /* Some 32-bit arithmetic: comparing sequence numbers */ - static portINLINE BaseType_t xSequenceLessThanOrEqual( uint32_t a, uint32_t b ); - static portINLINE BaseType_t xSequenceLessThanOrEqual( uint32_t a, uint32_t b ) - { - /* Test if a <= b - Return true if the unsigned subtraction of (b-a) doesn't generate an - arithmetic overflow. */ - return ( ( b - a ) & 0x80000000UL ) == 0UL; - } -#endif /* ipconfigUSE_TCP_WIN */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - static portINLINE BaseType_t xSequenceLessThan( uint32_t a, uint32_t b ); - static portINLINE BaseType_t xSequenceLessThan( uint32_t a, uint32_t b ) - { - /* Test if a < b */ - return ( ( b - a - 1UL ) & 0x80000000UL ) == 0UL; - } -#endif /* ipconfigUSE_TCP_WIN */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - static portINLINE BaseType_t xSequenceGreaterThan( uint32_t a, uint32_t b ); - static portINLINE BaseType_t xSequenceGreaterThan( uint32_t a, uint32_t b ) - { - /* Test if a > b */ - return ( ( a - b - 1UL ) & 0x80000000UL ) == 0UL; - } -#endif /* ipconfigUSE_TCP_WIN */ - -/*-----------------------------------------------------------*/ -static portINLINE BaseType_t xSequenceGreaterThanOrEqual( uint32_t a, uint32_t b ); -static portINLINE BaseType_t xSequenceGreaterThanOrEqual( uint32_t a, uint32_t b ) -{ - /* Test if a >= b */ - return ( ( a - b ) & 0x80000000UL ) == 0UL; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - static portINLINE void vListInsertFifo( List_t * const pxList, ListItem_t * const pxNewListItem ); - static portINLINE void vListInsertFifo( List_t * const pxList, ListItem_t * const pxNewListItem ) - { - vListInsertGeneric( pxList, pxNewListItem, &pxList->xListEnd ); - } -#endif -/*-----------------------------------------------------------*/ - -static portINLINE void vTCPTimerSet( TCPTimer_t *pxTimer ); -static portINLINE void vTCPTimerSet( TCPTimer_t *pxTimer ) -{ - pxTimer->ulBorn = xTaskGetTickCount ( ); -} -/*-----------------------------------------------------------*/ - -static portINLINE uint32_t ulTimerGetAge( TCPTimer_t *pxTimer ); -static portINLINE uint32_t ulTimerGetAge( TCPTimer_t *pxTimer ) -{ - return ( ( xTaskGetTickCount() - pxTimer->ulBorn ) * portTICK_PERIOD_MS ); -} -/*-----------------------------------------------------------*/ - -/* _HT_ GCC (using the settings that I'm using) checks for every public function if it is -preceded by a prototype. Later this prototype will be located in list.h? */ - -extern void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, MiniListItem_t * const pxWhere ); - -void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, MiniListItem_t * const pxWhere ) -{ - /* Insert a new list item into pxList, it does not sort the list, - but it puts the item just before xListEnd, so it will be the last item - returned by listGET_HEAD_ENTRY() */ - pxNewListItem->pxNext = (struct xLIST_ITEM * configLIST_VOLATILE)pxWhere; - pxNewListItem->pxPrevious = pxWhere->pxPrevious; - pxWhere->pxPrevious->pxNext = pxNewListItem; - pxWhere->pxPrevious = pxNewListItem; - - /* Remember which list the item is in. */ - listLIST_ITEM_CONTAINER( pxNewListItem ) = ( void * ) pxList; - - ( pxList->uxNumberOfItems )++; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static BaseType_t prvCreateSectors( void ) - { - BaseType_t xIndex, xReturn; - - /* Allocate space for 'xTCPSegments' and store them in 'xSegmentList'. */ - - vListInitialise( &xSegmentList ); - xTCPSegments = ( TCPSegment_t * ) pvPortMallocLarge( ipconfigTCP_WIN_SEG_COUNT * sizeof( xTCPSegments[ 0 ] ) ); - - if( xTCPSegments == NULL ) - { - FreeRTOS_debug_printf( ( "prvCreateSectors: malloc %lu failed\n", - ipconfigTCP_WIN_SEG_COUNT * sizeof( xTCPSegments[ 0 ] ) ) ); - - xReturn = pdFAIL; - } - else - { - /* Clear the allocated space. */ - memset( xTCPSegments, '\0', ipconfigTCP_WIN_SEG_COUNT * sizeof( xTCPSegments[ 0 ] ) ); - - for( xIndex = 0; xIndex < ipconfigTCP_WIN_SEG_COUNT; xIndex++ ) - { - /* Could call vListInitialiseItem here but all data has been - nulled already. Set the owner to a segment descriptor. */ - listSET_LIST_ITEM_OWNER( &( xTCPSegments[ xIndex ].xListItem ), ( void* ) &( xTCPSegments[ xIndex ] ) ); - listSET_LIST_ITEM_OWNER( &( xTCPSegments[ xIndex ].xQueueItem ), ( void* ) &( xTCPSegments[ xIndex ] ) ); - - /* And add it to the pool of available segments */ - vListInsertFifo( &xSegmentList, &( xTCPSegments[xIndex].xListItem ) ); - } - - xReturn = pdPASS; - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static TCPSegment_t *xTCPWindowRxFind( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ) - { - const ListItem_t *pxIterator; - const MiniListItem_t* pxEnd; - TCPSegment_t *pxSegment, *pxReturn = NULL; - - /* Find a segment with a given sequence number in the list of received - segments. */ - - pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &pxWindow->xRxSegments ); - - for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); - pxIterator != ( const ListItem_t * ) pxEnd; - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - - if( pxSegment->ulSequenceNumber == ulSequenceNumber ) - { - pxReturn = pxSegment; - break; - } - } - - return pxReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static TCPSegment_t *xTCPWindowNew( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, int32_t lCount, BaseType_t xIsForRx ) - { - TCPSegment_t *pxSegment; - ListItem_t * pxItem; - - /* Allocate a new segment. The socket will borrow all segments from a - common pool: 'xSegmentList', which is a list of 'TCPSegment_t' */ - if( listLIST_IS_EMPTY( &xSegmentList ) != pdFALSE ) - { - /* If the TCP-stack runs out of segments, you might consider - increasing 'ipconfigTCP_WIN_SEG_COUNT'. */ - FreeRTOS_debug_printf( ( "xTCPWindow%cxNew: Error: all segments occupied\n", xIsForRx ? 'R' : 'T' ) ); - pxSegment = NULL; - } - else - { - /* Pop the item at the head of the list. Semaphore protection is - not required as only the IP task will call these functions. */ - pxItem = ( ListItem_t * ) listGET_HEAD_ENTRY( &xSegmentList ); - pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxItem ); - - configASSERT( pxItem != NULL ); - configASSERT( pxSegment != NULL ); - - /* Remove the item from xSegmentList. */ - uxListRemove( pxItem ); - - /* Add it to either the connections' Rx or Tx queue. */ - vListInsertFifo( xIsForRx ? &pxWindow->xRxSegments : &pxWindow->xTxSegments, pxItem ); - - /* And set the segment's timer to zero */ - vTCPTimerSet( &pxSegment->xTransmitTimer ); - - pxSegment->u.ulFlags = 0; - pxSegment->u.bits.bIsForRx = ( xIsForRx != 0 ); - pxSegment->lMaxLength = lCount; - pxSegment->lDataLength = lCount; - pxSegment->ulSequenceNumber = ulSequenceNumber; - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - static UBaseType_t xLowestLength = ipconfigTCP_WIN_SEG_COUNT; - UBaseType_t xLength = listCURRENT_LIST_LENGTH( &xSegmentList ); - - if( xLowestLength > xLength ) - { - xLowestLength = xLength; - } - } - #endif /* ipconfigHAS_DEBUG_PRINTF */ - } - - return pxSegment; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ) - { - BaseType_t xReturn; - - /* When the peer has a close request (FIN flag), the driver will check - if there are missing packets in the Rx-queue. It will accept the - closure of the connection if both conditions are true: - - the Rx-queue is empty - - the highest Rx sequence number has been ACK'ed */ - if( listLIST_IS_EMPTY( ( &pxWindow->xRxSegments ) ) == pdFALSE ) - { - /* Rx data has been stored while earlier packets were missing. */ - xReturn = pdFALSE; - } - else if( xSequenceGreaterThanOrEqual( pxWindow->rx.ulCurrentSequenceNumber, pxWindow->rx.ulHighestSequenceNumber ) != pdFALSE ) - { - /* No Rx packets are being stored and the highest sequence number - that has been received has been ACKed. */ - xReturn = pdTRUE; - } - else - { - FreeRTOS_debug_printf( ( "xTCPWindowRxEmpty: cur %lu highest %lu (empty)\n", - ( pxWindow->rx.ulCurrentSequenceNumber - pxWindow->rx.ulFirstSequenceNumber ), - ( pxWindow->rx.ulHighestSequenceNumber - pxWindow->rx.ulFirstSequenceNumber ) ) ); - xReturn = pdFALSE; - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static TCPSegment_t *xTCPWindowGetHead( List_t *pxList ) - { - TCPSegment_t *pxSegment; - ListItem_t * pxItem; - - /* Detaches and returns the head of a queue. */ - if( listLIST_IS_EMPTY( pxList ) != pdFALSE ) - { - pxSegment = NULL; - } - else - { - pxItem = ( ListItem_t * ) listGET_HEAD_ENTRY( pxList ); - pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxItem ); - - uxListRemove( pxItem ); - } - - return pxSegment; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static TCPSegment_t *xTCPWindowPeekHead( List_t *pxList ) - { - ListItem_t *pxItem; - TCPSegment_t *pxReturn; - - /* Returns the head of a queue but it won't be detached. */ - if( listLIST_IS_EMPTY( pxList ) != pdFALSE ) - { - pxReturn = NULL; - } - else - { - pxItem = ( ListItem_t * ) listGET_HEAD_ENTRY( pxList ); - pxReturn = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxItem ); - } - - return pxReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static void vTCPWindowFree( TCPSegment_t *pxSegment ) - { - /* Free entry pxSegment because it's not used any more. The ownership - will be passed back to the segment pool. - - Unlink it from one of the queues, if any. */ - if( listLIST_ITEM_CONTAINER( &( pxSegment->xQueueItem ) ) != NULL ) - { - uxListRemove( &( pxSegment->xQueueItem ) ); - } - - pxSegment->ulSequenceNumber = 0u; - pxSegment->lDataLength = 0l; - pxSegment->u.ulFlags = 0u; - - /* Take it out of xRxSegments/xTxSegments */ - if( listLIST_ITEM_CONTAINER( &( pxSegment->xListItem ) ) != NULL ) - { - uxListRemove( &( pxSegment->xListItem ) ); - } - - /* Return it to xSegmentList */ - vListInsertFifo( &xSegmentList, &( pxSegment->xListItem ) ); - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - void vTCPWindowDestroy( TCPWindow_t *pxWindow ) - { - List_t * pxSegments; - BaseType_t xRound; - TCPSegment_t *pxSegment; - - /* Destroy a window. A TCP window doesn't serve any more. Return all - owned segments to the pool. In order to save code, it will make 2 rounds, - one to remove the segments from xRxSegments, and a second round to clear - xTxSegments*/ - for( xRound = 0; xRound < 2; xRound++ ) - { - if( xRound != 0 ) - { - pxSegments = &( pxWindow->xRxSegments ); - } - else - { - pxSegments = &( pxWindow->xTxSegments ); - } - - if( listLIST_IS_INITIALISED( pxSegments ) != pdFALSE ) - { - while( listCURRENT_LIST_LENGTH( pxSegments ) > 0U ) - { - pxSegment = ( TCPSegment_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxSegments ); - vTCPWindowFree( pxSegment ); - } - } - } - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -void vTCPWindowCreate( TCPWindow_t *pxWindow, uint32_t ulRxWindowLength, - uint32_t ulTxWindowLength, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ) -{ - /* Create and initialize a window. */ - - #if( ipconfigUSE_TCP_WIN == 1 ) - { - if( xTCPSegments == NULL ) - { - prvCreateSectors(); - } - - vListInitialise( &pxWindow->xTxSegments ); - vListInitialise( &pxWindow->xRxSegments ); - - vListInitialise( &pxWindow->xPriorityQueue ); /* Priority queue: segments which must be sent immediately */ - vListInitialise( &pxWindow->xTxQueue ); /* Transmit queue: segments queued for transmission */ - vListInitialise( &pxWindow->xWaitQueue ); /* Waiting queue: outstanding segments */ - } - #endif /* ipconfigUSE_TCP_WIN == 1 */ - - if( xTCPWindowLoggingLevel != 0 ) - { - FreeRTOS_debug_printf( ( "vTCPWindowCreate: for WinLen = Rx/Tx: %lu/%lu\n", - ulRxWindowLength, ulTxWindowLength ) ); - } - - pxWindow->xSize.ulRxWindowLength = ulRxWindowLength; - pxWindow->xSize.ulTxWindowLength = ulTxWindowLength; - - vTCPWindowInit( pxWindow, ulAckNumber, ulSequenceNumber, ulMSS ); -} -/*-----------------------------------------------------------*/ - -void vTCPWindowInit( TCPWindow_t *pxWindow, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ) -{ -const int32_t l500ms = 500; - - pxWindow->u.ulFlags = 0ul; - pxWindow->u.bits.bHasInit = pdTRUE_UNSIGNED; - - if( ulMSS != 0ul ) - { - if( pxWindow->usMSSInit != 0u ) - { - pxWindow->usMSSInit = ( uint16_t ) ulMSS; - } - - if( ( ulMSS < ( uint32_t ) pxWindow->usMSS ) || ( pxWindow->usMSS == 0u ) ) - { - pxWindow->xSize.ulRxWindowLength = ( pxWindow->xSize.ulRxWindowLength / ulMSS ) * ulMSS; - pxWindow->usMSS = ( uint16_t ) ulMSS; - } - } - - #if( ipconfigUSE_TCP_WIN == 0 ) - { - pxWindow->xTxSegment.lMaxLength = ( int32_t ) pxWindow->usMSS; - } - #endif /* ipconfigUSE_TCP_WIN == 1 */ - - /*Start with a timeout of 2 * 500 ms (1 sec). */ - pxWindow->lSRTT = l500ms; - - /* Just for logging, to print relative sequence numbers. */ - pxWindow->rx.ulFirstSequenceNumber = ulAckNumber; - - /* The segment asked for in the next transmission. */ - pxWindow->rx.ulCurrentSequenceNumber = ulAckNumber; - - /* The right-hand side of the receive window. */ - pxWindow->rx.ulHighestSequenceNumber = ulAckNumber; - - pxWindow->tx.ulFirstSequenceNumber = ulSequenceNumber; - - /* The segment asked for in next transmission. */ - pxWindow->tx.ulCurrentSequenceNumber = ulSequenceNumber; - - /* The sequence number given to the next outgoing byte to be added is - maintained by lTCPWindowTxAdd(). */ - pxWindow->ulNextTxSequenceNumber = ulSequenceNumber; - - /* The right-hand side of the transmit window. */ - pxWindow->tx.ulHighestSequenceNumber = ulSequenceNumber; - pxWindow->ulOurSequenceNumber = ulSequenceNumber; -} -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - void vTCPSegmentCleanup( void ) - { - /* Free and clear the TCP segments pointer. This function should only be called - * once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this - * function. */ - if( xTCPSegments != NULL ) - { - vPortFreeLarge( xTCPSegments ); - xTCPSegments = NULL; - } - } - -#endif /* ipconfgiUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -/*============================================================================= - * - * ###### # # - * # # # # - * # # # # - * # # #### - * ###### ## - * # ## #### - * # # # # - * # # # # - * ### ## # # - * Rx functions - * - *=============================================================================*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static TCPSegment_t *xTCPWindowRxConfirm( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength ) - { - TCPSegment_t *pxBest = NULL; - const ListItem_t *pxIterator; - uint32_t ulNextSequenceNumber = ulSequenceNumber + ulLength; - const MiniListItem_t* pxEnd = ( const MiniListItem_t* ) listGET_END_MARKER( &pxWindow->xRxSegments ); - TCPSegment_t *pxSegment; - - /* A segment has been received with sequence number 'ulSequenceNumber', - where 'ulCurrentSequenceNumber == ulSequenceNumber', which means that - exactly this segment was expected. xTCPWindowRxConfirm() will check if - there is already another segment with a sequence number between (ulSequenceNumber) - and (ulSequenceNumber+ulLength). Normally none will be found, because - the next RX segment should have a sequence number equal to - '(ulSequenceNumber+ulLength)'. */ - - /* Iterate through all RX segments that are stored: */ - for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); - pxIterator != ( const ListItem_t * ) pxEnd; - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) - { - pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - /* And see if there is a segment for which: - 'ulSequenceNumber' <= 'pxSegment->ulSequenceNumber' < 'ulNextSequenceNumber' - If there are more matching segments, the one with the lowest sequence number - shall be taken */ - if( ( xSequenceGreaterThanOrEqual( pxSegment->ulSequenceNumber, ulSequenceNumber ) != 0 ) && - ( xSequenceLessThan( pxSegment->ulSequenceNumber, ulNextSequenceNumber ) != 0 ) ) - { - if( ( pxBest == NULL ) || ( xSequenceLessThan( pxSegment->ulSequenceNumber, pxBest->ulSequenceNumber ) != 0 ) ) - { - pxBest = pxSegment; - } - } - } - - if( ( pxBest != NULL ) && - ( ( pxBest->ulSequenceNumber != ulSequenceNumber ) || ( pxBest->lDataLength != ( int32_t ) ulLength ) ) ) - { - FreeRTOS_flush_logging(); - FreeRTOS_debug_printf( ( "xTCPWindowRxConfirm[%u]: search %lu (+%ld=%lu) found %lu (+%ld=%lu)\n", - pxWindow->usPeerPortNumber, - ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, - ulLength, - ulSequenceNumber + ulLength - pxWindow->rx.ulFirstSequenceNumber, - pxBest->ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, - pxBest->lDataLength, - pxBest->ulSequenceNumber + ( ( uint32_t ) pxBest->lDataLength ) - pxWindow->rx.ulFirstSequenceNumber ) ); - } - - return pxBest; - } - -#endif /* ipconfgiUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace ) - { - uint32_t ulCurrentSequenceNumber, ulLast, ulSavedSequenceNumber; - int32_t lReturn, lDistance; - TCPSegment_t *pxFound; - - /* If lTCPWindowRxCheck( ) returns == 0, the packet will be passed - directly to user (segment is expected). If it returns a positive - number, an earlier packet is missing, but this packet may be stored. - If negative, the packet has already been stored, or it is out-of-order, - or there is not enough space. - - As a side-effect, pxWindow->ulUserDataLength will get set to non-zero, - if more Rx data may be passed to the user after this packet. */ - - ulCurrentSequenceNumber = pxWindow->rx.ulCurrentSequenceNumber; - - /* For Selective Ack (SACK), used when out-of-sequence data come in. */ - pxWindow->ucOptionLength = 0u; - - /* Non-zero if TCP-windows contains data which must be popped. */ - pxWindow->ulUserDataLength = 0ul; - - if( ulCurrentSequenceNumber == ulSequenceNumber ) - { - /* This is the packet with the lowest sequence number we're waiting - for. It can be passed directly to the rx stream. */ - if( ulLength > ulSpace ) - { - FreeRTOS_debug_printf( ( "lTCPWindowRxCheck: Refuse %lu bytes, due to lack of space (%lu)\n", ulLength, ulSpace ) ); - lReturn = -1; - } - else - { - ulCurrentSequenceNumber += ulLength; - - if( listCURRENT_LIST_LENGTH( &( pxWindow->xRxSegments ) ) != 0 ) - { - ulSavedSequenceNumber = ulCurrentSequenceNumber; - - /* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated. - If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed. - So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just - clean them out. */ - do - { - pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength ); - - if ( pxFound != NULL ) - { - /* Remove it because it will be passed to user directly. */ - vTCPWindowFree( pxFound ); - } - } while ( pxFound ); - - /* Check for following segments that are already in the - queue and increment ulCurrentSequenceNumber. */ - while( ( pxFound = xTCPWindowRxFind( pxWindow, ulCurrentSequenceNumber ) ) != NULL ) - { - ulCurrentSequenceNumber += ( uint32_t ) pxFound->lDataLength; - - /* As all packet below this one have been passed to the - user it can be discarded. */ - vTCPWindowFree( pxFound ); - } - - if( ulSavedSequenceNumber != ulCurrentSequenceNumber ) - { - /* After the current data-package, there is more data - to be popped. */ - pxWindow->ulUserDataLength = ulCurrentSequenceNumber - ulSavedSequenceNumber; - - if( xTCPWindowLoggingLevel >= 1 ) - { - FreeRTOS_debug_printf( ( "lTCPWindowRxCheck[%d,%d]: retran %lu (Found %lu bytes at %lu cnt %ld)\n", - pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, - ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, - pxWindow->ulUserDataLength, - ulSavedSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, - listCURRENT_LIST_LENGTH( &pxWindow->xRxSegments ) ) ); - } - } - } - - pxWindow->rx.ulCurrentSequenceNumber = ulCurrentSequenceNumber; - - /* Packet was expected, may be passed directly to the socket - buffer or application. Store the packet at offset 0. */ - lReturn = 0; - } - } - else if( ulCurrentSequenceNumber == ( ulSequenceNumber + 1UL ) ) - { - /* Looks like a TCP keep-alive message. Do not accept/store Rx data - ulUserDataLength = 0. Not packet out-of-sync. Just reply to it. */ - lReturn = -1; - } - else - { - /* The packet is not the one expected. See if it falls within the Rx - window so it can be stored. */ - - /* An "out-of-sequence" segment was received, must have missed one. - Prepare a SACK (Selective ACK). */ - ulLast = ulSequenceNumber + ulLength; - lDistance = ( int32_t ) ( ulLast - ulCurrentSequenceNumber ); - - if( lDistance <= 0 ) - { - /* An earlier has been received, must be a retransmission of a - packet that has been accepted already. No need to send out a - Selective ACK (SACK). */ - lReturn = -1; - } - else if( lDistance > ( int32_t ) ulSpace ) - { - /* The new segment is ahead of rx.ulCurrentSequenceNumber. The - sequence number of this packet is too far ahead, ignore it. */ - FreeRTOS_debug_printf( ( "lTCPWindowRxCheck: Refuse %lu+%lu bytes, due to lack of space (%lu)\n", lDistance, ulLength, ulSpace ) ); - lReturn = -1; - } - else - { - /* See if there is more data in a contiguous block to make the - SACK describe a longer range of data. */ - - /* TODO: SACK's may also be delayed for a short period - * This is useful because subsequent packets will be SACK'd with - * single one message - */ - while( ( pxFound = xTCPWindowRxFind( pxWindow, ulLast ) ) != NULL ) - { - ulLast += ( uint32_t ) pxFound->lDataLength; - } - - if( xTCPWindowLoggingLevel >= 1 ) - { - FreeRTOS_debug_printf( ( "lTCPWindowRxCheck[%d,%d]: seqnr %lu exp %lu (dist %ld) SACK to %lu\n", - pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, - ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, - ulCurrentSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, - ( BaseType_t ) ( ulSequenceNumber - ulCurrentSequenceNumber ), /* want this signed */ - ulLast - pxWindow->rx.ulFirstSequenceNumber ) ); - } - - /* Now prepare the SACK message. - Code OPTION_CODE_SINGLE_SACK already in network byte order. */ - pxWindow->ulOptionsData[0] = OPTION_CODE_SINGLE_SACK; - - /* First sequence number that we received. */ - pxWindow->ulOptionsData[1] = FreeRTOS_htonl( ulSequenceNumber ); - - /* Last + 1 */ - pxWindow->ulOptionsData[2] = FreeRTOS_htonl( ulLast ); - - /* Which make 12 (3*4) option bytes. */ - pxWindow->ucOptionLength = 3 * sizeof( pxWindow->ulOptionsData[ 0 ] ); - - pxFound = xTCPWindowRxFind( pxWindow, ulSequenceNumber ); - - if( pxFound != NULL ) - { - /* This out-of-sequence packet has been received for a - second time. It is already stored but do send a SACK - again. */ - lReturn = -1; - } - else - { - pxFound = xTCPWindowRxNew( pxWindow, ulSequenceNumber, ( int32_t ) ulLength ); - - if( pxFound == NULL ) - { - /* Can not send a SACK, because the segment cannot be - stored. */ - pxWindow->ucOptionLength = 0u; - - /* Needs to be stored but there is no segment - available. */ - lReturn = -1; - } - else - { - if( xTCPWindowLoggingLevel != 0 ) - { - FreeRTOS_debug_printf( ( "lTCPWindowRxCheck[%u,%u]: seqnr %lu (cnt %lu)\n", - pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, - listCURRENT_LIST_LENGTH( &pxWindow->xRxSegments ) ) ); - FreeRTOS_flush_logging( ); - } - - /* Return a positive value. The packet may be accepted - and stored but an earlier packet is still missing. */ - lReturn = ( int32_t ) ( ulSequenceNumber - ulCurrentSequenceNumber ); - } - } - } - } - - return lReturn; - } - -#endif /* ipconfgiUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -/*============================================================================= - * - * ######### # # - * # # # # # - * # # # - * # #### - * # ## - * # #### - * # # # - * # # # - * ##### # # - * - * Tx functions - * - *=============================================================================*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static int32_t lTCPIncrementTxPosition( int32_t lPosition, int32_t lMax, int32_t lCount ) - { - /* +TCP stores data in circular buffers. Calculate the next position to - store. */ - lPosition += lCount; - if( lPosition >= lMax ) - { - lPosition -= lMax; - } - - return lPosition; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax ) - { - int32_t lBytesLeft = ( int32_t ) ulLength, lToWrite; - int32_t lDone = 0; - TCPSegment_t *pxSegment = pxWindow->pxHeadSegment; - - /* Puts a message in the Tx-window (after buffer size has been - verified). */ - if( pxSegment != NULL ) - { - if( pxSegment->lDataLength < pxSegment->lMaxLength ) - { - if( ( pxSegment->u.bits.bOutstanding == pdFALSE_UNSIGNED ) && ( pxSegment->lDataLength != 0 ) ) - { - /* Adding data to a segment that was already in the TX queue. It - will be filled-up to a maximum of MSS (maximum segment size). */ - lToWrite = FreeRTOS_min_int32( lBytesLeft, pxSegment->lMaxLength - pxSegment->lDataLength ); - - pxSegment->lDataLength += lToWrite; - - if( pxSegment->lDataLength >= pxSegment->lMaxLength ) - { - /* This segment is full, don't add more bytes. */ - pxWindow->pxHeadSegment = NULL; - } - - lBytesLeft -= lToWrite; - - /* ulNextTxSequenceNumber is the sequence number of the next byte to - be stored for transmission. */ - pxWindow->ulNextTxSequenceNumber += ( uint32_t ) lToWrite; - - /* Increased the return value. */ - lDone += lToWrite; - - /* Some detailed logging, for those who're interested. */ - if( ( xTCPWindowLoggingLevel >= 2 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != 0 ) ) - { - FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: Add %4lu bytes for seqNr %lu len %4lu (nxt %lu) pos %lu\n", - ulLength, - pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - pxSegment->lDataLength, - pxWindow->ulNextTxSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - pxSegment->lStreamPos ) ); - FreeRTOS_flush_logging( ); - } - - /* Calculate the next position in the circular data buffer, knowing - its maximum length 'lMax'. */ - lPosition = lTCPIncrementTxPosition( lPosition, lMax, lToWrite ); - } - } - } - - while( lBytesLeft > 0 ) - { - /* The current transmission segment is full, create new segments as - needed. */ - pxSegment = xTCPWindowTxNew( pxWindow, pxWindow->ulNextTxSequenceNumber, pxWindow->usMSS ); - - if( pxSegment != NULL ) - { - /* Store as many as needed, but no more than the maximum - (MSS). */ - lToWrite = FreeRTOS_min_int32( lBytesLeft, pxSegment->lMaxLength ); - - pxSegment->lDataLength = lToWrite; - pxSegment->lStreamPos = lPosition; - lBytesLeft -= lToWrite; - lPosition = lTCPIncrementTxPosition( lPosition, lMax, lToWrite ); - pxWindow->ulNextTxSequenceNumber += ( uint32_t ) lToWrite; - lDone += lToWrite; - - /* Link this segment in the Tx-Queue. */ - vListInsertFifo( &( pxWindow->xTxQueue ), &( pxSegment->xQueueItem ) ); - - /* Let 'pxHeadSegment' point to this segment if there is still - space. */ - if( pxSegment->lDataLength < pxSegment->lMaxLength ) - { - pxWindow->pxHeadSegment = pxSegment; - } - else - { - pxWindow->pxHeadSegment = NULL; - } - - if( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != 0 ) - { - if( ( xTCPWindowLoggingLevel >= 3 ) || - ( ( xTCPWindowLoggingLevel >= 2 ) && ( pxWindow->pxHeadSegment != NULL ) ) ) - { - FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: New %4ld bytes for seqNr %lu len %4lu (nxt %lu) pos %lu\n", - ulLength, - pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - pxSegment->lDataLength, - pxWindow->ulNextTxSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - pxSegment->lStreamPos ) ); - FreeRTOS_flush_logging( ); - } - } - } - else - { - /* A sever situation: running out of segments for transmission. - No more data can be sent at the moment. */ - if( lDone != 0 ) - { - FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: Sorry all buffers full (cancel %ld bytes)\n", lBytesLeft ) ); - } - break; - } - } - - return lDone; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow ) - { - return listLIST_IS_EMPTY( ( &pxWindow->xTxSegments) ); - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ) - { - uint32_t ulTxOutstanding; - BaseType_t xHasSpace; - TCPSegment_t *pxSegment; - - /* This function will look if there is new transmission data. It will - return true if there is data to be sent. */ - - pxSegment = xTCPWindowPeekHead( &( pxWindow->xTxQueue ) ); - - if( pxSegment == NULL ) - { - xHasSpace = pdFALSE; - } - else - { - /* How much data is outstanding, i.e. how much data has been sent - but not yet acknowledged ? */ - if( pxWindow->tx.ulHighestSequenceNumber >= pxWindow->tx.ulCurrentSequenceNumber ) - { - ulTxOutstanding = pxWindow->tx.ulHighestSequenceNumber - pxWindow->tx.ulCurrentSequenceNumber; - } - else - { - ulTxOutstanding = 0UL; - } - - /* Subtract this from the peer's space. */ - ulWindowSize -= FreeRTOS_min_uint32( ulWindowSize, ulTxOutstanding ); - - /* See if the next segment may be sent. */ - if( ulWindowSize >= ( uint32_t ) pxSegment->lDataLength ) - { - xHasSpace = pdTRUE; - } - else - { - xHasSpace = pdFALSE; - } - - /* If 'xHasSpace', it looks like the peer has at least space for 1 - more new segment of size MSS. xSize.ulTxWindowLength is the self-imposed - limitation of the transmission window (in case of many resends it - may be decreased). */ - if( ( ulTxOutstanding != 0UL ) && ( pxWindow->xSize.ulTxWindowLength < ulTxOutstanding + ( ( uint32_t ) pxSegment->lDataLength ) ) ) - { - xHasSpace = pdFALSE; - } - } - - return xHasSpace; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay ) - { - TCPSegment_t *pxSegment; - BaseType_t xReturn; - TickType_t ulAge, ulMaxAge; - - *pulDelay = 0u; - - if( listLIST_IS_EMPTY( &pxWindow->xPriorityQueue ) == pdFALSE ) - { - /* No need to look at retransmissions or new transmission as long as - there are priority segments. *pulDelay equals zero, meaning it must - be sent out immediately. */ - xReturn = pdTRUE; - } - else - { - pxSegment = xTCPWindowPeekHead( &( pxWindow->xWaitQueue ) ); - - if( pxSegment != NULL ) - { - /* There is an outstanding segment, see if it is time to resend - it. */ - ulAge = ulTimerGetAge( &pxSegment->xTransmitTimer ); - - /* After a packet has been sent for the first time, it will wait - '1 * lSRTT' ms for an ACK. A second time it will wait '2 * lSRTT' ms, - each time doubling the time-out */ - ulMaxAge = ( 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); - - if( ulMaxAge > ulAge ) - { - /* A segment must be sent after this amount of msecs */ - *pulDelay = ulMaxAge - ulAge; - } - - xReturn = pdTRUE; - } - else - { - /* No priority segment, no outstanding data, see if there is new - transmission data. */ - pxSegment = xTCPWindowPeekHead( &pxWindow->xTxQueue ); - - /* See if it fits in the peer's reception window. */ - if( pxSegment == NULL ) - { - xReturn = pdFALSE; - } - else if( prvTCPWindowTxHasSpace( pxWindow, ulWindowSize ) == pdFALSE ) - { - /* Too many outstanding messages. */ - xReturn = pdFALSE; - } - else if( ( pxWindow->u.bits.bSendFullSize != pdFALSE_UNSIGNED ) && ( pxSegment->lDataLength < pxSegment->lMaxLength ) ) - { - /* 'bSendFullSize' is a special optimisation. If true, the - driver will only sent completely filled packets (of MSS - bytes). */ - xReturn = pdFALSE; - } - else - { - xReturn = pdTRUE; - } - } - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition ) - { - TCPSegment_t *pxSegment; - uint32_t ulMaxTime; - uint32_t ulReturn = ~0UL; - - - /* Fetches data to be sent-out now. - - Priority messages: segments with a resend need no check current sliding - window size. */ - pxSegment = xTCPWindowGetHead( &( pxWindow->xPriorityQueue ) ); - pxWindow->ulOurSequenceNumber = pxWindow->tx.ulHighestSequenceNumber; - - if( pxSegment == NULL ) - { - /* Waiting messages: outstanding messages with a running timer - neither check peer's reception window size because these packets - have been sent earlier. */ - pxSegment = xTCPWindowPeekHead( &( pxWindow->xWaitQueue ) ); - - if( pxSegment != NULL ) - { - /* Do check the timing. */ - ulMaxTime = ( 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); - - if( ulTimerGetAge( &pxSegment->xTransmitTimer ) > ulMaxTime ) - { - /* A normal (non-fast) retransmission. Move it from the - head of the waiting queue. */ - pxSegment = xTCPWindowGetHead( &( pxWindow->xWaitQueue ) ); - pxSegment->u.bits.ucDupAckCount = pdFALSE_UNSIGNED; - - /* Some detailed logging. */ - if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != 0 ) ) - { - FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u,%u]: WaitQueue %ld bytes for sequence number %lu (%lX)\n", - pxWindow->usPeerPortNumber, - pxWindow->usOurPortNumber, - pxSegment->lDataLength, - pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - pxSegment->ulSequenceNumber ) ); - FreeRTOS_flush_logging( ); - } - } - else - { - pxSegment = NULL; - } - } - - if( pxSegment == NULL ) - { - /* New messages: sent-out for the first time. Check current - sliding window size of peer. */ - pxSegment = xTCPWindowPeekHead( &( pxWindow->xTxQueue ) ); - - if( pxSegment == NULL ) - { - /* No segments queued. */ - ulReturn = 0UL; - } - else if( ( pxWindow->u.bits.bSendFullSize != pdFALSE_UNSIGNED ) && ( pxSegment->lDataLength < pxSegment->lMaxLength ) ) - { - /* A segment has been queued but the driver waits until it - has a full size of MSS. */ - ulReturn = 0; - } - else if( prvTCPWindowTxHasSpace( pxWindow, ulWindowSize ) == pdFALSE ) - { - /* Peer has no more space at this moment. */ - ulReturn = 0; - } - else - { - /* Move it out of the Tx queue. */ - pxSegment = xTCPWindowGetHead( &( pxWindow->xTxQueue ) ); - - /* Don't let pxHeadSegment point to this segment any more, - so no more data will be added. */ - if( pxWindow->pxHeadSegment == pxSegment ) - { - pxWindow->pxHeadSegment = NULL; - } - - /* pxWindow->tx.highest registers the highest sequence - number in our transmission window. */ - pxWindow->tx.ulHighestSequenceNumber = pxSegment->ulSequenceNumber + ( ( uint32_t ) pxSegment->lDataLength ); - - /* ...and more detailed logging */ - if( ( xTCPWindowLoggingLevel >= 2 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u,%u]: XmitQueue %ld bytes for sequence number %lu (ws %lu)\n", - pxWindow->usPeerPortNumber, - pxWindow->usOurPortNumber, - pxSegment->lDataLength, - pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - ulWindowSize ) ); - FreeRTOS_flush_logging( ); - } - } - } - } - else - { - /* There is a priority segment. It doesn't need any checking for - space or timeouts. */ - if( xTCPWindowLoggingLevel != 0 ) - { - FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u,%u]: PrioQueue %ld bytes for sequence number %lu (ws %lu)\n", - pxWindow->usPeerPortNumber, - pxWindow->usOurPortNumber, - pxSegment->lDataLength, - pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - ulWindowSize ) ); - FreeRTOS_flush_logging( ); - } - } - - /* See if it has already been determined to return 0. */ - if( ulReturn != 0UL ) - { - configASSERT( listLIST_ITEM_CONTAINER( &(pxSegment->xQueueItem ) ) == NULL ); - - /* Now that the segment will be transmitted, add it to the tail of - the waiting queue. */ - vListInsertFifo( &pxWindow->xWaitQueue, &pxSegment->xQueueItem ); - - /* And mark it as outstanding. */ - pxSegment->u.bits.bOutstanding = pdTRUE_UNSIGNED; - - /* Administer the transmit count, needed for fast - retransmissions. */ - ( pxSegment->u.bits.ucTransmitCount )++; - - /* If there have been several retransmissions (4), decrease the - size of the transmission window to at most 2 times MSS. */ - if( pxSegment->u.bits.ucTransmitCount == MAX_TRANSMIT_COUNT_USING_LARGE_WINDOW ) - { - if( pxWindow->xSize.ulTxWindowLength > ( 2U * pxWindow->usMSS ) ) - { - FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u - %d]: Change Tx window: %lu -> %u\n", - pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, - pxWindow->xSize.ulTxWindowLength, 2 * pxWindow->usMSS ) ); - pxWindow->xSize.ulTxWindowLength = ( 2UL * pxWindow->usMSS ); - } - } - - /* Clear the transmit timer. */ - vTCPTimerSet( &( pxSegment->xTransmitTimer ) ); - - pxWindow->ulOurSequenceNumber = pxSegment->ulSequenceNumber; - - /* Inform the caller where to find the data within the queue. */ - *plPosition = pxSegment->lStreamPos; - - /* And return the length of the data segment */ - ulReturn = ( uint32_t ) pxSegment->lDataLength; - } - - return ulReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static uint32_t prvTCPWindowTxCheckAck( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ) - { - uint32_t ulBytesConfirmed = 0u; - uint32_t ulSequenceNumber = ulFirst, ulDataLength; - const ListItem_t *pxIterator; - const MiniListItem_t *pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &pxWindow->xTxSegments ); - BaseType_t xDoUnlink; - TCPSegment_t *pxSegment; - /* An acknowledgement or a selective ACK (SACK) was received. See if some outstanding data - may be removed from the transmission queue(s). - All TX segments for which - ( ( ulSequenceNumber >= ulFirst ) && ( ulSequenceNumber < ulLast ) in a - contiguous block. Note that the segments are stored in xTxSegments in a - strict sequential order. */ - - /* SRTT[i] = (1-a) * SRTT[i-1] + a * RTT - - 0 < a < 1; usually a = 1/8 - - RTO = 2 * SRTT - - where: - RTT is Round Trip Time - SRTT is Smoothed RTT - RTO is Retransmit timeout - - A Smoothed RTT will increase quickly, but it is conservative when - becoming smaller. */ - - for( - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); - ( pxIterator != ( const ListItem_t * ) pxEnd ) && ( xSequenceLessThan( ulSequenceNumber, ulLast ) != 0 ); - ) - { - xDoUnlink = pdFALSE; - pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - - /* Move to the next item because the current item might get - removed. */ - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ); - - /* Continue if this segment does not fall within the ACK'd range. */ - if( xSequenceGreaterThan( ulSequenceNumber, pxSegment->ulSequenceNumber ) != pdFALSE ) - { - continue; - } - - /* Is it ready? */ - if( ulSequenceNumber != pxSegment->ulSequenceNumber ) - { - break; - } - - ulDataLength = ( uint32_t ) pxSegment->lDataLength; - - if( pxSegment->u.bits.bAcked == pdFALSE_UNSIGNED ) - { - if( xSequenceGreaterThan( pxSegment->ulSequenceNumber + ( uint32_t )ulDataLength, ulLast ) != pdFALSE ) - { - /* What happens? Only part of this segment was accepted, - probably due to WND limits - - AAAAAAA BBBBBBB << acked - aaaaaaa aaaa << sent */ - #if( ipconfigHAS_DEBUG_PRINTF != 0 ) - { - uint32_t ulFirstSeq = pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber; - FreeRTOS_debug_printf( ( "prvTCPWindowTxCheckAck[%u.%u]: %lu - %lu Partial sequence number %lu - %lu\n", - pxWindow->usPeerPortNumber, - pxWindow->usOurPortNumber, - ulFirstSeq - pxWindow->tx.ulFirstSequenceNumber, - ulLast - pxWindow->tx.ulFirstSequenceNumber, - ulFirstSeq, ulFirstSeq + ulDataLength ) ); - } - #endif /* ipconfigHAS_DEBUG_PRINTF */ - break; - } - - /* This segment is fully ACK'd, set the flag. */ - pxSegment->u.bits.bAcked = pdTRUE_UNSIGNED; - - /* Calculate the RTT only if the segment was sent-out for the - first time and if this is the last ACK'd segment in a range. */ - if( ( pxSegment->u.bits.ucTransmitCount == 1 ) && ( ( pxSegment->ulSequenceNumber + ulDataLength ) == ulLast ) ) - { - int32_t mS = ( int32_t ) ulTimerGetAge( &( pxSegment->xTransmitTimer ) ); - - if( pxWindow->lSRTT >= mS ) - { - /* RTT becomes smaller: adapt slowly. */ - pxWindow->lSRTT = ( ( winSRTT_DECREMENT_NEW * mS ) + ( winSRTT_DECREMENT_CURRENT * pxWindow->lSRTT ) ) / ( winSRTT_DECREMENT_NEW + winSRTT_DECREMENT_CURRENT ); - } - else - { - /* RTT becomes larger: adapt quicker */ - pxWindow->lSRTT = ( ( winSRTT_INCREMENT_NEW * mS ) + ( winSRTT_INCREMENT_CURRENT * pxWindow->lSRTT ) ) / ( winSRTT_INCREMENT_NEW + winSRTT_INCREMENT_CURRENT ); - } - - /* Cap to the minimum of 50ms. */ - if( pxWindow->lSRTT < winSRTT_CAP_mS ) - { - pxWindow->lSRTT = winSRTT_CAP_mS; - } - } - - /* Unlink it from the 3 queues, but do not destroy it (yet). */ - xDoUnlink = pdTRUE; - } - - /* pxSegment->u.bits.bAcked is now true. Is it located at the left - side of the transmission queue? If so, it may be freed. */ - if( ulSequenceNumber == pxWindow->tx.ulCurrentSequenceNumber ) - { - if( ( xTCPWindowLoggingLevel >= 2 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "prvTCPWindowTxCheckAck: %lu - %lu Ready sequence number %lu\n", - ulFirst - pxWindow->tx.ulFirstSequenceNumber, - ulLast - pxWindow->tx.ulFirstSequenceNumber, - pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber ) ); - } - - /* Increase the left-hand value of the transmission window. */ - pxWindow->tx.ulCurrentSequenceNumber += ulDataLength; - - /* This function will return the number of bytes that the tail - of txStream may be advanced. */ - ulBytesConfirmed += ulDataLength; - - /* All segments below tx.ulCurrentSequenceNumber may be freed. */ - vTCPWindowFree( pxSegment ); - - /* No need to unlink it any more. */ - xDoUnlink = pdFALSE; - } - - if( ( xDoUnlink != pdFALSE ) && ( listLIST_ITEM_CONTAINER( &( pxSegment->xQueueItem ) ) != NULL ) ) - { - /* Remove item from its queues. */ - uxListRemove( &pxSegment->xQueueItem ); - } - - ulSequenceNumber += ulDataLength; - } - - return ulBytesConfirmed; - } -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - static uint32_t prvTCPWindowFastRetransmit( TCPWindow_t *pxWindow, uint32_t ulFirst ) - { - const ListItem_t *pxIterator; - const MiniListItem_t* pxEnd; - TCPSegment_t *pxSegment; - uint32_t ulCount = 0UL; - - /* A higher Tx block has been acknowledged. Now iterate through the - xWaitQueue to find a possible condition for a FAST retransmission. */ - - pxEnd = ( const MiniListItem_t* ) listGET_END_MARKER( &( pxWindow->xWaitQueue ) ); - - for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); - pxIterator != ( const ListItem_t * ) pxEnd; ) - { - /* Get the owner, which is a TCP segment. */ - pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); - - /* Hop to the next item before the current gets unlinked. */ - pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ); - - /* Fast retransmission: - When 3 packets with a higher sequence number have been acknowledged - by the peer, it is very unlikely a current packet will ever arrive. - It will be retransmitted far before the RTO. */ - if( ( pxSegment->u.bits.bAcked == pdFALSE_UNSIGNED ) && - ( xSequenceLessThan( pxSegment->ulSequenceNumber, ulFirst ) != pdFALSE ) && - ( ++( pxSegment->u.bits.ucDupAckCount ) == DUPLICATE_ACKS_BEFORE_FAST_RETRANSMIT ) ) - { - pxSegment->u.bits.ucTransmitCount = pdFALSE_UNSIGNED; - - /* Not clearing 'ucDupAckCount' yet as more SACK's might come in - which might lead to a second fast rexmit. */ - if( ( xTCPWindowLoggingLevel >= 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "prvTCPWindowFastRetransmit: Requeue sequence number %lu < %lu\n", - pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - ulFirst - pxWindow->tx.ulFirstSequenceNumber ) ); - FreeRTOS_flush_logging( ); - } - - /* Remove it from xWaitQueue. */ - uxListRemove( &pxSegment->xQueueItem ); - - /* Add this segment to the priority queue so it gets - retransmitted immediately. */ - vListInsertFifo( &( pxWindow->xPriorityQueue ), &( pxSegment->xQueueItem ) ); - ulCount++; - } - } - - return ulCount; - } -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ) - { - uint32_t ulFirstSequence, ulReturn; - - /* Receive a normal ACK. */ - - ulFirstSequence = pxWindow->tx.ulCurrentSequenceNumber; - - if( xSequenceLessThanOrEqual( ulSequenceNumber, ulFirstSequence ) != pdFALSE ) - { - ulReturn = 0UL; - } - else - { - ulReturn = prvTCPWindowTxCheckAck( pxWindow, ulFirstSequence, ulSequenceNumber ); - } - - return ulReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 1 ) - - uint32_t ulTCPWindowTxSack( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ) - { - uint32_t ulAckCount = 0UL; - uint32_t ulCurrentSequenceNumber = pxWindow->tx.ulCurrentSequenceNumber; - - /* Receive a SACK option. */ - ulAckCount = prvTCPWindowTxCheckAck( pxWindow, ulFirst, ulLast ); - prvTCPWindowFastRetransmit( pxWindow, ulFirst ); - - if( ( xTCPWindowLoggingLevel >= 1 ) && ( xSequenceGreaterThan( ulFirst, ulCurrentSequenceNumber ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "ulTCPWindowTxSack[%u,%u]: from %lu to %lu (ack = %lu)\n", - pxWindow->usPeerPortNumber, - pxWindow->usOurPortNumber, - ulFirst - pxWindow->tx.ulFirstSequenceNumber, - ulLast - pxWindow->tx.ulFirstSequenceNumber, - pxWindow->tx.ulCurrentSequenceNumber - pxWindow->tx.ulFirstSequenceNumber ) ); - FreeRTOS_flush_logging( ); - } - - return ulAckCount; - } - -#endif /* ipconfigUSE_TCP_WIN == 1 */ -/*-----------------------------------------------------------*/ - -/* -##### # ##### #### ###### -# # # # # # # # # # # - # # # # # # - # ### ##### # # # # # # - # # # # # # # # ##### - # # # # # # #### # # # - # # # # # # # # # # - # # # # #### # # # # - #### ##### # # # #### #### #### - # - ### -*/ -#if( ipconfigUSE_TCP_WIN == 0 ) - - int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace ) - { - int32_t iReturn; - - /* Data was received at 'ulSequenceNumber'. See if it was expected - and if there is enough space to store the new data. */ - if( ( pxWindow->rx.ulCurrentSequenceNumber != ulSequenceNumber ) || ( ulSpace < ulLength ) ) - { - iReturn = -1; - } - else - { - pxWindow->rx.ulCurrentSequenceNumber += ( uint32_t ) ulLength; - iReturn = 0; - } - - return iReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax ) - { - TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); - int32_t lResult; - - /* Data is being scheduled for transmission. */ - - /* lMax would indicate the size of the txStream. */ - ( void ) lMax; - /* This is tiny TCP: there is only 1 segment for outgoing data. - As long as 'lDataLength' is unequal to zero, the segment is still occupied. */ - if( pxSegment->lDataLength > 0 ) - { - lResult = 0L; - } - else - { - if( ulLength > ( uint32_t ) pxSegment->lMaxLength ) - { - if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: can only store %ld / %ld bytes\n", ulLength, pxSegment->lMaxLength ) ); - } - - ulLength = ( uint32_t ) pxSegment->lMaxLength; - } - - if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: SeqNr %ld (%ld) Len %ld\n", - pxWindow->ulNextTxSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - pxWindow->tx.ulCurrentSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - ulLength ) ); - } - - /* The sequence number of the first byte in this packet. */ - pxSegment->ulSequenceNumber = pxWindow->ulNextTxSequenceNumber; - pxSegment->lDataLength = ( int32_t ) ulLength; - pxSegment->lStreamPos = lPosition; - pxSegment->u.ulFlags = 0UL; - vTCPTimerSet( &( pxSegment->xTransmitTimer ) ); - - /* Increase the sequence number of the next data to be stored for - transmission. */ - pxWindow->ulNextTxSequenceNumber += ulLength; - lResult = ( int32_t )ulLength; - } - - return lResult; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition ) - { - TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); - uint32_t ulLength = ( uint32_t ) pxSegment->lDataLength; - uint32_t ulMaxTime; - - if( ulLength != 0UL ) - { - /* _HT_ Still under investigation */ - ( void ) ulWindowSize; - - if( pxSegment->u.bits.bOutstanding != pdFALSE_UNSIGNED ) - { - /* As 'ucTransmitCount' has a minimum of 1, take 2 * RTT */ - ulMaxTime = ( ( uint32_t ) 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); - - if( ulTimerGetAge( &( pxSegment->xTransmitTimer ) ) < ulMaxTime ) - { - ulLength = 0ul; - } - } - - if( ulLength != 0ul ) - { - pxSegment->u.bits.bOutstanding = pdTRUE_UNSIGNED; - pxSegment->u.bits.ucTransmitCount++; - vTCPTimerSet (&pxSegment->xTransmitTimer); - pxWindow->ulOurSequenceNumber = pxSegment->ulSequenceNumber; - *plPosition = pxSegment->lStreamPos; - } - } - - return ulLength; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow ) - { - BaseType_t xReturn; - - /* Has the outstanding data been sent because user wants to shutdown? */ - if( pxWindow->xTxSegment.lDataLength == 0 ) - { - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ); - static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ) - { - BaseType_t xReturn; - - if( ulWindowSize >= pxWindow->usMSSInit ) - { - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay ) - { - TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); - BaseType_t xReturn; - TickType_t ulAge, ulMaxAge; - - /* Check data to be sent. */ - *pulDelay = ( TickType_t ) 0; - if( pxSegment->lDataLength == 0 ) - { - /* Got nothing to send right now. */ - xReturn = pdFALSE; - } - else - { - if( pxSegment->u.bits.bOutstanding != pdFALSE_UNSIGNED ) - { - ulAge = ulTimerGetAge ( &pxSegment->xTransmitTimer ); - ulMaxAge = ( ( TickType_t ) 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); - - if( ulMaxAge > ulAge ) - { - *pulDelay = ulMaxAge - ulAge; - } - - xReturn = pdTRUE; - } - else if( prvTCPWindowTxHasSpace( pxWindow, ulWindowSize ) == pdFALSE ) - { - /* Too many outstanding messages. */ - xReturn = pdFALSE; - } - else - { - xReturn = pdTRUE; - } - } - - return xReturn; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ) - { - TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); - uint32_t ulDataLength = ( uint32_t ) pxSegment->lDataLength; - - /* Receive a normal ACK */ - - if( ulDataLength != 0ul ) - { - if( ulSequenceNumber < ( pxWindow->tx.ulCurrentSequenceNumber + ulDataLength ) ) - { - if( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) - { - FreeRTOS_debug_printf( ( "win_tx_ack: acked %ld expc %ld len %ld\n", - ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - pxWindow->tx.ulCurrentSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - ulDataLength ) ); - } - - /* Nothing to send right now. */ - ulDataLength = 0ul; - } - else - { - pxWindow->tx.ulCurrentSequenceNumber += ulDataLength; - - if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) - { - FreeRTOS_debug_printf( ( "win_tx_ack: acked seqnr %ld len %ld\n", - ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, - ulDataLength ) ); - } - - pxSegment->lDataLength = 0; - } - } - - return ulDataLength; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ) - { - /* Return true if 'ulCurrentSequenceNumber >= ulHighestSequenceNumber' - 'ulCurrentSequenceNumber' is the highest sequence number stored, - 'ulHighestSequenceNumber' is the highest sequence number seen. */ - return xSequenceGreaterThanOrEqual( pxWindow->rx.ulCurrentSequenceNumber, pxWindow->rx.ulHighestSequenceNumber ); - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - -#if( ipconfigUSE_TCP_WIN == 0 ) - - /* Destroy a window (always returns NULL) */ - void vTCPWindowDestroy( TCPWindow_t *pxWindow ) - { - /* As in tiny TCP there are no shared segments descriptors, there is - nothing to release. */ - ( void ) pxWindow; - } - -#endif /* ipconfigUSE_TCP_WIN == 0 */ -/*-----------------------------------------------------------*/ - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* + * FreeRTOS_TCP_WIN.c + * Module which handles the TCP windowing schemes for FreeRTOS+TCP. Many + * functions have two versions - one for FreeRTOS+TCP (full) and one for + * FreeRTOS+TCP (lite). + * + * In this module all ports and IP addresses and sequence numbers are + * being stored in host byte-order. + */ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" +#include "FreeRTOS_TCP_WIN.h" + +/* Constants used for Smoothed Round Trip Time (SRTT). */ +#define winSRTT_INCREMENT_NEW 2 +#define winSRTT_INCREMENT_CURRENT 6 +#define winSRTT_DECREMENT_NEW 1 +#define winSRTT_DECREMENT_CURRENT 7 +#define winSRTT_CAP_mS 50 + +#if( ipconfigUSE_TCP_WIN == 1 ) + + #define xTCPWindowRxNew( pxWindow, ulSequenceNumber, lCount ) xTCPWindowNew( pxWindow, ulSequenceNumber, lCount, pdTRUE ) + + #define xTCPWindowTxNew( pxWindow, ulSequenceNumber, lCount ) xTCPWindowNew( pxWindow, ulSequenceNumber, lCount, pdFALSE ) + + /* The code to send a single Selective ACK (SACK): + * NOP (0x01), NOP (0x01), SACK (0x05), LEN (0x0a), + * followed by a lower and a higher sequence number, + * where LEN is 2 + 2*4 = 10 bytes. */ + #if( ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN ) + #define OPTION_CODE_SINGLE_SACK ( 0x0101050aUL ) + #else + #define OPTION_CODE_SINGLE_SACK ( 0x0a050101UL ) + #endif + + /* Normal retransmission: + * A packet will be retransmitted after a Retransmit Time-Out (RTO). + * Fast retransmission: + * When 3 packets with a higher sequence number have been acknowledged + * by the peer, it is very unlikely a current packet will ever arrive. + * It will be retransmitted far before the RTO. + */ + #define DUPLICATE_ACKS_BEFORE_FAST_RETRANSMIT ( 3u ) + + /* If there have been several retransmissions (4), decrease the + * size of the transmission window to at most 2 times MSS. + */ + #define MAX_TRANSMIT_COUNT_USING_LARGE_WINDOW ( 4u ) + +#endif /* configUSE_TCP_WIN */ +/*-----------------------------------------------------------*/ + +extern void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, MiniListItem_t * const pxWhere ); + +/* + * All TCP sockets share a pool of segment descriptors (TCPSegment_t) + * Available descriptors are stored in the 'xSegmentList' + * When a socket owns a descriptor, it will either be stored in + * 'xTxSegments' or 'xRxSegments' + * As soon as a package has been confirmed, the descriptor will be returned + * to the segment pool + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static BaseType_t prvCreateSectors( void ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * Find a segment with a given sequence number in the list of received + * segments: 'pxWindow->xRxSegments'. + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static TCPSegment_t *xTCPWindowRxFind( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * Allocate a new segment + * The socket will borrow all segments from a common pool: 'xSegmentList', + * which is a list of 'TCPSegment_t' + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static TCPSegment_t *xTCPWindowNew( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, int32_t lCount, BaseType_t xIsForRx ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* When the peer has a close request (FIN flag), the driver will check if + * there are missing packets in the Rx-queue + * It will accept the closure of the connection if both conditions are true: + * - the Rx-queue is empty + * - we've ACK'd the highest Rx sequence number seen + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * Detaches and returns the head of a queue + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static TCPSegment_t *xTCPWindowGetHead( List_t *pxList ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * Returns the head of a queue but it won't be detached + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static TCPSegment_t *xTCPWindowPeekHead( List_t *pxList ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * Free entry pxSegment because it's not used anymore + * The ownership will be passed back to the segment pool + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static void vTCPWindowFree( TCPSegment_t *pxSegment ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * A segment has been received with sequence number 'ulSequenceNumber', where + * 'ulCurrentSequenceNumber == ulSequenceNumber', which means that exactly this + * segment was expected. xTCPWindowRxConfirm() will check if there is already + * another segment with a sequence number between (ulSequenceNumber) and + * (ulSequenceNumber+xLength). Normally none will be found, because the next Rx + * segment should have a sequence number equal to '(ulSequenceNumber+xLength)'. + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static TCPSegment_t *xTCPWindowRxConfirm( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * FreeRTOS+TCP stores data in circular buffers. Calculate the next position to + * store. + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static int32_t lTCPIncrementTxPosition( int32_t lPosition, int32_t lMax, int32_t lCount ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * This function will look if there is new transmission data. It will return + * true if there is data to be sent. + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * An acknowledge was received. See if some outstanding data may be removed + * from the transmission queue(s). + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static uint32_t prvTCPWindowTxCheckAck( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* + * A higher Tx block has been acknowledged. Now iterate through the xWaitQueue + * to find a possible condition for a FAST retransmission. + */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static uint32_t prvTCPWindowFastRetransmit( TCPWindow_t *pxWindow, uint32_t ulFirst ); +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/*-----------------------------------------------------------*/ + +/* TCP segment pool. */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static TCPSegment_t *xTCPSegments = NULL; +#endif /* ipconfigUSE_TCP_WIN == 1 */ + +/* List of free TCP segments. */ +#if( ipconfigUSE_TCP_WIN == 1 ) + static List_t xSegmentList; +#endif + +/* Logging verbosity level. */ +BaseType_t xTCPWindowLoggingLevel = 0; + +#if( ipconfigUSE_TCP_WIN == 1 ) + /* Some 32-bit arithmetic: comparing sequence numbers */ + static portINLINE BaseType_t xSequenceLessThanOrEqual( uint32_t a, uint32_t b ); + static portINLINE BaseType_t xSequenceLessThanOrEqual( uint32_t a, uint32_t b ) + { + /* Test if a <= b + Return true if the unsigned subtraction of (b-a) doesn't generate an + arithmetic overflow. */ + return ( ( b - a ) & 0x80000000UL ) == 0UL; + } +#endif /* ipconfigUSE_TCP_WIN */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + static portINLINE BaseType_t xSequenceLessThan( uint32_t a, uint32_t b ); + static portINLINE BaseType_t xSequenceLessThan( uint32_t a, uint32_t b ) + { + /* Test if a < b */ + return ( ( b - a - 1UL ) & 0x80000000UL ) == 0UL; + } +#endif /* ipconfigUSE_TCP_WIN */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + static portINLINE BaseType_t xSequenceGreaterThan( uint32_t a, uint32_t b ); + static portINLINE BaseType_t xSequenceGreaterThan( uint32_t a, uint32_t b ) + { + /* Test if a > b */ + return ( ( a - b - 1UL ) & 0x80000000UL ) == 0UL; + } +#endif /* ipconfigUSE_TCP_WIN */ + +/*-----------------------------------------------------------*/ +static portINLINE BaseType_t xSequenceGreaterThanOrEqual( uint32_t a, uint32_t b ); +static portINLINE BaseType_t xSequenceGreaterThanOrEqual( uint32_t a, uint32_t b ) +{ + /* Test if a >= b */ + return ( ( a - b ) & 0x80000000UL ) == 0UL; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + static portINLINE void vListInsertFifo( List_t * const pxList, ListItem_t * const pxNewListItem ); + static portINLINE void vListInsertFifo( List_t * const pxList, ListItem_t * const pxNewListItem ) + { + vListInsertGeneric( pxList, pxNewListItem, &pxList->xListEnd ); + } +#endif +/*-----------------------------------------------------------*/ + +static portINLINE void vTCPTimerSet( TCPTimer_t *pxTimer ); +static portINLINE void vTCPTimerSet( TCPTimer_t *pxTimer ) +{ + pxTimer->ulBorn = xTaskGetTickCount ( ); +} +/*-----------------------------------------------------------*/ + +static portINLINE uint32_t ulTimerGetAge( TCPTimer_t *pxTimer ); +static portINLINE uint32_t ulTimerGetAge( TCPTimer_t *pxTimer ) +{ + return ( ( xTaskGetTickCount() - pxTimer->ulBorn ) * portTICK_PERIOD_MS ); +} +/*-----------------------------------------------------------*/ + +/* _HT_ GCC (using the settings that I'm using) checks for every public function if it is +preceded by a prototype. Later this prototype will be located in list.h? */ + +extern void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, MiniListItem_t * const pxWhere ); + +void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, MiniListItem_t * const pxWhere ) +{ + /* Insert a new list item into pxList, it does not sort the list, + but it puts the item just before xListEnd, so it will be the last item + returned by listGET_HEAD_ENTRY() */ + pxNewListItem->pxNext = (struct xLIST_ITEM * configLIST_VOLATILE)pxWhere; + pxNewListItem->pxPrevious = pxWhere->pxPrevious; + pxWhere->pxPrevious->pxNext = pxNewListItem; + pxWhere->pxPrevious = pxNewListItem; + + /* Remember which list the item is in. */ + listLIST_ITEM_CONTAINER( pxNewListItem ) = ( void * ) pxList; + + ( pxList->uxNumberOfItems )++; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static BaseType_t prvCreateSectors( void ) + { + BaseType_t xIndex, xReturn; + + /* Allocate space for 'xTCPSegments' and store them in 'xSegmentList'. */ + + vListInitialise( &xSegmentList ); + xTCPSegments = ( TCPSegment_t * ) pvPortMallocLarge( ipconfigTCP_WIN_SEG_COUNT * sizeof( xTCPSegments[ 0 ] ) ); + + if( xTCPSegments == NULL ) + { + FreeRTOS_debug_printf( ( "prvCreateSectors: malloc %lu failed\n", + ipconfigTCP_WIN_SEG_COUNT * sizeof( xTCPSegments[ 0 ] ) ) ); + + xReturn = pdFAIL; + } + else + { + /* Clear the allocated space. */ + memset( xTCPSegments, '\0', ipconfigTCP_WIN_SEG_COUNT * sizeof( xTCPSegments[ 0 ] ) ); + + for( xIndex = 0; xIndex < ipconfigTCP_WIN_SEG_COUNT; xIndex++ ) + { + /* Could call vListInitialiseItem here but all data has been + nulled already. Set the owner to a segment descriptor. */ + listSET_LIST_ITEM_OWNER( &( xTCPSegments[ xIndex ].xListItem ), ( void* ) &( xTCPSegments[ xIndex ] ) ); + listSET_LIST_ITEM_OWNER( &( xTCPSegments[ xIndex ].xQueueItem ), ( void* ) &( xTCPSegments[ xIndex ] ) ); + + /* And add it to the pool of available segments */ + vListInsertFifo( &xSegmentList, &( xTCPSegments[xIndex].xListItem ) ); + } + + xReturn = pdPASS; + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static TCPSegment_t *xTCPWindowRxFind( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ) + { + const ListItem_t *pxIterator; + const MiniListItem_t* pxEnd; + TCPSegment_t *pxSegment, *pxReturn = NULL; + + /* Find a segment with a given sequence number in the list of received + segments. */ + + pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &pxWindow->xRxSegments ); + + for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); + pxIterator != ( const ListItem_t * ) pxEnd; + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + + if( pxSegment->ulSequenceNumber == ulSequenceNumber ) + { + pxReturn = pxSegment; + break; + } + } + + return pxReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static TCPSegment_t *xTCPWindowNew( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, int32_t lCount, BaseType_t xIsForRx ) + { + TCPSegment_t *pxSegment; + ListItem_t * pxItem; + + /* Allocate a new segment. The socket will borrow all segments from a + common pool: 'xSegmentList', which is a list of 'TCPSegment_t' */ + if( listLIST_IS_EMPTY( &xSegmentList ) != pdFALSE ) + { + /* If the TCP-stack runs out of segments, you might consider + increasing 'ipconfigTCP_WIN_SEG_COUNT'. */ + FreeRTOS_debug_printf( ( "xTCPWindow%cxNew: Error: all segments occupied\n", xIsForRx ? 'R' : 'T' ) ); + pxSegment = NULL; + } + else + { + /* Pop the item at the head of the list. Semaphore protection is + not required as only the IP task will call these functions. */ + pxItem = ( ListItem_t * ) listGET_HEAD_ENTRY( &xSegmentList ); + pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxItem ); + + configASSERT( pxItem != NULL ); + configASSERT( pxSegment != NULL ); + + /* Remove the item from xSegmentList. */ + uxListRemove( pxItem ); + + /* Add it to either the connections' Rx or Tx queue. */ + vListInsertFifo( xIsForRx ? &pxWindow->xRxSegments : &pxWindow->xTxSegments, pxItem ); + + /* And set the segment's timer to zero */ + vTCPTimerSet( &pxSegment->xTransmitTimer ); + + pxSegment->u.ulFlags = 0; + pxSegment->u.bits.bIsForRx = ( xIsForRx != 0 ); + pxSegment->lMaxLength = lCount; + pxSegment->lDataLength = lCount; + pxSegment->ulSequenceNumber = ulSequenceNumber; + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + static UBaseType_t xLowestLength = ipconfigTCP_WIN_SEG_COUNT; + UBaseType_t xLength = listCURRENT_LIST_LENGTH( &xSegmentList ); + + if( xLowestLength > xLength ) + { + xLowestLength = xLength; + } + } + #endif /* ipconfigHAS_DEBUG_PRINTF */ + } + + return pxSegment; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ) + { + BaseType_t xReturn; + + /* When the peer has a close request (FIN flag), the driver will check + if there are missing packets in the Rx-queue. It will accept the + closure of the connection if both conditions are true: + - the Rx-queue is empty + - the highest Rx sequence number has been ACK'ed */ + if( listLIST_IS_EMPTY( ( &pxWindow->xRxSegments ) ) == pdFALSE ) + { + /* Rx data has been stored while earlier packets were missing. */ + xReturn = pdFALSE; + } + else if( xSequenceGreaterThanOrEqual( pxWindow->rx.ulCurrentSequenceNumber, pxWindow->rx.ulHighestSequenceNumber ) != pdFALSE ) + { + /* No Rx packets are being stored and the highest sequence number + that has been received has been ACKed. */ + xReturn = pdTRUE; + } + else + { + FreeRTOS_debug_printf( ( "xTCPWindowRxEmpty: cur %lu highest %lu (empty)\n", + ( pxWindow->rx.ulCurrentSequenceNumber - pxWindow->rx.ulFirstSequenceNumber ), + ( pxWindow->rx.ulHighestSequenceNumber - pxWindow->rx.ulFirstSequenceNumber ) ) ); + xReturn = pdFALSE; + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static TCPSegment_t *xTCPWindowGetHead( List_t *pxList ) + { + TCPSegment_t *pxSegment; + ListItem_t * pxItem; + + /* Detaches and returns the head of a queue. */ + if( listLIST_IS_EMPTY( pxList ) != pdFALSE ) + { + pxSegment = NULL; + } + else + { + pxItem = ( ListItem_t * ) listGET_HEAD_ENTRY( pxList ); + pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxItem ); + + uxListRemove( pxItem ); + } + + return pxSegment; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static TCPSegment_t *xTCPWindowPeekHead( List_t *pxList ) + { + ListItem_t *pxItem; + TCPSegment_t *pxReturn; + + /* Returns the head of a queue but it won't be detached. */ + if( listLIST_IS_EMPTY( pxList ) != pdFALSE ) + { + pxReturn = NULL; + } + else + { + pxItem = ( ListItem_t * ) listGET_HEAD_ENTRY( pxList ); + pxReturn = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxItem ); + } + + return pxReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static void vTCPWindowFree( TCPSegment_t *pxSegment ) + { + /* Free entry pxSegment because it's not used any more. The ownership + will be passed back to the segment pool. + + Unlink it from one of the queues, if any. */ + if( listLIST_ITEM_CONTAINER( &( pxSegment->xQueueItem ) ) != NULL ) + { + uxListRemove( &( pxSegment->xQueueItem ) ); + } + + pxSegment->ulSequenceNumber = 0u; + pxSegment->lDataLength = 0l; + pxSegment->u.ulFlags = 0u; + + /* Take it out of xRxSegments/xTxSegments */ + if( listLIST_ITEM_CONTAINER( &( pxSegment->xListItem ) ) != NULL ) + { + uxListRemove( &( pxSegment->xListItem ) ); + } + + /* Return it to xSegmentList */ + vListInsertFifo( &xSegmentList, &( pxSegment->xListItem ) ); + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + void vTCPWindowDestroy( TCPWindow_t *pxWindow ) + { + List_t * pxSegments; + BaseType_t xRound; + TCPSegment_t *pxSegment; + + /* Destroy a window. A TCP window doesn't serve any more. Return all + owned segments to the pool. In order to save code, it will make 2 rounds, + one to remove the segments from xRxSegments, and a second round to clear + xTxSegments*/ + for( xRound = 0; xRound < 2; xRound++ ) + { + if( xRound != 0 ) + { + pxSegments = &( pxWindow->xRxSegments ); + } + else + { + pxSegments = &( pxWindow->xTxSegments ); + } + + if( listLIST_IS_INITIALISED( pxSegments ) != pdFALSE ) + { + while( listCURRENT_LIST_LENGTH( pxSegments ) > 0U ) + { + pxSegment = ( TCPSegment_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxSegments ); + vTCPWindowFree( pxSegment ); + } + } + } + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +void vTCPWindowCreate( TCPWindow_t *pxWindow, uint32_t ulRxWindowLength, + uint32_t ulTxWindowLength, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ) +{ + /* Create and initialize a window. */ + + #if( ipconfigUSE_TCP_WIN == 1 ) + { + if( xTCPSegments == NULL ) + { + prvCreateSectors(); + } + + vListInitialise( &pxWindow->xTxSegments ); + vListInitialise( &pxWindow->xRxSegments ); + + vListInitialise( &pxWindow->xPriorityQueue ); /* Priority queue: segments which must be sent immediately */ + vListInitialise( &pxWindow->xTxQueue ); /* Transmit queue: segments queued for transmission */ + vListInitialise( &pxWindow->xWaitQueue ); /* Waiting queue: outstanding segments */ + } + #endif /* ipconfigUSE_TCP_WIN == 1 */ + + if( xTCPWindowLoggingLevel != 0 ) + { + FreeRTOS_debug_printf( ( "vTCPWindowCreate: for WinLen = Rx/Tx: %lu/%lu\n", + ulRxWindowLength, ulTxWindowLength ) ); + } + + pxWindow->xSize.ulRxWindowLength = ulRxWindowLength; + pxWindow->xSize.ulTxWindowLength = ulTxWindowLength; + + vTCPWindowInit( pxWindow, ulAckNumber, ulSequenceNumber, ulMSS ); +} +/*-----------------------------------------------------------*/ + +void vTCPWindowInit( TCPWindow_t *pxWindow, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ) +{ +const int32_t l500ms = 500; + + pxWindow->u.ulFlags = 0ul; + pxWindow->u.bits.bHasInit = pdTRUE_UNSIGNED; + + if( ulMSS != 0ul ) + { + if( pxWindow->usMSSInit != 0u ) + { + pxWindow->usMSSInit = ( uint16_t ) ulMSS; + } + + if( ( ulMSS < ( uint32_t ) pxWindow->usMSS ) || ( pxWindow->usMSS == 0u ) ) + { + pxWindow->xSize.ulRxWindowLength = ( pxWindow->xSize.ulRxWindowLength / ulMSS ) * ulMSS; + pxWindow->usMSS = ( uint16_t ) ulMSS; + } + } + + #if( ipconfigUSE_TCP_WIN == 0 ) + { + pxWindow->xTxSegment.lMaxLength = ( int32_t ) pxWindow->usMSS; + } + #endif /* ipconfigUSE_TCP_WIN == 1 */ + + /*Start with a timeout of 2 * 500 ms (1 sec). */ + pxWindow->lSRTT = l500ms; + + /* Just for logging, to print relative sequence numbers. */ + pxWindow->rx.ulFirstSequenceNumber = ulAckNumber; + + /* The segment asked for in the next transmission. */ + pxWindow->rx.ulCurrentSequenceNumber = ulAckNumber; + + /* The right-hand side of the receive window. */ + pxWindow->rx.ulHighestSequenceNumber = ulAckNumber; + + pxWindow->tx.ulFirstSequenceNumber = ulSequenceNumber; + + /* The segment asked for in next transmission. */ + pxWindow->tx.ulCurrentSequenceNumber = ulSequenceNumber; + + /* The sequence number given to the next outgoing byte to be added is + maintained by lTCPWindowTxAdd(). */ + pxWindow->ulNextTxSequenceNumber = ulSequenceNumber; + + /* The right-hand side of the transmit window. */ + pxWindow->tx.ulHighestSequenceNumber = ulSequenceNumber; + pxWindow->ulOurSequenceNumber = ulSequenceNumber; +} +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + void vTCPSegmentCleanup( void ) + { + /* Free and clear the TCP segments pointer. This function should only be called + * once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this + * function. */ + if( xTCPSegments != NULL ) + { + vPortFreeLarge( xTCPSegments ); + xTCPSegments = NULL; + } + } + +#endif /* ipconfgiUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +/*============================================================================= + * + * ###### # # + * # # # # + * # # # # + * # # #### + * ###### ## + * # ## #### + * # # # # + * # # # # + * ### ## # # + * Rx functions + * + *=============================================================================*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static TCPSegment_t *xTCPWindowRxConfirm( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength ) + { + TCPSegment_t *pxBest = NULL; + const ListItem_t *pxIterator; + uint32_t ulNextSequenceNumber = ulSequenceNumber + ulLength; + const MiniListItem_t* pxEnd = ( const MiniListItem_t* ) listGET_END_MARKER( &pxWindow->xRxSegments ); + TCPSegment_t *pxSegment; + + /* A segment has been received with sequence number 'ulSequenceNumber', + where 'ulCurrentSequenceNumber == ulSequenceNumber', which means that + exactly this segment was expected. xTCPWindowRxConfirm() will check if + there is already another segment with a sequence number between (ulSequenceNumber) + and (ulSequenceNumber+ulLength). Normally none will be found, because + the next RX segment should have a sequence number equal to + '(ulSequenceNumber+ulLength)'. */ + + /* Iterate through all RX segments that are stored: */ + for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); + pxIterator != ( const ListItem_t * ) pxEnd; + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) + { + pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + /* And see if there is a segment for which: + 'ulSequenceNumber' <= 'pxSegment->ulSequenceNumber' < 'ulNextSequenceNumber' + If there are more matching segments, the one with the lowest sequence number + shall be taken */ + if( ( xSequenceGreaterThanOrEqual( pxSegment->ulSequenceNumber, ulSequenceNumber ) != 0 ) && + ( xSequenceLessThan( pxSegment->ulSequenceNumber, ulNextSequenceNumber ) != 0 ) ) + { + if( ( pxBest == NULL ) || ( xSequenceLessThan( pxSegment->ulSequenceNumber, pxBest->ulSequenceNumber ) != 0 ) ) + { + pxBest = pxSegment; + } + } + } + + if( ( pxBest != NULL ) && + ( ( pxBest->ulSequenceNumber != ulSequenceNumber ) || ( pxBest->lDataLength != ( int32_t ) ulLength ) ) ) + { + FreeRTOS_flush_logging(); + FreeRTOS_debug_printf( ( "xTCPWindowRxConfirm[%u]: search %lu (+%ld=%lu) found %lu (+%ld=%lu)\n", + pxWindow->usPeerPortNumber, + ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, + ulLength, + ulSequenceNumber + ulLength - pxWindow->rx.ulFirstSequenceNumber, + pxBest->ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, + pxBest->lDataLength, + pxBest->ulSequenceNumber + ( ( uint32_t ) pxBest->lDataLength ) - pxWindow->rx.ulFirstSequenceNumber ) ); + } + + return pxBest; + } + +#endif /* ipconfgiUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace ) + { + uint32_t ulCurrentSequenceNumber, ulLast, ulSavedSequenceNumber; + int32_t lReturn, lDistance; + TCPSegment_t *pxFound; + + /* If lTCPWindowRxCheck( ) returns == 0, the packet will be passed + directly to user (segment is expected). If it returns a positive + number, an earlier packet is missing, but this packet may be stored. + If negative, the packet has already been stored, or it is out-of-order, + or there is not enough space. + + As a side-effect, pxWindow->ulUserDataLength will get set to non-zero, + if more Rx data may be passed to the user after this packet. */ + + ulCurrentSequenceNumber = pxWindow->rx.ulCurrentSequenceNumber; + + /* For Selective Ack (SACK), used when out-of-sequence data come in. */ + pxWindow->ucOptionLength = 0u; + + /* Non-zero if TCP-windows contains data which must be popped. */ + pxWindow->ulUserDataLength = 0ul; + + if( ulCurrentSequenceNumber == ulSequenceNumber ) + { + /* This is the packet with the lowest sequence number we're waiting + for. It can be passed directly to the rx stream. */ + if( ulLength > ulSpace ) + { + FreeRTOS_debug_printf( ( "lTCPWindowRxCheck: Refuse %lu bytes, due to lack of space (%lu)\n", ulLength, ulSpace ) ); + lReturn = -1; + } + else + { + ulCurrentSequenceNumber += ulLength; + + if( listCURRENT_LIST_LENGTH( &( pxWindow->xRxSegments ) ) != 0 ) + { + ulSavedSequenceNumber = ulCurrentSequenceNumber; + + /* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated. + If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed. + So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just + clean them out. */ + do + { + pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength ); + + if ( pxFound != NULL ) + { + /* Remove it because it will be passed to user directly. */ + vTCPWindowFree( pxFound ); + } + } while ( pxFound ); + + /* Check for following segments that are already in the + queue and increment ulCurrentSequenceNumber. */ + while( ( pxFound = xTCPWindowRxFind( pxWindow, ulCurrentSequenceNumber ) ) != NULL ) + { + ulCurrentSequenceNumber += ( uint32_t ) pxFound->lDataLength; + + /* As all packet below this one have been passed to the + user it can be discarded. */ + vTCPWindowFree( pxFound ); + } + + if( ulSavedSequenceNumber != ulCurrentSequenceNumber ) + { + /* After the current data-package, there is more data + to be popped. */ + pxWindow->ulUserDataLength = ulCurrentSequenceNumber - ulSavedSequenceNumber; + + if( xTCPWindowLoggingLevel >= 1 ) + { + FreeRTOS_debug_printf( ( "lTCPWindowRxCheck[%d,%d]: retran %lu (Found %lu bytes at %lu cnt %ld)\n", + pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, + ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, + pxWindow->ulUserDataLength, + ulSavedSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, + listCURRENT_LIST_LENGTH( &pxWindow->xRxSegments ) ) ); + } + } + } + + pxWindow->rx.ulCurrentSequenceNumber = ulCurrentSequenceNumber; + + /* Packet was expected, may be passed directly to the socket + buffer or application. Store the packet at offset 0. */ + lReturn = 0; + } + } + else if( ulCurrentSequenceNumber == ( ulSequenceNumber + 1UL ) ) + { + /* Looks like a TCP keep-alive message. Do not accept/store Rx data + ulUserDataLength = 0. Not packet out-of-sync. Just reply to it. */ + lReturn = -1; + } + else + { + /* The packet is not the one expected. See if it falls within the Rx + window so it can be stored. */ + + /* An "out-of-sequence" segment was received, must have missed one. + Prepare a SACK (Selective ACK). */ + ulLast = ulSequenceNumber + ulLength; + lDistance = ( int32_t ) ( ulLast - ulCurrentSequenceNumber ); + + if( lDistance <= 0 ) + { + /* An earlier has been received, must be a retransmission of a + packet that has been accepted already. No need to send out a + Selective ACK (SACK). */ + lReturn = -1; + } + else if( lDistance > ( int32_t ) ulSpace ) + { + /* The new segment is ahead of rx.ulCurrentSequenceNumber. The + sequence number of this packet is too far ahead, ignore it. */ + FreeRTOS_debug_printf( ( "lTCPWindowRxCheck: Refuse %lu+%lu bytes, due to lack of space (%lu)\n", lDistance, ulLength, ulSpace ) ); + lReturn = -1; + } + else + { + /* See if there is more data in a contiguous block to make the + SACK describe a longer range of data. */ + + /* TODO: SACK's may also be delayed for a short period + * This is useful because subsequent packets will be SACK'd with + * single one message + */ + while( ( pxFound = xTCPWindowRxFind( pxWindow, ulLast ) ) != NULL ) + { + ulLast += ( uint32_t ) pxFound->lDataLength; + } + + if( xTCPWindowLoggingLevel >= 1 ) + { + FreeRTOS_debug_printf( ( "lTCPWindowRxCheck[%d,%d]: seqnr %lu exp %lu (dist %ld) SACK to %lu\n", + pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, + ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, + ulCurrentSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, + ( BaseType_t ) ( ulSequenceNumber - ulCurrentSequenceNumber ), /* want this signed */ + ulLast - pxWindow->rx.ulFirstSequenceNumber ) ); + } + + /* Now prepare the SACK message. + Code OPTION_CODE_SINGLE_SACK already in network byte order. */ + pxWindow->ulOptionsData[0] = OPTION_CODE_SINGLE_SACK; + + /* First sequence number that we received. */ + pxWindow->ulOptionsData[1] = FreeRTOS_htonl( ulSequenceNumber ); + + /* Last + 1 */ + pxWindow->ulOptionsData[2] = FreeRTOS_htonl( ulLast ); + + /* Which make 12 (3*4) option bytes. */ + pxWindow->ucOptionLength = 3 * sizeof( pxWindow->ulOptionsData[ 0 ] ); + + pxFound = xTCPWindowRxFind( pxWindow, ulSequenceNumber ); + + if( pxFound != NULL ) + { + /* This out-of-sequence packet has been received for a + second time. It is already stored but do send a SACK + again. */ + lReturn = -1; + } + else + { + pxFound = xTCPWindowRxNew( pxWindow, ulSequenceNumber, ( int32_t ) ulLength ); + + if( pxFound == NULL ) + { + /* Can not send a SACK, because the segment cannot be + stored. */ + pxWindow->ucOptionLength = 0u; + + /* Needs to be stored but there is no segment + available. */ + lReturn = -1; + } + else + { + if( xTCPWindowLoggingLevel != 0 ) + { + FreeRTOS_debug_printf( ( "lTCPWindowRxCheck[%u,%u]: seqnr %lu (cnt %lu)\n", + pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, ulSequenceNumber - pxWindow->rx.ulFirstSequenceNumber, + listCURRENT_LIST_LENGTH( &pxWindow->xRxSegments ) ) ); + FreeRTOS_flush_logging( ); + } + + /* Return a positive value. The packet may be accepted + and stored but an earlier packet is still missing. */ + lReturn = ( int32_t ) ( ulSequenceNumber - ulCurrentSequenceNumber ); + } + } + } + } + + return lReturn; + } + +#endif /* ipconfgiUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +/*============================================================================= + * + * ######### # # + * # # # # # + * # # # + * # #### + * # ## + * # #### + * # # # + * # # # + * ##### # # + * + * Tx functions + * + *=============================================================================*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static int32_t lTCPIncrementTxPosition( int32_t lPosition, int32_t lMax, int32_t lCount ) + { + /* +TCP stores data in circular buffers. Calculate the next position to + store. */ + lPosition += lCount; + if( lPosition >= lMax ) + { + lPosition -= lMax; + } + + return lPosition; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax ) + { + int32_t lBytesLeft = ( int32_t ) ulLength, lToWrite; + int32_t lDone = 0; + TCPSegment_t *pxSegment = pxWindow->pxHeadSegment; + + /* Puts a message in the Tx-window (after buffer size has been + verified). */ + if( pxSegment != NULL ) + { + if( pxSegment->lDataLength < pxSegment->lMaxLength ) + { + if( ( pxSegment->u.bits.bOutstanding == pdFALSE_UNSIGNED ) && ( pxSegment->lDataLength != 0 ) ) + { + /* Adding data to a segment that was already in the TX queue. It + will be filled-up to a maximum of MSS (maximum segment size). */ + lToWrite = FreeRTOS_min_int32( lBytesLeft, pxSegment->lMaxLength - pxSegment->lDataLength ); + + pxSegment->lDataLength += lToWrite; + + if( pxSegment->lDataLength >= pxSegment->lMaxLength ) + { + /* This segment is full, don't add more bytes. */ + pxWindow->pxHeadSegment = NULL; + } + + lBytesLeft -= lToWrite; + + /* ulNextTxSequenceNumber is the sequence number of the next byte to + be stored for transmission. */ + pxWindow->ulNextTxSequenceNumber += ( uint32_t ) lToWrite; + + /* Increased the return value. */ + lDone += lToWrite; + + /* Some detailed logging, for those who're interested. */ + if( ( xTCPWindowLoggingLevel >= 2 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != 0 ) ) + { + FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: Add %4lu bytes for seqNr %lu len %4lu (nxt %lu) pos %lu\n", + ulLength, + pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + pxSegment->lDataLength, + pxWindow->ulNextTxSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + pxSegment->lStreamPos ) ); + FreeRTOS_flush_logging( ); + } + + /* Calculate the next position in the circular data buffer, knowing + its maximum length 'lMax'. */ + lPosition = lTCPIncrementTxPosition( lPosition, lMax, lToWrite ); + } + } + } + + while( lBytesLeft > 0 ) + { + /* The current transmission segment is full, create new segments as + needed. */ + pxSegment = xTCPWindowTxNew( pxWindow, pxWindow->ulNextTxSequenceNumber, pxWindow->usMSS ); + + if( pxSegment != NULL ) + { + /* Store as many as needed, but no more than the maximum + (MSS). */ + lToWrite = FreeRTOS_min_int32( lBytesLeft, pxSegment->lMaxLength ); + + pxSegment->lDataLength = lToWrite; + pxSegment->lStreamPos = lPosition; + lBytesLeft -= lToWrite; + lPosition = lTCPIncrementTxPosition( lPosition, lMax, lToWrite ); + pxWindow->ulNextTxSequenceNumber += ( uint32_t ) lToWrite; + lDone += lToWrite; + + /* Link this segment in the Tx-Queue. */ + vListInsertFifo( &( pxWindow->xTxQueue ), &( pxSegment->xQueueItem ) ); + + /* Let 'pxHeadSegment' point to this segment if there is still + space. */ + if( pxSegment->lDataLength < pxSegment->lMaxLength ) + { + pxWindow->pxHeadSegment = pxSegment; + } + else + { + pxWindow->pxHeadSegment = NULL; + } + + if( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != 0 ) + { + if( ( xTCPWindowLoggingLevel >= 3 ) || + ( ( xTCPWindowLoggingLevel >= 2 ) && ( pxWindow->pxHeadSegment != NULL ) ) ) + { + FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: New %4ld bytes for seqNr %lu len %4lu (nxt %lu) pos %lu\n", + ulLength, + pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + pxSegment->lDataLength, + pxWindow->ulNextTxSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + pxSegment->lStreamPos ) ); + FreeRTOS_flush_logging( ); + } + } + } + else + { + /* A sever situation: running out of segments for transmission. + No more data can be sent at the moment. */ + if( lDone != 0 ) + { + FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: Sorry all buffers full (cancel %ld bytes)\n", lBytesLeft ) ); + } + break; + } + } + + return lDone; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow ) + { + return listLIST_IS_EMPTY( ( &pxWindow->xTxSegments) ); + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ) + { + uint32_t ulTxOutstanding; + BaseType_t xHasSpace; + TCPSegment_t *pxSegment; + + /* This function will look if there is new transmission data. It will + return true if there is data to be sent. */ + + pxSegment = xTCPWindowPeekHead( &( pxWindow->xTxQueue ) ); + + if( pxSegment == NULL ) + { + xHasSpace = pdFALSE; + } + else + { + /* How much data is outstanding, i.e. how much data has been sent + but not yet acknowledged ? */ + if( pxWindow->tx.ulHighestSequenceNumber >= pxWindow->tx.ulCurrentSequenceNumber ) + { + ulTxOutstanding = pxWindow->tx.ulHighestSequenceNumber - pxWindow->tx.ulCurrentSequenceNumber; + } + else + { + ulTxOutstanding = 0UL; + } + + /* Subtract this from the peer's space. */ + ulWindowSize -= FreeRTOS_min_uint32( ulWindowSize, ulTxOutstanding ); + + /* See if the next segment may be sent. */ + if( ulWindowSize >= ( uint32_t ) pxSegment->lDataLength ) + { + xHasSpace = pdTRUE; + } + else + { + xHasSpace = pdFALSE; + } + + /* If 'xHasSpace', it looks like the peer has at least space for 1 + more new segment of size MSS. xSize.ulTxWindowLength is the self-imposed + limitation of the transmission window (in case of many resends it + may be decreased). */ + if( ( ulTxOutstanding != 0UL ) && ( pxWindow->xSize.ulTxWindowLength < ulTxOutstanding + ( ( uint32_t ) pxSegment->lDataLength ) ) ) + { + xHasSpace = pdFALSE; + } + } + + return xHasSpace; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay ) + { + TCPSegment_t *pxSegment; + BaseType_t xReturn; + TickType_t ulAge, ulMaxAge; + + *pulDelay = 0u; + + if( listLIST_IS_EMPTY( &pxWindow->xPriorityQueue ) == pdFALSE ) + { + /* No need to look at retransmissions or new transmission as long as + there are priority segments. *pulDelay equals zero, meaning it must + be sent out immediately. */ + xReturn = pdTRUE; + } + else + { + pxSegment = xTCPWindowPeekHead( &( pxWindow->xWaitQueue ) ); + + if( pxSegment != NULL ) + { + /* There is an outstanding segment, see if it is time to resend + it. */ + ulAge = ulTimerGetAge( &pxSegment->xTransmitTimer ); + + /* After a packet has been sent for the first time, it will wait + '1 * lSRTT' ms for an ACK. A second time it will wait '2 * lSRTT' ms, + each time doubling the time-out */ + ulMaxAge = ( 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); + + if( ulMaxAge > ulAge ) + { + /* A segment must be sent after this amount of msecs */ + *pulDelay = ulMaxAge - ulAge; + } + + xReturn = pdTRUE; + } + else + { + /* No priority segment, no outstanding data, see if there is new + transmission data. */ + pxSegment = xTCPWindowPeekHead( &pxWindow->xTxQueue ); + + /* See if it fits in the peer's reception window. */ + if( pxSegment == NULL ) + { + xReturn = pdFALSE; + } + else if( prvTCPWindowTxHasSpace( pxWindow, ulWindowSize ) == pdFALSE ) + { + /* Too many outstanding messages. */ + xReturn = pdFALSE; + } + else if( ( pxWindow->u.bits.bSendFullSize != pdFALSE_UNSIGNED ) && ( pxSegment->lDataLength < pxSegment->lMaxLength ) ) + { + /* 'bSendFullSize' is a special optimisation. If true, the + driver will only sent completely filled packets (of MSS + bytes). */ + xReturn = pdFALSE; + } + else + { + xReturn = pdTRUE; + } + } + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition ) + { + TCPSegment_t *pxSegment; + uint32_t ulMaxTime; + uint32_t ulReturn = ~0UL; + + + /* Fetches data to be sent-out now. + + Priority messages: segments with a resend need no check current sliding + window size. */ + pxSegment = xTCPWindowGetHead( &( pxWindow->xPriorityQueue ) ); + pxWindow->ulOurSequenceNumber = pxWindow->tx.ulHighestSequenceNumber; + + if( pxSegment == NULL ) + { + /* Waiting messages: outstanding messages with a running timer + neither check peer's reception window size because these packets + have been sent earlier. */ + pxSegment = xTCPWindowPeekHead( &( pxWindow->xWaitQueue ) ); + + if( pxSegment != NULL ) + { + /* Do check the timing. */ + ulMaxTime = ( 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); + + if( ulTimerGetAge( &pxSegment->xTransmitTimer ) > ulMaxTime ) + { + /* A normal (non-fast) retransmission. Move it from the + head of the waiting queue. */ + pxSegment = xTCPWindowGetHead( &( pxWindow->xWaitQueue ) ); + pxSegment->u.bits.ucDupAckCount = pdFALSE_UNSIGNED; + + /* Some detailed logging. */ + if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != 0 ) ) + { + FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u,%u]: WaitQueue %ld bytes for sequence number %lu (%lX)\n", + pxWindow->usPeerPortNumber, + pxWindow->usOurPortNumber, + pxSegment->lDataLength, + pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + pxSegment->ulSequenceNumber ) ); + FreeRTOS_flush_logging( ); + } + } + else + { + pxSegment = NULL; + } + } + + if( pxSegment == NULL ) + { + /* New messages: sent-out for the first time. Check current + sliding window size of peer. */ + pxSegment = xTCPWindowPeekHead( &( pxWindow->xTxQueue ) ); + + if( pxSegment == NULL ) + { + /* No segments queued. */ + ulReturn = 0UL; + } + else if( ( pxWindow->u.bits.bSendFullSize != pdFALSE_UNSIGNED ) && ( pxSegment->lDataLength < pxSegment->lMaxLength ) ) + { + /* A segment has been queued but the driver waits until it + has a full size of MSS. */ + ulReturn = 0; + } + else if( prvTCPWindowTxHasSpace( pxWindow, ulWindowSize ) == pdFALSE ) + { + /* Peer has no more space at this moment. */ + ulReturn = 0; + } + else + { + /* Move it out of the Tx queue. */ + pxSegment = xTCPWindowGetHead( &( pxWindow->xTxQueue ) ); + + /* Don't let pxHeadSegment point to this segment any more, + so no more data will be added. */ + if( pxWindow->pxHeadSegment == pxSegment ) + { + pxWindow->pxHeadSegment = NULL; + } + + /* pxWindow->tx.highest registers the highest sequence + number in our transmission window. */ + pxWindow->tx.ulHighestSequenceNumber = pxSegment->ulSequenceNumber + ( ( uint32_t ) pxSegment->lDataLength ); + + /* ...and more detailed logging */ + if( ( xTCPWindowLoggingLevel >= 2 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u,%u]: XmitQueue %ld bytes for sequence number %lu (ws %lu)\n", + pxWindow->usPeerPortNumber, + pxWindow->usOurPortNumber, + pxSegment->lDataLength, + pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + ulWindowSize ) ); + FreeRTOS_flush_logging( ); + } + } + } + } + else + { + /* There is a priority segment. It doesn't need any checking for + space or timeouts. */ + if( xTCPWindowLoggingLevel != 0 ) + { + FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u,%u]: PrioQueue %ld bytes for sequence number %lu (ws %lu)\n", + pxWindow->usPeerPortNumber, + pxWindow->usOurPortNumber, + pxSegment->lDataLength, + pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + ulWindowSize ) ); + FreeRTOS_flush_logging( ); + } + } + + /* See if it has already been determined to return 0. */ + if( ulReturn != 0UL ) + { + configASSERT( listLIST_ITEM_CONTAINER( &(pxSegment->xQueueItem ) ) == NULL ); + + /* Now that the segment will be transmitted, add it to the tail of + the waiting queue. */ + vListInsertFifo( &pxWindow->xWaitQueue, &pxSegment->xQueueItem ); + + /* And mark it as outstanding. */ + pxSegment->u.bits.bOutstanding = pdTRUE_UNSIGNED; + + /* Administer the transmit count, needed for fast + retransmissions. */ + ( pxSegment->u.bits.ucTransmitCount )++; + + /* If there have been several retransmissions (4), decrease the + size of the transmission window to at most 2 times MSS. */ + if( pxSegment->u.bits.ucTransmitCount == MAX_TRANSMIT_COUNT_USING_LARGE_WINDOW ) + { + if( pxWindow->xSize.ulTxWindowLength > ( 2U * pxWindow->usMSS ) ) + { + FreeRTOS_debug_printf( ( "ulTCPWindowTxGet[%u - %d]: Change Tx window: %lu -> %u\n", + pxWindow->usPeerPortNumber, pxWindow->usOurPortNumber, + pxWindow->xSize.ulTxWindowLength, 2 * pxWindow->usMSS ) ); + pxWindow->xSize.ulTxWindowLength = ( 2UL * pxWindow->usMSS ); + } + } + + /* Clear the transmit timer. */ + vTCPTimerSet( &( pxSegment->xTransmitTimer ) ); + + pxWindow->ulOurSequenceNumber = pxSegment->ulSequenceNumber; + + /* Inform the caller where to find the data within the queue. */ + *plPosition = pxSegment->lStreamPos; + + /* And return the length of the data segment */ + ulReturn = ( uint32_t ) pxSegment->lDataLength; + } + + return ulReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static uint32_t prvTCPWindowTxCheckAck( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ) + { + uint32_t ulBytesConfirmed = 0u; + uint32_t ulSequenceNumber = ulFirst, ulDataLength; + const ListItem_t *pxIterator; + const MiniListItem_t *pxEnd = ( const MiniListItem_t* )listGET_END_MARKER( &pxWindow->xTxSegments ); + BaseType_t xDoUnlink; + TCPSegment_t *pxSegment; + /* An acknowledgement or a selective ACK (SACK) was received. See if some outstanding data + may be removed from the transmission queue(s). + All TX segments for which + ( ( ulSequenceNumber >= ulFirst ) && ( ulSequenceNumber < ulLast ) in a + contiguous block. Note that the segments are stored in xTxSegments in a + strict sequential order. */ + + /* SRTT[i] = (1-a) * SRTT[i-1] + a * RTT + + 0 < a < 1; usually a = 1/8 + + RTO = 2 * SRTT + + where: + RTT is Round Trip Time + SRTT is Smoothed RTT + RTO is Retransmit timeout + + A Smoothed RTT will increase quickly, but it is conservative when + becoming smaller. */ + + for( + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); + ( pxIterator != ( const ListItem_t * ) pxEnd ) && ( xSequenceLessThan( ulSequenceNumber, ulLast ) != 0 ); + ) + { + xDoUnlink = pdFALSE; + pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + + /* Move to the next item because the current item might get + removed. */ + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ); + + /* Continue if this segment does not fall within the ACK'd range. */ + if( xSequenceGreaterThan( ulSequenceNumber, pxSegment->ulSequenceNumber ) != pdFALSE ) + { + continue; + } + + /* Is it ready? */ + if( ulSequenceNumber != pxSegment->ulSequenceNumber ) + { + break; + } + + ulDataLength = ( uint32_t ) pxSegment->lDataLength; + + if( pxSegment->u.bits.bAcked == pdFALSE_UNSIGNED ) + { + if( xSequenceGreaterThan( pxSegment->ulSequenceNumber + ( uint32_t )ulDataLength, ulLast ) != pdFALSE ) + { + /* What happens? Only part of this segment was accepted, + probably due to WND limits + + AAAAAAA BBBBBBB << acked + aaaaaaa aaaa << sent */ + #if( ipconfigHAS_DEBUG_PRINTF != 0 ) + { + uint32_t ulFirstSeq = pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber; + FreeRTOS_debug_printf( ( "prvTCPWindowTxCheckAck[%u.%u]: %lu - %lu Partial sequence number %lu - %lu\n", + pxWindow->usPeerPortNumber, + pxWindow->usOurPortNumber, + ulFirstSeq - pxWindow->tx.ulFirstSequenceNumber, + ulLast - pxWindow->tx.ulFirstSequenceNumber, + ulFirstSeq, ulFirstSeq + ulDataLength ) ); + } + #endif /* ipconfigHAS_DEBUG_PRINTF */ + break; + } + + /* This segment is fully ACK'd, set the flag. */ + pxSegment->u.bits.bAcked = pdTRUE_UNSIGNED; + + /* Calculate the RTT only if the segment was sent-out for the + first time and if this is the last ACK'd segment in a range. */ + if( ( pxSegment->u.bits.ucTransmitCount == 1 ) && ( ( pxSegment->ulSequenceNumber + ulDataLength ) == ulLast ) ) + { + int32_t mS = ( int32_t ) ulTimerGetAge( &( pxSegment->xTransmitTimer ) ); + + if( pxWindow->lSRTT >= mS ) + { + /* RTT becomes smaller: adapt slowly. */ + pxWindow->lSRTT = ( ( winSRTT_DECREMENT_NEW * mS ) + ( winSRTT_DECREMENT_CURRENT * pxWindow->lSRTT ) ) / ( winSRTT_DECREMENT_NEW + winSRTT_DECREMENT_CURRENT ); + } + else + { + /* RTT becomes larger: adapt quicker */ + pxWindow->lSRTT = ( ( winSRTT_INCREMENT_NEW * mS ) + ( winSRTT_INCREMENT_CURRENT * pxWindow->lSRTT ) ) / ( winSRTT_INCREMENT_NEW + winSRTT_INCREMENT_CURRENT ); + } + + /* Cap to the minimum of 50ms. */ + if( pxWindow->lSRTT < winSRTT_CAP_mS ) + { + pxWindow->lSRTT = winSRTT_CAP_mS; + } + } + + /* Unlink it from the 3 queues, but do not destroy it (yet). */ + xDoUnlink = pdTRUE; + } + + /* pxSegment->u.bits.bAcked is now true. Is it located at the left + side of the transmission queue? If so, it may be freed. */ + if( ulSequenceNumber == pxWindow->tx.ulCurrentSequenceNumber ) + { + if( ( xTCPWindowLoggingLevel >= 2 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "prvTCPWindowTxCheckAck: %lu - %lu Ready sequence number %lu\n", + ulFirst - pxWindow->tx.ulFirstSequenceNumber, + ulLast - pxWindow->tx.ulFirstSequenceNumber, + pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber ) ); + } + + /* Increase the left-hand value of the transmission window. */ + pxWindow->tx.ulCurrentSequenceNumber += ulDataLength; + + /* This function will return the number of bytes that the tail + of txStream may be advanced. */ + ulBytesConfirmed += ulDataLength; + + /* All segments below tx.ulCurrentSequenceNumber may be freed. */ + vTCPWindowFree( pxSegment ); + + /* No need to unlink it any more. */ + xDoUnlink = pdFALSE; + } + + if( ( xDoUnlink != pdFALSE ) && ( listLIST_ITEM_CONTAINER( &( pxSegment->xQueueItem ) ) != NULL ) ) + { + /* Remove item from its queues. */ + uxListRemove( &pxSegment->xQueueItem ); + } + + ulSequenceNumber += ulDataLength; + } + + return ulBytesConfirmed; + } +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + static uint32_t prvTCPWindowFastRetransmit( TCPWindow_t *pxWindow, uint32_t ulFirst ) + { + const ListItem_t *pxIterator; + const MiniListItem_t* pxEnd; + TCPSegment_t *pxSegment; + uint32_t ulCount = 0UL; + + /* A higher Tx block has been acknowledged. Now iterate through the + xWaitQueue to find a possible condition for a FAST retransmission. */ + + pxEnd = ( const MiniListItem_t* ) listGET_END_MARKER( &( pxWindow->xWaitQueue ) ); + + for( pxIterator = ( const ListItem_t * ) listGET_NEXT( pxEnd ); + pxIterator != ( const ListItem_t * ) pxEnd; ) + { + /* Get the owner, which is a TCP segment. */ + pxSegment = ( TCPSegment_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); + + /* Hop to the next item before the current gets unlinked. */ + pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ); + + /* Fast retransmission: + When 3 packets with a higher sequence number have been acknowledged + by the peer, it is very unlikely a current packet will ever arrive. + It will be retransmitted far before the RTO. */ + if( ( pxSegment->u.bits.bAcked == pdFALSE_UNSIGNED ) && + ( xSequenceLessThan( pxSegment->ulSequenceNumber, ulFirst ) != pdFALSE ) && + ( ++( pxSegment->u.bits.ucDupAckCount ) == DUPLICATE_ACKS_BEFORE_FAST_RETRANSMIT ) ) + { + pxSegment->u.bits.ucTransmitCount = pdFALSE_UNSIGNED; + + /* Not clearing 'ucDupAckCount' yet as more SACK's might come in + which might lead to a second fast rexmit. */ + if( ( xTCPWindowLoggingLevel >= 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "prvTCPWindowFastRetransmit: Requeue sequence number %lu < %lu\n", + pxSegment->ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + ulFirst - pxWindow->tx.ulFirstSequenceNumber ) ); + FreeRTOS_flush_logging( ); + } + + /* Remove it from xWaitQueue. */ + uxListRemove( &pxSegment->xQueueItem ); + + /* Add this segment to the priority queue so it gets + retransmitted immediately. */ + vListInsertFifo( &( pxWindow->xPriorityQueue ), &( pxSegment->xQueueItem ) ); + ulCount++; + } + } + + return ulCount; + } +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ) + { + uint32_t ulFirstSequence, ulReturn; + + /* Receive a normal ACK. */ + + ulFirstSequence = pxWindow->tx.ulCurrentSequenceNumber; + + if( xSequenceLessThanOrEqual( ulSequenceNumber, ulFirstSequence ) != pdFALSE ) + { + ulReturn = 0UL; + } + else + { + ulReturn = prvTCPWindowTxCheckAck( pxWindow, ulFirstSequence, ulSequenceNumber ); + } + + return ulReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 1 ) + + uint32_t ulTCPWindowTxSack( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ) + { + uint32_t ulAckCount = 0UL; + uint32_t ulCurrentSequenceNumber = pxWindow->tx.ulCurrentSequenceNumber; + + /* Receive a SACK option. */ + ulAckCount = prvTCPWindowTxCheckAck( pxWindow, ulFirst, ulLast ); + prvTCPWindowFastRetransmit( pxWindow, ulFirst ); + + if( ( xTCPWindowLoggingLevel >= 1 ) && ( xSequenceGreaterThan( ulFirst, ulCurrentSequenceNumber ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "ulTCPWindowTxSack[%u,%u]: from %lu to %lu (ack = %lu)\n", + pxWindow->usPeerPortNumber, + pxWindow->usOurPortNumber, + ulFirst - pxWindow->tx.ulFirstSequenceNumber, + ulLast - pxWindow->tx.ulFirstSequenceNumber, + pxWindow->tx.ulCurrentSequenceNumber - pxWindow->tx.ulFirstSequenceNumber ) ); + FreeRTOS_flush_logging( ); + } + + return ulAckCount; + } + +#endif /* ipconfigUSE_TCP_WIN == 1 */ +/*-----------------------------------------------------------*/ + +/* +##### # ##### #### ###### +# # # # # # # # # # # + # # # # # # + # ### ##### # # # # # # + # # # # # # # # ##### + # # # # # # #### # # # + # # # # # # # # # # + # # # # #### # # # # + #### ##### # # # #### #### #### + # + ### +*/ +#if( ipconfigUSE_TCP_WIN == 0 ) + + int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace ) + { + int32_t iReturn; + + /* Data was received at 'ulSequenceNumber'. See if it was expected + and if there is enough space to store the new data. */ + if( ( pxWindow->rx.ulCurrentSequenceNumber != ulSequenceNumber ) || ( ulSpace < ulLength ) ) + { + iReturn = -1; + } + else + { + pxWindow->rx.ulCurrentSequenceNumber += ( uint32_t ) ulLength; + iReturn = 0; + } + + return iReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax ) + { + TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); + int32_t lResult; + + /* Data is being scheduled for transmission. */ + + /* lMax would indicate the size of the txStream. */ + ( void ) lMax; + /* This is tiny TCP: there is only 1 segment for outgoing data. + As long as 'lDataLength' is unequal to zero, the segment is still occupied. */ + if( pxSegment->lDataLength > 0 ) + { + lResult = 0L; + } + else + { + if( ulLength > ( uint32_t ) pxSegment->lMaxLength ) + { + if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: can only store %ld / %ld bytes\n", ulLength, pxSegment->lMaxLength ) ); + } + + ulLength = ( uint32_t ) pxSegment->lMaxLength; + } + + if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "lTCPWindowTxAdd: SeqNr %ld (%ld) Len %ld\n", + pxWindow->ulNextTxSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + pxWindow->tx.ulCurrentSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + ulLength ) ); + } + + /* The sequence number of the first byte in this packet. */ + pxSegment->ulSequenceNumber = pxWindow->ulNextTxSequenceNumber; + pxSegment->lDataLength = ( int32_t ) ulLength; + pxSegment->lStreamPos = lPosition; + pxSegment->u.ulFlags = 0UL; + vTCPTimerSet( &( pxSegment->xTransmitTimer ) ); + + /* Increase the sequence number of the next data to be stored for + transmission. */ + pxWindow->ulNextTxSequenceNumber += ulLength; + lResult = ( int32_t )ulLength; + } + + return lResult; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition ) + { + TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); + uint32_t ulLength = ( uint32_t ) pxSegment->lDataLength; + uint32_t ulMaxTime; + + if( ulLength != 0UL ) + { + /* _HT_ Still under investigation */ + ( void ) ulWindowSize; + + if( pxSegment->u.bits.bOutstanding != pdFALSE_UNSIGNED ) + { + /* As 'ucTransmitCount' has a minimum of 1, take 2 * RTT */ + ulMaxTime = ( ( uint32_t ) 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); + + if( ulTimerGetAge( &( pxSegment->xTransmitTimer ) ) < ulMaxTime ) + { + ulLength = 0ul; + } + } + + if( ulLength != 0ul ) + { + pxSegment->u.bits.bOutstanding = pdTRUE_UNSIGNED; + pxSegment->u.bits.ucTransmitCount++; + vTCPTimerSet (&pxSegment->xTransmitTimer); + pxWindow->ulOurSequenceNumber = pxSegment->ulSequenceNumber; + *plPosition = pxSegment->lStreamPos; + } + } + + return ulLength; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow ) + { + BaseType_t xReturn; + + /* Has the outstanding data been sent because user wants to shutdown? */ + if( pxWindow->xTxSegment.lDataLength == 0 ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ); + static BaseType_t prvTCPWindowTxHasSpace( TCPWindow_t *pxWindow, uint32_t ulWindowSize ) + { + BaseType_t xReturn; + + if( ulWindowSize >= pxWindow->usMSSInit ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay ) + { + TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); + BaseType_t xReturn; + TickType_t ulAge, ulMaxAge; + + /* Check data to be sent. */ + *pulDelay = ( TickType_t ) 0; + if( pxSegment->lDataLength == 0 ) + { + /* Got nothing to send right now. */ + xReturn = pdFALSE; + } + else + { + if( pxSegment->u.bits.bOutstanding != pdFALSE_UNSIGNED ) + { + ulAge = ulTimerGetAge ( &pxSegment->xTransmitTimer ); + ulMaxAge = ( ( TickType_t ) 1u << pxSegment->u.bits.ucTransmitCount ) * ( ( uint32_t ) pxWindow->lSRTT ); + + if( ulMaxAge > ulAge ) + { + *pulDelay = ulMaxAge - ulAge; + } + + xReturn = pdTRUE; + } + else if( prvTCPWindowTxHasSpace( pxWindow, ulWindowSize ) == pdFALSE ) + { + /* Too many outstanding messages. */ + xReturn = pdFALSE; + } + else + { + xReturn = pdTRUE; + } + } + + return xReturn; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ) + { + TCPSegment_t *pxSegment = &( pxWindow->xTxSegment ); + uint32_t ulDataLength = ( uint32_t ) pxSegment->lDataLength; + + /* Receive a normal ACK */ + + if( ulDataLength != 0ul ) + { + if( ulSequenceNumber < ( pxWindow->tx.ulCurrentSequenceNumber + ulDataLength ) ) + { + if( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) + { + FreeRTOS_debug_printf( ( "win_tx_ack: acked %ld expc %ld len %ld\n", + ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + pxWindow->tx.ulCurrentSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + ulDataLength ) ); + } + + /* Nothing to send right now. */ + ulDataLength = 0ul; + } + else + { + pxWindow->tx.ulCurrentSequenceNumber += ulDataLength; + + if( ( xTCPWindowLoggingLevel != 0 ) && ( ipconfigTCP_MAY_LOG_PORT( pxWindow->usOurPortNumber ) != pdFALSE ) ) + { + FreeRTOS_debug_printf( ( "win_tx_ack: acked seqnr %ld len %ld\n", + ulSequenceNumber - pxWindow->tx.ulFirstSequenceNumber, + ulDataLength ) ); + } + + pxSegment->lDataLength = 0; + } + } + + return ulDataLength; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ) + { + /* Return true if 'ulCurrentSequenceNumber >= ulHighestSequenceNumber' + 'ulCurrentSequenceNumber' is the highest sequence number stored, + 'ulHighestSequenceNumber' is the highest sequence number seen. */ + return xSequenceGreaterThanOrEqual( pxWindow->rx.ulCurrentSequenceNumber, pxWindow->rx.ulHighestSequenceNumber ); + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + +#if( ipconfigUSE_TCP_WIN == 0 ) + + /* Destroy a window (always returns NULL) */ + void vTCPWindowDestroy( TCPWindow_t *pxWindow ) + { + /* As in tiny TCP there are no shared segments descriptors, there is + nothing to release. */ + ( void ) pxWindow; + } + +#endif /* ipconfigUSE_TCP_WIN == 0 */ +/*-----------------------------------------------------------*/ + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_UDP_IP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_UDP_IP.c index e7d2a6c50..14ae96e64 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_UDP_IP.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_UDP_IP.c @@ -1,404 +1,404 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* Standard includes. */ -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_ARP.h" -#include "FreeRTOS_DHCP.h" -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" - -#if( ipconfigUSE_DNS == 1 ) - #include "FreeRTOS_DNS.h" -#endif - -/* The expected IP version and header length coded into the IP header itself. */ -#define ipIP_VERSION_AND_HEADER_LENGTH_BYTE ( ( uint8_t ) 0x45 ) - -/* Part of the Ethernet and IP headers are always constant when sending an IPv4 -UDP packet. This array defines the constant parts, allowing this part of the -packet to be filled in using a simple memcpy() instead of individual writes. */ -UDPPacketHeader_t xDefaultPartUDPPacketHeader = -{ - /* .ucBytes : */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Ethernet source MAC address. */ - 0x08, 0x00, /* Ethernet frame type. */ - ipIP_VERSION_AND_HEADER_LENGTH_BYTE, /* ucVersionHeaderLength. */ - 0x00, /* ucDifferentiatedServicesCode. */ - 0x00, 0x00, /* usLength. */ - 0x00, 0x00, /* usIdentification. */ - 0x00, 0x00, /* usFragmentOffset. */ - ipconfigUDP_TIME_TO_LIVE, /* ucTimeToLive */ - ipPROTOCOL_UDP, /* ucProtocol. */ - 0x00, 0x00, /* usHeaderChecksum. */ - 0x00, 0x00, 0x00, 0x00 /* Source IP address. */ - } -}; -/*-----------------------------------------------------------*/ - -void vProcessGeneratedUDPPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -UDPPacket_t *pxUDPPacket; -IPHeader_t *pxIPHeader; -eARPLookupResult_t eReturned; -uint32_t ulIPAddress = pxNetworkBuffer->ulIPAddress; -size_t uxPayloadSize; - - /* Map the UDP packet onto the start of the frame. */ - pxUDPPacket = ( UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; - -#if ipconfigSUPPORT_OUTGOING_PINGS == 1 - if( pxNetworkBuffer->usPort == ipPACKET_CONTAINS_ICMP_DATA ) - { - uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( ICMPPacket_t ); - } - else -#endif - { - uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); - } - - /* Determine the ARP cache status for the requested IP address. */ - eReturned = eARPGetCacheEntry( &( ulIPAddress ), &( pxUDPPacket->xEthernetHeader.xDestinationAddress ) ); - - if( eReturned != eCantSendPacket ) - { - if( eReturned == eARPCacheHit ) - { - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) - uint8_t ucSocketOptions; - #endif - iptraceSENDING_UDP_PACKET( pxNetworkBuffer->ulIPAddress ); - - /* Create short cuts to the data within the packet. */ - pxIPHeader = &( pxUDPPacket->xIPHeader ); - - #if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - /* Is it possible that the packet is not actually a UDP packet - after all, but an ICMP packet. */ - if( pxNetworkBuffer->usPort != ipPACKET_CONTAINS_ICMP_DATA ) - #endif /* ipconfigSUPPORT_OUTGOING_PINGS */ - { - UDPHeader_t *pxUDPHeader; - - pxUDPHeader = &( pxUDPPacket->xUDPHeader ); - - pxUDPHeader->usDestinationPort = pxNetworkBuffer->usPort; - pxUDPHeader->usSourcePort = pxNetworkBuffer->usBoundPort; - pxUDPHeader->usLength = ( uint16_t ) ( uxPayloadSize + sizeof( UDPHeader_t ) ); - pxUDPHeader->usLength = FreeRTOS_htons( pxUDPHeader->usLength ); - pxUDPHeader->usChecksum = 0u; - } - - /* memcpy() the constant parts of the header information into - the correct location within the packet. This fills in: - xEthernetHeader.xSourceAddress - xEthernetHeader.usFrameType - xIPHeader.ucVersionHeaderLength - xIPHeader.ucDifferentiatedServicesCode - xIPHeader.usLength - xIPHeader.usIdentification - xIPHeader.usFragmentOffset - xIPHeader.ucTimeToLive - xIPHeader.ucProtocol - and - xIPHeader.usHeaderChecksum - */ - /* Save options now, as they will be overwritten by memcpy */ - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) - ucSocketOptions = pxNetworkBuffer->pucEthernetBuffer[ ipSOCKET_OPTIONS_OFFSET ]; - #endif - /* - * Offset the memcpy by the size of a MAC address to start at the packet's - * Ethernet header 'source' MAC address; the preceding 'destination' should not be altered. - */ - char *pxUdpSrcAddrOffset = ( char *) pxUDPPacket + sizeof( MACAddress_t ); - memcpy( pxUdpSrcAddrOffset, xDefaultPartUDPPacketHeader.ucBytes, sizeof( xDefaultPartUDPPacketHeader ) ); - - #if ipconfigSUPPORT_OUTGOING_PINGS == 1 - if( pxNetworkBuffer->usPort == ipPACKET_CONTAINS_ICMP_DATA ) - { - pxIPHeader->ucProtocol = ipPROTOCOL_ICMP; - pxIPHeader->usLength = ( uint16_t ) ( uxPayloadSize + sizeof( IPHeader_t ) + sizeof( ICMPHeader_t ) ); - } - else - #endif /* ipconfigSUPPORT_OUTGOING_PINGS */ - { - pxIPHeader->usLength = ( uint16_t ) ( uxPayloadSize + sizeof( IPHeader_t ) + sizeof( UDPHeader_t ) ); - } - - pxIPHeader->usLength = FreeRTOS_htons( pxIPHeader->usLength ); - /* HT:endian: changed back to network endian */ - pxIPHeader->ulDestinationIPAddress = pxNetworkBuffer->ulIPAddress; - - #if( ipconfigUSE_LLMNR == 1 ) - { - /* LLMNR messages are typically used on a LAN and they're - * not supposed to cross routers */ - if( pxNetworkBuffer->ulIPAddress == ipLLMNR_IP_ADDR ) - { - pxIPHeader->ucTimeToLive = 0x01; - } - } - #endif - - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) - { - pxIPHeader->usHeaderChecksum = 0u; - pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0UL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); - pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); - - if( ( ucSocketOptions & ( uint8_t ) FREERTOS_SO_UDPCKSUM_OUT ) != 0u ) - { - usGenerateProtocolChecksum( (uint8_t*)pxUDPPacket, pxNetworkBuffer->xDataLength, pdTRUE ); - } - else - { - pxUDPPacket->xUDPHeader.usChecksum = 0u; - } - } - #endif - } - else if( eReturned == eARPCacheMiss ) - { - /* Add an entry to the ARP table with a null hardware address. - This allows the ARP timer to know that an ARP reply is - outstanding, and perform retransmissions if necessary. */ - vARPRefreshCacheEntry( NULL, ulIPAddress ); - - /* Generate an ARP for the required IP address. */ - iptracePACKET_DROPPED_TO_GENERATE_ARP( pxNetworkBuffer->ulIPAddress ); - pxNetworkBuffer->ulIPAddress = ulIPAddress; - vARPGenerateRequestPacket( pxNetworkBuffer ); - } - else - { - /* The lookup indicated that an ARP request has already been - sent out for the queried IP address. */ - eReturned = eCantSendPacket; - } - } - - if( eReturned != eCantSendPacket ) - { - /* The network driver is responsible for freeing the network buffer - after the packet has been sent. */ - - #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - { - BaseType_t xIndex; - - for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) - { - pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; - } - pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; - } - } - #endif - - xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE ); - } - else - { - /* The packet can't be sent (DHCP not completed?). Just drop the - packet. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xProcessReceivedUDPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ) -{ -BaseType_t xReturn = pdPASS; -FreeRTOS_Socket_t *pxSocket; -configASSERT(pxNetworkBuffer); -configASSERT(pxNetworkBuffer->pucEthernetBuffer); - - -UDPPacket_t *pxUDPPacket = (UDPPacket_t *) pxNetworkBuffer->pucEthernetBuffer; - - /* Caller must check for minimum packet size. */ - pxSocket = pxUDPSocketLookup( usPort ); - - if( pxSocket ) - { - - /* When refreshing the ARP cache with received UDP packets we must be - careful; hundreds of broadcast messages may pass and if we're not - handling them, no use to fill the ARP cache with those IP addresses. */ - vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); - - #if( ipconfigUSE_CALLBACKS == 1 ) - { - /* Did the owner of this socket register a reception handler ? */ - if( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xUDP.pxHandleReceive ) ) - { - struct freertos_sockaddr xSourceAddress, destinationAddress; - void *pcData = ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ); - FOnUDPReceive_t xHandler = ( FOnUDPReceive_t ) pxSocket->u.xUDP.pxHandleReceive; - xSourceAddress.sin_port = pxNetworkBuffer->usPort; - xSourceAddress.sin_addr = pxNetworkBuffer->ulIPAddress; - destinationAddress.sin_port = usPort; - destinationAddress.sin_addr = pxUDPPacket->xIPHeader.ulDestinationIPAddress; - - if( xHandler( ( Socket_t ) pxSocket, ( void* ) pcData, ( size_t ) pxNetworkBuffer->xDataLength, - &xSourceAddress, &destinationAddress ) ) - { - xReturn = pdFAIL; /* FAIL means that we did not consume or release the buffer */ - } - } - } - #endif /* ipconfigUSE_CALLBACKS */ - - #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) - { - if( xReturn == pdPASS ) - { - if ( listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ) >= pxSocket->u.xUDP.uxMaxPackets ) - { - FreeRTOS_debug_printf( ( "xProcessReceivedUDPPacket: buffer full %ld >= %ld port %u\n", - listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ), - pxSocket->u.xUDP.uxMaxPackets, pxSocket->usLocalPort ) ); - xReturn = pdFAIL; /* we did not consume or release the buffer */ - } - } - } - #endif - - if( xReturn == pdPASS ) - { - vTaskSuspendAll(); - { - if( xReturn == pdPASS ) - { - taskENTER_CRITICAL(); - { - /* Add the network packet to the list of packets to be - processed by the socket. */ - vListInsertEnd( &( pxSocket->u.xUDP.xWaitingPacketsList ), &( pxNetworkBuffer->xBufferListItem ) ); - } - taskEXIT_CRITICAL(); - } - } - xTaskResumeAll(); - - /* Set the socket's receive event */ - if( pxSocket->xEventGroup != NULL ) - { - xEventGroupSetBits( pxSocket->xEventGroup, eSOCKET_RECEIVE ); - } - - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - { - if( ( pxSocket->pxSocketSet != NULL ) && ( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) ) - { - xEventGroupSetBits( pxSocket->pxSocketSet->xSelectGroup, eSELECT_READ ); - } - } - #endif - - #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) - { - if( pxSocket->pxUserSemaphore != NULL ) - { - xSemaphoreGive( pxSocket->pxUserSemaphore ); - } - } - #endif - - #if( ipconfigUSE_DHCP == 1 ) - { - if( xIsDHCPSocket( pxSocket ) ) - { - xSendEventToIPTask( eDHCPEvent ); - } - } - #endif - } - } - else - { - /* There is no socket listening to the target port, but still it might - be for this node. */ - - #if( ipconfigUSE_DNS == 1 ) && ( ipconfigDNS_USE_CALLBACKS == 1 ) - /* A DNS reply, check for the source port. Although the DNS client - does open a UDP socket to send a messages, this socket will be - closed after a short timeout. Messages that come late (after the - socket is closed) will be treated here. */ - if( FreeRTOS_ntohs( pxUDPPacket->xUDPHeader.usSourcePort ) == ipDNS_PORT ) - { - vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); - xReturn = ( BaseType_t )ulDNSHandlePacket( pxNetworkBuffer ); - } - else - #endif - - #if( ipconfigUSE_LLMNR == 1 ) - /* a LLMNR request, check for the destination port. */ - if( ( usPort == FreeRTOS_ntohs( ipLLMNR_PORT ) ) || - ( pxUDPPacket->xUDPHeader.usSourcePort == FreeRTOS_ntohs( ipLLMNR_PORT ) ) ) - { - vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); - xReturn = ( BaseType_t )ulDNSHandlePacket( pxNetworkBuffer ); - } - else - #endif /* ipconfigUSE_LLMNR */ - - #if( ipconfigUSE_NBNS == 1 ) - /* a NetBIOS request, check for the destination port */ - if( ( usPort == FreeRTOS_ntohs( ipNBNS_PORT ) ) || - ( pxUDPPacket->xUDPHeader.usSourcePort == FreeRTOS_ntohs( ipNBNS_PORT ) ) ) - { - vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); - xReturn = ( BaseType_t )ulNBNSHandlePacket( pxNetworkBuffer ); - } - else - #endif /* ipconfigUSE_NBNS */ - { - xReturn = pdFAIL; - } - } - - return xReturn; -} -/*-----------------------------------------------------------*/ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* Standard includes. */ +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_ARP.h" +#include "FreeRTOS_DHCP.h" +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" + +#if( ipconfigUSE_DNS == 1 ) + #include "FreeRTOS_DNS.h" +#endif + +/* The expected IP version and header length coded into the IP header itself. */ +#define ipIP_VERSION_AND_HEADER_LENGTH_BYTE ( ( uint8_t ) 0x45 ) + +/* Part of the Ethernet and IP headers are always constant when sending an IPv4 +UDP packet. This array defines the constant parts, allowing this part of the +packet to be filled in using a simple memcpy() instead of individual writes. */ +UDPPacketHeader_t xDefaultPartUDPPacketHeader = +{ + /* .ucBytes : */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Ethernet source MAC address. */ + 0x08, 0x00, /* Ethernet frame type. */ + ipIP_VERSION_AND_HEADER_LENGTH_BYTE, /* ucVersionHeaderLength. */ + 0x00, /* ucDifferentiatedServicesCode. */ + 0x00, 0x00, /* usLength. */ + 0x00, 0x00, /* usIdentification. */ + 0x00, 0x00, /* usFragmentOffset. */ + ipconfigUDP_TIME_TO_LIVE, /* ucTimeToLive */ + ipPROTOCOL_UDP, /* ucProtocol. */ + 0x00, 0x00, /* usHeaderChecksum. */ + 0x00, 0x00, 0x00, 0x00 /* Source IP address. */ + } +}; +/*-----------------------------------------------------------*/ + +void vProcessGeneratedUDPPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +UDPPacket_t *pxUDPPacket; +IPHeader_t *pxIPHeader; +eARPLookupResult_t eReturned; +uint32_t ulIPAddress = pxNetworkBuffer->ulIPAddress; +size_t uxPayloadSize; + + /* Map the UDP packet onto the start of the frame. */ + pxUDPPacket = ( UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer; + +#if ipconfigSUPPORT_OUTGOING_PINGS == 1 + if( pxNetworkBuffer->usPort == ipPACKET_CONTAINS_ICMP_DATA ) + { + uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( ICMPPacket_t ); + } + else +#endif + { + uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); + } + + /* Determine the ARP cache status for the requested IP address. */ + eReturned = eARPGetCacheEntry( &( ulIPAddress ), &( pxUDPPacket->xEthernetHeader.xDestinationAddress ) ); + + if( eReturned != eCantSendPacket ) + { + if( eReturned == eARPCacheHit ) + { + #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) + uint8_t ucSocketOptions; + #endif + iptraceSENDING_UDP_PACKET( pxNetworkBuffer->ulIPAddress ); + + /* Create short cuts to the data within the packet. */ + pxIPHeader = &( pxUDPPacket->xIPHeader ); + + #if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) + /* Is it possible that the packet is not actually a UDP packet + after all, but an ICMP packet. */ + if( pxNetworkBuffer->usPort != ipPACKET_CONTAINS_ICMP_DATA ) + #endif /* ipconfigSUPPORT_OUTGOING_PINGS */ + { + UDPHeader_t *pxUDPHeader; + + pxUDPHeader = &( pxUDPPacket->xUDPHeader ); + + pxUDPHeader->usDestinationPort = pxNetworkBuffer->usPort; + pxUDPHeader->usSourcePort = pxNetworkBuffer->usBoundPort; + pxUDPHeader->usLength = ( uint16_t ) ( uxPayloadSize + sizeof( UDPHeader_t ) ); + pxUDPHeader->usLength = FreeRTOS_htons( pxUDPHeader->usLength ); + pxUDPHeader->usChecksum = 0u; + } + + /* memcpy() the constant parts of the header information into + the correct location within the packet. This fills in: + xEthernetHeader.xSourceAddress + xEthernetHeader.usFrameType + xIPHeader.ucVersionHeaderLength + xIPHeader.ucDifferentiatedServicesCode + xIPHeader.usLength + xIPHeader.usIdentification + xIPHeader.usFragmentOffset + xIPHeader.ucTimeToLive + xIPHeader.ucProtocol + and + xIPHeader.usHeaderChecksum + */ + /* Save options now, as they will be overwritten by memcpy */ + #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) + ucSocketOptions = pxNetworkBuffer->pucEthernetBuffer[ ipSOCKET_OPTIONS_OFFSET ]; + #endif + /* + * Offset the memcpy by the size of a MAC address to start at the packet's + * Ethernet header 'source' MAC address; the preceding 'destination' should not be altered. + */ + char *pxUdpSrcAddrOffset = ( char *) pxUDPPacket + sizeof( MACAddress_t ); + memcpy( pxUdpSrcAddrOffset, xDefaultPartUDPPacketHeader.ucBytes, sizeof( xDefaultPartUDPPacketHeader ) ); + + #if ipconfigSUPPORT_OUTGOING_PINGS == 1 + if( pxNetworkBuffer->usPort == ipPACKET_CONTAINS_ICMP_DATA ) + { + pxIPHeader->ucProtocol = ipPROTOCOL_ICMP; + pxIPHeader->usLength = ( uint16_t ) ( uxPayloadSize + sizeof( IPHeader_t ) + sizeof( ICMPHeader_t ) ); + } + else + #endif /* ipconfigSUPPORT_OUTGOING_PINGS */ + { + pxIPHeader->usLength = ( uint16_t ) ( uxPayloadSize + sizeof( IPHeader_t ) + sizeof( UDPHeader_t ) ); + } + + pxIPHeader->usLength = FreeRTOS_htons( pxIPHeader->usLength ); + /* HT:endian: changed back to network endian */ + pxIPHeader->ulDestinationIPAddress = pxNetworkBuffer->ulIPAddress; + + #if( ipconfigUSE_LLMNR == 1 ) + { + /* LLMNR messages are typically used on a LAN and they're + * not supposed to cross routers */ + if( pxNetworkBuffer->ulIPAddress == ipLLMNR_IP_ADDR ) + { + pxIPHeader->ucTimeToLive = 0x01; + } + } + #endif + + #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) + { + pxIPHeader->usHeaderChecksum = 0u; + pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0UL, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); + pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); + + if( ( ucSocketOptions & ( uint8_t ) FREERTOS_SO_UDPCKSUM_OUT ) != 0u ) + { + usGenerateProtocolChecksum( (uint8_t*)pxUDPPacket, pxNetworkBuffer->xDataLength, pdTRUE ); + } + else + { + pxUDPPacket->xUDPHeader.usChecksum = 0u; + } + } + #endif + } + else if( eReturned == eARPCacheMiss ) + { + /* Add an entry to the ARP table with a null hardware address. + This allows the ARP timer to know that an ARP reply is + outstanding, and perform retransmissions if necessary. */ + vARPRefreshCacheEntry( NULL, ulIPAddress ); + + /* Generate an ARP for the required IP address. */ + iptracePACKET_DROPPED_TO_GENERATE_ARP( pxNetworkBuffer->ulIPAddress ); + pxNetworkBuffer->ulIPAddress = ulIPAddress; + vARPGenerateRequestPacket( pxNetworkBuffer ); + } + else + { + /* The lookup indicated that an ARP request has already been + sent out for the queried IP address. */ + eReturned = eCantSendPacket; + } + } + + if( eReturned != eCantSendPacket ) + { + /* The network driver is responsible for freeing the network buffer + after the packet has been sent. */ + + #if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + if( pxNetworkBuffer->xDataLength < ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + { + BaseType_t xIndex; + + for( xIndex = ( BaseType_t ) pxNetworkBuffer->xDataLength; xIndex < ( BaseType_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; xIndex++ ) + { + pxNetworkBuffer->pucEthernetBuffer[ xIndex ] = 0u; + } + pxNetworkBuffer->xDataLength = ( size_t ) ipconfigETHERNET_MINIMUM_PACKET_BYTES; + } + } + #endif + + xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE ); + } + else + { + /* The packet can't be sent (DHCP not completed?). Just drop the + packet. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } +} +/*-----------------------------------------------------------*/ + +BaseType_t xProcessReceivedUDPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ) +{ +BaseType_t xReturn = pdPASS; +FreeRTOS_Socket_t *pxSocket; +configASSERT(pxNetworkBuffer); +configASSERT(pxNetworkBuffer->pucEthernetBuffer); + + +UDPPacket_t *pxUDPPacket = (UDPPacket_t *) pxNetworkBuffer->pucEthernetBuffer; + + /* Caller must check for minimum packet size. */ + pxSocket = pxUDPSocketLookup( usPort ); + + if( pxSocket ) + { + + /* When refreshing the ARP cache with received UDP packets we must be + careful; hundreds of broadcast messages may pass and if we're not + handling them, no use to fill the ARP cache with those IP addresses. */ + vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); + + #if( ipconfigUSE_CALLBACKS == 1 ) + { + /* Did the owner of this socket register a reception handler ? */ + if( ipconfigIS_VALID_PROG_ADDRESS( pxSocket->u.xUDP.pxHandleReceive ) ) + { + struct freertos_sockaddr xSourceAddress, destinationAddress; + void *pcData = ( void * ) &( pxNetworkBuffer->pucEthernetBuffer[ ipUDP_PAYLOAD_OFFSET_IPv4 ] ); + FOnUDPReceive_t xHandler = ( FOnUDPReceive_t ) pxSocket->u.xUDP.pxHandleReceive; + xSourceAddress.sin_port = pxNetworkBuffer->usPort; + xSourceAddress.sin_addr = pxNetworkBuffer->ulIPAddress; + destinationAddress.sin_port = usPort; + destinationAddress.sin_addr = pxUDPPacket->xIPHeader.ulDestinationIPAddress; + + if( xHandler( ( Socket_t ) pxSocket, ( void* ) pcData, ( size_t ) pxNetworkBuffer->xDataLength, + &xSourceAddress, &destinationAddress ) ) + { + xReturn = pdFAIL; /* FAIL means that we did not consume or release the buffer */ + } + } + } + #endif /* ipconfigUSE_CALLBACKS */ + + #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) + { + if( xReturn == pdPASS ) + { + if ( listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ) >= pxSocket->u.xUDP.uxMaxPackets ) + { + FreeRTOS_debug_printf( ( "xProcessReceivedUDPPacket: buffer full %ld >= %ld port %u\n", + listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ), + pxSocket->u.xUDP.uxMaxPackets, pxSocket->usLocalPort ) ); + xReturn = pdFAIL; /* we did not consume or release the buffer */ + } + } + } + #endif + + if( xReturn == pdPASS ) + { + vTaskSuspendAll(); + { + if( xReturn == pdPASS ) + { + taskENTER_CRITICAL(); + { + /* Add the network packet to the list of packets to be + processed by the socket. */ + vListInsertEnd( &( pxSocket->u.xUDP.xWaitingPacketsList ), &( pxNetworkBuffer->xBufferListItem ) ); + } + taskEXIT_CRITICAL(); + } + } + xTaskResumeAll(); + + /* Set the socket's receive event */ + if( pxSocket->xEventGroup != NULL ) + { + xEventGroupSetBits( pxSocket->xEventGroup, eSOCKET_RECEIVE ); + } + + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + { + if( ( pxSocket->pxSocketSet != NULL ) && ( ( pxSocket->xSelectBits & eSELECT_READ ) != 0 ) ) + { + xEventGroupSetBits( pxSocket->pxSocketSet->xSelectGroup, eSELECT_READ ); + } + } + #endif + + #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) + { + if( pxSocket->pxUserSemaphore != NULL ) + { + xSemaphoreGive( pxSocket->pxUserSemaphore ); + } + } + #endif + + #if( ipconfigUSE_DHCP == 1 ) + { + if( xIsDHCPSocket( pxSocket ) ) + { + xSendEventToIPTask( eDHCPEvent ); + } + } + #endif + } + } + else + { + /* There is no socket listening to the target port, but still it might + be for this node. */ + + #if( ipconfigUSE_DNS == 1 ) && ( ipconfigDNS_USE_CALLBACKS == 1 ) + /* A DNS reply, check for the source port. Although the DNS client + does open a UDP socket to send a messages, this socket will be + closed after a short timeout. Messages that come late (after the + socket is closed) will be treated here. */ + if( FreeRTOS_ntohs( pxUDPPacket->xUDPHeader.usSourcePort ) == ipDNS_PORT ) + { + vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); + xReturn = ( BaseType_t )ulDNSHandlePacket( pxNetworkBuffer ); + } + else + #endif + + #if( ipconfigUSE_LLMNR == 1 ) + /* a LLMNR request, check for the destination port. */ + if( ( usPort == FreeRTOS_ntohs( ipLLMNR_PORT ) ) || + ( pxUDPPacket->xUDPHeader.usSourcePort == FreeRTOS_ntohs( ipLLMNR_PORT ) ) ) + { + vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); + xReturn = ( BaseType_t )ulDNSHandlePacket( pxNetworkBuffer ); + } + else + #endif /* ipconfigUSE_LLMNR */ + + #if( ipconfigUSE_NBNS == 1 ) + /* a NetBIOS request, check for the destination port */ + if( ( usPort == FreeRTOS_ntohs( ipNBNS_PORT ) ) || + ( pxUDPPacket->xUDPHeader.usSourcePort == FreeRTOS_ntohs( ipNBNS_PORT ) ) ) + { + vARPRefreshCacheEntry( &( pxUDPPacket->xEthernetHeader.xSourceAddress ), pxUDPPacket->xIPHeader.ulSourceIPAddress ); + xReturn = ( BaseType_t )ulNBNSHandlePacket( pxNetworkBuffer ); + } + else + #endif /* ipconfigUSE_NBNS */ + { + xReturn = pdFAIL; + } + } + + return xReturn; +} +/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/History.txt b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/History.txt index 52565cc86..0bbfaa505 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/History.txt +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/History.txt @@ -1,177 +1,177 @@ -Changes between 160919 and 180821 releases: - - + Multiple security improvements and fixes in packet parsing routines, DNS - caching, and TCP sequence number and ID generation. - + Disable NBNS and LLMNR by default. - + Add TCP hang protection by default. - -We thank Ori Karliner of Zimperium zLabs Team for reporting these issues. - -Changes between 160908 and 160919 releases: - - + Add a NULL check before attempting to close the DHCP socket. [Prior to - 160823 the IP task closed the DHCP socket by calling a public API function - - which checked for the socket being NULL. This was changed to call a - local private function, which did not have a NULL check, in place of the - public API function.] - + Various [internal only] naming changes to better comply with the FreeRTOS - naming conventions. - + Improvements to the Zynq network driver. DMA transmission buffers now use - a counting semaphore. When all TX-buffers are in-use, the IP-task will - block momentarily until a TX-buffer becomes available. - + Experimental implementation of the TCP window scaling protocol. The - scaling option will always be offered, at least with a factor 1. If the - TCP sliding window size becomes more than 64KB, the factor will increase - automatically. - + ipconfigETHERNET_MINIMUM_PACKET_BYTES is now applied for every protocol: - TCP, UDP, and ARP. - + Updated the Zynq project to use BufferAllocation_1.c rather than - BufferAllocation_2.c - which is a requirement with its current - configuration (due to the alignment requirements on the combined cache and - DMA configuration). - -Changes between 160823 and 160908 releases: - - + Use ipconfigZERO_COPY_TX_DRIVER as the xReleaseAfterSend() parameter where - prvTCPReturnPacket() is called in prvSendData() to prevent unnecessary - copying of data. - + Remove the use of the uxGetRxEventCount variable, which was used to give - priority to incoming messages, but could result in the IP task starving - application tasks of processing time. - -Changes between 160112 and 160823 releases - - NOTE: The 160908 release is a maintenance release for the 160112 single - interface labs release - not a release of the current development branch. - - + Various minor stability enhancements, including the ability to work with - configTICK_RATE_HZ set to less than 1KHz, closing DHCP sockets directly - rather than via FreeRTOS_closesocket(), and better handling of unknown - TCP packets before an IP address has been assigned. - + ipBUFFER_PADDING is now configurable through the ipconfigBUFFER_PADDING - constant to improve network buffer alignment handling capabilities (expert - users/driver writers only). - + Multiple improvements to the FTP server, including to how read only and - zero length files are handled. - + ipconfigFTP_HAS_USER_PROPERTIES_HOOK (to allow each user to have a - different root directory and access rights) and - ipconfigHTTP_HAS_HANDLE_REQUEST_HOOK (to handle AJAX style data) - introduced, although these are not yet fully tested and the constant names - are likely to change. - + Introduce ipconfigHAS_TX_CRC_OFFLOADING. - + ipconfigUSE_DHCP_HOOK is now called ipconfigUSE_DHCP_HOOK, and the name - of the callback function has also changed. See the web documentation for - details. - + ipconfigTCP_RX_BUF_LEN is now ipconfigTCP_RX_BUFFER_LENGTH, and - ipconfigTCP_TX_BUF_LEN is now ipconfigTCP_TX_BUFFER_LENGTH, which is - actually how they have always been documented. - + Added example TFTP server capable of receiving (not sending) files. - Intended for bootloader type functionality. - + Various variable name changes for consistency (mainly ensuring UDP, TCP, - DNS, etc. always use the same case letters, and type prefixes are correct). - + Various minor edits to improve types used by internal variables. - + Simplified mapping of standard library functions to their Visual Studio - equivalents. - + Improve robustness of network drivers. - + Introduce pxResizeNetworkBufferWithDescriptor(). - + Removed obsolete FreeRTOSIPConfig.h constants from - FreeRTOSIPConfigDefaults.h. - + Added additional asserts() - predominantly to catch incorrect structure - packing. - -Changes between 160112 and 160111 releases - - + Updated the STM32 network driver so checksums are calculated by the - hardware. - + Implemented a simple "quit" command in the TCP command console. - -Changes between 150825 and 160111 releases - - + New device support: Demo applications and example drivers are provided - for Atmel SAM4E and ST STM32F4 microcontrollers. - + Various updates to improve compliance with the FreeRTOS coding standard. - + Added a command console example that uses TCP/IP for input and output (the - pre-existing command console example uses UDP/IP). - + Updated the UDP logging example so it will send log messages to the local - UDP broadcast address if a specific IP address is not provided. This - simplifies configuration, but note not all switches and routers will pass - broadcast messages. - + Add TCP echo client and TCP echo server examples to the Zynq demo. - + Minor updates to the Zynq network driver. - + Update the Zynq project to use version 2015.4 of the Xilinx SDK. - + Introduce FreeRTOS_SignalSocket(), which can be used to interrupt a task - that is blocked while reading from a socket ( FreeRTOS_recv[from] ). - + Make use of FreeRTOS_SignalSocket() in the FTP and HTTP servers. - + Major updates to the NTP client, although this is not included in any of - the pre-configured demo applications yet. - + Added support for DHCP zero pad option. - + Added uxGetMinimumIPQueueSpace(), a function to monitor the minimum amount - of space on the message queue. - + Better handling of zero length files in the FTP server. - + Fixed a bug reported by Andrey Ivanov from swissEmbedded that affects - users of 'ipconfigZERO_COPY_TX_DRIVER'. - - -Changes between 150825 150825 (?) - - + Added xApplicationDHCPUserHook() so a user defined hook will be - called at certain points in the DHCP process if - ipconfigDHCP_USES_USER_HOOK is set to 1. - + Added FreeRTOS_get_tx_head() to improve TCP zero copy behaviour - for - expert use only. - + RST is no longer sent if only the ACK flag is set. - + Previously, an immediate ACK was only sent when buffer space was - exhausted. Now, to improve performance, it is possible to send an - immediate ACK earlier - dependent on the ipconfigTCP_ACK_EARLIER_PACKET - setting. - + LLMNR and NBNS requests can now be sent to locate other devices - - previously these protocols would only be replied to, not generated. - + Added Auto-IP functionality (still in test) in case DHCP fails. Dependent - on the ipconfigDHCP_FALL_BACK_LINK_LAYER_ADDRESS and - ipconfigARP_USE_CLASH_DETECTION settings. - + Added NTP code and demo. - + FTP can now STOR and RETR zero-length files. - + Added LLMNR demo to Win32 demo - so now the Win32 responds to - "ping RTOSDemo". - -Changes between 141019 and 150825 - - + Added FTP server, which uses the new FreeRTOS+FAT component. - + Added basic HTTP server, which uses the new FreeRTOS+FAT component. - + Multiple definitions that are now common with FreeRTOS+FAT have been moved - into FreeRTOS's ProjDefs.h header file, and so prefixed with 'pd'. - + Introduced ipconfigZERO_COPY_TX_DRIVER, which defines who is responsible - for freeing a buffer sent to to the MAC driver for transmission, and - facilitates the development of zero copy drivers. - + Introduced the FREERTOS_MSG_DONTWAIT flag. The flag can be used as a - simpler and faster alternative to using FreeRTOS_setsockopt() to set the - send or receive timeout to 0. - + A few functions that were previously all lower case are now mixed case, as - lower case function names are only used when they are equivalent to a - a Berkeley sockets API function of the same name. - + Introduced uxGetMinimumFreeNetworkBuffers() to return the minimum number - of network buffers that have ever existed since the application started - executing. - + Introduce ipconfigETHERNET_MINIMUM_PACKET_BYTES to allow the application - writer to set their own minimum buffer size should the hardware not be - capable of padding under-sized Ethernet frames. - + vNetworkBufferRelease() renamed vReleaseNetworkBuffer() - just for - consistency with the names of other functions in the same file. - + Grouped DHCP status data into a structure. - + DHCP is now tried both with and without the broadcast flag. - + Replaced occurrences of configASSERT_VOID() with configASSERT(). - + ipconfigDNS_USE_CALLBACKS introduced to allow FreeRTOS_gethostbyname() to - be used without blocking. - + Fix: LLMNR and NBNS behaviour when the reply is in a larger buffer than the - request, and BufferAllocation_2 was used. - + Introduced ipMAX_IP_TASK_SLEEP_TIME to allow the application writer to - override the default value of 10 seconds. - + Fix: Correct error in *pxUDPPayloadBuffer_to_NetworkBuffer(). - + FreeRTOS_recv() now recognises the FREERTOS_ZERO_COPY flag, which, when - set, the void *pvBuffer parameter is interpreted as void **pvBuffer. - + FreeRTOS_listen() now returns an error code. Previously it always - returned 0. - + Fix: Previously if a listening socket was reused, and a connection - failed, the TCP/IP stack closed the socket, now the socket is correctly - left unclosed as it is owned by the application. - + Various other formatting and minor fix alterations. +Changes between 160919 and 180821 releases: + + + Multiple security improvements and fixes in packet parsing routines, DNS + caching, and TCP sequence number and ID generation. + + Disable NBNS and LLMNR by default. + + Add TCP hang protection by default. + +We thank Ori Karliner of Zimperium zLabs Team for reporting these issues. + +Changes between 160908 and 160919 releases: + + + Add a NULL check before attempting to close the DHCP socket. [Prior to + 160823 the IP task closed the DHCP socket by calling a public API function + - which checked for the socket being NULL. This was changed to call a + local private function, which did not have a NULL check, in place of the + public API function.] + + Various [internal only] naming changes to better comply with the FreeRTOS + naming conventions. + + Improvements to the Zynq network driver. DMA transmission buffers now use + a counting semaphore. When all TX-buffers are in-use, the IP-task will + block momentarily until a TX-buffer becomes available. + + Experimental implementation of the TCP window scaling protocol. The + scaling option will always be offered, at least with a factor 1. If the + TCP sliding window size becomes more than 64KB, the factor will increase + automatically. + + ipconfigETHERNET_MINIMUM_PACKET_BYTES is now applied for every protocol: + TCP, UDP, and ARP. + + Updated the Zynq project to use BufferAllocation_1.c rather than + BufferAllocation_2.c - which is a requirement with its current + configuration (due to the alignment requirements on the combined cache and + DMA configuration). + +Changes between 160823 and 160908 releases: + + + Use ipconfigZERO_COPY_TX_DRIVER as the xReleaseAfterSend() parameter where + prvTCPReturnPacket() is called in prvSendData() to prevent unnecessary + copying of data. + + Remove the use of the uxGetRxEventCount variable, which was used to give + priority to incoming messages, but could result in the IP task starving + application tasks of processing time. + +Changes between 160112 and 160823 releases + + NOTE: The 160908 release is a maintenance release for the 160112 single + interface labs release - not a release of the current development branch. + + + Various minor stability enhancements, including the ability to work with + configTICK_RATE_HZ set to less than 1KHz, closing DHCP sockets directly + rather than via FreeRTOS_closesocket(), and better handling of unknown + TCP packets before an IP address has been assigned. + + ipBUFFER_PADDING is now configurable through the ipconfigBUFFER_PADDING + constant to improve network buffer alignment handling capabilities (expert + users/driver writers only). + + Multiple improvements to the FTP server, including to how read only and + zero length files are handled. + + ipconfigFTP_HAS_USER_PROPERTIES_HOOK (to allow each user to have a + different root directory and access rights) and + ipconfigHTTP_HAS_HANDLE_REQUEST_HOOK (to handle AJAX style data) + introduced, although these are not yet fully tested and the constant names + are likely to change. + + Introduce ipconfigHAS_TX_CRC_OFFLOADING. + + ipconfigUSE_DHCP_HOOK is now called ipconfigUSE_DHCP_HOOK, and the name + of the callback function has also changed. See the web documentation for + details. + + ipconfigTCP_RX_BUF_LEN is now ipconfigTCP_RX_BUFFER_LENGTH, and + ipconfigTCP_TX_BUF_LEN is now ipconfigTCP_TX_BUFFER_LENGTH, which is + actually how they have always been documented. + + Added example TFTP server capable of receiving (not sending) files. + Intended for bootloader type functionality. + + Various variable name changes for consistency (mainly ensuring UDP, TCP, + DNS, etc. always use the same case letters, and type prefixes are correct). + + Various minor edits to improve types used by internal variables. + + Simplified mapping of standard library functions to their Visual Studio + equivalents. + + Improve robustness of network drivers. + + Introduce pxResizeNetworkBufferWithDescriptor(). + + Removed obsolete FreeRTOSIPConfig.h constants from + FreeRTOSIPConfigDefaults.h. + + Added additional asserts() - predominantly to catch incorrect structure + packing. + +Changes between 160112 and 160111 releases + + + Updated the STM32 network driver so checksums are calculated by the + hardware. + + Implemented a simple "quit" command in the TCP command console. + +Changes between 150825 and 160111 releases + + + New device support: Demo applications and example drivers are provided + for Atmel SAM4E and ST STM32F4 microcontrollers. + + Various updates to improve compliance with the FreeRTOS coding standard. + + Added a command console example that uses TCP/IP for input and output (the + pre-existing command console example uses UDP/IP). + + Updated the UDP logging example so it will send log messages to the local + UDP broadcast address if a specific IP address is not provided. This + simplifies configuration, but note not all switches and routers will pass + broadcast messages. + + Add TCP echo client and TCP echo server examples to the Zynq demo. + + Minor updates to the Zynq network driver. + + Update the Zynq project to use version 2015.4 of the Xilinx SDK. + + Introduce FreeRTOS_SignalSocket(), which can be used to interrupt a task + that is blocked while reading from a socket ( FreeRTOS_recv[from] ). + + Make use of FreeRTOS_SignalSocket() in the FTP and HTTP servers. + + Major updates to the NTP client, although this is not included in any of + the pre-configured demo applications yet. + + Added support for DHCP zero pad option. + + Added uxGetMinimumIPQueueSpace(), a function to monitor the minimum amount + of space on the message queue. + + Better handling of zero length files in the FTP server. + + Fixed a bug reported by Andrey Ivanov from swissEmbedded that affects + users of 'ipconfigZERO_COPY_TX_DRIVER'. + + +Changes between 150825 150825 (?) + + + Added xApplicationDHCPUserHook() so a user defined hook will be + called at certain points in the DHCP process if + ipconfigDHCP_USES_USER_HOOK is set to 1. + + Added FreeRTOS_get_tx_head() to improve TCP zero copy behaviour - for + expert use only. + + RST is no longer sent if only the ACK flag is set. + + Previously, an immediate ACK was only sent when buffer space was + exhausted. Now, to improve performance, it is possible to send an + immediate ACK earlier - dependent on the ipconfigTCP_ACK_EARLIER_PACKET + setting. + + LLMNR and NBNS requests can now be sent to locate other devices - + previously these protocols would only be replied to, not generated. + + Added Auto-IP functionality (still in test) in case DHCP fails. Dependent + on the ipconfigDHCP_FALL_BACK_LINK_LAYER_ADDRESS and + ipconfigARP_USE_CLASH_DETECTION settings. + + Added NTP code and demo. + + FTP can now STOR and RETR zero-length files. + + Added LLMNR demo to Win32 demo - so now the Win32 responds to + "ping RTOSDemo". + +Changes between 141019 and 150825 + + + Added FTP server, which uses the new FreeRTOS+FAT component. + + Added basic HTTP server, which uses the new FreeRTOS+FAT component. + + Multiple definitions that are now common with FreeRTOS+FAT have been moved + into FreeRTOS's ProjDefs.h header file, and so prefixed with 'pd'. + + Introduced ipconfigZERO_COPY_TX_DRIVER, which defines who is responsible + for freeing a buffer sent to to the MAC driver for transmission, and + facilitates the development of zero copy drivers. + + Introduced the FREERTOS_MSG_DONTWAIT flag. The flag can be used as a + simpler and faster alternative to using FreeRTOS_setsockopt() to set the + send or receive timeout to 0. + + A few functions that were previously all lower case are now mixed case, as + lower case function names are only used when they are equivalent to a + a Berkeley sockets API function of the same name. + + Introduced uxGetMinimumFreeNetworkBuffers() to return the minimum number + of network buffers that have ever existed since the application started + executing. + + Introduce ipconfigETHERNET_MINIMUM_PACKET_BYTES to allow the application + writer to set their own minimum buffer size should the hardware not be + capable of padding under-sized Ethernet frames. + + vNetworkBufferRelease() renamed vReleaseNetworkBuffer() - just for + consistency with the names of other functions in the same file. + + Grouped DHCP status data into a structure. + + DHCP is now tried both with and without the broadcast flag. + + Replaced occurrences of configASSERT_VOID() with configASSERT(). + + ipconfigDNS_USE_CALLBACKS introduced to allow FreeRTOS_gethostbyname() to + be used without blocking. + + Fix: LLMNR and NBNS behaviour when the reply is in a larger buffer than the + request, and BufferAllocation_2 was used. + + Introduced ipMAX_IP_TASK_SLEEP_TIME to allow the application writer to + override the default value of 10 seconds. + + Fix: Correct error in *pxUDPPayloadBuffer_to_NetworkBuffer(). + + FreeRTOS_recv() now recognises the FREERTOS_ZERO_COPY flag, which, when + set, the void *pvBuffer parameter is interpreted as void **pvBuffer. + + FreeRTOS_listen() now returns an error code. Previously it always + returned 0. + + Fix: Previously if a listening socket was reused, and a connection + failed, the TCP/IP stack closed the socket, now the socket is correctly + left unclosed as it is owned by the application. + + Various other formatting and minor fix alterations. diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/ReadMe.url b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/ReadMe.url index 8a8017f6b..417407677 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/ReadMe.url +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/ReadMe.url @@ -1,5 +1,5 @@ -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,2 -[InternetShortcut] -URL=http://www.freertos.org/tcp -IDList= +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 +[InternetShortcut] +URL=http://www.freertos.org/tcp +IDList= diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h index 20cdf739f..d23410f5f 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h @@ -1,569 +1,569 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef FREERTOS_DEFAULT_IP_CONFIG_H -#define FREERTOS_DEFAULT_IP_CONFIG_H - -/* The error numbers defined in this file will be moved to the core FreeRTOS -code in future versions of FreeRTOS - at which time the following header file -will be removed. */ -#include "FreeRTOS_errno_TCP.h" - -/* This file provides default values for configuration options that are missing -from the FreeRTOSIPConfig.h configuration header file. */ - - -/* Ensure defined configuration constants are using the most up to date naming. */ -#ifdef tcpconfigIP_TIME_TO_LIVE - #error now called: ipconfigTCP_TIME_TO_LIVE -#endif - -#ifdef updconfigIP_TIME_TO_LIVE - #error now called: ipconfigUDP_TIME_TO_LIVE -#endif - -#ifdef ipFILLER_SIZE - #error now called: ipconfigPACKET_FILLER_SIZE -#endif - -#ifdef dnsMAX_REQUEST_ATTEMPTS - #error now called: ipconfigDNS_REQUEST_ATTEMPTS -#endif - -#ifdef ipconfigUDP_TASK_PRIORITY - #error now called: ipconfigIP_TASK_PRIORITY -#endif - -#ifdef ipconfigUDP_TASK_STACK_SIZE_WORDS - #error now called: ipconfigIP_TASK_STACK_SIZE_WORDS -#endif - -#ifdef ipconfigDRIVER_INCLUDED_RX_IP_FILTERING - #error now called: ipconfigETHERNET_DRIVER_FILTERS_PACKETS -#endif - -#ifdef ipconfigMAX_SEND_BLOCK_TIME_TICKS - #error now called: ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS -#endif - -#ifdef ipconfigUSE_RECEIVE_CONNECT_CALLBACKS - #error now called: ipconfigUSE_CALLBACKS -#endif - -#ifdef ipconfigNUM_NETWORK_BUFFERS - #error now called: ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS -#endif - -#ifdef ipconfigTCP_HANG_PROT - #error now called: ipconfigTCP_HANG_PROTECTION -#endif - -#ifdef ipconfigTCP_HANG_PROT_TIME - #error now called: ipconfigTCP_HANG_PROTECTION_TIME -#endif - -#ifdef FreeRTOS_lprintf - #error now called: FreeRTOS_debug_printf -#endif - -#if ( ipconfigEVENT_QUEUE_LENGTH < ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 ) ) - #error The ipconfigEVENT_QUEUE_LENGTH parameter must be at least ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 -#endif - -#if ( ipconfigNETWORK_MTU < 46 ) - #error ipconfigNETWORK_MTU must be at least 46. -#endif - -#ifdef ipconfigBUFFER_ALLOC_FIXED_SIZE - #error ipconfigBUFFER_ALLOC_FIXED_SIZE was dropped and replaced by a const value, declared in BufferAllocation[12].c -#endif - -#ifdef ipconfigNIC_SEND_PASSES_DMA - #error now called: ipconfigZERO_COPY_TX_DRIVER -#endif - -#ifdef HAS_TX_CRC_OFFLOADING - /* _HT_ As these macro names have changed, throw an error - if they're still defined. */ - #error now called: ipconfigHAS_TX_CRC_OFFLOADING -#endif - -#ifdef HAS_RX_CRC_OFFLOADING - #error now called: ipconfigHAS_RX_CRC_OFFLOADING -#endif - -#ifdef ipconfigTCP_RX_BUF_LEN - #error ipconfigTCP_RX_BUF_LEN is now called ipconfigTCP_RX_BUFFER_LENGTH -#endif - -#ifdef ipconfigTCP_TX_BUF_LEN - #error ipconfigTCP_TX_BUF_LEN is now called ipconfigTCP_TX_BUFFER_LENGTH -#endif - -#ifdef ipconfigDHCP_USES_USER_HOOK - #error ipconfigDHCP_USES_USER_HOOK and its associated callback have been superceeded - see http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK -#endif - -#ifndef ipconfigUSE_TCP - #define ipconfigUSE_TCP ( 1 ) -#endif - -#if ipconfigUSE_TCP - - /* Include support for TCP scaling windows */ - #ifndef ipconfigUSE_TCP_WIN - #define ipconfigUSE_TCP_WIN ( 1 ) - #endif - - #ifndef ipconfigTCP_WIN_SEG_COUNT - #define ipconfigTCP_WIN_SEG_COUNT ( 256 ) - #endif - - #ifndef ipconfigIGNORE_UNKNOWN_PACKETS - /* When non-zero, TCP will not send RST packets in reply to - TCP packets which are unknown, or out-of-order. */ - #define ipconfigIGNORE_UNKNOWN_PACKETS ( 0 ) - #endif -#endif - -/* - * For debuging/logging: check if the port number is used for telnet - * Some events will not be logged for telnet connections - * because it would produce logging about the transmission of the logging... - * This macro will only be used if FreeRTOS_debug_printf() is defined for logging - */ -#ifndef ipconfigTCP_MAY_LOG_PORT - #define ipconfigTCP_MAY_LOG_PORT(xPort) ( ( xPort ) != 23u ) -#endif - - -#ifndef ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME - #define ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME portMAX_DELAY -#endif - -#ifndef ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME - #define ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME portMAX_DELAY -#endif - - -#ifndef ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS - #define ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500u ) -#endif - -#ifndef ipconfigDNS_SEND_BLOCK_TIME_TICKS - #define ipconfigDNS_SEND_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500u ) -#endif -/* - * FreeRTOS debug logging routine (proposal) - * The macro will be called in the printf() style. Users can define - * their own logging routine as: - * - * #define FreeRTOS_debug_printf( MSG ) my_printf MSG - * - * The FreeRTOS_debug_printf() must be thread-safe but does not have to be - * interrupt-safe. - */ -#ifdef ipconfigHAS_DEBUG_PRINTF - #if( ipconfigHAS_DEBUG_PRINTF == 0 ) - #ifdef FreeRTOS_debug_printf - #error Do not define FreeRTOS_debug_print if ipconfigHAS_DEBUG_PRINTF is set to 0 - #endif /* ifdef FreeRTOS_debug_printf */ - #endif /* ( ipconfigHAS_DEBUG_PRINTF == 0 ) */ -#endif /* ifdef ipconfigHAS_DEBUG_PRINTF */ - -#ifndef FreeRTOS_debug_printf - #define FreeRTOS_debug_printf( MSG ) do{} while(0) - #define ipconfigHAS_DEBUG_PRINTF 0 -#endif - -/* - * FreeRTOS general logging routine (proposal) - * Used in some utility functions such as FreeRTOS_netstat() and FreeRTOS_PrintARPCache() - * - * #define FreeRTOS_printf( MSG ) my_printf MSG - * - * The FreeRTOS_printf() must be thread-safe but does not have to be interrupt-safe - */ -#ifdef ipconfigHAS_PRINTF - #if( ipconfigHAS_PRINTF == 0 ) - #ifdef FreeRTOS_printf - #error Do not define FreeRTOS_print if ipconfigHAS_PRINTF is set to 0 - #endif /* ifdef FreeRTOS_debug_printf */ - #endif /* ( ipconfigHAS_PRINTF == 0 ) */ -#endif /* ifdef ipconfigHAS_PRINTF */ - -#ifndef FreeRTOS_printf - #define FreeRTOS_printf( MSG ) do{} while(0) - #define ipconfigHAS_PRINTF 0 -#endif - -/* - * In cases where a lot of logging is produced, FreeRTOS_flush_logging( ) - * will be called to give the logging module a chance to flush the data - * An example of this is the netstat command, which produces many lines of logging - */ -#ifndef FreeRTOS_flush_logging - #define FreeRTOS_flush_logging( ) do{} while(0) -#endif - -/* Malloc functions. Within most applications of FreeRTOS, the couple - * pvPortMalloc()/vPortFree() will be used. - * If there is also SDRAM, the user may decide to use a different memory - * allocator: - * MallocLarge is used to allocate large TCP buffers (for Rx/Tx) - * MallocSocket is used to allocate the space for the sockets - */ -#ifndef pvPortMallocLarge - #define pvPortMallocLarge( x ) pvPortMalloc( x ) -#endif - -#ifndef vPortFreeLarge - #define vPortFreeLarge(ptr) vPortFree(ptr) -#endif - -#ifndef pvPortMallocSocket - #define pvPortMallocSocket( x ) pvPortMalloc( x ) -#endif - -#ifndef vPortFreeSocket - #define vPortFreeSocket(ptr) vPortFree(ptr) -#endif - -/* - * At several places within the library, random numbers are needed: - * - DHCP: For creating a DHCP transaction number - * - TCP: Set the Initial Sequence Number: this is the value of the first outgoing - * sequence number being used when connecting to a peer. - * Having a well randomised ISN is important to avoid spoofing - * - UDP/TCP: for setting the first port number to be used, in case a socket - * uses a 'random' or anonymous port number - */ -#ifndef ipconfigRAND32 - #define ipconfigRAND32() rand() -#endif -/* -------------------------------------------------------- - * End of: HT Added some macro defaults for the PLUS-UDP project - * -------------------------------------------------------- */ - -#ifndef ipconfigUSE_NETWORK_EVENT_HOOK - #define ipconfigUSE_NETWORK_EVENT_HOOK 0 -#endif - -#ifndef ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS - #define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( pdMS_TO_TICKS( 20 ) ) -#endif - -#ifndef ipconfigARP_CACHE_ENTRIES - #define ipconfigARP_CACHE_ENTRIES 10 -#endif - -#ifndef ipconfigMAX_ARP_RETRANSMISSIONS - #define ipconfigMAX_ARP_RETRANSMISSIONS ( 5u ) -#endif - -#ifndef ipconfigMAX_ARP_AGE - #define ipconfigMAX_ARP_AGE 150u -#endif - -#ifndef ipconfigUSE_ARP_REVERSED_LOOKUP - #define ipconfigUSE_ARP_REVERSED_LOOKUP 0 -#endif - -#ifndef ipconfigUSE_ARP_REMOVE_ENTRY - #define ipconfigUSE_ARP_REMOVE_ENTRY 0 -#endif - -#ifndef ipconfigINCLUDE_FULL_INET_ADDR - #define ipconfigINCLUDE_FULL_INET_ADDR 1 -#endif - -#ifndef ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS - #define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 45 -#endif - -#ifndef ipconfigEVENT_QUEUE_LENGTH - #define ipconfigEVENT_QUEUE_LENGTH ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 ) -#endif - -#ifndef ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND - #define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1 -#endif - -#ifndef ipconfigUDP_TIME_TO_LIVE - #define ipconfigUDP_TIME_TO_LIVE 128 -#endif - -#ifndef ipconfigTCP_TIME_TO_LIVE - #define ipconfigTCP_TIME_TO_LIVE 128 -#endif - -#ifndef ipconfigUDP_MAX_RX_PACKETS - /* Make postive to define the maximum number of packets which will be buffered - * for each UDP socket. - * Can be overridden with the socket option FREERTOS_SO_UDP_MAX_RX_PACKETS - */ - #define ipconfigUDP_MAX_RX_PACKETS 0u -#endif - -#ifndef ipconfigUSE_DHCP - #define ipconfigUSE_DHCP 1 -#endif - -#ifndef ipconfigUSE_DHCP_HOOK - #define ipconfigUSE_DHCP_HOOK 0 -#endif - -#ifndef ipconfigDHCP_FALL_BACK_AUTO_IP - /* - * Only applicable when DHCP is in use: - * If no DHCP server responds, use "Auto-IP" : the - * device will allocate a random LinkLayer IP address. - */ - #define ipconfigDHCP_FALL_BACK_AUTO_IP ( 0 ) -#endif - -#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) - #define ipconfigARP_USE_CLASH_DETECTION 1 -#endif - -#ifndef ipconfigARP_USE_CLASH_DETECTION - #define ipconfigARP_USE_CLASH_DETECTION 0 -#endif - -#ifndef ipconfigNETWORK_MTU - #define ipconfigNETWORK_MTU 1500 -#endif - -#ifndef ipconfigTCP_MSS - #define ipconfigTCP_MSS ( ipconfigNETWORK_MTU - ipSIZE_OF_IPv4_HEADER - ipSIZE_OF_TCP_HEADER ) -#endif - -/* Each TCP socket has circular stream buffers for Rx and Tx, which - * have a fixed maximum size. - * The defaults for these size are defined here, although - * they can be overridden at runtime by using the setsockopt() call */ -#ifndef ipconfigTCP_RX_BUFFER_LENGTH - #define ipconfigTCP_RX_BUFFER_LENGTH ( 4u * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ -#endif - -/* Define the size of Tx stream buffer for TCP sockets */ -#ifndef ipconfigTCP_TX_BUFFER_LENGTH -# define ipconfigTCP_TX_BUFFER_LENGTH ( 4u * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ -#endif - -#ifndef ipconfigMAXIMUM_DISCOVER_TX_PERIOD - #ifdef _WINDOWS_ - #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 999 ) ) - #else - #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 30000 ) ) - #endif /* _WINDOWS_ */ -#endif /* ipconfigMAXIMUM_DISCOVER_TX_PERIOD */ - -#if( ipconfigUSE_DNS == 0 ) - /* The DNS module will not be included. */ - #if( ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_NBNS != 0 ) ) - /* LLMNR and NBNS depend on DNS because those protocols share a lot of code. */ - #error When either LLMNR or NBNS is used, ipconfigUSE_DNS must be defined - #endif -#endif - -#ifndef ipconfigUSE_DNS - #define ipconfigUSE_DNS 1 -#endif - -#ifndef ipconfigDNS_REQUEST_ATTEMPTS - #define ipconfigDNS_REQUEST_ATTEMPTS 5 -#endif - -#ifndef ipconfigUSE_DNS_CACHE - #define ipconfigUSE_DNS_CACHE 0 -#endif - -#if( ipconfigUSE_DNS_CACHE != 0 ) - #ifndef ipconfigDNS_CACHE_NAME_LENGTH - /* Per https://tools.ietf.org/html/rfc1035, 253 is the maximum string length - of a DNS name. The following default accounts for a null terminator. */ - #define ipconfigDNS_CACHE_NAME_LENGTH 254 - #endif - - #ifndef ipconfigDNS_CACHE_ENTRIES - #define ipconfigDNS_CACHE_ENTRIES 1 - #endif -#endif /* ipconfigUSE_DNS_CACHE != 0 */ - -#ifndef ipconfigCHECK_IP_QUEUE_SPACE - #define ipconfigCHECK_IP_QUEUE_SPACE 0 -#endif - -#ifndef ipconfigUSE_LLMNR - /* Include support for LLMNR: Link-local Multicast Name Resolution (non-Microsoft) */ - #define ipconfigUSE_LLMNR ( 0 ) -#endif - -#ifndef ipconfigREPLY_TO_INCOMING_PINGS - #define ipconfigREPLY_TO_INCOMING_PINGS 1 -#endif - -#ifndef ipconfigSUPPORT_OUTGOING_PINGS - #define ipconfigSUPPORT_OUTGOING_PINGS 0 -#endif - -#ifndef ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES - #define ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES 1 -#endif - -#ifndef ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES - #define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1 -#endif - -#ifndef configINCLUDE_TRACE_RELATED_CLI_COMMANDS - #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS 0 -#else - #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS configINCLUDE_TRACE_RELATED_CLI_COMMANDS -#endif - -#ifndef ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM - #define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM ( 0 ) -#endif - -#ifndef ipconfigETHERNET_DRIVER_FILTERS_PACKETS - #define ipconfigETHERNET_DRIVER_FILTERS_PACKETS ( 0 ) -#endif - -#ifndef ipconfigWATCHDOG_TIMER - /* This macro will be called in every loop the IP-task makes. It may be - replaced by user-code that triggers a watchdog */ - #define ipconfigWATCHDOG_TIMER() -#endif - -#ifndef ipconfigUSE_CALLBACKS - #define ipconfigUSE_CALLBACKS ( 0 ) -#endif - -#if( ipconfigUSE_CALLBACKS != 0 ) - #ifndef ipconfigIS_VALID_PROG_ADDRESS - /* Replace this macro with a test returning non-zero if the memory pointer to by x - * is valid memory which can contain executable code - * In fact this is an extra safety measure: if a handler points to invalid memory, - * it will not be called - */ - #define ipconfigIS_VALID_PROG_ADDRESS(x) ( ( x ) != NULL ) - #endif -#endif - -#ifndef ipconfigHAS_INLINE_FUNCTIONS - #define ipconfigHAS_INLINE_FUNCTIONS ( 1 ) -#endif - -#ifndef portINLINE - #define portINLINE inline -#endif - -#ifndef ipconfigZERO_COPY_TX_DRIVER - /* When non-zero, the buffers passed to the SEND routine may be passed - to DMA. As soon as sending is ready, the buffers must be released by - calling vReleaseNetworkBufferAndDescriptor(), */ - #define ipconfigZERO_COPY_TX_DRIVER ( 0 ) -#endif - -#ifndef ipconfigZERO_COPY_RX_DRIVER - /* This define doesn't mean much to the driver, except that it makes - sure that pxPacketBuffer_to_NetworkBuffer() will be included. */ - #define ipconfigZERO_COPY_RX_DRIVER ( 0 ) -#endif - -#ifndef ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM - #define ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM 0 -#endif - -#ifndef ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM - #define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 0 -#endif - -#ifndef ipconfigDHCP_REGISTER_HOSTNAME - #define ipconfigDHCP_REGISTER_HOSTNAME 0 -#endif - -#ifndef ipconfigSOCKET_HAS_USER_SEMAPHORE - #define ipconfigSOCKET_HAS_USER_SEMAPHORE 0 -#endif - -#ifndef ipconfigSOCKET_HAS_USER_WAKE_CALLBACK - #define ipconfigSOCKET_HAS_USER_WAKE_CALLBACK 0 -#endif - -#ifndef ipconfigSUPPORT_SELECT_FUNCTION - #define ipconfigSUPPORT_SELECT_FUNCTION 0 -#endif - -#ifndef ipconfigTCP_KEEP_ALIVE - #define ipconfigTCP_KEEP_ALIVE 0 -#endif - -#ifndef ipconfigDNS_USE_CALLBACKS - #define ipconfigDNS_USE_CALLBACKS 0 -#endif - -#ifndef ipconfigSUPPORT_SIGNALS - #define ipconfigSUPPORT_SIGNALS 0 -#endif - -#ifndef ipconfigUSE_NBNS - #define ipconfigUSE_NBNS 0 -#endif - -/* As an attack surface reduction for ports that listen for inbound -connections, hang protection can help reduce the impact of SYN floods. */ -#ifndef ipconfigTCP_HANG_PROTECTION - #define ipconfigTCP_HANG_PROTECTION 1 -#endif - -/* Non-activity timeout is expressed in seconds. */ -#ifndef ipconfigTCP_HANG_PROTECTION_TIME - #define ipconfigTCP_HANG_PROTECTION_TIME 30 -#endif - -#ifndef ipconfigTCP_IP_SANITY - #define ipconfigTCP_IP_SANITY 0 -#endif - -#ifndef ipconfigARP_STORES_REMOTE_ADDRESSES - #define ipconfigARP_STORES_REMOTE_ADDRESSES 0 -#endif - -#ifndef ipconfigBUFFER_PADDING - /* Expert option: define a value for 'ipBUFFER_PADDING'. - When 'ipconfigBUFFER_PADDING' equals 0, - 'ipBUFFER_PADDING' will get a default value of 8 + 2 bytes. */ - #define ipconfigBUFFER_PADDING 0 -#endif - -#ifndef ipconfigPACKET_FILLER_SIZE - #define ipconfigPACKET_FILLER_SIZE 2 -#endif - -#endif /* FREERTOS_DEFAULT_IP_CONFIG_H */ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://www.FreeRTOS.org + * http://aws.amazon.com/freertos + * + * 1 tab == 4 spaces! + */ + +#ifndef FREERTOS_DEFAULT_IP_CONFIG_H +#define FREERTOS_DEFAULT_IP_CONFIG_H + +/* The error numbers defined in this file will be moved to the core FreeRTOS +code in future versions of FreeRTOS - at which time the following header file +will be removed. */ +#include "FreeRTOS_errno_TCP.h" + +/* This file provides default values for configuration options that are missing +from the FreeRTOSIPConfig.h configuration header file. */ + + +/* Ensure defined configuration constants are using the most up to date naming. */ +#ifdef tcpconfigIP_TIME_TO_LIVE + #error now called: ipconfigTCP_TIME_TO_LIVE +#endif + +#ifdef updconfigIP_TIME_TO_LIVE + #error now called: ipconfigUDP_TIME_TO_LIVE +#endif + +#ifdef ipFILLER_SIZE + #error now called: ipconfigPACKET_FILLER_SIZE +#endif + +#ifdef dnsMAX_REQUEST_ATTEMPTS + #error now called: ipconfigDNS_REQUEST_ATTEMPTS +#endif + +#ifdef ipconfigUDP_TASK_PRIORITY + #error now called: ipconfigIP_TASK_PRIORITY +#endif + +#ifdef ipconfigUDP_TASK_STACK_SIZE_WORDS + #error now called: ipconfigIP_TASK_STACK_SIZE_WORDS +#endif + +#ifdef ipconfigDRIVER_INCLUDED_RX_IP_FILTERING + #error now called: ipconfigETHERNET_DRIVER_FILTERS_PACKETS +#endif + +#ifdef ipconfigMAX_SEND_BLOCK_TIME_TICKS + #error now called: ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS +#endif + +#ifdef ipconfigUSE_RECEIVE_CONNECT_CALLBACKS + #error now called: ipconfigUSE_CALLBACKS +#endif + +#ifdef ipconfigNUM_NETWORK_BUFFERS + #error now called: ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS +#endif + +#ifdef ipconfigTCP_HANG_PROT + #error now called: ipconfigTCP_HANG_PROTECTION +#endif + +#ifdef ipconfigTCP_HANG_PROT_TIME + #error now called: ipconfigTCP_HANG_PROTECTION_TIME +#endif + +#ifdef FreeRTOS_lprintf + #error now called: FreeRTOS_debug_printf +#endif + +#if ( ipconfigEVENT_QUEUE_LENGTH < ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 ) ) + #error The ipconfigEVENT_QUEUE_LENGTH parameter must be at least ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 +#endif + +#if ( ipconfigNETWORK_MTU < 46 ) + #error ipconfigNETWORK_MTU must be at least 46. +#endif + +#ifdef ipconfigBUFFER_ALLOC_FIXED_SIZE + #error ipconfigBUFFER_ALLOC_FIXED_SIZE was dropped and replaced by a const value, declared in BufferAllocation[12].c +#endif + +#ifdef ipconfigNIC_SEND_PASSES_DMA + #error now called: ipconfigZERO_COPY_TX_DRIVER +#endif + +#ifdef HAS_TX_CRC_OFFLOADING + /* _HT_ As these macro names have changed, throw an error + if they're still defined. */ + #error now called: ipconfigHAS_TX_CRC_OFFLOADING +#endif + +#ifdef HAS_RX_CRC_OFFLOADING + #error now called: ipconfigHAS_RX_CRC_OFFLOADING +#endif + +#ifdef ipconfigTCP_RX_BUF_LEN + #error ipconfigTCP_RX_BUF_LEN is now called ipconfigTCP_RX_BUFFER_LENGTH +#endif + +#ifdef ipconfigTCP_TX_BUF_LEN + #error ipconfigTCP_TX_BUF_LEN is now called ipconfigTCP_TX_BUFFER_LENGTH +#endif + +#ifdef ipconfigDHCP_USES_USER_HOOK + #error ipconfigDHCP_USES_USER_HOOK and its associated callback have been superceeded - see http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK +#endif + +#ifndef ipconfigUSE_TCP + #define ipconfigUSE_TCP ( 1 ) +#endif + +#if ipconfigUSE_TCP + + /* Include support for TCP scaling windows */ + #ifndef ipconfigUSE_TCP_WIN + #define ipconfigUSE_TCP_WIN ( 1 ) + #endif + + #ifndef ipconfigTCP_WIN_SEG_COUNT + #define ipconfigTCP_WIN_SEG_COUNT ( 256 ) + #endif + + #ifndef ipconfigIGNORE_UNKNOWN_PACKETS + /* When non-zero, TCP will not send RST packets in reply to + TCP packets which are unknown, or out-of-order. */ + #define ipconfigIGNORE_UNKNOWN_PACKETS ( 0 ) + #endif +#endif + +/* + * For debuging/logging: check if the port number is used for telnet + * Some events will not be logged for telnet connections + * because it would produce logging about the transmission of the logging... + * This macro will only be used if FreeRTOS_debug_printf() is defined for logging + */ +#ifndef ipconfigTCP_MAY_LOG_PORT + #define ipconfigTCP_MAY_LOG_PORT(xPort) ( ( xPort ) != 23u ) +#endif + + +#ifndef ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME + #define ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME portMAX_DELAY +#endif + +#ifndef ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME + #define ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME portMAX_DELAY +#endif + + +#ifndef ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS + #define ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500u ) +#endif + +#ifndef ipconfigDNS_SEND_BLOCK_TIME_TICKS + #define ipconfigDNS_SEND_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500u ) +#endif +/* + * FreeRTOS debug logging routine (proposal) + * The macro will be called in the printf() style. Users can define + * their own logging routine as: + * + * #define FreeRTOS_debug_printf( MSG ) my_printf MSG + * + * The FreeRTOS_debug_printf() must be thread-safe but does not have to be + * interrupt-safe. + */ +#ifdef ipconfigHAS_DEBUG_PRINTF + #if( ipconfigHAS_DEBUG_PRINTF == 0 ) + #ifdef FreeRTOS_debug_printf + #error Do not define FreeRTOS_debug_print if ipconfigHAS_DEBUG_PRINTF is set to 0 + #endif /* ifdef FreeRTOS_debug_printf */ + #endif /* ( ipconfigHAS_DEBUG_PRINTF == 0 ) */ +#endif /* ifdef ipconfigHAS_DEBUG_PRINTF */ + +#ifndef FreeRTOS_debug_printf + #define FreeRTOS_debug_printf( MSG ) do{} while(0) + #define ipconfigHAS_DEBUG_PRINTF 0 +#endif + +/* + * FreeRTOS general logging routine (proposal) + * Used in some utility functions such as FreeRTOS_netstat() and FreeRTOS_PrintARPCache() + * + * #define FreeRTOS_printf( MSG ) my_printf MSG + * + * The FreeRTOS_printf() must be thread-safe but does not have to be interrupt-safe + */ +#ifdef ipconfigHAS_PRINTF + #if( ipconfigHAS_PRINTF == 0 ) + #ifdef FreeRTOS_printf + #error Do not define FreeRTOS_print if ipconfigHAS_PRINTF is set to 0 + #endif /* ifdef FreeRTOS_debug_printf */ + #endif /* ( ipconfigHAS_PRINTF == 0 ) */ +#endif /* ifdef ipconfigHAS_PRINTF */ + +#ifndef FreeRTOS_printf + #define FreeRTOS_printf( MSG ) do{} while(0) + #define ipconfigHAS_PRINTF 0 +#endif + +/* + * In cases where a lot of logging is produced, FreeRTOS_flush_logging( ) + * will be called to give the logging module a chance to flush the data + * An example of this is the netstat command, which produces many lines of logging + */ +#ifndef FreeRTOS_flush_logging + #define FreeRTOS_flush_logging( ) do{} while(0) +#endif + +/* Malloc functions. Within most applications of FreeRTOS, the couple + * pvPortMalloc()/vPortFree() will be used. + * If there is also SDRAM, the user may decide to use a different memory + * allocator: + * MallocLarge is used to allocate large TCP buffers (for Rx/Tx) + * MallocSocket is used to allocate the space for the sockets + */ +#ifndef pvPortMallocLarge + #define pvPortMallocLarge( x ) pvPortMalloc( x ) +#endif + +#ifndef vPortFreeLarge + #define vPortFreeLarge(ptr) vPortFree(ptr) +#endif + +#ifndef pvPortMallocSocket + #define pvPortMallocSocket( x ) pvPortMalloc( x ) +#endif + +#ifndef vPortFreeSocket + #define vPortFreeSocket(ptr) vPortFree(ptr) +#endif + +/* + * At several places within the library, random numbers are needed: + * - DHCP: For creating a DHCP transaction number + * - TCP: Set the Initial Sequence Number: this is the value of the first outgoing + * sequence number being used when connecting to a peer. + * Having a well randomised ISN is important to avoid spoofing + * - UDP/TCP: for setting the first port number to be used, in case a socket + * uses a 'random' or anonymous port number + */ +#ifndef ipconfigRAND32 + #define ipconfigRAND32() rand() +#endif +/* -------------------------------------------------------- + * End of: HT Added some macro defaults for the PLUS-UDP project + * -------------------------------------------------------- */ + +#ifndef ipconfigUSE_NETWORK_EVENT_HOOK + #define ipconfigUSE_NETWORK_EVENT_HOOK 0 +#endif + +#ifndef ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS + #define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( pdMS_TO_TICKS( 20 ) ) +#endif + +#ifndef ipconfigARP_CACHE_ENTRIES + #define ipconfigARP_CACHE_ENTRIES 10 +#endif + +#ifndef ipconfigMAX_ARP_RETRANSMISSIONS + #define ipconfigMAX_ARP_RETRANSMISSIONS ( 5u ) +#endif + +#ifndef ipconfigMAX_ARP_AGE + #define ipconfigMAX_ARP_AGE 150u +#endif + +#ifndef ipconfigUSE_ARP_REVERSED_LOOKUP + #define ipconfigUSE_ARP_REVERSED_LOOKUP 0 +#endif + +#ifndef ipconfigUSE_ARP_REMOVE_ENTRY + #define ipconfigUSE_ARP_REMOVE_ENTRY 0 +#endif + +#ifndef ipconfigINCLUDE_FULL_INET_ADDR + #define ipconfigINCLUDE_FULL_INET_ADDR 1 +#endif + +#ifndef ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + #define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 45 +#endif + +#ifndef ipconfigEVENT_QUEUE_LENGTH + #define ipconfigEVENT_QUEUE_LENGTH ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 ) +#endif + +#ifndef ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND + #define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1 +#endif + +#ifndef ipconfigUDP_TIME_TO_LIVE + #define ipconfigUDP_TIME_TO_LIVE 128 +#endif + +#ifndef ipconfigTCP_TIME_TO_LIVE + #define ipconfigTCP_TIME_TO_LIVE 128 +#endif + +#ifndef ipconfigUDP_MAX_RX_PACKETS + /* Make postive to define the maximum number of packets which will be buffered + * for each UDP socket. + * Can be overridden with the socket option FREERTOS_SO_UDP_MAX_RX_PACKETS + */ + #define ipconfigUDP_MAX_RX_PACKETS 0u +#endif + +#ifndef ipconfigUSE_DHCP + #define ipconfigUSE_DHCP 1 +#endif + +#ifndef ipconfigUSE_DHCP_HOOK + #define ipconfigUSE_DHCP_HOOK 0 +#endif + +#ifndef ipconfigDHCP_FALL_BACK_AUTO_IP + /* + * Only applicable when DHCP is in use: + * If no DHCP server responds, use "Auto-IP" : the + * device will allocate a random LinkLayer IP address. + */ + #define ipconfigDHCP_FALL_BACK_AUTO_IP ( 0 ) +#endif + +#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 ) + #define ipconfigARP_USE_CLASH_DETECTION 1 +#endif + +#ifndef ipconfigARP_USE_CLASH_DETECTION + #define ipconfigARP_USE_CLASH_DETECTION 0 +#endif + +#ifndef ipconfigNETWORK_MTU + #define ipconfigNETWORK_MTU 1500 +#endif + +#ifndef ipconfigTCP_MSS + #define ipconfigTCP_MSS ( ipconfigNETWORK_MTU - ipSIZE_OF_IPv4_HEADER - ipSIZE_OF_TCP_HEADER ) +#endif + +/* Each TCP socket has circular stream buffers for Rx and Tx, which + * have a fixed maximum size. + * The defaults for these size are defined here, although + * they can be overridden at runtime by using the setsockopt() call */ +#ifndef ipconfigTCP_RX_BUFFER_LENGTH + #define ipconfigTCP_RX_BUFFER_LENGTH ( 4u * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ +#endif + +/* Define the size of Tx stream buffer for TCP sockets */ +#ifndef ipconfigTCP_TX_BUFFER_LENGTH +# define ipconfigTCP_TX_BUFFER_LENGTH ( 4u * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ +#endif + +#ifndef ipconfigMAXIMUM_DISCOVER_TX_PERIOD + #ifdef _WINDOWS_ + #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 999 ) ) + #else + #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 30000 ) ) + #endif /* _WINDOWS_ */ +#endif /* ipconfigMAXIMUM_DISCOVER_TX_PERIOD */ + +#if( ipconfigUSE_DNS == 0 ) + /* The DNS module will not be included. */ + #if( ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_NBNS != 0 ) ) + /* LLMNR and NBNS depend on DNS because those protocols share a lot of code. */ + #error When either LLMNR or NBNS is used, ipconfigUSE_DNS must be defined + #endif +#endif + +#ifndef ipconfigUSE_DNS + #define ipconfigUSE_DNS 1 +#endif + +#ifndef ipconfigDNS_REQUEST_ATTEMPTS + #define ipconfigDNS_REQUEST_ATTEMPTS 5 +#endif + +#ifndef ipconfigUSE_DNS_CACHE + #define ipconfigUSE_DNS_CACHE 0 +#endif + +#if( ipconfigUSE_DNS_CACHE != 0 ) + #ifndef ipconfigDNS_CACHE_NAME_LENGTH + /* Per https://tools.ietf.org/html/rfc1035, 253 is the maximum string length + of a DNS name. The following default accounts for a null terminator. */ + #define ipconfigDNS_CACHE_NAME_LENGTH 254 + #endif + + #ifndef ipconfigDNS_CACHE_ENTRIES + #define ipconfigDNS_CACHE_ENTRIES 1 + #endif +#endif /* ipconfigUSE_DNS_CACHE != 0 */ + +#ifndef ipconfigCHECK_IP_QUEUE_SPACE + #define ipconfigCHECK_IP_QUEUE_SPACE 0 +#endif + +#ifndef ipconfigUSE_LLMNR + /* Include support for LLMNR: Link-local Multicast Name Resolution (non-Microsoft) */ + #define ipconfigUSE_LLMNR ( 0 ) +#endif + +#ifndef ipconfigREPLY_TO_INCOMING_PINGS + #define ipconfigREPLY_TO_INCOMING_PINGS 1 +#endif + +#ifndef ipconfigSUPPORT_OUTGOING_PINGS + #define ipconfigSUPPORT_OUTGOING_PINGS 0 +#endif + +#ifndef ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES + #define ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES 1 +#endif + +#ifndef ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES + #define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1 +#endif + +#ifndef configINCLUDE_TRACE_RELATED_CLI_COMMANDS + #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS 0 +#else + #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS configINCLUDE_TRACE_RELATED_CLI_COMMANDS +#endif + +#ifndef ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM + #define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM ( 0 ) +#endif + +#ifndef ipconfigETHERNET_DRIVER_FILTERS_PACKETS + #define ipconfigETHERNET_DRIVER_FILTERS_PACKETS ( 0 ) +#endif + +#ifndef ipconfigWATCHDOG_TIMER + /* This macro will be called in every loop the IP-task makes. It may be + replaced by user-code that triggers a watchdog */ + #define ipconfigWATCHDOG_TIMER() +#endif + +#ifndef ipconfigUSE_CALLBACKS + #define ipconfigUSE_CALLBACKS ( 0 ) +#endif + +#if( ipconfigUSE_CALLBACKS != 0 ) + #ifndef ipconfigIS_VALID_PROG_ADDRESS + /* Replace this macro with a test returning non-zero if the memory pointer to by x + * is valid memory which can contain executable code + * In fact this is an extra safety measure: if a handler points to invalid memory, + * it will not be called + */ + #define ipconfigIS_VALID_PROG_ADDRESS(x) ( ( x ) != NULL ) + #endif +#endif + +#ifndef ipconfigHAS_INLINE_FUNCTIONS + #define ipconfigHAS_INLINE_FUNCTIONS ( 1 ) +#endif + +#ifndef portINLINE + #define portINLINE inline +#endif + +#ifndef ipconfigZERO_COPY_TX_DRIVER + /* When non-zero, the buffers passed to the SEND routine may be passed + to DMA. As soon as sending is ready, the buffers must be released by + calling vReleaseNetworkBufferAndDescriptor(), */ + #define ipconfigZERO_COPY_TX_DRIVER ( 0 ) +#endif + +#ifndef ipconfigZERO_COPY_RX_DRIVER + /* This define doesn't mean much to the driver, except that it makes + sure that pxPacketBuffer_to_NetworkBuffer() will be included. */ + #define ipconfigZERO_COPY_RX_DRIVER ( 0 ) +#endif + +#ifndef ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM + #define ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM 0 +#endif + +#ifndef ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM + #define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 0 +#endif + +#ifndef ipconfigDHCP_REGISTER_HOSTNAME + #define ipconfigDHCP_REGISTER_HOSTNAME 0 +#endif + +#ifndef ipconfigSOCKET_HAS_USER_SEMAPHORE + #define ipconfigSOCKET_HAS_USER_SEMAPHORE 0 +#endif + +#ifndef ipconfigSOCKET_HAS_USER_WAKE_CALLBACK + #define ipconfigSOCKET_HAS_USER_WAKE_CALLBACK 0 +#endif + +#ifndef ipconfigSUPPORT_SELECT_FUNCTION + #define ipconfigSUPPORT_SELECT_FUNCTION 0 +#endif + +#ifndef ipconfigTCP_KEEP_ALIVE + #define ipconfigTCP_KEEP_ALIVE 0 +#endif + +#ifndef ipconfigDNS_USE_CALLBACKS + #define ipconfigDNS_USE_CALLBACKS 0 +#endif + +#ifndef ipconfigSUPPORT_SIGNALS + #define ipconfigSUPPORT_SIGNALS 0 +#endif + +#ifndef ipconfigUSE_NBNS + #define ipconfigUSE_NBNS 0 +#endif + +/* As an attack surface reduction for ports that listen for inbound +connections, hang protection can help reduce the impact of SYN floods. */ +#ifndef ipconfigTCP_HANG_PROTECTION + #define ipconfigTCP_HANG_PROTECTION 1 +#endif + +/* Non-activity timeout is expressed in seconds. */ +#ifndef ipconfigTCP_HANG_PROTECTION_TIME + #define ipconfigTCP_HANG_PROTECTION_TIME 30 +#endif + +#ifndef ipconfigTCP_IP_SANITY + #define ipconfigTCP_IP_SANITY 0 +#endif + +#ifndef ipconfigARP_STORES_REMOTE_ADDRESSES + #define ipconfigARP_STORES_REMOTE_ADDRESSES 0 +#endif + +#ifndef ipconfigBUFFER_PADDING + /* Expert option: define a value for 'ipBUFFER_PADDING'. + When 'ipconfigBUFFER_PADDING' equals 0, + 'ipBUFFER_PADDING' will get a default value of 8 + 2 bytes. */ + #define ipconfigBUFFER_PADDING 0 +#endif + +#ifndef ipconfigPACKET_FILLER_SIZE + #define ipconfigPACKET_FILLER_SIZE 2 +#endif + +#endif /* FREERTOS_DEFAULT_IP_CONFIG_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_ARP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_ARP.h index 166bf3a97..363fca425 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_ARP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_ARP.h @@ -1,141 +1,141 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_ARP_H -#define FREERTOS_ARP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Application level configuration options. */ -#include "FreeRTOSIPConfig.h" -#include "FreeRTOSIPConfigDefaults.h" -#include "IPTraceMacroDefaults.h" - -/*-----------------------------------------------------------*/ -/* Miscellaneous structure and definitions. */ -/*-----------------------------------------------------------*/ - -typedef struct xARP_CACHE_TABLE_ROW -{ - uint32_t ulIPAddress; /* The IP address of an ARP cache entry. */ - MACAddress_t xMACAddress; /* The MAC address of an ARP cache entry. */ - uint8_t ucAge; /* A value that is periodically decremented but can also be refreshed by active communication. The ARP cache entry is removed if the value reaches zero. */ - uint8_t ucValid; /* pdTRUE: xMACAddress is valid, pdFALSE: waiting for ARP reply */ -} ARPCacheRow_t; - -typedef enum -{ - eARPCacheMiss = 0, /* 0 An ARP table lookup did not find a valid entry. */ - eARPCacheHit, /* 1 An ARP table lookup found a valid entry. */ - eCantSendPacket /* 2 There is no IP address, or an ARP is still in progress, so the packet cannot be sent. */ -} eARPLookupResult_t; - -typedef enum -{ - eNotFragment = 0, /* The IP packet being sent is not part of a fragment. */ - eFirstFragment, /* The IP packet being sent is the first in a set of fragmented packets. */ - eFollowingFragment /* The IP packet being sent is part of a set of fragmented packets. */ -} eIPFragmentStatus_t; - -/* - * If ulIPAddress is already in the ARP cache table then reset the age of the - * entry back to its maximum value. If ulIPAddress is not already in the ARP - * cache table then add it - replacing the oldest current entry if there is not - * a free space available. - */ -void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress ); - -#if( ipconfigARP_USE_CLASH_DETECTION != 0 ) - /* Becomes non-zero if another device responded to a gratuitos ARP message. */ - extern BaseType_t xARPHadIPClash; - /* MAC-address of the other device containing the same IP-address. */ - extern MACAddress_t xARPClashMacAddress; -#endif /* ipconfigARP_USE_CLASH_DETECTION */ - -#if( ipconfigUSE_ARP_REMOVE_ENTRY != 0 ) - - /* - * In some rare cases, it might be useful to remove a ARP cache entry of a - * known MAC address to make sure it gets refreshed. - */ - uint32_t ulARPRemoveCacheEntryByMac( const MACAddress_t * pxMACAddress ); - -#endif /* ipconfigUSE_ARP_REMOVE_ENTRY != 0 */ - -/* - * Look for ulIPAddress in the ARP cache. If the IP address exists, copy the - * associated MAC address into pxMACAddress, refresh the ARP cache entry's - * age, and return eARPCacheHit. If the IP address does not exist in the ARP - * cache return eARPCacheMiss. If the packet cannot be sent for any reason - * (maybe DHCP is still in process, or the addressing needs a gateway but there - * isn't a gateway defined) then return eCantSendPacket. - */ -eARPLookupResult_t eARPGetCacheEntry( uint32_t *pulIPAddress, MACAddress_t * const pxMACAddress ); - -#if( ipconfigUSE_ARP_REVERSED_LOOKUP != 0 ) - - /* Lookup an IP-address if only the MAC-address is known */ - eARPLookupResult_t eARPGetCacheEntryByMac( MACAddress_t * const pxMACAddress, uint32_t *pulIPAddress ); - -#endif -/* - * Reduce the age count in each entry within the ARP cache. An entry is no - * longer considered valid and is deleted if its age reaches zero. - */ -void vARPAgeCache( void ); - -/* - * Send out an ARP request for the IP address contained in pxNetworkBuffer, and - * add an entry into the ARP table that indicates that an ARP reply is - * outstanding so re-transmissions can be generated. - */ -void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ); - -/* - * After DHCP is ready and when changing IP address, force a quick send of our new IP - * address - */ -void vARPSendGratuitous( void ); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* FREERTOS_ARP_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_ARP_H +#define FREERTOS_ARP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Application level configuration options. */ +#include "FreeRTOSIPConfig.h" +#include "FreeRTOSIPConfigDefaults.h" +#include "IPTraceMacroDefaults.h" + +/*-----------------------------------------------------------*/ +/* Miscellaneous structure and definitions. */ +/*-----------------------------------------------------------*/ + +typedef struct xARP_CACHE_TABLE_ROW +{ + uint32_t ulIPAddress; /* The IP address of an ARP cache entry. */ + MACAddress_t xMACAddress; /* The MAC address of an ARP cache entry. */ + uint8_t ucAge; /* A value that is periodically decremented but can also be refreshed by active communication. The ARP cache entry is removed if the value reaches zero. */ + uint8_t ucValid; /* pdTRUE: xMACAddress is valid, pdFALSE: waiting for ARP reply */ +} ARPCacheRow_t; + +typedef enum +{ + eARPCacheMiss = 0, /* 0 An ARP table lookup did not find a valid entry. */ + eARPCacheHit, /* 1 An ARP table lookup found a valid entry. */ + eCantSendPacket /* 2 There is no IP address, or an ARP is still in progress, so the packet cannot be sent. */ +} eARPLookupResult_t; + +typedef enum +{ + eNotFragment = 0, /* The IP packet being sent is not part of a fragment. */ + eFirstFragment, /* The IP packet being sent is the first in a set of fragmented packets. */ + eFollowingFragment /* The IP packet being sent is part of a set of fragmented packets. */ +} eIPFragmentStatus_t; + +/* + * If ulIPAddress is already in the ARP cache table then reset the age of the + * entry back to its maximum value. If ulIPAddress is not already in the ARP + * cache table then add it - replacing the oldest current entry if there is not + * a free space available. + */ +void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress ); + +#if( ipconfigARP_USE_CLASH_DETECTION != 0 ) + /* Becomes non-zero if another device responded to a gratuitos ARP message. */ + extern BaseType_t xARPHadIPClash; + /* MAC-address of the other device containing the same IP-address. */ + extern MACAddress_t xARPClashMacAddress; +#endif /* ipconfigARP_USE_CLASH_DETECTION */ + +#if( ipconfigUSE_ARP_REMOVE_ENTRY != 0 ) + + /* + * In some rare cases, it might be useful to remove a ARP cache entry of a + * known MAC address to make sure it gets refreshed. + */ + uint32_t ulARPRemoveCacheEntryByMac( const MACAddress_t * pxMACAddress ); + +#endif /* ipconfigUSE_ARP_REMOVE_ENTRY != 0 */ + +/* + * Look for ulIPAddress in the ARP cache. If the IP address exists, copy the + * associated MAC address into pxMACAddress, refresh the ARP cache entry's + * age, and return eARPCacheHit. If the IP address does not exist in the ARP + * cache return eARPCacheMiss. If the packet cannot be sent for any reason + * (maybe DHCP is still in process, or the addressing needs a gateway but there + * isn't a gateway defined) then return eCantSendPacket. + */ +eARPLookupResult_t eARPGetCacheEntry( uint32_t *pulIPAddress, MACAddress_t * const pxMACAddress ); + +#if( ipconfigUSE_ARP_REVERSED_LOOKUP != 0 ) + + /* Lookup an IP-address if only the MAC-address is known */ + eARPLookupResult_t eARPGetCacheEntryByMac( MACAddress_t * const pxMACAddress, uint32_t *pulIPAddress ); + +#endif +/* + * Reduce the age count in each entry within the ARP cache. An entry is no + * longer considered valid and is deleted if its age reaches zero. + */ +void vARPAgeCache( void ); + +/* + * Send out an ARP request for the IP address contained in pxNetworkBuffer, and + * add an entry into the ARP table that indicates that an ARP reply is + * outstanding so re-transmissions can be generated. + */ +void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ); + +/* + * After DHCP is ready and when changing IP address, force a quick send of our new IP + * address + */ +void vARPSendGratuitous( void ); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* FREERTOS_ARP_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DHCP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DHCP.h index 6a6d372b6..a49909eb2 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DHCP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DHCP.h @@ -1,87 +1,87 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_DHCP_H -#define FREERTOS_DHCP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Application level configuration options. */ -#include "FreeRTOSIPConfig.h" -#include "IPTraceMacroDefaults.h" - -/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */ -typedef enum eDHCP_PHASE -{ - eDHCPPhasePreDiscover, /* Driver is about to send a DHCP discovery. */ - eDHCPPhasePreRequest, /* Driver is about to request DHCP an IP address. */ -#if( ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP != 0 ) - eDHCPPhasePreLLA, /* Driver is about to try get an LLA address */ -#endif /* ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP */ -} eDHCPCallbackPhase_t; - -/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */ -typedef enum eDHCP_ANSWERS -{ - eDHCPContinue, /* Continue the DHCP process */ - eDHCPUseDefaults, /* Stop DHCP and use the static defaults. */ - eDHCPStopNoChanges, /* Stop DHCP and continue with current settings. */ -} eDHCPCallbackAnswer_t; - -/* - * NOT A PUBLIC API FUNCTION. - */ -void vDHCPProcess( BaseType_t xReset ); - -/* Internal call: returns true if socket is the current DHCP socket */ -BaseType_t xIsDHCPSocket( Socket_t xSocket ); - -/* Prototype of the hook (or callback) function that must be provided by the -application if ipconfigUSE_DHCP_HOOK is set to 1. See the following URL for -usage information: -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK -*/ -eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase, uint32_t ulIPAddress ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* FREERTOS_DHCP_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_DHCP_H +#define FREERTOS_DHCP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Application level configuration options. */ +#include "FreeRTOSIPConfig.h" +#include "IPTraceMacroDefaults.h" + +/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */ +typedef enum eDHCP_PHASE +{ + eDHCPPhasePreDiscover, /* Driver is about to send a DHCP discovery. */ + eDHCPPhasePreRequest, /* Driver is about to request DHCP an IP address. */ +#if( ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP != 0 ) + eDHCPPhasePreLLA, /* Driver is about to try get an LLA address */ +#endif /* ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP */ +} eDHCPCallbackPhase_t; + +/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */ +typedef enum eDHCP_ANSWERS +{ + eDHCPContinue, /* Continue the DHCP process */ + eDHCPUseDefaults, /* Stop DHCP and use the static defaults. */ + eDHCPStopNoChanges, /* Stop DHCP and continue with current settings. */ +} eDHCPCallbackAnswer_t; + +/* + * NOT A PUBLIC API FUNCTION. + */ +void vDHCPProcess( BaseType_t xReset ); + +/* Internal call: returns true if socket is the current DHCP socket */ +BaseType_t xIsDHCPSocket( Socket_t xSocket ); + +/* Prototype of the hook (or callback) function that must be provided by the +application if ipconfigUSE_DHCP_HOOK is set to 1. See the following URL for +usage information: +http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK +*/ +eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase, uint32_t ulIPAddress ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* FREERTOS_DHCP_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DNS.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DNS.h index 449fa514f..0458d7621 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DNS.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_DNS.h @@ -1,137 +1,137 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_DNS_H -#define FREERTOS_DNS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Application level configuration options. */ -#include "FreeRTOSIPConfig.h" -#include "IPTraceMacroDefaults.h" - - -/* The Link-local Multicast Name Resolution (LLMNR) - * is included. - * Note that a special MAC address is required in addition to the NIC's actual - * MAC address: 01:00:5E:00:00:FC - * - * The target IP address will be 224.0.0.252 - */ -#if( ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN ) - #define ipLLMNR_IP_ADDR 0xE00000FC -#else - #define ipLLMNR_IP_ADDR 0xFC0000E0 -#endif /* ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN */ - -#define ipLLMNR_PORT 5355 /* Standard LLMNR port. */ -#define ipDNS_PORT 53 /* Standard DNS port. */ -#define ipDHCP_CLIENT 67 -#define ipDHCP_SERVER 68 -#define ipNBNS_PORT 137 /* NetBIOS Name Service. */ -#define ipNBDGM_PORT 138 /* Datagram Service, not included. */ - -/* - * The following function should be provided by the user and return true if it - * matches the domain name. - */ -extern BaseType_t xApplicationDNSQueryHook( const char *pcName ); - -/* - * LLMNR is very similar to DNS, so is handled by the DNS routines. - */ -uint32_t ulDNSHandlePacket( NetworkBufferDescriptor_t *pxNetworkBuffer ); - -#if( ipconfigUSE_LLMNR == 1 ) - extern const MACAddress_t xLLMNR_MacAdress; -#endif /* ipconfigUSE_LLMNR */ - -#if( ipconfigUSE_NBNS != 0 ) - - /* - * Inspect a NetBIOS Names-Service message. If the name matches with ours - * (xApplicationDNSQueryHook returns true) an answer will be sent back. - * Note that LLMNR is a better protocol for name services on a LAN as it is - * less polluted - */ - uint32_t ulNBNSHandlePacket (NetworkBufferDescriptor_t *pxNetworkBuffer ); - -#endif /* ipconfigUSE_NBNS */ - -#if( ipconfigUSE_DNS_CACHE != 0 ) - - /* Look for the indicated host name in the DNS cache. Returns the IPv4 - address if present, or 0x0 otherwise. */ - uint32_t FreeRTOS_dnslookup( const char *pcHostName ); - - /* Remove all entries from the DNS cache. */ - void FreeRTOS_dnsclear(); -#endif /* ipconfigUSE_DNS_CACHE != 0 */ - -#if( ipconfigDNS_USE_CALLBACKS != 0 ) - - /* - * Users may define this type of function as a callback. - * It will be called when a DNS reply is received or when a timeout has been reached. - */ - typedef void (* FOnDNSEvent ) ( const char * /* pcName */, void * /* pvSearchID */, uint32_t /* ulIPAddress */ ); - - /* - * Asynchronous version of gethostbyname() - * xTimeout is in units of ms. - */ - uint32_t FreeRTOS_gethostbyname_a( const char *pcHostName, FOnDNSEvent pCallback, void *pvSearchID, TickType_t xTimeout ); - void FreeRTOS_gethostbyname_cancel( void *pvSearchID ); - -#endif - -/* - * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE - * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: - * _TBD_ Add URL - */ -uint32_t FreeRTOS_gethostbyname( const char *pcHostName ); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* FREERTOS_DNS_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_DNS_H +#define FREERTOS_DNS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Application level configuration options. */ +#include "FreeRTOSIPConfig.h" +#include "IPTraceMacroDefaults.h" + + +/* The Link-local Multicast Name Resolution (LLMNR) + * is included. + * Note that a special MAC address is required in addition to the NIC's actual + * MAC address: 01:00:5E:00:00:FC + * + * The target IP address will be 224.0.0.252 + */ +#if( ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN ) + #define ipLLMNR_IP_ADDR 0xE00000FC +#else + #define ipLLMNR_IP_ADDR 0xFC0000E0 +#endif /* ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN */ + +#define ipLLMNR_PORT 5355 /* Standard LLMNR port. */ +#define ipDNS_PORT 53 /* Standard DNS port. */ +#define ipDHCP_CLIENT 67 +#define ipDHCP_SERVER 68 +#define ipNBNS_PORT 137 /* NetBIOS Name Service. */ +#define ipNBDGM_PORT 138 /* Datagram Service, not included. */ + +/* + * The following function should be provided by the user and return true if it + * matches the domain name. + */ +extern BaseType_t xApplicationDNSQueryHook( const char *pcName ); + +/* + * LLMNR is very similar to DNS, so is handled by the DNS routines. + */ +uint32_t ulDNSHandlePacket( NetworkBufferDescriptor_t *pxNetworkBuffer ); + +#if( ipconfigUSE_LLMNR == 1 ) + extern const MACAddress_t xLLMNR_MacAdress; +#endif /* ipconfigUSE_LLMNR */ + +#if( ipconfigUSE_NBNS != 0 ) + + /* + * Inspect a NetBIOS Names-Service message. If the name matches with ours + * (xApplicationDNSQueryHook returns true) an answer will be sent back. + * Note that LLMNR is a better protocol for name services on a LAN as it is + * less polluted + */ + uint32_t ulNBNSHandlePacket (NetworkBufferDescriptor_t *pxNetworkBuffer ); + +#endif /* ipconfigUSE_NBNS */ + +#if( ipconfigUSE_DNS_CACHE != 0 ) + + /* Look for the indicated host name in the DNS cache. Returns the IPv4 + address if present, or 0x0 otherwise. */ + uint32_t FreeRTOS_dnslookup( const char *pcHostName ); + + /* Remove all entries from the DNS cache. */ + void FreeRTOS_dnsclear(); +#endif /* ipconfigUSE_DNS_CACHE != 0 */ + +#if( ipconfigDNS_USE_CALLBACKS != 0 ) + + /* + * Users may define this type of function as a callback. + * It will be called when a DNS reply is received or when a timeout has been reached. + */ + typedef void (* FOnDNSEvent ) ( const char * /* pcName */, void * /* pvSearchID */, uint32_t /* ulIPAddress */ ); + + /* + * Asynchronous version of gethostbyname() + * xTimeout is in units of ms. + */ + uint32_t FreeRTOS_gethostbyname_a( const char *pcHostName, FOnDNSEvent pCallback, void *pvSearchID, TickType_t xTimeout ); + void FreeRTOS_gethostbyname_cancel( void *pvSearchID ); + +#endif + +/* + * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE + * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: + * _TBD_ Add URL + */ +uint32_t FreeRTOS_gethostbyname( const char *pcHostName ); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* FREERTOS_DNS_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP.h index 6bfb4ad42..46a215777 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP.h @@ -1,337 +1,337 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_IP_H -#define FREERTOS_IP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Application level configuration options. */ -#include "FreeRTOSIPConfig.h" -#include "FreeRTOSIPConfigDefaults.h" -#include "IPTraceMacroDefaults.h" - -/* Some constants defining the sizes of several parts of a packet */ -#define ipSIZE_OF_ETH_HEADER 14u -#define ipSIZE_OF_IPv4_HEADER 20u -#define ipSIZE_OF_IGMP_HEADER 8u -#define ipSIZE_OF_ICMP_HEADER 8u -#define ipSIZE_OF_UDP_HEADER 8u -#define ipSIZE_OF_TCP_HEADER 20u - - -/* The number of octets in the MAC and IP addresses respectively. */ -#define ipMAC_ADDRESS_LENGTH_BYTES ( 6 ) -#define ipIP_ADDRESS_LENGTH_BYTES ( 4 ) - -/* IP protocol definitions. */ -#define ipPROTOCOL_ICMP ( 1 ) -#define ipPROTOCOL_IGMP ( 2 ) -#define ipPROTOCOL_TCP ( 6 ) -#define ipPROTOCOL_UDP ( 17 ) - -/* Dimensions the buffers that are filled by received Ethernet frames. */ -#define ipSIZE_OF_ETH_CRC_BYTES ( 4UL ) -#define ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES ( 4UL ) -#define ipTOTAL_ETHERNET_FRAME_SIZE ( ( ( uint32_t ) ipconfigNETWORK_MTU ) + ( ( uint32_t ) ipSIZE_OF_ETH_HEADER ) + ipSIZE_OF_ETH_CRC_BYTES + ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES ) - -/*_RB_ Comment may need updating. */ -/* Space left at the beginning of a network buffer storage area to store a -pointer back to the network buffer. Should be a multiple of 8 to ensure 8 byte -alignment is maintained on architectures that require it. - -In order to get a 32-bit alignment of network packets, an offset of 2 bytes -would be desirable, as defined by ipconfigPACKET_FILLER_SIZE. So the malloc'd -buffer will have the following contents: - uint32_t pointer; // word-aligned - uchar_8 filler[6]; - << ETH-header >> // half-word-aligned - uchar_8 dest[6]; // start of pucEthernetBuffer - uchar_8 dest[6]; - uchar16_t type; - << IP-header >> // word-aligned - uint8_t ucVersionHeaderLength; - etc - */ -#if( ipconfigBUFFER_PADDING != 0 ) - #define ipBUFFER_PADDING ipconfigBUFFER_PADDING -#else - #define ipBUFFER_PADDING ( 8u + ipconfigPACKET_FILLER_SIZE ) -#endif - -/* The structure used to store buffers and pass them around the network stack. -Buffers can be in use by the stack, in use by the network interface hardware -driver, or free (not in use). */ -typedef struct xNETWORK_BUFFER -{ - ListItem_t xBufferListItem; /* Used to reference the buffer form the free buffer list or a socket. */ - uint32_t ulIPAddress; /* Source or destination IP address, depending on usage scenario. */ - uint8_t *pucEthernetBuffer; /* Pointer to the start of the Ethernet frame. */ - size_t xDataLength; /* Starts by holding the total Ethernet frame length, then the UDP/TCP payload length. */ - uint16_t usPort; /* Source or destination port, depending on usage scenario. */ - uint16_t usBoundPort; /* The port to which a transmitting socket is bound. */ - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - struct xNETWORK_BUFFER *pxNextBuffer; /* Possible optimisation for expert users - requires network driver support. */ - #endif -} NetworkBufferDescriptor_t; - -#include "pack_struct_start.h" -struct xMAC_ADDRESS -{ - uint8_t ucBytes[ ipMAC_ADDRESS_LENGTH_BYTES ]; -} -#include "pack_struct_end.h" - -typedef struct xMAC_ADDRESS MACAddress_t; - -typedef enum eNETWORK_EVENTS -{ - eNetworkUp, /* The network is configured. */ - eNetworkDown /* The network connection has been lost. */ -} eIPCallbackEvent_t; - -typedef enum ePING_REPLY_STATUS -{ - eSuccess = 0, /* A correct reply has been received for an outgoing ping. */ - eInvalidChecksum, /* A reply was received for an outgoing ping but the checksum of the reply was incorrect. */ - eInvalidData /* A reply was received to an outgoing ping but the payload of the reply was not correct. */ -} ePingReplyStatus_t; - -typedef enum eNETWORK_ADDRESS_TYPE -{ - eNetWorkAddressTypeIPV4, - eNetWorkAddressTypeIPV6, - eNetWorkAddressTypeHostName -} eNetWorkAddressType_t; - -/* Endian related definitions. */ -#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) - - /* FreeRTOS_htons / FreeRTOS_htonl: some platforms might have built-in versions - using a single instruction so allow these versions to be overridden. */ - #ifndef FreeRTOS_htons - #define FreeRTOS_htons( usIn ) ( (uint16_t) ( ( ( usIn ) << 8U ) | ( ( usIn ) >> 8U ) ) ) - #endif - - #ifndef FreeRTOS_htonl - #define FreeRTOS_htonl( ulIn ) \ - ( \ - ( uint32_t ) \ - ( \ - ( ( ( ( uint32_t ) ( ulIn ) ) ) << 24 ) | \ - ( ( ( ( uint32_t ) ( ulIn ) ) & 0x0000ff00UL ) << 8 ) | \ - ( ( ( ( uint32_t ) ( ulIn ) ) & 0x00ff0000UL ) >> 8 ) | \ - ( ( ( ( uint32_t ) ( ulIn ) ) ) >> 24 ) \ - ) \ - ) - #endif - -#else /* ipconfigBYTE_ORDER */ - - #define FreeRTOS_htons( x ) ( ( uint16_t ) ( x ) ) - #define FreeRTOS_htonl( x ) ( ( uint32_t ) ( x ) ) - -#endif /* ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN */ - -#define FreeRTOS_ntohs( x ) FreeRTOS_htons( x ) -#define FreeRTOS_ntohl( x ) FreeRTOS_htonl( x ) - -#if( ipconfigHAS_INLINE_FUNCTIONS == 1 ) - - static portINLINE int32_t FreeRTOS_max_int32 (int32_t a, int32_t b); - static portINLINE uint32_t FreeRTOS_max_uint32 (uint32_t a, uint32_t b); - static portINLINE int32_t FreeRTOS_min_int32 (int32_t a, int32_t b); - static portINLINE uint32_t FreeRTOS_min_uint32 (uint32_t a, uint32_t b); - static portINLINE uint32_t FreeRTOS_round_up (uint32_t a, uint32_t d); - static portINLINE uint32_t FreeRTOS_round_down (uint32_t a, uint32_t d); - static portINLINE BaseType_t FreeRTOS_min_BaseType (BaseType_t a, BaseType_t b); - static portINLINE BaseType_t FreeRTOS_max_BaseType (BaseType_t a, BaseType_t b); - static portINLINE UBaseType_t FreeRTOS_max_UBaseType (UBaseType_t a, UBaseType_t b); - static portINLINE UBaseType_t FreeRTOS_min_UBaseType (UBaseType_t a, UBaseType_t b); - - - static portINLINE int32_t FreeRTOS_max_int32 (int32_t a, int32_t b) { return a >= b ? a : b; } - static portINLINE uint32_t FreeRTOS_max_uint32 (uint32_t a, uint32_t b) { return a >= b ? a : b; } - static portINLINE int32_t FreeRTOS_min_int32 (int32_t a, int32_t b) { return a <= b ? a : b; } - static portINLINE uint32_t FreeRTOS_min_uint32 (uint32_t a, uint32_t b) { return a <= b ? a : b; } - static portINLINE uint32_t FreeRTOS_round_up (uint32_t a, uint32_t d) { return d * ( ( a + d - 1u ) / d ); } - static portINLINE uint32_t FreeRTOS_round_down (uint32_t a, uint32_t d) { return d * ( a / d ); } - - static portINLINE BaseType_t FreeRTOS_max_BaseType (BaseType_t a, BaseType_t b) { return a >= b ? a : b; } - static portINLINE UBaseType_t FreeRTOS_max_UBaseType (UBaseType_t a, UBaseType_t b) { return a >= b ? a : b; } - static portINLINE BaseType_t FreeRTOS_min_BaseType (BaseType_t a, BaseType_t b) { return a <= b ? a : b; } - static portINLINE UBaseType_t FreeRTOS_min_UBaseType (UBaseType_t a, UBaseType_t b) { return a <= b ? a : b; } - -#else - - #define FreeRTOS_max_int32(a,b) ( ( ( int32_t ) ( a ) ) >= ( ( int32_t ) ( b ) ) ? ( ( int32_t ) ( a ) ) : ( ( int32_t ) ( b ) ) ) - #define FreeRTOS_max_uint32(a,b) ( ( ( uint32_t ) ( a ) ) >= ( ( uint32_t ) ( b ) ) ? ( ( uint32_t ) ( a ) ) : ( ( uint32_t ) ( b ) ) ) - - #define FreeRTOS_min_int32(a,b) ( ( ( int32_t ) a ) <= ( ( int32_t ) b ) ? ( ( int32_t ) a ) : ( ( int32_t ) b ) ) - #define FreeRTOS_min_uint32(a,b) ( ( ( uint32_t ) a ) <= ( ( uint32_t ) b ) ? ( ( uint32_t ) a ) : ( ( uint32_t ) b ) ) - - /* Round-up: a = d * ( ( a + d - 1 ) / d ) */ - #define FreeRTOS_round_up(a,d) ( ( ( uint32_t ) ( d ) ) * ( ( ( ( uint32_t ) ( a ) ) + ( ( uint32_t ) ( d ) ) - 1UL ) / ( ( uint32_t ) ( d ) ) ) ) - #define FreeRTOS_round_down(a,d) ( ( ( uint32_t ) ( d ) ) * ( ( ( uint32_t ) ( a ) ) / ( ( uint32_t ) ( d ) ) ) ) - - #define FreeRTOS_ms_to_tick(ms) ( ( ms * configTICK_RATE_HZ + 500 ) / 1000 ) - - #define FreeRTOS_max_BaseType(a, b) ( ( ( BaseType_t ) ( a ) ) >= ( ( BaseType_t ) ( b ) ) ? ( ( BaseType_t ) ( a ) ) : ( ( BaseType_t ) ( b ) ) ) - #define FreeRTOS_max_UBaseType(a, b) ( ( ( UBaseType_t ) ( a ) ) >= ( ( UBaseType_t ) ( b ) ) ? ( ( UBaseType_t ) ( a ) ) : ( ( UBaseType_t ) ( b ) ) ) - #define FreeRTOS_min_BaseType(a, b) ( ( ( BaseType_t ) ( a ) ) <= ( ( BaseType_t ) ( b ) ) ? ( ( BaseType_t ) ( a ) ) : ( ( BaseType_t ) ( b ) ) ) - #define FreeRTOS_min_UBaseType(a, b) ( ( ( UBaseType_t ) ( a ) ) <= ( ( UBaseType_t ) ( b ) ) ? ( ( UBaseType_t ) ( a ) ) : ( ( UBaseType_t ) ( b ) ) ) - -#endif /* ipconfigHAS_INLINE_FUNCTIONS */ - -#define pdMS_TO_MIN_TICKS( xTimeInMs ) ( pdMS_TO_TICKS( ( xTimeInMs ) ) < ( ( TickType_t ) 1 ) ? ( ( TickType_t ) 1 ) : pdMS_TO_TICKS( ( xTimeInMs ) ) ) - -#ifndef pdTRUE_SIGNED - /* Temporary solution: eventually the defines below will appear in 'Source\include\projdefs.h' */ - #define pdTRUE_SIGNED pdTRUE - #define pdFALSE_SIGNED pdFALSE - #define pdTRUE_UNSIGNED ( ( UBaseType_t ) 1u ) - #define pdFALSE_UNSIGNED ( ( UBaseType_t ) 0u ) -#endif - -/* - * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE - * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_TCP_API_Functions.html - */ -BaseType_t FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], - const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], - const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], - const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], - const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ); - -void * FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ); -void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetMask, uint32_t *pulGatewayAddress, uint32_t *pulDNSServerAddress ); -void FreeRTOS_SetAddressConfiguration( const uint32_t *pulIPAddress, const uint32_t *pulNetMask, const uint32_t *pulGatewayAddress, const uint32_t *pulDNSServerAddress ); -BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks ); -void FreeRTOS_ReleaseUDPPayloadBuffer( void *pvBuffer ); -const uint8_t * FreeRTOS_GetMACAddress( void ); -void FreeRTOS_UpdateMACAddress( const uint8_t ucMACAddress[ipMAC_ADDRESS_LENGTH_BYTES] ); -void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent ); -void vApplicationPingReplyHook( ePingReplyStatus_t eStatus, uint16_t usIdentifier ); -uint32_t FreeRTOS_GetIPAddress( void ); -void FreeRTOS_SetIPAddress( uint32_t ulIPAddress ); -void FreeRTOS_SetNetmask( uint32_t ulNetmask ); -void FreeRTOS_SetGatewayAddress( uint32_t ulGatewayAddress ); -uint32_t FreeRTOS_GetGatewayAddress( void ); -uint32_t FreeRTOS_GetDNSServerAddress( void ); -uint32_t FreeRTOS_GetNetmask( void ); -void FreeRTOS_OutputARPRequest( uint32_t ulIPAddress ); -BaseType_t FreeRTOS_IsNetworkUp( void ); - -#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - UBaseType_t uxGetMinimumIPQueueSpace( void ); -#endif - -/* - * Defined in FreeRTOS_Sockets.c - * //_RB_ Don't think this comment is correct. If this is for internal use only it should appear after all the public API functions and not start with FreeRTOS_. - * Socket has had activity, reset the timer so it will not be closed - * because of inactivity - */ -const char *FreeRTOS_GetTCPStateName( UBaseType_t ulState); - -/* _HT_ Temporary: show all valid ARP entries - */ -void FreeRTOS_PrintARPCache( void ); -void FreeRTOS_ClearARP( void ); - -#if( ipconfigDHCP_REGISTER_HOSTNAME == 1 ) - - /* DHCP has an option for clients to register their hostname. It doesn't - have much use, except that a device can be found in a router along with its - name. If this option is used the callback below must be provided by the - application writer to return a const string, denoting the device's name. */ - const char *pcApplicationHostnameHook( void ); - -#endif /* ipconfigDHCP_REGISTER_HOSTNAME */ - - -/* This xApplicationGetRandomNumber() will set *pulNumber to a random number, -and return pdTRUE. When the random number generator is broken, it shall return -pdFALSE. -The function is defined in 'iot_secure_sockets.c'. -If that module is not included in the project, the application must provide an -implementation of it. -The macro's ipconfigRAND32() and configRAND32() are not in use anymore. */ -BaseType_t xApplicationGetRandomNumber( uint32_t *pulNumber ); - -/* For backward compatibility define old structure names to the newer equivalent -structure name. */ -#ifndef ipconfigENABLE_BACKWARD_COMPATIBILITY - #define ipconfigENABLE_BACKWARD_COMPATIBILITY 1 -#endif - -#if( ipconfigENABLE_BACKWARD_COMPATIBILITY == 1 ) - #define xIPStackEvent_t IPStackEvent_t - #define xNetworkBufferDescriptor_t NetworkBufferDescriptor_t - #define xMACAddress_t MACAddress_t - #define xWinProperties_t WinProperties_t - #define xSocket_t Socket_t - #define xSocketSet_t SocketSet_t - #define ipSIZE_OF_IP_HEADER ipSIZE_OF_IPv4_HEADER - - /* Since August 2016, the public types and fields below have changed name: - abbreviations TCP/UDP are now written in capitals, and type names now end with "_t". */ - #define FOnConnected FOnConnected_t - #define FOnTcpReceive FOnTCPReceive_t - #define FOnTcpSent FOnTCPSent_t - #define FOnUdpReceive FOnUDPReceive_t - #define FOnUdpSent FOnUDPSent_t - - #define pOnTcpConnected pxOnTCPConnected - #define pOnTcpReceive pxOnTCPReceive - #define pOnTcpSent pxOnTCPSent - #define pOnUdpReceive pxOnUDPReceive - #define pOnUdpSent pxOnUDPSent - - #define FOnUdpSent FOnUDPSent_t - #define FOnTcpSent FOnTCPSent_t -#endif /* ipconfigENABLE_BACKWARD_COMPATIBILITY */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* FREERTOS_IP_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_IP_H +#define FREERTOS_IP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Application level configuration options. */ +#include "FreeRTOSIPConfig.h" +#include "FreeRTOSIPConfigDefaults.h" +#include "IPTraceMacroDefaults.h" + +/* Some constants defining the sizes of several parts of a packet */ +#define ipSIZE_OF_ETH_HEADER 14u +#define ipSIZE_OF_IPv4_HEADER 20u +#define ipSIZE_OF_IGMP_HEADER 8u +#define ipSIZE_OF_ICMP_HEADER 8u +#define ipSIZE_OF_UDP_HEADER 8u +#define ipSIZE_OF_TCP_HEADER 20u + + +/* The number of octets in the MAC and IP addresses respectively. */ +#define ipMAC_ADDRESS_LENGTH_BYTES ( 6 ) +#define ipIP_ADDRESS_LENGTH_BYTES ( 4 ) + +/* IP protocol definitions. */ +#define ipPROTOCOL_ICMP ( 1 ) +#define ipPROTOCOL_IGMP ( 2 ) +#define ipPROTOCOL_TCP ( 6 ) +#define ipPROTOCOL_UDP ( 17 ) + +/* Dimensions the buffers that are filled by received Ethernet frames. */ +#define ipSIZE_OF_ETH_CRC_BYTES ( 4UL ) +#define ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES ( 4UL ) +#define ipTOTAL_ETHERNET_FRAME_SIZE ( ( ( uint32_t ) ipconfigNETWORK_MTU ) + ( ( uint32_t ) ipSIZE_OF_ETH_HEADER ) + ipSIZE_OF_ETH_CRC_BYTES + ipSIZE_OF_ETH_OPTIONAL_802_1Q_TAG_BYTES ) + +/*_RB_ Comment may need updating. */ +/* Space left at the beginning of a network buffer storage area to store a +pointer back to the network buffer. Should be a multiple of 8 to ensure 8 byte +alignment is maintained on architectures that require it. + +In order to get a 32-bit alignment of network packets, an offset of 2 bytes +would be desirable, as defined by ipconfigPACKET_FILLER_SIZE. So the malloc'd +buffer will have the following contents: + uint32_t pointer; // word-aligned + uchar_8 filler[6]; + << ETH-header >> // half-word-aligned + uchar_8 dest[6]; // start of pucEthernetBuffer + uchar_8 dest[6]; + uchar16_t type; + << IP-header >> // word-aligned + uint8_t ucVersionHeaderLength; + etc + */ +#if( ipconfigBUFFER_PADDING != 0 ) + #define ipBUFFER_PADDING ipconfigBUFFER_PADDING +#else + #define ipBUFFER_PADDING ( 8u + ipconfigPACKET_FILLER_SIZE ) +#endif + +/* The structure used to store buffers and pass them around the network stack. +Buffers can be in use by the stack, in use by the network interface hardware +driver, or free (not in use). */ +typedef struct xNETWORK_BUFFER +{ + ListItem_t xBufferListItem; /* Used to reference the buffer form the free buffer list or a socket. */ + uint32_t ulIPAddress; /* Source or destination IP address, depending on usage scenario. */ + uint8_t *pucEthernetBuffer; /* Pointer to the start of the Ethernet frame. */ + size_t xDataLength; /* Starts by holding the total Ethernet frame length, then the UDP/TCP payload length. */ + uint16_t usPort; /* Source or destination port, depending on usage scenario. */ + uint16_t usBoundPort; /* The port to which a transmitting socket is bound. */ + #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) + struct xNETWORK_BUFFER *pxNextBuffer; /* Possible optimisation for expert users - requires network driver support. */ + #endif +} NetworkBufferDescriptor_t; + +#include "pack_struct_start.h" +struct xMAC_ADDRESS +{ + uint8_t ucBytes[ ipMAC_ADDRESS_LENGTH_BYTES ]; +} +#include "pack_struct_end.h" + +typedef struct xMAC_ADDRESS MACAddress_t; + +typedef enum eNETWORK_EVENTS +{ + eNetworkUp, /* The network is configured. */ + eNetworkDown /* The network connection has been lost. */ +} eIPCallbackEvent_t; + +typedef enum ePING_REPLY_STATUS +{ + eSuccess = 0, /* A correct reply has been received for an outgoing ping. */ + eInvalidChecksum, /* A reply was received for an outgoing ping but the checksum of the reply was incorrect. */ + eInvalidData /* A reply was received to an outgoing ping but the payload of the reply was not correct. */ +} ePingReplyStatus_t; + +typedef enum eNETWORK_ADDRESS_TYPE +{ + eNetWorkAddressTypeIPV4, + eNetWorkAddressTypeIPV6, + eNetWorkAddressTypeHostName +} eNetWorkAddressType_t; + +/* Endian related definitions. */ +#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) + + /* FreeRTOS_htons / FreeRTOS_htonl: some platforms might have built-in versions + using a single instruction so allow these versions to be overridden. */ + #ifndef FreeRTOS_htons + #define FreeRTOS_htons( usIn ) ( (uint16_t) ( ( ( usIn ) << 8U ) | ( ( usIn ) >> 8U ) ) ) + #endif + + #ifndef FreeRTOS_htonl + #define FreeRTOS_htonl( ulIn ) \ + ( \ + ( uint32_t ) \ + ( \ + ( ( ( ( uint32_t ) ( ulIn ) ) ) << 24 ) | \ + ( ( ( ( uint32_t ) ( ulIn ) ) & 0x0000ff00UL ) << 8 ) | \ + ( ( ( ( uint32_t ) ( ulIn ) ) & 0x00ff0000UL ) >> 8 ) | \ + ( ( ( ( uint32_t ) ( ulIn ) ) ) >> 24 ) \ + ) \ + ) + #endif + +#else /* ipconfigBYTE_ORDER */ + + #define FreeRTOS_htons( x ) ( ( uint16_t ) ( x ) ) + #define FreeRTOS_htonl( x ) ( ( uint32_t ) ( x ) ) + +#endif /* ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN */ + +#define FreeRTOS_ntohs( x ) FreeRTOS_htons( x ) +#define FreeRTOS_ntohl( x ) FreeRTOS_htonl( x ) + +#if( ipconfigHAS_INLINE_FUNCTIONS == 1 ) + + static portINLINE int32_t FreeRTOS_max_int32 (int32_t a, int32_t b); + static portINLINE uint32_t FreeRTOS_max_uint32 (uint32_t a, uint32_t b); + static portINLINE int32_t FreeRTOS_min_int32 (int32_t a, int32_t b); + static portINLINE uint32_t FreeRTOS_min_uint32 (uint32_t a, uint32_t b); + static portINLINE uint32_t FreeRTOS_round_up (uint32_t a, uint32_t d); + static portINLINE uint32_t FreeRTOS_round_down (uint32_t a, uint32_t d); + static portINLINE BaseType_t FreeRTOS_min_BaseType (BaseType_t a, BaseType_t b); + static portINLINE BaseType_t FreeRTOS_max_BaseType (BaseType_t a, BaseType_t b); + static portINLINE UBaseType_t FreeRTOS_max_UBaseType (UBaseType_t a, UBaseType_t b); + static portINLINE UBaseType_t FreeRTOS_min_UBaseType (UBaseType_t a, UBaseType_t b); + + + static portINLINE int32_t FreeRTOS_max_int32 (int32_t a, int32_t b) { return a >= b ? a : b; } + static portINLINE uint32_t FreeRTOS_max_uint32 (uint32_t a, uint32_t b) { return a >= b ? a : b; } + static portINLINE int32_t FreeRTOS_min_int32 (int32_t a, int32_t b) { return a <= b ? a : b; } + static portINLINE uint32_t FreeRTOS_min_uint32 (uint32_t a, uint32_t b) { return a <= b ? a : b; } + static portINLINE uint32_t FreeRTOS_round_up (uint32_t a, uint32_t d) { return d * ( ( a + d - 1u ) / d ); } + static portINLINE uint32_t FreeRTOS_round_down (uint32_t a, uint32_t d) { return d * ( a / d ); } + + static portINLINE BaseType_t FreeRTOS_max_BaseType (BaseType_t a, BaseType_t b) { return a >= b ? a : b; } + static portINLINE UBaseType_t FreeRTOS_max_UBaseType (UBaseType_t a, UBaseType_t b) { return a >= b ? a : b; } + static portINLINE BaseType_t FreeRTOS_min_BaseType (BaseType_t a, BaseType_t b) { return a <= b ? a : b; } + static portINLINE UBaseType_t FreeRTOS_min_UBaseType (UBaseType_t a, UBaseType_t b) { return a <= b ? a : b; } + +#else + + #define FreeRTOS_max_int32(a,b) ( ( ( int32_t ) ( a ) ) >= ( ( int32_t ) ( b ) ) ? ( ( int32_t ) ( a ) ) : ( ( int32_t ) ( b ) ) ) + #define FreeRTOS_max_uint32(a,b) ( ( ( uint32_t ) ( a ) ) >= ( ( uint32_t ) ( b ) ) ? ( ( uint32_t ) ( a ) ) : ( ( uint32_t ) ( b ) ) ) + + #define FreeRTOS_min_int32(a,b) ( ( ( int32_t ) a ) <= ( ( int32_t ) b ) ? ( ( int32_t ) a ) : ( ( int32_t ) b ) ) + #define FreeRTOS_min_uint32(a,b) ( ( ( uint32_t ) a ) <= ( ( uint32_t ) b ) ? ( ( uint32_t ) a ) : ( ( uint32_t ) b ) ) + + /* Round-up: a = d * ( ( a + d - 1 ) / d ) */ + #define FreeRTOS_round_up(a,d) ( ( ( uint32_t ) ( d ) ) * ( ( ( ( uint32_t ) ( a ) ) + ( ( uint32_t ) ( d ) ) - 1UL ) / ( ( uint32_t ) ( d ) ) ) ) + #define FreeRTOS_round_down(a,d) ( ( ( uint32_t ) ( d ) ) * ( ( ( uint32_t ) ( a ) ) / ( ( uint32_t ) ( d ) ) ) ) + + #define FreeRTOS_ms_to_tick(ms) ( ( ms * configTICK_RATE_HZ + 500 ) / 1000 ) + + #define FreeRTOS_max_BaseType(a, b) ( ( ( BaseType_t ) ( a ) ) >= ( ( BaseType_t ) ( b ) ) ? ( ( BaseType_t ) ( a ) ) : ( ( BaseType_t ) ( b ) ) ) + #define FreeRTOS_max_UBaseType(a, b) ( ( ( UBaseType_t ) ( a ) ) >= ( ( UBaseType_t ) ( b ) ) ? ( ( UBaseType_t ) ( a ) ) : ( ( UBaseType_t ) ( b ) ) ) + #define FreeRTOS_min_BaseType(a, b) ( ( ( BaseType_t ) ( a ) ) <= ( ( BaseType_t ) ( b ) ) ? ( ( BaseType_t ) ( a ) ) : ( ( BaseType_t ) ( b ) ) ) + #define FreeRTOS_min_UBaseType(a, b) ( ( ( UBaseType_t ) ( a ) ) <= ( ( UBaseType_t ) ( b ) ) ? ( ( UBaseType_t ) ( a ) ) : ( ( UBaseType_t ) ( b ) ) ) + +#endif /* ipconfigHAS_INLINE_FUNCTIONS */ + +#define pdMS_TO_MIN_TICKS( xTimeInMs ) ( pdMS_TO_TICKS( ( xTimeInMs ) ) < ( ( TickType_t ) 1 ) ? ( ( TickType_t ) 1 ) : pdMS_TO_TICKS( ( xTimeInMs ) ) ) + +#ifndef pdTRUE_SIGNED + /* Temporary solution: eventually the defines below will appear in 'Source\include\projdefs.h' */ + #define pdTRUE_SIGNED pdTRUE + #define pdFALSE_SIGNED pdFALSE + #define pdTRUE_UNSIGNED ( ( UBaseType_t ) 1u ) + #define pdFALSE_UNSIGNED ( ( UBaseType_t ) 0u ) +#endif + +/* + * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE + * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_TCP_API_Functions.html + */ +BaseType_t FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], + const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], + const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], + const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], + const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ); + +void * FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ); +void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetMask, uint32_t *pulGatewayAddress, uint32_t *pulDNSServerAddress ); +void FreeRTOS_SetAddressConfiguration( const uint32_t *pulIPAddress, const uint32_t *pulNetMask, const uint32_t *pulGatewayAddress, const uint32_t *pulDNSServerAddress ); +BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks ); +void FreeRTOS_ReleaseUDPPayloadBuffer( void *pvBuffer ); +const uint8_t * FreeRTOS_GetMACAddress( void ); +void FreeRTOS_UpdateMACAddress( const uint8_t ucMACAddress[ipMAC_ADDRESS_LENGTH_BYTES] ); +void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent ); +void vApplicationPingReplyHook( ePingReplyStatus_t eStatus, uint16_t usIdentifier ); +uint32_t FreeRTOS_GetIPAddress( void ); +void FreeRTOS_SetIPAddress( uint32_t ulIPAddress ); +void FreeRTOS_SetNetmask( uint32_t ulNetmask ); +void FreeRTOS_SetGatewayAddress( uint32_t ulGatewayAddress ); +uint32_t FreeRTOS_GetGatewayAddress( void ); +uint32_t FreeRTOS_GetDNSServerAddress( void ); +uint32_t FreeRTOS_GetNetmask( void ); +void FreeRTOS_OutputARPRequest( uint32_t ulIPAddress ); +BaseType_t FreeRTOS_IsNetworkUp( void ); + +#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + UBaseType_t uxGetMinimumIPQueueSpace( void ); +#endif + +/* + * Defined in FreeRTOS_Sockets.c + * //_RB_ Don't think this comment is correct. If this is for internal use only it should appear after all the public API functions and not start with FreeRTOS_. + * Socket has had activity, reset the timer so it will not be closed + * because of inactivity + */ +const char *FreeRTOS_GetTCPStateName( UBaseType_t ulState); + +/* _HT_ Temporary: show all valid ARP entries + */ +void FreeRTOS_PrintARPCache( void ); +void FreeRTOS_ClearARP( void ); + +#if( ipconfigDHCP_REGISTER_HOSTNAME == 1 ) + + /* DHCP has an option for clients to register their hostname. It doesn't + have much use, except that a device can be found in a router along with its + name. If this option is used the callback below must be provided by the + application writer to return a const string, denoting the device's name. */ + const char *pcApplicationHostnameHook( void ); + +#endif /* ipconfigDHCP_REGISTER_HOSTNAME */ + + +/* This xApplicationGetRandomNumber() will set *pulNumber to a random number, +and return pdTRUE. When the random number generator is broken, it shall return +pdFALSE. +The function is defined in 'iot_secure_sockets.c'. +If that module is not included in the project, the application must provide an +implementation of it. +The macro's ipconfigRAND32() and configRAND32() are not in use anymore. */ +BaseType_t xApplicationGetRandomNumber( uint32_t *pulNumber ); + +/* For backward compatibility define old structure names to the newer equivalent +structure name. */ +#ifndef ipconfigENABLE_BACKWARD_COMPATIBILITY + #define ipconfigENABLE_BACKWARD_COMPATIBILITY 1 +#endif + +#if( ipconfigENABLE_BACKWARD_COMPATIBILITY == 1 ) + #define xIPStackEvent_t IPStackEvent_t + #define xNetworkBufferDescriptor_t NetworkBufferDescriptor_t + #define xMACAddress_t MACAddress_t + #define xWinProperties_t WinProperties_t + #define xSocket_t Socket_t + #define xSocketSet_t SocketSet_t + #define ipSIZE_OF_IP_HEADER ipSIZE_OF_IPv4_HEADER + + /* Since August 2016, the public types and fields below have changed name: + abbreviations TCP/UDP are now written in capitals, and type names now end with "_t". */ + #define FOnConnected FOnConnected_t + #define FOnTcpReceive FOnTCPReceive_t + #define FOnTcpSent FOnTCPSent_t + #define FOnUdpReceive FOnUDPReceive_t + #define FOnUdpSent FOnUDPSent_t + + #define pOnTcpConnected pxOnTCPConnected + #define pOnTcpReceive pxOnTCPReceive + #define pOnTcpSent pxOnTCPSent + #define pOnUdpReceive pxOnUDPReceive + #define pOnUdpSent pxOnUDPSent + + #define FOnUdpSent FOnUDPSent_t + #define FOnTcpSent FOnTCPSent_t +#endif /* ipconfigENABLE_BACKWARD_COMPATIBILITY */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* FREERTOS_IP_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP_Private.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP_Private.h index 8604abed0..0d8c03872 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP_Private.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP_Private.h @@ -1,827 +1,827 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_IP_PRIVATE_H -#define FREERTOS_IP_PRIVATE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Application level configuration options. */ -#include "FreeRTOSIPConfig.h" -#include "FreeRTOSIPConfigDefaults.h" -#include "FreeRTOS_Sockets.h" -#include "IPTraceMacroDefaults.h" -#include "FreeRTOS_Stream_Buffer.h" -#if( ipconfigUSE_TCP == 1 ) - #include "FreeRTOS_TCP_WIN.h" - #include "FreeRTOS_TCP_IP.h" -#endif - -#include "event_groups.h" - -typedef struct xNetworkAddressingParameters -{ - uint32_t ulDefaultIPAddress; - uint32_t ulNetMask; - uint32_t ulGatewayAddress; - uint32_t ulDNSServerAddress; - uint32_t ulBroadcastAddress; -} NetworkAddressingParameters_t; - -extern BaseType_t xTCPWindowLoggingLevel; - -/*-----------------------------------------------------------*/ -/* Protocol headers. */ -/*-----------------------------------------------------------*/ - -#include "pack_struct_start.h" -struct xETH_HEADER -{ - MACAddress_t xDestinationAddress; /* 0 + 6 = 6 */ - MACAddress_t xSourceAddress; /* 6 + 6 = 12 */ - uint16_t usFrameType; /* 12 + 2 = 14 */ -} -#include "pack_struct_end.h" -typedef struct xETH_HEADER EthernetHeader_t; - -#include "pack_struct_start.h" -struct xARP_HEADER -{ - uint16_t usHardwareType; /* 0 + 2 = 2 */ - uint16_t usProtocolType; /* 2 + 2 = 4 */ - uint8_t ucHardwareAddressLength; /* 4 + 1 = 5 */ - uint8_t ucProtocolAddressLength; /* 5 + 1 = 6 */ - uint16_t usOperation; /* 6 + 2 = 8 */ - MACAddress_t xSenderHardwareAddress; /* 8 + 6 = 14 */ - uint8_t ucSenderProtocolAddress[ 4 ]; /* 14 + 4 = 18 */ - MACAddress_t xTargetHardwareAddress; /* 18 + 6 = 24 */ - uint32_t ulTargetProtocolAddress; /* 24 + 4 = 28 */ -} -#include "pack_struct_end.h" -typedef struct xARP_HEADER ARPHeader_t; - -#include "pack_struct_start.h" -struct xIP_HEADER -{ - uint8_t ucVersionHeaderLength; /* 0 + 1 = 1 */ - uint8_t ucDifferentiatedServicesCode; /* 1 + 1 = 2 */ - uint16_t usLength; /* 2 + 2 = 4 */ - uint16_t usIdentification; /* 4 + 2 = 6 */ - uint16_t usFragmentOffset; /* 6 + 2 = 8 */ - uint8_t ucTimeToLive; /* 8 + 1 = 9 */ - uint8_t ucProtocol; /* 9 + 1 = 10 */ - uint16_t usHeaderChecksum; /* 10 + 2 = 12 */ - uint32_t ulSourceIPAddress; /* 12 + 4 = 16 */ - uint32_t ulDestinationIPAddress; /* 16 + 4 = 20 */ -} -#include "pack_struct_end.h" -typedef struct xIP_HEADER IPHeader_t; - -#include "pack_struct_start.h" -struct xIGMP_HEADER -{ - uint8_t ucVersionType; /* 0 + 1 = 1 */ - uint8_t ucMaxResponseTime; /* 1 + 1 = 2 */ - uint16_t usChecksum; /* 2 + 2 = 4 */ - uint32_t usGroupAddress; /* 4 + 4 = 8 */ -} -#include "pack_struct_end.h" -typedef struct xIGMP_HEADER IGMPHeader_t; - -#include "pack_struct_start.h" -struct xICMP_HEADER -{ - uint8_t ucTypeOfMessage; /* 0 + 1 = 1 */ - uint8_t ucTypeOfService; /* 1 + 1 = 2 */ - uint16_t usChecksum; /* 2 + 2 = 4 */ - uint16_t usIdentifier; /* 4 + 2 = 6 */ - uint16_t usSequenceNumber; /* 6 + 2 = 8 */ -} -#include "pack_struct_end.h" -typedef struct xICMP_HEADER ICMPHeader_t; - -#include "pack_struct_start.h" -struct xUDP_HEADER -{ - uint16_t usSourcePort; /* 0 + 2 = 2 */ - uint16_t usDestinationPort; /* 2 + 2 = 4 */ - uint16_t usLength; /* 4 + 2 = 6 */ - uint16_t usChecksum; /* 6 + 2 = 8 */ -} -#include "pack_struct_end.h" -typedef struct xUDP_HEADER UDPHeader_t; - -#include "pack_struct_start.h" -struct xTCP_HEADER -{ - uint16_t usSourcePort; /* + 2 = 2 */ - uint16_t usDestinationPort; /* + 2 = 4 */ - uint32_t ulSequenceNumber; /* + 4 = 8 */ - uint32_t ulAckNr; /* + 4 = 12 */ - uint8_t ucTCPOffset; /* + 1 = 13 */ - uint8_t ucTCPFlags; /* + 1 = 14 */ - uint16_t usWindow; /* + 2 = 15 */ - uint16_t usChecksum; /* + 2 = 18 */ - uint16_t usUrgent; /* + 2 = 20 */ -#if ipconfigUSE_TCP == 1 - /* the option data is not a part of the TCP header */ - uint8_t ucOptdata[ipSIZE_TCP_OPTIONS]; /* + 12 = 32 */ -#endif -} -#include "pack_struct_end.h" -typedef struct xTCP_HEADER TCPHeader_t; - -#include "pack_struct_start.h" -struct xPSEUDO_HEADER -{ - uint32_t ulSourceAddress; - uint32_t ulDestinationAddress; - uint8_t ucZeros; - uint8_t ucProtocol; - uint16_t usUDPLength; -} -#include "pack_struct_end.h" -typedef struct xPSEUDO_HEADER PseudoHeader_t; - -/*-----------------------------------------------------------*/ -/* Nested protocol packets. */ -/*-----------------------------------------------------------*/ - -#include "pack_struct_start.h" -struct xARP_PACKET -{ - EthernetHeader_t xEthernetHeader; /* 0 + 14 = 14 */ - ARPHeader_t xARPHeader; /* 14 + 28 = 42 */ -} -#include "pack_struct_end.h" -typedef struct xARP_PACKET ARPPacket_t; - -#include "pack_struct_start.h" -struct xIP_PACKET -{ - EthernetHeader_t xEthernetHeader; - IPHeader_t xIPHeader; -} -#include "pack_struct_end.h" -typedef struct xIP_PACKET IPPacket_t; - -#include "pack_struct_start.h" -struct xICMP_PACKET -{ - EthernetHeader_t xEthernetHeader; - IPHeader_t xIPHeader; - ICMPHeader_t xICMPHeader; -} -#include "pack_struct_end.h" -typedef struct xICMP_PACKET ICMPPacket_t; - -#include "pack_struct_start.h" -struct xUDP_PACKET -{ - EthernetHeader_t xEthernetHeader; /* 0 + 14 = 14 */ - IPHeader_t xIPHeader; /* 14 + 20 = 34 */ - UDPHeader_t xUDPHeader; /* 34 + 8 = 42 */ -} -#include "pack_struct_end.h" -typedef struct xUDP_PACKET UDPPacket_t; - -#include "pack_struct_start.h" -struct xTCP_PACKET -{ - EthernetHeader_t xEthernetHeader; /* 0 + 14 = 14 */ - IPHeader_t xIPHeader; /* 14 + 20 = 34 */ - TCPHeader_t xTCPHeader; /* 34 + 32 = 66 */ -} -#include "pack_struct_end.h" -typedef struct xTCP_PACKET TCPPacket_t; - -typedef union XPROT_PACKET -{ - ARPPacket_t xARPPacket; - TCPPacket_t xTCPPacket; - UDPPacket_t xUDPPacket; - ICMPPacket_t xICMPPacket; -} ProtocolPacket_t; - - -/* The maximum UDP payload length. */ -#define ipMAX_UDP_PAYLOAD_LENGTH ( ( ipconfigNETWORK_MTU - ipSIZE_OF_IPv4_HEADER ) - ipSIZE_OF_UDP_HEADER ) - -typedef enum -{ - eReleaseBuffer = 0, /* Processing the frame did not find anything to do - just release the buffer. */ - eProcessBuffer, /* An Ethernet frame has a valid address - continue process its contents. */ - eReturnEthernetFrame, /* The Ethernet frame contains an ARP or ICMP packet that can be returned to its source. */ - eFrameConsumed /* Processing the Ethernet packet contents resulted in the payload being sent to the stack. */ -} eFrameProcessingResult_t; - -typedef enum -{ - eNoEvent = -1, - eNetworkDownEvent, /* 0: The network interface has been lost and/or needs [re]connecting. */ - eNetworkRxEvent, /* 1: The network interface has queued a received Ethernet frame. */ - eNetworkTxEvent, /* 2: Let the IP-task send a network packet. */ - eARPTimerEvent, /* 3: The ARP timer expired. */ - eStackTxEvent, /* 4: The software stack has queued a packet to transmit. */ - eDHCPEvent, /* 5: Process the DHCP state machine. */ - eTCPTimerEvent, /* 6: See if any TCP socket needs attention. */ - eTCPAcceptEvent, /* 7: Client API FreeRTOS_accept() waiting for client connections. */ - eTCPNetStat, /* 8: IP-task is asked to produce a netstat listing. */ - eSocketBindEvent, /* 9: Send a message to the IP-task to bind a socket to a port. */ - eSocketCloseEvent, /*10: Send a message to the IP-task to close a socket. */ - eSocketSelectEvent, /*11: Send a message to the IP-task for select(). */ - eSocketSignalEvent, /*12: A socket must be signalled. */ -} eIPEvent_t; - -typedef struct IP_TASK_COMMANDS -{ - eIPEvent_t eEventType; - void *pvData; -} IPStackEvent_t; - -#define ipBROADCAST_IP_ADDRESS 0xffffffffUL - -/* Offset into the Ethernet frame that is used to temporarily store information -on the fragmentation status of the packet being sent. The value is important, -as it is past the location into which the destination address will get placed. */ -#define ipFRAGMENTATION_PARAMETERS_OFFSET ( 6 ) -#define ipSOCKET_OPTIONS_OFFSET ( 6 ) - -/* Only used when outgoing fragmentation is being used (FreeRTOSIPConfig.h -setting. */ -#define ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT( usFragmentOffset ) ( ( ( usFragmentOffset ) == 0 ) ? ipUDP_PAYLOAD_OFFSET_IPv4 : ipIP_PAYLOAD_OFFSET ) - -/* The offset into a UDP packet at which the UDP data (payload) starts. */ -#define ipUDP_PAYLOAD_OFFSET_IPv4 ( sizeof( UDPPacket_t ) ) - -/* The offset into an IP packet into which the IP data (payload) starts. */ -#define ipIP_PAYLOAD_OFFSET ( sizeof( IPPacket_t ) ) - -#include "pack_struct_start.h" -struct xUDP_IP_FRAGMENT_PARAMETERS -{ - uint8_t ucSocketOptions; - uint8_t ucPadFor16BitAlignment; - uint16_t usFragmentedPacketOffset; - uint16_t usFragmentLength; - uint16_t usPayloadChecksum; -} -#include "pack_struct_end.h" -typedef struct xUDP_IP_FRAGMENT_PARAMETERS IPFragmentParameters_t; - -#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) - - /* Ethernet frame types. */ - #define ipARP_FRAME_TYPE ( 0x0608U ) - #define ipIPv4_FRAME_TYPE ( 0x0008U ) - - /* ARP related definitions. */ - #define ipARP_PROTOCOL_TYPE ( 0x0008U ) - #define ipARP_HARDWARE_TYPE_ETHERNET ( 0x0100U ) - #define ipARP_REQUEST ( 0x0100U ) - #define ipARP_REPLY ( 0x0200U ) - -#else - - /* Ethernet frame types. */ - #define ipARP_FRAME_TYPE ( 0x0806U ) - #define ipIPv4_FRAME_TYPE ( 0x0800U ) - - /* ARP related definitions. */ - #define ipARP_PROTOCOL_TYPE ( 0x0800U ) - #define ipARP_HARDWARE_TYPE_ETHERNET ( 0x0001U ) - #define ipARP_REQUEST ( 0x0001 ) - #define ipARP_REPLY ( 0x0002 ) - -#endif /* ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN */ - - -/* For convenience, a MAC address of all zeros and another of all 0xffs are -defined const for quick reference. */ -extern const MACAddress_t xBroadcastMACAddress; /* all 0xff's */ -extern uint16_t usPacketIdentifier; - -/* Define a default UDP packet header (declared in FreeRTOS_UDP_IP.c) */ -typedef union xUDPPacketHeader -{ - uint8_t ucBytes[24]; - uint32_t ulWords[6]; -} UDPPacketHeader_t; -extern UDPPacketHeader_t xDefaultPartUDPPacketHeader; - -/* Structure that stores the netmask, gateway address and DNS server addresses. */ -extern NetworkAddressingParameters_t xNetworkAddressing; - -/* Structure that stores the defaults for netmask, gateway address and DNS. -These values will be copied to 'xNetworkAddressing' in case DHCP is not used, -and also in case DHCP does not lead to a confirmed request. */ -extern NetworkAddressingParameters_t xDefaultAddressing; - -/* True when BufferAllocation_1.c was included, false for BufferAllocation_2.c */ -extern const BaseType_t xBufferAllocFixedSize; - -/* Defined in FreeRTOS_Sockets.c */ -#if ( ipconfigUSE_TCP == 1 ) - extern List_t xBoundTCPSocketsList; -#endif - -/* The local IP address is accessed from within xDefaultPartUDPPacketHeader, -rather than duplicated in its own variable. */ -#define ipLOCAL_IP_ADDRESS_POINTER ( ( uint32_t * ) &( xDefaultPartUDPPacketHeader.ulWords[ 20u / sizeof(uint32_t) ] ) ) - -/* The local MAC address is accessed from within xDefaultPartUDPPacketHeader, -rather than duplicated in its own variable. */ -#define ipLOCAL_MAC_ADDRESS ( &xDefaultPartUDPPacketHeader.ucBytes[0] ) - -/* ICMP packets are sent using the same function as UDP packets. The port -number is used to distinguish between the two, as 0 is an invalid UDP port. */ -#define ipPACKET_CONTAINS_ICMP_DATA ( 0 ) - -/* For now, the lower 8 bits in 'xEventBits' will be reserved for the above -socket events. */ -#define SOCKET_EVENT_BIT_COUNT 8 - -#define vSetField16( pxBase, xType, xField, usValue ) \ -{ \ - ( ( uint8_t* )( pxBase ) ) [ offsetof( xType, xField ) + 0 ] = ( uint8_t ) ( ( usValue ) >> 8 ); \ - ( ( uint8_t* )( pxBase ) ) [ offsetof( xType, xField ) + 1 ] = ( uint8_t ) ( ( usValue ) & 0xff ); \ -} - -#define vSetField32( pxBase, xType, xField, ulValue ) \ -{ \ - ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 0 ] = ( uint8_t ) ( ( ulValue ) >> 24 ); \ - ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 1 ] = ( uint8_t ) ( ( ( ulValue ) >> 16 ) & 0xff ); \ - ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 2 ] = ( uint8_t ) ( ( ( ulValue ) >> 8 ) & 0xff ); \ - ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 3 ] = ( uint8_t ) ( ( ulValue ) & 0xff ); \ -} - -#define vFlip_16( left, right ) \ - do { \ - uint16_t tmp = (left); \ - (left) = (right); \ - (right) = tmp; \ - } while (0) - -#define vFlip_32( left, right ) \ - do { \ - uint32_t tmp = (left); \ - (left) = (right); \ - (right) = tmp; \ - } while (0) - -#ifndef ARRAY_SIZE - #define ARRAY_SIZE(x) (BaseType_t)(sizeof(x)/sizeof(x)[0]) -#endif - -/* - * A version of FreeRTOS_GetReleaseNetworkBuffer() that can be called from an - * interrupt. If a non zero value is returned, then the calling ISR should - * perform a context switch before exiting the ISR. - */ -BaseType_t FreeRTOS_ReleaseFreeNetworkBufferFromISR( void ); - -/* - * Create a message that contains a command to initialise the network interface. - * This is used during initialisation, and at any time the network interface - * goes down thereafter. The network interface hardware driver is responsible - * for sending the message that contains the network interface down command/ - * event. - * - * Only use the FreeRTOS_NetworkDownFromISR() version if the function is to be - * called from an interrupt service routine. If FreeRTOS_NetworkDownFromISR() - * returns a non-zero value then a context switch should be performed ebfore - * the interrupt is exited. - */ -void FreeRTOS_NetworkDown( void ); -BaseType_t FreeRTOS_NetworkDownFromISR( void ); - -/* - * Processes incoming ARP packets. - */ -eFrameProcessingResult_t eARPProcessPacket( ARPPacket_t * const pxARPFrame ); - -/* - * Inspect an Ethernet frame to see if it contains data that the stack needs to - * process. eProcessBuffer is returned if the frame should be processed by the - * stack. eReleaseBuffer is returned if the frame should be discarded. - */ -eFrameProcessingResult_t eConsiderFrameForProcessing( const uint8_t * const pucEthernetBuffer ); - -/* - * Return the checksum generated over xDataLengthBytes from pucNextData. - */ -uint16_t usGenerateChecksum( uint32_t ulSum, const uint8_t * pucNextData, size_t uxDataLengthBytes ); - -/* Socket related private functions. */ - -/* - * The caller must ensure that pxNetworkBuffer->xDataLength is the UDP packet - * payload size (excluding packet headers) and that the packet in pucEthernetBuffer - * is at least the size of UDPPacket_t. - */ -BaseType_t xProcessReceivedUDPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ); - -/* - * Initialize the socket list data structures for TCP and UDP. - */ -BaseType_t vNetworkSocketsInit( void ); - -/* - * Returns pdTRUE if the IP task has been created and is initialised. Otherwise - * returns pdFALSE. - */ -BaseType_t xIPIsNetworkTaskReady( void ); - -#if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) - struct xSOCKET; - typedef void (*SocketWakeupCallback_t)( struct xSOCKET * pxSocket ); -#endif - -#if( ipconfigUSE_TCP == 1 ) - - /* - * Actually a user thing, but because xBoundTCPSocketsList, let it do by the - * IP-task - */ - void vTCPNetStat( void ); - - /* - * At least one socket needs to check for timeouts - */ - TickType_t xTCPTimerCheck( BaseType_t xWillSleep ); - - /* Every TCP socket has a buffer space just big enough to store - the last TCP header received. - As a reference of this field may be passed to DMA, force the - alignment to 8 bytes. */ - typedef union - { - struct - { - /* Increase the alignment of this union by adding a 64-bit variable. */ - uint64_t ullAlignmentWord; - } a; - struct - { - /* The next field only serves to give 'ucLastPacket' a correct - alignment of 8 + 2. See comments in FreeRTOS_IP.h */ - uint8_t ucFillPacket[ ipconfigPACKET_FILLER_SIZE ]; - uint8_t ucLastPacket[ sizeof( TCPPacket_t ) ]; - } u; - } LastTCPPacket_t; - - /* - * Note that the values of all short and long integers in these structs - * are being stored in the native-endian way - * Translation should take place when accessing any structure which defines - * network packets, such as IPHeader_t and TCPHeader_t - */ - typedef struct TCPSOCKET - { - uint32_t ulRemoteIP; /* IP address of remote machine */ - uint16_t usRemotePort; /* Port on remote machine */ - struct { - /* Most compilers do like bit-flags */ - uint32_t - bMssChange : 1, /* This socket has seen a change in MSS */ - bPassAccept : 1, /* when true, this socket may be returned in a call to accept() */ - bPassQueued : 1, /* when true, this socket is an orphan until it gets connected - * Why an orphan? Because it may not be returned in a accept() call until it - * gets the state eESTABLISHED */ - bReuseSocket : 1, /* When a listening socket gets a connection, do not create a new instance but keep on using it */ - bCloseAfterSend : 1,/* As soon as the last byte has been transmitted, finalise the connection - * Useful in e.g. FTP connections, where the last data bytes are sent along with the FIN flag */ - bUserShutdown : 1, /* User requesting a graceful shutdown */ - bCloseRequested : 1,/* Request to finalise the connection */ - bLowWater : 1, /* high-water level has been reached. Cleared as soon as 'rx-count < lo-water' */ - bWinChange : 1, /* The value of bLowWater has changed, must send a window update */ - bSendKeepAlive : 1, /* When this flag is true, a TCP keep-alive message must be send */ - bWaitKeepAlive : 1, /* When this flag is true, a TCP keep-alive reply is expected */ - bConnPrepared : 1, /* Connecting socket: Message has been prepared */ - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - bConnPassed : 1, /* Connecting socket: Socket has been passed in a successful select() */ - #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ - bFinAccepted : 1, /* This socket has received (or sent) a FIN and accepted it */ - bFinSent : 1, /* We've sent out a FIN */ - bFinRecv : 1, /* We've received a FIN from our peer */ - bFinAcked : 1, /* Our FIN packet has been acked */ - bFinLast : 1, /* The last ACK (after FIN and FIN+ACK) has been sent or will be sent by the peer */ - bRxStopped : 1, /* Application asked to temporarily stop reception */ - bMallocError : 1, /* There was an error allocating a stream */ - bWinScaling : 1; /* A TCP-Window Scaling option was offered and accepted in the SYN phase. */ - } bits; - uint32_t ulHighestRxAllowed; - /* The highest sequence number that we can receive at any moment */ - uint16_t usTimeout; /* Time (in ticks) after which this socket needs attention */ - uint16_t usCurMSS; /* Current Maximum Segment Size */ - uint16_t usInitMSS; /* Initial maximum segment Size */ - uint16_t usChildCount; /* In case of a listening socket: number of connections on this port number */ - uint16_t usBacklog; /* In case of a listening socket: maximum number of concurrent connections on this port number */ - uint8_t ucRepCount; /* Send repeat count, for retransmissions - * This counter is separate from the xmitCount in the - * TCP win segments */ - uint8_t ucTCPState; /* TCP state: see eTCP_STATE */ - struct xSOCKET *pxPeerSocket; /* for server socket: child, for child socket: parent */ - #if( ipconfigTCP_KEEP_ALIVE == 1 ) - uint8_t ucKeepRepCount; - TickType_t xLastAliveTime; - #endif /* ipconfigTCP_KEEP_ALIVE */ - #if( ipconfigTCP_HANG_PROTECTION == 1 ) - TickType_t xLastActTime; - #endif /* ipconfigTCP_HANG_PROTECTION */ - size_t uxLittleSpace; - size_t uxEnoughSpace; - size_t uxRxStreamSize; - size_t uxTxStreamSize; - StreamBuffer_t *rxStream; - StreamBuffer_t *txStream; - #if( ipconfigUSE_TCP_WIN == 1 ) - NetworkBufferDescriptor_t *pxAckMessage; - #endif /* ipconfigUSE_TCP_WIN */ - /* Buffer space to store the last TCP header received. */ - LastTCPPacket_t xPacket; - uint8_t tcpflags; /* TCP flags */ - #if( ipconfigUSE_TCP_WIN != 0 ) - uint8_t ucMyWinScaleFactor; - uint8_t ucPeerWinScaleFactor; - #endif - #if( ipconfigUSE_CALLBACKS == 1 ) - FOnTCPReceive_t pxHandleReceive; /* - * In case of a TCP socket: - * typedef void (* FOnTCPReceive_t) (Socket_t xSocket, void *pData, size_t xLength ); - */ - FOnTCPSent_t pxHandleSent; - FOnConnected_t pxHandleConnected; /* Actually type: typedef void (* FOnConnected_t) (Socket_t xSocket, BaseType_t ulConnected ); */ - #endif /* ipconfigUSE_CALLBACKS */ - uint32_t ulWindowSize; /* Current Window size advertised by peer */ - size_t uxRxWinSize; /* Fixed value: size of the TCP reception window */ - size_t uxTxWinSize; /* Fixed value: size of the TCP transmit window */ - - TCPWindow_t xTCPWindow; - } IPTCPSocket_t; - -#endif /* ipconfigUSE_TCP */ - -typedef struct UDPSOCKET -{ - List_t xWaitingPacketsList; /* Incoming packets */ - #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) - UBaseType_t uxMaxPackets; /* Protection: limits the number of packets buffered per socket */ - #endif /* ipconfigUDP_MAX_RX_PACKETS */ - #if( ipconfigUSE_CALLBACKS == 1 ) - FOnUDPReceive_t pxHandleReceive; /* - * In case of a UDP socket: - * typedef void (* FOnUDPReceive_t) (Socket_t xSocket, void *pData, size_t xLength, struct freertos_sockaddr *pxAddr ); - */ - FOnUDPSent_t pxHandleSent; - #endif /* ipconfigUSE_CALLBACKS */ -} IPUDPSocket_t; - -typedef enum eSOCKET_EVENT { - eSOCKET_RECEIVE = 0x0001, - eSOCKET_SEND = 0x0002, - eSOCKET_ACCEPT = 0x0004, - eSOCKET_CONNECT = 0x0008, - eSOCKET_BOUND = 0x0010, - eSOCKET_CLOSED = 0x0020, - eSOCKET_INTR = 0x0040, - eSOCKET_ALL = 0x007F, -} eSocketEvent_t; - -typedef struct xSOCKET -{ - EventBits_t xEventBits; - EventGroupHandle_t xEventGroup; - - ListItem_t xBoundSocketListItem; /* Used to reference the socket from a bound sockets list. */ - TickType_t xReceiveBlockTime; /* if recv[to] is called while no data is available, wait this amount of time. Unit in clock-ticks */ - TickType_t xSendBlockTime; /* if send[to] is called while there is not enough space to send, wait this amount of time. Unit in clock-ticks */ - - uint16_t usLocalPort; /* Local port on this machine */ - uint8_t ucSocketOptions; - uint8_t ucProtocol; /* choice of FREERTOS_IPPROTO_UDP/TCP */ - #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) - SemaphoreHandle_t pxUserSemaphore; - #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ - #if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) - SocketWakeupCallback_t pxUserWakeCallback; - #endif /* ipconfigSOCKET_HAS_USER_WAKE_CALLBACK */ - - #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - struct xSOCKET_SET *pxSocketSet; - /* User may indicate which bits are interesting for this socket. */ - EventBits_t xSelectBits; - /* These bits indicate the events which have actually occurred. - They are maintained by the IP-task */ - EventBits_t xSocketBits; - #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ - /* TCP/UDP specific fields: */ - /* Before accessing any member of this structure, it should be confirmed */ - /* that the protocol corresponds with the type of structure */ - - union - { - IPUDPSocket_t xUDP; - #if( ipconfigUSE_TCP == 1 ) - IPTCPSocket_t xTCP; - /* Make sure that xTCP is 8-bytes aligned by - declaring a 64-bit variable in the same union */ - uint64_t ullTCPAlignment; - #endif /* ipconfigUSE_TCP */ - } u; -} FreeRTOS_Socket_t; - -#if( ipconfigUSE_TCP == 1 ) - /* - * Lookup a TCP socket, using a multiple matching: both port numbers and - * return IP address. - */ - FreeRTOS_Socket_t *pxTCPSocketLookup( uint32_t ulLocalIP, UBaseType_t uxLocalPort, uint32_t ulRemoteIP, UBaseType_t uxRemotePort ); - -#endif /* ipconfigUSE_TCP */ - -/* - * Look up a local socket by finding a match with the local port. - */ -FreeRTOS_Socket_t *pxUDPSocketLookup( UBaseType_t uxLocalPort ); - -/* - * Called when the application has generated a UDP packet to send. - */ -void vProcessGeneratedUDPPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ); - -/* - * Calculate the upper-layer checksum - * Works both for UDP, ICMP and TCP packages - * bOut = true: checksum will be set in outgoing packets - * bOut = false: checksum will be calculated for incoming packets - * returning 0xffff means: checksum was correct - */ -uint16_t usGenerateProtocolChecksum( const uint8_t * const pucEthernetBuffer, size_t uxBufferLength, BaseType_t xOutgoingPacket ); - -/* - * An Ethernet frame has been updated (maybe it was an ARP request or a PING - * request?) and is to be sent back to its source. - */ -void vReturnEthernetFrame( NetworkBufferDescriptor_t * pxNetworkBuffer, BaseType_t xReleaseAfterSend ); - -/* - * The internal version of bind() - * If 'ulInternal' is true, it is called by the driver - * The TCP driver needs to bind a socket at the moment a listening socket - * creates a new connected socket - */ -BaseType_t vSocketBind( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr * pxAddress, size_t uxAddressLength, BaseType_t xInternal ); - -/* - * Internal function to add streaming data to a TCP socket. If ulIn == true, - * data will be added to the rxStream, otherwise to the tXStream. Normally data - * will be written with ulOffset == 0, meaning: at the end of the FIFO. When - * packet come in out-of-order, an offset will be used to put it in front and - * the head will not change yet. - */ -int32_t lTCPAddRxdata(FreeRTOS_Socket_t *pxSocket, size_t uxOffset, const uint8_t *pcData, uint32_t ulByteCount); - -/* - * Currently called for any important event. - */ -void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket ); - -/* - * Some helping function, their meaning should be clear - */ -static portINLINE uint32_t ulChar2u32 (const uint8_t *apChr); -static portINLINE uint32_t ulChar2u32 (const uint8_t *apChr) -{ - return ( ( ( uint32_t )apChr[0] ) << 24) | - ( ( ( uint32_t )apChr[1] ) << 16) | - ( ( ( uint32_t )apChr[2] ) << 8) | - ( ( ( uint32_t )apChr[3] ) ); -} - -static portINLINE uint16_t usChar2u16 (const uint8_t *apChr); -static portINLINE uint16_t usChar2u16 (const uint8_t *apChr) -{ - return ( uint16_t ) - ( ( ( ( uint32_t )apChr[0] ) << 8) | - ( ( ( uint32_t )apChr[1] ) ) ); -} - -/* Check a single socket for retransmissions and timeouts */ -BaseType_t xTCPSocketCheck( FreeRTOS_Socket_t *pxSocket ); - -BaseType_t xTCPCheckNewClient( FreeRTOS_Socket_t *pxSocket ); - -/* Defined in FreeRTOS_Sockets.c - * Close a socket - */ -void *vSocketClose( FreeRTOS_Socket_t *pxSocket ); - -/* - * Send the event eEvent to the IP task event queue, using a block time of - * zero. Return pdPASS if the message was sent successfully, otherwise return - * pdFALSE. -*/ -BaseType_t xSendEventToIPTask( eIPEvent_t eEvent ); - -/* - * The same as above, but a struct as a parameter, containing: - * eIPEvent_t eEventType; - * void *pvData; - */ -BaseType_t xSendEventStructToIPTask( const IPStackEvent_t *pxEvent, TickType_t xTimeout ); - -/* - * Returns a pointer to the original NetworkBuffer from a pointer to a UDP - * payload buffer. - */ -NetworkBufferDescriptor_t *pxUDPPayloadBuffer_to_NetworkBuffer( void *pvBuffer ); - -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - /* - * For the case where the network driver passes a buffer directly to a DMA - * descriptor, this function can be used to translate a 'network buffer' to - * a 'network buffer descriptor'. - */ - NetworkBufferDescriptor_t *pxPacketBuffer_to_NetworkBuffer( const void *pvBuffer ); -#endif - -/* - * Internal: Sets a new state for a TCP socket and performs the necessary - * actions like calling a OnConnected handler to notify the socket owner. - */ -#if( ipconfigUSE_TCP == 1 ) - void vTCPStateChange( FreeRTOS_Socket_t *pxSocket, enum eTCP_STATE eTCPState ); -#endif /* ipconfigUSE_TCP */ - -/*_RB_ Should this be part of the public API? */ -void FreeRTOS_netstat( void ); - -/* Returns pdTRUE is this function is called from the IP-task */ -BaseType_t xIsCallingFromIPTask( void ); - -#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) - -typedef struct xSOCKET_SET -{ - EventGroupHandle_t xSelectGroup; - BaseType_t bApiCalled; /* True if the API was calling the private vSocketSelect */ - FreeRTOS_Socket_t *pxSocket; -} SocketSelect_t; - -extern void vSocketSelect( SocketSelect_t *pxSocketSelect ); - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION */ - -void vIPSetDHCPTimerEnableState( BaseType_t xEnableState ); -void vIPReloadDHCPTimer( uint32_t ulLeaseTime ); -#if( ipconfigDNS_USE_CALLBACKS != 0 ) - void vIPReloadDNSTimer( uint32_t ulCheckTime ); - void vIPSetDnsTimerEnableState( BaseType_t xEnableState ); -#endif - -/* Send the network-up event and start the ARP timer. */ -void vIPNetworkUpCalls( void ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* FREERTOS_IP_PRIVATE_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_IP_PRIVATE_H +#define FREERTOS_IP_PRIVATE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Application level configuration options. */ +#include "FreeRTOSIPConfig.h" +#include "FreeRTOSIPConfigDefaults.h" +#include "FreeRTOS_Sockets.h" +#include "IPTraceMacroDefaults.h" +#include "FreeRTOS_Stream_Buffer.h" +#if( ipconfigUSE_TCP == 1 ) + #include "FreeRTOS_TCP_WIN.h" + #include "FreeRTOS_TCP_IP.h" +#endif + +#include "event_groups.h" + +typedef struct xNetworkAddressingParameters +{ + uint32_t ulDefaultIPAddress; + uint32_t ulNetMask; + uint32_t ulGatewayAddress; + uint32_t ulDNSServerAddress; + uint32_t ulBroadcastAddress; +} NetworkAddressingParameters_t; + +extern BaseType_t xTCPWindowLoggingLevel; + +/*-----------------------------------------------------------*/ +/* Protocol headers. */ +/*-----------------------------------------------------------*/ + +#include "pack_struct_start.h" +struct xETH_HEADER +{ + MACAddress_t xDestinationAddress; /* 0 + 6 = 6 */ + MACAddress_t xSourceAddress; /* 6 + 6 = 12 */ + uint16_t usFrameType; /* 12 + 2 = 14 */ +} +#include "pack_struct_end.h" +typedef struct xETH_HEADER EthernetHeader_t; + +#include "pack_struct_start.h" +struct xARP_HEADER +{ + uint16_t usHardwareType; /* 0 + 2 = 2 */ + uint16_t usProtocolType; /* 2 + 2 = 4 */ + uint8_t ucHardwareAddressLength; /* 4 + 1 = 5 */ + uint8_t ucProtocolAddressLength; /* 5 + 1 = 6 */ + uint16_t usOperation; /* 6 + 2 = 8 */ + MACAddress_t xSenderHardwareAddress; /* 8 + 6 = 14 */ + uint8_t ucSenderProtocolAddress[ 4 ]; /* 14 + 4 = 18 */ + MACAddress_t xTargetHardwareAddress; /* 18 + 6 = 24 */ + uint32_t ulTargetProtocolAddress; /* 24 + 4 = 28 */ +} +#include "pack_struct_end.h" +typedef struct xARP_HEADER ARPHeader_t; + +#include "pack_struct_start.h" +struct xIP_HEADER +{ + uint8_t ucVersionHeaderLength; /* 0 + 1 = 1 */ + uint8_t ucDifferentiatedServicesCode; /* 1 + 1 = 2 */ + uint16_t usLength; /* 2 + 2 = 4 */ + uint16_t usIdentification; /* 4 + 2 = 6 */ + uint16_t usFragmentOffset; /* 6 + 2 = 8 */ + uint8_t ucTimeToLive; /* 8 + 1 = 9 */ + uint8_t ucProtocol; /* 9 + 1 = 10 */ + uint16_t usHeaderChecksum; /* 10 + 2 = 12 */ + uint32_t ulSourceIPAddress; /* 12 + 4 = 16 */ + uint32_t ulDestinationIPAddress; /* 16 + 4 = 20 */ +} +#include "pack_struct_end.h" +typedef struct xIP_HEADER IPHeader_t; + +#include "pack_struct_start.h" +struct xIGMP_HEADER +{ + uint8_t ucVersionType; /* 0 + 1 = 1 */ + uint8_t ucMaxResponseTime; /* 1 + 1 = 2 */ + uint16_t usChecksum; /* 2 + 2 = 4 */ + uint32_t usGroupAddress; /* 4 + 4 = 8 */ +} +#include "pack_struct_end.h" +typedef struct xIGMP_HEADER IGMPHeader_t; + +#include "pack_struct_start.h" +struct xICMP_HEADER +{ + uint8_t ucTypeOfMessage; /* 0 + 1 = 1 */ + uint8_t ucTypeOfService; /* 1 + 1 = 2 */ + uint16_t usChecksum; /* 2 + 2 = 4 */ + uint16_t usIdentifier; /* 4 + 2 = 6 */ + uint16_t usSequenceNumber; /* 6 + 2 = 8 */ +} +#include "pack_struct_end.h" +typedef struct xICMP_HEADER ICMPHeader_t; + +#include "pack_struct_start.h" +struct xUDP_HEADER +{ + uint16_t usSourcePort; /* 0 + 2 = 2 */ + uint16_t usDestinationPort; /* 2 + 2 = 4 */ + uint16_t usLength; /* 4 + 2 = 6 */ + uint16_t usChecksum; /* 6 + 2 = 8 */ +} +#include "pack_struct_end.h" +typedef struct xUDP_HEADER UDPHeader_t; + +#include "pack_struct_start.h" +struct xTCP_HEADER +{ + uint16_t usSourcePort; /* + 2 = 2 */ + uint16_t usDestinationPort; /* + 2 = 4 */ + uint32_t ulSequenceNumber; /* + 4 = 8 */ + uint32_t ulAckNr; /* + 4 = 12 */ + uint8_t ucTCPOffset; /* + 1 = 13 */ + uint8_t ucTCPFlags; /* + 1 = 14 */ + uint16_t usWindow; /* + 2 = 15 */ + uint16_t usChecksum; /* + 2 = 18 */ + uint16_t usUrgent; /* + 2 = 20 */ +#if ipconfigUSE_TCP == 1 + /* the option data is not a part of the TCP header */ + uint8_t ucOptdata[ipSIZE_TCP_OPTIONS]; /* + 12 = 32 */ +#endif +} +#include "pack_struct_end.h" +typedef struct xTCP_HEADER TCPHeader_t; + +#include "pack_struct_start.h" +struct xPSEUDO_HEADER +{ + uint32_t ulSourceAddress; + uint32_t ulDestinationAddress; + uint8_t ucZeros; + uint8_t ucProtocol; + uint16_t usUDPLength; +} +#include "pack_struct_end.h" +typedef struct xPSEUDO_HEADER PseudoHeader_t; + +/*-----------------------------------------------------------*/ +/* Nested protocol packets. */ +/*-----------------------------------------------------------*/ + +#include "pack_struct_start.h" +struct xARP_PACKET +{ + EthernetHeader_t xEthernetHeader; /* 0 + 14 = 14 */ + ARPHeader_t xARPHeader; /* 14 + 28 = 42 */ +} +#include "pack_struct_end.h" +typedef struct xARP_PACKET ARPPacket_t; + +#include "pack_struct_start.h" +struct xIP_PACKET +{ + EthernetHeader_t xEthernetHeader; + IPHeader_t xIPHeader; +} +#include "pack_struct_end.h" +typedef struct xIP_PACKET IPPacket_t; + +#include "pack_struct_start.h" +struct xICMP_PACKET +{ + EthernetHeader_t xEthernetHeader; + IPHeader_t xIPHeader; + ICMPHeader_t xICMPHeader; +} +#include "pack_struct_end.h" +typedef struct xICMP_PACKET ICMPPacket_t; + +#include "pack_struct_start.h" +struct xUDP_PACKET +{ + EthernetHeader_t xEthernetHeader; /* 0 + 14 = 14 */ + IPHeader_t xIPHeader; /* 14 + 20 = 34 */ + UDPHeader_t xUDPHeader; /* 34 + 8 = 42 */ +} +#include "pack_struct_end.h" +typedef struct xUDP_PACKET UDPPacket_t; + +#include "pack_struct_start.h" +struct xTCP_PACKET +{ + EthernetHeader_t xEthernetHeader; /* 0 + 14 = 14 */ + IPHeader_t xIPHeader; /* 14 + 20 = 34 */ + TCPHeader_t xTCPHeader; /* 34 + 32 = 66 */ +} +#include "pack_struct_end.h" +typedef struct xTCP_PACKET TCPPacket_t; + +typedef union XPROT_PACKET +{ + ARPPacket_t xARPPacket; + TCPPacket_t xTCPPacket; + UDPPacket_t xUDPPacket; + ICMPPacket_t xICMPPacket; +} ProtocolPacket_t; + + +/* The maximum UDP payload length. */ +#define ipMAX_UDP_PAYLOAD_LENGTH ( ( ipconfigNETWORK_MTU - ipSIZE_OF_IPv4_HEADER ) - ipSIZE_OF_UDP_HEADER ) + +typedef enum +{ + eReleaseBuffer = 0, /* Processing the frame did not find anything to do - just release the buffer. */ + eProcessBuffer, /* An Ethernet frame has a valid address - continue process its contents. */ + eReturnEthernetFrame, /* The Ethernet frame contains an ARP or ICMP packet that can be returned to its source. */ + eFrameConsumed /* Processing the Ethernet packet contents resulted in the payload being sent to the stack. */ +} eFrameProcessingResult_t; + +typedef enum +{ + eNoEvent = -1, + eNetworkDownEvent, /* 0: The network interface has been lost and/or needs [re]connecting. */ + eNetworkRxEvent, /* 1: The network interface has queued a received Ethernet frame. */ + eNetworkTxEvent, /* 2: Let the IP-task send a network packet. */ + eARPTimerEvent, /* 3: The ARP timer expired. */ + eStackTxEvent, /* 4: The software stack has queued a packet to transmit. */ + eDHCPEvent, /* 5: Process the DHCP state machine. */ + eTCPTimerEvent, /* 6: See if any TCP socket needs attention. */ + eTCPAcceptEvent, /* 7: Client API FreeRTOS_accept() waiting for client connections. */ + eTCPNetStat, /* 8: IP-task is asked to produce a netstat listing. */ + eSocketBindEvent, /* 9: Send a message to the IP-task to bind a socket to a port. */ + eSocketCloseEvent, /*10: Send a message to the IP-task to close a socket. */ + eSocketSelectEvent, /*11: Send a message to the IP-task for select(). */ + eSocketSignalEvent, /*12: A socket must be signalled. */ +} eIPEvent_t; + +typedef struct IP_TASK_COMMANDS +{ + eIPEvent_t eEventType; + void *pvData; +} IPStackEvent_t; + +#define ipBROADCAST_IP_ADDRESS 0xffffffffUL + +/* Offset into the Ethernet frame that is used to temporarily store information +on the fragmentation status of the packet being sent. The value is important, +as it is past the location into which the destination address will get placed. */ +#define ipFRAGMENTATION_PARAMETERS_OFFSET ( 6 ) +#define ipSOCKET_OPTIONS_OFFSET ( 6 ) + +/* Only used when outgoing fragmentation is being used (FreeRTOSIPConfig.h +setting. */ +#define ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT( usFragmentOffset ) ( ( ( usFragmentOffset ) == 0 ) ? ipUDP_PAYLOAD_OFFSET_IPv4 : ipIP_PAYLOAD_OFFSET ) + +/* The offset into a UDP packet at which the UDP data (payload) starts. */ +#define ipUDP_PAYLOAD_OFFSET_IPv4 ( sizeof( UDPPacket_t ) ) + +/* The offset into an IP packet into which the IP data (payload) starts. */ +#define ipIP_PAYLOAD_OFFSET ( sizeof( IPPacket_t ) ) + +#include "pack_struct_start.h" +struct xUDP_IP_FRAGMENT_PARAMETERS +{ + uint8_t ucSocketOptions; + uint8_t ucPadFor16BitAlignment; + uint16_t usFragmentedPacketOffset; + uint16_t usFragmentLength; + uint16_t usPayloadChecksum; +} +#include "pack_struct_end.h" +typedef struct xUDP_IP_FRAGMENT_PARAMETERS IPFragmentParameters_t; + +#if( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN ) + + /* Ethernet frame types. */ + #define ipARP_FRAME_TYPE ( 0x0608U ) + #define ipIPv4_FRAME_TYPE ( 0x0008U ) + + /* ARP related definitions. */ + #define ipARP_PROTOCOL_TYPE ( 0x0008U ) + #define ipARP_HARDWARE_TYPE_ETHERNET ( 0x0100U ) + #define ipARP_REQUEST ( 0x0100U ) + #define ipARP_REPLY ( 0x0200U ) + +#else + + /* Ethernet frame types. */ + #define ipARP_FRAME_TYPE ( 0x0806U ) + #define ipIPv4_FRAME_TYPE ( 0x0800U ) + + /* ARP related definitions. */ + #define ipARP_PROTOCOL_TYPE ( 0x0800U ) + #define ipARP_HARDWARE_TYPE_ETHERNET ( 0x0001U ) + #define ipARP_REQUEST ( 0x0001 ) + #define ipARP_REPLY ( 0x0002 ) + +#endif /* ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN */ + + +/* For convenience, a MAC address of all zeros and another of all 0xffs are +defined const for quick reference. */ +extern const MACAddress_t xBroadcastMACAddress; /* all 0xff's */ +extern uint16_t usPacketIdentifier; + +/* Define a default UDP packet header (declared in FreeRTOS_UDP_IP.c) */ +typedef union xUDPPacketHeader +{ + uint8_t ucBytes[24]; + uint32_t ulWords[6]; +} UDPPacketHeader_t; +extern UDPPacketHeader_t xDefaultPartUDPPacketHeader; + +/* Structure that stores the netmask, gateway address and DNS server addresses. */ +extern NetworkAddressingParameters_t xNetworkAddressing; + +/* Structure that stores the defaults for netmask, gateway address and DNS. +These values will be copied to 'xNetworkAddressing' in case DHCP is not used, +and also in case DHCP does not lead to a confirmed request. */ +extern NetworkAddressingParameters_t xDefaultAddressing; + +/* True when BufferAllocation_1.c was included, false for BufferAllocation_2.c */ +extern const BaseType_t xBufferAllocFixedSize; + +/* Defined in FreeRTOS_Sockets.c */ +#if ( ipconfigUSE_TCP == 1 ) + extern List_t xBoundTCPSocketsList; +#endif + +/* The local IP address is accessed from within xDefaultPartUDPPacketHeader, +rather than duplicated in its own variable. */ +#define ipLOCAL_IP_ADDRESS_POINTER ( ( uint32_t * ) &( xDefaultPartUDPPacketHeader.ulWords[ 20u / sizeof(uint32_t) ] ) ) + +/* The local MAC address is accessed from within xDefaultPartUDPPacketHeader, +rather than duplicated in its own variable. */ +#define ipLOCAL_MAC_ADDRESS ( &xDefaultPartUDPPacketHeader.ucBytes[0] ) + +/* ICMP packets are sent using the same function as UDP packets. The port +number is used to distinguish between the two, as 0 is an invalid UDP port. */ +#define ipPACKET_CONTAINS_ICMP_DATA ( 0 ) + +/* For now, the lower 8 bits in 'xEventBits' will be reserved for the above +socket events. */ +#define SOCKET_EVENT_BIT_COUNT 8 + +#define vSetField16( pxBase, xType, xField, usValue ) \ +{ \ + ( ( uint8_t* )( pxBase ) ) [ offsetof( xType, xField ) + 0 ] = ( uint8_t ) ( ( usValue ) >> 8 ); \ + ( ( uint8_t* )( pxBase ) ) [ offsetof( xType, xField ) + 1 ] = ( uint8_t ) ( ( usValue ) & 0xff ); \ +} + +#define vSetField32( pxBase, xType, xField, ulValue ) \ +{ \ + ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 0 ] = ( uint8_t ) ( ( ulValue ) >> 24 ); \ + ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 1 ] = ( uint8_t ) ( ( ( ulValue ) >> 16 ) & 0xff ); \ + ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 2 ] = ( uint8_t ) ( ( ( ulValue ) >> 8 ) & 0xff ); \ + ( (uint8_t*)( pxBase ) ) [ offsetof( xType, xField ) + 3 ] = ( uint8_t ) ( ( ulValue ) & 0xff ); \ +} + +#define vFlip_16( left, right ) \ + do { \ + uint16_t tmp = (left); \ + (left) = (right); \ + (right) = tmp; \ + } while (0) + +#define vFlip_32( left, right ) \ + do { \ + uint32_t tmp = (left); \ + (left) = (right); \ + (right) = tmp; \ + } while (0) + +#ifndef ARRAY_SIZE + #define ARRAY_SIZE(x) (BaseType_t)(sizeof(x)/sizeof(x)[0]) +#endif + +/* + * A version of FreeRTOS_GetReleaseNetworkBuffer() that can be called from an + * interrupt. If a non zero value is returned, then the calling ISR should + * perform a context switch before exiting the ISR. + */ +BaseType_t FreeRTOS_ReleaseFreeNetworkBufferFromISR( void ); + +/* + * Create a message that contains a command to initialise the network interface. + * This is used during initialisation, and at any time the network interface + * goes down thereafter. The network interface hardware driver is responsible + * for sending the message that contains the network interface down command/ + * event. + * + * Only use the FreeRTOS_NetworkDownFromISR() version if the function is to be + * called from an interrupt service routine. If FreeRTOS_NetworkDownFromISR() + * returns a non-zero value then a context switch should be performed ebfore + * the interrupt is exited. + */ +void FreeRTOS_NetworkDown( void ); +BaseType_t FreeRTOS_NetworkDownFromISR( void ); + +/* + * Processes incoming ARP packets. + */ +eFrameProcessingResult_t eARPProcessPacket( ARPPacket_t * const pxARPFrame ); + +/* + * Inspect an Ethernet frame to see if it contains data that the stack needs to + * process. eProcessBuffer is returned if the frame should be processed by the + * stack. eReleaseBuffer is returned if the frame should be discarded. + */ +eFrameProcessingResult_t eConsiderFrameForProcessing( const uint8_t * const pucEthernetBuffer ); + +/* + * Return the checksum generated over xDataLengthBytes from pucNextData. + */ +uint16_t usGenerateChecksum( uint32_t ulSum, const uint8_t * pucNextData, size_t uxDataLengthBytes ); + +/* Socket related private functions. */ + +/* + * The caller must ensure that pxNetworkBuffer->xDataLength is the UDP packet + * payload size (excluding packet headers) and that the packet in pucEthernetBuffer + * is at least the size of UDPPacket_t. + */ +BaseType_t xProcessReceivedUDPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ); + +/* + * Initialize the socket list data structures for TCP and UDP. + */ +BaseType_t vNetworkSocketsInit( void ); + +/* + * Returns pdTRUE if the IP task has been created and is initialised. Otherwise + * returns pdFALSE. + */ +BaseType_t xIPIsNetworkTaskReady( void ); + +#if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) + struct xSOCKET; + typedef void (*SocketWakeupCallback_t)( struct xSOCKET * pxSocket ); +#endif + +#if( ipconfigUSE_TCP == 1 ) + + /* + * Actually a user thing, but because xBoundTCPSocketsList, let it do by the + * IP-task + */ + void vTCPNetStat( void ); + + /* + * At least one socket needs to check for timeouts + */ + TickType_t xTCPTimerCheck( BaseType_t xWillSleep ); + + /* Every TCP socket has a buffer space just big enough to store + the last TCP header received. + As a reference of this field may be passed to DMA, force the + alignment to 8 bytes. */ + typedef union + { + struct + { + /* Increase the alignment of this union by adding a 64-bit variable. */ + uint64_t ullAlignmentWord; + } a; + struct + { + /* The next field only serves to give 'ucLastPacket' a correct + alignment of 8 + 2. See comments in FreeRTOS_IP.h */ + uint8_t ucFillPacket[ ipconfigPACKET_FILLER_SIZE ]; + uint8_t ucLastPacket[ sizeof( TCPPacket_t ) ]; + } u; + } LastTCPPacket_t; + + /* + * Note that the values of all short and long integers in these structs + * are being stored in the native-endian way + * Translation should take place when accessing any structure which defines + * network packets, such as IPHeader_t and TCPHeader_t + */ + typedef struct TCPSOCKET + { + uint32_t ulRemoteIP; /* IP address of remote machine */ + uint16_t usRemotePort; /* Port on remote machine */ + struct { + /* Most compilers do like bit-flags */ + uint32_t + bMssChange : 1, /* This socket has seen a change in MSS */ + bPassAccept : 1, /* when true, this socket may be returned in a call to accept() */ + bPassQueued : 1, /* when true, this socket is an orphan until it gets connected + * Why an orphan? Because it may not be returned in a accept() call until it + * gets the state eESTABLISHED */ + bReuseSocket : 1, /* When a listening socket gets a connection, do not create a new instance but keep on using it */ + bCloseAfterSend : 1,/* As soon as the last byte has been transmitted, finalise the connection + * Useful in e.g. FTP connections, where the last data bytes are sent along with the FIN flag */ + bUserShutdown : 1, /* User requesting a graceful shutdown */ + bCloseRequested : 1,/* Request to finalise the connection */ + bLowWater : 1, /* high-water level has been reached. Cleared as soon as 'rx-count < lo-water' */ + bWinChange : 1, /* The value of bLowWater has changed, must send a window update */ + bSendKeepAlive : 1, /* When this flag is true, a TCP keep-alive message must be send */ + bWaitKeepAlive : 1, /* When this flag is true, a TCP keep-alive reply is expected */ + bConnPrepared : 1, /* Connecting socket: Message has been prepared */ + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + bConnPassed : 1, /* Connecting socket: Socket has been passed in a successful select() */ + #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ + bFinAccepted : 1, /* This socket has received (or sent) a FIN and accepted it */ + bFinSent : 1, /* We've sent out a FIN */ + bFinRecv : 1, /* We've received a FIN from our peer */ + bFinAcked : 1, /* Our FIN packet has been acked */ + bFinLast : 1, /* The last ACK (after FIN and FIN+ACK) has been sent or will be sent by the peer */ + bRxStopped : 1, /* Application asked to temporarily stop reception */ + bMallocError : 1, /* There was an error allocating a stream */ + bWinScaling : 1; /* A TCP-Window Scaling option was offered and accepted in the SYN phase. */ + } bits; + uint32_t ulHighestRxAllowed; + /* The highest sequence number that we can receive at any moment */ + uint16_t usTimeout; /* Time (in ticks) after which this socket needs attention */ + uint16_t usCurMSS; /* Current Maximum Segment Size */ + uint16_t usInitMSS; /* Initial maximum segment Size */ + uint16_t usChildCount; /* In case of a listening socket: number of connections on this port number */ + uint16_t usBacklog; /* In case of a listening socket: maximum number of concurrent connections on this port number */ + uint8_t ucRepCount; /* Send repeat count, for retransmissions + * This counter is separate from the xmitCount in the + * TCP win segments */ + uint8_t ucTCPState; /* TCP state: see eTCP_STATE */ + struct xSOCKET *pxPeerSocket; /* for server socket: child, for child socket: parent */ + #if( ipconfigTCP_KEEP_ALIVE == 1 ) + uint8_t ucKeepRepCount; + TickType_t xLastAliveTime; + #endif /* ipconfigTCP_KEEP_ALIVE */ + #if( ipconfigTCP_HANG_PROTECTION == 1 ) + TickType_t xLastActTime; + #endif /* ipconfigTCP_HANG_PROTECTION */ + size_t uxLittleSpace; + size_t uxEnoughSpace; + size_t uxRxStreamSize; + size_t uxTxStreamSize; + StreamBuffer_t *rxStream; + StreamBuffer_t *txStream; + #if( ipconfigUSE_TCP_WIN == 1 ) + NetworkBufferDescriptor_t *pxAckMessage; + #endif /* ipconfigUSE_TCP_WIN */ + /* Buffer space to store the last TCP header received. */ + LastTCPPacket_t xPacket; + uint8_t tcpflags; /* TCP flags */ + #if( ipconfigUSE_TCP_WIN != 0 ) + uint8_t ucMyWinScaleFactor; + uint8_t ucPeerWinScaleFactor; + #endif + #if( ipconfigUSE_CALLBACKS == 1 ) + FOnTCPReceive_t pxHandleReceive; /* + * In case of a TCP socket: + * typedef void (* FOnTCPReceive_t) (Socket_t xSocket, void *pData, size_t xLength ); + */ + FOnTCPSent_t pxHandleSent; + FOnConnected_t pxHandleConnected; /* Actually type: typedef void (* FOnConnected_t) (Socket_t xSocket, BaseType_t ulConnected ); */ + #endif /* ipconfigUSE_CALLBACKS */ + uint32_t ulWindowSize; /* Current Window size advertised by peer */ + size_t uxRxWinSize; /* Fixed value: size of the TCP reception window */ + size_t uxTxWinSize; /* Fixed value: size of the TCP transmit window */ + + TCPWindow_t xTCPWindow; + } IPTCPSocket_t; + +#endif /* ipconfigUSE_TCP */ + +typedef struct UDPSOCKET +{ + List_t xWaitingPacketsList; /* Incoming packets */ + #if( ipconfigUDP_MAX_RX_PACKETS > 0 ) + UBaseType_t uxMaxPackets; /* Protection: limits the number of packets buffered per socket */ + #endif /* ipconfigUDP_MAX_RX_PACKETS */ + #if( ipconfigUSE_CALLBACKS == 1 ) + FOnUDPReceive_t pxHandleReceive; /* + * In case of a UDP socket: + * typedef void (* FOnUDPReceive_t) (Socket_t xSocket, void *pData, size_t xLength, struct freertos_sockaddr *pxAddr ); + */ + FOnUDPSent_t pxHandleSent; + #endif /* ipconfigUSE_CALLBACKS */ +} IPUDPSocket_t; + +typedef enum eSOCKET_EVENT { + eSOCKET_RECEIVE = 0x0001, + eSOCKET_SEND = 0x0002, + eSOCKET_ACCEPT = 0x0004, + eSOCKET_CONNECT = 0x0008, + eSOCKET_BOUND = 0x0010, + eSOCKET_CLOSED = 0x0020, + eSOCKET_INTR = 0x0040, + eSOCKET_ALL = 0x007F, +} eSocketEvent_t; + +typedef struct xSOCKET +{ + EventBits_t xEventBits; + EventGroupHandle_t xEventGroup; + + ListItem_t xBoundSocketListItem; /* Used to reference the socket from a bound sockets list. */ + TickType_t xReceiveBlockTime; /* if recv[to] is called while no data is available, wait this amount of time. Unit in clock-ticks */ + TickType_t xSendBlockTime; /* if send[to] is called while there is not enough space to send, wait this amount of time. Unit in clock-ticks */ + + uint16_t usLocalPort; /* Local port on this machine */ + uint8_t ucSocketOptions; + uint8_t ucProtocol; /* choice of FREERTOS_IPPROTO_UDP/TCP */ + #if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) + SemaphoreHandle_t pxUserSemaphore; + #endif /* ipconfigSOCKET_HAS_USER_SEMAPHORE */ + #if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) + SocketWakeupCallback_t pxUserWakeCallback; + #endif /* ipconfigSOCKET_HAS_USER_WAKE_CALLBACK */ + + #if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + struct xSOCKET_SET *pxSocketSet; + /* User may indicate which bits are interesting for this socket. */ + EventBits_t xSelectBits; + /* These bits indicate the events which have actually occurred. + They are maintained by the IP-task */ + EventBits_t xSocketBits; + #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ + /* TCP/UDP specific fields: */ + /* Before accessing any member of this structure, it should be confirmed */ + /* that the protocol corresponds with the type of structure */ + + union + { + IPUDPSocket_t xUDP; + #if( ipconfigUSE_TCP == 1 ) + IPTCPSocket_t xTCP; + /* Make sure that xTCP is 8-bytes aligned by + declaring a 64-bit variable in the same union */ + uint64_t ullTCPAlignment; + #endif /* ipconfigUSE_TCP */ + } u; +} FreeRTOS_Socket_t; + +#if( ipconfigUSE_TCP == 1 ) + /* + * Lookup a TCP socket, using a multiple matching: both port numbers and + * return IP address. + */ + FreeRTOS_Socket_t *pxTCPSocketLookup( uint32_t ulLocalIP, UBaseType_t uxLocalPort, uint32_t ulRemoteIP, UBaseType_t uxRemotePort ); + +#endif /* ipconfigUSE_TCP */ + +/* + * Look up a local socket by finding a match with the local port. + */ +FreeRTOS_Socket_t *pxUDPSocketLookup( UBaseType_t uxLocalPort ); + +/* + * Called when the application has generated a UDP packet to send. + */ +void vProcessGeneratedUDPPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ); + +/* + * Calculate the upper-layer checksum + * Works both for UDP, ICMP and TCP packages + * bOut = true: checksum will be set in outgoing packets + * bOut = false: checksum will be calculated for incoming packets + * returning 0xffff means: checksum was correct + */ +uint16_t usGenerateProtocolChecksum( const uint8_t * const pucEthernetBuffer, size_t uxBufferLength, BaseType_t xOutgoingPacket ); + +/* + * An Ethernet frame has been updated (maybe it was an ARP request or a PING + * request?) and is to be sent back to its source. + */ +void vReturnEthernetFrame( NetworkBufferDescriptor_t * pxNetworkBuffer, BaseType_t xReleaseAfterSend ); + +/* + * The internal version of bind() + * If 'ulInternal' is true, it is called by the driver + * The TCP driver needs to bind a socket at the moment a listening socket + * creates a new connected socket + */ +BaseType_t vSocketBind( FreeRTOS_Socket_t *pxSocket, struct freertos_sockaddr * pxAddress, size_t uxAddressLength, BaseType_t xInternal ); + +/* + * Internal function to add streaming data to a TCP socket. If ulIn == true, + * data will be added to the rxStream, otherwise to the tXStream. Normally data + * will be written with ulOffset == 0, meaning: at the end of the FIFO. When + * packet come in out-of-order, an offset will be used to put it in front and + * the head will not change yet. + */ +int32_t lTCPAddRxdata(FreeRTOS_Socket_t *pxSocket, size_t uxOffset, const uint8_t *pcData, uint32_t ulByteCount); + +/* + * Currently called for any important event. + */ +void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket ); + +/* + * Some helping function, their meaning should be clear + */ +static portINLINE uint32_t ulChar2u32 (const uint8_t *apChr); +static portINLINE uint32_t ulChar2u32 (const uint8_t *apChr) +{ + return ( ( ( uint32_t )apChr[0] ) << 24) | + ( ( ( uint32_t )apChr[1] ) << 16) | + ( ( ( uint32_t )apChr[2] ) << 8) | + ( ( ( uint32_t )apChr[3] ) ); +} + +static portINLINE uint16_t usChar2u16 (const uint8_t *apChr); +static portINLINE uint16_t usChar2u16 (const uint8_t *apChr) +{ + return ( uint16_t ) + ( ( ( ( uint32_t )apChr[0] ) << 8) | + ( ( ( uint32_t )apChr[1] ) ) ); +} + +/* Check a single socket for retransmissions and timeouts */ +BaseType_t xTCPSocketCheck( FreeRTOS_Socket_t *pxSocket ); + +BaseType_t xTCPCheckNewClient( FreeRTOS_Socket_t *pxSocket ); + +/* Defined in FreeRTOS_Sockets.c + * Close a socket + */ +void *vSocketClose( FreeRTOS_Socket_t *pxSocket ); + +/* + * Send the event eEvent to the IP task event queue, using a block time of + * zero. Return pdPASS if the message was sent successfully, otherwise return + * pdFALSE. +*/ +BaseType_t xSendEventToIPTask( eIPEvent_t eEvent ); + +/* + * The same as above, but a struct as a parameter, containing: + * eIPEvent_t eEventType; + * void *pvData; + */ +BaseType_t xSendEventStructToIPTask( const IPStackEvent_t *pxEvent, TickType_t xTimeout ); + +/* + * Returns a pointer to the original NetworkBuffer from a pointer to a UDP + * payload buffer. + */ +NetworkBufferDescriptor_t *pxUDPPayloadBuffer_to_NetworkBuffer( void *pvBuffer ); + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + /* + * For the case where the network driver passes a buffer directly to a DMA + * descriptor, this function can be used to translate a 'network buffer' to + * a 'network buffer descriptor'. + */ + NetworkBufferDescriptor_t *pxPacketBuffer_to_NetworkBuffer( const void *pvBuffer ); +#endif + +/* + * Internal: Sets a new state for a TCP socket and performs the necessary + * actions like calling a OnConnected handler to notify the socket owner. + */ +#if( ipconfigUSE_TCP == 1 ) + void vTCPStateChange( FreeRTOS_Socket_t *pxSocket, enum eTCP_STATE eTCPState ); +#endif /* ipconfigUSE_TCP */ + +/*_RB_ Should this be part of the public API? */ +void FreeRTOS_netstat( void ); + +/* Returns pdTRUE is this function is called from the IP-task */ +BaseType_t xIsCallingFromIPTask( void ); + +#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 ) + +typedef struct xSOCKET_SET +{ + EventGroupHandle_t xSelectGroup; + BaseType_t bApiCalled; /* True if the API was calling the private vSocketSelect */ + FreeRTOS_Socket_t *pxSocket; +} SocketSelect_t; + +extern void vSocketSelect( SocketSelect_t *pxSocketSelect ); + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION */ + +void vIPSetDHCPTimerEnableState( BaseType_t xEnableState ); +void vIPReloadDHCPTimer( uint32_t ulLeaseTime ); +#if( ipconfigDNS_USE_CALLBACKS != 0 ) + void vIPReloadDNSTimer( uint32_t ulCheckTime ); + void vIPSetDnsTimerEnableState( BaseType_t xEnableState ); +#endif + +/* Send the network-up event and start the ARP timer. */ +void vIPNetworkUpCalls( void ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* FREERTOS_IP_PRIVATE_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Sockets.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Sockets.h index 88d3bba65..926ccebbd 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Sockets.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Sockets.h @@ -1,402 +1,402 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_SOCKETS_H -#define FREERTOS_SOCKETS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Standard includes. */ -#include - -/* Application level configuration options. */ -#include "FreeRTOSIPConfig.h" - -#ifndef FREERTOS_IP_CONFIG_H - #error FreeRTOSIPConfig.h has not been included yet -#endif - -/* Event bit definitions are required by the select functions. */ -#include "event_groups.h" - -#ifndef INC_FREERTOS_H - #error FreeRTOS.h must be included before FreeRTOS_Sockets.h. -#endif - -#ifndef INC_TASK_H - #ifndef TASK_H /* For compatibility with older FreeRTOS versions. */ - #error The FreeRTOS header file task.h must be included before FreeRTOS_Sockets.h. - #endif -#endif - -/* Assigned to an Socket_t variable when the socket is not valid, probably -because it could not be created. */ -#define FREERTOS_INVALID_SOCKET ( ( Socket_t ) ~0U ) - -/* API function error values. As errno is supported, the FreeRTOS sockets -functions return error codes rather than just a pass or fail indication. */ -/* HT: Extended the number of error codes, gave them positive values and if possible -the corresponding found in errno.h -In case of an error, API's will still return negative numbers, e.g. - return -pdFREERTOS_ERRNO_EWOULDBLOCK; -in case an operation would block */ - -/* The following defines are obsolete, please use -pdFREERTOS_ERRNO_Exxx */ - -#define FREERTOS_SOCKET_ERROR ( -1 ) -#define FREERTOS_EWOULDBLOCK ( - pdFREERTOS_ERRNO_EWOULDBLOCK ) -#define FREERTOS_EINVAL ( - pdFREERTOS_ERRNO_EINVAL ) -#define FREERTOS_EADDRNOTAVAIL ( - pdFREERTOS_ERRNO_EADDRNOTAVAIL ) -#define FREERTOS_EADDRINUSE ( - pdFREERTOS_ERRNO_EADDRINUSE ) -#define FREERTOS_ENOBUFS ( - pdFREERTOS_ERRNO_ENOBUFS ) -#define FREERTOS_ENOPROTOOPT ( - pdFREERTOS_ERRNO_ENOPROTOOPT ) -#define FREERTOS_ECLOSED ( - pdFREERTOS_ERRNO_ENOTCONN ) - -/* Values for the parameters to FreeRTOS_socket(), inline with the Berkeley -standard. See the documentation of FreeRTOS_socket() for more information. */ -#define FREERTOS_AF_INET ( 2 ) -#define FREERTOS_AF_INET6 ( 10 ) -#define FREERTOS_SOCK_DGRAM ( 2 ) -#define FREERTOS_IPPROTO_UDP ( 17 ) - -#define FREERTOS_SOCK_STREAM ( 1 ) -#define FREERTOS_IPPROTO_TCP ( 6 ) -/* IP packet of type "Any local network" - * can be used in stead of TCP for testing with sockets in raw mode - */ -#define FREERTOS_IPPROTO_USR_LAN ( 63 ) - -/* A bit value that can be passed into the FreeRTOS_sendto() function as part of -the flags parameter. Setting the FREERTOS_ZERO_COPY in the flags parameter -indicates that the zero copy interface is being used. See the documentation for -FreeRTOS_sockets() for more information. */ -#define FREERTOS_ZERO_COPY ( 1 ) - -/* Values that can be passed in the option name parameter of calls to -FreeRTOS_setsockopt(). */ -#define FREERTOS_SO_RCVTIMEO ( 0 ) /* Used to set the receive time out. */ -#define FREERTOS_SO_SNDTIMEO ( 1 ) /* Used to set the send time out. */ -#define FREERTOS_SO_UDPCKSUM_OUT ( 2 ) /* Used to turn the use of the UDP checksum by a socket on or off. This also doubles as part of an 8-bit bitwise socket option. */ -#if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) - #define FREERTOS_SO_SET_SEMAPHORE ( 3 ) /* Used to set a user's semaphore */ -#endif -#define FREERTOS_SO_SNDBUF ( 4 ) /* Set the size of the send buffer (TCP only) */ -#define FREERTOS_SO_RCVBUF ( 5 ) /* Set the size of the receive buffer (TCP only) */ - -#if ipconfigUSE_CALLBACKS == 1 - #define FREERTOS_SO_TCP_CONN_HANDLER ( 6 ) /* Install a callback for (dis) connection events. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - #define FREERTOS_SO_TCP_RECV_HANDLER ( 7 ) /* Install a callback for receiving TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - #define FREERTOS_SO_TCP_SENT_HANDLER ( 8 ) /* Install a callback for sending TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - #define FREERTOS_SO_UDP_RECV_HANDLER ( 9 ) /* Install a callback for receiving UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ - #define FREERTOS_SO_UDP_SENT_HANDLER ( 10 ) /* Install a callback for sending UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ -#endif /* ipconfigUSE_CALLBACKS */ - -#define FREERTOS_SO_REUSE_LISTEN_SOCKET ( 11 ) /* When a listening socket gets connected, do not create a new one but re-use it */ -#define FREERTOS_SO_CLOSE_AFTER_SEND ( 12 ) /* As soon as the last byte has been transmitted, finalise the connection */ -#define FREERTOS_SO_WIN_PROPERTIES ( 13 ) /* Set all buffer and window properties in one call, parameter is pointer to WinProperties_t */ -#define FREERTOS_SO_SET_FULL_SIZE ( 14 ) /* Refuse to send packets smaller than MSS */ - -#define FREERTOS_SO_STOP_RX ( 15 ) /* Temporarily hold up reception, used by streaming client */ - -#if( ipconfigUDP_MAX_RX_PACKETS > 0 ) - #define FREERTOS_SO_UDP_MAX_RX_PACKETS ( 16 ) /* This option helps to limit the maximum number of packets a UDP socket will buffer */ -#endif - -#if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) - #define FREERTOS_SO_WAKEUP_CALLBACK ( 17 ) -#endif - -#define FREERTOS_SO_SET_LOW_HIGH_WATER ( 18 ) - -#define FREERTOS_NOT_LAST_IN_FRAGMENTED_PACKET ( 0x80 ) /* For internal use only, but also part of an 8-bit bitwise value. */ -#define FREERTOS_FRAGMENTED_PACKET ( 0x40 ) /* For internal use only, but also part of an 8-bit bitwise value. */ - -/* Values for flag for FreeRTOS_shutdown(). */ -#define FREERTOS_SHUT_RD ( 0 ) /* Not really at this moment, just for compatibility of the interface */ -#define FREERTOS_SHUT_WR ( 1 ) -#define FREERTOS_SHUT_RDWR ( 2 ) - -/* Values for flag for FreeRTOS_recv(). */ -#define FREERTOS_MSG_OOB ( 2 ) /* process out-of-band data */ -#define FREERTOS_MSG_PEEK ( 4 ) /* peek at incoming message */ -#define FREERTOS_MSG_DONTROUTE ( 8 ) /* send without using routing tables */ -#define FREERTOS_MSG_DONTWAIT ( 16 ) /* Can be used with recvfrom(), sendto(), recv(), and send(). */ - -typedef struct xWIN_PROPS { - /* Properties of the Tx buffer and Tx window */ - int32_t lTxBufSize; /* Unit: bytes */ - int32_t lTxWinSize; /* Unit: MSS */ - - /* Properties of the Rx buffer and Rx window */ - int32_t lRxBufSize; /* Unit: bytes */ - int32_t lRxWinSize; /* Unit: MSS */ -} WinProperties_t; - -typedef struct xLOW_HIGH_WATER { - /* Structure to pass for the 'FREERTOS_SO_SET_LOW_HIGH_WATER' option */ - size_t uxLittleSpace; /* Send a STOP when buffer space drops below X bytes */ - size_t uxEnoughSpace; /* Send a GO when buffer space grows above X bytes */ -} LowHighWater_t; - -/* For compatibility with the expected Berkeley sockets naming. */ -#define socklen_t uint32_t - -/* For this limited implementation, only two members are required in the -Berkeley style sockaddr structure. */ -struct freertos_sockaddr -{ - /* _HT_ On 32- and 64-bit architectures, the addition of the two uint8_t - fields doesn't make the structure bigger, due to alignment. - The fields are inserted as a preparation for IPv6. */ - - /* sin_len and sin_family not used in the IPv4-only release. */ - uint8_t sin_len; /* length of this structure. */ - uint8_t sin_family; /* FREERTOS_AF_INET. */ - uint16_t sin_port; - uint32_t sin_addr; -}; - -#if ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN - - #define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \ - ( ( ( ( uint32_t ) ( ucOctet3 ) ) << 24UL ) | \ - ( ( ( uint32_t ) ( ucOctet2 ) ) << 16UL ) | \ - ( ( ( uint32_t ) ( ucOctet1 ) ) << 8UL ) | \ - ( ( uint32_t ) ( ucOctet0 ) ) ) - - #define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \ - sprintf( ( char * ) ( pucBuffer ), "%u.%u.%u.%u", \ - ( ( unsigned ) ( ( ulIPAddress ) & 0xffUL ) ), \ - ( ( unsigned ) ( ( ( ulIPAddress ) >> 8 ) & 0xffUL ) ), \ - ( ( unsigned ) ( ( ( ulIPAddress ) >> 16 ) & 0xffUL ) ),\ - ( ( unsigned ) ( ( ulIPAddress ) >> 24 ) ) ) - -#else /* ipconfigBYTE_ORDER */ - - #define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \ - ( ( ( ( uint32_t ) ( ucOctet0 ) ) << 24UL ) | \ - ( ( ( uint32_t ) ( ucOctet1 ) ) << 16UL ) | \ - ( ( ( uint32_t ) ( ucOctet2 ) ) << 8UL ) | \ - ( ( uint32_t ) ( ucOctet3 ) ) ) - - #define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \ - sprintf( ( char * ) ( pucBuffer ), "%u.%u.%u.%u", \ - ( ( unsigned ) ( ( ulIPAddress ) >> 24 ) ), \ - ( ( unsigned ) ( ( ( ulIPAddress ) >> 16 ) & 0xffUL ) ),\ - ( ( unsigned ) ( ( ( ulIPAddress ) >> 8 ) & 0xffUL ) ), \ - ( ( unsigned ) ( ( ulIPAddress ) & 0xffUL ) ) ) - -#endif /* ipconfigBYTE_ORDER */ - -/* The socket type itself. */ -struct xSOCKET; -typedef struct xSOCKET *Socket_t; - -/* The SocketSet_t type is the equivalent to the fd_set type used by the -Berkeley API. */ -struct xSOCKET_SET; -typedef struct xSOCKET_SET *SocketSet_t; - -/** - * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE - * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_TCP_API_Functions.html - */ -Socket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol ); -int32_t FreeRTOS_recvfrom( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags, struct freertos_sockaddr *pxSourceAddress, socklen_t *pxSourceAddressLength ); -int32_t FreeRTOS_sendto( Socket_t xSocket, const void *pvBuffer, size_t xTotalDataLength, BaseType_t xFlags, const struct freertos_sockaddr *pxDestinationAddress, socklen_t xDestinationAddressLength ); -BaseType_t FreeRTOS_bind( Socket_t xSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ); - -/* function to get the local address and IP port */ -size_t FreeRTOS_GetLocalAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ); - -/* Made available when ipconfigETHERNET_DRIVER_FILTERS_PACKETS is set to 1. */ -BaseType_t xPortHasUDPSocket( uint16_t usPortNr ); - -#if ipconfigUSE_TCP == 1 - -BaseType_t FreeRTOS_connect( Socket_t xClientSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ); -BaseType_t FreeRTOS_listen( Socket_t xSocket, BaseType_t xBacklog ); -BaseType_t FreeRTOS_recv( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags ); -BaseType_t FreeRTOS_send( Socket_t xSocket, const void *pvBuffer, size_t uxDataLength, BaseType_t xFlags ); -Socket_t FreeRTOS_accept( Socket_t xServerSocket, struct freertos_sockaddr *pxAddress, socklen_t *pxAddressLength ); -BaseType_t FreeRTOS_shutdown (Socket_t xSocket, BaseType_t xHow); - -#if( ipconfigSUPPORT_SIGNALS != 0 ) - /* Send a signal to the task which is waiting for a given socket. */ - BaseType_t FreeRTOS_SignalSocket( Socket_t xSocket ); - - /* Send a signal to the task which reads from this socket (FromISR - version). */ - BaseType_t FreeRTOS_SignalSocketFromISR( Socket_t xSocket, BaseType_t *pxHigherPriorityTaskWoken ); -#endif /* ipconfigSUPPORT_SIGNALS */ - -/* Return the remote address and IP port. */ -BaseType_t FreeRTOS_GetRemoteAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ); - -/* returns pdTRUE if TCP socket is connected */ -BaseType_t FreeRTOS_issocketconnected( Socket_t xSocket ); - -/* returns the actual size of MSS being used */ -BaseType_t FreeRTOS_mss( Socket_t xSocket ); - -/* for internal use only: return the connection status */ -BaseType_t FreeRTOS_connstatus( Socket_t xSocket ); - -/* Returns the number of bytes that may be added to txStream */ -BaseType_t FreeRTOS_maywrite( Socket_t xSocket ); - -/* - * Two helper functions, mostly for testing - * rx_size returns the number of bytes available in the Rx buffer - * tx_space returns the free space in the Tx buffer - */ -BaseType_t FreeRTOS_rx_size( Socket_t xSocket ); -BaseType_t FreeRTOS_tx_space( Socket_t xSocket ); -BaseType_t FreeRTOS_tx_size( Socket_t xSocket ); - -/* Returns the number of outstanding bytes in txStream. */ -/* The function FreeRTOS_outstanding() was already implemented -FreeRTOS_tx_size(). */ -#define FreeRTOS_outstanding( xSocket ) FreeRTOS_tx_size( xSocket ) - -/* Returns the number of bytes in the socket's rxStream. */ -/* The function FreeRTOS_recvcount() was already implemented -FreeRTOS_rx_size(). */ -#define FreeRTOS_recvcount( xSocket ) FreeRTOS_rx_size( xSocket ) - -/* - * For advanced applications only: - * Get a direct pointer to the circular transmit buffer. - * '*pxLength' will contain the number of bytes that may be written. - */ -uint8_t *FreeRTOS_get_tx_head( Socket_t xSocket, BaseType_t *pxLength ); - -#endif /* ipconfigUSE_TCP */ - -/* - * Connect / disconnect handler for a TCP socket - * For example: - * static void vMyConnectHandler (Socket_t xSocket, BaseType_t ulConnected) - * { - * } - * F_TCP_UDP_Handler_t xHnd = { vMyConnectHandler }; - * FreeRTOS_setsockopt( sock, 0, FREERTOS_SO_TCP_CONN_HANDLER, ( void * ) &xHnd, sizeof( xHnd ) ); - */ - -typedef void (* FOnConnected_t )( Socket_t /* xSocket */, BaseType_t /* ulConnected */ ); - -/* - * Reception handler for a TCP socket - * A user-proved function will be called on reception of a message - * If the handler returns a positive number, the messages will not be stored - * For example: - * static BaseType_t xOnTCPReceive( Socket_t xSocket, void * pData, size_t xLength ) - * { - * // handle the message - * return 1; - * } - * F_TCP_UDP_Handler_t xHand = { xOnTCPReceive }; - * FreeRTOS_setsockopt( sock, 0, FREERTOS_SO_TCP_RECV_HANDLER, ( void * ) &xHand, sizeof( xHand ) ); - */ -typedef BaseType_t (* FOnTCPReceive_t )( Socket_t /* xSocket */, void * /* pData */, size_t /* xLength */ ); -typedef void (* FOnTCPSent_t )( Socket_t /* xSocket */, size_t /* xLength */ ); - -/* - * Reception handler for a UDP socket - * A user-proved function will be called on reception of a message - * If the handler returns a positive number, the messages will not be stored - */ -typedef BaseType_t (* FOnUDPReceive_t ) (Socket_t /* xSocket */, void * /* pData */, size_t /* xLength */, - const struct freertos_sockaddr * /* pxFrom */, const struct freertos_sockaddr * /* pxDest */ ); -typedef void (* FOnUDPSent_t )( Socket_t /* xSocket */, size_t /* xLength */ ); - - -typedef union xTCP_UDP_HANDLER -{ - FOnConnected_t pxOnTCPConnected; /* FREERTOS_SO_TCP_CONN_HANDLER */ - FOnTCPReceive_t pxOnTCPReceive; /* FREERTOS_SO_TCP_RECV_HANDLER */ - FOnTCPSent_t pxOnTCPSent; /* FREERTOS_SO_TCP_SENT_HANDLER */ - FOnUDPReceive_t pxOnUDPReceive; /* FREERTOS_SO_UDP_RECV_HANDLER */ - FOnUDPSent_t pxOnUDPSent; /* FREERTOS_SO_UDP_SENT_HANDLER */ -} F_TCP_UDP_Handler_t; - -BaseType_t FreeRTOS_setsockopt( Socket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ); -BaseType_t FreeRTOS_closesocket( Socket_t xSocket ); -uint32_t FreeRTOS_gethostbyname( const char *pcHostName ); -uint32_t FreeRTOS_inet_addr( const char * pcIPAddress ); - -/* - * For the web server: borrow the circular Rx buffer for inspection - * HTML driver wants to see if a sequence of 13/10/13/10 is available - */ -const struct xSTREAM_BUFFER *FreeRTOS_get_rx_buf( Socket_t xSocket ); - -void FreeRTOS_netstat( void ); - -#if ipconfigSUPPORT_SELECT_FUNCTION == 1 - - /* For FD_SET and FD_CLR, a combination of the following bits can be used: */ - - typedef enum eSELECT_EVENT { - eSELECT_READ = 0x0001, - eSELECT_WRITE = 0x0002, - eSELECT_EXCEPT = 0x0004, - eSELECT_INTR = 0x0008, - eSELECT_ALL = 0x000F, - /* Reserved for internal use: */ - eSELECT_CALL_IP = 0x0010, - /* end */ - } eSelectEvent_t; - - SocketSet_t FreeRTOS_CreateSocketSet( void ); - void FreeRTOS_DeleteSocketSet( SocketSet_t xSocketSet ); - void FreeRTOS_FD_SET( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xBitsToSet ); - void FreeRTOS_FD_CLR( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xBitsToClear ); - EventBits_t FreeRTOS_FD_ISSET( Socket_t xSocket, SocketSet_t xSocketSet ); - BaseType_t FreeRTOS_select( SocketSet_t xSocketSet, TickType_t xBlockTimeTicks ); - -#endif /* ipconfigSUPPORT_SELECT_FUNCTION */ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* FREERTOS_SOCKETS_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_SOCKETS_H +#define FREERTOS_SOCKETS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Standard includes. */ +#include + +/* Application level configuration options. */ +#include "FreeRTOSIPConfig.h" + +#ifndef FREERTOS_IP_CONFIG_H + #error FreeRTOSIPConfig.h has not been included yet +#endif + +/* Event bit definitions are required by the select functions. */ +#include "event_groups.h" + +#ifndef INC_FREERTOS_H + #error FreeRTOS.h must be included before FreeRTOS_Sockets.h. +#endif + +#ifndef INC_TASK_H + #ifndef TASK_H /* For compatibility with older FreeRTOS versions. */ + #error The FreeRTOS header file task.h must be included before FreeRTOS_Sockets.h. + #endif +#endif + +/* Assigned to an Socket_t variable when the socket is not valid, probably +because it could not be created. */ +#define FREERTOS_INVALID_SOCKET ( ( Socket_t ) ~0U ) + +/* API function error values. As errno is supported, the FreeRTOS sockets +functions return error codes rather than just a pass or fail indication. */ +/* HT: Extended the number of error codes, gave them positive values and if possible +the corresponding found in errno.h +In case of an error, API's will still return negative numbers, e.g. + return -pdFREERTOS_ERRNO_EWOULDBLOCK; +in case an operation would block */ + +/* The following defines are obsolete, please use -pdFREERTOS_ERRNO_Exxx */ + +#define FREERTOS_SOCKET_ERROR ( -1 ) +#define FREERTOS_EWOULDBLOCK ( - pdFREERTOS_ERRNO_EWOULDBLOCK ) +#define FREERTOS_EINVAL ( - pdFREERTOS_ERRNO_EINVAL ) +#define FREERTOS_EADDRNOTAVAIL ( - pdFREERTOS_ERRNO_EADDRNOTAVAIL ) +#define FREERTOS_EADDRINUSE ( - pdFREERTOS_ERRNO_EADDRINUSE ) +#define FREERTOS_ENOBUFS ( - pdFREERTOS_ERRNO_ENOBUFS ) +#define FREERTOS_ENOPROTOOPT ( - pdFREERTOS_ERRNO_ENOPROTOOPT ) +#define FREERTOS_ECLOSED ( - pdFREERTOS_ERRNO_ENOTCONN ) + +/* Values for the parameters to FreeRTOS_socket(), inline with the Berkeley +standard. See the documentation of FreeRTOS_socket() for more information. */ +#define FREERTOS_AF_INET ( 2 ) +#define FREERTOS_AF_INET6 ( 10 ) +#define FREERTOS_SOCK_DGRAM ( 2 ) +#define FREERTOS_IPPROTO_UDP ( 17 ) + +#define FREERTOS_SOCK_STREAM ( 1 ) +#define FREERTOS_IPPROTO_TCP ( 6 ) +/* IP packet of type "Any local network" + * can be used in stead of TCP for testing with sockets in raw mode + */ +#define FREERTOS_IPPROTO_USR_LAN ( 63 ) + +/* A bit value that can be passed into the FreeRTOS_sendto() function as part of +the flags parameter. Setting the FREERTOS_ZERO_COPY in the flags parameter +indicates that the zero copy interface is being used. See the documentation for +FreeRTOS_sockets() for more information. */ +#define FREERTOS_ZERO_COPY ( 1 ) + +/* Values that can be passed in the option name parameter of calls to +FreeRTOS_setsockopt(). */ +#define FREERTOS_SO_RCVTIMEO ( 0 ) /* Used to set the receive time out. */ +#define FREERTOS_SO_SNDTIMEO ( 1 ) /* Used to set the send time out. */ +#define FREERTOS_SO_UDPCKSUM_OUT ( 2 ) /* Used to turn the use of the UDP checksum by a socket on or off. This also doubles as part of an 8-bit bitwise socket option. */ +#if( ipconfigSOCKET_HAS_USER_SEMAPHORE == 1 ) + #define FREERTOS_SO_SET_SEMAPHORE ( 3 ) /* Used to set a user's semaphore */ +#endif +#define FREERTOS_SO_SNDBUF ( 4 ) /* Set the size of the send buffer (TCP only) */ +#define FREERTOS_SO_RCVBUF ( 5 ) /* Set the size of the receive buffer (TCP only) */ + +#if ipconfigUSE_CALLBACKS == 1 + #define FREERTOS_SO_TCP_CONN_HANDLER ( 6 ) /* Install a callback for (dis) connection events. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + #define FREERTOS_SO_TCP_RECV_HANDLER ( 7 ) /* Install a callback for receiving TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + #define FREERTOS_SO_TCP_SENT_HANDLER ( 8 ) /* Install a callback for sending TCP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + #define FREERTOS_SO_UDP_RECV_HANDLER ( 9 ) /* Install a callback for receiving UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ + #define FREERTOS_SO_UDP_SENT_HANDLER ( 10 ) /* Install a callback for sending UDP data. Supply pointer to 'F_TCP_UDP_Handler_t' (see below) */ +#endif /* ipconfigUSE_CALLBACKS */ + +#define FREERTOS_SO_REUSE_LISTEN_SOCKET ( 11 ) /* When a listening socket gets connected, do not create a new one but re-use it */ +#define FREERTOS_SO_CLOSE_AFTER_SEND ( 12 ) /* As soon as the last byte has been transmitted, finalise the connection */ +#define FREERTOS_SO_WIN_PROPERTIES ( 13 ) /* Set all buffer and window properties in one call, parameter is pointer to WinProperties_t */ +#define FREERTOS_SO_SET_FULL_SIZE ( 14 ) /* Refuse to send packets smaller than MSS */ + +#define FREERTOS_SO_STOP_RX ( 15 ) /* Temporarily hold up reception, used by streaming client */ + +#if( ipconfigUDP_MAX_RX_PACKETS > 0 ) + #define FREERTOS_SO_UDP_MAX_RX_PACKETS ( 16 ) /* This option helps to limit the maximum number of packets a UDP socket will buffer */ +#endif + +#if( ipconfigSOCKET_HAS_USER_WAKE_CALLBACK == 1 ) + #define FREERTOS_SO_WAKEUP_CALLBACK ( 17 ) +#endif + +#define FREERTOS_SO_SET_LOW_HIGH_WATER ( 18 ) + +#define FREERTOS_NOT_LAST_IN_FRAGMENTED_PACKET ( 0x80 ) /* For internal use only, but also part of an 8-bit bitwise value. */ +#define FREERTOS_FRAGMENTED_PACKET ( 0x40 ) /* For internal use only, but also part of an 8-bit bitwise value. */ + +/* Values for flag for FreeRTOS_shutdown(). */ +#define FREERTOS_SHUT_RD ( 0 ) /* Not really at this moment, just for compatibility of the interface */ +#define FREERTOS_SHUT_WR ( 1 ) +#define FREERTOS_SHUT_RDWR ( 2 ) + +/* Values for flag for FreeRTOS_recv(). */ +#define FREERTOS_MSG_OOB ( 2 ) /* process out-of-band data */ +#define FREERTOS_MSG_PEEK ( 4 ) /* peek at incoming message */ +#define FREERTOS_MSG_DONTROUTE ( 8 ) /* send without using routing tables */ +#define FREERTOS_MSG_DONTWAIT ( 16 ) /* Can be used with recvfrom(), sendto(), recv(), and send(). */ + +typedef struct xWIN_PROPS { + /* Properties of the Tx buffer and Tx window */ + int32_t lTxBufSize; /* Unit: bytes */ + int32_t lTxWinSize; /* Unit: MSS */ + + /* Properties of the Rx buffer and Rx window */ + int32_t lRxBufSize; /* Unit: bytes */ + int32_t lRxWinSize; /* Unit: MSS */ +} WinProperties_t; + +typedef struct xLOW_HIGH_WATER { + /* Structure to pass for the 'FREERTOS_SO_SET_LOW_HIGH_WATER' option */ + size_t uxLittleSpace; /* Send a STOP when buffer space drops below X bytes */ + size_t uxEnoughSpace; /* Send a GO when buffer space grows above X bytes */ +} LowHighWater_t; + +/* For compatibility with the expected Berkeley sockets naming. */ +#define socklen_t uint32_t + +/* For this limited implementation, only two members are required in the +Berkeley style sockaddr structure. */ +struct freertos_sockaddr +{ + /* _HT_ On 32- and 64-bit architectures, the addition of the two uint8_t + fields doesn't make the structure bigger, due to alignment. + The fields are inserted as a preparation for IPv6. */ + + /* sin_len and sin_family not used in the IPv4-only release. */ + uint8_t sin_len; /* length of this structure. */ + uint8_t sin_family; /* FREERTOS_AF_INET. */ + uint16_t sin_port; + uint32_t sin_addr; +}; + +#if ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN + + #define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \ + ( ( ( ( uint32_t ) ( ucOctet3 ) ) << 24UL ) | \ + ( ( ( uint32_t ) ( ucOctet2 ) ) << 16UL ) | \ + ( ( ( uint32_t ) ( ucOctet1 ) ) << 8UL ) | \ + ( ( uint32_t ) ( ucOctet0 ) ) ) + + #define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \ + sprintf( ( char * ) ( pucBuffer ), "%u.%u.%u.%u", \ + ( ( unsigned ) ( ( ulIPAddress ) & 0xffUL ) ), \ + ( ( unsigned ) ( ( ( ulIPAddress ) >> 8 ) & 0xffUL ) ), \ + ( ( unsigned ) ( ( ( ulIPAddress ) >> 16 ) & 0xffUL ) ),\ + ( ( unsigned ) ( ( ulIPAddress ) >> 24 ) ) ) + +#else /* ipconfigBYTE_ORDER */ + + #define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \ + ( ( ( ( uint32_t ) ( ucOctet0 ) ) << 24UL ) | \ + ( ( ( uint32_t ) ( ucOctet1 ) ) << 16UL ) | \ + ( ( ( uint32_t ) ( ucOctet2 ) ) << 8UL ) | \ + ( ( uint32_t ) ( ucOctet3 ) ) ) + + #define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \ + sprintf( ( char * ) ( pucBuffer ), "%u.%u.%u.%u", \ + ( ( unsigned ) ( ( ulIPAddress ) >> 24 ) ), \ + ( ( unsigned ) ( ( ( ulIPAddress ) >> 16 ) & 0xffUL ) ),\ + ( ( unsigned ) ( ( ( ulIPAddress ) >> 8 ) & 0xffUL ) ), \ + ( ( unsigned ) ( ( ulIPAddress ) & 0xffUL ) ) ) + +#endif /* ipconfigBYTE_ORDER */ + +/* The socket type itself. */ +struct xSOCKET; +typedef struct xSOCKET *Socket_t; + +/* The SocketSet_t type is the equivalent to the fd_set type used by the +Berkeley API. */ +struct xSOCKET_SET; +typedef struct xSOCKET_SET *SocketSet_t; + +/** + * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE + * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_TCP_API_Functions.html + */ +Socket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol ); +int32_t FreeRTOS_recvfrom( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags, struct freertos_sockaddr *pxSourceAddress, socklen_t *pxSourceAddressLength ); +int32_t FreeRTOS_sendto( Socket_t xSocket, const void *pvBuffer, size_t xTotalDataLength, BaseType_t xFlags, const struct freertos_sockaddr *pxDestinationAddress, socklen_t xDestinationAddressLength ); +BaseType_t FreeRTOS_bind( Socket_t xSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ); + +/* function to get the local address and IP port */ +size_t FreeRTOS_GetLocalAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ); + +/* Made available when ipconfigETHERNET_DRIVER_FILTERS_PACKETS is set to 1. */ +BaseType_t xPortHasUDPSocket( uint16_t usPortNr ); + +#if ipconfigUSE_TCP == 1 + +BaseType_t FreeRTOS_connect( Socket_t xClientSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ); +BaseType_t FreeRTOS_listen( Socket_t xSocket, BaseType_t xBacklog ); +BaseType_t FreeRTOS_recv( Socket_t xSocket, void *pvBuffer, size_t xBufferLength, BaseType_t xFlags ); +BaseType_t FreeRTOS_send( Socket_t xSocket, const void *pvBuffer, size_t uxDataLength, BaseType_t xFlags ); +Socket_t FreeRTOS_accept( Socket_t xServerSocket, struct freertos_sockaddr *pxAddress, socklen_t *pxAddressLength ); +BaseType_t FreeRTOS_shutdown (Socket_t xSocket, BaseType_t xHow); + +#if( ipconfigSUPPORT_SIGNALS != 0 ) + /* Send a signal to the task which is waiting for a given socket. */ + BaseType_t FreeRTOS_SignalSocket( Socket_t xSocket ); + + /* Send a signal to the task which reads from this socket (FromISR + version). */ + BaseType_t FreeRTOS_SignalSocketFromISR( Socket_t xSocket, BaseType_t *pxHigherPriorityTaskWoken ); +#endif /* ipconfigSUPPORT_SIGNALS */ + +/* Return the remote address and IP port. */ +BaseType_t FreeRTOS_GetRemoteAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress ); + +/* returns pdTRUE if TCP socket is connected */ +BaseType_t FreeRTOS_issocketconnected( Socket_t xSocket ); + +/* returns the actual size of MSS being used */ +BaseType_t FreeRTOS_mss( Socket_t xSocket ); + +/* for internal use only: return the connection status */ +BaseType_t FreeRTOS_connstatus( Socket_t xSocket ); + +/* Returns the number of bytes that may be added to txStream */ +BaseType_t FreeRTOS_maywrite( Socket_t xSocket ); + +/* + * Two helper functions, mostly for testing + * rx_size returns the number of bytes available in the Rx buffer + * tx_space returns the free space in the Tx buffer + */ +BaseType_t FreeRTOS_rx_size( Socket_t xSocket ); +BaseType_t FreeRTOS_tx_space( Socket_t xSocket ); +BaseType_t FreeRTOS_tx_size( Socket_t xSocket ); + +/* Returns the number of outstanding bytes in txStream. */ +/* The function FreeRTOS_outstanding() was already implemented +FreeRTOS_tx_size(). */ +#define FreeRTOS_outstanding( xSocket ) FreeRTOS_tx_size( xSocket ) + +/* Returns the number of bytes in the socket's rxStream. */ +/* The function FreeRTOS_recvcount() was already implemented +FreeRTOS_rx_size(). */ +#define FreeRTOS_recvcount( xSocket ) FreeRTOS_rx_size( xSocket ) + +/* + * For advanced applications only: + * Get a direct pointer to the circular transmit buffer. + * '*pxLength' will contain the number of bytes that may be written. + */ +uint8_t *FreeRTOS_get_tx_head( Socket_t xSocket, BaseType_t *pxLength ); + +#endif /* ipconfigUSE_TCP */ + +/* + * Connect / disconnect handler for a TCP socket + * For example: + * static void vMyConnectHandler (Socket_t xSocket, BaseType_t ulConnected) + * { + * } + * F_TCP_UDP_Handler_t xHnd = { vMyConnectHandler }; + * FreeRTOS_setsockopt( sock, 0, FREERTOS_SO_TCP_CONN_HANDLER, ( void * ) &xHnd, sizeof( xHnd ) ); + */ + +typedef void (* FOnConnected_t )( Socket_t /* xSocket */, BaseType_t /* ulConnected */ ); + +/* + * Reception handler for a TCP socket + * A user-proved function will be called on reception of a message + * If the handler returns a positive number, the messages will not be stored + * For example: + * static BaseType_t xOnTCPReceive( Socket_t xSocket, void * pData, size_t xLength ) + * { + * // handle the message + * return 1; + * } + * F_TCP_UDP_Handler_t xHand = { xOnTCPReceive }; + * FreeRTOS_setsockopt( sock, 0, FREERTOS_SO_TCP_RECV_HANDLER, ( void * ) &xHand, sizeof( xHand ) ); + */ +typedef BaseType_t (* FOnTCPReceive_t )( Socket_t /* xSocket */, void * /* pData */, size_t /* xLength */ ); +typedef void (* FOnTCPSent_t )( Socket_t /* xSocket */, size_t /* xLength */ ); + +/* + * Reception handler for a UDP socket + * A user-proved function will be called on reception of a message + * If the handler returns a positive number, the messages will not be stored + */ +typedef BaseType_t (* FOnUDPReceive_t ) (Socket_t /* xSocket */, void * /* pData */, size_t /* xLength */, + const struct freertos_sockaddr * /* pxFrom */, const struct freertos_sockaddr * /* pxDest */ ); +typedef void (* FOnUDPSent_t )( Socket_t /* xSocket */, size_t /* xLength */ ); + + +typedef union xTCP_UDP_HANDLER +{ + FOnConnected_t pxOnTCPConnected; /* FREERTOS_SO_TCP_CONN_HANDLER */ + FOnTCPReceive_t pxOnTCPReceive; /* FREERTOS_SO_TCP_RECV_HANDLER */ + FOnTCPSent_t pxOnTCPSent; /* FREERTOS_SO_TCP_SENT_HANDLER */ + FOnUDPReceive_t pxOnUDPReceive; /* FREERTOS_SO_UDP_RECV_HANDLER */ + FOnUDPSent_t pxOnUDPSent; /* FREERTOS_SO_UDP_SENT_HANDLER */ +} F_TCP_UDP_Handler_t; + +BaseType_t FreeRTOS_setsockopt( Socket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ); +BaseType_t FreeRTOS_closesocket( Socket_t xSocket ); +uint32_t FreeRTOS_gethostbyname( const char *pcHostName ); +uint32_t FreeRTOS_inet_addr( const char * pcIPAddress ); + +/* + * For the web server: borrow the circular Rx buffer for inspection + * HTML driver wants to see if a sequence of 13/10/13/10 is available + */ +const struct xSTREAM_BUFFER *FreeRTOS_get_rx_buf( Socket_t xSocket ); + +void FreeRTOS_netstat( void ); + +#if ipconfigSUPPORT_SELECT_FUNCTION == 1 + + /* For FD_SET and FD_CLR, a combination of the following bits can be used: */ + + typedef enum eSELECT_EVENT { + eSELECT_READ = 0x0001, + eSELECT_WRITE = 0x0002, + eSELECT_EXCEPT = 0x0004, + eSELECT_INTR = 0x0008, + eSELECT_ALL = 0x000F, + /* Reserved for internal use: */ + eSELECT_CALL_IP = 0x0010, + /* end */ + } eSelectEvent_t; + + SocketSet_t FreeRTOS_CreateSocketSet( void ); + void FreeRTOS_DeleteSocketSet( SocketSet_t xSocketSet ); + void FreeRTOS_FD_SET( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xBitsToSet ); + void FreeRTOS_FD_CLR( Socket_t xSocket, SocketSet_t xSocketSet, EventBits_t xBitsToClear ); + EventBits_t FreeRTOS_FD_ISSET( Socket_t xSocket, SocketSet_t xSocketSet ); + BaseType_t FreeRTOS_select( SocketSet_t xSocketSet, TickType_t xBlockTimeTicks ); + +#endif /* ipconfigSUPPORT_SELECT_FUNCTION */ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* FREERTOS_SOCKETS_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Stream_Buffer.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Stream_Buffer.h index 95bbbdf0a..9698227c6 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Stream_Buffer.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Stream_Buffer.h @@ -1,231 +1,231 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* - * FreeRTOS_Stream_Buffer.h - * - * A cicular character buffer - * An implementation of a circular buffer without a length field - * If LENGTH defines the size of the buffer, a maximum of (LENGT-1) bytes can be stored - * In order to add or read data from the buffer, memcpy() will be called at most 2 times - */ - -#ifndef FREERTOS_STREAM_BUFFER_H -#define FREERTOS_STREAM_BUFFER_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct xSTREAM_BUFFER { - volatile size_t uxTail; /* next item to read */ - volatile size_t uxMid; /* iterator within the valid items */ - volatile size_t uxHead; /* next position store a new item */ - volatile size_t uxFront; /* iterator within the free space */ - size_t LENGTH; /* const value: number of reserved elements */ - uint8_t ucArray[ sizeof( size_t ) ]; -} StreamBuffer_t; - -static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer ); -static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer ) -{ - /* Make the circular buffer empty */ - pxBuffer->uxHead = 0u; - pxBuffer->uxTail = 0u; - pxBuffer->uxFront = 0u; - pxBuffer->uxMid = 0u; -} -/*-----------------------------------------------------------*/ - -static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ); -static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ) -{ -/* Returns the space between uxLower and uxUpper, which equals to the distance minus 1 */ -size_t uxCount; - - uxCount = pxBuffer->LENGTH + uxUpper - uxLower - 1u; - if( uxCount >= pxBuffer->LENGTH ) - { - uxCount -= pxBuffer->LENGTH; - } - - return uxCount; -} -/*-----------------------------------------------------------*/ - -static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ); -static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ) -{ -/* Returns the distance between uxLower and uxUpper */ -size_t uxCount; - - uxCount = pxBuffer->LENGTH + uxUpper - uxLower; - if ( uxCount >= pxBuffer->LENGTH ) - { - uxCount -= pxBuffer->LENGTH; - } - - return uxCount; -} -/*-----------------------------------------------------------*/ - -static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer ); -static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer ) -{ -/* Returns the number of items which can still be added to uxHead -before hitting on uxTail */ -size_t uxHead = pxBuffer->uxHead; -size_t uxTail = pxBuffer->uxTail; - - return uxStreamBufferSpace( pxBuffer, uxHead, uxTail ); -} -/*-----------------------------------------------------------*/ - -static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer ); -static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer ) -{ -/* Distance between uxFront and uxTail -or the number of items which can still be added to uxFront, -before hitting on uxTail */ - -size_t uxFront = pxBuffer->uxFront; -size_t uxTail = pxBuffer->uxTail; - - return uxStreamBufferSpace( pxBuffer, uxFront, uxTail ); -} -/*-----------------------------------------------------------*/ - -static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer ); -static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer ) -{ -/* Returns the number of items which can be read from uxTail -before reaching uxHead */ -size_t uxHead = pxBuffer->uxHead; -size_t uxTail = pxBuffer->uxTail; - - return uxStreamBufferDistance( pxBuffer, uxTail, uxHead ); -} -/*-----------------------------------------------------------*/ - -static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer ); -static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer ) -{ -/* Returns the distance between uxHead and uxMid */ -size_t uxHead = pxBuffer->uxHead; -size_t uxMid = pxBuffer->uxMid; - - return uxStreamBufferDistance( pxBuffer, uxMid, uxHead ); -} -/*-----------------------------------------------------------*/ - -static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount ); -static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount ) -{ -/* Increment uxMid, but no further than uxHead */ -size_t uxSize = uxStreamBufferMidSpace( pxBuffer ); - - if( uxCount > uxSize ) - { - uxCount = uxSize; - } - pxBuffer->uxMid += uxCount; - if( pxBuffer->uxMid >= pxBuffer->LENGTH ) - { - pxBuffer->uxMid -= pxBuffer->LENGTH; - } -} -/*-----------------------------------------------------------*/ - -static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight ); -static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight ) -{ -BaseType_t xReturn; -size_t uxTail = pxBuffer->uxTail; - - /* Returns true if ( uxLeft < uxRight ) */ - if( ( uxLeft < uxTail ) ^ ( uxRight < uxTail ) ) - { - if( uxRight < uxTail ) - { - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - } - else - { - if( uxLeft <= uxRight ) - { - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - } - return xReturn; -} -/*-----------------------------------------------------------*/ - -static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData ); -static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData ) -{ -size_t uxNextTail = pxBuffer->uxTail; -size_t uxSize = uxStreamBufferGetSize( pxBuffer ); - - *ppucData = pxBuffer->ucArray + uxNextTail; - - return FreeRTOS_min_uint32( uxSize, pxBuffer->LENGTH - uxNextTail ); -} - -/* - * Add bytes to a stream buffer. - * - * pxBuffer - The buffer to which the bytes will be added. - * uxOffset - If uxOffset > 0, data will be written at an offset from uxHead - * while uxHead will not be moved yet. - * pucData - A pointer to the data to be added. - * uxCount - The number of bytes to add. - */ -size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount ); - -/* - * Read bytes from a stream buffer. - * - * pxBuffer - The buffer from which the bytes will be read. - * uxOffset - Can be used to read data located at a certain offset from 'uxTail'. - * pucData - A pointer to the buffer into which data will be read. - * uxMaxCount - The number of bytes to read. - * xPeek - If set to pdTRUE the data will remain in the buffer. - */ -size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* !defined( FREERTOS_STREAM_BUFFER_H ) */ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* + * FreeRTOS_Stream_Buffer.h + * + * A cicular character buffer + * An implementation of a circular buffer without a length field + * If LENGTH defines the size of the buffer, a maximum of (LENGT-1) bytes can be stored + * In order to add or read data from the buffer, memcpy() will be called at most 2 times + */ + +#ifndef FREERTOS_STREAM_BUFFER_H +#define FREERTOS_STREAM_BUFFER_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct xSTREAM_BUFFER { + volatile size_t uxTail; /* next item to read */ + volatile size_t uxMid; /* iterator within the valid items */ + volatile size_t uxHead; /* next position store a new item */ + volatile size_t uxFront; /* iterator within the free space */ + size_t LENGTH; /* const value: number of reserved elements */ + uint8_t ucArray[ sizeof( size_t ) ]; +} StreamBuffer_t; + +static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer ); +static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer ) +{ + /* Make the circular buffer empty */ + pxBuffer->uxHead = 0u; + pxBuffer->uxTail = 0u; + pxBuffer->uxFront = 0u; + pxBuffer->uxMid = 0u; +} +/*-----------------------------------------------------------*/ + +static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ); +static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ) +{ +/* Returns the space between uxLower and uxUpper, which equals to the distance minus 1 */ +size_t uxCount; + + uxCount = pxBuffer->LENGTH + uxUpper - uxLower - 1u; + if( uxCount >= pxBuffer->LENGTH ) + { + uxCount -= pxBuffer->LENGTH; + } + + return uxCount; +} +/*-----------------------------------------------------------*/ + +static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ); +static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper ) +{ +/* Returns the distance between uxLower and uxUpper */ +size_t uxCount; + + uxCount = pxBuffer->LENGTH + uxUpper - uxLower; + if ( uxCount >= pxBuffer->LENGTH ) + { + uxCount -= pxBuffer->LENGTH; + } + + return uxCount; +} +/*-----------------------------------------------------------*/ + +static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer ); +static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer ) +{ +/* Returns the number of items which can still be added to uxHead +before hitting on uxTail */ +size_t uxHead = pxBuffer->uxHead; +size_t uxTail = pxBuffer->uxTail; + + return uxStreamBufferSpace( pxBuffer, uxHead, uxTail ); +} +/*-----------------------------------------------------------*/ + +static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer ); +static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer ) +{ +/* Distance between uxFront and uxTail +or the number of items which can still be added to uxFront, +before hitting on uxTail */ + +size_t uxFront = pxBuffer->uxFront; +size_t uxTail = pxBuffer->uxTail; + + return uxStreamBufferSpace( pxBuffer, uxFront, uxTail ); +} +/*-----------------------------------------------------------*/ + +static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer ); +static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer ) +{ +/* Returns the number of items which can be read from uxTail +before reaching uxHead */ +size_t uxHead = pxBuffer->uxHead; +size_t uxTail = pxBuffer->uxTail; + + return uxStreamBufferDistance( pxBuffer, uxTail, uxHead ); +} +/*-----------------------------------------------------------*/ + +static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer ); +static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer ) +{ +/* Returns the distance between uxHead and uxMid */ +size_t uxHead = pxBuffer->uxHead; +size_t uxMid = pxBuffer->uxMid; + + return uxStreamBufferDistance( pxBuffer, uxMid, uxHead ); +} +/*-----------------------------------------------------------*/ + +static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount ); +static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount ) +{ +/* Increment uxMid, but no further than uxHead */ +size_t uxSize = uxStreamBufferMidSpace( pxBuffer ); + + if( uxCount > uxSize ) + { + uxCount = uxSize; + } + pxBuffer->uxMid += uxCount; + if( pxBuffer->uxMid >= pxBuffer->LENGTH ) + { + pxBuffer->uxMid -= pxBuffer->LENGTH; + } +} +/*-----------------------------------------------------------*/ + +static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight ); +static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight ) +{ +BaseType_t xReturn; +size_t uxTail = pxBuffer->uxTail; + + /* Returns true if ( uxLeft < uxRight ) */ + if( ( uxLeft < uxTail ) ^ ( uxRight < uxTail ) ) + { + if( uxRight < uxTail ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + } + else + { + if( uxLeft <= uxRight ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + } + return xReturn; +} +/*-----------------------------------------------------------*/ + +static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData ); +static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData ) +{ +size_t uxNextTail = pxBuffer->uxTail; +size_t uxSize = uxStreamBufferGetSize( pxBuffer ); + + *ppucData = pxBuffer->ucArray + uxNextTail; + + return FreeRTOS_min_uint32( uxSize, pxBuffer->LENGTH - uxNextTail ); +} + +/* + * Add bytes to a stream buffer. + * + * pxBuffer - The buffer to which the bytes will be added. + * uxOffset - If uxOffset > 0, data will be written at an offset from uxHead + * while uxHead will not be moved yet. + * pucData - A pointer to the data to be added. + * uxCount - The number of bytes to add. + */ +size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount ); + +/* + * Read bytes from a stream buffer. + * + * pxBuffer - The buffer from which the bytes will be read. + * uxOffset - Can be used to read data located at a certain offset from 'uxTail'. + * pucData - A pointer to the buffer into which data will be read. + * uxMaxCount - The number of bytes to read. + * xPeek - If set to pdTRUE the data will remain in the buffer. + */ +size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !defined( FREERTOS_STREAM_BUFFER_H ) */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_IP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_IP.h index 76738c460..e26edf653 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_IP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_IP.h @@ -1,80 +1,80 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_TCP_IP_H -#define FREERTOS_TCP_IP_H - -#ifdef __cplusplus -extern "C" { -#endif - -BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer ); - -typedef enum eTCP_STATE { - /* Comments about the TCP states are borrowed from the very useful - * Wiki page: - * http://en.wikipedia.org/wiki/Transmission_Control_Protocol */ - eCLOSED = 0u, /* 0 (server + client) no connection state at all. */ - eTCP_LISTEN, /* 1 (server) waiting for a connection request - from any remote TCP and port. */ - eCONNECT_SYN, /* 2 (client) internal state: socket wants to send - a connect */ - eSYN_FIRST, /* 3 (server) Just created, must ACK the SYN request. */ - eSYN_RECEIVED, /* 4 (server) waiting for a confirming connection request - acknowledgement after having both received and sent a connection request. */ - eESTABLISHED, /* 5 (server + client) an open connection, data received can be - delivered to the user. The normal state for the data transfer phase of the connection. */ - eFIN_WAIT_1, /* 6 (server + client) waiting for a connection termination request from the remote TCP, - or an acknowledgement of the connection termination request previously sent. */ - eFIN_WAIT_2, /* 7 (server + client) waiting for a connection termination request from the remote TCP. */ - eCLOSE_WAIT, /* 8 (server + client) waiting for a connection termination request from the local user. */ - eCLOSING, /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */ - eLAST_ACK, /* 9 (server + client) waiting for an acknowledgement of the connection termination request - previously sent to the remote TCP - (which includes an acknowledgement of its connection termination request). */ - eTIME_WAIT, /* 10 (either server or client) waiting for enough time to pass to be sure the remote TCP received the - acknowledgement of its connection termination request. [According to RFC 793 a connection can - stay in TIME-WAIT for a maximum of four minutes known as a MSL (maximum segment lifetime).] */ -} eIPTCPState_t; - - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* FREERTOS_TCP_IP_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_TCP_IP_H +#define FREERTOS_TCP_IP_H + +#ifdef __cplusplus +extern "C" { +#endif + +BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer ); + +typedef enum eTCP_STATE { + /* Comments about the TCP states are borrowed from the very useful + * Wiki page: + * http://en.wikipedia.org/wiki/Transmission_Control_Protocol */ + eCLOSED = 0u, /* 0 (server + client) no connection state at all. */ + eTCP_LISTEN, /* 1 (server) waiting for a connection request + from any remote TCP and port. */ + eCONNECT_SYN, /* 2 (client) internal state: socket wants to send + a connect */ + eSYN_FIRST, /* 3 (server) Just created, must ACK the SYN request. */ + eSYN_RECEIVED, /* 4 (server) waiting for a confirming connection request + acknowledgement after having both received and sent a connection request. */ + eESTABLISHED, /* 5 (server + client) an open connection, data received can be + delivered to the user. The normal state for the data transfer phase of the connection. */ + eFIN_WAIT_1, /* 6 (server + client) waiting for a connection termination request from the remote TCP, + or an acknowledgement of the connection termination request previously sent. */ + eFIN_WAIT_2, /* 7 (server + client) waiting for a connection termination request from the remote TCP. */ + eCLOSE_WAIT, /* 8 (server + client) waiting for a connection termination request from the local user. */ + eCLOSING, /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */ + eLAST_ACK, /* 9 (server + client) waiting for an acknowledgement of the connection termination request + previously sent to the remote TCP + (which includes an acknowledgement of its connection termination request). */ + eTIME_WAIT, /* 10 (either server or client) waiting for enough time to pass to be sure the remote TCP received the + acknowledgement of its connection termination request. [According to RFC 793 a connection can + stay in TIME-WAIT for a maximum of four minutes known as a MSL (maximum segment lifetime).] */ +} eIPTCPState_t; + + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* FREERTOS_TCP_IP_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_WIN.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_WIN.h index 9532fd159..1cb7eebc0 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_WIN.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_WIN.h @@ -1,213 +1,213 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* - * FreeRTOS_TCP_WIN.c - * Module which handles the TCP windowing schemes for FreeRTOS-PLUS-TCP - */ - -#ifndef FREERTOS_TCP_WIN_H -#define FREERTOS_TCP_WIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern BaseType_t xTCPWindowLoggingLevel; - -typedef struct xTCPTimer -{ - uint32_t ulBorn; -} TCPTimer_t; - -typedef struct xTCP_SEGMENT -{ - uint32_t ulSequenceNumber; /* The sequence number of the first byte in this packet */ - int32_t lMaxLength; /* Maximum space, number of bytes which can be stored in this segment */ - int32_t lDataLength; /* Actual number of bytes */ - int32_t lStreamPos; /* reference to the [t|r]xStream of the socket */ - TCPTimer_t xTransmitTimer; /* saves a timestamp at the moment this segment gets transmitted (TX only) */ - union - { - struct - { - uint32_t - ucTransmitCount : 8,/* Number of times the segment has been transmitted, used to calculate the RTT */ - ucDupAckCount : 8, /* Counts the number of times that a higher segment was ACK'd. After 3 times a Fast Retransmission takes place */ - bOutstanding : 1, /* It the peer's turn, we're just waiting for an ACK */ - bAcked : 1, /* This segment has been acknowledged */ - bIsForRx : 1; /* pdTRUE if segment is used for reception */ - } bits; - uint32_t ulFlags; - } u; -#if( ipconfigUSE_TCP_WIN != 0 ) - struct xLIST_ITEM xQueueItem; /* TX only: segments can be linked in one of three queues: xPriorityQueue, xTxQueue, and xWaitQueue */ - struct xLIST_ITEM xListItem; /* With this item the segment can be connected to a list, depending on who is owning it */ -#endif -} TCPSegment_t; - -typedef struct xTCP_WINSIZE -{ - uint32_t ulRxWindowLength; - uint32_t ulTxWindowLength; -} TCPWinSize_t; - -/* - * If TCP time-stamps are being used, they will occupy 12 bytes in - * each packet, and thus the message space will become smaller - */ -/* Keep this as a multiple of 4 */ -#if( ipconfigUSE_TCP_WIN == 1 ) - #define ipSIZE_TCP_OPTIONS 16u -#else - #define ipSIZE_TCP_OPTIONS 12u -#endif - -/* - * Every TCP connection owns a TCP window for the administration of all packets - * It owns two sets of segment descriptors, incoming and outgoing - */ -typedef struct xTCP_WINDOW -{ - union - { - struct - { - uint32_t - bHasInit : 1, /* The window structure has been initialised */ - bSendFullSize : 1, /* May only send packets with a size equal to MSS (for optimisation) */ - bTimeStamps : 1; /* Socket is supposed to use TCP time-stamps. This depends on the */ - } bits; /* party which opens the connection */ - uint32_t ulFlags; - } u; - TCPWinSize_t xSize; - struct - { - uint32_t ulFirstSequenceNumber; /* Logging & debug: the first segment received/sent in this connection - * for Tx: initial send sequence number (ISS) - * for Rx: initial receive sequence number (IRS) */ - uint32_t ulCurrentSequenceNumber;/* Tx/Rx: the oldest sequence number not yet confirmed, also SND.UNA / RCV.NXT - * In other words: the sequence number of the left side of the sliding window */ - uint32_t ulFINSequenceNumber; /* The sequence number which carried the FIN flag */ - uint32_t ulHighestSequenceNumber;/* Sequence number of the right-most byte + 1 */ - } rx, tx; - uint32_t ulOurSequenceNumber; /* The SEQ number we're sending out */ - uint32_t ulUserDataLength; /* Number of bytes in Rx buffer which may be passed to the user, after having received a 'missing packet' */ - uint32_t ulNextTxSequenceNumber; /* The sequence number given to the next byte to be added for transmission */ - int32_t lSRTT; /* Smoothed Round Trip Time, it may increment quickly and it decrements slower */ - uint8_t ucOptionLength; /* Number of valid bytes in ulOptionsData[] */ -#if( ipconfigUSE_TCP_WIN == 1 ) - List_t xPriorityQueue; /* Priority queue: segments which must be sent immediately */ - List_t xTxQueue; /* Transmit queue: segments queued for transmission */ - List_t xWaitQueue; /* Waiting queue: outstanding segments */ - TCPSegment_t *pxHeadSegment; /* points to a segment which has not been transmitted and it's size is still growing (user data being added) */ - uint32_t ulOptionsData[ipSIZE_TCP_OPTIONS/sizeof(uint32_t)]; /* Contains the options we send out */ - List_t xTxSegments; /* A linked list of all transmission segments, sorted on sequence number */ - List_t xRxSegments; /* A linked list of reception segments, order depends on sequence of arrival */ -#else - /* For tiny TCP, there is only 1 outstanding TX segment */ - TCPSegment_t xTxSegment; /* Priority queue */ -#endif - uint16_t usOurPortNumber; /* Mostly for debugging/logging: our TCP port number */ - uint16_t usPeerPortNumber; /* debugging/logging: the peer's TCP port number */ - uint16_t usMSS; /* Current accepted MSS */ - uint16_t usMSSInit; /* MSS as configured by the socket owner */ -} TCPWindow_t; - - -/*============================================================================= - * - * Creation and destruction - * - *=============================================================================*/ - -/* Create and initialize a window */ -void vTCPWindowCreate( TCPWindow_t *pxWindow, uint32_t ulRxWindowLength, - uint32_t ulTxWindowLength, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ); - -/* Destroy a window (always returns NULL) - * It will free some resources: a collection of segments */ -void vTCPWindowDestroy( TCPWindow_t *pxWindow ); - -/* Initialize a window */ -void vTCPWindowInit( TCPWindow_t *pxWindow, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ); - -/* Clean up allocated segments. Should only be called when FreeRTOS+TCP will no longer be used. */ -void vTCPSegmentCleanup( void ); - -/*============================================================================= - * - * Rx functions - * - *=============================================================================*/ - -/* if true may be passed directly to user (segment expected and window is empty) - * But pxWindow->ackno should always be used to set "BUF->ackno" */ -int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace ); - -/* When lTCPWindowRxCheck returned false, please call store for this unexpected data */ -BaseType_t xTCPWindowRxStore( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength ); - -/* This function will be called as soon as a FIN is received. It will return true - * if there are no 'open' reception segments */ -BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ); - -/* _HT_ Temporary function for testing/debugging - * Not used at this moment */ -void vTCPWinShowSegments( TCPWindow_t *pxWindow, BaseType_t bForRx ); - -/*============================================================================= - * - * Tx functions - * - *=============================================================================*/ - -/* Adds data to the Tx-window */ -int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax ); - -/* Check data to be sent and calculate the time period we may sleep */ -BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay ); - -/* See if anything is left to be sent - * Function will be called when a FIN has been received. Only when the TX window is clean, - * it will return pdTRUE */ -BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow ); - -/* Fetches data to be sent. - * apPos will point to a location with the circular data buffer: txStream */ -uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition ); - -/* Receive a normal ACK */ -uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ); - -/* Receive a SACK option */ -uint32_t ulTCPWindowTxSack( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* FREERTOS_TCP_WIN_H */ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* + * FreeRTOS_TCP_WIN.c + * Module which handles the TCP windowing schemes for FreeRTOS-PLUS-TCP + */ + +#ifndef FREERTOS_TCP_WIN_H +#define FREERTOS_TCP_WIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern BaseType_t xTCPWindowLoggingLevel; + +typedef struct xTCPTimer +{ + uint32_t ulBorn; +} TCPTimer_t; + +typedef struct xTCP_SEGMENT +{ + uint32_t ulSequenceNumber; /* The sequence number of the first byte in this packet */ + int32_t lMaxLength; /* Maximum space, number of bytes which can be stored in this segment */ + int32_t lDataLength; /* Actual number of bytes */ + int32_t lStreamPos; /* reference to the [t|r]xStream of the socket */ + TCPTimer_t xTransmitTimer; /* saves a timestamp at the moment this segment gets transmitted (TX only) */ + union + { + struct + { + uint32_t + ucTransmitCount : 8,/* Number of times the segment has been transmitted, used to calculate the RTT */ + ucDupAckCount : 8, /* Counts the number of times that a higher segment was ACK'd. After 3 times a Fast Retransmission takes place */ + bOutstanding : 1, /* It the peer's turn, we're just waiting for an ACK */ + bAcked : 1, /* This segment has been acknowledged */ + bIsForRx : 1; /* pdTRUE if segment is used for reception */ + } bits; + uint32_t ulFlags; + } u; +#if( ipconfigUSE_TCP_WIN != 0 ) + struct xLIST_ITEM xQueueItem; /* TX only: segments can be linked in one of three queues: xPriorityQueue, xTxQueue, and xWaitQueue */ + struct xLIST_ITEM xListItem; /* With this item the segment can be connected to a list, depending on who is owning it */ +#endif +} TCPSegment_t; + +typedef struct xTCP_WINSIZE +{ + uint32_t ulRxWindowLength; + uint32_t ulTxWindowLength; +} TCPWinSize_t; + +/* + * If TCP time-stamps are being used, they will occupy 12 bytes in + * each packet, and thus the message space will become smaller + */ +/* Keep this as a multiple of 4 */ +#if( ipconfigUSE_TCP_WIN == 1 ) + #define ipSIZE_TCP_OPTIONS 16u +#else + #define ipSIZE_TCP_OPTIONS 12u +#endif + +/* + * Every TCP connection owns a TCP window for the administration of all packets + * It owns two sets of segment descriptors, incoming and outgoing + */ +typedef struct xTCP_WINDOW +{ + union + { + struct + { + uint32_t + bHasInit : 1, /* The window structure has been initialised */ + bSendFullSize : 1, /* May only send packets with a size equal to MSS (for optimisation) */ + bTimeStamps : 1; /* Socket is supposed to use TCP time-stamps. This depends on the */ + } bits; /* party which opens the connection */ + uint32_t ulFlags; + } u; + TCPWinSize_t xSize; + struct + { + uint32_t ulFirstSequenceNumber; /* Logging & debug: the first segment received/sent in this connection + * for Tx: initial send sequence number (ISS) + * for Rx: initial receive sequence number (IRS) */ + uint32_t ulCurrentSequenceNumber;/* Tx/Rx: the oldest sequence number not yet confirmed, also SND.UNA / RCV.NXT + * In other words: the sequence number of the left side of the sliding window */ + uint32_t ulFINSequenceNumber; /* The sequence number which carried the FIN flag */ + uint32_t ulHighestSequenceNumber;/* Sequence number of the right-most byte + 1 */ + } rx, tx; + uint32_t ulOurSequenceNumber; /* The SEQ number we're sending out */ + uint32_t ulUserDataLength; /* Number of bytes in Rx buffer which may be passed to the user, after having received a 'missing packet' */ + uint32_t ulNextTxSequenceNumber; /* The sequence number given to the next byte to be added for transmission */ + int32_t lSRTT; /* Smoothed Round Trip Time, it may increment quickly and it decrements slower */ + uint8_t ucOptionLength; /* Number of valid bytes in ulOptionsData[] */ +#if( ipconfigUSE_TCP_WIN == 1 ) + List_t xPriorityQueue; /* Priority queue: segments which must be sent immediately */ + List_t xTxQueue; /* Transmit queue: segments queued for transmission */ + List_t xWaitQueue; /* Waiting queue: outstanding segments */ + TCPSegment_t *pxHeadSegment; /* points to a segment which has not been transmitted and it's size is still growing (user data being added) */ + uint32_t ulOptionsData[ipSIZE_TCP_OPTIONS/sizeof(uint32_t)]; /* Contains the options we send out */ + List_t xTxSegments; /* A linked list of all transmission segments, sorted on sequence number */ + List_t xRxSegments; /* A linked list of reception segments, order depends on sequence of arrival */ +#else + /* For tiny TCP, there is only 1 outstanding TX segment */ + TCPSegment_t xTxSegment; /* Priority queue */ +#endif + uint16_t usOurPortNumber; /* Mostly for debugging/logging: our TCP port number */ + uint16_t usPeerPortNumber; /* debugging/logging: the peer's TCP port number */ + uint16_t usMSS; /* Current accepted MSS */ + uint16_t usMSSInit; /* MSS as configured by the socket owner */ +} TCPWindow_t; + + +/*============================================================================= + * + * Creation and destruction + * + *=============================================================================*/ + +/* Create and initialize a window */ +void vTCPWindowCreate( TCPWindow_t *pxWindow, uint32_t ulRxWindowLength, + uint32_t ulTxWindowLength, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ); + +/* Destroy a window (always returns NULL) + * It will free some resources: a collection of segments */ +void vTCPWindowDestroy( TCPWindow_t *pxWindow ); + +/* Initialize a window */ +void vTCPWindowInit( TCPWindow_t *pxWindow, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS ); + +/* Clean up allocated segments. Should only be called when FreeRTOS+TCP will no longer be used. */ +void vTCPSegmentCleanup( void ); + +/*============================================================================= + * + * Rx functions + * + *=============================================================================*/ + +/* if true may be passed directly to user (segment expected and window is empty) + * But pxWindow->ackno should always be used to set "BUF->ackno" */ +int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace ); + +/* When lTCPWindowRxCheck returned false, please call store for this unexpected data */ +BaseType_t xTCPWindowRxStore( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength ); + +/* This function will be called as soon as a FIN is received. It will return true + * if there are no 'open' reception segments */ +BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow ); + +/* _HT_ Temporary function for testing/debugging + * Not used at this moment */ +void vTCPWinShowSegments( TCPWindow_t *pxWindow, BaseType_t bForRx ); + +/*============================================================================= + * + * Tx functions + * + *=============================================================================*/ + +/* Adds data to the Tx-window */ +int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax ); + +/* Check data to be sent and calculate the time period we may sleep */ +BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay ); + +/* See if anything is left to be sent + * Function will be called when a FIN has been received. Only when the TX window is clean, + * it will return pdTRUE */ +BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow ); + +/* Fetches data to be sent. + * apPos will point to a location with the circular data buffer: txStream */ +uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition ); + +/* Receive a normal ACK */ +uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber ); + +/* Receive a SACK option */ +uint32_t ulTCPWindowTxSack( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast ); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* FREERTOS_TCP_WIN_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_UDP_IP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_UDP_IP.h index a7463fcee..cb3dd3556 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_UDP_IP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_UDP_IP.h @@ -1,56 +1,56 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_UDP_IP_H -#define FREERTOS_UDP_IP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Application level configuration options. */ -#include "FreeRTOSIPConfig.h" -#include "FreeRTOSIPConfigDefaults.h" -#include "IPTraceMacroDefaults.h" - - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* FREERTOS_UDP_IP_H */ - - - - - - - - - - - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_UDP_IP_H +#define FREERTOS_UDP_IP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Application level configuration options. */ +#include "FreeRTOSIPConfig.h" +#include "FreeRTOSIPConfigDefaults.h" +#include "IPTraceMacroDefaults.h" + + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* FREERTOS_UDP_IP_H */ + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_errno_TCP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_errno_TCP.h index 534f5261d..0253a200d 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_errno_TCP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_errno_TCP.h @@ -1,90 +1,90 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef FREERTOS_ERRNO_TCP -#define FREERTOS_ERRNO_TCP - -/* The following definitions will be included in the core FreeRTOS code in -future versions of FreeRTOS - hence the 'pd' (ProjDefs) prefix - at which time -this file will be removed. */ - -/* The following errno values are used by FreeRTOS+ components, not FreeRTOS -itself. */ - -/* For future compatibility (see comment above), check the definitions have not -already been made. */ -#ifndef pdFREERTOS_ERRNO_NONE - #define pdFREERTOS_ERRNO_NONE 0 /* No errors */ - #define pdFREERTOS_ERRNO_ENOENT 2 /* No such file or directory */ - #define pdFREERTOS_ERRNO_EINTR 4 /* Interrupted system call */ - #define pdFREERTOS_ERRNO_EIO 5 /* I/O error */ - #define pdFREERTOS_ERRNO_ENXIO 6 /* No such device or address */ - #define pdFREERTOS_ERRNO_EBADF 9 /* Bad file number */ - #define pdFREERTOS_ERRNO_EAGAIN 11 /* No more processes */ - #define pdFREERTOS_ERRNO_EWOULDBLOCK 11 /* Operation would block */ - #define pdFREERTOS_ERRNO_ENOMEM 12 /* Not enough memory */ - #define pdFREERTOS_ERRNO_EACCES 13 /* Permission denied */ - #define pdFREERTOS_ERRNO_EFAULT 14 /* Bad address */ - #define pdFREERTOS_ERRNO_EBUSY 16 /* Mount device busy */ - #define pdFREERTOS_ERRNO_EEXIST 17 /* File exists */ - #define pdFREERTOS_ERRNO_EXDEV 18 /* Cross-device link */ - #define pdFREERTOS_ERRNO_ENODEV 19 /* No such device */ - #define pdFREERTOS_ERRNO_ENOTDIR 20 /* Not a directory */ - #define pdFREERTOS_ERRNO_EISDIR 21 /* Is a directory */ - #define pdFREERTOS_ERRNO_EINVAL 22 /* Invalid argument */ - #define pdFREERTOS_ERRNO_ENOSPC 28 /* No space left on device */ - #define pdFREERTOS_ERRNO_ESPIPE 29 /* Illegal seek */ - #define pdFREERTOS_ERRNO_EROFS 30 /* Read only file system */ - #define pdFREERTOS_ERRNO_EUNATCH 42 /* Protocol driver not attached */ - #define pdFREERTOS_ERRNO_EBADE 50 /* Invalid exchange */ - #define pdFREERTOS_ERRNO_EFTYPE 79 /* Inappropriate file type or format */ - #define pdFREERTOS_ERRNO_ENMFILE 89 /* No more files */ - #define pdFREERTOS_ERRNO_ENOTEMPTY 90 /* Directory not empty */ - #define pdFREERTOS_ERRNO_ENAMETOOLONG 91 /* File or path name too long */ - #define pdFREERTOS_ERRNO_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ - #define pdFREERTOS_ERRNO_ENOBUFS 105 /* No buffer space available */ - #define pdFREERTOS_ERRNO_ENOPROTOOPT 109 /* Protocol not available */ - #define pdFREERTOS_ERRNO_EADDRINUSE 112 /* Address already in use */ - #define pdFREERTOS_ERRNO_ETIMEDOUT 116 /* Connection timed out */ - #define pdFREERTOS_ERRNO_EINPROGRESS 119 /* Connection already in progress */ - #define pdFREERTOS_ERRNO_EALREADY 120 /* Socket already connected */ - #define pdFREERTOS_ERRNO_EADDRNOTAVAIL 125 /* Address not available */ - #define pdFREERTOS_ERRNO_EISCONN 127 /* Socket is already connected */ - #define pdFREERTOS_ERRNO_ENOTCONN 128 /* Socket is not connected */ - #define pdFREERTOS_ERRNO_ENOMEDIUM 135 /* No medium inserted */ - #define pdFREERTOS_ERRNO_EILSEQ 138 /* An invalid UTF-16 sequence was encountered. */ - #define pdFREERTOS_ERRNO_ECANCELED 140 /* Operation canceled. */ - - /* The following endian values are used by FreeRTOS+ components, not FreeRTOS - itself. */ - #define pdFREERTOS_LITTLE_ENDIAN 0 - #define pdFREERTOS_BIG_ENDIAN 1 - -#endif /* pdFREERTOS_ERRNO_NONE */ - -#endif /* FREERTOS_ERRNO_TCP */ - - - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef FREERTOS_ERRNO_TCP +#define FREERTOS_ERRNO_TCP + +/* The following definitions will be included in the core FreeRTOS code in +future versions of FreeRTOS - hence the 'pd' (ProjDefs) prefix - at which time +this file will be removed. */ + +/* The following errno values are used by FreeRTOS+ components, not FreeRTOS +itself. */ + +/* For future compatibility (see comment above), check the definitions have not +already been made. */ +#ifndef pdFREERTOS_ERRNO_NONE + #define pdFREERTOS_ERRNO_NONE 0 /* No errors */ + #define pdFREERTOS_ERRNO_ENOENT 2 /* No such file or directory */ + #define pdFREERTOS_ERRNO_EINTR 4 /* Interrupted system call */ + #define pdFREERTOS_ERRNO_EIO 5 /* I/O error */ + #define pdFREERTOS_ERRNO_ENXIO 6 /* No such device or address */ + #define pdFREERTOS_ERRNO_EBADF 9 /* Bad file number */ + #define pdFREERTOS_ERRNO_EAGAIN 11 /* No more processes */ + #define pdFREERTOS_ERRNO_EWOULDBLOCK 11 /* Operation would block */ + #define pdFREERTOS_ERRNO_ENOMEM 12 /* Not enough memory */ + #define pdFREERTOS_ERRNO_EACCES 13 /* Permission denied */ + #define pdFREERTOS_ERRNO_EFAULT 14 /* Bad address */ + #define pdFREERTOS_ERRNO_EBUSY 16 /* Mount device busy */ + #define pdFREERTOS_ERRNO_EEXIST 17 /* File exists */ + #define pdFREERTOS_ERRNO_EXDEV 18 /* Cross-device link */ + #define pdFREERTOS_ERRNO_ENODEV 19 /* No such device */ + #define pdFREERTOS_ERRNO_ENOTDIR 20 /* Not a directory */ + #define pdFREERTOS_ERRNO_EISDIR 21 /* Is a directory */ + #define pdFREERTOS_ERRNO_EINVAL 22 /* Invalid argument */ + #define pdFREERTOS_ERRNO_ENOSPC 28 /* No space left on device */ + #define pdFREERTOS_ERRNO_ESPIPE 29 /* Illegal seek */ + #define pdFREERTOS_ERRNO_EROFS 30 /* Read only file system */ + #define pdFREERTOS_ERRNO_EUNATCH 42 /* Protocol driver not attached */ + #define pdFREERTOS_ERRNO_EBADE 50 /* Invalid exchange */ + #define pdFREERTOS_ERRNO_EFTYPE 79 /* Inappropriate file type or format */ + #define pdFREERTOS_ERRNO_ENMFILE 89 /* No more files */ + #define pdFREERTOS_ERRNO_ENOTEMPTY 90 /* Directory not empty */ + #define pdFREERTOS_ERRNO_ENAMETOOLONG 91 /* File or path name too long */ + #define pdFREERTOS_ERRNO_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ + #define pdFREERTOS_ERRNO_ENOBUFS 105 /* No buffer space available */ + #define pdFREERTOS_ERRNO_ENOPROTOOPT 109 /* Protocol not available */ + #define pdFREERTOS_ERRNO_EADDRINUSE 112 /* Address already in use */ + #define pdFREERTOS_ERRNO_ETIMEDOUT 116 /* Connection timed out */ + #define pdFREERTOS_ERRNO_EINPROGRESS 119 /* Connection already in progress */ + #define pdFREERTOS_ERRNO_EALREADY 120 /* Socket already connected */ + #define pdFREERTOS_ERRNO_EADDRNOTAVAIL 125 /* Address not available */ + #define pdFREERTOS_ERRNO_EISCONN 127 /* Socket is already connected */ + #define pdFREERTOS_ERRNO_ENOTCONN 128 /* Socket is not connected */ + #define pdFREERTOS_ERRNO_ENOMEDIUM 135 /* No medium inserted */ + #define pdFREERTOS_ERRNO_EILSEQ 138 /* An invalid UTF-16 sequence was encountered. */ + #define pdFREERTOS_ERRNO_ECANCELED 140 /* Operation canceled. */ + + /* The following endian values are used by FreeRTOS+ components, not FreeRTOS + itself. */ + #define pdFREERTOS_LITTLE_ENDIAN 0 + #define pdFREERTOS_BIG_ENDIAN 1 + +#endif /* pdFREERTOS_ERRNO_NONE */ + +#endif /* FREERTOS_ERRNO_TCP */ + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/IPTraceMacroDefaults.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/IPTraceMacroDefaults.h index 316e18f56..0af7189dd 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/IPTraceMacroDefaults.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/IPTraceMacroDefaults.h @@ -1,193 +1,193 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -/* This file provides default (empty) implementations for any IP trace macros -that are not defined by the user. See -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Trace.html */ - -#ifndef UDP_TRACE_MACRO_DEFAULTS_H -#define UDP_TRACE_MACRO_DEFAULTS_H - -#ifndef iptraceNETWORK_DOWN - #define iptraceNETWORK_DOWN() -#endif - -#ifndef iptraceNETWORK_BUFFER_RELEASED - #define iptraceNETWORK_BUFFER_RELEASED( pxBufferAddress ) -#endif - -#ifndef iptraceNETWORK_BUFFER_OBTAINED - #define iptraceNETWORK_BUFFER_OBTAINED( pxBufferAddress ) -#endif - -#ifndef iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR - #define iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR( pxBufferAddress ) -#endif - -#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER - #define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER() -#endif - -#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR - #define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR() -#endif - -#ifndef iptraceCREATING_ARP_REQUEST - #define iptraceCREATING_ARP_REQUEST( ulIPAddress ) -#endif - -#ifndef iptraceARP_TABLE_ENTRY_WILL_EXPIRE - #define iptraceARP_TABLE_ENTRY_WILL_EXPIRE( ulIPAddress ) -#endif - -#ifndef iptraceARP_TABLE_ENTRY_EXPIRED - #define iptraceARP_TABLE_ENTRY_EXPIRED( ulIPAddress ) -#endif - -#ifndef iptraceARP_TABLE_ENTRY_CREATED - #define iptraceARP_TABLE_ENTRY_CREATED( ulIPAddress, ucMACAddress ) -#endif - -#ifndef iptraceSENDING_UDP_PACKET - #define iptraceSENDING_UDP_PACKET( ulIPAddress ) -#endif - -#ifndef iptracePACKET_DROPPED_TO_GENERATE_ARP - #define iptracePACKET_DROPPED_TO_GENERATE_ARP( ulIPAddress ) -#endif - -#ifndef iptraceICMP_PACKET_RECEIVED - #define iptraceICMP_PACKET_RECEIVED() -#endif - -#ifndef iptraceSENDING_PING_REPLY - #define iptraceSENDING_PING_REPLY( ulIPAddress ) -#endif - -#ifndef traceARP_PACKET_RECEIVED - #define traceARP_PACKET_RECEIVED() -#endif - -#ifndef iptracePROCESSING_RECEIVED_ARP_REPLY - #define iptracePROCESSING_RECEIVED_ARP_REPLY( ulIPAddress ) -#endif - -#ifndef iptraceSENDING_ARP_REPLY - #define iptraceSENDING_ARP_REPLY( ulIPAddress ) -#endif - -#ifndef iptraceFAILED_TO_CREATE_SOCKET - #define iptraceFAILED_TO_CREATE_SOCKET() -#endif - -#ifndef iptraceFAILED_TO_CREATE_EVENT_GROUP - #define iptraceFAILED_TO_CREATE_EVENT_GROUP() -#endif - -#ifndef iptraceRECVFROM_DISCARDING_BYTES - #define iptraceRECVFROM_DISCARDING_BYTES( xNumberOfBytesDiscarded ) -#endif - -#ifndef iptraceETHERNET_RX_EVENT_LOST - #define iptraceETHERNET_RX_EVENT_LOST() -#endif - -#ifndef iptraceSTACK_TX_EVENT_LOST - #define iptraceSTACK_TX_EVENT_LOST( xEvent ) -#endif - -#ifndef iptraceNETWORK_EVENT_RECEIVED - #define iptraceNETWORK_EVENT_RECEIVED( eEvent ) -#endif - -#ifndef iptraceBIND_FAILED - #define iptraceBIND_FAILED( xSocket, usPort ) -#endif - -#ifndef iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS - #define iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS( ulIPAddress ) -#endif - -#ifndef iptraceSENDING_DHCP_DISCOVER - #define iptraceSENDING_DHCP_DISCOVER() -#endif - -#ifndef iptraceSENDING_DHCP_REQUEST - #define iptraceSENDING_DHCP_REQUEST() -#endif - -#ifndef iptraceDHCP_SUCCEDEED - #define iptraceDHCP_SUCCEDEED( address ) -#endif - -#ifndef iptraceNETWORK_INTERFACE_TRANSMIT - #define iptraceNETWORK_INTERFACE_TRANSMIT() -#endif - -#ifndef iptraceNETWORK_INTERFACE_RECEIVE - #define iptraceNETWORK_INTERFACE_RECEIVE() -#endif - -#ifndef iptraceSENDING_DNS_REQUEST - #define iptraceSENDING_DNS_REQUEST() -#endif - -#ifndef iptraceWAITING_FOR_TX_DMA_DESCRIPTOR - #define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR() -#endif - -#ifndef ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS - #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS 0 -#endif - -#ifndef iptraceFAILED_TO_NOTIFY_SELECT_GROUP - #define iptraceFAILED_TO_NOTIFY_SELECT_GROUP( xSocket ) -#endif - -#ifndef pvPortMallocSocket - #define pvPortMallocSocket(xSize) pvPortMalloc( ( xSize ) ) -#endif - -#ifndef iptraceRECVFROM_TIMEOUT - #define iptraceRECVFROM_TIMEOUT() -#endif - -#ifndef iptraceRECVFROM_INTERRUPTED - #define iptraceRECVFROM_INTERRUPTED() -#endif - -#ifndef iptraceNO_BUFFER_FOR_SENDTO - #define iptraceNO_BUFFER_FOR_SENDTO() -#endif - -#ifndef iptraceSENDTO_SOCKET_NOT_BOUND - #define iptraceSENDTO_SOCKET_NOT_BOUND() -#endif - -#ifndef iptraceSENDTO_DATA_TOO_LONG - #define iptraceSENDTO_DATA_TOO_LONG() -#endif - -#endif /* UDP_TRACE_MACRO_DEFAULTS_H */ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +/* This file provides default (empty) implementations for any IP trace macros +that are not defined by the user. See +http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Trace.html */ + +#ifndef UDP_TRACE_MACRO_DEFAULTS_H +#define UDP_TRACE_MACRO_DEFAULTS_H + +#ifndef iptraceNETWORK_DOWN + #define iptraceNETWORK_DOWN() +#endif + +#ifndef iptraceNETWORK_BUFFER_RELEASED + #define iptraceNETWORK_BUFFER_RELEASED( pxBufferAddress ) +#endif + +#ifndef iptraceNETWORK_BUFFER_OBTAINED + #define iptraceNETWORK_BUFFER_OBTAINED( pxBufferAddress ) +#endif + +#ifndef iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR + #define iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR( pxBufferAddress ) +#endif + +#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER + #define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER() +#endif + +#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR + #define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR() +#endif + +#ifndef iptraceCREATING_ARP_REQUEST + #define iptraceCREATING_ARP_REQUEST( ulIPAddress ) +#endif + +#ifndef iptraceARP_TABLE_ENTRY_WILL_EXPIRE + #define iptraceARP_TABLE_ENTRY_WILL_EXPIRE( ulIPAddress ) +#endif + +#ifndef iptraceARP_TABLE_ENTRY_EXPIRED + #define iptraceARP_TABLE_ENTRY_EXPIRED( ulIPAddress ) +#endif + +#ifndef iptraceARP_TABLE_ENTRY_CREATED + #define iptraceARP_TABLE_ENTRY_CREATED( ulIPAddress, ucMACAddress ) +#endif + +#ifndef iptraceSENDING_UDP_PACKET + #define iptraceSENDING_UDP_PACKET( ulIPAddress ) +#endif + +#ifndef iptracePACKET_DROPPED_TO_GENERATE_ARP + #define iptracePACKET_DROPPED_TO_GENERATE_ARP( ulIPAddress ) +#endif + +#ifndef iptraceICMP_PACKET_RECEIVED + #define iptraceICMP_PACKET_RECEIVED() +#endif + +#ifndef iptraceSENDING_PING_REPLY + #define iptraceSENDING_PING_REPLY( ulIPAddress ) +#endif + +#ifndef traceARP_PACKET_RECEIVED + #define traceARP_PACKET_RECEIVED() +#endif + +#ifndef iptracePROCESSING_RECEIVED_ARP_REPLY + #define iptracePROCESSING_RECEIVED_ARP_REPLY( ulIPAddress ) +#endif + +#ifndef iptraceSENDING_ARP_REPLY + #define iptraceSENDING_ARP_REPLY( ulIPAddress ) +#endif + +#ifndef iptraceFAILED_TO_CREATE_SOCKET + #define iptraceFAILED_TO_CREATE_SOCKET() +#endif + +#ifndef iptraceFAILED_TO_CREATE_EVENT_GROUP + #define iptraceFAILED_TO_CREATE_EVENT_GROUP() +#endif + +#ifndef iptraceRECVFROM_DISCARDING_BYTES + #define iptraceRECVFROM_DISCARDING_BYTES( xNumberOfBytesDiscarded ) +#endif + +#ifndef iptraceETHERNET_RX_EVENT_LOST + #define iptraceETHERNET_RX_EVENT_LOST() +#endif + +#ifndef iptraceSTACK_TX_EVENT_LOST + #define iptraceSTACK_TX_EVENT_LOST( xEvent ) +#endif + +#ifndef iptraceNETWORK_EVENT_RECEIVED + #define iptraceNETWORK_EVENT_RECEIVED( eEvent ) +#endif + +#ifndef iptraceBIND_FAILED + #define iptraceBIND_FAILED( xSocket, usPort ) +#endif + +#ifndef iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS + #define iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS( ulIPAddress ) +#endif + +#ifndef iptraceSENDING_DHCP_DISCOVER + #define iptraceSENDING_DHCP_DISCOVER() +#endif + +#ifndef iptraceSENDING_DHCP_REQUEST + #define iptraceSENDING_DHCP_REQUEST() +#endif + +#ifndef iptraceDHCP_SUCCEDEED + #define iptraceDHCP_SUCCEDEED( address ) +#endif + +#ifndef iptraceNETWORK_INTERFACE_TRANSMIT + #define iptraceNETWORK_INTERFACE_TRANSMIT() +#endif + +#ifndef iptraceNETWORK_INTERFACE_RECEIVE + #define iptraceNETWORK_INTERFACE_RECEIVE() +#endif + +#ifndef iptraceSENDING_DNS_REQUEST + #define iptraceSENDING_DNS_REQUEST() +#endif + +#ifndef iptraceWAITING_FOR_TX_DMA_DESCRIPTOR + #define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR() +#endif + +#ifndef ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS + #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS 0 +#endif + +#ifndef iptraceFAILED_TO_NOTIFY_SELECT_GROUP + #define iptraceFAILED_TO_NOTIFY_SELECT_GROUP( xSocket ) +#endif + +#ifndef pvPortMallocSocket + #define pvPortMallocSocket(xSize) pvPortMalloc( ( xSize ) ) +#endif + +#ifndef iptraceRECVFROM_TIMEOUT + #define iptraceRECVFROM_TIMEOUT() +#endif + +#ifndef iptraceRECVFROM_INTERRUPTED + #define iptraceRECVFROM_INTERRUPTED() +#endif + +#ifndef iptraceNO_BUFFER_FOR_SENDTO + #define iptraceNO_BUFFER_FOR_SENDTO() +#endif + +#ifndef iptraceSENDTO_SOCKET_NOT_BOUND + #define iptraceSENDTO_SOCKET_NOT_BOUND() +#endif + +#ifndef iptraceSENDTO_DATA_TOO_LONG + #define iptraceSENDTO_DATA_TOO_LONG() +#endif + +#endif /* UDP_TRACE_MACRO_DEFAULTS_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkBufferManagement.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkBufferManagement.h index 0fcde3439..d57e607ac 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkBufferManagement.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkBufferManagement.h @@ -1,70 +1,70 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef NETWORK_BUFFER_MANAGEMENT_H -#define NETWORK_BUFFER_MANAGEMENT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* NOTE PUBLIC API FUNCTIONS. */ -BaseType_t xNetworkBuffersInitialise( void ); -NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ); -NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes ); -void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ); -BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer ); -uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes ); -void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer ); - -/* Get the current number of free network buffers. */ -UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ); - -/* Get the lowest number of free network buffers. */ -UBaseType_t uxGetMinimumFreeNetworkBuffers( void ); - -/* Copy a network buffer into a bigger buffer. */ -NetworkBufferDescriptor_t *pxDuplicateNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer, - size_t uxNewLength); - -/* Increase the size of a Network Buffer. -In case BufferAllocation_2.c is used, the new space must be allocated. */ -NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, - size_t xNewSizeBytes ); - -#if ipconfigTCP_IP_SANITY - /* - * Check if an address is a valid pointer to a network descriptor - * by looking it up in the array of network descriptors - */ - UBaseType_t bIsValidNetworkDescriptor (const NetworkBufferDescriptor_t * pxDesc); - BaseType_t prvIsFreeBuffer( const NetworkBufferDescriptor_t *pxDescr ); -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* NETWORK_BUFFER_MANAGEMENT_H */ +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef NETWORK_BUFFER_MANAGEMENT_H +#define NETWORK_BUFFER_MANAGEMENT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* NOTE PUBLIC API FUNCTIONS. */ +BaseType_t xNetworkBuffersInitialise( void ); +NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ); +NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes ); +void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ); +BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer ); +uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes ); +void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer ); + +/* Get the current number of free network buffers. */ +UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ); + +/* Get the lowest number of free network buffers. */ +UBaseType_t uxGetMinimumFreeNetworkBuffers( void ); + +/* Copy a network buffer into a bigger buffer. */ +NetworkBufferDescriptor_t *pxDuplicateNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer, + size_t uxNewLength); + +/* Increase the size of a Network Buffer. +In case BufferAllocation_2.c is used, the new space must be allocated. */ +NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, + size_t xNewSizeBytes ); + +#if ipconfigTCP_IP_SANITY + /* + * Check if an address is a valid pointer to a network descriptor + * by looking it up in the array of network descriptors + */ + UBaseType_t bIsValidNetworkDescriptor (const NetworkBufferDescriptor_t * pxDesc); + BaseType_t prvIsFreeBuffer( const NetworkBufferDescriptor_t *pxDescr ); +#endif + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* NETWORK_BUFFER_MANAGEMENT_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkInterface.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkInterface.h index c3d3fb4bc..8f1fb3219 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkInterface.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/NetworkInterface.h @@ -1,44 +1,44 @@ -/* - * FreeRTOS+TCP V2.2.0 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org - */ - -#ifndef NETWORK_INTERFACE_H -#define NETWORK_INTERFACE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* NOTE PUBLIC API FUNCTIONS. */ -BaseType_t xNetworkInterfaceInitialise( void ); -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend ); -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ); -BaseType_t xGetPhyLinkStatus( void ); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* NETWORK_INTERFACE_H */ - +/* + * FreeRTOS+TCP V2.2.0 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef NETWORK_INTERFACE_H +#define NETWORK_INTERFACE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* NOTE PUBLIC API FUNCTIONS. */ +BaseType_t xNetworkInterfaceInitialise( void ); +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend ); +void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ); +BaseType_t xGetPhyLinkStatus( void ); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* NETWORK_INTERFACE_H */ + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c index fa3f4333f..e70eb80eb 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c @@ -1,411 +1,411 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/****************************************************************************** - * - * See the following web page for essential buffer allocation scheme usage and - * configuration details: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html - * - ******************************************************************************/ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" - -/* For an Ethernet interrupt to be able to obtain a network buffer there must -be at least this number of buffers available. */ -#define baINTERRUPT_BUFFER_GET_THRESHOLD ( 3 ) - -/* A list of free (available) NetworkBufferDescriptor_t structures. */ -static List_t xFreeBuffersList; - -/* Some statistics about the use of buffers. */ -static UBaseType_t uxMinimumFreeNetworkBuffers = 0u; - -/* Declares the pool of NetworkBufferDescriptor_t structures that are available -to the system. All the network buffers referenced from xFreeBuffersList exist -in this array. The array is not accessed directly except during initialisation, -when the xFreeBuffersList is filled (as all the buffers are free when the system -is booted). */ -static NetworkBufferDescriptor_t xNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ]; - -/* This constant is defined as true to let FreeRTOS_TCP_IP.c know that the -network buffers have constant size, large enough to hold the biggest Ethernet -packet. No resizing will be done. */ -const BaseType_t xBufferAllocFixedSize = pdTRUE; - -/* The semaphore used to obtain network buffers. */ -static SemaphoreHandle_t xNetworkBufferSemaphore = NULL; - -#if( ipconfigTCP_IP_SANITY != 0 ) - static char cIsLow = pdFALSE; - UBaseType_t bIsValidNetworkDescriptor( const NetworkBufferDescriptor_t * pxDesc ); -#else - static UBaseType_t bIsValidNetworkDescriptor( const NetworkBufferDescriptor_t * pxDesc ); -#endif /* ipconfigTCP_IP_SANITY */ - -static void prvShowWarnings( void ); - -/* The user can define their own ipconfigBUFFER_ALLOC_LOCK() and -ipconfigBUFFER_ALLOC_UNLOCK() macros, especially for use form an ISR. If these -are not defined then default them to call the normal enter/exit critical -section macros. */ -#if !defined( ipconfigBUFFER_ALLOC_LOCK ) - - #define ipconfigBUFFER_ALLOC_INIT( ) do {} while (0) - #define ipconfigBUFFER_ALLOC_LOCK_FROM_ISR() \ - UBaseType_t uxSavedInterruptStatus = ( UBaseType_t ) portSET_INTERRUPT_MASK_FROM_ISR(); \ - { - - #define ipconfigBUFFER_ALLOC_UNLOCK_FROM_ISR() \ - portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); \ - } - - #define ipconfigBUFFER_ALLOC_LOCK() taskENTER_CRITICAL() - #define ipconfigBUFFER_ALLOC_UNLOCK() taskEXIT_CRITICAL() - -#endif /* ipconfigBUFFER_ALLOC_LOCK */ - -/*-----------------------------------------------------------*/ - -#if( ipconfigTCP_IP_SANITY != 0 ) - - /* HT: SANITY code will be removed as soon as the library is stable - * and and ready to become public - * Function below gives information about the use of buffers */ - #define WARN_LOW ( 2 ) - #define WARN_HIGH ( ( 5 * ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) / 10 ) - -#endif /* ipconfigTCP_IP_SANITY */ - -/*-----------------------------------------------------------*/ - -#if( ipconfigTCP_IP_SANITY != 0 ) - - BaseType_t prvIsFreeBuffer( const NetworkBufferDescriptor_t *pxDescr ) - { - return ( bIsValidNetworkDescriptor( pxDescr ) != 0 ) && - ( listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxDescr->xBufferListItem ) ) != 0 ); - } - /*-----------------------------------------------------------*/ - - static void prvShowWarnings( void ) - { - UBaseType_t uxCount = uxGetNumberOfFreeNetworkBuffers( ); - if( ( ( cIsLow == 0 ) && ( uxCount <= WARN_LOW ) ) || ( ( cIsLow != 0 ) && ( uxCount >= WARN_HIGH ) ) ) - { - cIsLow = !cIsLow; - FreeRTOS_debug_printf( ( "*** Warning *** %s %lu buffers left\n", cIsLow ? "only" : "now", uxCount ) ); - } - } - /*-----------------------------------------------------------*/ - - UBaseType_t bIsValidNetworkDescriptor( const NetworkBufferDescriptor_t * pxDesc ) - { - uint32_t offset = ( uint32_t ) ( ((const char *)pxDesc) - ((const char *)xNetworkBuffers) ); - if( ( offset >= sizeof( xNetworkBuffers ) ) || - ( ( offset % sizeof( xNetworkBuffers[0] ) ) != 0 ) ) - return pdFALSE; - return (UBaseType_t) (pxDesc - xNetworkBuffers) + 1; - } - /*-----------------------------------------------------------*/ - -#else - static UBaseType_t bIsValidNetworkDescriptor (const NetworkBufferDescriptor_t * pxDesc) - { - ( void ) pxDesc; - return ( UBaseType_t ) pdTRUE; - } - /*-----------------------------------------------------------*/ - - static void prvShowWarnings( void ) - { - } - /*-----------------------------------------------------------*/ - -#endif /* ipconfigTCP_IP_SANITY */ - -BaseType_t xNetworkBuffersInitialise( void ) -{ -BaseType_t xReturn, x; - - /* Only initialise the buffers and their associated kernel objects if they - have not been initialised before. */ - if( xNetworkBufferSemaphore == NULL ) - { - /* In case alternative locking is used, the mutexes can be initialised - here */ - ipconfigBUFFER_ALLOC_INIT(); - - xNetworkBufferSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, ( UBaseType_t ) ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ); - configASSERT( xNetworkBufferSemaphore ); - - if( xNetworkBufferSemaphore != NULL ) - { - vListInitialise( &xFreeBuffersList ); - - /* Initialise all the network buffers. The buffer storage comes - from the network interface, and different hardware has different - requirements. */ - vNetworkInterfaceAllocateRAMToBuffers( xNetworkBuffers ); - for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ ) - { - /* Initialise and set the owner of the buffer list items. */ - vListInitialiseItem( &( xNetworkBuffers[ x ].xBufferListItem ) ); - listSET_LIST_ITEM_OWNER( &( xNetworkBuffers[ x ].xBufferListItem ), &xNetworkBuffers[ x ] ); - - /* Currently, all buffers are available for use. */ - vListInsert( &xFreeBuffersList, &( xNetworkBuffers[ x ].xBufferListItem ) ); - } - - uxMinimumFreeNetworkBuffers = ( UBaseType_t ) ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; - } - } - - if( xNetworkBufferSemaphore == NULL ) - { - xReturn = pdFAIL; - } - else - { - xReturn = pdPASS; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) -{ -NetworkBufferDescriptor_t *pxReturn = NULL; -BaseType_t xInvalid = pdFALSE; -UBaseType_t uxCount; - - /* The current implementation only has a single size memory block, so - the requested size parameter is not used (yet). */ - ( void ) xRequestedSizeBytes; - - if( xNetworkBufferSemaphore != NULL ) - { - /* If there is a semaphore available, there is a network buffer - available. */ - if( xSemaphoreTake( xNetworkBufferSemaphore, xBlockTimeTicks ) == pdPASS ) - { - /* Protect the structure as they are accessed from tasks and - interrupts. */ - ipconfigBUFFER_ALLOC_LOCK(); - { - pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); - - if( ( bIsValidNetworkDescriptor( pxReturn ) != pdFALSE_UNSIGNED ) && - listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxReturn->xBufferListItem ) ) ) - { - uxListRemove( &( pxReturn->xBufferListItem ) ); - } - else - { - xInvalid = pdTRUE; - } - } - ipconfigBUFFER_ALLOC_UNLOCK(); - - if( xInvalid == pdTRUE ) - { - /* _RB_ Can printf() be called from an interrupt? (comment - above says this can be called from an interrupt too) */ - /* _HT_ The function shall not be called from an ISR. Comment - was indeed misleading. Hopefully clear now? - So the printf()is OK here. */ - FreeRTOS_debug_printf( ( "pxGetNetworkBufferWithDescriptor: INVALID BUFFER: %p (valid %lu)\n", - pxReturn, bIsValidNetworkDescriptor( pxReturn ) ) ); - pxReturn = NULL; - } - else - { - /* Reading UBaseType_t, no critical section needed. */ - uxCount = listCURRENT_LIST_LENGTH( &xFreeBuffersList ); - - /* For stats, latch the lowest number of network buffers since - booting. */ - if( uxMinimumFreeNetworkBuffers > uxCount ) - { - uxMinimumFreeNetworkBuffers = uxCount; - } - - pxReturn->xDataLength = xRequestedSizeBytes; - - #if( ipconfigTCP_IP_SANITY != 0 ) - { - prvShowWarnings(); - } - #endif /* ipconfigTCP_IP_SANITY */ - - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - /* make sure the buffer is not linked */ - pxReturn->pxNextBuffer = NULL; - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ - } - iptraceNETWORK_BUFFER_OBTAINED( pxReturn ); - } - else - { - iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER(); - } - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes ) -{ -NetworkBufferDescriptor_t *pxReturn = NULL; - - /* The current implementation only has a single size memory block, so - the requested size parameter is not used (yet). */ - ( void ) xRequestedSizeBytes; - - /* If there is a semaphore available then there is a buffer available, but, - as this is called from an interrupt, only take a buffer if there are at - least baINTERRUPT_BUFFER_GET_THRESHOLD buffers remaining. This prevents, - to a certain degree at least, a rapidly executing interrupt exhausting - buffer and in so doing preventing tasks from continuing. */ - if( uxQueueMessagesWaitingFromISR( ( QueueHandle_t ) xNetworkBufferSemaphore ) > ( UBaseType_t ) baINTERRUPT_BUFFER_GET_THRESHOLD ) - { - if( xSemaphoreTakeFromISR( xNetworkBufferSemaphore, NULL ) == pdPASS ) - { - /* Protect the structure as it is accessed from tasks and interrupts. */ - ipconfigBUFFER_ALLOC_LOCK_FROM_ISR(); - { - pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); - uxListRemove( &( pxReturn->xBufferListItem ) ); - } - ipconfigBUFFER_ALLOC_UNLOCK_FROM_ISR(); - - iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR( pxReturn ); - } - } - - if( pxReturn == NULL ) - { - iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR(); - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ - -BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - /* Ensure the buffer is returned to the list of free buffers before the - counting semaphore is 'given' to say a buffer is available. */ - ipconfigBUFFER_ALLOC_LOCK_FROM_ISR(); - { - vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); - } - ipconfigBUFFER_ALLOC_UNLOCK_FROM_ISR(); - - xSemaphoreGiveFromISR( xNetworkBufferSemaphore, &xHigherPriorityTaskWoken ); - iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); - - return xHigherPriorityTaskWoken; -} -/*-----------------------------------------------------------*/ - -void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -BaseType_t xListItemAlreadyInFreeList; - - if( bIsValidNetworkDescriptor( pxNetworkBuffer ) == pdFALSE_UNSIGNED ) - { - FreeRTOS_debug_printf( ( "vReleaseNetworkBufferAndDescriptor: Invalid buffer %p\n", pxNetworkBuffer ) ); - return ; - } - /* Ensure the buffer is returned to the list of free buffers before the - counting semaphore is 'given' to say a buffer is available. */ - ipconfigBUFFER_ALLOC_LOCK(); - { - { - xListItemAlreadyInFreeList = listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); - - if( xListItemAlreadyInFreeList == pdFALSE ) - { - vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); - } - } - } - ipconfigBUFFER_ALLOC_UNLOCK(); - - if( xListItemAlreadyInFreeList ) - { - FreeRTOS_debug_printf( ( "vReleaseNetworkBufferAndDescriptor: %p ALREADY RELEASED (now %lu)\n", - pxNetworkBuffer, uxGetNumberOfFreeNetworkBuffers( ) ) ); - } - if( xListItemAlreadyInFreeList == pdFALSE ) - { - xSemaphoreGive( xNetworkBufferSemaphore ); - prvShowWarnings(); - } - iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxGetMinimumFreeNetworkBuffers( void ) -{ - return uxMinimumFreeNetworkBuffers; -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) -{ - return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); -} - -NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, size_t xNewSizeBytes ) -{ - /* In BufferAllocation_1.c all network buffer are allocated with a - maximum size of 'ipTOTAL_ETHERNET_FRAME_SIZE'.No need to resize the - network buffer. */ - ( void ) xNewSizeBytes; - return pxNetworkBuffer; -} - -/*#endif */ /* ipconfigINCLUDE_TEST_CODE */ +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/****************************************************************************** + * + * See the following web page for essential buffer allocation scheme usage and + * configuration details: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html + * + ******************************************************************************/ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" + +/* For an Ethernet interrupt to be able to obtain a network buffer there must +be at least this number of buffers available. */ +#define baINTERRUPT_BUFFER_GET_THRESHOLD ( 3 ) + +/* A list of free (available) NetworkBufferDescriptor_t structures. */ +static List_t xFreeBuffersList; + +/* Some statistics about the use of buffers. */ +static UBaseType_t uxMinimumFreeNetworkBuffers = 0u; + +/* Declares the pool of NetworkBufferDescriptor_t structures that are available +to the system. All the network buffers referenced from xFreeBuffersList exist +in this array. The array is not accessed directly except during initialisation, +when the xFreeBuffersList is filled (as all the buffers are free when the system +is booted). */ +static NetworkBufferDescriptor_t xNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ]; + +/* This constant is defined as true to let FreeRTOS_TCP_IP.c know that the +network buffers have constant size, large enough to hold the biggest Ethernet +packet. No resizing will be done. */ +const BaseType_t xBufferAllocFixedSize = pdTRUE; + +/* The semaphore used to obtain network buffers. */ +static SemaphoreHandle_t xNetworkBufferSemaphore = NULL; + +#if( ipconfigTCP_IP_SANITY != 0 ) + static char cIsLow = pdFALSE; + UBaseType_t bIsValidNetworkDescriptor( const NetworkBufferDescriptor_t * pxDesc ); +#else + static UBaseType_t bIsValidNetworkDescriptor( const NetworkBufferDescriptor_t * pxDesc ); +#endif /* ipconfigTCP_IP_SANITY */ + +static void prvShowWarnings( void ); + +/* The user can define their own ipconfigBUFFER_ALLOC_LOCK() and +ipconfigBUFFER_ALLOC_UNLOCK() macros, especially for use form an ISR. If these +are not defined then default them to call the normal enter/exit critical +section macros. */ +#if !defined( ipconfigBUFFER_ALLOC_LOCK ) + + #define ipconfigBUFFER_ALLOC_INIT( ) do {} while (0) + #define ipconfigBUFFER_ALLOC_LOCK_FROM_ISR() \ + UBaseType_t uxSavedInterruptStatus = ( UBaseType_t ) portSET_INTERRUPT_MASK_FROM_ISR(); \ + { + + #define ipconfigBUFFER_ALLOC_UNLOCK_FROM_ISR() \ + portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); \ + } + + #define ipconfigBUFFER_ALLOC_LOCK() taskENTER_CRITICAL() + #define ipconfigBUFFER_ALLOC_UNLOCK() taskEXIT_CRITICAL() + +#endif /* ipconfigBUFFER_ALLOC_LOCK */ + +/*-----------------------------------------------------------*/ + +#if( ipconfigTCP_IP_SANITY != 0 ) + + /* HT: SANITY code will be removed as soon as the library is stable + * and and ready to become public + * Function below gives information about the use of buffers */ + #define WARN_LOW ( 2 ) + #define WARN_HIGH ( ( 5 * ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) / 10 ) + +#endif /* ipconfigTCP_IP_SANITY */ + +/*-----------------------------------------------------------*/ + +#if( ipconfigTCP_IP_SANITY != 0 ) + + BaseType_t prvIsFreeBuffer( const NetworkBufferDescriptor_t *pxDescr ) + { + return ( bIsValidNetworkDescriptor( pxDescr ) != 0 ) && + ( listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxDescr->xBufferListItem ) ) != 0 ); + } + /*-----------------------------------------------------------*/ + + static void prvShowWarnings( void ) + { + UBaseType_t uxCount = uxGetNumberOfFreeNetworkBuffers( ); + if( ( ( cIsLow == 0 ) && ( uxCount <= WARN_LOW ) ) || ( ( cIsLow != 0 ) && ( uxCount >= WARN_HIGH ) ) ) + { + cIsLow = !cIsLow; + FreeRTOS_debug_printf( ( "*** Warning *** %s %lu buffers left\n", cIsLow ? "only" : "now", uxCount ) ); + } + } + /*-----------------------------------------------------------*/ + + UBaseType_t bIsValidNetworkDescriptor( const NetworkBufferDescriptor_t * pxDesc ) + { + uint32_t offset = ( uint32_t ) ( ((const char *)pxDesc) - ((const char *)xNetworkBuffers) ); + if( ( offset >= sizeof( xNetworkBuffers ) ) || + ( ( offset % sizeof( xNetworkBuffers[0] ) ) != 0 ) ) + return pdFALSE; + return (UBaseType_t) (pxDesc - xNetworkBuffers) + 1; + } + /*-----------------------------------------------------------*/ + +#else + static UBaseType_t bIsValidNetworkDescriptor (const NetworkBufferDescriptor_t * pxDesc) + { + ( void ) pxDesc; + return ( UBaseType_t ) pdTRUE; + } + /*-----------------------------------------------------------*/ + + static void prvShowWarnings( void ) + { + } + /*-----------------------------------------------------------*/ + +#endif /* ipconfigTCP_IP_SANITY */ + +BaseType_t xNetworkBuffersInitialise( void ) +{ +BaseType_t xReturn, x; + + /* Only initialise the buffers and their associated kernel objects if they + have not been initialised before. */ + if( xNetworkBufferSemaphore == NULL ) + { + /* In case alternative locking is used, the mutexes can be initialised + here */ + ipconfigBUFFER_ALLOC_INIT(); + + xNetworkBufferSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, ( UBaseType_t ) ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ); + configASSERT( xNetworkBufferSemaphore ); + + if( xNetworkBufferSemaphore != NULL ) + { + vListInitialise( &xFreeBuffersList ); + + /* Initialise all the network buffers. The buffer storage comes + from the network interface, and different hardware has different + requirements. */ + vNetworkInterfaceAllocateRAMToBuffers( xNetworkBuffers ); + for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ ) + { + /* Initialise and set the owner of the buffer list items. */ + vListInitialiseItem( &( xNetworkBuffers[ x ].xBufferListItem ) ); + listSET_LIST_ITEM_OWNER( &( xNetworkBuffers[ x ].xBufferListItem ), &xNetworkBuffers[ x ] ); + + /* Currently, all buffers are available for use. */ + vListInsert( &xFreeBuffersList, &( xNetworkBuffers[ x ].xBufferListItem ) ); + } + + uxMinimumFreeNetworkBuffers = ( UBaseType_t ) ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; + } + } + + if( xNetworkBufferSemaphore == NULL ) + { + xReturn = pdFAIL; + } + else + { + xReturn = pdPASS; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) +{ +NetworkBufferDescriptor_t *pxReturn = NULL; +BaseType_t xInvalid = pdFALSE; +UBaseType_t uxCount; + + /* The current implementation only has a single size memory block, so + the requested size parameter is not used (yet). */ + ( void ) xRequestedSizeBytes; + + if( xNetworkBufferSemaphore != NULL ) + { + /* If there is a semaphore available, there is a network buffer + available. */ + if( xSemaphoreTake( xNetworkBufferSemaphore, xBlockTimeTicks ) == pdPASS ) + { + /* Protect the structure as they are accessed from tasks and + interrupts. */ + ipconfigBUFFER_ALLOC_LOCK(); + { + pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); + + if( ( bIsValidNetworkDescriptor( pxReturn ) != pdFALSE_UNSIGNED ) && + listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxReturn->xBufferListItem ) ) ) + { + uxListRemove( &( pxReturn->xBufferListItem ) ); + } + else + { + xInvalid = pdTRUE; + } + } + ipconfigBUFFER_ALLOC_UNLOCK(); + + if( xInvalid == pdTRUE ) + { + /* _RB_ Can printf() be called from an interrupt? (comment + above says this can be called from an interrupt too) */ + /* _HT_ The function shall not be called from an ISR. Comment + was indeed misleading. Hopefully clear now? + So the printf()is OK here. */ + FreeRTOS_debug_printf( ( "pxGetNetworkBufferWithDescriptor: INVALID BUFFER: %p (valid %lu)\n", + pxReturn, bIsValidNetworkDescriptor( pxReturn ) ) ); + pxReturn = NULL; + } + else + { + /* Reading UBaseType_t, no critical section needed. */ + uxCount = listCURRENT_LIST_LENGTH( &xFreeBuffersList ); + + /* For stats, latch the lowest number of network buffers since + booting. */ + if( uxMinimumFreeNetworkBuffers > uxCount ) + { + uxMinimumFreeNetworkBuffers = uxCount; + } + + pxReturn->xDataLength = xRequestedSizeBytes; + + #if( ipconfigTCP_IP_SANITY != 0 ) + { + prvShowWarnings(); + } + #endif /* ipconfigTCP_IP_SANITY */ + + #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) + { + /* make sure the buffer is not linked */ + pxReturn->pxNextBuffer = NULL; + } + #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ + } + iptraceNETWORK_BUFFER_OBTAINED( pxReturn ); + } + else + { + iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER(); + } + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes ) +{ +NetworkBufferDescriptor_t *pxReturn = NULL; + + /* The current implementation only has a single size memory block, so + the requested size parameter is not used (yet). */ + ( void ) xRequestedSizeBytes; + + /* If there is a semaphore available then there is a buffer available, but, + as this is called from an interrupt, only take a buffer if there are at + least baINTERRUPT_BUFFER_GET_THRESHOLD buffers remaining. This prevents, + to a certain degree at least, a rapidly executing interrupt exhausting + buffer and in so doing preventing tasks from continuing. */ + if( uxQueueMessagesWaitingFromISR( ( QueueHandle_t ) xNetworkBufferSemaphore ) > ( UBaseType_t ) baINTERRUPT_BUFFER_GET_THRESHOLD ) + { + if( xSemaphoreTakeFromISR( xNetworkBufferSemaphore, NULL ) == pdPASS ) + { + /* Protect the structure as it is accessed from tasks and interrupts. */ + ipconfigBUFFER_ALLOC_LOCK_FROM_ISR(); + { + pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); + uxListRemove( &( pxReturn->xBufferListItem ) ); + } + ipconfigBUFFER_ALLOC_UNLOCK_FROM_ISR(); + + iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR( pxReturn ); + } + } + + if( pxReturn == NULL ) + { + iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR(); + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ + +BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + /* Ensure the buffer is returned to the list of free buffers before the + counting semaphore is 'given' to say a buffer is available. */ + ipconfigBUFFER_ALLOC_LOCK_FROM_ISR(); + { + vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); + } + ipconfigBUFFER_ALLOC_UNLOCK_FROM_ISR(); + + xSemaphoreGiveFromISR( xNetworkBufferSemaphore, &xHigherPriorityTaskWoken ); + iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); + + return xHigherPriorityTaskWoken; +} +/*-----------------------------------------------------------*/ + +void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +BaseType_t xListItemAlreadyInFreeList; + + if( bIsValidNetworkDescriptor( pxNetworkBuffer ) == pdFALSE_UNSIGNED ) + { + FreeRTOS_debug_printf( ( "vReleaseNetworkBufferAndDescriptor: Invalid buffer %p\n", pxNetworkBuffer ) ); + return ; + } + /* Ensure the buffer is returned to the list of free buffers before the + counting semaphore is 'given' to say a buffer is available. */ + ipconfigBUFFER_ALLOC_LOCK(); + { + { + xListItemAlreadyInFreeList = listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); + + if( xListItemAlreadyInFreeList == pdFALSE ) + { + vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); + } + } + } + ipconfigBUFFER_ALLOC_UNLOCK(); + + if( xListItemAlreadyInFreeList ) + { + FreeRTOS_debug_printf( ( "vReleaseNetworkBufferAndDescriptor: %p ALREADY RELEASED (now %lu)\n", + pxNetworkBuffer, uxGetNumberOfFreeNetworkBuffers( ) ) ); + } + if( xListItemAlreadyInFreeList == pdFALSE ) + { + xSemaphoreGive( xNetworkBufferSemaphore ); + prvShowWarnings(); + } + iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); +} +/*-----------------------------------------------------------*/ + +UBaseType_t uxGetMinimumFreeNetworkBuffers( void ) +{ + return uxMinimumFreeNetworkBuffers; +} +/*-----------------------------------------------------------*/ + +UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) +{ + return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); +} + +NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, size_t xNewSizeBytes ) +{ + /* In BufferAllocation_1.c all network buffer are allocated with a + maximum size of 'ipTOTAL_ETHERNET_FRAME_SIZE'.No need to resize the + network buffer. */ + ( void ) xNewSizeBytes; + return pxNetworkBuffer; +} + +/*#endif */ /* ipconfigINCLUDE_TEST_CODE */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c index e008da07a..51f5410a4 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c @@ -1,393 +1,393 @@ -/* - * FreeRTOS+TCP V2.0.11 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/****************************************************************************** - * - * See the following web page for essential buffer allocation scheme usage and - * configuration details: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html - * - ******************************************************************************/ - -/* THIS FILE SHOULD NOT BE USED IF THE PROJECT INCLUDES A MEMORY ALLOCATOR -THAT WILL FRAGMENT THE HEAP MEMORY. For example, heap_2 must not be used, -heap_4 can be used. */ - - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" - -/* The obtained network buffer must be large enough to hold a packet that might -replace the packet that was requested to be sent. */ -#if ipconfigUSE_TCP == 1 - #define baMINIMAL_BUFFER_SIZE sizeof( TCPPacket_t ) -#else - #define baMINIMAL_BUFFER_SIZE sizeof( ARPPacket_t ) -#endif /* ipconfigUSE_TCP == 1 */ - -/*_RB_ This is too complex not to have an explanation. */ -#if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - #define ASSERT_CONCAT_(a, b) a##b - #define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b) - #define STATIC_ASSERT(e) \ - ;enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) } - - STATIC_ASSERT( ipconfigETHERNET_MINIMUM_PACKET_BYTES <= baMINIMAL_BUFFER_SIZE ); -#endif - -/* A list of free (available) NetworkBufferDescriptor_t structures. */ -static List_t xFreeBuffersList; - -/* Some statistics about the use of buffers. */ -static size_t uxMinimumFreeNetworkBuffers; - -/* Declares the pool of NetworkBufferDescriptor_t structures that are available -to the system. All the network buffers referenced from xFreeBuffersList exist -in this array. The array is not accessed directly except during initialisation, -when the xFreeBuffersList is filled (as all the buffers are free when the system -is booted). */ -static NetworkBufferDescriptor_t xNetworkBufferDescriptors[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ]; - -/* This constant is defined as false to let FreeRTOS_TCP_IP.c know that the -network buffers have a variable size: resizing may be necessary */ -const BaseType_t xBufferAllocFixedSize = pdFALSE; - -/* The semaphore used to obtain network buffers. */ -static SemaphoreHandle_t xNetworkBufferSemaphore = NULL; - -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkBuffersInitialise( void ) -{ -BaseType_t xReturn, x; - - /* Only initialise the buffers and their associated kernel objects if they - have not been initialised before. */ - if( xNetworkBufferSemaphore == NULL ) - { - xNetworkBufferSemaphore = xSemaphoreCreateCounting( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ); - configASSERT( xNetworkBufferSemaphore ); - - if( xNetworkBufferSemaphore != NULL ) - { - #if ( configQUEUE_REGISTRY_SIZE > 0 ) - { - vQueueAddToRegistry( xNetworkBufferSemaphore, "NetBufSem" ); - } - #endif /* configQUEUE_REGISTRY_SIZE */ - - /* If the trace recorder code is included name the semaphore for viewing - in FreeRTOS+Trace. */ - #if( ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 ) - { - extern QueueHandle_t xNetworkEventQueue; - vTraceSetQueueName( xNetworkEventQueue, "IPStackEvent" ); - vTraceSetQueueName( xNetworkBufferSemaphore, "NetworkBufferCount" ); - } - #endif /* ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 */ - - vListInitialise( &xFreeBuffersList ); - - /* Initialise all the network buffers. No storage is allocated to - the buffers yet. */ - for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ ) - { - /* Initialise and set the owner of the buffer list items. */ - xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL; - vListInitialiseItem( &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); - listSET_LIST_ITEM_OWNER( &( xNetworkBufferDescriptors[ x ].xBufferListItem ), &xNetworkBufferDescriptors[ x ] ); - - /* Currently, all buffers are available for use. */ - vListInsert( &xFreeBuffersList, &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); - } - - uxMinimumFreeNetworkBuffers = ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; - } - } - - if( xNetworkBufferSemaphore == NULL ) - { - xReturn = pdFAIL; - } - else - { - xReturn = pdPASS; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes ) -{ -uint8_t *pucEthernetBuffer; -size_t xSize = *pxRequestedSizeBytes; - - if( xSize < baMINIMAL_BUFFER_SIZE ) - { - /* Buffers must be at least large enough to hold a TCP-packet with - headers, or an ARP packet, in case TCP is not included. */ - xSize = baMINIMAL_BUFFER_SIZE; - } - - /* Round up xSize to the nearest multiple of N bytes, - where N equals 'sizeof( size_t )'. */ - if( ( xSize & ( sizeof( size_t ) - 1u ) ) != 0u ) - { - xSize = ( xSize | ( sizeof( size_t ) - 1u ) ) + 1u; - } - *pxRequestedSizeBytes = xSize; - - /* Allocate a buffer large enough to store the requested Ethernet frame size - and a pointer to a network buffer structure (hence the addition of - ipBUFFER_PADDING bytes). */ - pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xSize + ipBUFFER_PADDING ); - configASSERT( pucEthernetBuffer ); - - if( pucEthernetBuffer != NULL ) - { - /* Enough space is left at the start of the buffer to place a pointer to - the network buffer structure that references this Ethernet buffer. - Return a pointer to the start of the Ethernet buffer itself. */ - pucEthernetBuffer += ipBUFFER_PADDING; - } - - return pucEthernetBuffer; -} -/*-----------------------------------------------------------*/ - -void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer ) -{ - /* There is space before the Ethernet buffer in which a pointer to the - network buffer that references this Ethernet buffer is stored. Remove the - space before freeing the buffer. */ - if( pucEthernetBuffer != NULL ) - { - pucEthernetBuffer -= ipBUFFER_PADDING; - vPortFree( ( void * ) pucEthernetBuffer ); - } -} -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) -{ -NetworkBufferDescriptor_t *pxReturn = NULL; -size_t uxCount; - - if( xNetworkBufferSemaphore != NULL ) - { - if( ( xRequestedSizeBytes != 0u ) && ( xRequestedSizeBytes < ( size_t ) baMINIMAL_BUFFER_SIZE ) ) - { - /* ARP packets can replace application packets, so the storage must be - at least large enough to hold an ARP. */ - xRequestedSizeBytes = baMINIMAL_BUFFER_SIZE; - } - - /* Add 2 bytes to xRequestedSizeBytes and round up xRequestedSizeBytes - to the nearest multiple of N bytes, where N equals 'sizeof( size_t )'. */ - xRequestedSizeBytes += 2u; - if( ( xRequestedSizeBytes & ( sizeof( size_t ) - 1u ) ) != 0u ) - { - xRequestedSizeBytes = ( xRequestedSizeBytes | ( sizeof( size_t ) - 1u ) ) + 1u; - } - - /* If there is a semaphore available, there is a network buffer available. */ - if( xSemaphoreTake( xNetworkBufferSemaphore, xBlockTimeTicks ) == pdPASS ) - { - /* Protect the structure as it is accessed from tasks and interrupts. */ - taskENTER_CRITICAL(); - { - pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); - uxListRemove( &( pxReturn->xBufferListItem ) ); - } - taskEXIT_CRITICAL(); - - /* Reading UBaseType_t, no critical section needed. */ - uxCount = listCURRENT_LIST_LENGTH( &xFreeBuffersList ); - - if( uxMinimumFreeNetworkBuffers > uxCount ) - { - uxMinimumFreeNetworkBuffers = uxCount; - } - - /* Allocate storage of exactly the requested size to the buffer. */ - configASSERT( pxReturn->pucEthernetBuffer == NULL ); - if( xRequestedSizeBytes > 0 ) - { - /* Extra space is obtained so a pointer to the network buffer can - be stored at the beginning of the buffer. */ - pxReturn->pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xRequestedSizeBytes + ipBUFFER_PADDING ); - - if( pxReturn->pucEthernetBuffer == NULL ) - { - /* The attempt to allocate storage for the buffer payload failed, - so the network buffer structure cannot be used and must be - released. */ - vReleaseNetworkBufferAndDescriptor( pxReturn ); - pxReturn = NULL; - } - else - { - /* Store a pointer to the network buffer structure in the - buffer storage area, then move the buffer pointer on past the - stored pointer so the pointer value is not overwritten by the - application when the buffer is used. */ - *( ( NetworkBufferDescriptor_t ** ) ( pxReturn->pucEthernetBuffer ) ) = pxReturn; - pxReturn->pucEthernetBuffer += ipBUFFER_PADDING; - - /* Store the actual size of the allocated buffer, which may be - greater than the original requested size. */ - pxReturn->xDataLength = xRequestedSizeBytes; - - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - /* make sure the buffer is not linked */ - pxReturn->pxNextBuffer = NULL; - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ - } - } - else - { - /* A descriptor is being returned without an associated buffer being - allocated. */ - } - } - } - - if( pxReturn == NULL ) - { - iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER(); - } - else - { - iptraceNETWORK_BUFFER_OBTAINED( pxReturn ); - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ - -void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -BaseType_t xListItemAlreadyInFreeList; - - /* Ensure the buffer is returned to the list of free buffers before the - counting semaphore is 'given' to say a buffer is available. Release the - storage allocated to the buffer payload. THIS FILE SHOULD NOT BE USED - IF THE PROJECT INCLUDES A MEMORY ALLOCATOR THAT WILL FRAGMENT THE HEAP - MEMORY. For example, heap_2 must not be used, heap_4 can be used. */ - vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); - pxNetworkBuffer->pucEthernetBuffer = NULL; - - taskENTER_CRITICAL(); - { - xListItemAlreadyInFreeList = listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); - - if( xListItemAlreadyInFreeList == pdFALSE ) - { - vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); - } - } - taskEXIT_CRITICAL(); - - /* - * Update the network state machine, unless the program fails to release its 'xNetworkBufferSemaphore'. - * The program should only try to release its semaphore if 'xListItemAlreadyInFreeList' is false. - */ - if( xListItemAlreadyInFreeList == pdFALSE ) - { - if ( xSemaphoreGive( xNetworkBufferSemaphore ) == pdTRUE ) - { - iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); - } - } - else - { - iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); - } -} -/*-----------------------------------------------------------*/ - -/* - * Returns the number of free network buffers - */ -UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) -{ - return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxGetMinimumFreeNetworkBuffers( void ) -{ - return uxMinimumFreeNetworkBuffers; -} -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, size_t xNewSizeBytes ) -{ -size_t xOriginalLength; -uint8_t *pucBuffer; - - xOriginalLength = pxNetworkBuffer->xDataLength + ipBUFFER_PADDING; - xNewSizeBytes = xNewSizeBytes + ipBUFFER_PADDING; - - pucBuffer = pucGetNetworkBuffer( &( xNewSizeBytes ) ); - - if( pucBuffer == NULL ) - { - /* In case the allocation fails, return NULL. */ - pxNetworkBuffer = NULL; - } - else - { - pxNetworkBuffer->xDataLength = xNewSizeBytes; - if( xNewSizeBytes > xOriginalLength ) - { - xNewSizeBytes = xOriginalLength; - } - - memcpy( pucBuffer - ipBUFFER_PADDING, pxNetworkBuffer->pucEthernetBuffer - ipBUFFER_PADDING, xNewSizeBytes ); - vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); - pxNetworkBuffer->pucEthernetBuffer = pucBuffer; - } - - return pxNetworkBuffer; -} - +/* + * FreeRTOS+TCP V2.0.11 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://www.FreeRTOS.org + * http://aws.amazon.com/freertos + * + * 1 tab == 4 spaces! + */ + +/****************************************************************************** + * + * See the following web page for essential buffer allocation scheme usage and + * configuration details: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html + * + ******************************************************************************/ + +/* THIS FILE SHOULD NOT BE USED IF THE PROJECT INCLUDES A MEMORY ALLOCATOR +THAT WILL FRAGMENT THE HEAP MEMORY. For example, heap_2 must not be used, +heap_4 can be used. */ + + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" + +/* The obtained network buffer must be large enough to hold a packet that might +replace the packet that was requested to be sent. */ +#if ipconfigUSE_TCP == 1 + #define baMINIMAL_BUFFER_SIZE sizeof( TCPPacket_t ) +#else + #define baMINIMAL_BUFFER_SIZE sizeof( ARPPacket_t ) +#endif /* ipconfigUSE_TCP == 1 */ + +/*_RB_ This is too complex not to have an explanation. */ +#if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + #define ASSERT_CONCAT_(a, b) a##b + #define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b) + #define STATIC_ASSERT(e) \ + ;enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) } + + STATIC_ASSERT( ipconfigETHERNET_MINIMUM_PACKET_BYTES <= baMINIMAL_BUFFER_SIZE ); +#endif + +/* A list of free (available) NetworkBufferDescriptor_t structures. */ +static List_t xFreeBuffersList; + +/* Some statistics about the use of buffers. */ +static size_t uxMinimumFreeNetworkBuffers; + +/* Declares the pool of NetworkBufferDescriptor_t structures that are available +to the system. All the network buffers referenced from xFreeBuffersList exist +in this array. The array is not accessed directly except during initialisation, +when the xFreeBuffersList is filled (as all the buffers are free when the system +is booted). */ +static NetworkBufferDescriptor_t xNetworkBufferDescriptors[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ]; + +/* This constant is defined as false to let FreeRTOS_TCP_IP.c know that the +network buffers have a variable size: resizing may be necessary */ +const BaseType_t xBufferAllocFixedSize = pdFALSE; + +/* The semaphore used to obtain network buffers. */ +static SemaphoreHandle_t xNetworkBufferSemaphore = NULL; + +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkBuffersInitialise( void ) +{ +BaseType_t xReturn, x; + + /* Only initialise the buffers and their associated kernel objects if they + have not been initialised before. */ + if( xNetworkBufferSemaphore == NULL ) + { + xNetworkBufferSemaphore = xSemaphoreCreateCounting( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ); + configASSERT( xNetworkBufferSemaphore ); + + if( xNetworkBufferSemaphore != NULL ) + { + #if ( configQUEUE_REGISTRY_SIZE > 0 ) + { + vQueueAddToRegistry( xNetworkBufferSemaphore, "NetBufSem" ); + } + #endif /* configQUEUE_REGISTRY_SIZE */ + + /* If the trace recorder code is included name the semaphore for viewing + in FreeRTOS+Trace. */ + #if( ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 ) + { + extern QueueHandle_t xNetworkEventQueue; + vTraceSetQueueName( xNetworkEventQueue, "IPStackEvent" ); + vTraceSetQueueName( xNetworkBufferSemaphore, "NetworkBufferCount" ); + } + #endif /* ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 */ + + vListInitialise( &xFreeBuffersList ); + + /* Initialise all the network buffers. No storage is allocated to + the buffers yet. */ + for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ ) + { + /* Initialise and set the owner of the buffer list items. */ + xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL; + vListInitialiseItem( &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); + listSET_LIST_ITEM_OWNER( &( xNetworkBufferDescriptors[ x ].xBufferListItem ), &xNetworkBufferDescriptors[ x ] ); + + /* Currently, all buffers are available for use. */ + vListInsert( &xFreeBuffersList, &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); + } + + uxMinimumFreeNetworkBuffers = ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; + } + } + + if( xNetworkBufferSemaphore == NULL ) + { + xReturn = pdFAIL; + } + else + { + xReturn = pdPASS; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes ) +{ +uint8_t *pucEthernetBuffer; +size_t xSize = *pxRequestedSizeBytes; + + if( xSize < baMINIMAL_BUFFER_SIZE ) + { + /* Buffers must be at least large enough to hold a TCP-packet with + headers, or an ARP packet, in case TCP is not included. */ + xSize = baMINIMAL_BUFFER_SIZE; + } + + /* Round up xSize to the nearest multiple of N bytes, + where N equals 'sizeof( size_t )'. */ + if( ( xSize & ( sizeof( size_t ) - 1u ) ) != 0u ) + { + xSize = ( xSize | ( sizeof( size_t ) - 1u ) ) + 1u; + } + *pxRequestedSizeBytes = xSize; + + /* Allocate a buffer large enough to store the requested Ethernet frame size + and a pointer to a network buffer structure (hence the addition of + ipBUFFER_PADDING bytes). */ + pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xSize + ipBUFFER_PADDING ); + configASSERT( pucEthernetBuffer ); + + if( pucEthernetBuffer != NULL ) + { + /* Enough space is left at the start of the buffer to place a pointer to + the network buffer structure that references this Ethernet buffer. + Return a pointer to the start of the Ethernet buffer itself. */ + pucEthernetBuffer += ipBUFFER_PADDING; + } + + return pucEthernetBuffer; +} +/*-----------------------------------------------------------*/ + +void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer ) +{ + /* There is space before the Ethernet buffer in which a pointer to the + network buffer that references this Ethernet buffer is stored. Remove the + space before freeing the buffer. */ + if( pucEthernetBuffer != NULL ) + { + pucEthernetBuffer -= ipBUFFER_PADDING; + vPortFree( ( void * ) pucEthernetBuffer ); + } +} +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) +{ +NetworkBufferDescriptor_t *pxReturn = NULL; +size_t uxCount; + + if( xNetworkBufferSemaphore != NULL ) + { + if( ( xRequestedSizeBytes != 0u ) && ( xRequestedSizeBytes < ( size_t ) baMINIMAL_BUFFER_SIZE ) ) + { + /* ARP packets can replace application packets, so the storage must be + at least large enough to hold an ARP. */ + xRequestedSizeBytes = baMINIMAL_BUFFER_SIZE; + } + + /* Add 2 bytes to xRequestedSizeBytes and round up xRequestedSizeBytes + to the nearest multiple of N bytes, where N equals 'sizeof( size_t )'. */ + xRequestedSizeBytes += 2u; + if( ( xRequestedSizeBytes & ( sizeof( size_t ) - 1u ) ) != 0u ) + { + xRequestedSizeBytes = ( xRequestedSizeBytes | ( sizeof( size_t ) - 1u ) ) + 1u; + } + + /* If there is a semaphore available, there is a network buffer available. */ + if( xSemaphoreTake( xNetworkBufferSemaphore, xBlockTimeTicks ) == pdPASS ) + { + /* Protect the structure as it is accessed from tasks and interrupts. */ + taskENTER_CRITICAL(); + { + pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); + uxListRemove( &( pxReturn->xBufferListItem ) ); + } + taskEXIT_CRITICAL(); + + /* Reading UBaseType_t, no critical section needed. */ + uxCount = listCURRENT_LIST_LENGTH( &xFreeBuffersList ); + + if( uxMinimumFreeNetworkBuffers > uxCount ) + { + uxMinimumFreeNetworkBuffers = uxCount; + } + + /* Allocate storage of exactly the requested size to the buffer. */ + configASSERT( pxReturn->pucEthernetBuffer == NULL ); + if( xRequestedSizeBytes > 0 ) + { + /* Extra space is obtained so a pointer to the network buffer can + be stored at the beginning of the buffer. */ + pxReturn->pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xRequestedSizeBytes + ipBUFFER_PADDING ); + + if( pxReturn->pucEthernetBuffer == NULL ) + { + /* The attempt to allocate storage for the buffer payload failed, + so the network buffer structure cannot be used and must be + released. */ + vReleaseNetworkBufferAndDescriptor( pxReturn ); + pxReturn = NULL; + } + else + { + /* Store a pointer to the network buffer structure in the + buffer storage area, then move the buffer pointer on past the + stored pointer so the pointer value is not overwritten by the + application when the buffer is used. */ + *( ( NetworkBufferDescriptor_t ** ) ( pxReturn->pucEthernetBuffer ) ) = pxReturn; + pxReturn->pucEthernetBuffer += ipBUFFER_PADDING; + + /* Store the actual size of the allocated buffer, which may be + greater than the original requested size. */ + pxReturn->xDataLength = xRequestedSizeBytes; + + #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) + { + /* make sure the buffer is not linked */ + pxReturn->pxNextBuffer = NULL; + } + #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ + } + } + else + { + /* A descriptor is being returned without an associated buffer being + allocated. */ + } + } + } + + if( pxReturn == NULL ) + { + iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER(); + } + else + { + iptraceNETWORK_BUFFER_OBTAINED( pxReturn ); + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ + +void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +BaseType_t xListItemAlreadyInFreeList; + + /* Ensure the buffer is returned to the list of free buffers before the + counting semaphore is 'given' to say a buffer is available. Release the + storage allocated to the buffer payload. THIS FILE SHOULD NOT BE USED + IF THE PROJECT INCLUDES A MEMORY ALLOCATOR THAT WILL FRAGMENT THE HEAP + MEMORY. For example, heap_2 must not be used, heap_4 can be used. */ + vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); + pxNetworkBuffer->pucEthernetBuffer = NULL; + + taskENTER_CRITICAL(); + { + xListItemAlreadyInFreeList = listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); + + if( xListItemAlreadyInFreeList == pdFALSE ) + { + vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); + } + } + taskEXIT_CRITICAL(); + + /* + * Update the network state machine, unless the program fails to release its 'xNetworkBufferSemaphore'. + * The program should only try to release its semaphore if 'xListItemAlreadyInFreeList' is false. + */ + if( xListItemAlreadyInFreeList == pdFALSE ) + { + if ( xSemaphoreGive( xNetworkBufferSemaphore ) == pdTRUE ) + { + iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); + } + } + else + { + iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); + } +} +/*-----------------------------------------------------------*/ + +/* + * Returns the number of free network buffers + */ +UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) +{ + return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); +} +/*-----------------------------------------------------------*/ + +UBaseType_t uxGetMinimumFreeNetworkBuffers( void ) +{ + return uxMinimumFreeNetworkBuffers; +} +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, size_t xNewSizeBytes ) +{ +size_t xOriginalLength; +uint8_t *pucBuffer; + + xOriginalLength = pxNetworkBuffer->xDataLength + ipBUFFER_PADDING; + xNewSizeBytes = xNewSizeBytes + ipBUFFER_PADDING; + + pucBuffer = pucGetNetworkBuffer( &( xNewSizeBytes ) ); + + if( pucBuffer == NULL ) + { + /* In case the allocation fails, return NULL. */ + pxNetworkBuffer = NULL; + } + else + { + pxNetworkBuffer->xDataLength = xNewSizeBytes; + if( xNewSizeBytes > xOriginalLength ) + { + xNewSizeBytes = xOriginalLength; + } + + memcpy( pucBuffer - ipBUFFER_PADDING, pxNetworkBuffer->pucEthernetBuffer - ipBUFFER_PADDING, xNewSizeBytes ); + vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); + pxNetworkBuffer->pucEthernetBuffer = pucBuffer; + } + + return pxNetworkBuffer; +} + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/ReadMe.txt b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/ReadMe.txt new file mode 100644 index 000000000..17aca5764 --- /dev/null +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/ReadMe.txt @@ -0,0 +1,3 @@ +Update pack_struct_start.h and pack_struct_end.h for your architecure. +These files define the specifiers needed by your compiler to properly pack struct data +need by FreeRTOS+TCP. \ No newline at end of file diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_end.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_end.h new file mode 100644 index 000000000..cdbad17c4 --- /dev/null +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_end.h @@ -0,0 +1,32 @@ +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ +; /* FIX ME. Update for the compiler specifier needed at end of a struct declartion to pack the struct. */ \ No newline at end of file diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_start.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_start.h new file mode 100644 index 000000000..7fe533a06 --- /dev/null +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/CompilerName/pack_struct_start.h @@ -0,0 +1,32 @@ +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ +/* FIX ME. Update for the compiler specifier needed at the start of a struct declartion to pack the struct. */ \ No newline at end of file diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_end.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_end.h index d61b8d003..73455f910 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_end.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_end.h @@ -1,46 +1,46 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ -__attribute__( (packed) ); - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ +__attribute__( (packed) ); + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_start.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_start.h index 5a88f78cf..658cc4a5e 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_start.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC/pack_struct_start.h @@ -1,48 +1,48 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - -/* Nothing to do here. */ - - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + +/* Nothing to do here. */ + + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_end.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_end.h index 85e670819..f0a73881d 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_end.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_end.h @@ -1,47 +1,47 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - -; - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + +; + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_start.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_start.h index 15e6eb69b..95cc089b2 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_start.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/IAR/pack_struct_start.h @@ -1,49 +1,49 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - -__packed - - - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + +__packed + + + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_end.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_end.h index 816b0b3b6..48a8ef963 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_end.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_end.h @@ -1,33 +1,33 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ -; -#pragma pack(pop) +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ +; +#pragma pack(pop) diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_start.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_start.h index 29ea9ae3e..32c98e859 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_start.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Keil/pack_struct_start.h @@ -1,48 +1,48 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - -#pragma pack(push,1) - - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + +#pragma pack(push,1) + + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_end.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_end.h index 19a0f39ef..e486c1c30 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_end.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_end.h @@ -1,48 +1,48 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - -; -#pragma pack( pop ) - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + +; +#pragma pack( pop ) + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_start.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_start.h index 54a3e6885..52b90803b 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_start.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/MSVC/pack_struct_start.h @@ -1,47 +1,47 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - -#pragma pack( push, 1 ) - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + +#pragma pack( push, 1 ) + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_end.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_end.h index 2e6d2f997..49e276960 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_end.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_end.h @@ -1,60 +1,60 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - - -#ifdef _SH - #ifdef __RENESAS__ - ; - #pragma unpack - #endif -#endif -#ifdef __RX - #ifdef __CCRX__ - ; - #pragma packoption - #endif -#endif - - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + + +#ifdef _SH + #ifdef __RENESAS__ + ; + #pragma unpack + #endif +#endif +#ifdef __RX + #ifdef __CCRX__ + ; + #pragma packoption + #endif +#endif + + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_start.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_start.h index 7c8750c6a..88c4c1f38 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_start.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/Renesas/pack_struct_start.h @@ -1,58 +1,58 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/***************************************************************************** - * - * See the following URL for an explanation of this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html - * - *****************************************************************************/ - - -#ifdef _SH - #ifdef __RENESAS__ - #pragma pack 1 - #endif -#endif -#ifdef __RX - #ifdef __CCRX__ - #pragma pack - #endif -#endif - - - - - - - - - - - - - - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/***************************************************************************** + * + * See the following URL for an explanation of this file: + * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html + * + *****************************************************************************/ + + +#ifdef _SH + #ifdef __RENESAS__ + #pragma pack 1 + #endif +#endif +#ifdef __RX + #ifdef __CCRX__ + #pragma pack + #endif +#endif + + + + + + + + + + + + + + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/NetworkInterface.c index 83c96a07c..3528269bd 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/NetworkInterface.c @@ -1,637 +1,637 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -/* Some files from the Atmel Software Framework */ -/*_RB_ The SAM4E portable layer has three different header files called gmac.h! */ -#include "instance/gmac.h" -#include -#include - -#ifndef BMSR_LINK_STATUS - #define BMSR_LINK_STATUS 0x0004 //!< Link status -#endif - -#ifndef PHY_LS_HIGH_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not - receiving packets. */ - #define PHY_LS_HIGH_CHECK_TIME_MS 15000 -#endif - -#ifndef PHY_LS_LOW_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still low every second. */ - #define PHY_LS_LOW_CHECK_TIME_MS 1000 -#endif - -/* Interrupt events to process. Currently only the Rx event is processed -although code for other events is included to allow for possible future -expansion. */ -#define EMAC_IF_RX_EVENT 1UL -#define EMAC_IF_TX_EVENT 2UL -#define EMAC_IF_ERR_EVENT 4UL -#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) - -#define ETHERNET_CONF_PHY_ADDR BOARD_GMAC_PHY_ADDR - -#define HZ_PER_MHZ ( 1000000UL ) - -#ifndef EMAC_MAX_BLOCK_TIME_MS - #define EMAC_MAX_BLOCK_TIME_MS 100ul -#endif - -#if !defined( GMAC_USES_TX_CALLBACK ) || ( GMAC_USES_TX_CALLBACK != 1 ) - #error Please define GMAC_USES_TX_CALLBACK as 1 -#endif - -/* Default the size of the stack used by the EMAC deferred handler task to 4x -the size of the stack used by the idle task - but allow this to be overridden in -FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ -#ifndef configEMAC_TASK_STACK_SIZE - #define configEMAC_TASK_STACK_SIZE ( 4 * configMINIMAL_STACK_SIZE ) -#endif - -/*-----------------------------------------------------------*/ - -/* - * Wait a fixed time for the link status to indicate the network is up. - */ -static BaseType_t xGMACWaitLS( TickType_t xMaxTime ); - -#if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 1 ) && ( ipconfigHAS_TX_CRC_OFFLOADING == 0 ) - void vGMACGenerateChecksum( uint8_t *apBuffer ); -#endif - -/* - * Called from the ASF GMAC driver. - */ -static void prvRxCallback( uint32_t ulStatus ); -static void prvTxCallback( uint32_t ulStatus, uint8_t *puc_buffer ); - -/* - * A deferred interrupt handler task that processes GMAC interrupts. - */ -static void prvEMACHandlerTask( void *pvParameters ); - -/* - * Initialise the ASF GMAC driver. - */ -static BaseType_t prvGMACInit( void ); - -/* - * Try to obtain an Rx packet from the hardware. - */ -static uint32_t prvEMACRxPoll( void ); - -/*-----------------------------------------------------------*/ - -/* Bit map of outstanding ETH interrupt events for processing. Currently only -the Rx interrupt is handled, although code is included for other events to -enable future expansion. */ -static volatile uint32_t ulISREvents; - -/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ -static uint32_t ulPHYLinkStatus = 0; -static volatile BaseType_t xGMACSwitchRequired; - -/* ethernet_phy_addr: the address of the PHY in use. -Atmel was a bit ambiguous about it so the address will be stored -in this variable, see ethernet_phy.c */ -extern int ethernet_phy_addr; - -/* LLMNR multicast address. */ -static const uint8_t llmnr_mac_address[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; - -/* The GMAC object as defined by the ASF drivers. */ -static gmac_device_t gs_gmac_dev; - -/* MAC address to use. */ -extern const uint8_t ucMACAddress[ 6 ]; - -/* Holds the handle of the task used as a deferred interrupt processor. The -handle is used so direct notifications can be sent to the task for all EMAC/DMA -related interrupts. */ -TaskHandle_t xEMACTaskHandle = NULL; - -static QueueHandle_t xTxBufferQueue; -int tx_release_count[ 4 ]; - -/* xTXDescriptorSemaphore is a counting semaphore with -a maximum count of GMAC_TX_BUFFERS, which is the number of -DMA TX descriptors. */ -static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; - -/*-----------------------------------------------------------*/ - -/* - * GMAC interrupt handler. - */ -void GMAC_Handler(void) -{ - xGMACSwitchRequired = pdFALSE; - - /* gmac_handler() may call prvRxCallback() which may change - the value of xGMACSwitchRequired. */ - gmac_handler( &gs_gmac_dev ); - - if( xGMACSwitchRequired != pdFALSE ) - { - portEND_SWITCHING_ISR( xGMACSwitchRequired ); - } -} -/*-----------------------------------------------------------*/ - -static void prvRxCallback( uint32_t ulStatus ) -{ - if( ( ( ulStatus & GMAC_RSR_REC ) != 0 ) && ( xEMACTaskHandle != NULL ) ) - { - /* let the prvEMACHandlerTask know that there was an RX event. */ - ulISREvents |= EMAC_IF_RX_EVENT; - /* Only an RX interrupt can wakeup prvEMACHandlerTask. */ - vTaskNotifyGiveFromISR( xEMACTaskHandle, ( BaseType_t * ) &xGMACSwitchRequired ); - } -} -/*-----------------------------------------------------------*/ - -static void prvTxCallback( uint32_t ulStatus, uint8_t *puc_buffer ) -{ - if( ( xTxBufferQueue != NULL ) && ( xEMACTaskHandle != NULL ) ) - { - /* let the prvEMACHandlerTask know that there was an RX event. */ - ulISREvents |= EMAC_IF_TX_EVENT; - - vTaskNotifyGiveFromISR( xEMACTaskHandle, ( BaseType_t * ) &xGMACSwitchRequired ); - xQueueSendFromISR( xTxBufferQueue, &puc_buffer, ( BaseType_t * ) &xGMACSwitchRequired ); - tx_release_count[ 2 ]++; - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -const TickType_t x5_Seconds = 5000UL; - - if( xEMACTaskHandle == NULL ) - { - prvGMACInit(); - - /* Wait at most 5 seconds for a Link Status in the PHY. */ - xGMACWaitLS( pdMS_TO_TICKS( x5_Seconds ) ); - - /* The handler task is created at the highest possible priority to - ensure the interrupt handler can return directly to it. */ - xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); - configASSERT( xEMACTaskHandle ); - } - - if( xTxBufferQueue == NULL ) - { - xTxBufferQueue = xQueueCreate( GMAC_TX_BUFFERS, sizeof( void * ) ); - configASSERT( xTxBufferQueue ); - } - - if( xTXDescriptorSemaphore == NULL ) - { - xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) GMAC_TX_BUFFERS, ( UBaseType_t ) GMAC_TX_BUFFERS ); - configASSERT( xTXDescriptorSemaphore ); - } - /* When returning non-zero, the stack will become active and - start DHCP (in configured) */ - return ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0; -} -/*-----------------------------------------------------------*/ - -BaseType_t xGetPhyLinkStatus( void ) -{ -BaseType_t xResult; - - /* This function returns true if the Link Status in the PHY is high. */ - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - xResult = pdTRUE; - } - else - { - xResult = pdFALSE; - } - - return xResult; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t bReleaseAfterSend ) -{ -/* Do not wait too long for a free TX DMA buffer. */ -const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50u ); - - do { - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) == 0 ) - { - /* Do not attempt to send packets as long as the Link Status is low. */ - break; - } - if( xTXDescriptorSemaphore == NULL ) - { - /* Semaphore has not been created yet? */ - break; - } - if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) - { - /* Time-out waiting for a free TX descriptor. */ - tx_release_count[ 3 ]++; - break; - } - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* Confirm that the pxDescriptor may be kept by the driver. */ - configASSERT( bReleaseAfterSend != pdFALSE ); - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - gmac_dev_write( &gs_gmac_dev, (void *)pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength, prvTxCallback ); - - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* Confirm that the pxDescriptor may be kept by the driver. */ - bReleaseAfterSend = pdFALSE; - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - /* Not interested in a call-back after TX. */ - iptraceNETWORK_INTERFACE_TRANSMIT(); - } while( 0 ); - - if( bReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvGMACInit( void ) -{ -uint32_t ncfgr; - - gmac_options_t gmac_option; - - memset( &gmac_option, '\0', sizeof( gmac_option ) ); - gmac_option.uc_copy_all_frame = 0; - gmac_option.uc_no_boardcast = 0; - memcpy( gmac_option.uc_mac_addr, ucMACAddress, sizeof( gmac_option.uc_mac_addr ) ); - - gs_gmac_dev.p_hw = GMAC; - gmac_dev_init( GMAC, &gs_gmac_dev, &gmac_option ); - - NVIC_SetPriority( GMAC_IRQn, configMAC_INTERRUPT_PRIORITY ); - NVIC_EnableIRQ( GMAC_IRQn ); - - /* Contact the Ethernet PHY and store it's address in 'ethernet_phy_addr' */ - ethernet_phy_init( GMAC, ETHERNET_CONF_PHY_ADDR, sysclk_get_cpu_hz() ); - - ethernet_phy_auto_negotiate( GMAC, ethernet_phy_addr ); - ethernet_phy_set_link( GMAC, ethernet_phy_addr, 1 ); - - /* The GMAC driver will call a hook prvRxCallback(), which - in turn will wake-up the task by calling vTaskNotifyGiveFromISR() */ - gmac_dev_set_rx_callback( &gs_gmac_dev, prvRxCallback ); - gmac_set_address( GMAC, 1, (uint8_t*)llmnr_mac_address ); - - ncfgr = GMAC_NCFGR_SPD | GMAC_NCFGR_FD; - - GMAC->GMAC_NCFGR = ( GMAC->GMAC_NCFGR & ~( GMAC_NCFGR_SPD | GMAC_NCFGR_FD ) ) | ncfgr; - - return 1; -} -/*-----------------------------------------------------------*/ - -static inline unsigned long ulReadMDIO( unsigned /*short*/ usAddress ) -{ -uint32_t ulValue, ulReturn; -int rc; - - gmac_enable_management( GMAC, 1 ); - rc = gmac_phy_read( GMAC, ethernet_phy_addr, usAddress, &ulValue ); - gmac_enable_management( GMAC, 0 ); - if( rc == GMAC_OK ) - { - ulReturn = ulValue; - } - else - { - ulReturn = 0UL; - } - - return ulReturn; -} -/*-----------------------------------------------------------*/ - -static BaseType_t xGMACWaitLS( TickType_t xMaxTime ) -{ -TickType_t xStartTime = xTaskGetTickCount(); -TickType_t xEndTime; -BaseType_t xReturn; -const TickType_t xShortTime = pdMS_TO_TICKS( 100UL ); - - for( ;; ) - { - xEndTime = xTaskGetTickCount(); - - if( ( xEndTime - xStartTime ) > xMaxTime ) - { - /* Wated more than xMaxTime, return. */ - xReturn = pdFALSE; - break; - } - - /* Check the link status again. */ - ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); - - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - /* Link is up - return. */ - xReturn = pdTRUE; - break; - } - - /* Link is down - wait in the Blocked state for a short while (to allow - other tasks to execute) before checking again. */ - vTaskDelay( xShortTime ); - } - - FreeRTOS_printf( ( "xGMACWaitLS: %ld (PHY %d) freq %lu Mz\n", - xReturn, - ethernet_phy_addr, - sysclk_get_cpu_hz() / HZ_PER_MHZ ) ); - - return xReturn; -} -/*-----------------------------------------------------------*/ - -//#if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 1 ) && ( ipconfigHAS_TX_CRC_OFFLOADING == 0 ) - - void vGMACGenerateChecksum( uint8_t *apBuffer ) - { - ProtocolPacket_t *xProtPacket = (ProtocolPacket_t *)apBuffer; - - if ( xProtPacket->xTCPPacket.xEthernetHeader.usFrameType == ipIPv4_FRAME_TYPE ) - { - IPHeader_t *pxIPHeader = &(xProtPacket->xTCPPacket.xIPHeader); - - /* Calculate the IP header checksum. */ - pxIPHeader->usHeaderChecksum = 0x00; - pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); - pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); - - /* Calculate the TCP checksum for an outgoing packet. */ - usGenerateProtocolChecksum( ( uint8_t * ) apBuffer, pdTRUE ); - } - } - -//#endif -/*-----------------------------------------------------------*/ - -static uint32_t prvEMACRxPoll( void ) -{ -unsigned char *pucUseBuffer; -uint32_t ulReceiveCount, ulResult, ulReturnValue = 0; -static NetworkBufferDescriptor_t *pxNextNetworkBufferDescriptor = NULL; -const UBaseType_t xMinDescriptorsToLeave = 2UL; -const TickType_t xBlockTime = pdMS_TO_TICKS( 100UL ); -static IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; - - for( ;; ) - { - /* If pxNextNetworkBufferDescriptor was not left pointing at a valid - descriptor then allocate one now. */ - if( ( pxNextNetworkBufferDescriptor == NULL ) && ( uxGetNumberOfFreeNetworkBuffers() > xMinDescriptorsToLeave ) ) - { - pxNextNetworkBufferDescriptor = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE, xBlockTime ); - } - - if( pxNextNetworkBufferDescriptor != NULL ) - { - /* Point pucUseBuffer to the buffer pointed to by the descriptor. */ - pucUseBuffer = ( unsigned char* ) ( pxNextNetworkBufferDescriptor->pucEthernetBuffer - ipconfigPACKET_FILLER_SIZE ); - } - else - { - /* As long as pxNextNetworkBufferDescriptor is NULL, the incoming - messages will be flushed and ignored. */ - pucUseBuffer = NULL; - } - - /* Read the next packet from the hardware into pucUseBuffer. */ - ulResult = gmac_dev_read( &gs_gmac_dev, pucUseBuffer, ipTOTAL_ETHERNET_FRAME_SIZE, &ulReceiveCount ); - - if( ( ulResult != GMAC_OK ) || ( ulReceiveCount == 0 ) ) - { - /* No data from the hardware. */ - break; - } - - if( pxNextNetworkBufferDescriptor == NULL ) - { - /* Data was read from the hardware, but no descriptor was available - for it, so it will be dropped. */ - iptraceETHERNET_RX_EVENT_LOST(); - continue; - } - - iptraceNETWORK_INTERFACE_RECEIVE(); - pxNextNetworkBufferDescriptor->xDataLength = ( size_t ) ulReceiveCount; - xRxEvent.pvData = ( void * ) pxNextNetworkBufferDescriptor; - - /* Send the descriptor to the IP task for processing. */ - if( xSendEventStructToIPTask( &xRxEvent, xBlockTime ) != pdTRUE ) - { - /* The buffer could not be sent to the stack so must be released - again. */ - vReleaseNetworkBufferAndDescriptor( pxNextNetworkBufferDescriptor ); - iptraceETHERNET_RX_EVENT_LOST(); - FreeRTOS_printf( ( "prvEMACRxPoll: Can not queue return packet!\n" ) ); - } - - /* Now the buffer has either been passed to the IP-task, - or it has been released in the code above. */ - pxNextNetworkBufferDescriptor = NULL; - ulReturnValue++; - } - - return ulReturnValue; -} -/*-----------------------------------------------------------*/ - -static void prvEMACHandlerTask( void *pvParameters ) -{ -TimeOut_t xPhyTime; -TickType_t xPhyRemTime; -UBaseType_t uxLastMinBufferCount = 0, uxCount; -UBaseType_t uxCurrentCount; -#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - UBaseType_t uxLastMinQueueSpace; -#endif -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - NetworkBufferDescriptor_t *pxBuffer; -#endif -uint8_t *pucBuffer; -BaseType_t xResult = 0; -uint32_t xStatus; -const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( EMAC_MAX_BLOCK_TIME_MS ); - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - configASSERT( xEMACTaskHandle ); - - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - - for( ;; ) - { - uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); - if( uxLastMinBufferCount != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); - } - - #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - uxCurrentCount = uxGetMinimumIPQueueSpace(); - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - - if( ( ulISREvents & EMAC_IF_ALL_EVENT ) == 0 ) - { - /* No events to process now, wait for the next. */ - ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); - } - - if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) - { - ulISREvents &= ~EMAC_IF_RX_EVENT; - - /* Wait for the EMAC interrupt to indicate that another packet has been - received. */ - xResult = prvEMACRxPoll(); - } - - if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) - { - /* Future extension: code to release TX buffers if zero-copy is used. */ - ulISREvents &= ~EMAC_IF_TX_EVENT; - while( xQueueReceive( xTxBufferQueue, &pucBuffer, 0 ) != pdFALSE ) - { - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - pxBuffer = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); - if( pxBuffer != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxBuffer ); - tx_release_count[ 0 ]++; - } - else - { - tx_release_count[ 1 ]++; - } - } - #else - { - tx_release_count[ 0 ]++; - } - #endif - uxCount = uxQueueMessagesWaiting( ( QueueHandle_t ) xTXDescriptorSemaphore ); - if( uxCount < GMAC_TX_BUFFERS ) - { - /* Tell the counting semaphore that one more TX descriptor is available. */ - xSemaphoreGive( xTXDescriptorSemaphore ); - } - } - } - - if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) - { - /* Future extension: logging about errors that occurred. */ - ulISREvents &= ~EMAC_IF_ERR_EVENT; - } - - if( xResult > 0 ) - { - /* A packet was received. No need to check for the PHY status now, - but set a timer to check it later on. */ - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - xResult = 0; - } - else if( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) - { - /* Check the link status again. */ - xStatus = ulReadMDIO( PHY_REG_01_BMSR ); - - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != ( xStatus & BMSR_LINK_STATUS ) ) - { - ulPHYLinkStatus = xStatus; - FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ); - } - - vTaskSetTimeOutState( &xPhyTime ); - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - } - else - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - } - } - } -} -/*-----------------------------------------------------------*/ +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* Standard includes. */ +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +/* Some files from the Atmel Software Framework */ +/*_RB_ The SAM4E portable layer has three different header files called gmac.h! */ +#include "instance/gmac.h" +#include +#include + +#ifndef BMSR_LINK_STATUS + #define BMSR_LINK_STATUS 0x0004 //!< Link status +#endif + +#ifndef PHY_LS_HIGH_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not + receiving packets. */ + #define PHY_LS_HIGH_CHECK_TIME_MS 15000 +#endif + +#ifndef PHY_LS_LOW_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still low every second. */ + #define PHY_LS_LOW_CHECK_TIME_MS 1000 +#endif + +/* Interrupt events to process. Currently only the Rx event is processed +although code for other events is included to allow for possible future +expansion. */ +#define EMAC_IF_RX_EVENT 1UL +#define EMAC_IF_TX_EVENT 2UL +#define EMAC_IF_ERR_EVENT 4UL +#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) + +#define ETHERNET_CONF_PHY_ADDR BOARD_GMAC_PHY_ADDR + +#define HZ_PER_MHZ ( 1000000UL ) + +#ifndef EMAC_MAX_BLOCK_TIME_MS + #define EMAC_MAX_BLOCK_TIME_MS 100ul +#endif + +#if !defined( GMAC_USES_TX_CALLBACK ) || ( GMAC_USES_TX_CALLBACK != 1 ) + #error Please define GMAC_USES_TX_CALLBACK as 1 +#endif + +/* Default the size of the stack used by the EMAC deferred handler task to 4x +the size of the stack used by the idle task - but allow this to be overridden in +FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ +#ifndef configEMAC_TASK_STACK_SIZE + #define configEMAC_TASK_STACK_SIZE ( 4 * configMINIMAL_STACK_SIZE ) +#endif + +/*-----------------------------------------------------------*/ + +/* + * Wait a fixed time for the link status to indicate the network is up. + */ +static BaseType_t xGMACWaitLS( TickType_t xMaxTime ); + +#if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 1 ) && ( ipconfigHAS_TX_CRC_OFFLOADING == 0 ) + void vGMACGenerateChecksum( uint8_t *apBuffer ); +#endif + +/* + * Called from the ASF GMAC driver. + */ +static void prvRxCallback( uint32_t ulStatus ); +static void prvTxCallback( uint32_t ulStatus, uint8_t *puc_buffer ); + +/* + * A deferred interrupt handler task that processes GMAC interrupts. + */ +static void prvEMACHandlerTask( void *pvParameters ); + +/* + * Initialise the ASF GMAC driver. + */ +static BaseType_t prvGMACInit( void ); + +/* + * Try to obtain an Rx packet from the hardware. + */ +static uint32_t prvEMACRxPoll( void ); + +/*-----------------------------------------------------------*/ + +/* Bit map of outstanding ETH interrupt events for processing. Currently only +the Rx interrupt is handled, although code is included for other events to +enable future expansion. */ +static volatile uint32_t ulISREvents; + +/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ +static uint32_t ulPHYLinkStatus = 0; +static volatile BaseType_t xGMACSwitchRequired; + +/* ethernet_phy_addr: the address of the PHY in use. +Atmel was a bit ambiguous about it so the address will be stored +in this variable, see ethernet_phy.c */ +extern int ethernet_phy_addr; + +/* LLMNR multicast address. */ +static const uint8_t llmnr_mac_address[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; + +/* The GMAC object as defined by the ASF drivers. */ +static gmac_device_t gs_gmac_dev; + +/* MAC address to use. */ +extern const uint8_t ucMACAddress[ 6 ]; + +/* Holds the handle of the task used as a deferred interrupt processor. The +handle is used so direct notifications can be sent to the task for all EMAC/DMA +related interrupts. */ +TaskHandle_t xEMACTaskHandle = NULL; + +static QueueHandle_t xTxBufferQueue; +int tx_release_count[ 4 ]; + +/* xTXDescriptorSemaphore is a counting semaphore with +a maximum count of GMAC_TX_BUFFERS, which is the number of +DMA TX descriptors. */ +static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; + +/*-----------------------------------------------------------*/ + +/* + * GMAC interrupt handler. + */ +void GMAC_Handler(void) +{ + xGMACSwitchRequired = pdFALSE; + + /* gmac_handler() may call prvRxCallback() which may change + the value of xGMACSwitchRequired. */ + gmac_handler( &gs_gmac_dev ); + + if( xGMACSwitchRequired != pdFALSE ) + { + portEND_SWITCHING_ISR( xGMACSwitchRequired ); + } +} +/*-----------------------------------------------------------*/ + +static void prvRxCallback( uint32_t ulStatus ) +{ + if( ( ( ulStatus & GMAC_RSR_REC ) != 0 ) && ( xEMACTaskHandle != NULL ) ) + { + /* let the prvEMACHandlerTask know that there was an RX event. */ + ulISREvents |= EMAC_IF_RX_EVENT; + /* Only an RX interrupt can wakeup prvEMACHandlerTask. */ + vTaskNotifyGiveFromISR( xEMACTaskHandle, ( BaseType_t * ) &xGMACSwitchRequired ); + } +} +/*-----------------------------------------------------------*/ + +static void prvTxCallback( uint32_t ulStatus, uint8_t *puc_buffer ) +{ + if( ( xTxBufferQueue != NULL ) && ( xEMACTaskHandle != NULL ) ) + { + /* let the prvEMACHandlerTask know that there was an RX event. */ + ulISREvents |= EMAC_IF_TX_EVENT; + + vTaskNotifyGiveFromISR( xEMACTaskHandle, ( BaseType_t * ) &xGMACSwitchRequired ); + xQueueSendFromISR( xTxBufferQueue, &puc_buffer, ( BaseType_t * ) &xGMACSwitchRequired ); + tx_release_count[ 2 ]++; + } +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +const TickType_t x5_Seconds = 5000UL; + + if( xEMACTaskHandle == NULL ) + { + prvGMACInit(); + + /* Wait at most 5 seconds for a Link Status in the PHY. */ + xGMACWaitLS( pdMS_TO_TICKS( x5_Seconds ) ); + + /* The handler task is created at the highest possible priority to + ensure the interrupt handler can return directly to it. */ + xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); + configASSERT( xEMACTaskHandle ); + } + + if( xTxBufferQueue == NULL ) + { + xTxBufferQueue = xQueueCreate( GMAC_TX_BUFFERS, sizeof( void * ) ); + configASSERT( xTxBufferQueue ); + } + + if( xTXDescriptorSemaphore == NULL ) + { + xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) GMAC_TX_BUFFERS, ( UBaseType_t ) GMAC_TX_BUFFERS ); + configASSERT( xTXDescriptorSemaphore ); + } + /* When returning non-zero, the stack will become active and + start DHCP (in configured) */ + return ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0; +} +/*-----------------------------------------------------------*/ + +BaseType_t xGetPhyLinkStatus( void ) +{ +BaseType_t xResult; + + /* This function returns true if the Link Status in the PHY is high. */ + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xResult = pdTRUE; + } + else + { + xResult = pdFALSE; + } + + return xResult; +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t bReleaseAfterSend ) +{ +/* Do not wait too long for a free TX DMA buffer. */ +const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50u ); + + do { + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) == 0 ) + { + /* Do not attempt to send packets as long as the Link Status is low. */ + break; + } + if( xTXDescriptorSemaphore == NULL ) + { + /* Semaphore has not been created yet? */ + break; + } + if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) + { + /* Time-out waiting for a free TX descriptor. */ + tx_release_count[ 3 ]++; + break; + } + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* Confirm that the pxDescriptor may be kept by the driver. */ + configASSERT( bReleaseAfterSend != pdFALSE ); + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + gmac_dev_write( &gs_gmac_dev, (void *)pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength, prvTxCallback ); + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* Confirm that the pxDescriptor may be kept by the driver. */ + bReleaseAfterSend = pdFALSE; + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + /* Not interested in a call-back after TX. */ + iptraceNETWORK_INTERFACE_TRANSMIT(); + } while( 0 ); + + if( bReleaseAfterSend != pdFALSE ) + { + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + return pdTRUE; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvGMACInit( void ) +{ +uint32_t ncfgr; + + gmac_options_t gmac_option; + + memset( &gmac_option, '\0', sizeof( gmac_option ) ); + gmac_option.uc_copy_all_frame = 0; + gmac_option.uc_no_boardcast = 0; + memcpy( gmac_option.uc_mac_addr, ucMACAddress, sizeof( gmac_option.uc_mac_addr ) ); + + gs_gmac_dev.p_hw = GMAC; + gmac_dev_init( GMAC, &gs_gmac_dev, &gmac_option ); + + NVIC_SetPriority( GMAC_IRQn, configMAC_INTERRUPT_PRIORITY ); + NVIC_EnableIRQ( GMAC_IRQn ); + + /* Contact the Ethernet PHY and store it's address in 'ethernet_phy_addr' */ + ethernet_phy_init( GMAC, ETHERNET_CONF_PHY_ADDR, sysclk_get_cpu_hz() ); + + ethernet_phy_auto_negotiate( GMAC, ethernet_phy_addr ); + ethernet_phy_set_link( GMAC, ethernet_phy_addr, 1 ); + + /* The GMAC driver will call a hook prvRxCallback(), which + in turn will wake-up the task by calling vTaskNotifyGiveFromISR() */ + gmac_dev_set_rx_callback( &gs_gmac_dev, prvRxCallback ); + gmac_set_address( GMAC, 1, (uint8_t*)llmnr_mac_address ); + + ncfgr = GMAC_NCFGR_SPD | GMAC_NCFGR_FD; + + GMAC->GMAC_NCFGR = ( GMAC->GMAC_NCFGR & ~( GMAC_NCFGR_SPD | GMAC_NCFGR_FD ) ) | ncfgr; + + return 1; +} +/*-----------------------------------------------------------*/ + +static inline unsigned long ulReadMDIO( unsigned /*short*/ usAddress ) +{ +uint32_t ulValue, ulReturn; +int rc; + + gmac_enable_management( GMAC, 1 ); + rc = gmac_phy_read( GMAC, ethernet_phy_addr, usAddress, &ulValue ); + gmac_enable_management( GMAC, 0 ); + if( rc == GMAC_OK ) + { + ulReturn = ulValue; + } + else + { + ulReturn = 0UL; + } + + return ulReturn; +} +/*-----------------------------------------------------------*/ + +static BaseType_t xGMACWaitLS( TickType_t xMaxTime ) +{ +TickType_t xStartTime = xTaskGetTickCount(); +TickType_t xEndTime; +BaseType_t xReturn; +const TickType_t xShortTime = pdMS_TO_TICKS( 100UL ); + + for( ;; ) + { + xEndTime = xTaskGetTickCount(); + + if( ( xEndTime - xStartTime ) > xMaxTime ) + { + /* Wated more than xMaxTime, return. */ + xReturn = pdFALSE; + break; + } + + /* Check the link status again. */ + ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + /* Link is up - return. */ + xReturn = pdTRUE; + break; + } + + /* Link is down - wait in the Blocked state for a short while (to allow + other tasks to execute) before checking again. */ + vTaskDelay( xShortTime ); + } + + FreeRTOS_printf( ( "xGMACWaitLS: %ld (PHY %d) freq %lu Mz\n", + xReturn, + ethernet_phy_addr, + sysclk_get_cpu_hz() / HZ_PER_MHZ ) ); + + return xReturn; +} +/*-----------------------------------------------------------*/ + +//#if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 1 ) && ( ipconfigHAS_TX_CRC_OFFLOADING == 0 ) + + void vGMACGenerateChecksum( uint8_t *apBuffer ) + { + ProtocolPacket_t *xProtPacket = (ProtocolPacket_t *)apBuffer; + + if ( xProtPacket->xTCPPacket.xEthernetHeader.usFrameType == ipIPv4_FRAME_TYPE ) + { + IPHeader_t *pxIPHeader = &(xProtPacket->xTCPPacket.xIPHeader); + + /* Calculate the IP header checksum. */ + pxIPHeader->usHeaderChecksum = 0x00; + pxIPHeader->usHeaderChecksum = usGenerateChecksum( 0, ( uint8_t * ) &( pxIPHeader->ucVersionHeaderLength ), ipSIZE_OF_IPv4_HEADER ); + pxIPHeader->usHeaderChecksum = ~FreeRTOS_htons( pxIPHeader->usHeaderChecksum ); + + /* Calculate the TCP checksum for an outgoing packet. */ + usGenerateProtocolChecksum( ( uint8_t * ) apBuffer, pdTRUE ); + } + } + +//#endif +/*-----------------------------------------------------------*/ + +static uint32_t prvEMACRxPoll( void ) +{ +unsigned char *pucUseBuffer; +uint32_t ulReceiveCount, ulResult, ulReturnValue = 0; +static NetworkBufferDescriptor_t *pxNextNetworkBufferDescriptor = NULL; +const UBaseType_t xMinDescriptorsToLeave = 2UL; +const TickType_t xBlockTime = pdMS_TO_TICKS( 100UL ); +static IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; + + for( ;; ) + { + /* If pxNextNetworkBufferDescriptor was not left pointing at a valid + descriptor then allocate one now. */ + if( ( pxNextNetworkBufferDescriptor == NULL ) && ( uxGetNumberOfFreeNetworkBuffers() > xMinDescriptorsToLeave ) ) + { + pxNextNetworkBufferDescriptor = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE, xBlockTime ); + } + + if( pxNextNetworkBufferDescriptor != NULL ) + { + /* Point pucUseBuffer to the buffer pointed to by the descriptor. */ + pucUseBuffer = ( unsigned char* ) ( pxNextNetworkBufferDescriptor->pucEthernetBuffer - ipconfigPACKET_FILLER_SIZE ); + } + else + { + /* As long as pxNextNetworkBufferDescriptor is NULL, the incoming + messages will be flushed and ignored. */ + pucUseBuffer = NULL; + } + + /* Read the next packet from the hardware into pucUseBuffer. */ + ulResult = gmac_dev_read( &gs_gmac_dev, pucUseBuffer, ipTOTAL_ETHERNET_FRAME_SIZE, &ulReceiveCount ); + + if( ( ulResult != GMAC_OK ) || ( ulReceiveCount == 0 ) ) + { + /* No data from the hardware. */ + break; + } + + if( pxNextNetworkBufferDescriptor == NULL ) + { + /* Data was read from the hardware, but no descriptor was available + for it, so it will be dropped. */ + iptraceETHERNET_RX_EVENT_LOST(); + continue; + } + + iptraceNETWORK_INTERFACE_RECEIVE(); + pxNextNetworkBufferDescriptor->xDataLength = ( size_t ) ulReceiveCount; + xRxEvent.pvData = ( void * ) pxNextNetworkBufferDescriptor; + + /* Send the descriptor to the IP task for processing. */ + if( xSendEventStructToIPTask( &xRxEvent, xBlockTime ) != pdTRUE ) + { + /* The buffer could not be sent to the stack so must be released + again. */ + vReleaseNetworkBufferAndDescriptor( pxNextNetworkBufferDescriptor ); + iptraceETHERNET_RX_EVENT_LOST(); + FreeRTOS_printf( ( "prvEMACRxPoll: Can not queue return packet!\n" ) ); + } + + /* Now the buffer has either been passed to the IP-task, + or it has been released in the code above. */ + pxNextNetworkBufferDescriptor = NULL; + ulReturnValue++; + } + + return ulReturnValue; +} +/*-----------------------------------------------------------*/ + +static void prvEMACHandlerTask( void *pvParameters ) +{ +TimeOut_t xPhyTime; +TickType_t xPhyRemTime; +UBaseType_t uxLastMinBufferCount = 0, uxCount; +UBaseType_t uxCurrentCount; +#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + UBaseType_t uxLastMinQueueSpace; +#endif +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + NetworkBufferDescriptor_t *pxBuffer; +#endif +uint8_t *pucBuffer; +BaseType_t xResult = 0; +uint32_t xStatus; +const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( EMAC_MAX_BLOCK_TIME_MS ); + + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParameters; + + configASSERT( xEMACTaskHandle ); + + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + + for( ;; ) + { + uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); + if( uxLastMinBufferCount != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinBufferCount = uxCurrentCount; + FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", + uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); + } + + #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + { + uxCurrentCount = uxGetMinimumIPQueueSpace(); + if( uxLastMinQueueSpace != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinQueueSpace = uxCurrentCount; + FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); + } + } + #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ + + if( ( ulISREvents & EMAC_IF_ALL_EVENT ) == 0 ) + { + /* No events to process now, wait for the next. */ + ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); + } + + if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) + { + ulISREvents &= ~EMAC_IF_RX_EVENT; + + /* Wait for the EMAC interrupt to indicate that another packet has been + received. */ + xResult = prvEMACRxPoll(); + } + + if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) + { + /* Future extension: code to release TX buffers if zero-copy is used. */ + ulISREvents &= ~EMAC_IF_TX_EVENT; + while( xQueueReceive( xTxBufferQueue, &pucBuffer, 0 ) != pdFALSE ) + { + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + pxBuffer = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); + if( pxBuffer != NULL ) + { + vReleaseNetworkBufferAndDescriptor( pxBuffer ); + tx_release_count[ 0 ]++; + } + else + { + tx_release_count[ 1 ]++; + } + } + #else + { + tx_release_count[ 0 ]++; + } + #endif + uxCount = uxQueueMessagesWaiting( ( QueueHandle_t ) xTXDescriptorSemaphore ); + if( uxCount < GMAC_TX_BUFFERS ) + { + /* Tell the counting semaphore that one more TX descriptor is available. */ + xSemaphoreGive( xTXDescriptorSemaphore ); + } + } + } + + if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) + { + /* Future extension: logging about errors that occurred. */ + ulISREvents &= ~EMAC_IF_ERR_EVENT; + } + + if( xResult > 0 ) + { + /* A packet was received. No need to check for the PHY status now, + but set a timer to check it later on. */ + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + xResult = 0; + } + else if( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) + { + /* Check the link status again. */ + xStatus = ulReadMDIO( PHY_REG_01_BMSR ); + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != ( xStatus & BMSR_LINK_STATUS ) ) + { + ulPHYLinkStatus = xStatus; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ); + } + + vTaskSetTimeOutState( &xPhyTime ); + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + } + else + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + } + } + } +} +/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/component/gmac.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/component/gmac.h index 6eb069f55..ae40ac960 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/component/gmac.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/component/gmac.h @@ -1,746 +1,746 @@ -/** - * \file - * - * Copyright (c) 2012 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - -#ifndef _SAM4E_GMAC_COMPONENT_ -#define _SAM4E_GMAC_COMPONENT_ - -/* ============================================================================= */ -/** SOFTWARE API DEFINITION FOR Gigabit Ethernet MAC */ -/* ============================================================================= */ -/** \addtogroup SAM4E_GMAC Gigabit Ethernet MAC */ -/*@{*/ - -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -/** \brief GmacSa hardware registers */ -typedef struct { - RwReg GMAC_SAB; /**< \brief (GmacSa Offset: 0x0) Specific Address 1 Bottom [31:0] Register */ - RwReg GMAC_SAT; /**< \brief (GmacSa Offset: 0x4) Specific Address 1 Top [47:32] Register */ -} GmacSa; -/** \brief Gmac hardware registers */ -#define GMACSA_NUMBER 4 -typedef struct { - RwReg GMAC_NCR; /**< \brief (Gmac Offset: 0x000) Network Control Register */ - RwReg GMAC_NCFGR; /**< \brief (Gmac Offset: 0x004) Network Configuration Register */ - RoReg GMAC_NSR; /**< \brief (Gmac Offset: 0x008) Network Status Register */ - RwReg GMAC_UR; /**< \brief (Gmac Offset: 0x00C) User Register */ - RwReg GMAC_DCFGR; /**< \brief (Gmac Offset: 0x010) DMA Configuration Register */ - RwReg GMAC_TSR; /**< \brief (Gmac Offset: 0x014) Transmit Status Register */ - RwReg GMAC_RBQB; /**< \brief (Gmac Offset: 0x018) Receive Buffer Queue Base Address */ - RwReg GMAC_TBQB; /**< \brief (Gmac Offset: 0x01C) Transmit Buffer Queue Base Address */ - RwReg GMAC_RSR; /**< \brief (Gmac Offset: 0x020) Receive Status Register */ - RoReg GMAC_ISR; /**< \brief (Gmac Offset: 0x024) Interrupt Status Register */ - WoReg GMAC_IER; /**< \brief (Gmac Offset: 0x028) Interrupt Enable Register */ - WoReg GMAC_IDR; /**< \brief (Gmac Offset: 0x02C) Interrupt Disable Register */ - RoReg GMAC_IMR; /**< \brief (Gmac Offset: 0x030) Interrupt Mask Register */ - RwReg GMAC_MAN; /**< \brief (Gmac Offset: 0x034) PHY Maintenance Register */ - RoReg GMAC_RPQ; /**< \brief (Gmac Offset: 0x038) Received Pause Quantum Register */ - RwReg GMAC_TPQ; /**< \brief (Gmac Offset: 0x03C) Transmit Pause Quantum Register */ - RwReg GMAC_TPSF; /**< \brief (Gmac Offset: 0x040) TX Partial Store and Forward Register */ - RwReg GMAC_RPSF; /**< \brief (Gmac Offset: 0x044) RX Partial Store and Forward Register */ - RoReg Reserved1[14]; - RwReg GMAC_HRB; /**< \brief (Gmac Offset: 0x080) Hash Register Bottom [31:0] */ - RwReg GMAC_HRT; /**< \brief (Gmac Offset: 0x084) Hash Register Top [63:32] */ - GmacSa GMAC_SA[GMACSA_NUMBER]; /**< \brief (Gmac Offset: 0x088) 1 .. 4 */ - RwReg GMAC_TIDM[4]; /**< \brief (Gmac Offset: 0x0A8) Type ID Match 1 Register */ - RwReg GMAC_WOL; /**< \brief (Gmac Offset: 0x0B8) Wake on LAN Register */ - RwReg GMAC_IPGS; /**< \brief (Gmac Offset: 0x0BC) IPG Stretch Register */ - RwReg GMAC_SVLAN; /**< \brief (Gmac Offset: 0x0C0) Stacked VLAN Register */ - RwReg GMAC_TPFCP; /**< \brief (Gmac Offset: 0x0C4) Transmit PFC Pause Register */ - RwReg GMAC_SAMB1; /**< \brief (Gmac Offset: 0x0C8) Specific Address 1 Mask Bottom [31:0] Register */ - RwReg GMAC_SAMT1; /**< \brief (Gmac Offset: 0x0CC) Specific Address 1 Mask Top [47:32] Register */ - RoReg Reserved2[12]; - RoReg GMAC_OTLO; /**< \brief (Gmac Offset: 0x100) Octets Transmitted [31:0] Register */ - RoReg GMAC_OTHI; /**< \brief (Gmac Offset: 0x104) Octets Transmitted [47:32] Register */ - RoReg GMAC_FT; /**< \brief (Gmac Offset: 0x108) Frames Transmitted Register */ - RoReg GMAC_BCFT; /**< \brief (Gmac Offset: 0x10C) Broadcast Frames Transmitted Register */ - RoReg GMAC_MFT; /**< \brief (Gmac Offset: 0x110) Multicast Frames Transmitted Register */ - RoReg GMAC_PFT; /**< \brief (Gmac Offset: 0x114) Pause Frames Transmitted Register */ - RoReg GMAC_BFT64; /**< \brief (Gmac Offset: 0x118) 64 Byte Frames Transmitted Register */ - RoReg GMAC_TBFT127; /**< \brief (Gmac Offset: 0x11C) 65 to 127 Byte Frames Transmitted Register */ - RoReg GMAC_TBFT255; /**< \brief (Gmac Offset: 0x120) 128 to 255 Byte Frames Transmitted Register */ - RoReg GMAC_TBFT511; /**< \brief (Gmac Offset: 0x124) 256 to 511 Byte Frames Transmitted Register */ - RoReg GMAC_TBFT1023; /**< \brief (Gmac Offset: 0x128) 512 to 1023 Byte Frames Transmitted Register */ - RoReg GMAC_TBFT1518; /**< \brief (Gmac Offset: 0x12C) 1024 to 1518 Byte Frames Transmitted Register */ - RoReg GMAC_GTBFT1518; /**< \brief (Gmac Offset: 0x130) Greater Than 1518 Byte Frames Transmitted Register */ - RoReg GMAC_TUR; /**< \brief (Gmac Offset: 0x134) Transmit Under Runs Register */ - RoReg GMAC_SCF; /**< \brief (Gmac Offset: 0x138) Single Collision Frames Register */ - RoReg GMAC_MCF; /**< \brief (Gmac Offset: 0x13C) Multiple Collision Frames Register */ - RoReg GMAC_EC; /**< \brief (Gmac Offset: 0x140) Excessive Collisions Register */ - RoReg GMAC_LC; /**< \brief (Gmac Offset: 0x144) Late Collisions Register */ - RoReg GMAC_DTF; /**< \brief (Gmac Offset: 0x148) Deferred Transmission Frames Register */ - RoReg GMAC_CSE; /**< \brief (Gmac Offset: 0x14C) Carrier Sense Errors Register */ - RoReg GMAC_ORLO; /**< \brief (Gmac Offset: 0x150) Octets Received [31:0] Received */ - RoReg GMAC_ORHI; /**< \brief (Gmac Offset: 0x154) Octets Received [47:32] Received */ - RoReg GMAC_FR; /**< \brief (Gmac Offset: 0x158) Frames Received Register */ - RoReg GMAC_BCFR; /**< \brief (Gmac Offset: 0x15C) Broadcast Frames Received Register */ - RoReg GMAC_MFR; /**< \brief (Gmac Offset: 0x160) Multicast Frames Received Register */ - RoReg GMAC_PFR; /**< \brief (Gmac Offset: 0x164) Pause Frames Received Register */ - RoReg GMAC_BFR64; /**< \brief (Gmac Offset: 0x168) 64 Byte Frames Received Register */ - RoReg GMAC_TBFR127; /**< \brief (Gmac Offset: 0x16C) 65 to 127 Byte Frames Received Register */ - RoReg GMAC_TBFR255; /**< \brief (Gmac Offset: 0x170) 128 to 255 Byte Frames Received Register */ - RoReg GMAC_TBFR511; /**< \brief (Gmac Offset: 0x174) 256 to 511Byte Frames Received Register */ - RoReg GMAC_TBFR1023; /**< \brief (Gmac Offset: 0x178) 512 to 1023 Byte Frames Received Register */ - RoReg GMAC_TBFR1518; /**< \brief (Gmac Offset: 0x17C) 1024 to 1518 Byte Frames Received Register */ - RoReg GMAC_TMXBFR; /**< \brief (Gmac Offset: 0x180) 1519 to Maximum Byte Frames Received Register */ - RoReg GMAC_UFR; /**< \brief (Gmac Offset: 0x184) Undersize Frames Received Register */ - RoReg GMAC_OFR; /**< \brief (Gmac Offset: 0x188) Oversize Frames Received Register */ - RoReg GMAC_JR; /**< \brief (Gmac Offset: 0x18C) Jabbers Received Register */ - RoReg GMAC_FCSE; /**< \brief (Gmac Offset: 0x190) Frame Check Sequence Errors Register */ - RoReg GMAC_LFFE; /**< \brief (Gmac Offset: 0x194) Length Field Frame Errors Register */ - RoReg GMAC_RSE; /**< \brief (Gmac Offset: 0x198) Receive Symbol Errors Register */ - RoReg GMAC_AE; /**< \brief (Gmac Offset: 0x19C) Alignment Errors Register */ - RoReg GMAC_RRE; /**< \brief (Gmac Offset: 0x1A0) Receive Resource Errors Register */ - RoReg GMAC_ROE; /**< \brief (Gmac Offset: 0x1A4) Receive Overrun Register */ - RoReg GMAC_IHCE; /**< \brief (Gmac Offset: 0x1A8) IP Header Checksum Errors Register */ - RoReg GMAC_TCE; /**< \brief (Gmac Offset: 0x1AC) TCP Checksum Errors Register */ - RoReg GMAC_UCE; /**< \brief (Gmac Offset: 0x1B0) UDP Checksum Errors Register */ - RoReg Reserved3[5]; - RwReg GMAC_TSSS; /**< \brief (Gmac Offset: 0x1C8) 1588 Timer Sync Strobe Seconds Register */ - RwReg GMAC_TSSN; /**< \brief (Gmac Offset: 0x1CC) 1588 Timer Sync Strobe Nanoseconds Register */ - RwReg GMAC_TS; /**< \brief (Gmac Offset: 0x1D0) 1588 Timer Seconds Register */ - RwReg GMAC_TN; /**< \brief (Gmac Offset: 0x1D4) 1588 Timer Nanoseconds Register */ - WoReg GMAC_TA; /**< \brief (Gmac Offset: 0x1D8) 1588 Timer Adjust Register */ - RwReg GMAC_TI; /**< \brief (Gmac Offset: 0x1DC) 1588 Timer Increment Register */ - RoReg GMAC_EFTS; /**< \brief (Gmac Offset: 0x1E0) PTP Event Frame Transmitted Seconds */ - RoReg GMAC_EFTN; /**< \brief (Gmac Offset: 0x1E4) PTP Event Frame Transmitted Nanoseconds */ - RoReg GMAC_EFRS; /**< \brief (Gmac Offset: 0x1E8) PTP Event Frame Received Seconds */ - RoReg GMAC_EFRN; /**< \brief (Gmac Offset: 0x1EC) PTP Event Frame Received Nanoseconds */ - RoReg GMAC_PEFTS; /**< \brief (Gmac Offset: 0x1F0) PTP Peer Event Frame Transmitted Seconds */ - RoReg GMAC_PEFTN; /**< \brief (Gmac Offset: 0x1F4) PTP Peer Event Frame Transmitted Nanoseconds */ - RoReg GMAC_PEFRS; /**< \brief (Gmac Offset: 0x1F8) PTP Peer Event Frame Received Seconds */ - RoReg GMAC_PEFRN; /**< \brief (Gmac Offset: 0x1FC) PTP Peer Event Frame Received Nanoseconds */ - RoReg Reserved4[128]; - RoReg GMAC_ISRPQ[7]; /**< \brief (Gmac Offset: 0x400) Interrupt Status Register Priority Queue */ - RoReg Reserved5[9]; - RwReg GMAC_TBQBAPQ[7]; /**< \brief (Gmac Offset: 0x440) Transmit Buffer Queue Base Address Priority Queue */ - RoReg Reserved6[9]; - RwReg GMAC_RBQBAPQ[7]; /**< \brief (Gmac Offset: 0x480) Receive Buffer Queue Base Address Priority Queue */ - RoReg Reserved7[1]; - RwReg GMAC_RBSRPQ[7]; /**< \brief (Gmac Offset: 0x4A0) Receive Buffer Size Register Priority Queue */ - RoReg Reserved8[17]; - RwReg GMAC_ST1RPQ[16]; /**< \brief (Gmac Offset: 0x500) Screening Type1 Register Priority Queue */ - RwReg GMAC_ST2RPQ[16]; /**< \brief (Gmac Offset: 0x540) Screening Type2 Register Priority Queue */ - RoReg Reserved9[32]; - WoReg GMAC_IERPQ[7]; /**< \brief (Gmac Offset: 0x600) Interrupt Enable Register Priority Queue */ - RoReg Reserved10[1]; - WoReg GMAC_IDRPQ[7]; /**< \brief (Gmac Offset: 0x620) Interrupt Disable Register Priority Queue */ - RoReg Reserved11[1]; - RwReg GMAC_IMRPQ[7]; /**< \brief (Gmac Offset: 0x640) Interrupt Mask Register Priority Queue */ -} Gmac; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ -/* -------- GMAC_NCR : (GMAC Offset: 0x000) Network Control Register -------- */ -#define GMAC_NCR_LB (0x1u << 0) /**< \brief (GMAC_NCR) Loop Back */ -#define GMAC_NCR_LBL (0x1u << 1) /**< \brief (GMAC_NCR) Loop Back Local */ -#define GMAC_NCR_RXEN (0x1u << 2) /**< \brief (GMAC_NCR) Receive Enable */ -#define GMAC_NCR_TXEN (0x1u << 3) /**< \brief (GMAC_NCR) Transmit Enable */ -#define GMAC_NCR_MPE (0x1u << 4) /**< \brief (GMAC_NCR) Management Port Enable */ -#define GMAC_NCR_CLRSTAT (0x1u << 5) /**< \brief (GMAC_NCR) Clear Statistics Registers */ -#define GMAC_NCR_INCSTAT (0x1u << 6) /**< \brief (GMAC_NCR) Increment Statistics Registers */ -#define GMAC_NCR_WESTAT (0x1u << 7) /**< \brief (GMAC_NCR) Write Enable for Statistics Registers */ -#define GMAC_NCR_BP (0x1u << 8) /**< \brief (GMAC_NCR) Back pressure */ -#define GMAC_NCR_TSTART (0x1u << 9) /**< \brief (GMAC_NCR) Start Transmission */ -#define GMAC_NCR_THALT (0x1u << 10) /**< \brief (GMAC_NCR) Transmit Halt */ -#define GMAC_NCR_TXPF (0x1u << 11) /**< \brief (GMAC_NCR) Transmit Pause Frame */ -#define GMAC_NCR_TXZQPF (0x1u << 12) /**< \brief (GMAC_NCR) Transmit Zero Quantum Pause Frame */ -#define GMAC_NCR_RDS (0x1u << 14) /**< \brief (GMAC_NCR) Read Snapshot */ -#define GMAC_NCR_SRTSM (0x1u << 15) /**< \brief (GMAC_NCR) Store Receive Time Stamp to Memory */ -#define GMAC_NCR_ENPBPR (0x1u << 16) /**< \brief (GMAC_NCR) Enable PFC Priority-based Pause Reception */ -#define GMAC_NCR_TXPBPF (0x1u << 17) /**< \brief (GMAC_NCR) Transmit PFC Priority-based Pause Frame */ -#define GMAC_NCR_FNP (0x1u << 18) /**< \brief (GMAC_NCR) Flush Next Packet */ -/* -------- GMAC_NCFGR : (GMAC Offset: 0x004) Network Configuration Register -------- */ -#define GMAC_NCFGR_SPD (0x1u << 0) /**< \brief (GMAC_NCFGR) Speed */ -#define GMAC_NCFGR_FD (0x1u << 1) /**< \brief (GMAC_NCFGR) Full Duplex */ -#define GMAC_NCFGR_DNVLAN (0x1u << 2) /**< \brief (GMAC_NCFGR) Discard Non-VLAN FRAMES */ -#define GMAC_NCFGR_JFRAME (0x1u << 3) /**< \brief (GMAC_NCFGR) Jumbo Frame Size */ -#define GMAC_NCFGR_CAF (0x1u << 4) /**< \brief (GMAC_NCFGR) Copy All Frames */ -#define GMAC_NCFGR_NBC (0x1u << 5) /**< \brief (GMAC_NCFGR) No Broadcast */ -#define GMAC_NCFGR_MTIHEN (0x1u << 6) /**< \brief (GMAC_NCFGR) Multicast Hash Enable */ -#define GMAC_NCFGR_UNIHEN (0x1u << 7) /**< \brief (GMAC_NCFGR) Unicast Hash Enable */ -#define GMAC_NCFGR_MAXFS (0x1u << 8) /**< \brief (GMAC_NCFGR) 1536 Maximum Frame Size */ -#define GMAC_NCFGR_GBE (0x1u << 10) /**< \brief (GMAC_NCFGR) Gigabit Mode Enable */ -#define GMAC_NCFGR_PIS (0x1u << 11) /**< \brief (GMAC_NCFGR) Physical Interface Select */ -#define GMAC_NCFGR_RTY (0x1u << 12) /**< \brief (GMAC_NCFGR) Retry Test */ -#define GMAC_NCFGR_PEN (0x1u << 13) /**< \brief (GMAC_NCFGR) Pause Enable */ -#define GMAC_NCFGR_RXBUFO_Pos 14 -#define GMAC_NCFGR_RXBUFO_Msk (0x3u << GMAC_NCFGR_RXBUFO_Pos) /**< \brief (GMAC_NCFGR) Receive Buffer Offset */ -#define GMAC_NCFGR_RXBUFO(value) ((GMAC_NCFGR_RXBUFO_Msk & ((value) << GMAC_NCFGR_RXBUFO_Pos))) -#define GMAC_NCFGR_LFERD (0x1u << 16) /**< \brief (GMAC_NCFGR) Length Field Error Frame Discard */ -#define GMAC_NCFGR_RFCS (0x1u << 17) /**< \brief (GMAC_NCFGR) Remove FCS */ -#define GMAC_NCFGR_CLK_Pos 18 -#define GMAC_NCFGR_CLK_Msk (0x7u << GMAC_NCFGR_CLK_Pos) /**< \brief (GMAC_NCFGR) MDC CLock Division */ -#define GMAC_NCFGR_CLK_MCK_8 (0x0u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 8 (MCK up to 20 MHz) */ -#define GMAC_NCFGR_CLK_MCK_16 (0x1u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 16 (MCK up to 40 MHz) */ -#define GMAC_NCFGR_CLK_MCK_32 (0x2u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 32 (MCK up to 80 MHz) */ -#define GMAC_NCFGR_CLK_MCK_48 (0x3u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 48 (MCK up to 120MHz) */ -#define GMAC_NCFGR_CLK_MCK_64 (0x4u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 64 (MCK up to 160 MHz) */ -#define GMAC_NCFGR_CLK_MCK_96 (0x5u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 96 (MCK up to 240 MHz) */ -#define GMAC_NCFGR_CLK_MCK_128 (0x6u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 128 (MCK up to 320 MHz) */ -#define GMAC_NCFGR_CLK_MCK_224 (0x7u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 224 (MCK up to 540 MHz) */ -#define GMAC_NCFGR_DBW_Pos 21 -#define GMAC_NCFGR_DBW_Msk (0x3u << GMAC_NCFGR_DBW_Pos) /**< \brief (GMAC_NCFGR) Data Bus Width */ -#define GMAC_NCFGR_DBW_DBW32 (0x0u << 21) /**< \brief (GMAC_NCFGR) 32-bit data bus width */ -#define GMAC_NCFGR_DBW_DBW64 (0x1u << 21) /**< \brief (GMAC_NCFGR) 64-bit data bus width */ -#define GMAC_NCFGR_DCPF (0x1u << 23) /**< \brief (GMAC_NCFGR) Disable Copy of Pause Frames */ -#define GMAC_NCFGR_RXCOEN (0x1u << 24) /**< \brief (GMAC_NCFGR) Receive Checksum Offload Enable */ -#define GMAC_NCFGR_EFRHD (0x1u << 25) /**< \brief (GMAC_NCFGR) Enable Frames Received in Half Duplex */ -#define GMAC_NCFGR_IRXFCS (0x1u << 26) /**< \brief (GMAC_NCFGR) Ignore RX FCS */ -#define GMAC_NCFGR_IPGSEN (0x1u << 28) /**< \brief (GMAC_NCFGR) IP Stretch Enable */ -#define GMAC_NCFGR_RXBP (0x1u << 29) /**< \brief (GMAC_NCFGR) Receive Bad Preamble */ -#define GMAC_NCFGR_IRXER (0x1u << 30) /**< \brief (GMAC_NCFGR) Ignore IPG rx_er */ -/* -------- GMAC_NSR : (GMAC Offset: 0x008) Network Status Register -------- */ -#define GMAC_NSR_MDIO (0x1u << 1) /**< \brief (GMAC_NSR) MDIO Input Status */ -#define GMAC_NSR_IDLE (0x1u << 2) /**< \brief (GMAC_NSR) PHY Management Logic Idle */ -/* -------- GMAC_UR : (GMAC Offset: 0x00C) User Register -------- */ -#define GMAC_UR_RGMII (0x1u << 0) /**< \brief (GMAC_UR) RGMII Mode */ -#define GMAC_UR_HDFC (0x1u << 6) /**< \brief (GMAC_UR) Half Duplex Flow Control */ -#define GMAC_UR_BPDG (0x1u << 7) /**< \brief (GMAC_UR) BPDG Bypass Deglitchers */ -/* -------- GMAC_DCFGR : (GMAC Offset: 0x010) DMA Configuration Register -------- */ -#define GMAC_DCFGR_FBLDO_Pos 0 -#define GMAC_DCFGR_FBLDO_Msk (0x1fu << GMAC_DCFGR_FBLDO_Pos) /**< \brief (GMAC_DCFGR) Fixed Burst Length for DMA Data Operations: */ -#define GMAC_DCFGR_FBLDO_SINGLE (0x1u << 0) /**< \brief (GMAC_DCFGR) 00001: Always use SINGLE AHB bursts */ -#define GMAC_DCFGR_FBLDO_INCR4 (0x4u << 0) /**< \brief (GMAC_DCFGR) 001xx: Attempt to use INCR4 AHB bursts (Default) */ -#define GMAC_DCFGR_FBLDO_INCR8 (0x8u << 0) /**< \brief (GMAC_DCFGR) 01xxx: Attempt to use INCR8 AHB bursts */ -#define GMAC_DCFGR_FBLDO_INCR16 (0x10u << 0) /**< \brief (GMAC_DCFGR) 1xxxx: Attempt to use INCR16 AHB bursts */ -#define GMAC_DCFGR_ESMA (0x1u << 6) /**< \brief (GMAC_DCFGR) Endian Swap Mode Enable for Management Descriptor Accesses */ -#define GMAC_DCFGR_ESPA (0x1u << 7) /**< \brief (GMAC_DCFGR) Endian Swap Mode Enable for Packet Data Accesses */ -#define GMAC_DCFGR_RXBMS_Pos 8 -#define GMAC_DCFGR_RXBMS_Msk (0x3u << GMAC_DCFGR_RXBMS_Pos) /**< \brief (GMAC_DCFGR) Receiver Packet Buffer Memory Size Select */ -#define GMAC_DCFGR_RXBMS_EIGHTH (0x0u << 8) /**< \brief (GMAC_DCFGR) 1 Kbyte Memory Size */ -#define GMAC_DCFGR_RXBMS_QUARTER (0x1u << 8) /**< \brief (GMAC_DCFGR) 2 Kbytes Memory Size */ -#define GMAC_DCFGR_RXBMS_HALF (0x2u << 8) /**< \brief (GMAC_DCFGR) 4 Kbytes Memory Size */ -#define GMAC_DCFGR_RXBMS_FULL (0x3u << 8) /**< \brief (GMAC_DCFGR) 8 Kbytes Memory Size */ -#define GMAC_DCFGR_TXPBMS (0x1u << 10) /**< \brief (GMAC_DCFGR) Transmitter Packet Buffer Memory Size Select */ -#define GMAC_DCFGR_TXCOEN (0x1u << 11) /**< \brief (GMAC_DCFGR) Transmitter Checksum Generation Offload Enable */ -#define GMAC_DCFGR_DRBS_Pos 16 -#define GMAC_DCFGR_DRBS_Msk (0xffu << GMAC_DCFGR_DRBS_Pos) /**< \brief (GMAC_DCFGR) DMA Receive Buffer Size */ -#define GMAC_DCFGR_DRBS(value) ((GMAC_DCFGR_DRBS_Msk & ((value) << GMAC_DCFGR_DRBS_Pos))) -#define GMAC_DCFGR_DDRP (0x1u << 24) /**< \brief (GMAC_DCFGR) DMA Discard Receive Packets */ -/* -------- GMAC_TSR : (GMAC Offset: 0x014) Transmit Status Register -------- */ -#define GMAC_TSR_UBR (0x1u << 0) /**< \brief (GMAC_TSR) Used Bit Read */ -#define GMAC_TSR_COL (0x1u << 1) /**< \brief (GMAC_TSR) Collision Occurred */ -#define GMAC_TSR_RLE (0x1u << 2) /**< \brief (GMAC_TSR) Retry Limit Exceeded */ -#define GMAC_TSR_TXGO (0x1u << 3) /**< \brief (GMAC_TSR) Transmit Go */ -#define GMAC_TSR_TFC (0x1u << 4) /**< \brief (GMAC_TSR) Transmit Frame Corruption due to AHB error */ -#define GMAC_TSR_TXCOMP (0x1u << 5) /**< \brief (GMAC_TSR) Transmit Complete */ -#define GMAC_TSR_UND (0x1u << 6) /**< \brief (GMAC_TSR) Transmit Under Run */ -#define GMAC_TSR_LCO (0x1u << 7) /**< \brief (GMAC_TSR) Late Collision Occurred */ -#define GMAC_TSR_HRESP (0x1u << 8) /**< \brief (GMAC_TSR) HRESP Not OK */ -/* -------- GMAC_RBQB : (GMAC Offset: 0x018) Receive Buffer Queue Base Address -------- */ -#define GMAC_RBQB_ADDR_Pos 2 -#define GMAC_RBQB_ADDR_Msk (0x3fffffffu << GMAC_RBQB_ADDR_Pos) /**< \brief (GMAC_RBQB) Receive buffer queue base address */ -#define GMAC_RBQB_ADDR(value) ((GMAC_RBQB_ADDR_Msk & ((value) << GMAC_RBQB_ADDR_Pos))) -/* -------- GMAC_TBQB : (GMAC Offset: 0x01C) Transmit Buffer Queue Base Address -------- */ -#define GMAC_TBQB_ADDR_Pos 2 -#define GMAC_TBQB_ADDR_Msk (0x3fffffffu << GMAC_TBQB_ADDR_Pos) /**< \brief (GMAC_TBQB) Transmit Buffer Queue Base Address */ -#define GMAC_TBQB_ADDR(value) ((GMAC_TBQB_ADDR_Msk & ((value) << GMAC_TBQB_ADDR_Pos))) -/* -------- GMAC_RSR : (GMAC Offset: 0x020) Receive Status Register -------- */ -#define GMAC_RSR_BNA (0x1u << 0) /**< \brief (GMAC_RSR) Buffer Not Available */ -#define GMAC_RSR_REC (0x1u << 1) /**< \brief (GMAC_RSR) Frame Received */ -#define GMAC_RSR_RXOVR (0x1u << 2) /**< \brief (GMAC_RSR) Receive Overrun */ -#define GMAC_RSR_HNO (0x1u << 3) /**< \brief (GMAC_RSR) HRESP Not OK */ -/* -------- GMAC_ISR : (GMAC Offset: 0x024) Interrupt Status Register -------- */ -#define GMAC_ISR_MFS (0x1u << 0) /**< \brief (GMAC_ISR) Management Frame Sent */ -#define GMAC_ISR_RCOMP (0x1u << 1) /**< \brief (GMAC_ISR) Receive Complete */ -#define GMAC_ISR_RXUBR (0x1u << 2) /**< \brief (GMAC_ISR) RX Used Bit Read */ -#define GMAC_ISR_TXUBR (0x1u << 3) /**< \brief (GMAC_ISR) TX Used Bit Read */ -#define GMAC_ISR_TUR (0x1u << 4) /**< \brief (GMAC_ISR) Transmit Under Run */ -#define GMAC_ISR_RLEX (0x1u << 5) /**< \brief (GMAC_ISR) Retry Limit Exceeded or Late Collision */ -#define GMAC_ISR_TFC (0x1u << 6) /**< \brief (GMAC_ISR) Transmit Frame Corruption due to AHB error */ -#define GMAC_ISR_TCOMP (0x1u << 7) /**< \brief (GMAC_ISR) Transmit Complete */ -#define GMAC_ISR_ROVR (0x1u << 10) /**< \brief (GMAC_ISR) Receive Overrun */ -#define GMAC_ISR_HRESP (0x1u << 11) /**< \brief (GMAC_ISR) HRESP Not OK */ -#define GMAC_ISR_PFNZ (0x1u << 12) /**< \brief (GMAC_ISR) Pause Frame with Non-zero Pause Quantum Received */ -#define GMAC_ISR_PTZ (0x1u << 13) /**< \brief (GMAC_ISR) Pause Time Zero */ -#define GMAC_ISR_PFTR (0x1u << 14) /**< \brief (GMAC_ISR) Pause Frame Transmitted */ -#define GMAC_ISR_EXINT (0x1u << 15) /**< \brief (GMAC_ISR) External Interrupt */ -#define GMAC_ISR_DRQFR (0x1u << 18) /**< \brief (GMAC_ISR) PTP Delay Request Frame Received */ -#define GMAC_ISR_SFR (0x1u << 19) /**< \brief (GMAC_ISR) PTP Sync Frame Received */ -#define GMAC_ISR_DRQFT (0x1u << 20) /**< \brief (GMAC_ISR) PTP Delay Request Frame Transmitted */ -#define GMAC_ISR_SFT (0x1u << 21) /**< \brief (GMAC_ISR) PTP Sync Frame Transmitted */ -#define GMAC_ISR_PDRQFR (0x1u << 22) /**< \brief (GMAC_ISR) PDelay Request Frame Received */ -#define GMAC_ISR_PDRSFR (0x1u << 23) /**< \brief (GMAC_ISR) PDelay Response Frame Received */ -#define GMAC_ISR_PDRQFT (0x1u << 24) /**< \brief (GMAC_ISR) PDelay Request Frame Transmitted */ -#define GMAC_ISR_PDRSFT (0x1u << 25) /**< \brief (GMAC_ISR) PDelay Response Frame Transmitted */ -#define GMAC_ISR_SRI (0x1u << 26) /**< \brief (GMAC_ISR) TSU Seconds Register Increment */ -#define GMAC_ISR_WOL (0x1u << 28) /**< \brief (GMAC_ISR) Wake On LAN */ -/* -------- GMAC_IER : (GMAC Offset: 0x028) Interrupt Enable Register -------- */ -#define GMAC_IER_MFS (0x1u << 0) /**< \brief (GMAC_IER) Management Frame Sent */ -#define GMAC_IER_RCOMP (0x1u << 1) /**< \brief (GMAC_IER) Receive Complete */ -#define GMAC_IER_RXUBR (0x1u << 2) /**< \brief (GMAC_IER) RX Used Bit Read */ -#define GMAC_IER_TXUBR (0x1u << 3) /**< \brief (GMAC_IER) TX Used Bit Read */ -#define GMAC_IER_TUR (0x1u << 4) /**< \brief (GMAC_IER) Transmit Under Run */ -#define GMAC_IER_RLEX (0x1u << 5) /**< \brief (GMAC_IER) Retry Limit Exceeded or Late Collision */ -#define GMAC_IER_TFC (0x1u << 6) /**< \brief (GMAC_IER) Transmit Frame Corruption due to AHB error */ -#define GMAC_IER_TCOMP (0x1u << 7) /**< \brief (GMAC_IER) Transmit Complete */ -#define GMAC_IER_ROVR (0x1u << 10) /**< \brief (GMAC_IER) Receive Overrun */ -#define GMAC_IER_HRESP (0x1u << 11) /**< \brief (GMAC_IER) HRESP Not OK */ -#define GMAC_IER_PFNZ (0x1u << 12) /**< \brief (GMAC_IER) Pause Frame with Non-zero Pause Quantum Received */ -#define GMAC_IER_PTZ (0x1u << 13) /**< \brief (GMAC_IER) Pause Time Zero */ -#define GMAC_IER_PFTR (0x1u << 14) /**< \brief (GMAC_IER) Pause Frame Transmitted */ -#define GMAC_IER_EXINT (0x1u << 15) /**< \brief (GMAC_IER) External Interrupt */ -#define GMAC_IER_DRQFR (0x1u << 18) /**< \brief (GMAC_IER) PTP Delay Request Frame Received */ -#define GMAC_IER_SFR (0x1u << 19) /**< \brief (GMAC_IER) PTP Sync Frame Received */ -#define GMAC_IER_DRQFT (0x1u << 20) /**< \brief (GMAC_IER) PTP Delay Request Frame Transmitted */ -#define GMAC_IER_SFT (0x1u << 21) /**< \brief (GMAC_IER) PTP Sync Frame Transmitted */ -#define GMAC_IER_PDRQFR (0x1u << 22) /**< \brief (GMAC_IER) PDelay Request Frame Received */ -#define GMAC_IER_PDRSFR (0x1u << 23) /**< \brief (GMAC_IER) PDelay Response Frame Received */ -#define GMAC_IER_PDRQFT (0x1u << 24) /**< \brief (GMAC_IER) PDelay Request Frame Transmitted */ -#define GMAC_IER_PDRSFT (0x1u << 25) /**< \brief (GMAC_IER) PDelay Response Frame Transmitted */ -#define GMAC_IER_SRI (0x1u << 26) /**< \brief (GMAC_IER) TSU Seconds Register Increment */ -#define GMAC_IER_WOL (0x1u << 28) /**< \brief (GMAC_IER) Wake On LAN */ -/* -------- GMAC_IDR : (GMAC Offset: 0x02C) Interrupt Disable Register -------- */ -#define GMAC_IDR_MFS (0x1u << 0) /**< \brief (GMAC_IDR) Management Frame Sent */ -#define GMAC_IDR_RCOMP (0x1u << 1) /**< \brief (GMAC_IDR) Receive Complete */ -#define GMAC_IDR_RXUBR (0x1u << 2) /**< \brief (GMAC_IDR) RX Used Bit Read */ -#define GMAC_IDR_TXUBR (0x1u << 3) /**< \brief (GMAC_IDR) TX Used Bit Read */ -#define GMAC_IDR_TUR (0x1u << 4) /**< \brief (GMAC_IDR) Transmit Under Run */ -#define GMAC_IDR_RLEX (0x1u << 5) /**< \brief (GMAC_IDR) Retry Limit Exceeded or Late Collision */ -#define GMAC_IDR_TFC (0x1u << 6) /**< \brief (GMAC_IDR) Transmit Frame Corruption due to AHB error */ -#define GMAC_IDR_TCOMP (0x1u << 7) /**< \brief (GMAC_IDR) Transmit Complete */ -#define GMAC_IDR_ROVR (0x1u << 10) /**< \brief (GMAC_IDR) Receive Overrun */ -#define GMAC_IDR_HRESP (0x1u << 11) /**< \brief (GMAC_IDR) HRESP Not OK */ -#define GMAC_IDR_PFNZ (0x1u << 12) /**< \brief (GMAC_IDR) Pause Frame with Non-zero Pause Quantum Received */ -#define GMAC_IDR_PTZ (0x1u << 13) /**< \brief (GMAC_IDR) Pause Time Zero */ -#define GMAC_IDR_PFTR (0x1u << 14) /**< \brief (GMAC_IDR) Pause Frame Transmitted */ -#define GMAC_IDR_EXINT (0x1u << 15) /**< \brief (GMAC_IDR) External Interrupt */ -#define GMAC_IDR_DRQFR (0x1u << 18) /**< \brief (GMAC_IDR) PTP Delay Request Frame Received */ -#define GMAC_IDR_SFR (0x1u << 19) /**< \brief (GMAC_IDR) PTP Sync Frame Received */ -#define GMAC_IDR_DRQFT (0x1u << 20) /**< \brief (GMAC_IDR) PTP Delay Request Frame Transmitted */ -#define GMAC_IDR_SFT (0x1u << 21) /**< \brief (GMAC_IDR) PTP Sync Frame Transmitted */ -#define GMAC_IDR_PDRQFR (0x1u << 22) /**< \brief (GMAC_IDR) PDelay Request Frame Received */ -#define GMAC_IDR_PDRSFR (0x1u << 23) /**< \brief (GMAC_IDR) PDelay Response Frame Received */ -#define GMAC_IDR_PDRQFT (0x1u << 24) /**< \brief (GMAC_IDR) PDelay Request Frame Transmitted */ -#define GMAC_IDR_PDRSFT (0x1u << 25) /**< \brief (GMAC_IDR) PDelay Response Frame Transmitted */ -#define GMAC_IDR_SRI (0x1u << 26) /**< \brief (GMAC_IDR) TSU Seconds Register Increment */ -#define GMAC_IDR_WOL (0x1u << 28) /**< \brief (GMAC_IDR) Wake On LAN */ -/* -------- GMAC_IMR : (GMAC Offset: 0x030) Interrupt Mask Register -------- */ -#define GMAC_IMR_MFS (0x1u << 0) /**< \brief (GMAC_IMR) Management Frame Sent */ -#define GMAC_IMR_RCOMP (0x1u << 1) /**< \brief (GMAC_IMR) Receive Complete */ -#define GMAC_IMR_RXUBR (0x1u << 2) /**< \brief (GMAC_IMR) RX Used Bit Read */ -#define GMAC_IMR_TXUBR (0x1u << 3) /**< \brief (GMAC_IMR) TX Used Bit Read */ -#define GMAC_IMR_TUR (0x1u << 4) /**< \brief (GMAC_IMR) Transmit Under Run */ -#define GMAC_IMR_RLEX (0x1u << 5) /**< \brief (GMAC_IMR) Retry Limit Exceeded or Late Collision */ -#define GMAC_IMR_TFC (0x1u << 6) /**< \brief (GMAC_IMR) Transmit Frame Corruption due to AHB error */ -#define GMAC_IMR_TCOMP (0x1u << 7) /**< \brief (GMAC_IMR) Transmit Complete */ -#define GMAC_IMR_ROVR (0x1u << 10) /**< \brief (GMAC_IMR) Receive Overrun */ -#define GMAC_IMR_HRESP (0x1u << 11) /**< \brief (GMAC_IMR) HRESP Not OK */ -#define GMAC_IMR_PFNZ (0x1u << 12) /**< \brief (GMAC_IMR) Pause Frame with Non-zero Pause Quantum Received */ -#define GMAC_IMR_PTZ (0x1u << 13) /**< \brief (GMAC_IMR) Pause Time Zero */ -#define GMAC_IMR_PFTR (0x1u << 14) /**< \brief (GMAC_IMR) Pause Frame Transmitted */ -#define GMAC_IMR_EXINT (0x1u << 15) /**< \brief (GMAC_IMR) External Interrupt */ -#define GMAC_IMR_DRQFR (0x1u << 18) /**< \brief (GMAC_IMR) PTP Delay Request Frame Received */ -#define GMAC_IMR_SFR (0x1u << 19) /**< \brief (GMAC_IMR) PTP Sync Frame Received */ -#define GMAC_IMR_DRQFT (0x1u << 20) /**< \brief (GMAC_IMR) PTP Delay Request Frame Transmitted */ -#define GMAC_IMR_SFT (0x1u << 21) /**< \brief (GMAC_IMR) PTP Sync Frame Transmitted */ -#define GMAC_IMR_PDRQFR (0x1u << 22) /**< \brief (GMAC_IMR) PDelay Request Frame Received */ -#define GMAC_IMR_PDRSFR (0x1u << 23) /**< \brief (GMAC_IMR) PDelay Response Frame Received */ -#define GMAC_IMR_PDRQFT (0x1u << 24) /**< \brief (GMAC_IMR) PDelay Request Frame Transmitted */ -#define GMAC_IMR_PDRSFT (0x1u << 25) /**< \brief (GMAC_IMR) PDelay Response Frame Transmitted */ -/* -------- GMAC_MAN : (GMAC Offset: 0x034) PHY Maintenance Register -------- */ -#define GMAC_MAN_DATA_Pos 0 -#define GMAC_MAN_DATA_Msk (0xffffu << GMAC_MAN_DATA_Pos) /**< \brief (GMAC_MAN) PHY Data */ -#define GMAC_MAN_DATA(value) ((GMAC_MAN_DATA_Msk & ((value) << GMAC_MAN_DATA_Pos))) -#define GMAC_MAN_WTN_Pos 16 -#define GMAC_MAN_WTN_Msk (0x3u << GMAC_MAN_WTN_Pos) /**< \brief (GMAC_MAN) Write Ten */ -#define GMAC_MAN_WTN(value) ((GMAC_MAN_WTN_Msk & ((value) << GMAC_MAN_WTN_Pos))) -#define GMAC_MAN_REGA_Pos 18 -#define GMAC_MAN_REGA_Msk (0x1fu << GMAC_MAN_REGA_Pos) /**< \brief (GMAC_MAN) Register Address */ -#define GMAC_MAN_REGA(value) ((GMAC_MAN_REGA_Msk & ((value) << GMAC_MAN_REGA_Pos))) -#define GMAC_MAN_PHYA_Pos 23 -#define GMAC_MAN_PHYA_Msk (0x1fu << GMAC_MAN_PHYA_Pos) /**< \brief (GMAC_MAN) PHY Address */ -#define GMAC_MAN_PHYA(value) ((GMAC_MAN_PHYA_Msk & ((value) << GMAC_MAN_PHYA_Pos))) -#define GMAC_MAN_OP_Pos 28 -#define GMAC_MAN_OP_Msk (0x3u << GMAC_MAN_OP_Pos) /**< \brief (GMAC_MAN) Operation */ -#define GMAC_MAN_OP(value) ((GMAC_MAN_OP_Msk & ((value) << GMAC_MAN_OP_Pos))) -#define GMAC_MAN_CLTTO (0x1u << 30) /**< \brief (GMAC_MAN) Clause 22 Operation */ -#define GMAC_MAN_WZO (0x1u << 31) /**< \brief (GMAC_MAN) Write ZERO */ -/* -------- GMAC_RPQ : (GMAC Offset: 0x038) Received Pause Quantum Register -------- */ -#define GMAC_RPQ_RPQ_Pos 0 -#define GMAC_RPQ_RPQ_Msk (0xffffu << GMAC_RPQ_RPQ_Pos) /**< \brief (GMAC_RPQ) Received Pause Quantum */ -/* -------- GMAC_TPQ : (GMAC Offset: 0x03C) Transmit Pause Quantum Register -------- */ -#define GMAC_TPQ_TPQ_Pos 0 -#define GMAC_TPQ_TPQ_Msk (0xffffu << GMAC_TPQ_TPQ_Pos) /**< \brief (GMAC_TPQ) Transmit Pause Quantum */ -#define GMAC_TPQ_TPQ(value) ((GMAC_TPQ_TPQ_Msk & ((value) << GMAC_TPQ_TPQ_Pos))) -/* -------- GMAC_TPSF : (GMAC Offset: 0x040) TX Partial Store and Forward Register -------- */ -#define GMAC_TPSF_TPB1ADR_Pos 0 -#define GMAC_TPSF_TPB1ADR_Msk (0xfffu << GMAC_TPSF_TPB1ADR_Pos) /**< \brief (GMAC_TPSF) tx_pbuf_addr-1:0 */ -#define GMAC_TPSF_TPB1ADR(value) ((GMAC_TPSF_TPB1ADR_Msk & ((value) << GMAC_TPSF_TPB1ADR_Pos))) -#define GMAC_TPSF_ENTXP (0x1u << 31) /**< \brief (GMAC_TPSF) Enable TX Partial Store and Forward Operation */ -/* -------- GMAC_RPSF : (GMAC Offset: 0x044) RX Partial Store and Forward Register -------- */ -#define GMAC_RPSF_RPB1ADR_Pos 0 -#define GMAC_RPSF_RPB1ADR_Msk (0xfffu << GMAC_RPSF_RPB1ADR_Pos) /**< \brief (GMAC_RPSF) rx_pbuf_addr-1:0 */ -#define GMAC_RPSF_RPB1ADR(value) ((GMAC_RPSF_RPB1ADR_Msk & ((value) << GMAC_RPSF_RPB1ADR_Pos))) -#define GMAC_RPSF_ENRXP (0x1u << 31) /**< \brief (GMAC_RPSF) Enable RX Partial Store and Forward Operation */ -/* -------- GMAC_HRB : (GMAC Offset: 0x080) Hash Register Bottom [31:0] -------- */ -#define GMAC_HRB_ADDR_Pos 0 -#define GMAC_HRB_ADDR_Msk (0xffffffffu << GMAC_HRB_ADDR_Pos) /**< \brief (GMAC_HRB) Hash Address */ -#define GMAC_HRB_ADDR(value) ((GMAC_HRB_ADDR_Msk & ((value) << GMAC_HRB_ADDR_Pos))) -/* -------- GMAC_HRT : (GMAC Offset: 0x084) Hash Register Top [63:32] -------- */ -#define GMAC_HRT_ADDR_Pos 0 -#define GMAC_HRT_ADDR_Msk (0xffffffffu << GMAC_HRT_ADDR_Pos) /**< \brief (GMAC_HRT) Hash Address */ -#define GMAC_HRT_ADDR(value) ((GMAC_HRT_ADDR_Msk & ((value) << GMAC_HRT_ADDR_Pos))) -/* -------- GMAC_SAB1 : (GMAC Offset: 0x088) Specific Address 1 Bottom [31:0] Register -------- */ -#define GMAC_SAB1_ADDR_Pos 0 -#define GMAC_SAB1_ADDR_Msk (0xffffffffu << GMAC_SAB1_ADDR_Pos) /**< \brief (GMAC_SAB1) Specific Address 1 */ -#define GMAC_SAB1_ADDR(value) ((GMAC_SAB1_ADDR_Msk & ((value) << GMAC_SAB1_ADDR_Pos))) -/* -------- GMAC_SAT1 : (GMAC Offset: 0x08C) Specific Address 1 Top [47:32] Register -------- */ -#define GMAC_SAT1_ADDR_Pos 0 -#define GMAC_SAT1_ADDR_Msk (0xffffu << GMAC_SAT1_ADDR_Pos) /**< \brief (GMAC_SAT1) Specific Address 1 */ -#define GMAC_SAT1_ADDR(value) ((GMAC_SAT1_ADDR_Msk & ((value) << GMAC_SAT1_ADDR_Pos))) -/* -------- GMAC_SAB2 : (GMAC Offset: 0x090) Specific Address 2 Bottom [31:0] Register -------- */ -#define GMAC_SAB2_ADDR_Pos 0 -#define GMAC_SAB2_ADDR_Msk (0xffffffffu << GMAC_SAB2_ADDR_Pos) /**< \brief (GMAC_SAB2) Specific Address 2 */ -#define GMAC_SAB2_ADDR(value) ((GMAC_SAB2_ADDR_Msk & ((value) << GMAC_SAB2_ADDR_Pos))) -/* -------- GMAC_SAT2 : (GMAC Offset: 0x094) Specific Address 2 Top [47:32] Register -------- */ -#define GMAC_SAT2_ADDR_Pos 0 -#define GMAC_SAT2_ADDR_Msk (0xffffu << GMAC_SAT2_ADDR_Pos) /**< \brief (GMAC_SAT2) Specific Address 2 */ -#define GMAC_SAT2_ADDR(value) ((GMAC_SAT2_ADDR_Msk & ((value) << GMAC_SAT2_ADDR_Pos))) -/* -------- GMAC_SAB3 : (GMAC Offset: 0x098) Specific Address 3 Bottom [31:0] Register -------- */ -#define GMAC_SAB3_ADDR_Pos 0 -#define GMAC_SAB3_ADDR_Msk (0xffffffffu << GMAC_SAB3_ADDR_Pos) /**< \brief (GMAC_SAB3) Specific Address 3 */ -#define GMAC_SAB3_ADDR(value) ((GMAC_SAB3_ADDR_Msk & ((value) << GMAC_SAB3_ADDR_Pos))) -/* -------- GMAC_SAT3 : (GMAC Offset: 0x09C) Specific Address 3 Top [47:32] Register -------- */ -#define GMAC_SAT3_ADDR_Pos 0 -#define GMAC_SAT3_ADDR_Msk (0xffffu << GMAC_SAT3_ADDR_Pos) /**< \brief (GMAC_SAT3) Specific Address 3 */ -#define GMAC_SAT3_ADDR(value) ((GMAC_SAT3_ADDR_Msk & ((value) << GMAC_SAT3_ADDR_Pos))) -/* -------- GMAC_SAB4 : (GMAC Offset: 0x0A0) Specific Address 4 Bottom [31:0] Register -------- */ -#define GMAC_SAB4_ADDR_Pos 0 -#define GMAC_SAB4_ADDR_Msk (0xffffffffu << GMAC_SAB4_ADDR_Pos) /**< \brief (GMAC_SAB4) Specific Address 4 */ -#define GMAC_SAB4_ADDR(value) ((GMAC_SAB4_ADDR_Msk & ((value) << GMAC_SAB4_ADDR_Pos))) -/* -------- GMAC_SAT4 : (GMAC Offset: 0x0A4) Specific Address 4 Top [47:32] Register -------- */ -#define GMAC_SAT4_ADDR_Pos 0 -#define GMAC_SAT4_ADDR_Msk (0xffffu << GMAC_SAT4_ADDR_Pos) /**< \brief (GMAC_SAT4) Specific Address 4 */ -#define GMAC_SAT4_ADDR(value) ((GMAC_SAT4_ADDR_Msk & ((value) << GMAC_SAT4_ADDR_Pos))) -/* -------- GMAC_TIDM[4] : (GMAC Offset: 0x0A8) Type ID Match 1 Register -------- */ -#define GMAC_TIDM_TID_Pos 0 -#define GMAC_TIDM_TID_Msk (0xffffu << GMAC_TIDM_TID_Pos) /**< \brief (GMAC_TIDM[4]) Type ID Match 1 */ -#define GMAC_TIDM_TID(value) ((GMAC_TIDM_TID_Msk & ((value) << GMAC_TIDM_TID_Pos))) -/* -------- GMAC_WOL : (GMAC Offset: 0x0B8) Wake on LAN Register -------- */ -#define GMAC_WOL_IP_Pos 0 -#define GMAC_WOL_IP_Msk (0xffffu << GMAC_WOL_IP_Pos) /**< \brief (GMAC_WOL) ARP Request IP Address */ -#define GMAC_WOL_IP(value) ((GMAC_WOL_IP_Msk & ((value) << GMAC_WOL_IP_Pos))) -#define GMAC_WOL_MAG (0x1u << 16) /**< \brief (GMAC_WOL) Magic Packet Event Enable */ -#define GMAC_WOL_ARP (0x1u << 17) /**< \brief (GMAC_WOL) ARP Request IP Address */ -#define GMAC_WOL_SA1 (0x1u << 18) /**< \brief (GMAC_WOL) Specific Address Register 1 Event Enable */ -#define GMAC_WOL_MTI (0x1u << 19) /**< \brief (GMAC_WOL) Multicast Hash Event Enable */ -/* -------- GMAC_IPGS : (GMAC Offset: 0x0BC) IPG Stretch Register -------- */ -#define GMAC_IPGS_FL_Pos 0 -#define GMAC_IPGS_FL_Msk (0xffffu << GMAC_IPGS_FL_Pos) /**< \brief (GMAC_IPGS) Frame Length */ -#define GMAC_IPGS_FL(value) ((GMAC_IPGS_FL_Msk & ((value) << GMAC_IPGS_FL_Pos))) -/* -------- GMAC_SVLAN : (GMAC Offset: 0x0C0) Stacked VLAN Register -------- */ -#define GMAC_SVLAN_VLAN_TYPE_Pos 0 -#define GMAC_SVLAN_VLAN_TYPE_Msk (0xffffu << GMAC_SVLAN_VLAN_TYPE_Pos) /**< \brief (GMAC_SVLAN) User Defined VLAN_TYPE Field */ -#define GMAC_SVLAN_VLAN_TYPE(value) ((GMAC_SVLAN_VLAN_TYPE_Msk & ((value) << GMAC_SVLAN_VLAN_TYPE_Pos))) -#define GMAC_SVLAN_ESVLAN (0x1u << 31) /**< \brief (GMAC_SVLAN) Enable Stacked VLAN Processing Mode */ -/* -------- GMAC_TPFCP : (GMAC Offset: 0x0C4) Transmit PFC Pause Register -------- */ -#define GMAC_TPFCP_PEV_Pos 0 -#define GMAC_TPFCP_PEV_Msk (0xffu << GMAC_TPFCP_PEV_Pos) /**< \brief (GMAC_TPFCP) Priority Enable Vector */ -#define GMAC_TPFCP_PEV(value) ((GMAC_TPFCP_PEV_Msk & ((value) << GMAC_TPFCP_PEV_Pos))) -#define GMAC_TPFCP_PQ_Pos 8 -#define GMAC_TPFCP_PQ_Msk (0xffu << GMAC_TPFCP_PQ_Pos) /**< \brief (GMAC_TPFCP) Pause Quantum */ -#define GMAC_TPFCP_PQ(value) ((GMAC_TPFCP_PQ_Msk & ((value) << GMAC_TPFCP_PQ_Pos))) -/* -------- GMAC_SAMB1 : (GMAC Offset: 0x0C8) Specific Address 1 Mask Bottom [31:0] Register -------- */ -#define GMAC_SAMB1_ADDR_Pos 0 -#define GMAC_SAMB1_ADDR_Msk (0xffffffffu << GMAC_SAMB1_ADDR_Pos) /**< \brief (GMAC_SAMB1) Specific Address 1 Mask */ -#define GMAC_SAMB1_ADDR(value) ((GMAC_SAMB1_ADDR_Msk & ((value) << GMAC_SAMB1_ADDR_Pos))) -/* -------- GMAC_SAMT1 : (GMAC Offset: 0x0CC) Specific Address 1 Mask Top [47:32] Register -------- */ -#define GMAC_SAMT1_ADDR_Pos 0 -#define GMAC_SAMT1_ADDR_Msk (0xffffu << GMAC_SAMT1_ADDR_Pos) /**< \brief (GMAC_SAMT1) Specific Address 1 Mask */ -#define GMAC_SAMT1_ADDR(value) ((GMAC_SAMT1_ADDR_Msk & ((value) << GMAC_SAMT1_ADDR_Pos))) -/* -------- GMAC_OTLO : (GMAC Offset: 0x100) Octets Transmitted [31:0] Register -------- */ -#define GMAC_OTLO_TXO_Pos 0 -#define GMAC_OTLO_TXO_Msk (0xffffffffu << GMAC_OTLO_TXO_Pos) /**< \brief (GMAC_OTLO) Transmitted Octets */ -/* -------- GMAC_OTHI : (GMAC Offset: 0x104) Octets Transmitted [47:32] Register -------- */ -#define GMAC_OTHI_TXO_Pos 0 -#define GMAC_OTHI_TXO_Msk (0xffffu << GMAC_OTHI_TXO_Pos) /**< \brief (GMAC_OTHI) Transmitted Octets */ -/* -------- GMAC_FT : (GMAC Offset: 0x108) Frames Transmitted Register -------- */ -#define GMAC_FT_FTX_Pos 0 -#define GMAC_FT_FTX_Msk (0xffffffffu << GMAC_FT_FTX_Pos) /**< \brief (GMAC_FT) Frames Transmitted without Error */ -/* -------- GMAC_BCFT : (GMAC Offset: 0x10C) Broadcast Frames Transmitted Register -------- */ -#define GMAC_BCFT_BFTX_Pos 0 -#define GMAC_BCFT_BFTX_Msk (0xffffffffu << GMAC_BCFT_BFTX_Pos) /**< \brief (GMAC_BCFT) Broadcast Frames Transmitted without Error */ -/* -------- GMAC_MFT : (GMAC Offset: 0x110) Multicast Frames Transmitted Register -------- */ -#define GMAC_MFT_MFTX_Pos 0 -#define GMAC_MFT_MFTX_Msk (0xffffffffu << GMAC_MFT_MFTX_Pos) /**< \brief (GMAC_MFT) Multicast Frames Transmitted without Error */ -/* -------- GMAC_PFT : (GMAC Offset: 0x114) Pause Frames Transmitted Register -------- */ -#define GMAC_PFT_PFTX_Pos 0 -#define GMAC_PFT_PFTX_Msk (0xffffu << GMAC_PFT_PFTX_Pos) /**< \brief (GMAC_PFT) Pause Frames Transmitted Register */ -/* -------- GMAC_BFT64 : (GMAC Offset: 0x118) 64 Byte Frames Transmitted Register -------- */ -#define GMAC_BFT64_NFTX_Pos 0 -#define GMAC_BFT64_NFTX_Msk (0xffffffffu << GMAC_BFT64_NFTX_Pos) /**< \brief (GMAC_BFT64) 64 Byte Frames Transmitted without Error */ -/* -------- GMAC_TBFT127 : (GMAC Offset: 0x11C) 65 to 127 Byte Frames Transmitted Register -------- */ -#define GMAC_TBFT127_NFTX_Pos 0 -#define GMAC_TBFT127_NFTX_Msk (0xffffffffu << GMAC_TBFT127_NFTX_Pos) /**< \brief (GMAC_TBFT127) 65 to 127 Byte Frames Transmitted without Error */ -/* -------- GMAC_TBFT255 : (GMAC Offset: 0x120) 128 to 255 Byte Frames Transmitted Register -------- */ -#define GMAC_TBFT255_NFTX_Pos 0 -#define GMAC_TBFT255_NFTX_Msk (0xffffffffu << GMAC_TBFT255_NFTX_Pos) /**< \brief (GMAC_TBFT255) 128 to 255 Byte Frames Transmitted without Error */ -/* -------- GMAC_TBFT511 : (GMAC Offset: 0x124) 256 to 511 Byte Frames Transmitted Register -------- */ -#define GMAC_TBFT511_NFTX_Pos 0 -#define GMAC_TBFT511_NFTX_Msk (0xffffffffu << GMAC_TBFT511_NFTX_Pos) /**< \brief (GMAC_TBFT511) 256 to 511 Byte Frames Transmitted without Error */ -/* -------- GMAC_TBFT1023 : (GMAC Offset: 0x128) 512 to 1023 Byte Frames Transmitted Register -------- */ -#define GMAC_TBFT1023_NFTX_Pos 0 -#define GMAC_TBFT1023_NFTX_Msk (0xffffffffu << GMAC_TBFT1023_NFTX_Pos) /**< \brief (GMAC_TBFT1023) 512 to 1023 Byte Frames Transmitted without Error */ -/* -------- GMAC_TBFT1518 : (GMAC Offset: 0x12C) 1024 to 1518 Byte Frames Transmitted Register -------- */ -#define GMAC_TBFT1518_NFTX_Pos 0 -#define GMAC_TBFT1518_NFTX_Msk (0xffffffffu << GMAC_TBFT1518_NFTX_Pos) /**< \brief (GMAC_TBFT1518) 1024 to 1518 Byte Frames Transmitted without Error */ -/* -------- GMAC_GTBFT1518 : (GMAC Offset: 0x130) Greater Than 1518 Byte Frames Transmitted Register -------- */ -#define GMAC_GTBFT1518_NFTX_Pos 0 -#define GMAC_GTBFT1518_NFTX_Msk (0xffffffffu << GMAC_GTBFT1518_NFTX_Pos) /**< \brief (GMAC_GTBFT1518) Greater than 1518 Byte Frames Transmitted without Error */ -/* -------- GMAC_TUR : (GMAC Offset: 0x134) Transmit Under Runs Register -------- */ -#define GMAC_TUR_TXUNR_Pos 0 -#define GMAC_TUR_TXUNR_Msk (0x3ffu << GMAC_TUR_TXUNR_Pos) /**< \brief (GMAC_TUR) Transmit Under Runs */ -/* -------- GMAC_SCF : (GMAC Offset: 0x138) Single Collision Frames Register -------- */ -#define GMAC_SCF_SCOL_Pos 0 -#define GMAC_SCF_SCOL_Msk (0x3ffffu << GMAC_SCF_SCOL_Pos) /**< \brief (GMAC_SCF) Single Collision */ -/* -------- GMAC_MCF : (GMAC Offset: 0x13C) Multiple Collision Frames Register -------- */ -#define GMAC_MCF_MCOL_Pos 0 -#define GMAC_MCF_MCOL_Msk (0x3ffffu << GMAC_MCF_MCOL_Pos) /**< \brief (GMAC_MCF) Multiple Collision */ -/* -------- GMAC_EC : (GMAC Offset: 0x140) Excessive Collisions Register -------- */ -#define GMAC_EC_XCOL_Pos 0 -#define GMAC_EC_XCOL_Msk (0x3ffu << GMAC_EC_XCOL_Pos) /**< \brief (GMAC_EC) Excessive Collisions */ -/* -------- GMAC_LC : (GMAC Offset: 0x144) Late Collisions Register -------- */ -#define GMAC_LC_LCOL_Pos 0 -#define GMAC_LC_LCOL_Msk (0x3ffu << GMAC_LC_LCOL_Pos) /**< \brief (GMAC_LC) Late Collisions */ -/* -------- GMAC_DTF : (GMAC Offset: 0x148) Deferred Transmission Frames Register -------- */ -#define GMAC_DTF_DEFT_Pos 0 -#define GMAC_DTF_DEFT_Msk (0x3ffffu << GMAC_DTF_DEFT_Pos) /**< \brief (GMAC_DTF) Deferred Transmission */ -/* -------- GMAC_CSE : (GMAC Offset: 0x14C) Carrier Sense Errors Register -------- */ -#define GMAC_CSE_CSR_Pos 0 -#define GMAC_CSE_CSR_Msk (0x3ffu << GMAC_CSE_CSR_Pos) /**< \brief (GMAC_CSE) Carrier Sense Error */ -/* -------- GMAC_ORLO : (GMAC Offset: 0x150) Octets Received [31:0] Received -------- */ -#define GMAC_ORLO_RXO_Pos 0 -#define GMAC_ORLO_RXO_Msk (0xffffffffu << GMAC_ORLO_RXO_Pos) /**< \brief (GMAC_ORLO) Received Octets */ -/* -------- GMAC_ORHI : (GMAC Offset: 0x154) Octets Received [47:32] Received -------- */ -#define GMAC_ORHI_RXO_Pos 0 -#define GMAC_ORHI_RXO_Msk (0xffffu << GMAC_ORHI_RXO_Pos) /**< \brief (GMAC_ORHI) Received Octets */ -/* -------- GMAC_FR : (GMAC Offset: 0x158) Frames Received Register -------- */ -#define GMAC_FR_FRX_Pos 0 -#define GMAC_FR_FRX_Msk (0xffffffffu << GMAC_FR_FRX_Pos) /**< \brief (GMAC_FR) Frames Received without Error */ -/* -------- GMAC_BCFR : (GMAC Offset: 0x15C) Broadcast Frames Received Register -------- */ -#define GMAC_BCFR_BFRX_Pos 0 -#define GMAC_BCFR_BFRX_Msk (0xffffffffu << GMAC_BCFR_BFRX_Pos) /**< \brief (GMAC_BCFR) Broadcast Frames Received without Error */ -/* -------- GMAC_MFR : (GMAC Offset: 0x160) Multicast Frames Received Register -------- */ -#define GMAC_MFR_MFRX_Pos 0 -#define GMAC_MFR_MFRX_Msk (0xffffffffu << GMAC_MFR_MFRX_Pos) /**< \brief (GMAC_MFR) Multicast Frames Received without Error */ -/* -------- GMAC_PFR : (GMAC Offset: 0x164) Pause Frames Received Register -------- */ -#define GMAC_PFR_PFRX_Pos 0 -#define GMAC_PFR_PFRX_Msk (0xffffu << GMAC_PFR_PFRX_Pos) /**< \brief (GMAC_PFR) Pause Frames Received Register */ -/* -------- GMAC_BFR64 : (GMAC Offset: 0x168) 64 Byte Frames Received Register -------- */ -#define GMAC_BFR64_NFRX_Pos 0 -#define GMAC_BFR64_NFRX_Msk (0xffffffffu << GMAC_BFR64_NFRX_Pos) /**< \brief (GMAC_BFR64) 64 Byte Frames Received without Error */ -/* -------- GMAC_TBFR127 : (GMAC Offset: 0x16C) 65 to 127 Byte Frames Received Register -------- */ -#define GMAC_TBFR127_NFRX_Pos 0 -#define GMAC_TBFR127_NFRX_Msk (0xffffffffu << GMAC_TBFR127_NFRX_Pos) /**< \brief (GMAC_TBFR127) 65 to 127 Byte Frames Received without Error */ -/* -------- GMAC_TBFR255 : (GMAC Offset: 0x170) 128 to 255 Byte Frames Received Register -------- */ -#define GMAC_TBFR255_NFRX_Pos 0 -#define GMAC_TBFR255_NFRX_Msk (0xffffffffu << GMAC_TBFR255_NFRX_Pos) /**< \brief (GMAC_TBFR255) 128 to 255 Byte Frames Received without Error */ -/* -------- GMAC_TBFR511 : (GMAC Offset: 0x174) 256 to 511Byte Frames Received Register -------- */ -#define GMAC_TBFR511_NFRX_Pos 0 -#define GMAC_TBFR511_NFRX_Msk (0xffffffffu << GMAC_TBFR511_NFRX_Pos) /**< \brief (GMAC_TBFR511) 256 to 511 Byte Frames Received without Error */ -/* -------- GMAC_TBFR1023 : (GMAC Offset: 0x178) 512 to 1023 Byte Frames Received Register -------- */ -#define GMAC_TBFR1023_NFRX_Pos 0 -#define GMAC_TBFR1023_NFRX_Msk (0xffffffffu << GMAC_TBFR1023_NFRX_Pos) /**< \brief (GMAC_TBFR1023) 512 to 1023 Byte Frames Received without Error */ -/* -------- GMAC_TBFR1518 : (GMAC Offset: 0x17C) 1024 to 1518 Byte Frames Received Register -------- */ -#define GMAC_TBFR1518_NFRX_Pos 0 -#define GMAC_TBFR1518_NFRX_Msk (0xffffffffu << GMAC_TBFR1518_NFRX_Pos) /**< \brief (GMAC_TBFR1518) 1024 to 1518 Byte Frames Received without Error */ -/* -------- GMAC_TMXBFR : (GMAC Offset: 0x180) 1519 to Maximum Byte Frames Received Register -------- */ -#define GMAC_TMXBFR_NFRX_Pos 0 -#define GMAC_TMXBFR_NFRX_Msk (0xffffffffu << GMAC_TMXBFR_NFRX_Pos) /**< \brief (GMAC_TMXBFR) 1519 to Maximum Byte Frames Received without Error */ -/* -------- GMAC_UFR : (GMAC Offset: 0x184) Undersize Frames Received Register -------- */ -#define GMAC_UFR_UFRX_Pos 0 -#define GMAC_UFR_UFRX_Msk (0x3ffu << GMAC_UFR_UFRX_Pos) /**< \brief (GMAC_UFR) Undersize Frames Received */ -/* -------- GMAC_OFR : (GMAC Offset: 0x188) Oversize Frames Received Register -------- */ -#define GMAC_OFR_OFRX_Pos 0 -#define GMAC_OFR_OFRX_Msk (0x3ffu << GMAC_OFR_OFRX_Pos) /**< \brief (GMAC_OFR) Oversized Frames Received */ -/* -------- GMAC_JR : (GMAC Offset: 0x18C) Jabbers Received Register -------- */ -#define GMAC_JR_JRX_Pos 0 -#define GMAC_JR_JRX_Msk (0x3ffu << GMAC_JR_JRX_Pos) /**< \brief (GMAC_JR) Jabbers Received */ -/* -------- GMAC_FCSE : (GMAC Offset: 0x190) Frame Check Sequence Errors Register -------- */ -#define GMAC_FCSE_FCKR_Pos 0 -#define GMAC_FCSE_FCKR_Msk (0x3ffu << GMAC_FCSE_FCKR_Pos) /**< \brief (GMAC_FCSE) Frame Check Sequence Errors */ -/* -------- GMAC_LFFE : (GMAC Offset: 0x194) Length Field Frame Errors Register -------- */ -#define GMAC_LFFE_LFER_Pos 0 -#define GMAC_LFFE_LFER_Msk (0x3ffu << GMAC_LFFE_LFER_Pos) /**< \brief (GMAC_LFFE) Length Field Frame Errors */ -/* -------- GMAC_RSE : (GMAC Offset: 0x198) Receive Symbol Errors Register -------- */ -#define GMAC_RSE_RXSE_Pos 0 -#define GMAC_RSE_RXSE_Msk (0x3ffu << GMAC_RSE_RXSE_Pos) /**< \brief (GMAC_RSE) Receive Symbol Errors */ -/* -------- GMAC_AE : (GMAC Offset: 0x19C) Alignment Errors Register -------- */ -#define GMAC_AE_AER_Pos 0 -#define GMAC_AE_AER_Msk (0x3ffu << GMAC_AE_AER_Pos) /**< \brief (GMAC_AE) Alignment Errors */ -/* -------- GMAC_RRE : (GMAC Offset: 0x1A0) Receive Resource Errors Register -------- */ -#define GMAC_RRE_RXRER_Pos 0 -#define GMAC_RRE_RXRER_Msk (0x3ffffu << GMAC_RRE_RXRER_Pos) /**< \brief (GMAC_RRE) Receive Resource Errors */ -/* -------- GMAC_ROE : (GMAC Offset: 0x1A4) Receive Overrun Register -------- */ -#define GMAC_ROE_RXOVR_Pos 0 -#define GMAC_ROE_RXOVR_Msk (0x3ffu << GMAC_ROE_RXOVR_Pos) /**< \brief (GMAC_ROE) Receive Overruns */ -/* -------- GMAC_IHCE : (GMAC Offset: 0x1A8) IP Header Checksum Errors Register -------- */ -#define GMAC_IHCE_HCKER_Pos 0 -#define GMAC_IHCE_HCKER_Msk (0xffu << GMAC_IHCE_HCKER_Pos) /**< \brief (GMAC_IHCE) IP Header Checksum Errors */ -/* -------- GMAC_TCE : (GMAC Offset: 0x1AC) TCP Checksum Errors Register -------- */ -#define GMAC_TCE_TCKER_Pos 0 -#define GMAC_TCE_TCKER_Msk (0xffu << GMAC_TCE_TCKER_Pos) /**< \brief (GMAC_TCE) TCP Checksum Errors */ -/* -------- GMAC_UCE : (GMAC Offset: 0x1B0) UDP Checksum Errors Register -------- */ -#define GMAC_UCE_UCKER_Pos 0 -#define GMAC_UCE_UCKER_Msk (0xffu << GMAC_UCE_UCKER_Pos) /**< \brief (GMAC_UCE) UDP Checksum Errors */ -/* -------- GMAC_TSSS : (GMAC Offset: 0x1C8) 1588 Timer Sync Strobe Seconds Register -------- */ -#define GMAC_TSSS_VTS_Pos 0 -#define GMAC_TSSS_VTS_Msk (0xffffffffu << GMAC_TSSS_VTS_Pos) /**< \brief (GMAC_TSSS) Value of Timer Seconds Register Capture */ -#define GMAC_TSSS_VTS(value) ((GMAC_TSSS_VTS_Msk & ((value) << GMAC_TSSS_VTS_Pos))) -/* -------- GMAC_TSSN : (GMAC Offset: 0x1CC) 1588 Timer Sync Strobe Nanoseconds Register -------- */ -#define GMAC_TSSN_VTN_Pos 0 -#define GMAC_TSSN_VTN_Msk (0x3fffffffu << GMAC_TSSN_VTN_Pos) /**< \brief (GMAC_TSSN) Value Timer Nanoseconds Register Capture */ -#define GMAC_TSSN_VTN(value) ((GMAC_TSSN_VTN_Msk & ((value) << GMAC_TSSN_VTN_Pos))) -/* -------- GMAC_TS : (GMAC Offset: 0x1D0) 1588 Timer Seconds Register -------- */ -#define GMAC_TS_TCS_Pos 0 -#define GMAC_TS_TCS_Msk (0xffffffffu << GMAC_TS_TCS_Pos) /**< \brief (GMAC_TS) Timer Count in Seconds */ -#define GMAC_TS_TCS(value) ((GMAC_TS_TCS_Msk & ((value) << GMAC_TS_TCS_Pos))) -/* -------- GMAC_TN : (GMAC Offset: 0x1D4) 1588 Timer Nanoseconds Register -------- */ -#define GMAC_TN_TNS_Pos 0 -#define GMAC_TN_TNS_Msk (0x3fffffffu << GMAC_TN_TNS_Pos) /**< \brief (GMAC_TN) Timer Count in Nanoseconds */ -#define GMAC_TN_TNS(value) ((GMAC_TN_TNS_Msk & ((value) << GMAC_TN_TNS_Pos))) -/* -------- GMAC_TA : (GMAC Offset: 0x1D8) 1588 Timer Adjust Register -------- */ -#define GMAC_TA_ITDT_Pos 0 -#define GMAC_TA_ITDT_Msk (0x3fffffffu << GMAC_TA_ITDT_Pos) /**< \brief (GMAC_TA) Increment/Decrement */ -#define GMAC_TA_ITDT(value) ((GMAC_TA_ITDT_Msk & ((value) << GMAC_TA_ITDT_Pos))) -#define GMAC_TA_ADJ (0x1u << 31) /**< \brief (GMAC_TA) Adjust 1588 Timer */ -/* -------- GMAC_TI : (GMAC Offset: 0x1DC) 1588 Timer Increment Register -------- */ -#define GMAC_TI_CNS_Pos 0 -#define GMAC_TI_CNS_Msk (0xffu << GMAC_TI_CNS_Pos) /**< \brief (GMAC_TI) Count Nanoseconds */ -#define GMAC_TI_CNS(value) ((GMAC_TI_CNS_Msk & ((value) << GMAC_TI_CNS_Pos))) -#define GMAC_TI_ACNS_Pos 8 -#define GMAC_TI_ACNS_Msk (0xffu << GMAC_TI_ACNS_Pos) /**< \brief (GMAC_TI) Alternative Count Nanoseconds */ -#define GMAC_TI_ACNS(value) ((GMAC_TI_ACNS_Msk & ((value) << GMAC_TI_ACNS_Pos))) -#define GMAC_TI_NIT_Pos 16 -#define GMAC_TI_NIT_Msk (0xffu << GMAC_TI_NIT_Pos) /**< \brief (GMAC_TI) Number of Increments */ -#define GMAC_TI_NIT(value) ((GMAC_TI_NIT_Msk & ((value) << GMAC_TI_NIT_Pos))) -/* -------- GMAC_EFTS : (GMAC Offset: 0x1E0) PTP Event Frame Transmitted Seconds -------- */ -#define GMAC_EFTS_RUD_Pos 0 -#define GMAC_EFTS_RUD_Msk (0xffffffffu << GMAC_EFTS_RUD_Pos) /**< \brief (GMAC_EFTS) Register Update */ -/* -------- GMAC_EFTN : (GMAC Offset: 0x1E4) PTP Event Frame Transmitted Nanoseconds -------- */ -#define GMAC_EFTN_RUD_Pos 0 -#define GMAC_EFTN_RUD_Msk (0x3fffffffu << GMAC_EFTN_RUD_Pos) /**< \brief (GMAC_EFTN) Register Update */ -/* -------- GMAC_EFRS : (GMAC Offset: 0x1E8) PTP Event Frame Received Seconds -------- */ -#define GMAC_EFRS_RUD_Pos 0 -#define GMAC_EFRS_RUD_Msk (0xffffffffu << GMAC_EFRS_RUD_Pos) /**< \brief (GMAC_EFRS) Register Update */ -/* -------- GMAC_EFRN : (GMAC Offset: 0x1EC) PTP Event Frame Received Nanoseconds -------- */ -#define GMAC_EFRN_RUD_Pos 0 -#define GMAC_EFRN_RUD_Msk (0x3fffffffu << GMAC_EFRN_RUD_Pos) /**< \brief (GMAC_EFRN) Register Update */ -/* -------- GMAC_PEFTS : (GMAC Offset: 0x1F0) PTP Peer Event Frame Transmitted Seconds -------- */ -#define GMAC_PEFTS_RUD_Pos 0 -#define GMAC_PEFTS_RUD_Msk (0xffffffffu << GMAC_PEFTS_RUD_Pos) /**< \brief (GMAC_PEFTS) Register Update */ -/* -------- GMAC_PEFTN : (GMAC Offset: 0x1F4) PTP Peer Event Frame Transmitted Nanoseconds -------- */ -#define GMAC_PEFTN_RUD_Pos 0 -#define GMAC_PEFTN_RUD_Msk (0x3fffffffu << GMAC_PEFTN_RUD_Pos) /**< \brief (GMAC_PEFTN) Register Update */ -/* -------- GMAC_PEFRS : (GMAC Offset: 0x1F8) PTP Peer Event Frame Received Seconds -------- */ -#define GMAC_PEFRS_RUD_Pos 0 -#define GMAC_PEFRS_RUD_Msk (0xffffffffu << GMAC_PEFRS_RUD_Pos) /**< \brief (GMAC_PEFRS) Register Update */ -/* -------- GMAC_PEFRN : (GMAC Offset: 0x1FC) PTP Peer Event Frame Received Nanoseconds -------- */ -#define GMAC_PEFRN_RUD_Pos 0 -#define GMAC_PEFRN_RUD_Msk (0x3fffffffu << GMAC_PEFRN_RUD_Pos) /**< \brief (GMAC_PEFRN) Register Update */ -/* -------- GMAC_ISRPQ[7] : (GMAC Offset: 0x400) Interrupt Status Register Priority Queue -------- */ -#define GMAC_ISRPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_ISRPQ[7]) Receive Complete */ -#define GMAC_ISRPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_ISRPQ[7]) RX Used Bit Read */ -#define GMAC_ISRPQ_RLEX (0x1u << 5) /**< \brief (GMAC_ISRPQ[7]) Retry Limit Exceeded or Late Collision */ -#define GMAC_ISRPQ_TFC (0x1u << 6) /**< \brief (GMAC_ISRPQ[7]) Transmit Frame Corruption due to AHB error */ -#define GMAC_ISRPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_ISRPQ[7]) Transmit Complete */ -#define GMAC_ISRPQ_ROVR (0x1u << 10) /**< \brief (GMAC_ISRPQ[7]) Receive Overrun */ -#define GMAC_ISRPQ_HRESP (0x1u << 11) /**< \brief (GMAC_ISRPQ[7]) HRESP Not OK */ -/* -------- GMAC_TBQBAPQ[7] : (GMAC Offset: 0x440) Transmit Buffer Queue Base Address Priority Queue -------- */ -#define GMAC_TBQBAPQ_TXBQBA_Pos 2 -#define GMAC_TBQBAPQ_TXBQBA_Msk (0x3fu << GMAC_TBQBAPQ_TXBQBA_Pos) /**< \brief (GMAC_TBQBAPQ[7]) Transmit Buffer Queue Base Address */ -#define GMAC_TBQBAPQ_TXBQBA(value) ((GMAC_TBQBAPQ_TXBQBA_Msk & ((value) << GMAC_TBQBAPQ_TXBQBA_Pos))) -/* -------- GMAC_RBQBAPQ[7] : (GMAC Offset: 0x480) Receive Buffer Queue Base Address Priority Queue -------- */ -#define GMAC_RBQBAPQ_RXBQBA_Pos 2 -#define GMAC_RBQBAPQ_RXBQBA_Msk (0x3fu << GMAC_RBQBAPQ_RXBQBA_Pos) /**< \brief (GMAC_RBQBAPQ[7]) Receive Buffer Queue Base Address */ -#define GMAC_RBQBAPQ_RXBQBA(value) ((GMAC_RBQBAPQ_RXBQBA_Msk & ((value) << GMAC_RBQBAPQ_RXBQBA_Pos))) -/* -------- GMAC_RBSRPQ[7] : (GMAC Offset: 0x4A0) Receive Buffer Size Register Priority Queue -------- */ -#define GMAC_RBSRPQ_RBS_Pos 0 -#define GMAC_RBSRPQ_RBS_Msk (0xffffu << GMAC_RBSRPQ_RBS_Pos) /**< \brief (GMAC_RBSRPQ[7]) Receive Buffer Size */ -#define GMAC_RBSRPQ_RBS(value) ((GMAC_RBSRPQ_RBS_Msk & ((value) << GMAC_RBSRPQ_RBS_Pos))) -/* -------- GMAC_ST1RPQ[16] : (GMAC Offset: 0x500) Screening Type1 Register Priority Queue -------- */ -#define GMAC_ST1RPQ_QNB_Pos 0 -#define GMAC_ST1RPQ_QNB_Msk (0xfu << GMAC_ST1RPQ_QNB_Pos) /**< \brief (GMAC_ST1RPQ[16]) Que Number (0->7) */ -#define GMAC_ST1RPQ_QNB(value) ((GMAC_ST1RPQ_QNB_Msk & ((value) << GMAC_ST1RPQ_QNB_Pos))) -#define GMAC_ST1RPQ_DSTCM_Pos 4 -#define GMAC_ST1RPQ_DSTCM_Msk (0xffu << GMAC_ST1RPQ_DSTCM_Pos) /**< \brief (GMAC_ST1RPQ[16]) Differentiated Services or Traffic Class Match */ -#define GMAC_ST1RPQ_DSTCM(value) ((GMAC_ST1RPQ_DSTCM_Msk & ((value) << GMAC_ST1RPQ_DSTCM_Pos))) -#define GMAC_ST1RPQ_UDPM_Pos 12 -#define GMAC_ST1RPQ_UDPM_Msk (0xffffu << GMAC_ST1RPQ_UDPM_Pos) /**< \brief (GMAC_ST1RPQ[16]) UDP Port Match */ -#define GMAC_ST1RPQ_UDPM(value) ((GMAC_ST1RPQ_UDPM_Msk & ((value) << GMAC_ST1RPQ_UDPM_Pos))) -#define GMAC_ST1RPQ_DSTCE (0x1u << 28) /**< \brief (GMAC_ST1RPQ[16]) Differentiated Services or Traffic Class Match Enable */ -#define GMAC_ST1RPQ_UDPE (0x1u << 29) /**< \brief (GMAC_ST1RPQ[16]) UDP Port Match Enable */ -/* -------- GMAC_ST2RPQ[16] : (GMAC Offset: 0x540) Screening Type2 Register Priority Queue -------- */ -#define GMAC_ST2RPQ_QNB_Pos 0 -#define GMAC_ST2RPQ_QNB_Msk (0xfu << GMAC_ST2RPQ_QNB_Pos) /**< \brief (GMAC_ST2RPQ[16]) Que Number (0->7) */ -#define GMAC_ST2RPQ_QNB(value) ((GMAC_ST2RPQ_QNB_Msk & ((value) << GMAC_ST2RPQ_QNB_Pos))) -#define GMAC_ST2RPQ_VLANP_Pos 4 -#define GMAC_ST2RPQ_VLANP_Msk (0xfu << GMAC_ST2RPQ_VLANP_Pos) /**< \brief (GMAC_ST2RPQ[16]) VLAN Priority */ -#define GMAC_ST2RPQ_VLANP(value) ((GMAC_ST2RPQ_VLANP_Msk & ((value) << GMAC_ST2RPQ_VLANP_Pos))) -#define GMAC_ST2RPQ_VLANE (0x1u << 8) /**< \brief (GMAC_ST2RPQ[16]) VLAN Enable */ -/* -------- GMAC_IERPQ[7] : (GMAC Offset: 0x600) Interrupt Enable Register Priority Queue -------- */ -#define GMAC_IERPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_IERPQ[7]) Receive Complete */ -#define GMAC_IERPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_IERPQ[7]) RX Used Bit Read */ -#define GMAC_IERPQ_RLEX (0x1u << 5) /**< \brief (GMAC_IERPQ[7]) Retry Limit Exceeded or Late Collision */ -#define GMAC_IERPQ_TFC (0x1u << 6) /**< \brief (GMAC_IERPQ[7]) Transmit Frame Corruption due to AHB error */ -#define GMAC_IERPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_IERPQ[7]) Transmit Complete */ -#define GMAC_IERPQ_ROVR (0x1u << 10) /**< \brief (GMAC_IERPQ[7]) Receive Overrun */ -#define GMAC_IERPQ_HRESP (0x1u << 11) /**< \brief (GMAC_IERPQ[7]) HRESP Not OK */ -/* -------- GMAC_IDRPQ[7] : (GMAC Offset: 0x620) Interrupt Disable Register Priority Queue -------- */ -#define GMAC_IDRPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_IDRPQ[7]) Receive Complete */ -#define GMAC_IDRPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_IDRPQ[7]) RX Used Bit Read */ -#define GMAC_IDRPQ_RLEX (0x1u << 5) /**< \brief (GMAC_IDRPQ[7]) Retry Limit Exceeded or Late Collision */ -#define GMAC_IDRPQ_TFC (0x1u << 6) /**< \brief (GMAC_IDRPQ[7]) Transmit Frame Corruption due to AHB error */ -#define GMAC_IDRPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_IDRPQ[7]) Transmit Complete */ -#define GMAC_IDRPQ_ROVR (0x1u << 10) /**< \brief (GMAC_IDRPQ[7]) Receive Overrun */ -#define GMAC_IDRPQ_HRESP (0x1u << 11) /**< \brief (GMAC_IDRPQ[7]) HRESP Not OK */ -/* -------- GMAC_IMRPQ[7] : (GMAC Offset: 0x640) Interrupt Mask Register Priority Queue -------- */ -#define GMAC_IMRPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_IMRPQ[7]) Receive Complete */ -#define GMAC_IMRPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_IMRPQ[7]) RX Used Bit Read */ -#define GMAC_IMRPQ_RLEX (0x1u << 5) /**< \brief (GMAC_IMRPQ[7]) Retry Limit Exceeded or Late Collision */ -#define GMAC_IMRPQ_AHB (0x1u << 6) /**< \brief (GMAC_IMRPQ[7]) AHB Error */ -#define GMAC_IMRPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_IMRPQ[7]) Transmit Complete */ -#define GMAC_IMRPQ_ROVR (0x1u << 10) /**< \brief (GMAC_IMRPQ[7]) Receive Overrun */ -#define GMAC_IMRPQ_HRESP (0x1u << 11) /**< \brief (GMAC_IMRPQ[7]) HRESP Not OK */ - -/*@}*/ - - -#endif /* _SAM4E_GMAC_COMPONENT_ */ +/** + * \file + * + * Copyright (c) 2012 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + */ + +#ifndef _SAM4E_GMAC_COMPONENT_ +#define _SAM4E_GMAC_COMPONENT_ + +/* ============================================================================= */ +/** SOFTWARE API DEFINITION FOR Gigabit Ethernet MAC */ +/* ============================================================================= */ +/** \addtogroup SAM4E_GMAC Gigabit Ethernet MAC */ +/*@{*/ + +#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) +/** \brief GmacSa hardware registers */ +typedef struct { + RwReg GMAC_SAB; /**< \brief (GmacSa Offset: 0x0) Specific Address 1 Bottom [31:0] Register */ + RwReg GMAC_SAT; /**< \brief (GmacSa Offset: 0x4) Specific Address 1 Top [47:32] Register */ +} GmacSa; +/** \brief Gmac hardware registers */ +#define GMACSA_NUMBER 4 +typedef struct { + RwReg GMAC_NCR; /**< \brief (Gmac Offset: 0x000) Network Control Register */ + RwReg GMAC_NCFGR; /**< \brief (Gmac Offset: 0x004) Network Configuration Register */ + RoReg GMAC_NSR; /**< \brief (Gmac Offset: 0x008) Network Status Register */ + RwReg GMAC_UR; /**< \brief (Gmac Offset: 0x00C) User Register */ + RwReg GMAC_DCFGR; /**< \brief (Gmac Offset: 0x010) DMA Configuration Register */ + RwReg GMAC_TSR; /**< \brief (Gmac Offset: 0x014) Transmit Status Register */ + RwReg GMAC_RBQB; /**< \brief (Gmac Offset: 0x018) Receive Buffer Queue Base Address */ + RwReg GMAC_TBQB; /**< \brief (Gmac Offset: 0x01C) Transmit Buffer Queue Base Address */ + RwReg GMAC_RSR; /**< \brief (Gmac Offset: 0x020) Receive Status Register */ + RoReg GMAC_ISR; /**< \brief (Gmac Offset: 0x024) Interrupt Status Register */ + WoReg GMAC_IER; /**< \brief (Gmac Offset: 0x028) Interrupt Enable Register */ + WoReg GMAC_IDR; /**< \brief (Gmac Offset: 0x02C) Interrupt Disable Register */ + RoReg GMAC_IMR; /**< \brief (Gmac Offset: 0x030) Interrupt Mask Register */ + RwReg GMAC_MAN; /**< \brief (Gmac Offset: 0x034) PHY Maintenance Register */ + RoReg GMAC_RPQ; /**< \brief (Gmac Offset: 0x038) Received Pause Quantum Register */ + RwReg GMAC_TPQ; /**< \brief (Gmac Offset: 0x03C) Transmit Pause Quantum Register */ + RwReg GMAC_TPSF; /**< \brief (Gmac Offset: 0x040) TX Partial Store and Forward Register */ + RwReg GMAC_RPSF; /**< \brief (Gmac Offset: 0x044) RX Partial Store and Forward Register */ + RoReg Reserved1[14]; + RwReg GMAC_HRB; /**< \brief (Gmac Offset: 0x080) Hash Register Bottom [31:0] */ + RwReg GMAC_HRT; /**< \brief (Gmac Offset: 0x084) Hash Register Top [63:32] */ + GmacSa GMAC_SA[GMACSA_NUMBER]; /**< \brief (Gmac Offset: 0x088) 1 .. 4 */ + RwReg GMAC_TIDM[4]; /**< \brief (Gmac Offset: 0x0A8) Type ID Match 1 Register */ + RwReg GMAC_WOL; /**< \brief (Gmac Offset: 0x0B8) Wake on LAN Register */ + RwReg GMAC_IPGS; /**< \brief (Gmac Offset: 0x0BC) IPG Stretch Register */ + RwReg GMAC_SVLAN; /**< \brief (Gmac Offset: 0x0C0) Stacked VLAN Register */ + RwReg GMAC_TPFCP; /**< \brief (Gmac Offset: 0x0C4) Transmit PFC Pause Register */ + RwReg GMAC_SAMB1; /**< \brief (Gmac Offset: 0x0C8) Specific Address 1 Mask Bottom [31:0] Register */ + RwReg GMAC_SAMT1; /**< \brief (Gmac Offset: 0x0CC) Specific Address 1 Mask Top [47:32] Register */ + RoReg Reserved2[12]; + RoReg GMAC_OTLO; /**< \brief (Gmac Offset: 0x100) Octets Transmitted [31:0] Register */ + RoReg GMAC_OTHI; /**< \brief (Gmac Offset: 0x104) Octets Transmitted [47:32] Register */ + RoReg GMAC_FT; /**< \brief (Gmac Offset: 0x108) Frames Transmitted Register */ + RoReg GMAC_BCFT; /**< \brief (Gmac Offset: 0x10C) Broadcast Frames Transmitted Register */ + RoReg GMAC_MFT; /**< \brief (Gmac Offset: 0x110) Multicast Frames Transmitted Register */ + RoReg GMAC_PFT; /**< \brief (Gmac Offset: 0x114) Pause Frames Transmitted Register */ + RoReg GMAC_BFT64; /**< \brief (Gmac Offset: 0x118) 64 Byte Frames Transmitted Register */ + RoReg GMAC_TBFT127; /**< \brief (Gmac Offset: 0x11C) 65 to 127 Byte Frames Transmitted Register */ + RoReg GMAC_TBFT255; /**< \brief (Gmac Offset: 0x120) 128 to 255 Byte Frames Transmitted Register */ + RoReg GMAC_TBFT511; /**< \brief (Gmac Offset: 0x124) 256 to 511 Byte Frames Transmitted Register */ + RoReg GMAC_TBFT1023; /**< \brief (Gmac Offset: 0x128) 512 to 1023 Byte Frames Transmitted Register */ + RoReg GMAC_TBFT1518; /**< \brief (Gmac Offset: 0x12C) 1024 to 1518 Byte Frames Transmitted Register */ + RoReg GMAC_GTBFT1518; /**< \brief (Gmac Offset: 0x130) Greater Than 1518 Byte Frames Transmitted Register */ + RoReg GMAC_TUR; /**< \brief (Gmac Offset: 0x134) Transmit Under Runs Register */ + RoReg GMAC_SCF; /**< \brief (Gmac Offset: 0x138) Single Collision Frames Register */ + RoReg GMAC_MCF; /**< \brief (Gmac Offset: 0x13C) Multiple Collision Frames Register */ + RoReg GMAC_EC; /**< \brief (Gmac Offset: 0x140) Excessive Collisions Register */ + RoReg GMAC_LC; /**< \brief (Gmac Offset: 0x144) Late Collisions Register */ + RoReg GMAC_DTF; /**< \brief (Gmac Offset: 0x148) Deferred Transmission Frames Register */ + RoReg GMAC_CSE; /**< \brief (Gmac Offset: 0x14C) Carrier Sense Errors Register */ + RoReg GMAC_ORLO; /**< \brief (Gmac Offset: 0x150) Octets Received [31:0] Received */ + RoReg GMAC_ORHI; /**< \brief (Gmac Offset: 0x154) Octets Received [47:32] Received */ + RoReg GMAC_FR; /**< \brief (Gmac Offset: 0x158) Frames Received Register */ + RoReg GMAC_BCFR; /**< \brief (Gmac Offset: 0x15C) Broadcast Frames Received Register */ + RoReg GMAC_MFR; /**< \brief (Gmac Offset: 0x160) Multicast Frames Received Register */ + RoReg GMAC_PFR; /**< \brief (Gmac Offset: 0x164) Pause Frames Received Register */ + RoReg GMAC_BFR64; /**< \brief (Gmac Offset: 0x168) 64 Byte Frames Received Register */ + RoReg GMAC_TBFR127; /**< \brief (Gmac Offset: 0x16C) 65 to 127 Byte Frames Received Register */ + RoReg GMAC_TBFR255; /**< \brief (Gmac Offset: 0x170) 128 to 255 Byte Frames Received Register */ + RoReg GMAC_TBFR511; /**< \brief (Gmac Offset: 0x174) 256 to 511Byte Frames Received Register */ + RoReg GMAC_TBFR1023; /**< \brief (Gmac Offset: 0x178) 512 to 1023 Byte Frames Received Register */ + RoReg GMAC_TBFR1518; /**< \brief (Gmac Offset: 0x17C) 1024 to 1518 Byte Frames Received Register */ + RoReg GMAC_TMXBFR; /**< \brief (Gmac Offset: 0x180) 1519 to Maximum Byte Frames Received Register */ + RoReg GMAC_UFR; /**< \brief (Gmac Offset: 0x184) Undersize Frames Received Register */ + RoReg GMAC_OFR; /**< \brief (Gmac Offset: 0x188) Oversize Frames Received Register */ + RoReg GMAC_JR; /**< \brief (Gmac Offset: 0x18C) Jabbers Received Register */ + RoReg GMAC_FCSE; /**< \brief (Gmac Offset: 0x190) Frame Check Sequence Errors Register */ + RoReg GMAC_LFFE; /**< \brief (Gmac Offset: 0x194) Length Field Frame Errors Register */ + RoReg GMAC_RSE; /**< \brief (Gmac Offset: 0x198) Receive Symbol Errors Register */ + RoReg GMAC_AE; /**< \brief (Gmac Offset: 0x19C) Alignment Errors Register */ + RoReg GMAC_RRE; /**< \brief (Gmac Offset: 0x1A0) Receive Resource Errors Register */ + RoReg GMAC_ROE; /**< \brief (Gmac Offset: 0x1A4) Receive Overrun Register */ + RoReg GMAC_IHCE; /**< \brief (Gmac Offset: 0x1A8) IP Header Checksum Errors Register */ + RoReg GMAC_TCE; /**< \brief (Gmac Offset: 0x1AC) TCP Checksum Errors Register */ + RoReg GMAC_UCE; /**< \brief (Gmac Offset: 0x1B0) UDP Checksum Errors Register */ + RoReg Reserved3[5]; + RwReg GMAC_TSSS; /**< \brief (Gmac Offset: 0x1C8) 1588 Timer Sync Strobe Seconds Register */ + RwReg GMAC_TSSN; /**< \brief (Gmac Offset: 0x1CC) 1588 Timer Sync Strobe Nanoseconds Register */ + RwReg GMAC_TS; /**< \brief (Gmac Offset: 0x1D0) 1588 Timer Seconds Register */ + RwReg GMAC_TN; /**< \brief (Gmac Offset: 0x1D4) 1588 Timer Nanoseconds Register */ + WoReg GMAC_TA; /**< \brief (Gmac Offset: 0x1D8) 1588 Timer Adjust Register */ + RwReg GMAC_TI; /**< \brief (Gmac Offset: 0x1DC) 1588 Timer Increment Register */ + RoReg GMAC_EFTS; /**< \brief (Gmac Offset: 0x1E0) PTP Event Frame Transmitted Seconds */ + RoReg GMAC_EFTN; /**< \brief (Gmac Offset: 0x1E4) PTP Event Frame Transmitted Nanoseconds */ + RoReg GMAC_EFRS; /**< \brief (Gmac Offset: 0x1E8) PTP Event Frame Received Seconds */ + RoReg GMAC_EFRN; /**< \brief (Gmac Offset: 0x1EC) PTP Event Frame Received Nanoseconds */ + RoReg GMAC_PEFTS; /**< \brief (Gmac Offset: 0x1F0) PTP Peer Event Frame Transmitted Seconds */ + RoReg GMAC_PEFTN; /**< \brief (Gmac Offset: 0x1F4) PTP Peer Event Frame Transmitted Nanoseconds */ + RoReg GMAC_PEFRS; /**< \brief (Gmac Offset: 0x1F8) PTP Peer Event Frame Received Seconds */ + RoReg GMAC_PEFRN; /**< \brief (Gmac Offset: 0x1FC) PTP Peer Event Frame Received Nanoseconds */ + RoReg Reserved4[128]; + RoReg GMAC_ISRPQ[7]; /**< \brief (Gmac Offset: 0x400) Interrupt Status Register Priority Queue */ + RoReg Reserved5[9]; + RwReg GMAC_TBQBAPQ[7]; /**< \brief (Gmac Offset: 0x440) Transmit Buffer Queue Base Address Priority Queue */ + RoReg Reserved6[9]; + RwReg GMAC_RBQBAPQ[7]; /**< \brief (Gmac Offset: 0x480) Receive Buffer Queue Base Address Priority Queue */ + RoReg Reserved7[1]; + RwReg GMAC_RBSRPQ[7]; /**< \brief (Gmac Offset: 0x4A0) Receive Buffer Size Register Priority Queue */ + RoReg Reserved8[17]; + RwReg GMAC_ST1RPQ[16]; /**< \brief (Gmac Offset: 0x500) Screening Type1 Register Priority Queue */ + RwReg GMAC_ST2RPQ[16]; /**< \brief (Gmac Offset: 0x540) Screening Type2 Register Priority Queue */ + RoReg Reserved9[32]; + WoReg GMAC_IERPQ[7]; /**< \brief (Gmac Offset: 0x600) Interrupt Enable Register Priority Queue */ + RoReg Reserved10[1]; + WoReg GMAC_IDRPQ[7]; /**< \brief (Gmac Offset: 0x620) Interrupt Disable Register Priority Queue */ + RoReg Reserved11[1]; + RwReg GMAC_IMRPQ[7]; /**< \brief (Gmac Offset: 0x640) Interrupt Mask Register Priority Queue */ +} Gmac; +#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ +/* -------- GMAC_NCR : (GMAC Offset: 0x000) Network Control Register -------- */ +#define GMAC_NCR_LB (0x1u << 0) /**< \brief (GMAC_NCR) Loop Back */ +#define GMAC_NCR_LBL (0x1u << 1) /**< \brief (GMAC_NCR) Loop Back Local */ +#define GMAC_NCR_RXEN (0x1u << 2) /**< \brief (GMAC_NCR) Receive Enable */ +#define GMAC_NCR_TXEN (0x1u << 3) /**< \brief (GMAC_NCR) Transmit Enable */ +#define GMAC_NCR_MPE (0x1u << 4) /**< \brief (GMAC_NCR) Management Port Enable */ +#define GMAC_NCR_CLRSTAT (0x1u << 5) /**< \brief (GMAC_NCR) Clear Statistics Registers */ +#define GMAC_NCR_INCSTAT (0x1u << 6) /**< \brief (GMAC_NCR) Increment Statistics Registers */ +#define GMAC_NCR_WESTAT (0x1u << 7) /**< \brief (GMAC_NCR) Write Enable for Statistics Registers */ +#define GMAC_NCR_BP (0x1u << 8) /**< \brief (GMAC_NCR) Back pressure */ +#define GMAC_NCR_TSTART (0x1u << 9) /**< \brief (GMAC_NCR) Start Transmission */ +#define GMAC_NCR_THALT (0x1u << 10) /**< \brief (GMAC_NCR) Transmit Halt */ +#define GMAC_NCR_TXPF (0x1u << 11) /**< \brief (GMAC_NCR) Transmit Pause Frame */ +#define GMAC_NCR_TXZQPF (0x1u << 12) /**< \brief (GMAC_NCR) Transmit Zero Quantum Pause Frame */ +#define GMAC_NCR_RDS (0x1u << 14) /**< \brief (GMAC_NCR) Read Snapshot */ +#define GMAC_NCR_SRTSM (0x1u << 15) /**< \brief (GMAC_NCR) Store Receive Time Stamp to Memory */ +#define GMAC_NCR_ENPBPR (0x1u << 16) /**< \brief (GMAC_NCR) Enable PFC Priority-based Pause Reception */ +#define GMAC_NCR_TXPBPF (0x1u << 17) /**< \brief (GMAC_NCR) Transmit PFC Priority-based Pause Frame */ +#define GMAC_NCR_FNP (0x1u << 18) /**< \brief (GMAC_NCR) Flush Next Packet */ +/* -------- GMAC_NCFGR : (GMAC Offset: 0x004) Network Configuration Register -------- */ +#define GMAC_NCFGR_SPD (0x1u << 0) /**< \brief (GMAC_NCFGR) Speed */ +#define GMAC_NCFGR_FD (0x1u << 1) /**< \brief (GMAC_NCFGR) Full Duplex */ +#define GMAC_NCFGR_DNVLAN (0x1u << 2) /**< \brief (GMAC_NCFGR) Discard Non-VLAN FRAMES */ +#define GMAC_NCFGR_JFRAME (0x1u << 3) /**< \brief (GMAC_NCFGR) Jumbo Frame Size */ +#define GMAC_NCFGR_CAF (0x1u << 4) /**< \brief (GMAC_NCFGR) Copy All Frames */ +#define GMAC_NCFGR_NBC (0x1u << 5) /**< \brief (GMAC_NCFGR) No Broadcast */ +#define GMAC_NCFGR_MTIHEN (0x1u << 6) /**< \brief (GMAC_NCFGR) Multicast Hash Enable */ +#define GMAC_NCFGR_UNIHEN (0x1u << 7) /**< \brief (GMAC_NCFGR) Unicast Hash Enable */ +#define GMAC_NCFGR_MAXFS (0x1u << 8) /**< \brief (GMAC_NCFGR) 1536 Maximum Frame Size */ +#define GMAC_NCFGR_GBE (0x1u << 10) /**< \brief (GMAC_NCFGR) Gigabit Mode Enable */ +#define GMAC_NCFGR_PIS (0x1u << 11) /**< \brief (GMAC_NCFGR) Physical Interface Select */ +#define GMAC_NCFGR_RTY (0x1u << 12) /**< \brief (GMAC_NCFGR) Retry Test */ +#define GMAC_NCFGR_PEN (0x1u << 13) /**< \brief (GMAC_NCFGR) Pause Enable */ +#define GMAC_NCFGR_RXBUFO_Pos 14 +#define GMAC_NCFGR_RXBUFO_Msk (0x3u << GMAC_NCFGR_RXBUFO_Pos) /**< \brief (GMAC_NCFGR) Receive Buffer Offset */ +#define GMAC_NCFGR_RXBUFO(value) ((GMAC_NCFGR_RXBUFO_Msk & ((value) << GMAC_NCFGR_RXBUFO_Pos))) +#define GMAC_NCFGR_LFERD (0x1u << 16) /**< \brief (GMAC_NCFGR) Length Field Error Frame Discard */ +#define GMAC_NCFGR_RFCS (0x1u << 17) /**< \brief (GMAC_NCFGR) Remove FCS */ +#define GMAC_NCFGR_CLK_Pos 18 +#define GMAC_NCFGR_CLK_Msk (0x7u << GMAC_NCFGR_CLK_Pos) /**< \brief (GMAC_NCFGR) MDC CLock Division */ +#define GMAC_NCFGR_CLK_MCK_8 (0x0u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 8 (MCK up to 20 MHz) */ +#define GMAC_NCFGR_CLK_MCK_16 (0x1u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 16 (MCK up to 40 MHz) */ +#define GMAC_NCFGR_CLK_MCK_32 (0x2u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 32 (MCK up to 80 MHz) */ +#define GMAC_NCFGR_CLK_MCK_48 (0x3u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 48 (MCK up to 120MHz) */ +#define GMAC_NCFGR_CLK_MCK_64 (0x4u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 64 (MCK up to 160 MHz) */ +#define GMAC_NCFGR_CLK_MCK_96 (0x5u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 96 (MCK up to 240 MHz) */ +#define GMAC_NCFGR_CLK_MCK_128 (0x6u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 128 (MCK up to 320 MHz) */ +#define GMAC_NCFGR_CLK_MCK_224 (0x7u << 18) /**< \brief (GMAC_NCFGR) MCK divided by 224 (MCK up to 540 MHz) */ +#define GMAC_NCFGR_DBW_Pos 21 +#define GMAC_NCFGR_DBW_Msk (0x3u << GMAC_NCFGR_DBW_Pos) /**< \brief (GMAC_NCFGR) Data Bus Width */ +#define GMAC_NCFGR_DBW_DBW32 (0x0u << 21) /**< \brief (GMAC_NCFGR) 32-bit data bus width */ +#define GMAC_NCFGR_DBW_DBW64 (0x1u << 21) /**< \brief (GMAC_NCFGR) 64-bit data bus width */ +#define GMAC_NCFGR_DCPF (0x1u << 23) /**< \brief (GMAC_NCFGR) Disable Copy of Pause Frames */ +#define GMAC_NCFGR_RXCOEN (0x1u << 24) /**< \brief (GMAC_NCFGR) Receive Checksum Offload Enable */ +#define GMAC_NCFGR_EFRHD (0x1u << 25) /**< \brief (GMAC_NCFGR) Enable Frames Received in Half Duplex */ +#define GMAC_NCFGR_IRXFCS (0x1u << 26) /**< \brief (GMAC_NCFGR) Ignore RX FCS */ +#define GMAC_NCFGR_IPGSEN (0x1u << 28) /**< \brief (GMAC_NCFGR) IP Stretch Enable */ +#define GMAC_NCFGR_RXBP (0x1u << 29) /**< \brief (GMAC_NCFGR) Receive Bad Preamble */ +#define GMAC_NCFGR_IRXER (0x1u << 30) /**< \brief (GMAC_NCFGR) Ignore IPG rx_er */ +/* -------- GMAC_NSR : (GMAC Offset: 0x008) Network Status Register -------- */ +#define GMAC_NSR_MDIO (0x1u << 1) /**< \brief (GMAC_NSR) MDIO Input Status */ +#define GMAC_NSR_IDLE (0x1u << 2) /**< \brief (GMAC_NSR) PHY Management Logic Idle */ +/* -------- GMAC_UR : (GMAC Offset: 0x00C) User Register -------- */ +#define GMAC_UR_RGMII (0x1u << 0) /**< \brief (GMAC_UR) RGMII Mode */ +#define GMAC_UR_HDFC (0x1u << 6) /**< \brief (GMAC_UR) Half Duplex Flow Control */ +#define GMAC_UR_BPDG (0x1u << 7) /**< \brief (GMAC_UR) BPDG Bypass Deglitchers */ +/* -------- GMAC_DCFGR : (GMAC Offset: 0x010) DMA Configuration Register -------- */ +#define GMAC_DCFGR_FBLDO_Pos 0 +#define GMAC_DCFGR_FBLDO_Msk (0x1fu << GMAC_DCFGR_FBLDO_Pos) /**< \brief (GMAC_DCFGR) Fixed Burst Length for DMA Data Operations: */ +#define GMAC_DCFGR_FBLDO_SINGLE (0x1u << 0) /**< \brief (GMAC_DCFGR) 00001: Always use SINGLE AHB bursts */ +#define GMAC_DCFGR_FBLDO_INCR4 (0x4u << 0) /**< \brief (GMAC_DCFGR) 001xx: Attempt to use INCR4 AHB bursts (Default) */ +#define GMAC_DCFGR_FBLDO_INCR8 (0x8u << 0) /**< \brief (GMAC_DCFGR) 01xxx: Attempt to use INCR8 AHB bursts */ +#define GMAC_DCFGR_FBLDO_INCR16 (0x10u << 0) /**< \brief (GMAC_DCFGR) 1xxxx: Attempt to use INCR16 AHB bursts */ +#define GMAC_DCFGR_ESMA (0x1u << 6) /**< \brief (GMAC_DCFGR) Endian Swap Mode Enable for Management Descriptor Accesses */ +#define GMAC_DCFGR_ESPA (0x1u << 7) /**< \brief (GMAC_DCFGR) Endian Swap Mode Enable for Packet Data Accesses */ +#define GMAC_DCFGR_RXBMS_Pos 8 +#define GMAC_DCFGR_RXBMS_Msk (0x3u << GMAC_DCFGR_RXBMS_Pos) /**< \brief (GMAC_DCFGR) Receiver Packet Buffer Memory Size Select */ +#define GMAC_DCFGR_RXBMS_EIGHTH (0x0u << 8) /**< \brief (GMAC_DCFGR) 1 Kbyte Memory Size */ +#define GMAC_DCFGR_RXBMS_QUARTER (0x1u << 8) /**< \brief (GMAC_DCFGR) 2 Kbytes Memory Size */ +#define GMAC_DCFGR_RXBMS_HALF (0x2u << 8) /**< \brief (GMAC_DCFGR) 4 Kbytes Memory Size */ +#define GMAC_DCFGR_RXBMS_FULL (0x3u << 8) /**< \brief (GMAC_DCFGR) 8 Kbytes Memory Size */ +#define GMAC_DCFGR_TXPBMS (0x1u << 10) /**< \brief (GMAC_DCFGR) Transmitter Packet Buffer Memory Size Select */ +#define GMAC_DCFGR_TXCOEN (0x1u << 11) /**< \brief (GMAC_DCFGR) Transmitter Checksum Generation Offload Enable */ +#define GMAC_DCFGR_DRBS_Pos 16 +#define GMAC_DCFGR_DRBS_Msk (0xffu << GMAC_DCFGR_DRBS_Pos) /**< \brief (GMAC_DCFGR) DMA Receive Buffer Size */ +#define GMAC_DCFGR_DRBS(value) ((GMAC_DCFGR_DRBS_Msk & ((value) << GMAC_DCFGR_DRBS_Pos))) +#define GMAC_DCFGR_DDRP (0x1u << 24) /**< \brief (GMAC_DCFGR) DMA Discard Receive Packets */ +/* -------- GMAC_TSR : (GMAC Offset: 0x014) Transmit Status Register -------- */ +#define GMAC_TSR_UBR (0x1u << 0) /**< \brief (GMAC_TSR) Used Bit Read */ +#define GMAC_TSR_COL (0x1u << 1) /**< \brief (GMAC_TSR) Collision Occurred */ +#define GMAC_TSR_RLE (0x1u << 2) /**< \brief (GMAC_TSR) Retry Limit Exceeded */ +#define GMAC_TSR_TXGO (0x1u << 3) /**< \brief (GMAC_TSR) Transmit Go */ +#define GMAC_TSR_TFC (0x1u << 4) /**< \brief (GMAC_TSR) Transmit Frame Corruption due to AHB error */ +#define GMAC_TSR_TXCOMP (0x1u << 5) /**< \brief (GMAC_TSR) Transmit Complete */ +#define GMAC_TSR_UND (0x1u << 6) /**< \brief (GMAC_TSR) Transmit Under Run */ +#define GMAC_TSR_LCO (0x1u << 7) /**< \brief (GMAC_TSR) Late Collision Occurred */ +#define GMAC_TSR_HRESP (0x1u << 8) /**< \brief (GMAC_TSR) HRESP Not OK */ +/* -------- GMAC_RBQB : (GMAC Offset: 0x018) Receive Buffer Queue Base Address -------- */ +#define GMAC_RBQB_ADDR_Pos 2 +#define GMAC_RBQB_ADDR_Msk (0x3fffffffu << GMAC_RBQB_ADDR_Pos) /**< \brief (GMAC_RBQB) Receive buffer queue base address */ +#define GMAC_RBQB_ADDR(value) ((GMAC_RBQB_ADDR_Msk & ((value) << GMAC_RBQB_ADDR_Pos))) +/* -------- GMAC_TBQB : (GMAC Offset: 0x01C) Transmit Buffer Queue Base Address -------- */ +#define GMAC_TBQB_ADDR_Pos 2 +#define GMAC_TBQB_ADDR_Msk (0x3fffffffu << GMAC_TBQB_ADDR_Pos) /**< \brief (GMAC_TBQB) Transmit Buffer Queue Base Address */ +#define GMAC_TBQB_ADDR(value) ((GMAC_TBQB_ADDR_Msk & ((value) << GMAC_TBQB_ADDR_Pos))) +/* -------- GMAC_RSR : (GMAC Offset: 0x020) Receive Status Register -------- */ +#define GMAC_RSR_BNA (0x1u << 0) /**< \brief (GMAC_RSR) Buffer Not Available */ +#define GMAC_RSR_REC (0x1u << 1) /**< \brief (GMAC_RSR) Frame Received */ +#define GMAC_RSR_RXOVR (0x1u << 2) /**< \brief (GMAC_RSR) Receive Overrun */ +#define GMAC_RSR_HNO (0x1u << 3) /**< \brief (GMAC_RSR) HRESP Not OK */ +/* -------- GMAC_ISR : (GMAC Offset: 0x024) Interrupt Status Register -------- */ +#define GMAC_ISR_MFS (0x1u << 0) /**< \brief (GMAC_ISR) Management Frame Sent */ +#define GMAC_ISR_RCOMP (0x1u << 1) /**< \brief (GMAC_ISR) Receive Complete */ +#define GMAC_ISR_RXUBR (0x1u << 2) /**< \brief (GMAC_ISR) RX Used Bit Read */ +#define GMAC_ISR_TXUBR (0x1u << 3) /**< \brief (GMAC_ISR) TX Used Bit Read */ +#define GMAC_ISR_TUR (0x1u << 4) /**< \brief (GMAC_ISR) Transmit Under Run */ +#define GMAC_ISR_RLEX (0x1u << 5) /**< \brief (GMAC_ISR) Retry Limit Exceeded or Late Collision */ +#define GMAC_ISR_TFC (0x1u << 6) /**< \brief (GMAC_ISR) Transmit Frame Corruption due to AHB error */ +#define GMAC_ISR_TCOMP (0x1u << 7) /**< \brief (GMAC_ISR) Transmit Complete */ +#define GMAC_ISR_ROVR (0x1u << 10) /**< \brief (GMAC_ISR) Receive Overrun */ +#define GMAC_ISR_HRESP (0x1u << 11) /**< \brief (GMAC_ISR) HRESP Not OK */ +#define GMAC_ISR_PFNZ (0x1u << 12) /**< \brief (GMAC_ISR) Pause Frame with Non-zero Pause Quantum Received */ +#define GMAC_ISR_PTZ (0x1u << 13) /**< \brief (GMAC_ISR) Pause Time Zero */ +#define GMAC_ISR_PFTR (0x1u << 14) /**< \brief (GMAC_ISR) Pause Frame Transmitted */ +#define GMAC_ISR_EXINT (0x1u << 15) /**< \brief (GMAC_ISR) External Interrupt */ +#define GMAC_ISR_DRQFR (0x1u << 18) /**< \brief (GMAC_ISR) PTP Delay Request Frame Received */ +#define GMAC_ISR_SFR (0x1u << 19) /**< \brief (GMAC_ISR) PTP Sync Frame Received */ +#define GMAC_ISR_DRQFT (0x1u << 20) /**< \brief (GMAC_ISR) PTP Delay Request Frame Transmitted */ +#define GMAC_ISR_SFT (0x1u << 21) /**< \brief (GMAC_ISR) PTP Sync Frame Transmitted */ +#define GMAC_ISR_PDRQFR (0x1u << 22) /**< \brief (GMAC_ISR) PDelay Request Frame Received */ +#define GMAC_ISR_PDRSFR (0x1u << 23) /**< \brief (GMAC_ISR) PDelay Response Frame Received */ +#define GMAC_ISR_PDRQFT (0x1u << 24) /**< \brief (GMAC_ISR) PDelay Request Frame Transmitted */ +#define GMAC_ISR_PDRSFT (0x1u << 25) /**< \brief (GMAC_ISR) PDelay Response Frame Transmitted */ +#define GMAC_ISR_SRI (0x1u << 26) /**< \brief (GMAC_ISR) TSU Seconds Register Increment */ +#define GMAC_ISR_WOL (0x1u << 28) /**< \brief (GMAC_ISR) Wake On LAN */ +/* -------- GMAC_IER : (GMAC Offset: 0x028) Interrupt Enable Register -------- */ +#define GMAC_IER_MFS (0x1u << 0) /**< \brief (GMAC_IER) Management Frame Sent */ +#define GMAC_IER_RCOMP (0x1u << 1) /**< \brief (GMAC_IER) Receive Complete */ +#define GMAC_IER_RXUBR (0x1u << 2) /**< \brief (GMAC_IER) RX Used Bit Read */ +#define GMAC_IER_TXUBR (0x1u << 3) /**< \brief (GMAC_IER) TX Used Bit Read */ +#define GMAC_IER_TUR (0x1u << 4) /**< \brief (GMAC_IER) Transmit Under Run */ +#define GMAC_IER_RLEX (0x1u << 5) /**< \brief (GMAC_IER) Retry Limit Exceeded or Late Collision */ +#define GMAC_IER_TFC (0x1u << 6) /**< \brief (GMAC_IER) Transmit Frame Corruption due to AHB error */ +#define GMAC_IER_TCOMP (0x1u << 7) /**< \brief (GMAC_IER) Transmit Complete */ +#define GMAC_IER_ROVR (0x1u << 10) /**< \brief (GMAC_IER) Receive Overrun */ +#define GMAC_IER_HRESP (0x1u << 11) /**< \brief (GMAC_IER) HRESP Not OK */ +#define GMAC_IER_PFNZ (0x1u << 12) /**< \brief (GMAC_IER) Pause Frame with Non-zero Pause Quantum Received */ +#define GMAC_IER_PTZ (0x1u << 13) /**< \brief (GMAC_IER) Pause Time Zero */ +#define GMAC_IER_PFTR (0x1u << 14) /**< \brief (GMAC_IER) Pause Frame Transmitted */ +#define GMAC_IER_EXINT (0x1u << 15) /**< \brief (GMAC_IER) External Interrupt */ +#define GMAC_IER_DRQFR (0x1u << 18) /**< \brief (GMAC_IER) PTP Delay Request Frame Received */ +#define GMAC_IER_SFR (0x1u << 19) /**< \brief (GMAC_IER) PTP Sync Frame Received */ +#define GMAC_IER_DRQFT (0x1u << 20) /**< \brief (GMAC_IER) PTP Delay Request Frame Transmitted */ +#define GMAC_IER_SFT (0x1u << 21) /**< \brief (GMAC_IER) PTP Sync Frame Transmitted */ +#define GMAC_IER_PDRQFR (0x1u << 22) /**< \brief (GMAC_IER) PDelay Request Frame Received */ +#define GMAC_IER_PDRSFR (0x1u << 23) /**< \brief (GMAC_IER) PDelay Response Frame Received */ +#define GMAC_IER_PDRQFT (0x1u << 24) /**< \brief (GMAC_IER) PDelay Request Frame Transmitted */ +#define GMAC_IER_PDRSFT (0x1u << 25) /**< \brief (GMAC_IER) PDelay Response Frame Transmitted */ +#define GMAC_IER_SRI (0x1u << 26) /**< \brief (GMAC_IER) TSU Seconds Register Increment */ +#define GMAC_IER_WOL (0x1u << 28) /**< \brief (GMAC_IER) Wake On LAN */ +/* -------- GMAC_IDR : (GMAC Offset: 0x02C) Interrupt Disable Register -------- */ +#define GMAC_IDR_MFS (0x1u << 0) /**< \brief (GMAC_IDR) Management Frame Sent */ +#define GMAC_IDR_RCOMP (0x1u << 1) /**< \brief (GMAC_IDR) Receive Complete */ +#define GMAC_IDR_RXUBR (0x1u << 2) /**< \brief (GMAC_IDR) RX Used Bit Read */ +#define GMAC_IDR_TXUBR (0x1u << 3) /**< \brief (GMAC_IDR) TX Used Bit Read */ +#define GMAC_IDR_TUR (0x1u << 4) /**< \brief (GMAC_IDR) Transmit Under Run */ +#define GMAC_IDR_RLEX (0x1u << 5) /**< \brief (GMAC_IDR) Retry Limit Exceeded or Late Collision */ +#define GMAC_IDR_TFC (0x1u << 6) /**< \brief (GMAC_IDR) Transmit Frame Corruption due to AHB error */ +#define GMAC_IDR_TCOMP (0x1u << 7) /**< \brief (GMAC_IDR) Transmit Complete */ +#define GMAC_IDR_ROVR (0x1u << 10) /**< \brief (GMAC_IDR) Receive Overrun */ +#define GMAC_IDR_HRESP (0x1u << 11) /**< \brief (GMAC_IDR) HRESP Not OK */ +#define GMAC_IDR_PFNZ (0x1u << 12) /**< \brief (GMAC_IDR) Pause Frame with Non-zero Pause Quantum Received */ +#define GMAC_IDR_PTZ (0x1u << 13) /**< \brief (GMAC_IDR) Pause Time Zero */ +#define GMAC_IDR_PFTR (0x1u << 14) /**< \brief (GMAC_IDR) Pause Frame Transmitted */ +#define GMAC_IDR_EXINT (0x1u << 15) /**< \brief (GMAC_IDR) External Interrupt */ +#define GMAC_IDR_DRQFR (0x1u << 18) /**< \brief (GMAC_IDR) PTP Delay Request Frame Received */ +#define GMAC_IDR_SFR (0x1u << 19) /**< \brief (GMAC_IDR) PTP Sync Frame Received */ +#define GMAC_IDR_DRQFT (0x1u << 20) /**< \brief (GMAC_IDR) PTP Delay Request Frame Transmitted */ +#define GMAC_IDR_SFT (0x1u << 21) /**< \brief (GMAC_IDR) PTP Sync Frame Transmitted */ +#define GMAC_IDR_PDRQFR (0x1u << 22) /**< \brief (GMAC_IDR) PDelay Request Frame Received */ +#define GMAC_IDR_PDRSFR (0x1u << 23) /**< \brief (GMAC_IDR) PDelay Response Frame Received */ +#define GMAC_IDR_PDRQFT (0x1u << 24) /**< \brief (GMAC_IDR) PDelay Request Frame Transmitted */ +#define GMAC_IDR_PDRSFT (0x1u << 25) /**< \brief (GMAC_IDR) PDelay Response Frame Transmitted */ +#define GMAC_IDR_SRI (0x1u << 26) /**< \brief (GMAC_IDR) TSU Seconds Register Increment */ +#define GMAC_IDR_WOL (0x1u << 28) /**< \brief (GMAC_IDR) Wake On LAN */ +/* -------- GMAC_IMR : (GMAC Offset: 0x030) Interrupt Mask Register -------- */ +#define GMAC_IMR_MFS (0x1u << 0) /**< \brief (GMAC_IMR) Management Frame Sent */ +#define GMAC_IMR_RCOMP (0x1u << 1) /**< \brief (GMAC_IMR) Receive Complete */ +#define GMAC_IMR_RXUBR (0x1u << 2) /**< \brief (GMAC_IMR) RX Used Bit Read */ +#define GMAC_IMR_TXUBR (0x1u << 3) /**< \brief (GMAC_IMR) TX Used Bit Read */ +#define GMAC_IMR_TUR (0x1u << 4) /**< \brief (GMAC_IMR) Transmit Under Run */ +#define GMAC_IMR_RLEX (0x1u << 5) /**< \brief (GMAC_IMR) Retry Limit Exceeded or Late Collision */ +#define GMAC_IMR_TFC (0x1u << 6) /**< \brief (GMAC_IMR) Transmit Frame Corruption due to AHB error */ +#define GMAC_IMR_TCOMP (0x1u << 7) /**< \brief (GMAC_IMR) Transmit Complete */ +#define GMAC_IMR_ROVR (0x1u << 10) /**< \brief (GMAC_IMR) Receive Overrun */ +#define GMAC_IMR_HRESP (0x1u << 11) /**< \brief (GMAC_IMR) HRESP Not OK */ +#define GMAC_IMR_PFNZ (0x1u << 12) /**< \brief (GMAC_IMR) Pause Frame with Non-zero Pause Quantum Received */ +#define GMAC_IMR_PTZ (0x1u << 13) /**< \brief (GMAC_IMR) Pause Time Zero */ +#define GMAC_IMR_PFTR (0x1u << 14) /**< \brief (GMAC_IMR) Pause Frame Transmitted */ +#define GMAC_IMR_EXINT (0x1u << 15) /**< \brief (GMAC_IMR) External Interrupt */ +#define GMAC_IMR_DRQFR (0x1u << 18) /**< \brief (GMAC_IMR) PTP Delay Request Frame Received */ +#define GMAC_IMR_SFR (0x1u << 19) /**< \brief (GMAC_IMR) PTP Sync Frame Received */ +#define GMAC_IMR_DRQFT (0x1u << 20) /**< \brief (GMAC_IMR) PTP Delay Request Frame Transmitted */ +#define GMAC_IMR_SFT (0x1u << 21) /**< \brief (GMAC_IMR) PTP Sync Frame Transmitted */ +#define GMAC_IMR_PDRQFR (0x1u << 22) /**< \brief (GMAC_IMR) PDelay Request Frame Received */ +#define GMAC_IMR_PDRSFR (0x1u << 23) /**< \brief (GMAC_IMR) PDelay Response Frame Received */ +#define GMAC_IMR_PDRQFT (0x1u << 24) /**< \brief (GMAC_IMR) PDelay Request Frame Transmitted */ +#define GMAC_IMR_PDRSFT (0x1u << 25) /**< \brief (GMAC_IMR) PDelay Response Frame Transmitted */ +/* -------- GMAC_MAN : (GMAC Offset: 0x034) PHY Maintenance Register -------- */ +#define GMAC_MAN_DATA_Pos 0 +#define GMAC_MAN_DATA_Msk (0xffffu << GMAC_MAN_DATA_Pos) /**< \brief (GMAC_MAN) PHY Data */ +#define GMAC_MAN_DATA(value) ((GMAC_MAN_DATA_Msk & ((value) << GMAC_MAN_DATA_Pos))) +#define GMAC_MAN_WTN_Pos 16 +#define GMAC_MAN_WTN_Msk (0x3u << GMAC_MAN_WTN_Pos) /**< \brief (GMAC_MAN) Write Ten */ +#define GMAC_MAN_WTN(value) ((GMAC_MAN_WTN_Msk & ((value) << GMAC_MAN_WTN_Pos))) +#define GMAC_MAN_REGA_Pos 18 +#define GMAC_MAN_REGA_Msk (0x1fu << GMAC_MAN_REGA_Pos) /**< \brief (GMAC_MAN) Register Address */ +#define GMAC_MAN_REGA(value) ((GMAC_MAN_REGA_Msk & ((value) << GMAC_MAN_REGA_Pos))) +#define GMAC_MAN_PHYA_Pos 23 +#define GMAC_MAN_PHYA_Msk (0x1fu << GMAC_MAN_PHYA_Pos) /**< \brief (GMAC_MAN) PHY Address */ +#define GMAC_MAN_PHYA(value) ((GMAC_MAN_PHYA_Msk & ((value) << GMAC_MAN_PHYA_Pos))) +#define GMAC_MAN_OP_Pos 28 +#define GMAC_MAN_OP_Msk (0x3u << GMAC_MAN_OP_Pos) /**< \brief (GMAC_MAN) Operation */ +#define GMAC_MAN_OP(value) ((GMAC_MAN_OP_Msk & ((value) << GMAC_MAN_OP_Pos))) +#define GMAC_MAN_CLTTO (0x1u << 30) /**< \brief (GMAC_MAN) Clause 22 Operation */ +#define GMAC_MAN_WZO (0x1u << 31) /**< \brief (GMAC_MAN) Write ZERO */ +/* -------- GMAC_RPQ : (GMAC Offset: 0x038) Received Pause Quantum Register -------- */ +#define GMAC_RPQ_RPQ_Pos 0 +#define GMAC_RPQ_RPQ_Msk (0xffffu << GMAC_RPQ_RPQ_Pos) /**< \brief (GMAC_RPQ) Received Pause Quantum */ +/* -------- GMAC_TPQ : (GMAC Offset: 0x03C) Transmit Pause Quantum Register -------- */ +#define GMAC_TPQ_TPQ_Pos 0 +#define GMAC_TPQ_TPQ_Msk (0xffffu << GMAC_TPQ_TPQ_Pos) /**< \brief (GMAC_TPQ) Transmit Pause Quantum */ +#define GMAC_TPQ_TPQ(value) ((GMAC_TPQ_TPQ_Msk & ((value) << GMAC_TPQ_TPQ_Pos))) +/* -------- GMAC_TPSF : (GMAC Offset: 0x040) TX Partial Store and Forward Register -------- */ +#define GMAC_TPSF_TPB1ADR_Pos 0 +#define GMAC_TPSF_TPB1ADR_Msk (0xfffu << GMAC_TPSF_TPB1ADR_Pos) /**< \brief (GMAC_TPSF) tx_pbuf_addr-1:0 */ +#define GMAC_TPSF_TPB1ADR(value) ((GMAC_TPSF_TPB1ADR_Msk & ((value) << GMAC_TPSF_TPB1ADR_Pos))) +#define GMAC_TPSF_ENTXP (0x1u << 31) /**< \brief (GMAC_TPSF) Enable TX Partial Store and Forward Operation */ +/* -------- GMAC_RPSF : (GMAC Offset: 0x044) RX Partial Store and Forward Register -------- */ +#define GMAC_RPSF_RPB1ADR_Pos 0 +#define GMAC_RPSF_RPB1ADR_Msk (0xfffu << GMAC_RPSF_RPB1ADR_Pos) /**< \brief (GMAC_RPSF) rx_pbuf_addr-1:0 */ +#define GMAC_RPSF_RPB1ADR(value) ((GMAC_RPSF_RPB1ADR_Msk & ((value) << GMAC_RPSF_RPB1ADR_Pos))) +#define GMAC_RPSF_ENRXP (0x1u << 31) /**< \brief (GMAC_RPSF) Enable RX Partial Store and Forward Operation */ +/* -------- GMAC_HRB : (GMAC Offset: 0x080) Hash Register Bottom [31:0] -------- */ +#define GMAC_HRB_ADDR_Pos 0 +#define GMAC_HRB_ADDR_Msk (0xffffffffu << GMAC_HRB_ADDR_Pos) /**< \brief (GMAC_HRB) Hash Address */ +#define GMAC_HRB_ADDR(value) ((GMAC_HRB_ADDR_Msk & ((value) << GMAC_HRB_ADDR_Pos))) +/* -------- GMAC_HRT : (GMAC Offset: 0x084) Hash Register Top [63:32] -------- */ +#define GMAC_HRT_ADDR_Pos 0 +#define GMAC_HRT_ADDR_Msk (0xffffffffu << GMAC_HRT_ADDR_Pos) /**< \brief (GMAC_HRT) Hash Address */ +#define GMAC_HRT_ADDR(value) ((GMAC_HRT_ADDR_Msk & ((value) << GMAC_HRT_ADDR_Pos))) +/* -------- GMAC_SAB1 : (GMAC Offset: 0x088) Specific Address 1 Bottom [31:0] Register -------- */ +#define GMAC_SAB1_ADDR_Pos 0 +#define GMAC_SAB1_ADDR_Msk (0xffffffffu << GMAC_SAB1_ADDR_Pos) /**< \brief (GMAC_SAB1) Specific Address 1 */ +#define GMAC_SAB1_ADDR(value) ((GMAC_SAB1_ADDR_Msk & ((value) << GMAC_SAB1_ADDR_Pos))) +/* -------- GMAC_SAT1 : (GMAC Offset: 0x08C) Specific Address 1 Top [47:32] Register -------- */ +#define GMAC_SAT1_ADDR_Pos 0 +#define GMAC_SAT1_ADDR_Msk (0xffffu << GMAC_SAT1_ADDR_Pos) /**< \brief (GMAC_SAT1) Specific Address 1 */ +#define GMAC_SAT1_ADDR(value) ((GMAC_SAT1_ADDR_Msk & ((value) << GMAC_SAT1_ADDR_Pos))) +/* -------- GMAC_SAB2 : (GMAC Offset: 0x090) Specific Address 2 Bottom [31:0] Register -------- */ +#define GMAC_SAB2_ADDR_Pos 0 +#define GMAC_SAB2_ADDR_Msk (0xffffffffu << GMAC_SAB2_ADDR_Pos) /**< \brief (GMAC_SAB2) Specific Address 2 */ +#define GMAC_SAB2_ADDR(value) ((GMAC_SAB2_ADDR_Msk & ((value) << GMAC_SAB2_ADDR_Pos))) +/* -------- GMAC_SAT2 : (GMAC Offset: 0x094) Specific Address 2 Top [47:32] Register -------- */ +#define GMAC_SAT2_ADDR_Pos 0 +#define GMAC_SAT2_ADDR_Msk (0xffffu << GMAC_SAT2_ADDR_Pos) /**< \brief (GMAC_SAT2) Specific Address 2 */ +#define GMAC_SAT2_ADDR(value) ((GMAC_SAT2_ADDR_Msk & ((value) << GMAC_SAT2_ADDR_Pos))) +/* -------- GMAC_SAB3 : (GMAC Offset: 0x098) Specific Address 3 Bottom [31:0] Register -------- */ +#define GMAC_SAB3_ADDR_Pos 0 +#define GMAC_SAB3_ADDR_Msk (0xffffffffu << GMAC_SAB3_ADDR_Pos) /**< \brief (GMAC_SAB3) Specific Address 3 */ +#define GMAC_SAB3_ADDR(value) ((GMAC_SAB3_ADDR_Msk & ((value) << GMAC_SAB3_ADDR_Pos))) +/* -------- GMAC_SAT3 : (GMAC Offset: 0x09C) Specific Address 3 Top [47:32] Register -------- */ +#define GMAC_SAT3_ADDR_Pos 0 +#define GMAC_SAT3_ADDR_Msk (0xffffu << GMAC_SAT3_ADDR_Pos) /**< \brief (GMAC_SAT3) Specific Address 3 */ +#define GMAC_SAT3_ADDR(value) ((GMAC_SAT3_ADDR_Msk & ((value) << GMAC_SAT3_ADDR_Pos))) +/* -------- GMAC_SAB4 : (GMAC Offset: 0x0A0) Specific Address 4 Bottom [31:0] Register -------- */ +#define GMAC_SAB4_ADDR_Pos 0 +#define GMAC_SAB4_ADDR_Msk (0xffffffffu << GMAC_SAB4_ADDR_Pos) /**< \brief (GMAC_SAB4) Specific Address 4 */ +#define GMAC_SAB4_ADDR(value) ((GMAC_SAB4_ADDR_Msk & ((value) << GMAC_SAB4_ADDR_Pos))) +/* -------- GMAC_SAT4 : (GMAC Offset: 0x0A4) Specific Address 4 Top [47:32] Register -------- */ +#define GMAC_SAT4_ADDR_Pos 0 +#define GMAC_SAT4_ADDR_Msk (0xffffu << GMAC_SAT4_ADDR_Pos) /**< \brief (GMAC_SAT4) Specific Address 4 */ +#define GMAC_SAT4_ADDR(value) ((GMAC_SAT4_ADDR_Msk & ((value) << GMAC_SAT4_ADDR_Pos))) +/* -------- GMAC_TIDM[4] : (GMAC Offset: 0x0A8) Type ID Match 1 Register -------- */ +#define GMAC_TIDM_TID_Pos 0 +#define GMAC_TIDM_TID_Msk (0xffffu << GMAC_TIDM_TID_Pos) /**< \brief (GMAC_TIDM[4]) Type ID Match 1 */ +#define GMAC_TIDM_TID(value) ((GMAC_TIDM_TID_Msk & ((value) << GMAC_TIDM_TID_Pos))) +/* -------- GMAC_WOL : (GMAC Offset: 0x0B8) Wake on LAN Register -------- */ +#define GMAC_WOL_IP_Pos 0 +#define GMAC_WOL_IP_Msk (0xffffu << GMAC_WOL_IP_Pos) /**< \brief (GMAC_WOL) ARP Request IP Address */ +#define GMAC_WOL_IP(value) ((GMAC_WOL_IP_Msk & ((value) << GMAC_WOL_IP_Pos))) +#define GMAC_WOL_MAG (0x1u << 16) /**< \brief (GMAC_WOL) Magic Packet Event Enable */ +#define GMAC_WOL_ARP (0x1u << 17) /**< \brief (GMAC_WOL) ARP Request IP Address */ +#define GMAC_WOL_SA1 (0x1u << 18) /**< \brief (GMAC_WOL) Specific Address Register 1 Event Enable */ +#define GMAC_WOL_MTI (0x1u << 19) /**< \brief (GMAC_WOL) Multicast Hash Event Enable */ +/* -------- GMAC_IPGS : (GMAC Offset: 0x0BC) IPG Stretch Register -------- */ +#define GMAC_IPGS_FL_Pos 0 +#define GMAC_IPGS_FL_Msk (0xffffu << GMAC_IPGS_FL_Pos) /**< \brief (GMAC_IPGS) Frame Length */ +#define GMAC_IPGS_FL(value) ((GMAC_IPGS_FL_Msk & ((value) << GMAC_IPGS_FL_Pos))) +/* -------- GMAC_SVLAN : (GMAC Offset: 0x0C0) Stacked VLAN Register -------- */ +#define GMAC_SVLAN_VLAN_TYPE_Pos 0 +#define GMAC_SVLAN_VLAN_TYPE_Msk (0xffffu << GMAC_SVLAN_VLAN_TYPE_Pos) /**< \brief (GMAC_SVLAN) User Defined VLAN_TYPE Field */ +#define GMAC_SVLAN_VLAN_TYPE(value) ((GMAC_SVLAN_VLAN_TYPE_Msk & ((value) << GMAC_SVLAN_VLAN_TYPE_Pos))) +#define GMAC_SVLAN_ESVLAN (0x1u << 31) /**< \brief (GMAC_SVLAN) Enable Stacked VLAN Processing Mode */ +/* -------- GMAC_TPFCP : (GMAC Offset: 0x0C4) Transmit PFC Pause Register -------- */ +#define GMAC_TPFCP_PEV_Pos 0 +#define GMAC_TPFCP_PEV_Msk (0xffu << GMAC_TPFCP_PEV_Pos) /**< \brief (GMAC_TPFCP) Priority Enable Vector */ +#define GMAC_TPFCP_PEV(value) ((GMAC_TPFCP_PEV_Msk & ((value) << GMAC_TPFCP_PEV_Pos))) +#define GMAC_TPFCP_PQ_Pos 8 +#define GMAC_TPFCP_PQ_Msk (0xffu << GMAC_TPFCP_PQ_Pos) /**< \brief (GMAC_TPFCP) Pause Quantum */ +#define GMAC_TPFCP_PQ(value) ((GMAC_TPFCP_PQ_Msk & ((value) << GMAC_TPFCP_PQ_Pos))) +/* -------- GMAC_SAMB1 : (GMAC Offset: 0x0C8) Specific Address 1 Mask Bottom [31:0] Register -------- */ +#define GMAC_SAMB1_ADDR_Pos 0 +#define GMAC_SAMB1_ADDR_Msk (0xffffffffu << GMAC_SAMB1_ADDR_Pos) /**< \brief (GMAC_SAMB1) Specific Address 1 Mask */ +#define GMAC_SAMB1_ADDR(value) ((GMAC_SAMB1_ADDR_Msk & ((value) << GMAC_SAMB1_ADDR_Pos))) +/* -------- GMAC_SAMT1 : (GMAC Offset: 0x0CC) Specific Address 1 Mask Top [47:32] Register -------- */ +#define GMAC_SAMT1_ADDR_Pos 0 +#define GMAC_SAMT1_ADDR_Msk (0xffffu << GMAC_SAMT1_ADDR_Pos) /**< \brief (GMAC_SAMT1) Specific Address 1 Mask */ +#define GMAC_SAMT1_ADDR(value) ((GMAC_SAMT1_ADDR_Msk & ((value) << GMAC_SAMT1_ADDR_Pos))) +/* -------- GMAC_OTLO : (GMAC Offset: 0x100) Octets Transmitted [31:0] Register -------- */ +#define GMAC_OTLO_TXO_Pos 0 +#define GMAC_OTLO_TXO_Msk (0xffffffffu << GMAC_OTLO_TXO_Pos) /**< \brief (GMAC_OTLO) Transmitted Octets */ +/* -------- GMAC_OTHI : (GMAC Offset: 0x104) Octets Transmitted [47:32] Register -------- */ +#define GMAC_OTHI_TXO_Pos 0 +#define GMAC_OTHI_TXO_Msk (0xffffu << GMAC_OTHI_TXO_Pos) /**< \brief (GMAC_OTHI) Transmitted Octets */ +/* -------- GMAC_FT : (GMAC Offset: 0x108) Frames Transmitted Register -------- */ +#define GMAC_FT_FTX_Pos 0 +#define GMAC_FT_FTX_Msk (0xffffffffu << GMAC_FT_FTX_Pos) /**< \brief (GMAC_FT) Frames Transmitted without Error */ +/* -------- GMAC_BCFT : (GMAC Offset: 0x10C) Broadcast Frames Transmitted Register -------- */ +#define GMAC_BCFT_BFTX_Pos 0 +#define GMAC_BCFT_BFTX_Msk (0xffffffffu << GMAC_BCFT_BFTX_Pos) /**< \brief (GMAC_BCFT) Broadcast Frames Transmitted without Error */ +/* -------- GMAC_MFT : (GMAC Offset: 0x110) Multicast Frames Transmitted Register -------- */ +#define GMAC_MFT_MFTX_Pos 0 +#define GMAC_MFT_MFTX_Msk (0xffffffffu << GMAC_MFT_MFTX_Pos) /**< \brief (GMAC_MFT) Multicast Frames Transmitted without Error */ +/* -------- GMAC_PFT : (GMAC Offset: 0x114) Pause Frames Transmitted Register -------- */ +#define GMAC_PFT_PFTX_Pos 0 +#define GMAC_PFT_PFTX_Msk (0xffffu << GMAC_PFT_PFTX_Pos) /**< \brief (GMAC_PFT) Pause Frames Transmitted Register */ +/* -------- GMAC_BFT64 : (GMAC Offset: 0x118) 64 Byte Frames Transmitted Register -------- */ +#define GMAC_BFT64_NFTX_Pos 0 +#define GMAC_BFT64_NFTX_Msk (0xffffffffu << GMAC_BFT64_NFTX_Pos) /**< \brief (GMAC_BFT64) 64 Byte Frames Transmitted without Error */ +/* -------- GMAC_TBFT127 : (GMAC Offset: 0x11C) 65 to 127 Byte Frames Transmitted Register -------- */ +#define GMAC_TBFT127_NFTX_Pos 0 +#define GMAC_TBFT127_NFTX_Msk (0xffffffffu << GMAC_TBFT127_NFTX_Pos) /**< \brief (GMAC_TBFT127) 65 to 127 Byte Frames Transmitted without Error */ +/* -------- GMAC_TBFT255 : (GMAC Offset: 0x120) 128 to 255 Byte Frames Transmitted Register -------- */ +#define GMAC_TBFT255_NFTX_Pos 0 +#define GMAC_TBFT255_NFTX_Msk (0xffffffffu << GMAC_TBFT255_NFTX_Pos) /**< \brief (GMAC_TBFT255) 128 to 255 Byte Frames Transmitted without Error */ +/* -------- GMAC_TBFT511 : (GMAC Offset: 0x124) 256 to 511 Byte Frames Transmitted Register -------- */ +#define GMAC_TBFT511_NFTX_Pos 0 +#define GMAC_TBFT511_NFTX_Msk (0xffffffffu << GMAC_TBFT511_NFTX_Pos) /**< \brief (GMAC_TBFT511) 256 to 511 Byte Frames Transmitted without Error */ +/* -------- GMAC_TBFT1023 : (GMAC Offset: 0x128) 512 to 1023 Byte Frames Transmitted Register -------- */ +#define GMAC_TBFT1023_NFTX_Pos 0 +#define GMAC_TBFT1023_NFTX_Msk (0xffffffffu << GMAC_TBFT1023_NFTX_Pos) /**< \brief (GMAC_TBFT1023) 512 to 1023 Byte Frames Transmitted without Error */ +/* -------- GMAC_TBFT1518 : (GMAC Offset: 0x12C) 1024 to 1518 Byte Frames Transmitted Register -------- */ +#define GMAC_TBFT1518_NFTX_Pos 0 +#define GMAC_TBFT1518_NFTX_Msk (0xffffffffu << GMAC_TBFT1518_NFTX_Pos) /**< \brief (GMAC_TBFT1518) 1024 to 1518 Byte Frames Transmitted without Error */ +/* -------- GMAC_GTBFT1518 : (GMAC Offset: 0x130) Greater Than 1518 Byte Frames Transmitted Register -------- */ +#define GMAC_GTBFT1518_NFTX_Pos 0 +#define GMAC_GTBFT1518_NFTX_Msk (0xffffffffu << GMAC_GTBFT1518_NFTX_Pos) /**< \brief (GMAC_GTBFT1518) Greater than 1518 Byte Frames Transmitted without Error */ +/* -------- GMAC_TUR : (GMAC Offset: 0x134) Transmit Under Runs Register -------- */ +#define GMAC_TUR_TXUNR_Pos 0 +#define GMAC_TUR_TXUNR_Msk (0x3ffu << GMAC_TUR_TXUNR_Pos) /**< \brief (GMAC_TUR) Transmit Under Runs */ +/* -------- GMAC_SCF : (GMAC Offset: 0x138) Single Collision Frames Register -------- */ +#define GMAC_SCF_SCOL_Pos 0 +#define GMAC_SCF_SCOL_Msk (0x3ffffu << GMAC_SCF_SCOL_Pos) /**< \brief (GMAC_SCF) Single Collision */ +/* -------- GMAC_MCF : (GMAC Offset: 0x13C) Multiple Collision Frames Register -------- */ +#define GMAC_MCF_MCOL_Pos 0 +#define GMAC_MCF_MCOL_Msk (0x3ffffu << GMAC_MCF_MCOL_Pos) /**< \brief (GMAC_MCF) Multiple Collision */ +/* -------- GMAC_EC : (GMAC Offset: 0x140) Excessive Collisions Register -------- */ +#define GMAC_EC_XCOL_Pos 0 +#define GMAC_EC_XCOL_Msk (0x3ffu << GMAC_EC_XCOL_Pos) /**< \brief (GMAC_EC) Excessive Collisions */ +/* -------- GMAC_LC : (GMAC Offset: 0x144) Late Collisions Register -------- */ +#define GMAC_LC_LCOL_Pos 0 +#define GMAC_LC_LCOL_Msk (0x3ffu << GMAC_LC_LCOL_Pos) /**< \brief (GMAC_LC) Late Collisions */ +/* -------- GMAC_DTF : (GMAC Offset: 0x148) Deferred Transmission Frames Register -------- */ +#define GMAC_DTF_DEFT_Pos 0 +#define GMAC_DTF_DEFT_Msk (0x3ffffu << GMAC_DTF_DEFT_Pos) /**< \brief (GMAC_DTF) Deferred Transmission */ +/* -------- GMAC_CSE : (GMAC Offset: 0x14C) Carrier Sense Errors Register -------- */ +#define GMAC_CSE_CSR_Pos 0 +#define GMAC_CSE_CSR_Msk (0x3ffu << GMAC_CSE_CSR_Pos) /**< \brief (GMAC_CSE) Carrier Sense Error */ +/* -------- GMAC_ORLO : (GMAC Offset: 0x150) Octets Received [31:0] Received -------- */ +#define GMAC_ORLO_RXO_Pos 0 +#define GMAC_ORLO_RXO_Msk (0xffffffffu << GMAC_ORLO_RXO_Pos) /**< \brief (GMAC_ORLO) Received Octets */ +/* -------- GMAC_ORHI : (GMAC Offset: 0x154) Octets Received [47:32] Received -------- */ +#define GMAC_ORHI_RXO_Pos 0 +#define GMAC_ORHI_RXO_Msk (0xffffu << GMAC_ORHI_RXO_Pos) /**< \brief (GMAC_ORHI) Received Octets */ +/* -------- GMAC_FR : (GMAC Offset: 0x158) Frames Received Register -------- */ +#define GMAC_FR_FRX_Pos 0 +#define GMAC_FR_FRX_Msk (0xffffffffu << GMAC_FR_FRX_Pos) /**< \brief (GMAC_FR) Frames Received without Error */ +/* -------- GMAC_BCFR : (GMAC Offset: 0x15C) Broadcast Frames Received Register -------- */ +#define GMAC_BCFR_BFRX_Pos 0 +#define GMAC_BCFR_BFRX_Msk (0xffffffffu << GMAC_BCFR_BFRX_Pos) /**< \brief (GMAC_BCFR) Broadcast Frames Received without Error */ +/* -------- GMAC_MFR : (GMAC Offset: 0x160) Multicast Frames Received Register -------- */ +#define GMAC_MFR_MFRX_Pos 0 +#define GMAC_MFR_MFRX_Msk (0xffffffffu << GMAC_MFR_MFRX_Pos) /**< \brief (GMAC_MFR) Multicast Frames Received without Error */ +/* -------- GMAC_PFR : (GMAC Offset: 0x164) Pause Frames Received Register -------- */ +#define GMAC_PFR_PFRX_Pos 0 +#define GMAC_PFR_PFRX_Msk (0xffffu << GMAC_PFR_PFRX_Pos) /**< \brief (GMAC_PFR) Pause Frames Received Register */ +/* -------- GMAC_BFR64 : (GMAC Offset: 0x168) 64 Byte Frames Received Register -------- */ +#define GMAC_BFR64_NFRX_Pos 0 +#define GMAC_BFR64_NFRX_Msk (0xffffffffu << GMAC_BFR64_NFRX_Pos) /**< \brief (GMAC_BFR64) 64 Byte Frames Received without Error */ +/* -------- GMAC_TBFR127 : (GMAC Offset: 0x16C) 65 to 127 Byte Frames Received Register -------- */ +#define GMAC_TBFR127_NFRX_Pos 0 +#define GMAC_TBFR127_NFRX_Msk (0xffffffffu << GMAC_TBFR127_NFRX_Pos) /**< \brief (GMAC_TBFR127) 65 to 127 Byte Frames Received without Error */ +/* -------- GMAC_TBFR255 : (GMAC Offset: 0x170) 128 to 255 Byte Frames Received Register -------- */ +#define GMAC_TBFR255_NFRX_Pos 0 +#define GMAC_TBFR255_NFRX_Msk (0xffffffffu << GMAC_TBFR255_NFRX_Pos) /**< \brief (GMAC_TBFR255) 128 to 255 Byte Frames Received without Error */ +/* -------- GMAC_TBFR511 : (GMAC Offset: 0x174) 256 to 511Byte Frames Received Register -------- */ +#define GMAC_TBFR511_NFRX_Pos 0 +#define GMAC_TBFR511_NFRX_Msk (0xffffffffu << GMAC_TBFR511_NFRX_Pos) /**< \brief (GMAC_TBFR511) 256 to 511 Byte Frames Received without Error */ +/* -------- GMAC_TBFR1023 : (GMAC Offset: 0x178) 512 to 1023 Byte Frames Received Register -------- */ +#define GMAC_TBFR1023_NFRX_Pos 0 +#define GMAC_TBFR1023_NFRX_Msk (0xffffffffu << GMAC_TBFR1023_NFRX_Pos) /**< \brief (GMAC_TBFR1023) 512 to 1023 Byte Frames Received without Error */ +/* -------- GMAC_TBFR1518 : (GMAC Offset: 0x17C) 1024 to 1518 Byte Frames Received Register -------- */ +#define GMAC_TBFR1518_NFRX_Pos 0 +#define GMAC_TBFR1518_NFRX_Msk (0xffffffffu << GMAC_TBFR1518_NFRX_Pos) /**< \brief (GMAC_TBFR1518) 1024 to 1518 Byte Frames Received without Error */ +/* -------- GMAC_TMXBFR : (GMAC Offset: 0x180) 1519 to Maximum Byte Frames Received Register -------- */ +#define GMAC_TMXBFR_NFRX_Pos 0 +#define GMAC_TMXBFR_NFRX_Msk (0xffffffffu << GMAC_TMXBFR_NFRX_Pos) /**< \brief (GMAC_TMXBFR) 1519 to Maximum Byte Frames Received without Error */ +/* -------- GMAC_UFR : (GMAC Offset: 0x184) Undersize Frames Received Register -------- */ +#define GMAC_UFR_UFRX_Pos 0 +#define GMAC_UFR_UFRX_Msk (0x3ffu << GMAC_UFR_UFRX_Pos) /**< \brief (GMAC_UFR) Undersize Frames Received */ +/* -------- GMAC_OFR : (GMAC Offset: 0x188) Oversize Frames Received Register -------- */ +#define GMAC_OFR_OFRX_Pos 0 +#define GMAC_OFR_OFRX_Msk (0x3ffu << GMAC_OFR_OFRX_Pos) /**< \brief (GMAC_OFR) Oversized Frames Received */ +/* -------- GMAC_JR : (GMAC Offset: 0x18C) Jabbers Received Register -------- */ +#define GMAC_JR_JRX_Pos 0 +#define GMAC_JR_JRX_Msk (0x3ffu << GMAC_JR_JRX_Pos) /**< \brief (GMAC_JR) Jabbers Received */ +/* -------- GMAC_FCSE : (GMAC Offset: 0x190) Frame Check Sequence Errors Register -------- */ +#define GMAC_FCSE_FCKR_Pos 0 +#define GMAC_FCSE_FCKR_Msk (0x3ffu << GMAC_FCSE_FCKR_Pos) /**< \brief (GMAC_FCSE) Frame Check Sequence Errors */ +/* -------- GMAC_LFFE : (GMAC Offset: 0x194) Length Field Frame Errors Register -------- */ +#define GMAC_LFFE_LFER_Pos 0 +#define GMAC_LFFE_LFER_Msk (0x3ffu << GMAC_LFFE_LFER_Pos) /**< \brief (GMAC_LFFE) Length Field Frame Errors */ +/* -------- GMAC_RSE : (GMAC Offset: 0x198) Receive Symbol Errors Register -------- */ +#define GMAC_RSE_RXSE_Pos 0 +#define GMAC_RSE_RXSE_Msk (0x3ffu << GMAC_RSE_RXSE_Pos) /**< \brief (GMAC_RSE) Receive Symbol Errors */ +/* -------- GMAC_AE : (GMAC Offset: 0x19C) Alignment Errors Register -------- */ +#define GMAC_AE_AER_Pos 0 +#define GMAC_AE_AER_Msk (0x3ffu << GMAC_AE_AER_Pos) /**< \brief (GMAC_AE) Alignment Errors */ +/* -------- GMAC_RRE : (GMAC Offset: 0x1A0) Receive Resource Errors Register -------- */ +#define GMAC_RRE_RXRER_Pos 0 +#define GMAC_RRE_RXRER_Msk (0x3ffffu << GMAC_RRE_RXRER_Pos) /**< \brief (GMAC_RRE) Receive Resource Errors */ +/* -------- GMAC_ROE : (GMAC Offset: 0x1A4) Receive Overrun Register -------- */ +#define GMAC_ROE_RXOVR_Pos 0 +#define GMAC_ROE_RXOVR_Msk (0x3ffu << GMAC_ROE_RXOVR_Pos) /**< \brief (GMAC_ROE) Receive Overruns */ +/* -------- GMAC_IHCE : (GMAC Offset: 0x1A8) IP Header Checksum Errors Register -------- */ +#define GMAC_IHCE_HCKER_Pos 0 +#define GMAC_IHCE_HCKER_Msk (0xffu << GMAC_IHCE_HCKER_Pos) /**< \brief (GMAC_IHCE) IP Header Checksum Errors */ +/* -------- GMAC_TCE : (GMAC Offset: 0x1AC) TCP Checksum Errors Register -------- */ +#define GMAC_TCE_TCKER_Pos 0 +#define GMAC_TCE_TCKER_Msk (0xffu << GMAC_TCE_TCKER_Pos) /**< \brief (GMAC_TCE) TCP Checksum Errors */ +/* -------- GMAC_UCE : (GMAC Offset: 0x1B0) UDP Checksum Errors Register -------- */ +#define GMAC_UCE_UCKER_Pos 0 +#define GMAC_UCE_UCKER_Msk (0xffu << GMAC_UCE_UCKER_Pos) /**< \brief (GMAC_UCE) UDP Checksum Errors */ +/* -------- GMAC_TSSS : (GMAC Offset: 0x1C8) 1588 Timer Sync Strobe Seconds Register -------- */ +#define GMAC_TSSS_VTS_Pos 0 +#define GMAC_TSSS_VTS_Msk (0xffffffffu << GMAC_TSSS_VTS_Pos) /**< \brief (GMAC_TSSS) Value of Timer Seconds Register Capture */ +#define GMAC_TSSS_VTS(value) ((GMAC_TSSS_VTS_Msk & ((value) << GMAC_TSSS_VTS_Pos))) +/* -------- GMAC_TSSN : (GMAC Offset: 0x1CC) 1588 Timer Sync Strobe Nanoseconds Register -------- */ +#define GMAC_TSSN_VTN_Pos 0 +#define GMAC_TSSN_VTN_Msk (0x3fffffffu << GMAC_TSSN_VTN_Pos) /**< \brief (GMAC_TSSN) Value Timer Nanoseconds Register Capture */ +#define GMAC_TSSN_VTN(value) ((GMAC_TSSN_VTN_Msk & ((value) << GMAC_TSSN_VTN_Pos))) +/* -------- GMAC_TS : (GMAC Offset: 0x1D0) 1588 Timer Seconds Register -------- */ +#define GMAC_TS_TCS_Pos 0 +#define GMAC_TS_TCS_Msk (0xffffffffu << GMAC_TS_TCS_Pos) /**< \brief (GMAC_TS) Timer Count in Seconds */ +#define GMAC_TS_TCS(value) ((GMAC_TS_TCS_Msk & ((value) << GMAC_TS_TCS_Pos))) +/* -------- GMAC_TN : (GMAC Offset: 0x1D4) 1588 Timer Nanoseconds Register -------- */ +#define GMAC_TN_TNS_Pos 0 +#define GMAC_TN_TNS_Msk (0x3fffffffu << GMAC_TN_TNS_Pos) /**< \brief (GMAC_TN) Timer Count in Nanoseconds */ +#define GMAC_TN_TNS(value) ((GMAC_TN_TNS_Msk & ((value) << GMAC_TN_TNS_Pos))) +/* -------- GMAC_TA : (GMAC Offset: 0x1D8) 1588 Timer Adjust Register -------- */ +#define GMAC_TA_ITDT_Pos 0 +#define GMAC_TA_ITDT_Msk (0x3fffffffu << GMAC_TA_ITDT_Pos) /**< \brief (GMAC_TA) Increment/Decrement */ +#define GMAC_TA_ITDT(value) ((GMAC_TA_ITDT_Msk & ((value) << GMAC_TA_ITDT_Pos))) +#define GMAC_TA_ADJ (0x1u << 31) /**< \brief (GMAC_TA) Adjust 1588 Timer */ +/* -------- GMAC_TI : (GMAC Offset: 0x1DC) 1588 Timer Increment Register -------- */ +#define GMAC_TI_CNS_Pos 0 +#define GMAC_TI_CNS_Msk (0xffu << GMAC_TI_CNS_Pos) /**< \brief (GMAC_TI) Count Nanoseconds */ +#define GMAC_TI_CNS(value) ((GMAC_TI_CNS_Msk & ((value) << GMAC_TI_CNS_Pos))) +#define GMAC_TI_ACNS_Pos 8 +#define GMAC_TI_ACNS_Msk (0xffu << GMAC_TI_ACNS_Pos) /**< \brief (GMAC_TI) Alternative Count Nanoseconds */ +#define GMAC_TI_ACNS(value) ((GMAC_TI_ACNS_Msk & ((value) << GMAC_TI_ACNS_Pos))) +#define GMAC_TI_NIT_Pos 16 +#define GMAC_TI_NIT_Msk (0xffu << GMAC_TI_NIT_Pos) /**< \brief (GMAC_TI) Number of Increments */ +#define GMAC_TI_NIT(value) ((GMAC_TI_NIT_Msk & ((value) << GMAC_TI_NIT_Pos))) +/* -------- GMAC_EFTS : (GMAC Offset: 0x1E0) PTP Event Frame Transmitted Seconds -------- */ +#define GMAC_EFTS_RUD_Pos 0 +#define GMAC_EFTS_RUD_Msk (0xffffffffu << GMAC_EFTS_RUD_Pos) /**< \brief (GMAC_EFTS) Register Update */ +/* -------- GMAC_EFTN : (GMAC Offset: 0x1E4) PTP Event Frame Transmitted Nanoseconds -------- */ +#define GMAC_EFTN_RUD_Pos 0 +#define GMAC_EFTN_RUD_Msk (0x3fffffffu << GMAC_EFTN_RUD_Pos) /**< \brief (GMAC_EFTN) Register Update */ +/* -------- GMAC_EFRS : (GMAC Offset: 0x1E8) PTP Event Frame Received Seconds -------- */ +#define GMAC_EFRS_RUD_Pos 0 +#define GMAC_EFRS_RUD_Msk (0xffffffffu << GMAC_EFRS_RUD_Pos) /**< \brief (GMAC_EFRS) Register Update */ +/* -------- GMAC_EFRN : (GMAC Offset: 0x1EC) PTP Event Frame Received Nanoseconds -------- */ +#define GMAC_EFRN_RUD_Pos 0 +#define GMAC_EFRN_RUD_Msk (0x3fffffffu << GMAC_EFRN_RUD_Pos) /**< \brief (GMAC_EFRN) Register Update */ +/* -------- GMAC_PEFTS : (GMAC Offset: 0x1F0) PTP Peer Event Frame Transmitted Seconds -------- */ +#define GMAC_PEFTS_RUD_Pos 0 +#define GMAC_PEFTS_RUD_Msk (0xffffffffu << GMAC_PEFTS_RUD_Pos) /**< \brief (GMAC_PEFTS) Register Update */ +/* -------- GMAC_PEFTN : (GMAC Offset: 0x1F4) PTP Peer Event Frame Transmitted Nanoseconds -------- */ +#define GMAC_PEFTN_RUD_Pos 0 +#define GMAC_PEFTN_RUD_Msk (0x3fffffffu << GMAC_PEFTN_RUD_Pos) /**< \brief (GMAC_PEFTN) Register Update */ +/* -------- GMAC_PEFRS : (GMAC Offset: 0x1F8) PTP Peer Event Frame Received Seconds -------- */ +#define GMAC_PEFRS_RUD_Pos 0 +#define GMAC_PEFRS_RUD_Msk (0xffffffffu << GMAC_PEFRS_RUD_Pos) /**< \brief (GMAC_PEFRS) Register Update */ +/* -------- GMAC_PEFRN : (GMAC Offset: 0x1FC) PTP Peer Event Frame Received Nanoseconds -------- */ +#define GMAC_PEFRN_RUD_Pos 0 +#define GMAC_PEFRN_RUD_Msk (0x3fffffffu << GMAC_PEFRN_RUD_Pos) /**< \brief (GMAC_PEFRN) Register Update */ +/* -------- GMAC_ISRPQ[7] : (GMAC Offset: 0x400) Interrupt Status Register Priority Queue -------- */ +#define GMAC_ISRPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_ISRPQ[7]) Receive Complete */ +#define GMAC_ISRPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_ISRPQ[7]) RX Used Bit Read */ +#define GMAC_ISRPQ_RLEX (0x1u << 5) /**< \brief (GMAC_ISRPQ[7]) Retry Limit Exceeded or Late Collision */ +#define GMAC_ISRPQ_TFC (0x1u << 6) /**< \brief (GMAC_ISRPQ[7]) Transmit Frame Corruption due to AHB error */ +#define GMAC_ISRPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_ISRPQ[7]) Transmit Complete */ +#define GMAC_ISRPQ_ROVR (0x1u << 10) /**< \brief (GMAC_ISRPQ[7]) Receive Overrun */ +#define GMAC_ISRPQ_HRESP (0x1u << 11) /**< \brief (GMAC_ISRPQ[7]) HRESP Not OK */ +/* -------- GMAC_TBQBAPQ[7] : (GMAC Offset: 0x440) Transmit Buffer Queue Base Address Priority Queue -------- */ +#define GMAC_TBQBAPQ_TXBQBA_Pos 2 +#define GMAC_TBQBAPQ_TXBQBA_Msk (0x3fu << GMAC_TBQBAPQ_TXBQBA_Pos) /**< \brief (GMAC_TBQBAPQ[7]) Transmit Buffer Queue Base Address */ +#define GMAC_TBQBAPQ_TXBQBA(value) ((GMAC_TBQBAPQ_TXBQBA_Msk & ((value) << GMAC_TBQBAPQ_TXBQBA_Pos))) +/* -------- GMAC_RBQBAPQ[7] : (GMAC Offset: 0x480) Receive Buffer Queue Base Address Priority Queue -------- */ +#define GMAC_RBQBAPQ_RXBQBA_Pos 2 +#define GMAC_RBQBAPQ_RXBQBA_Msk (0x3fu << GMAC_RBQBAPQ_RXBQBA_Pos) /**< \brief (GMAC_RBQBAPQ[7]) Receive Buffer Queue Base Address */ +#define GMAC_RBQBAPQ_RXBQBA(value) ((GMAC_RBQBAPQ_RXBQBA_Msk & ((value) << GMAC_RBQBAPQ_RXBQBA_Pos))) +/* -------- GMAC_RBSRPQ[7] : (GMAC Offset: 0x4A0) Receive Buffer Size Register Priority Queue -------- */ +#define GMAC_RBSRPQ_RBS_Pos 0 +#define GMAC_RBSRPQ_RBS_Msk (0xffffu << GMAC_RBSRPQ_RBS_Pos) /**< \brief (GMAC_RBSRPQ[7]) Receive Buffer Size */ +#define GMAC_RBSRPQ_RBS(value) ((GMAC_RBSRPQ_RBS_Msk & ((value) << GMAC_RBSRPQ_RBS_Pos))) +/* -------- GMAC_ST1RPQ[16] : (GMAC Offset: 0x500) Screening Type1 Register Priority Queue -------- */ +#define GMAC_ST1RPQ_QNB_Pos 0 +#define GMAC_ST1RPQ_QNB_Msk (0xfu << GMAC_ST1RPQ_QNB_Pos) /**< \brief (GMAC_ST1RPQ[16]) Que Number (0->7) */ +#define GMAC_ST1RPQ_QNB(value) ((GMAC_ST1RPQ_QNB_Msk & ((value) << GMAC_ST1RPQ_QNB_Pos))) +#define GMAC_ST1RPQ_DSTCM_Pos 4 +#define GMAC_ST1RPQ_DSTCM_Msk (0xffu << GMAC_ST1RPQ_DSTCM_Pos) /**< \brief (GMAC_ST1RPQ[16]) Differentiated Services or Traffic Class Match */ +#define GMAC_ST1RPQ_DSTCM(value) ((GMAC_ST1RPQ_DSTCM_Msk & ((value) << GMAC_ST1RPQ_DSTCM_Pos))) +#define GMAC_ST1RPQ_UDPM_Pos 12 +#define GMAC_ST1RPQ_UDPM_Msk (0xffffu << GMAC_ST1RPQ_UDPM_Pos) /**< \brief (GMAC_ST1RPQ[16]) UDP Port Match */ +#define GMAC_ST1RPQ_UDPM(value) ((GMAC_ST1RPQ_UDPM_Msk & ((value) << GMAC_ST1RPQ_UDPM_Pos))) +#define GMAC_ST1RPQ_DSTCE (0x1u << 28) /**< \brief (GMAC_ST1RPQ[16]) Differentiated Services or Traffic Class Match Enable */ +#define GMAC_ST1RPQ_UDPE (0x1u << 29) /**< \brief (GMAC_ST1RPQ[16]) UDP Port Match Enable */ +/* -------- GMAC_ST2RPQ[16] : (GMAC Offset: 0x540) Screening Type2 Register Priority Queue -------- */ +#define GMAC_ST2RPQ_QNB_Pos 0 +#define GMAC_ST2RPQ_QNB_Msk (0xfu << GMAC_ST2RPQ_QNB_Pos) /**< \brief (GMAC_ST2RPQ[16]) Que Number (0->7) */ +#define GMAC_ST2RPQ_QNB(value) ((GMAC_ST2RPQ_QNB_Msk & ((value) << GMAC_ST2RPQ_QNB_Pos))) +#define GMAC_ST2RPQ_VLANP_Pos 4 +#define GMAC_ST2RPQ_VLANP_Msk (0xfu << GMAC_ST2RPQ_VLANP_Pos) /**< \brief (GMAC_ST2RPQ[16]) VLAN Priority */ +#define GMAC_ST2RPQ_VLANP(value) ((GMAC_ST2RPQ_VLANP_Msk & ((value) << GMAC_ST2RPQ_VLANP_Pos))) +#define GMAC_ST2RPQ_VLANE (0x1u << 8) /**< \brief (GMAC_ST2RPQ[16]) VLAN Enable */ +/* -------- GMAC_IERPQ[7] : (GMAC Offset: 0x600) Interrupt Enable Register Priority Queue -------- */ +#define GMAC_IERPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_IERPQ[7]) Receive Complete */ +#define GMAC_IERPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_IERPQ[7]) RX Used Bit Read */ +#define GMAC_IERPQ_RLEX (0x1u << 5) /**< \brief (GMAC_IERPQ[7]) Retry Limit Exceeded or Late Collision */ +#define GMAC_IERPQ_TFC (0x1u << 6) /**< \brief (GMAC_IERPQ[7]) Transmit Frame Corruption due to AHB error */ +#define GMAC_IERPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_IERPQ[7]) Transmit Complete */ +#define GMAC_IERPQ_ROVR (0x1u << 10) /**< \brief (GMAC_IERPQ[7]) Receive Overrun */ +#define GMAC_IERPQ_HRESP (0x1u << 11) /**< \brief (GMAC_IERPQ[7]) HRESP Not OK */ +/* -------- GMAC_IDRPQ[7] : (GMAC Offset: 0x620) Interrupt Disable Register Priority Queue -------- */ +#define GMAC_IDRPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_IDRPQ[7]) Receive Complete */ +#define GMAC_IDRPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_IDRPQ[7]) RX Used Bit Read */ +#define GMAC_IDRPQ_RLEX (0x1u << 5) /**< \brief (GMAC_IDRPQ[7]) Retry Limit Exceeded or Late Collision */ +#define GMAC_IDRPQ_TFC (0x1u << 6) /**< \brief (GMAC_IDRPQ[7]) Transmit Frame Corruption due to AHB error */ +#define GMAC_IDRPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_IDRPQ[7]) Transmit Complete */ +#define GMAC_IDRPQ_ROVR (0x1u << 10) /**< \brief (GMAC_IDRPQ[7]) Receive Overrun */ +#define GMAC_IDRPQ_HRESP (0x1u << 11) /**< \brief (GMAC_IDRPQ[7]) HRESP Not OK */ +/* -------- GMAC_IMRPQ[7] : (GMAC Offset: 0x640) Interrupt Mask Register Priority Queue -------- */ +#define GMAC_IMRPQ_RCOMP (0x1u << 1) /**< \brief (GMAC_IMRPQ[7]) Receive Complete */ +#define GMAC_IMRPQ_RXUBR (0x1u << 2) /**< \brief (GMAC_IMRPQ[7]) RX Used Bit Read */ +#define GMAC_IMRPQ_RLEX (0x1u << 5) /**< \brief (GMAC_IMRPQ[7]) Retry Limit Exceeded or Late Collision */ +#define GMAC_IMRPQ_AHB (0x1u << 6) /**< \brief (GMAC_IMRPQ[7]) AHB Error */ +#define GMAC_IMRPQ_TCOMP (0x1u << 7) /**< \brief (GMAC_IMRPQ[7]) Transmit Complete */ +#define GMAC_IMRPQ_ROVR (0x1u << 10) /**< \brief (GMAC_IMRPQ[7]) Receive Overrun */ +#define GMAC_IMRPQ_HRESP (0x1u << 11) /**< \brief (GMAC_IMRPQ[7]) HRESP Not OK */ + +/*@}*/ + + +#endif /* _SAM4E_GMAC_COMPONENT_ */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.c index fe9e2960f..fc72c6ad9 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.c @@ -1,454 +1,454 @@ - /** - * \file - * - * \brief API driver for KSZ8051MNL PHY component. - * - * Copyright (c) 2013 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "FreeRTOSIPConfig.h" - -#include "ethernet_phy.h" -#include "instance/gmac.h" - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -extern "C" { -#endif -/**INDENT-ON**/ -/// @endcond - -/** - * \defgroup ksz8051mnl_ethernet_phy_group PHY component (KSZ8051MNL) - * - * Driver for the ksz8051mnl component. This driver provides access to the main - * features of the PHY. - * - * \section dependencies Dependencies - * This driver depends on the following modules: - * - \ref gmac_group Ethernet Media Access Controller (GMAC) module. - * - * @{ - */ - -SPhyProps phyProps; - -/* Max PHY number */ -#define ETH_PHY_MAX_ADDR 31 - -/* Ethernet PHY operation max retry count */ -#define ETH_PHY_RETRY_MAX 1000000 - -/* Ethernet PHY operation timeout */ -#define ETH_PHY_TIMEOUT 10 - -/** - * \brief Find a valid PHY Address ( from addrStart to 31 ). - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * \param uc_start_addr Start address of the PHY to be searched. - * - * \return 0xFF when no valid PHY address is found. - */ -int ethernet_phy_addr = 0; -static uint8_t ethernet_phy_find_valid(Gmac *p_gmac, uint8_t uc_phy_addr, - uint8_t uc_start_addr) -{ - uint32_t ul_value = 0; - uint8_t uc_cnt; - uint8_t uc_phy_address = uc_phy_addr; - - gmac_enable_management(p_gmac, true); -/* -#define GMII_OUI_MSB 0x0022 -#define GMII_OUI_LSB 0x05 - -PHYID1 = 0x0022 -PHYID2 = 0x1550 -0001_0101_0101_0000 = 0x1550 <= mask should be 0xFFF0 -*/ - /* Check the current PHY address */ - gmac_phy_read(p_gmac, uc_phy_addr, GMII_PHYID1, &ul_value); - - /* Find another one */ - if (ul_value != GMII_OUI_MSB) { - ethernet_phy_addr = 0xFF; - for (uc_cnt = uc_start_addr; uc_cnt <= ETH_PHY_MAX_ADDR; uc_cnt++) { - uc_phy_address = (uc_phy_address + 1) & 0x1F; - ul_value = 0; - gmac_phy_read(p_gmac, uc_phy_address, GMII_PHYID1, &ul_value); - if (ul_value == GMII_OUI_MSB) { - ethernet_phy_addr = uc_phy_address; - break; - } - } - } - - gmac_enable_management(p_gmac, false); - - if (ethernet_phy_addr != 0xFF) { - gmac_phy_read(p_gmac, uc_phy_address, GMII_BMSR, &ul_value); - } - return ethernet_phy_addr; -} - - -/** - * \brief Perform a HW initialization to the PHY and set up clocks. - * - * This should be called only once to initialize the PHY pre-settings. - * The PHY address is the reset status of CRS, RXD[3:0] (the emacPins' pullups). - * The COL pin is used to select MII mode on reset (pulled up for Reduced MII). - * The RXDV pin is used to select test mode on reset (pulled up for test mode). - * The above pins should be predefined for corresponding settings in resetPins. - * The GMAC peripheral pins are configured after the reset is done. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * \param ul_mck GMAC MCK. - * - * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_init(Gmac *p_gmac, uint8_t uc_phy_addr, uint32_t mck) -{ - uint8_t uc_rc = GMAC_TIMEOUT; - uint8_t uc_phy; - - ethernet_phy_reset(GMAC,uc_phy_addr); - - /* Configure GMAC runtime clock */ - uc_rc = gmac_set_mdc_clock(p_gmac, mck); - if (uc_rc != GMAC_OK) { - return 0; - } - - /* Check PHY Address */ - uc_phy = ethernet_phy_find_valid(p_gmac, uc_phy_addr, 0); - if (uc_phy == 0xFF) { - return 0; - } - if (uc_phy != uc_phy_addr) { - ethernet_phy_reset(p_gmac, uc_phy_addr); - } - phy_props.phy_chn = uc_phy; - return uc_phy; -} - - -/** - * \brief Get the Link & speed settings, and automatically set up the GMAC with the - * settings. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * \param uc_apply_setting_flag Set to 0 to not apply the PHY configurations, else to apply. - * - * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_set_link(Gmac *p_gmac, uint8_t uc_phy_addr, - uint8_t uc_apply_setting_flag) -{ - uint32_t ul_stat1; - uint32_t ul_stat2; - uint8_t uc_phy_address, uc_speed = true, uc_fd = true; - uint8_t uc_rc = GMAC_TIMEOUT; - - gmac_enable_management(p_gmac, true); - - uc_phy_address = uc_phy_addr; - - uc_rc = gmac_phy_read(p_gmac, uc_phy_address, GMII_BMSR, &ul_stat1); - if (uc_rc != GMAC_OK) { - /* Disable PHY management and start the GMAC transfer */ - gmac_enable_management(p_gmac, false); - - return uc_rc; - } - if ((ul_stat1 & GMII_LINK_STATUS) == 0) { - /* Disable PHY management and start the GMAC transfer */ - gmac_enable_management(p_gmac, false); - - return GMAC_INVALID; - } - - if (uc_apply_setting_flag == 0) { - /* Disable PHY management and start the GMAC transfer */ - gmac_enable_management(p_gmac, false); - - return uc_rc; - } - - /* Read advertisement */ - uc_rc = gmac_phy_read(p_gmac, uc_phy_address, GMII_ANAR, &ul_stat2); -phy_props.phy_stat1 = ul_stat1; -phy_props.phy_stat2 = ul_stat2; - if (uc_rc != GMAC_OK) { - /* Disable PHY management and start the GMAC transfer */ - gmac_enable_management(p_gmac, false); - - return uc_rc; - } - - if ((ul_stat1 & GMII_100BASE_TX_FD) && (ul_stat2 & GMII_100TX_FDX)) { - /* Set GMAC for 100BaseTX and Full Duplex */ - uc_speed = true; - uc_fd = true; - } else - if ((ul_stat1 & GMII_100BASE_T4_HD) && (ul_stat2 & GMII_100TX_HDX)) { - /* Set MII for 100BaseTX and Half Duplex */ - uc_speed = true; - uc_fd = false; - } else - if ((ul_stat1 & GMII_10BASE_T_FD) && (ul_stat2 & GMII_10_FDX)) { - /* Set MII for 10BaseT and Full Duplex */ - uc_speed = false; - uc_fd = true; - } else - if ((ul_stat1 & GMII_10BASE_T_HD) && (ul_stat2 & GMII_10_HDX)) { - /* Set MII for 10BaseT and Half Duplex */ - uc_speed = false; - uc_fd = false; - } - - gmac_set_speed(p_gmac, uc_speed); - gmac_enable_full_duplex(p_gmac, uc_fd); - - /* Start the GMAC transfers */ - gmac_enable_management(p_gmac, false); - return uc_rc; -} - -PhyProps_t phy_props; - -/** - * \brief Issue an auto negotiation of the PHY. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * - * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_auto_negotiate(Gmac *p_gmac, uint8_t uc_phy_addr) -{ - uint32_t ul_retry_max = ETH_PHY_RETRY_MAX; - uint32_t ul_value; - uint32_t ul_phy_anar; - uint32_t ul_retry_count = 0; - uint8_t uc_speed = 0; - uint8_t uc_fd=0; - uint8_t uc_rc = GMAC_TIMEOUT; - - gmac_enable_management(p_gmac, true); - - /* Set up control register */ - uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_BMCR, &ul_value); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -1; - return uc_rc; - } - - ul_value &= ~(uint32_t)GMII_AUTONEG; /* Remove auto-negotiation enable */ - ul_value &= ~(uint32_t)(GMII_LOOPBACK | GMII_POWER_DOWN); - ul_value |= (uint32_t)GMII_ISOLATE; /* Electrically isolate PHY */ - uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_BMCR, ul_value); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -2; - return uc_rc; - } - - /* - * Set the Auto_negotiation Advertisement Register. - * MII advertising for Next page. - * 100BaseTxFD and HD, 10BaseTFD and HD, IEEE 802.3. - */ - ul_phy_anar = GMII_100TX_FDX | GMII_100TX_HDX | GMII_10_FDX | GMII_10_HDX | - GMII_AN_IEEE_802_3; - uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_ANAR, ul_phy_anar); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -3; - return uc_rc; - } - - /* Read & modify control register */ - uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_BMCR, &ul_value); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -4; - return uc_rc; - } - - ul_value |= GMII_SPEED_SELECT | GMII_AUTONEG | GMII_DUPLEX_MODE; - uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_BMCR, ul_value); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -5; - return uc_rc; - } - - /* Restart auto negotiation */ - ul_value |= (uint32_t)GMII_RESTART_AUTONEG; - ul_value &= ~(uint32_t)GMII_ISOLATE; - uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_BMCR, ul_value); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -6; - return uc_rc; - } - - /* Check if auto negotiation is completed */ - while (1) { - uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_BMSR, &ul_value); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -7; - return uc_rc; - } - /* Done successfully */ - if (ul_value & GMII_AUTONEG_COMP) { - break; - } - - /* Timeout check */ - if (ul_retry_max) { - if (++ul_retry_count >= ul_retry_max) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -8; - return GMAC_TIMEOUT; - } - } - } - - /* Get the auto negotiate link partner base page */ - uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_PCR1, &phy_props.phy_params); - if (uc_rc != GMAC_OK) { - gmac_enable_management(p_gmac, false); -phy_props.phy_result = -9; - return uc_rc; - } - - - /* Set up the GMAC link speed */ - if ((ul_phy_anar & phy_props.phy_params) & GMII_100TX_FDX) { - /* Set MII for 100BaseTX and Full Duplex */ - uc_speed = true; - uc_fd = true; - } else if ((ul_phy_anar & phy_props.phy_params) & GMII_10_FDX) { - /* Set MII for 10BaseT and Full Duplex */ - uc_speed = false; - uc_fd = true; - } else if ((ul_phy_anar & phy_props.phy_params) & GMII_100TX_HDX) { - /* Set MII for 100BaseTX and half Duplex */ - uc_speed = true; - uc_fd = false; - } else if ((ul_phy_anar & phy_props.phy_params) & GMII_10_HDX) { - /* Set MII for 10BaseT and half Duplex */ - uc_speed = false; - uc_fd = false; - } - - gmac_set_speed(p_gmac, uc_speed); - gmac_enable_full_duplex(p_gmac, uc_fd); - - /* Select Media Independent Interface type */ - gmac_select_mii_mode(p_gmac, ETH_PHY_MODE); - - gmac_enable_transmit(GMAC, true); - gmac_enable_receive(GMAC, true); - - gmac_enable_management(p_gmac, false); -phy_props.phy_result = 1; - return uc_rc; -} - -/** - * \brief Issue a SW reset to reset all registers of the PHY. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * - * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_reset(Gmac *p_gmac, uint8_t uc_phy_addr) -{ - uint32_t ul_bmcr = GMII_RESET; - uint8_t uc_phy_address = uc_phy_addr; - uint32_t ul_timeout = ETH_PHY_TIMEOUT; - uint8_t uc_rc = GMAC_TIMEOUT; - - gmac_enable_management(p_gmac, true); - - ul_bmcr = GMII_RESET; - gmac_phy_write(p_gmac, uc_phy_address, GMII_BMCR, ul_bmcr); - - do { - gmac_phy_read(p_gmac, uc_phy_address, GMII_BMCR, &ul_bmcr); - ul_timeout--; - } while ((ul_bmcr & GMII_RESET) && ul_timeout); - - gmac_enable_management(p_gmac, false); - - if (!ul_timeout) { - uc_rc = GMAC_OK; - } - - return (uc_rc); -} - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -} -#endif -/**INDENT-ON**/ -/// @endcond - -/** - * \} - */ + /** + * \file + * + * \brief API driver for KSZ8051MNL PHY component. + * + * Copyright (c) 2013 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + */ + +/* Standard includes. */ +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "FreeRTOSIPConfig.h" + +#include "ethernet_phy.h" +#include "instance/gmac.h" + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +extern "C" { +#endif +/**INDENT-ON**/ +/// @endcond + +/** + * \defgroup ksz8051mnl_ethernet_phy_group PHY component (KSZ8051MNL) + * + * Driver for the ksz8051mnl component. This driver provides access to the main + * features of the PHY. + * + * \section dependencies Dependencies + * This driver depends on the following modules: + * - \ref gmac_group Ethernet Media Access Controller (GMAC) module. + * + * @{ + */ + +SPhyProps phyProps; + +/* Max PHY number */ +#define ETH_PHY_MAX_ADDR 31 + +/* Ethernet PHY operation max retry count */ +#define ETH_PHY_RETRY_MAX 1000000 + +/* Ethernet PHY operation timeout */ +#define ETH_PHY_TIMEOUT 10 + +/** + * \brief Find a valid PHY Address ( from addrStart to 31 ). + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * \param uc_start_addr Start address of the PHY to be searched. + * + * \return 0xFF when no valid PHY address is found. + */ +int ethernet_phy_addr = 0; +static uint8_t ethernet_phy_find_valid(Gmac *p_gmac, uint8_t uc_phy_addr, + uint8_t uc_start_addr) +{ + uint32_t ul_value = 0; + uint8_t uc_cnt; + uint8_t uc_phy_address = uc_phy_addr; + + gmac_enable_management(p_gmac, true); +/* +#define GMII_OUI_MSB 0x0022 +#define GMII_OUI_LSB 0x05 + +PHYID1 = 0x0022 +PHYID2 = 0x1550 +0001_0101_0101_0000 = 0x1550 <= mask should be 0xFFF0 +*/ + /* Check the current PHY address */ + gmac_phy_read(p_gmac, uc_phy_addr, GMII_PHYID1, &ul_value); + + /* Find another one */ + if (ul_value != GMII_OUI_MSB) { + ethernet_phy_addr = 0xFF; + for (uc_cnt = uc_start_addr; uc_cnt <= ETH_PHY_MAX_ADDR; uc_cnt++) { + uc_phy_address = (uc_phy_address + 1) & 0x1F; + ul_value = 0; + gmac_phy_read(p_gmac, uc_phy_address, GMII_PHYID1, &ul_value); + if (ul_value == GMII_OUI_MSB) { + ethernet_phy_addr = uc_phy_address; + break; + } + } + } + + gmac_enable_management(p_gmac, false); + + if (ethernet_phy_addr != 0xFF) { + gmac_phy_read(p_gmac, uc_phy_address, GMII_BMSR, &ul_value); + } + return ethernet_phy_addr; +} + + +/** + * \brief Perform a HW initialization to the PHY and set up clocks. + * + * This should be called only once to initialize the PHY pre-settings. + * The PHY address is the reset status of CRS, RXD[3:0] (the emacPins' pullups). + * The COL pin is used to select MII mode on reset (pulled up for Reduced MII). + * The RXDV pin is used to select test mode on reset (pulled up for test mode). + * The above pins should be predefined for corresponding settings in resetPins. + * The GMAC peripheral pins are configured after the reset is done. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * \param ul_mck GMAC MCK. + * + * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_init(Gmac *p_gmac, uint8_t uc_phy_addr, uint32_t mck) +{ + uint8_t uc_rc = GMAC_TIMEOUT; + uint8_t uc_phy; + + ethernet_phy_reset(GMAC,uc_phy_addr); + + /* Configure GMAC runtime clock */ + uc_rc = gmac_set_mdc_clock(p_gmac, mck); + if (uc_rc != GMAC_OK) { + return 0; + } + + /* Check PHY Address */ + uc_phy = ethernet_phy_find_valid(p_gmac, uc_phy_addr, 0); + if (uc_phy == 0xFF) { + return 0; + } + if (uc_phy != uc_phy_addr) { + ethernet_phy_reset(p_gmac, uc_phy_addr); + } + phy_props.phy_chn = uc_phy; + return uc_phy; +} + + +/** + * \brief Get the Link & speed settings, and automatically set up the GMAC with the + * settings. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * \param uc_apply_setting_flag Set to 0 to not apply the PHY configurations, else to apply. + * + * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_set_link(Gmac *p_gmac, uint8_t uc_phy_addr, + uint8_t uc_apply_setting_flag) +{ + uint32_t ul_stat1; + uint32_t ul_stat2; + uint8_t uc_phy_address, uc_speed = true, uc_fd = true; + uint8_t uc_rc = GMAC_TIMEOUT; + + gmac_enable_management(p_gmac, true); + + uc_phy_address = uc_phy_addr; + + uc_rc = gmac_phy_read(p_gmac, uc_phy_address, GMII_BMSR, &ul_stat1); + if (uc_rc != GMAC_OK) { + /* Disable PHY management and start the GMAC transfer */ + gmac_enable_management(p_gmac, false); + + return uc_rc; + } + if ((ul_stat1 & GMII_LINK_STATUS) == 0) { + /* Disable PHY management and start the GMAC transfer */ + gmac_enable_management(p_gmac, false); + + return GMAC_INVALID; + } + + if (uc_apply_setting_flag == 0) { + /* Disable PHY management and start the GMAC transfer */ + gmac_enable_management(p_gmac, false); + + return uc_rc; + } + + /* Read advertisement */ + uc_rc = gmac_phy_read(p_gmac, uc_phy_address, GMII_ANAR, &ul_stat2); +phy_props.phy_stat1 = ul_stat1; +phy_props.phy_stat2 = ul_stat2; + if (uc_rc != GMAC_OK) { + /* Disable PHY management and start the GMAC transfer */ + gmac_enable_management(p_gmac, false); + + return uc_rc; + } + + if ((ul_stat1 & GMII_100BASE_TX_FD) && (ul_stat2 & GMII_100TX_FDX)) { + /* Set GMAC for 100BaseTX and Full Duplex */ + uc_speed = true; + uc_fd = true; + } else + if ((ul_stat1 & GMII_100BASE_T4_HD) && (ul_stat2 & GMII_100TX_HDX)) { + /* Set MII for 100BaseTX and Half Duplex */ + uc_speed = true; + uc_fd = false; + } else + if ((ul_stat1 & GMII_10BASE_T_FD) && (ul_stat2 & GMII_10_FDX)) { + /* Set MII for 10BaseT and Full Duplex */ + uc_speed = false; + uc_fd = true; + } else + if ((ul_stat1 & GMII_10BASE_T_HD) && (ul_stat2 & GMII_10_HDX)) { + /* Set MII for 10BaseT and Half Duplex */ + uc_speed = false; + uc_fd = false; + } + + gmac_set_speed(p_gmac, uc_speed); + gmac_enable_full_duplex(p_gmac, uc_fd); + + /* Start the GMAC transfers */ + gmac_enable_management(p_gmac, false); + return uc_rc; +} + +PhyProps_t phy_props; + +/** + * \brief Issue an auto negotiation of the PHY. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * + * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_auto_negotiate(Gmac *p_gmac, uint8_t uc_phy_addr) +{ + uint32_t ul_retry_max = ETH_PHY_RETRY_MAX; + uint32_t ul_value; + uint32_t ul_phy_anar; + uint32_t ul_retry_count = 0; + uint8_t uc_speed = 0; + uint8_t uc_fd=0; + uint8_t uc_rc = GMAC_TIMEOUT; + + gmac_enable_management(p_gmac, true); + + /* Set up control register */ + uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_BMCR, &ul_value); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -1; + return uc_rc; + } + + ul_value &= ~(uint32_t)GMII_AUTONEG; /* Remove auto-negotiation enable */ + ul_value &= ~(uint32_t)(GMII_LOOPBACK | GMII_POWER_DOWN); + ul_value |= (uint32_t)GMII_ISOLATE; /* Electrically isolate PHY */ + uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_BMCR, ul_value); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -2; + return uc_rc; + } + + /* + * Set the Auto_negotiation Advertisement Register. + * MII advertising for Next page. + * 100BaseTxFD and HD, 10BaseTFD and HD, IEEE 802.3. + */ + ul_phy_anar = GMII_100TX_FDX | GMII_100TX_HDX | GMII_10_FDX | GMII_10_HDX | + GMII_AN_IEEE_802_3; + uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_ANAR, ul_phy_anar); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -3; + return uc_rc; + } + + /* Read & modify control register */ + uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_BMCR, &ul_value); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -4; + return uc_rc; + } + + ul_value |= GMII_SPEED_SELECT | GMII_AUTONEG | GMII_DUPLEX_MODE; + uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_BMCR, ul_value); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -5; + return uc_rc; + } + + /* Restart auto negotiation */ + ul_value |= (uint32_t)GMII_RESTART_AUTONEG; + ul_value &= ~(uint32_t)GMII_ISOLATE; + uc_rc = gmac_phy_write(p_gmac, uc_phy_addr, GMII_BMCR, ul_value); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -6; + return uc_rc; + } + + /* Check if auto negotiation is completed */ + while (1) { + uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_BMSR, &ul_value); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -7; + return uc_rc; + } + /* Done successfully */ + if (ul_value & GMII_AUTONEG_COMP) { + break; + } + + /* Timeout check */ + if (ul_retry_max) { + if (++ul_retry_count >= ul_retry_max) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -8; + return GMAC_TIMEOUT; + } + } + } + + /* Get the auto negotiate link partner base page */ + uc_rc = gmac_phy_read(p_gmac, uc_phy_addr, GMII_PCR1, &phy_props.phy_params); + if (uc_rc != GMAC_OK) { + gmac_enable_management(p_gmac, false); +phy_props.phy_result = -9; + return uc_rc; + } + + + /* Set up the GMAC link speed */ + if ((ul_phy_anar & phy_props.phy_params) & GMII_100TX_FDX) { + /* Set MII for 100BaseTX and Full Duplex */ + uc_speed = true; + uc_fd = true; + } else if ((ul_phy_anar & phy_props.phy_params) & GMII_10_FDX) { + /* Set MII for 10BaseT and Full Duplex */ + uc_speed = false; + uc_fd = true; + } else if ((ul_phy_anar & phy_props.phy_params) & GMII_100TX_HDX) { + /* Set MII for 100BaseTX and half Duplex */ + uc_speed = true; + uc_fd = false; + } else if ((ul_phy_anar & phy_props.phy_params) & GMII_10_HDX) { + /* Set MII for 10BaseT and half Duplex */ + uc_speed = false; + uc_fd = false; + } + + gmac_set_speed(p_gmac, uc_speed); + gmac_enable_full_duplex(p_gmac, uc_fd); + + /* Select Media Independent Interface type */ + gmac_select_mii_mode(p_gmac, ETH_PHY_MODE); + + gmac_enable_transmit(GMAC, true); + gmac_enable_receive(GMAC, true); + + gmac_enable_management(p_gmac, false); +phy_props.phy_result = 1; + return uc_rc; +} + +/** + * \brief Issue a SW reset to reset all registers of the PHY. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * + * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_reset(Gmac *p_gmac, uint8_t uc_phy_addr) +{ + uint32_t ul_bmcr = GMII_RESET; + uint8_t uc_phy_address = uc_phy_addr; + uint32_t ul_timeout = ETH_PHY_TIMEOUT; + uint8_t uc_rc = GMAC_TIMEOUT; + + gmac_enable_management(p_gmac, true); + + ul_bmcr = GMII_RESET; + gmac_phy_write(p_gmac, uc_phy_address, GMII_BMCR, ul_bmcr); + + do { + gmac_phy_read(p_gmac, uc_phy_address, GMII_BMCR, &ul_bmcr); + ul_timeout--; + } while ((ul_bmcr & GMII_RESET) && ul_timeout); + + gmac_enable_management(p_gmac, false); + + if (!ul_timeout) { + uc_rc = GMAC_OK; + } + + return (uc_rc); +} + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +} +#endif +/**INDENT-ON**/ +/// @endcond + +/** + * \} + */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.h index 8ea5fa0c7..6729df0fe 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/ethernet_phy.h @@ -1,281 +1,281 @@ -/** - * \file - * - * \brief KSZ8051MNL (Ethernet PHY) driver for SAM. - * - * Copyright (c) 2013 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - -#ifndef ETHERNET_PHY_H_INCLUDED -#define ETHERNET_PHY_H_INCLUDED - -#include "compiler.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// IEEE defined Registers -#define GMII_BMCR 0x00 // Basic Control -#define GMII_BMSR 0x01 // Basic Status -#define GMII_PHYID1 0x02 // PHY Idendifier 1 -#define GMII_PHYID2 0x03 // PHY Idendifier 2 -#define GMII_ANAR 0x04 // Auto_Negotiation Advertisement -#define GMII_ANLPAR 0x05 // Auto_negotiation Link Partner Ability -#define GMII_ANER 0x06 // Auto-negotiation Expansion -#define GMII_ANNPR 0x07 // Auto-negotiation Next Page -#define GMII_ANLPNPAR 0x08 // Link Partner Next Page Ability -//#define GMII_1000BTCR 9 // 1000Base-T Control // Reserved -//#define GMII_1000BTSR 10 // 1000Base-T Status // Reserved -#define GMII_AFECR1 0x11 // AFE Control 1 -//#define GMII_ERDWR 12 // Extend Register - Data Write Register -//#define GMII_ERDRR 13 // Extend Register - Data Read Register -//14 reserved -#define GMII_RXERCR 0x15 // RXER Counter - - #define PHY_REG_01_BMSR 0x01 // Basic mode status register - #define PHY_REG_02_PHYSID1 0x02 // PHYS ID 1 - #define PHY_REG_03_PHYSID2 0x03 // PHYS ID 2 - #define PHY_REG_04_ADVERTISE 0x04 // Advertisement control reg - #define PHY_REG_05_LPA 0x05 // Link partner ability reg - #define PHY_REG_06_ANER 0x06 // 6 RW Auto-Negotiation Expansion Register - #define PHY_REG_07_ANNPTR 0x07 // 7 RW Auto-Negotiation Next Page TX - #define PHY_REG_08_RESERVED0 0x08 // 0x08..0x0Fh 8-15 RW RESERVED - - #define PHY_REG_10_PHYSTS 0x10 // 16 RO PHY Status Register - #define PHY_REG_11_MICR 0x11 // 17 RW MII Interrupt Control Register - #define PHY_REG_12_MISR 0x12 // 18 RO MII Interrupt Status Register - #define PHY_REG_13_RESERVED1 0x13 // 19 RW RESERVED - #define PHY_REG_14_FCSCR 0x14 // 20 RO False Carrier Sense Counter Register - #define PHY_REG_15_RECR 0x15 // 21 RO Receive Error Counter Register - #define PHY_REG_16_PCSR 0x16 // 22 RW PCS Sub-Layer Configuration and Status Register - #define PHY_REG_17_RBR 0x17 // 23 RW RMII and Bypass Register - #define PHY_REG_18_LEDCR 0x18 // 24 RW LED Direct Control Register - #define PHY_REG_19_PHYCR 0x19 // 25 RW PHY Control Register - #define PHY_REG_1A_10BTSCR 0x1A // 26 RW 10Base-T Status/Control Register - #define PHY_REG_1B_CDCTRL1 0x1B // 27 RW CD Test Control Register and BIST Extensions Register - #define PHY_REG_1B_INT_CTRL 0x1B // 27 RW KSZ8041NL interrupt control - #define PHY_REG_1C_RESERVED2 0x1C // 28 RW RESERVED - #define PHY_REG_1D_EDCR 0x1D // 29 RW Energy Detect Control Register - #define PHY_REG_1E_RESERVED3 0x1E // - #define PHY_REG_1F_RESERVED4 0x1F // 30-31 RW RESERVED - - #define PHY_REG_1E_PHYCR_1 0x1E // - #define PHY_REG_1F_PHYCR_2 0x1F // - - #define PHY_SPEED_10 1 - #define PHY_SPEED_100 2 - #define PHY_SPEED_AUTO (PHY_SPEED_10|PHY_SPEED_100) - - #define PHY_MDIX_DIRECT 1 - #define PHY_MDIX_CROSSED 2 - #define PHY_MDIX_AUTO (PHY_MDIX_CROSSED|PHY_MDIX_DIRECT) - - #define PHY_DUPLEX_HALF 1 - #define PHY_DUPLEX_FULL 2 - #define PHY_DUPLEX_AUTO (PHY_DUPLEX_FULL|PHY_DUPLEX_HALF) - - typedef struct _SPhyProps { - unsigned char speed; - unsigned char mdix; - unsigned char duplex; - unsigned char spare; - } SPhyProps; - - const char *phyPrintable (const SPhyProps *apProps); - - extern SPhyProps phyProps; - -#define GMII_OMSOR 0x16 // Operation Mode Strap Override -#define GMII_OMSSR 0x17 // Operation Mode Strap Status -#define GMII_ECR 0x18 // Expanded Control -//#define GMII_DPPSR 19 // Digital PMA/PCS Status -//20 reserved -//#define GMII_RXERCR 21 // RXER Counter Register -//22-26 reserved -#define GMII_ICSR 0x1B // Interrupt Control/Status -//#define GMII_DDC1R 28 // Digital Debug Control 1 Register -#define GMII_LCSR 0x1D // LinkMD Control/Status - -//29-30 reserved -#define GMII_PCR1 0x1E // PHY Control 1 -#define GMII_PCR2 0x1F // PHY Control 2 - -/* -//Extend Registers -#define GMII_CCR 256 // Common Control Register -#define GMII_SSR 257 // Strap Status Register -#define GMII_OMSOR 258 // Operation Mode Strap Override Register -#define GMII_OMSSR 259 // Operation Mode Strap Status Register -#define GMII_RCCPSR 260 // RGMII Clock and Control Pad Skew Register -#define GMII_RRDPSR 261 // RGMII RX Data Pad Skew Register -#define GMII_ATR 263 // Analog Test Register -*/ - - -// Bit definitions: GMII_BMCR 0x00 Basic Control -#define GMII_RESET (1 << 15) // 1= Software Reset; 0=Normal Operation -#define GMII_LOOPBACK (1 << 14) // 1=loopback Enabled; 0=Normal Operation -#define GMII_SPEED_SELECT (1 << 13) // 1=100Mbps; 0=10Mbps -#define GMII_AUTONEG (1 << 12) // Auto-negotiation Enable -#define GMII_POWER_DOWN (1 << 11) // 1=Power down 0=Normal operation -#define GMII_ISOLATE (1 << 10) // 1 = Isolates 0 = Normal operation -#define GMII_RESTART_AUTONEG (1 << 9) // 1 = Restart auto-negotiation 0 = Normal operation -#define GMII_DUPLEX_MODE (1 << 8) // 1 = Full duplex operation 0 = Normal operation -#define GMII_COLLISION_TEST (1 << 7) // 1 = Enable COL test; 0 = Disable COL test -//#define GMII_SPEED_SELECT_MSB (1 << 6) // Reserved -// Reserved 6 to 0 // Read as 0, ignore on write - -// Bit definitions: GMII_BMSR 0x01 Basic Status -#define GMII_100BASE_T4 (1 << 15) // 100BASE-T4 Capable -#define GMII_100BASE_TX_FD (1 << 14) // 100BASE-TX Full Duplex Capable -#define GMII_100BASE_T4_HD (1 << 13) // 100BASE-TX Half Duplex Capable -#define GMII_10BASE_T_FD (1 << 12) // 10BASE-T Full Duplex Capable -#define GMII_10BASE_T_HD (1 << 11) // 10BASE-T Half Duplex Capable -// Reserved 10 to79 // Read as 0, ignore on write -//#define GMII_EXTEND_STATUS (1 << 8) // 1 = Extend Status Information In Reg 15 -// Reserved 7 -#define GMII_MF_PREAMB_SUPPR (1 << 6) // MII Frame Preamble Suppression -#define GMII_AUTONEG_COMP (1 << 5) // Auto-negotiation Complete -#define GMII_REMOTE_FAULT (1 << 4) // Remote Fault -#define GMII_AUTONEG_ABILITY (1 << 3) // Auto Configuration Ability -#define GMII_LINK_STATUS (1 << 2) // Link Status -#define GMII_JABBER_DETECT (1 << 1) // Jabber Detect -#define GMII_EXTEND_CAPAB (1 << 0) // Extended Capability - - -// Bit definitions: GMII_PHYID1 0x02 PHY Idendifier 1 -// Bit definitions: GMII_PHYID2 0x03 PHY Idendifier 2 -#define GMII_LSB_MASK 0x3F -#define GMII_OUI_MSB 0x0022 -#define GMII_OUI_LSB 0x05 - - -// Bit definitions: GMII_ANAR 0x04 Auto_Negotiation Advertisement -// Bit definitions: GMII_ANLPAR 0x05 Auto_negotiation Link Partner Ability -#define GMII_NP (1 << 15) // Next page Indication -// Reserved 7 -#define GMII_RF (1 << 13) // Remote Fault -// Reserved 12 // Write as 0, ignore on read -#define GMII_PAUSE_MASK (3 << 11) // 0,0 = No Pause 1,0 = Asymmetric Pause(link partner) - // 0,1 = Symmetric Pause 1,1 = Symmetric&Asymmetric Pause(local device) -#define GMII_100T4 (1 << 9) // 100BASE-T4 Support -#define GMII_100TX_FDX (1 << 8) // 100BASE-TX Full Duplex Support -#define GMII_100TX_HDX (1 << 7) // 100BASE-TX Support -#define GMII_10_FDX (1 << 6) // 10BASE-T Full Duplex Support -#define GMII_10_HDX (1 << 5) // 10BASE-T Support -// Selector 4 to 0 // Protocol Selection Bits -#define GMII_AN_IEEE_802_3 0x0001 // [00001] = IEEE 802.3 - - -// Bit definitions: GMII_ANER 0x06 Auto-negotiation Expansion -// Reserved 15 to 5 // Read as 0, ignore on write -#define GMII_PDF (1 << 4) // Local Device Parallel Detection Fault -#define GMII_LP_NP_ABLE (1 << 3) // Link Partner Next Page Able -#define GMII_NP_ABLE (1 << 2) // Local Device Next Page Able -#define GMII_PAGE_RX (1 << 1) // New Page Received -#define GMII_LP_AN_ABLE (1 << 0) // Link Partner Auto-negotiation Able - -/** - * \brief Perform a HW initialization to the PHY and set up clocks. - * - * This should be called only once to initialize the PHY pre-settings. - * The PHY address is the reset status of CRS, RXD[3:0] (the GmacPins' pullups). - * The COL pin is used to select MII mode on reset (pulled up for Reduced MII). - * The RXDV pin is used to select test mode on reset (pulled up for test mode). - * The above pins should be predefined for corresponding settings in resetPins. - * The GMAC peripheral pins are configured after the reset is done. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * \param ul_mck GMAC MCK. - * - * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_init(Gmac *p_gmac, uint8_t uc_phy_addr, uint32_t ul_mck); - - -/** - * \brief Get the Link & speed settings, and automatically set up the GMAC with the - * settings. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * \param uc_apply_setting_flag Set to 0 to not apply the PHY configurations, else to apply. - * - * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_set_link(Gmac *p_gmac, uint8_t uc_phy_addr, - uint8_t uc_apply_setting_flag); - - -/** - * \brief Issue an auto negotiation of the PHY. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * - * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_auto_negotiate(Gmac *p_gmac, uint8_t uc_phy_addr); - -/** - * \brief Issue a SW reset to reset all registers of the PHY. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * - * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t ethernet_phy_reset(Gmac *p_gmac, uint8_t uc_phy_addr); - -typedef struct xPHY_PROPS { - signed char phy_result; - uint32_t phy_params; - uint32_t phy_stat1; - uint32_t phy_stat2; - unsigned char phy_chn; -} PhyProps_t; -extern PhyProps_t phy_props; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* #ifndef ETHERNET_PHY_H_INCLUDED */ - +/** + * \file + * + * \brief KSZ8051MNL (Ethernet PHY) driver for SAM. + * + * Copyright (c) 2013 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + */ + +#ifndef ETHERNET_PHY_H_INCLUDED +#define ETHERNET_PHY_H_INCLUDED + +#include "compiler.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// IEEE defined Registers +#define GMII_BMCR 0x00 // Basic Control +#define GMII_BMSR 0x01 // Basic Status +#define GMII_PHYID1 0x02 // PHY Idendifier 1 +#define GMII_PHYID2 0x03 // PHY Idendifier 2 +#define GMII_ANAR 0x04 // Auto_Negotiation Advertisement +#define GMII_ANLPAR 0x05 // Auto_negotiation Link Partner Ability +#define GMII_ANER 0x06 // Auto-negotiation Expansion +#define GMII_ANNPR 0x07 // Auto-negotiation Next Page +#define GMII_ANLPNPAR 0x08 // Link Partner Next Page Ability +//#define GMII_1000BTCR 9 // 1000Base-T Control // Reserved +//#define GMII_1000BTSR 10 // 1000Base-T Status // Reserved +#define GMII_AFECR1 0x11 // AFE Control 1 +//#define GMII_ERDWR 12 // Extend Register - Data Write Register +//#define GMII_ERDRR 13 // Extend Register - Data Read Register +//14 reserved +#define GMII_RXERCR 0x15 // RXER Counter + + #define PHY_REG_01_BMSR 0x01 // Basic mode status register + #define PHY_REG_02_PHYSID1 0x02 // PHYS ID 1 + #define PHY_REG_03_PHYSID2 0x03 // PHYS ID 2 + #define PHY_REG_04_ADVERTISE 0x04 // Advertisement control reg + #define PHY_REG_05_LPA 0x05 // Link partner ability reg + #define PHY_REG_06_ANER 0x06 // 6 RW Auto-Negotiation Expansion Register + #define PHY_REG_07_ANNPTR 0x07 // 7 RW Auto-Negotiation Next Page TX + #define PHY_REG_08_RESERVED0 0x08 // 0x08..0x0Fh 8-15 RW RESERVED + + #define PHY_REG_10_PHYSTS 0x10 // 16 RO PHY Status Register + #define PHY_REG_11_MICR 0x11 // 17 RW MII Interrupt Control Register + #define PHY_REG_12_MISR 0x12 // 18 RO MII Interrupt Status Register + #define PHY_REG_13_RESERVED1 0x13 // 19 RW RESERVED + #define PHY_REG_14_FCSCR 0x14 // 20 RO False Carrier Sense Counter Register + #define PHY_REG_15_RECR 0x15 // 21 RO Receive Error Counter Register + #define PHY_REG_16_PCSR 0x16 // 22 RW PCS Sub-Layer Configuration and Status Register + #define PHY_REG_17_RBR 0x17 // 23 RW RMII and Bypass Register + #define PHY_REG_18_LEDCR 0x18 // 24 RW LED Direct Control Register + #define PHY_REG_19_PHYCR 0x19 // 25 RW PHY Control Register + #define PHY_REG_1A_10BTSCR 0x1A // 26 RW 10Base-T Status/Control Register + #define PHY_REG_1B_CDCTRL1 0x1B // 27 RW CD Test Control Register and BIST Extensions Register + #define PHY_REG_1B_INT_CTRL 0x1B // 27 RW KSZ8041NL interrupt control + #define PHY_REG_1C_RESERVED2 0x1C // 28 RW RESERVED + #define PHY_REG_1D_EDCR 0x1D // 29 RW Energy Detect Control Register + #define PHY_REG_1E_RESERVED3 0x1E // + #define PHY_REG_1F_RESERVED4 0x1F // 30-31 RW RESERVED + + #define PHY_REG_1E_PHYCR_1 0x1E // + #define PHY_REG_1F_PHYCR_2 0x1F // + + #define PHY_SPEED_10 1 + #define PHY_SPEED_100 2 + #define PHY_SPEED_AUTO (PHY_SPEED_10|PHY_SPEED_100) + + #define PHY_MDIX_DIRECT 1 + #define PHY_MDIX_CROSSED 2 + #define PHY_MDIX_AUTO (PHY_MDIX_CROSSED|PHY_MDIX_DIRECT) + + #define PHY_DUPLEX_HALF 1 + #define PHY_DUPLEX_FULL 2 + #define PHY_DUPLEX_AUTO (PHY_DUPLEX_FULL|PHY_DUPLEX_HALF) + + typedef struct _SPhyProps { + unsigned char speed; + unsigned char mdix; + unsigned char duplex; + unsigned char spare; + } SPhyProps; + + const char *phyPrintable (const SPhyProps *apProps); + + extern SPhyProps phyProps; + +#define GMII_OMSOR 0x16 // Operation Mode Strap Override +#define GMII_OMSSR 0x17 // Operation Mode Strap Status +#define GMII_ECR 0x18 // Expanded Control +//#define GMII_DPPSR 19 // Digital PMA/PCS Status +//20 reserved +//#define GMII_RXERCR 21 // RXER Counter Register +//22-26 reserved +#define GMII_ICSR 0x1B // Interrupt Control/Status +//#define GMII_DDC1R 28 // Digital Debug Control 1 Register +#define GMII_LCSR 0x1D // LinkMD Control/Status + +//29-30 reserved +#define GMII_PCR1 0x1E // PHY Control 1 +#define GMII_PCR2 0x1F // PHY Control 2 + +/* +//Extend Registers +#define GMII_CCR 256 // Common Control Register +#define GMII_SSR 257 // Strap Status Register +#define GMII_OMSOR 258 // Operation Mode Strap Override Register +#define GMII_OMSSR 259 // Operation Mode Strap Status Register +#define GMII_RCCPSR 260 // RGMII Clock and Control Pad Skew Register +#define GMII_RRDPSR 261 // RGMII RX Data Pad Skew Register +#define GMII_ATR 263 // Analog Test Register +*/ + + +// Bit definitions: GMII_BMCR 0x00 Basic Control +#define GMII_RESET (1 << 15) // 1= Software Reset; 0=Normal Operation +#define GMII_LOOPBACK (1 << 14) // 1=loopback Enabled; 0=Normal Operation +#define GMII_SPEED_SELECT (1 << 13) // 1=100Mbps; 0=10Mbps +#define GMII_AUTONEG (1 << 12) // Auto-negotiation Enable +#define GMII_POWER_DOWN (1 << 11) // 1=Power down 0=Normal operation +#define GMII_ISOLATE (1 << 10) // 1 = Isolates 0 = Normal operation +#define GMII_RESTART_AUTONEG (1 << 9) // 1 = Restart auto-negotiation 0 = Normal operation +#define GMII_DUPLEX_MODE (1 << 8) // 1 = Full duplex operation 0 = Normal operation +#define GMII_COLLISION_TEST (1 << 7) // 1 = Enable COL test; 0 = Disable COL test +//#define GMII_SPEED_SELECT_MSB (1 << 6) // Reserved +// Reserved 6 to 0 // Read as 0, ignore on write + +// Bit definitions: GMII_BMSR 0x01 Basic Status +#define GMII_100BASE_T4 (1 << 15) // 100BASE-T4 Capable +#define GMII_100BASE_TX_FD (1 << 14) // 100BASE-TX Full Duplex Capable +#define GMII_100BASE_T4_HD (1 << 13) // 100BASE-TX Half Duplex Capable +#define GMII_10BASE_T_FD (1 << 12) // 10BASE-T Full Duplex Capable +#define GMII_10BASE_T_HD (1 << 11) // 10BASE-T Half Duplex Capable +// Reserved 10 to79 // Read as 0, ignore on write +//#define GMII_EXTEND_STATUS (1 << 8) // 1 = Extend Status Information In Reg 15 +// Reserved 7 +#define GMII_MF_PREAMB_SUPPR (1 << 6) // MII Frame Preamble Suppression +#define GMII_AUTONEG_COMP (1 << 5) // Auto-negotiation Complete +#define GMII_REMOTE_FAULT (1 << 4) // Remote Fault +#define GMII_AUTONEG_ABILITY (1 << 3) // Auto Configuration Ability +#define GMII_LINK_STATUS (1 << 2) // Link Status +#define GMII_JABBER_DETECT (1 << 1) // Jabber Detect +#define GMII_EXTEND_CAPAB (1 << 0) // Extended Capability + + +// Bit definitions: GMII_PHYID1 0x02 PHY Idendifier 1 +// Bit definitions: GMII_PHYID2 0x03 PHY Idendifier 2 +#define GMII_LSB_MASK 0x3F +#define GMII_OUI_MSB 0x0022 +#define GMII_OUI_LSB 0x05 + + +// Bit definitions: GMII_ANAR 0x04 Auto_Negotiation Advertisement +// Bit definitions: GMII_ANLPAR 0x05 Auto_negotiation Link Partner Ability +#define GMII_NP (1 << 15) // Next page Indication +// Reserved 7 +#define GMII_RF (1 << 13) // Remote Fault +// Reserved 12 // Write as 0, ignore on read +#define GMII_PAUSE_MASK (3 << 11) // 0,0 = No Pause 1,0 = Asymmetric Pause(link partner) + // 0,1 = Symmetric Pause 1,1 = Symmetric&Asymmetric Pause(local device) +#define GMII_100T4 (1 << 9) // 100BASE-T4 Support +#define GMII_100TX_FDX (1 << 8) // 100BASE-TX Full Duplex Support +#define GMII_100TX_HDX (1 << 7) // 100BASE-TX Support +#define GMII_10_FDX (1 << 6) // 10BASE-T Full Duplex Support +#define GMII_10_HDX (1 << 5) // 10BASE-T Support +// Selector 4 to 0 // Protocol Selection Bits +#define GMII_AN_IEEE_802_3 0x0001 // [00001] = IEEE 802.3 + + +// Bit definitions: GMII_ANER 0x06 Auto-negotiation Expansion +// Reserved 15 to 5 // Read as 0, ignore on write +#define GMII_PDF (1 << 4) // Local Device Parallel Detection Fault +#define GMII_LP_NP_ABLE (1 << 3) // Link Partner Next Page Able +#define GMII_NP_ABLE (1 << 2) // Local Device Next Page Able +#define GMII_PAGE_RX (1 << 1) // New Page Received +#define GMII_LP_AN_ABLE (1 << 0) // Link Partner Auto-negotiation Able + +/** + * \brief Perform a HW initialization to the PHY and set up clocks. + * + * This should be called only once to initialize the PHY pre-settings. + * The PHY address is the reset status of CRS, RXD[3:0] (the GmacPins' pullups). + * The COL pin is used to select MII mode on reset (pulled up for Reduced MII). + * The RXDV pin is used to select test mode on reset (pulled up for test mode). + * The above pins should be predefined for corresponding settings in resetPins. + * The GMAC peripheral pins are configured after the reset is done. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * \param ul_mck GMAC MCK. + * + * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_init(Gmac *p_gmac, uint8_t uc_phy_addr, uint32_t ul_mck); + + +/** + * \brief Get the Link & speed settings, and automatically set up the GMAC with the + * settings. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * \param uc_apply_setting_flag Set to 0 to not apply the PHY configurations, else to apply. + * + * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_set_link(Gmac *p_gmac, uint8_t uc_phy_addr, + uint8_t uc_apply_setting_flag); + + +/** + * \brief Issue an auto negotiation of the PHY. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * + * Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_auto_negotiate(Gmac *p_gmac, uint8_t uc_phy_addr); + +/** + * \brief Issue a SW reset to reset all registers of the PHY. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * + * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t ethernet_phy_reset(Gmac *p_gmac, uint8_t uc_phy_addr); + +typedef struct xPHY_PROPS { + signed char phy_result; + uint32_t phy_params; + uint32_t phy_stat1; + uint32_t phy_stat2; + unsigned char phy_chn; +} PhyProps_t; +extern PhyProps_t phy_props; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* #ifndef ETHERNET_PHY_H_INCLUDED */ + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.c index 948f9a661..e4a3ba988 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.c @@ -1,944 +1,944 @@ - /** - * \file - * - * \brief GMAC (Ethernet MAC) driver for SAM. - * - * Copyright (c) 2013 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - -/* Standard includes. */ -#include -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" - -#include "FreeRTOSIPConfig.h" - -#include "compiler.h" -#include "instance/gmac.h" -#include "ethernet_phy.h" - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -extern "C" { -#endif -/**INDENT-ON**/ -/// @endcond - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (int)( sizeof(x) / sizeof(x)[0] ) -#endif -/** - * \defgroup gmac_group Ethernet Media Access Controller - * - * See \ref gmac_quickstart. - * - * Driver for the GMAC (Ethernet Media Access Controller). - * This file contains basic functions for the GMAC, with support for all modes, settings - * and clock speeds. - * - * \section dependencies Dependencies - * This driver does not depend on other modules. - * - * @{ - */ - -/** TX descriptor lists */ -COMPILER_ALIGNED(8) -static gmac_tx_descriptor_t gs_tx_desc[ GMAC_TX_BUFFERS ]; -#if( GMAC_USES_TX_CALLBACK != 0 ) -/** TX callback lists */ -static gmac_dev_tx_cb_t gs_tx_callback[ GMAC_TX_BUFFERS ]; -#endif -/** RX descriptors lists */ -COMPILER_ALIGNED(8) -static gmac_rx_descriptor_t gs_rx_desc[ GMAC_RX_BUFFERS ]; - -#if( ipconfigZERO_COPY_TX_DRIVER == 0 ) - /** Send Buffer. Section 3.6 of AMBA 2.0 spec states that burst should not cross the - * 1K Boundaries. Receive buffer manager write operations are burst of 2 words => 3 lsb bits - * of the address shall be set to 0. - */ - COMPILER_ALIGNED(8) - static uint8_t gs_uc_tx_buffer[ GMAC_TX_BUFFERS * GMAC_TX_UNITSIZE ]; -#endif /* ipconfigZERO_COPY_TX_DRIVER */ - -/** Receive Buffer */ -COMPILER_ALIGNED(8) -static uint8_t gs_uc_rx_buffer[ GMAC_RX_BUFFERS * GMAC_RX_UNITSIZE ]; - -/** - * GMAC device memory management struct. - */ -typedef struct gmac_dev_mem { - /* Pointer to allocated buffer for RX. The address should be 8-byte aligned - and the size should be GMAC_RX_UNITSIZE * wRxSize. */ - uint8_t *p_rx_buffer; - /* Pointer to allocated RX descriptor list. */ - gmac_rx_descriptor_t *p_rx_dscr; - /* RX size, in number of registered units (RX descriptors). */ - /* Increased size from 16- to 32-bits, because it's more efficient */ - uint32_t us_rx_size; - /* Pointer to allocated buffer for TX. The address should be 8-byte aligned - and the size should be GMAC_TX_UNITSIZE * wTxSize. */ - uint8_t *p_tx_buffer; - /* Pointer to allocated TX descriptor list. */ - gmac_tx_descriptor_t *p_tx_dscr; - /* TX size, in number of registered units (TX descriptors). */ - uint32_t us_tx_size; -} gmac_dev_mem_t; - -/** Return count in buffer */ -#define CIRC_CNT( head, tail, size ) ( ( ( head ) - ( tail ) ) % ( size ) ) - -/* - * Return space available, from 0 to size-1. - * Always leave one free char as a completely full buffer that has (head == tail), - * which is the same as empty. - */ -#define CIRC_SPACE( head, tail, size ) CIRC_CNT( ( tail ), ( ( head ) + 1 ), ( size ) ) - -/** Circular buffer is empty ? */ -#define CIRC_EMPTY( head, tail ) ( head == tail ) -/** Clear circular buffer */ -#define CIRC_CLEAR( head, tail ) do { ( head ) = 0; ( tail ) = 0; } while( 0 ) - -/** Increment head or tail */ -static __inline void circ_inc32( int32_t *lHeadOrTail, uint32_t ulSize ) -{ - ( *lHeadOrTail ) ++; - if( ( *lHeadOrTail ) >= ( int32_t )ulSize ) - { - ( *lHeadOrTail ) = 0; - } -} - -/** - * \brief Wait PHY operation to be completed. - * - * \param p_gmac HW controller address. - * \param ul_retry The retry times, 0 to wait forever until completeness. - * - * Return GMAC_OK if the operation is completed successfully. - */ -static uint8_t gmac_wait_phy(Gmac* p_gmac, const uint32_t ul_retry) -{ - volatile uint32_t ul_retry_count = 0; - const uint32_t xPHYPollDelay = pdMS_TO_TICKS( 1ul ); - - while (!gmac_is_phy_idle(p_gmac)) { - if (ul_retry == 0) { - continue; - } - - ul_retry_count++; - - if (ul_retry_count >= ul_retry) { - return GMAC_TIMEOUT; - } - - /* Block the task to allow other tasks to execute while the PHY - is not connected. */ - vTaskDelay( xPHYPollDelay ); - } - return GMAC_OK; -} - -/** - * \brief Disable transfer, reset registers and descriptor lists. - * - * \param p_dev Pointer to GMAC driver instance. - * - */ -static void gmac_reset_tx_mem(gmac_device_t* p_dev) -{ - Gmac *p_hw = p_dev->p_hw; - uint8_t *p_tx_buff = p_dev->p_tx_buffer; - gmac_tx_descriptor_t *p_td = p_dev->p_tx_dscr; - - uint32_t ul_index; - uint32_t ul_address; - - /* Disable TX */ - gmac_enable_transmit(p_hw, 0); - - /* Set up the TX descriptors */ - CIRC_CLEAR(p_dev->l_tx_head, p_dev->l_tx_tail); - for( ul_index = 0; ul_index < p_dev->ul_tx_list_size; ul_index++ ) - { - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - ul_address = (uint32_t) 0u; - } - #else - { - ul_address = (uint32_t) (&(p_tx_buff[ul_index * GMAC_TX_UNITSIZE])); - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - p_td[ul_index].addr = ul_address; - p_td[ul_index].status.val = GMAC_TXD_USED; - } - p_td[p_dev->ul_tx_list_size - 1].status.val = - GMAC_TXD_USED | GMAC_TXD_WRAP; - - /* Set transmit buffer queue */ - gmac_set_tx_queue(p_hw, (uint32_t) p_td); -} - -/** - * \brief Disable receiver, reset registers and descriptor list. - * - * \param p_drv Pointer to GMAC Driver instance. - */ -static void gmac_reset_rx_mem(gmac_device_t* p_dev) -{ - Gmac *p_hw = p_dev->p_hw; - uint8_t *p_rx_buff = p_dev->p_rx_buffer; - gmac_rx_descriptor_t *pRd = p_dev->p_rx_dscr; - - uint32_t ul_index; - uint32_t ul_address; - - /* Disable RX */ - gmac_enable_receive(p_hw, 0); - - /* Set up the RX descriptors */ - p_dev->ul_rx_idx = 0; - for( ul_index = 0; ul_index < p_dev->ul_rx_list_size; ul_index++ ) - { - ul_address = (uint32_t) (&(p_rx_buff[ul_index * GMAC_RX_UNITSIZE])); - pRd[ul_index].addr.val = ul_address & GMAC_RXD_ADDR_MASK; - pRd[ul_index].status.val = 0; - } - pRd[p_dev->ul_rx_list_size - 1].addr.val |= GMAC_RXD_WRAP; - - /* Set receive buffer queue */ - gmac_set_rx_queue(p_hw, (uint32_t) pRd); -} - - -/** - * \brief Initialize the allocated buffer lists for GMAC driver to transfer data. - * Must be invoked after gmac_dev_init() but before RX/TX starts. - * - * \note If input address is not 8-byte aligned, the address is automatically - * adjusted and the list size is reduced by one. - * - * \param p_gmac Pointer to GMAC instance. - * \param p_gmac_dev Pointer to GMAC device instance. - * \param p_dev_mm Pointer to the GMAC memory management control block. - * \param p_tx_cb Pointer to allocated TX callback list. - * - * \return GMAC_OK or GMAC_PARAM. - */ -static uint8_t gmac_init_mem(Gmac* p_gmac, gmac_device_t* p_gmac_dev, - gmac_dev_mem_t* p_dev_mm -#if( GMAC_USES_TX_CALLBACK != 0 ) - , gmac_dev_tx_cb_t* p_tx_cb -#endif - ) -{ - if (p_dev_mm->us_rx_size <= 1 || p_dev_mm->us_tx_size <= 1 -#if( GMAC_USES_TX_CALLBACK != 0 ) - || p_tx_cb == NULL -#endif - ) { - return GMAC_PARAM; - } - - /* Assign RX buffers */ - if (((uint32_t) p_dev_mm->p_rx_buffer & 0x7) - || ((uint32_t) p_dev_mm->p_rx_dscr & 0x7)) { - p_dev_mm->us_rx_size--; - } - p_gmac_dev->p_rx_buffer = - (uint8_t *) ((uint32_t) p_dev_mm->p_rx_buffer & 0xFFFFFFF8); - p_gmac_dev->p_rx_dscr = - (gmac_rx_descriptor_t *) ((uint32_t) p_dev_mm->p_rx_dscr - & 0xFFFFFFF8); - p_gmac_dev->ul_rx_list_size = p_dev_mm->us_rx_size; - - /* Assign TX buffers */ - if (((uint32_t) p_dev_mm->p_tx_buffer & 0x7) - || ((uint32_t) p_dev_mm->p_tx_dscr & 0x7)) { - p_dev_mm->us_tx_size--; - } - p_gmac_dev->p_tx_buffer = - (uint8_t *) ((uint32_t) p_dev_mm->p_tx_buffer & 0xFFFFFFF8); - p_gmac_dev->p_tx_dscr = - (gmac_tx_descriptor_t *) ((uint32_t) p_dev_mm->p_tx_dscr - & 0xFFFFFFF8); - p_gmac_dev->ul_tx_list_size = p_dev_mm->us_tx_size; -#if( GMAC_USES_TX_CALLBACK != 0 ) - p_gmac_dev->func_tx_cb_list = p_tx_cb; -#endif - /* Reset TX & RX */ - gmac_reset_rx_mem(p_gmac_dev); - gmac_reset_tx_mem(p_gmac_dev); - - /* Enable Rx and Tx, plus the statistics register */ - gmac_enable_transmit(p_gmac, true); - gmac_enable_receive(p_gmac, true); - gmac_enable_statistics_write(p_gmac, true); - - /* Set up the interrupts for transmission and errors */ - gmac_enable_interrupt(p_gmac, - GMAC_IER_RXUBR | /* Enable receive used bit read interrupt. */ - GMAC_IER_TUR | /* Enable transmit underrun interrupt. */ - GMAC_IER_RLEX | /* Enable retry limit exceeded interrupt. */ - GMAC_IER_TFC | /* Enable transmit buffers exhausted in mid-frame interrupt. */ - GMAC_IER_TCOMP | /* Enable transmit complete interrupt. */ - GMAC_IER_ROVR | /* Enable receive overrun interrupt. */ - GMAC_IER_HRESP | /* Enable Hresp not OK interrupt. */ - GMAC_IER_PFNZ | /* Enable pause frame received interrupt. */ - GMAC_IER_PTZ); /* Enable pause time zero interrupt. */ - - return GMAC_OK; -} - -/** - * \brief Read the PHY register. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_address PHY address. - * \param uc_address Register address. - * \param p_value Pointer to a 32-bit location to store read data. - * - * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t gmac_phy_read(Gmac* p_gmac, uint8_t uc_phy_address, uint8_t uc_address, - uint32_t* p_value) -{ - gmac_maintain_phy(p_gmac, uc_phy_address, uc_address, 1, 0); - - if (gmac_wait_phy(p_gmac, MAC_PHY_RETRY_MAX) == GMAC_TIMEOUT) { - return GMAC_TIMEOUT; - } - *p_value = gmac_get_phy_data(p_gmac); - return GMAC_OK; -} - -/** - * \brief Write the PHY register. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_address PHY Address. - * \param uc_address Register Address. - * \param ul_value Data to write, actually 16-bit data. - * - * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. - */ -uint8_t gmac_phy_write(Gmac* p_gmac, uint8_t uc_phy_address, - uint8_t uc_address, uint32_t ul_value) -{ - gmac_maintain_phy(p_gmac, uc_phy_address, uc_address, 0, ul_value); - - if (gmac_wait_phy(p_gmac, MAC_PHY_RETRY_MAX) == GMAC_TIMEOUT) { - return GMAC_TIMEOUT; - } - return GMAC_OK; -} - -/** - * \brief Initialize the GMAC driver. - * - * \param p_gmac Pointer to the GMAC instance. - * \param p_gmac_dev Pointer to the GMAC device instance. - * \param p_opt GMAC configure options. - */ -void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev, - gmac_options_t* p_opt) -{ - gmac_dev_mem_t gmac_dev_mm; - - /* Disable TX & RX and more */ - gmac_network_control(p_gmac, 0); - gmac_disable_interrupt(p_gmac, ~0u); - - - gmac_clear_statistics(p_gmac); - - /* Clear all status bits in the receive status register. */ - gmac_clear_rx_status(p_gmac, GMAC_RSR_RXOVR | GMAC_RSR_REC | GMAC_RSR_BNA); - - /* Clear all status bits in the transmit status register */ - gmac_clear_tx_status(p_gmac, GMAC_TSR_UBR | GMAC_TSR_COL | GMAC_TSR_RLE - | GMAC_TSR_TFC | GMAC_TSR_TXCOMP | GMAC_TSR_UND); - - /* Clear interrupts */ - gmac_get_interrupt_status(p_gmac); -#if !defined(ETHERNET_CONF_DATA_OFFSET) - /* Receive Buffer Offset - * Indicates the number of bytes by which the received data - * is offset from the start of the receive buffer - * which can be handy for alignment reasons */ - /* Note: FreeRTOS+TCP wants to have this offset set to 2 bytes */ - #error ETHERNET_CONF_DATA_OFFSET not defined, assuming 0 -#endif - /* Enable the copy of data into the buffers - ignore broadcasts, and not copy FCS. */ - - gmac_set_configure(p_gmac, - ( gmac_get_configure(p_gmac) & ~GMAC_NCFGR_RXBUFO_Msk ) | - GMAC_NCFGR_RFCS | /* Remove FCS, frame check sequence (last 4 bytes) */ - GMAC_NCFGR_PEN | /* Pause Enable */ - GMAC_NCFGR_RXBUFO( ETHERNET_CONF_DATA_OFFSET ) | - GMAC_RXD_RXCOEN ); - - /* - * GMAC_DCFGR_TXCOEN: (GMAC_DCFGR) Transmitter Checksum Generation Offload Enable. - * Note: tha SAM4E does have RX checksum offloading - * but TX checksum offloading has NOT been implemented. - */ - - gmac_set_dma(p_gmac, - gmac_get_dma(p_gmac) | GMAC_DCFGR_TXCOEN ); - - gmac_enable_copy_all(p_gmac, p_opt->uc_copy_all_frame); - gmac_disable_broadcast(p_gmac, p_opt->uc_no_boardcast); - - /* Fill in GMAC device memory management */ - gmac_dev_mm.p_rx_buffer = gs_uc_rx_buffer; - gmac_dev_mm.p_rx_dscr = gs_rx_desc; - gmac_dev_mm.us_rx_size = GMAC_RX_BUFFERS; - - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - gmac_dev_mm.p_tx_buffer = NULL; - } - #else - { - gmac_dev_mm.p_tx_buffer = gs_uc_tx_buffer; - } - #endif - gmac_dev_mm.p_tx_dscr = gs_tx_desc; - gmac_dev_mm.us_tx_size = GMAC_TX_BUFFERS; - - gmac_init_mem(p_gmac, p_gmac_dev, &gmac_dev_mm -#if( GMAC_USES_TX_CALLBACK != 0 ) - , gs_tx_callback -#endif - ); - - gmac_set_address(p_gmac, 0, p_opt->uc_mac_addr); -} - -/** - * \brief Frames can be read from the GMAC in multiple sections. - * - * Returns > 0 if a complete frame is available - * It also it cleans up incomplete older frames - */ - -static uint32_t gmac_dev_poll(gmac_device_t* p_gmac_dev) -{ - uint32_t ulReturn = 0; - int32_t ulIndex = p_gmac_dev->ul_rx_idx; - gmac_rx_descriptor_t *pxHead = &p_gmac_dev->p_rx_dscr[ulIndex]; - - /* Discard any incomplete frames */ - while ((pxHead->addr.val & GMAC_RXD_OWNERSHIP) && - (pxHead->status.val & GMAC_RXD_SOF) == 0) { - pxHead->addr.val &= ~(GMAC_RXD_OWNERSHIP); - circ_inc32 (&ulIndex, p_gmac_dev->ul_rx_list_size); - pxHead = &p_gmac_dev->p_rx_dscr[ulIndex]; - p_gmac_dev->ul_rx_idx = ulIndex; - #if( GMAC_STATS != 0 ) - { - gmacStats.incompCount++; - } - #endif - } - - while ((pxHead->addr.val & GMAC_RXD_OWNERSHIP) != 0) { - if ((pxHead->status.val & GMAC_RXD_EOF) != 0) { - /* Here a complete frame has been seen with SOF and EOF */ - ulReturn = pxHead->status.bm.len; - break; - } - circ_inc32 (&ulIndex, p_gmac_dev->ul_rx_list_size); - pxHead = &p_gmac_dev->p_rx_dscr[ulIndex]; - if ((pxHead->addr.val & GMAC_RXD_OWNERSHIP) == 0) { - /* CPU is not the owner (yet) */ - break; - } - if ((pxHead->status.val & GMAC_RXD_SOF) != 0) { - /* Strange, we found a new Start Of Frame - * discard previous segments */ - int32_t ulPrev = p_gmac_dev->ul_rx_idx; - pxHead = &p_gmac_dev->p_rx_dscr[ulPrev]; - do { - pxHead->addr.val &= ~(GMAC_RXD_OWNERSHIP); - circ_inc32 (&ulPrev, p_gmac_dev->ul_rx_list_size); - pxHead = &p_gmac_dev->p_rx_dscr[ulPrev]; - #if( GMAC_STATS != 0 ) - { - gmacStats.truncCount++; - } - #endif - } while (ulPrev != ulIndex); - p_gmac_dev->ul_rx_idx = ulIndex; - } - } - return ulReturn; -} - -/** - * \brief Frames can be read from the GMAC in multiple sections. - * Read ul_frame_size bytes from the GMAC receive buffers to pcTo. - * p_rcv_size is the size of the entire frame. Generally gmac_read - * will be repeatedly called until the sum of all the ul_frame_size equals - * the value of p_rcv_size. - * - * \param p_gmac_dev Pointer to the GMAC device instance. - * \param p_frame Address of the frame buffer. - * \param ul_frame_size Length of the frame. - * \param p_rcv_size Received frame size. - * - * \return GMAC_OK if receiving frame successfully, otherwise failed. - */ -uint32_t gmac_dev_read(gmac_device_t* p_gmac_dev, uint8_t* p_frame, - uint32_t ul_frame_size, uint32_t* p_rcv_size) -{ - int32_t nextIdx; /* A copy of the Rx-index 'ul_rx_idx' */ - int32_t bytesLeft = gmac_dev_poll (p_gmac_dev); - gmac_rx_descriptor_t *pxHead; - - if (bytesLeft == 0 ) - { - return GMAC_RX_NULL; - } - - /* gmac_dev_poll has confirmed that there is a complete frame at - * the current position 'ul_rx_idx' - */ - nextIdx = p_gmac_dev->ul_rx_idx; - - /* Read +2 bytes because buffers are aligned at -2 bytes */ - bytesLeft = min( bytesLeft + 2, ( int32_t )ul_frame_size ); - - /* The frame will be copied in 1 or 2 memcpy's */ - if( ( p_frame != NULL ) && ( bytesLeft != 0 ) ) - { - const uint8_t *source; - int32_t left; - int32_t toCopy; - - source = p_gmac_dev->p_rx_buffer + nextIdx * GMAC_RX_UNITSIZE; - left = bytesLeft; - toCopy = ( p_gmac_dev->ul_rx_list_size - nextIdx ) * GMAC_RX_UNITSIZE; - if(toCopy > left ) - { - toCopy = left; - } - memcpy (p_frame, source, toCopy); - left -= toCopy; - - if( left != 0ul ) - { - memcpy (p_frame + toCopy, (void*)p_gmac_dev->p_rx_buffer, left); - } - } - - do - { - pxHead = &p_gmac_dev->p_rx_dscr[nextIdx]; - pxHead->addr.val &= ~(GMAC_RXD_OWNERSHIP); - circ_inc32 (&nextIdx, p_gmac_dev->ul_rx_list_size); - } while ((pxHead->status.val & GMAC_RXD_EOF) == 0); - - p_gmac_dev->ul_rx_idx = nextIdx; - - *p_rcv_size = bytesLeft; - - return GMAC_OK; -} - - -extern void vGMACGenerateChecksum( uint8_t *apBuffer ); - -/** - * \brief Send ulLength bytes from pcFrom. This copies the buffer to one of the - * GMAC Tx buffers, and then indicates to the GMAC that the buffer is ready. - * If lEndOfFrame is true then the data being copied is the end of the frame - * and the frame can be transmitted. - * - * \param p_gmac_dev Pointer to the GMAC device instance. - * \param p_buffer Pointer to the data buffer. - * \param ul_size Length of the frame. - * \param func_tx_cb Transmit callback function. - * - * \return Length sent. - */ -uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer, - uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb) -{ - - volatile gmac_tx_descriptor_t *p_tx_td; -#if( GMAC_USES_TX_CALLBACK != 0 ) - volatile gmac_dev_tx_cb_t *p_func_tx_cb; -#endif - - Gmac *p_hw = p_gmac_dev->p_hw; - -#if( GMAC_USES_TX_CALLBACK == 0 ) - ( void )func_tx_cb; -#endif - - /* Check parameter */ - if (ul_size > GMAC_TX_UNITSIZE) { - return GMAC_PARAM; - } - - /* Pointers to the current transmit descriptor */ - p_tx_td = &p_gmac_dev->p_tx_dscr[p_gmac_dev->l_tx_head]; - - /* If no free TxTd, buffer can't be sent, schedule the wakeup callback */ -// if (CIRC_SPACE(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail, -// p_gmac_dev->ul_tx_list_size) == 0) - { - if ((p_tx_td->status.val & GMAC_TXD_USED) == 0) - return GMAC_TX_BUSY; - } -#if( GMAC_USES_TX_CALLBACK != 0 ) - /* Pointers to the current Tx callback */ - p_func_tx_cb = &p_gmac_dev->func_tx_cb_list[p_gmac_dev->l_tx_head]; -#endif - - /* Set up/copy data to transmission buffer */ - if (p_buffer && ul_size) { - /* Driver manages the ring buffer */ - /* Calculating the checksum here is faster than calculating it from the GMAC buffer - * because withing p_buffer, it is well aligned */ - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* Zero-copy... */ - p_tx_td->addr = ( uint32_t ) p_buffer; - } - #else - { - /* Or Memcopy... */ - memcpy((void *)p_tx_td->addr, p_buffer, ul_size); - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - vGMACGenerateChecksum( ( uint8_t * ) p_tx_td->addr ); - } - -#if( GMAC_USES_TX_CALLBACK != 0 ) - /* Tx callback */ - *p_func_tx_cb = func_tx_cb; -#endif - - /* Update transmit descriptor status */ - - /* The buffer size defined is the length of ethernet frame, - so it's always the last buffer of the frame. */ - if( p_gmac_dev->l_tx_head == ( int32_t )( p_gmac_dev->ul_tx_list_size - 1 ) ) - { - /* No need to 'and' with GMAC_TXD_LEN_MASK because ul_size has been checked */ - p_tx_td->status.val = - ul_size | GMAC_TXD_LAST | GMAC_TXD_WRAP; - } else { - p_tx_td->status.val = - ul_size | GMAC_TXD_LAST; - } - - circ_inc32( &p_gmac_dev->l_tx_head, p_gmac_dev->ul_tx_list_size ); - - /* Now start to transmit if it is still not done */ - gmac_start_transmission(p_hw); - - return GMAC_OK; -} - -/** - * \brief Get current load of transmit. - * - * \param p_gmac_dev Pointer to the GMAC device instance. - * - * \return Current load of transmit. - */ -#if( GMAC_USES_TX_CALLBACK != 0 ) -/* Without defining GMAC_USES_TX_CALLBACK, l_tx_tail won't be updated */ -uint32_t gmac_dev_get_tx_load(gmac_device_t* p_gmac_dev) -{ - uint16_t us_head = p_gmac_dev->l_tx_head; - uint16_t us_tail = p_gmac_dev->l_tx_tail; - return CIRC_CNT(us_head, us_tail, p_gmac_dev->ul_tx_list_size); -} -#endif - -/** - * \brief Register/Clear RX callback. Callback will be invoked after the next received - * frame. - * - * When gmac_dev_read() returns GMAC_RX_NULL, the application task calls - * gmac_dev_set_rx_callback() to register func_rx_cb() callback and enters suspend state. - * The callback is in charge to resume the task once a new frame has been - * received. The next time gmac_dev_read() is called, it will be successful. - * - * This function is usually invoked from the RX callback itself with NULL - * callback, to unregister. Once the callback has resumed the application task, - * there is no need to invoke the callback again. - * - * \param p_gmac_dev Pointer to the GMAC device instance. - * \param func_tx_cb Receive callback function. - */ -void gmac_dev_set_rx_callback(gmac_device_t* p_gmac_dev, - gmac_dev_rx_cb_t func_rx_cb) -{ - Gmac *p_hw = p_gmac_dev->p_hw; - - if (func_rx_cb == NULL) { - gmac_disable_interrupt(p_hw, GMAC_IDR_RCOMP); - p_gmac_dev->func_rx_cb = NULL; - } else { - p_gmac_dev->func_rx_cb = func_rx_cb; - gmac_enable_interrupt(p_hw, GMAC_IER_RCOMP); - } -} - -/** - * \brief Register/Clear TX wakeup callback. - * - * When gmac_dev_write() returns GMAC_TX_BUSY (all transmit descriptor busy), the application - * task calls gmac_dev_set_tx_wakeup_callback() to register func_wakeup() callback and - * enters suspend state. The callback is in charge to resume the task once - * several transmit descriptors have been released. The next time gmac_dev_write() will be called, - * it shall be successful. - * - * This function is usually invoked with NULL callback from the TX wakeup - * callback itself, to unregister. Once the callback has resumed the - * application task, there is no need to invoke the callback again. - * - * \param p_gmac_dev Pointer to GMAC device instance. - * \param func_wakeup Pointer to wakeup callback function. - * \param uc_threshold Number of free transmit descriptor before wakeup callback invoked. - * - * \return GMAC_OK, GMAC_PARAM on parameter error. - */ -#if( GMAC_USES_WAKEUP_CALLBACK ) -uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t* p_gmac_dev, - gmac_dev_wakeup_cb_t func_wakeup_cb, uint8_t uc_threshold) -{ - if (func_wakeup_cb == NULL) { - p_gmac_dev->func_wakeup_cb = NULL; - } else { - if (uc_threshold <= p_gmac_dev->ul_tx_list_size) { - p_gmac_dev->func_wakeup_cb = func_wakeup_cb; - p_gmac_dev->uc_wakeup_threshold = uc_threshold; - } else { - return GMAC_PARAM; - } - } - - return GMAC_OK; -} -#endif /* GMAC_USES_WAKEUP_CALLBACK */ - -/** - * \brief Reset TX & RX queue & statistics. - * - * \param p_gmac_dev Pointer to GMAC device instance. - */ -void gmac_dev_reset(gmac_device_t* p_gmac_dev) -{ - Gmac *p_hw = p_gmac_dev->p_hw; - - gmac_reset_rx_mem(p_gmac_dev); - gmac_reset_tx_mem(p_gmac_dev); - gmac_network_control(p_hw, GMAC_NCR_TXEN | GMAC_NCR_RXEN - | GMAC_NCR_WESTAT | GMAC_NCR_CLRSTAT); -} - -void gmac_dev_halt(Gmac* p_gmac); - -void gmac_dev_halt(Gmac* p_gmac) -{ - gmac_network_control(p_gmac, GMAC_NCR_WESTAT | GMAC_NCR_CLRSTAT); - gmac_disable_interrupt(p_gmac, ~0u); -} - - -/** - * \brief GMAC Interrupt handler. - * - * \param p_gmac_dev Pointer to GMAC device instance. - */ - -#if( GMAC_STATS != 0 ) - extern int logPrintf( const char *pcFormat, ... ); - - void gmac_show_irq_counts () - { - int index; - for (index = 0; index < ARRAY_SIZE(intPairs); index++) { - if (gmacStats.intStatus[intPairs[index].index]) { - logPrintf("%s : %6u\n", intPairs[index].name, gmacStats.intStatus[intPairs[index].index]); - } - } - } -#endif - -void gmac_handler(gmac_device_t* p_gmac_dev) -{ - Gmac *p_hw = p_gmac_dev->p_hw; - -#if( GMAC_USES_TX_CALLBACK != 0 ) - gmac_tx_descriptor_t *p_tx_td; - gmac_dev_tx_cb_t *p_tx_cb = NULL; - uint32_t ul_tx_status_flag; -#endif -#if( GMAC_STATS != 0 ) - int index; -#endif - - /* volatile */ uint32_t ul_isr; - /* volatile */ uint32_t ul_rsr; - /* volatile */ uint32_t ul_tsr; - - ul_isr = gmac_get_interrupt_status(p_hw); - ul_rsr = gmac_get_rx_status(p_hw); - ul_tsr = gmac_get_tx_status(p_hw); - -/* Why clear bits that are ignored anyway ? */ -/* ul_isr &= ~(gmac_get_interrupt_mask(p_hw) | 0xF8030300); */ - #if( GMAC_STATS != 0 ) - { - for (index = 0; index < ARRAY_SIZE(intPairs); index++) { - if (ul_isr & intPairs[index].mask) - gmacStats.intStatus[intPairs[index].index]++; - } - } - #endif /* GMAC_STATS != 0 */ - - /* RX packet */ - if ((ul_isr & GMAC_ISR_RCOMP) || (ul_rsr & (GMAC_RSR_REC|GMAC_RSR_RXOVR|GMAC_RSR_BNA))) { - /* Clear status */ - gmac_clear_rx_status(p_hw, ul_rsr); - - if (ul_isr & GMAC_ISR_RCOMP) - ul_rsr |= GMAC_RSR_REC; - /* Invoke callbacks which can be useful to wake op a task */ - if (p_gmac_dev->func_rx_cb) { - p_gmac_dev->func_rx_cb(ul_rsr); - } - } - - /* TX packet */ - if ((ul_isr & GMAC_ISR_TCOMP) || (ul_tsr & (GMAC_TSR_TXCOMP|GMAC_TSR_COL|GMAC_TSR_RLE|GMAC_TSR_UND))) { - -#if( GMAC_USES_TX_CALLBACK != 0 ) - ul_tx_status_flag = GMAC_TSR_TXCOMP; -#endif - /* A frame transmitted */ - - /* Check RLE */ - if (ul_tsr & GMAC_TSR_RLE) { - /* Status RLE & Number of discarded buffers */ -#if( GMAC_USES_TX_CALLBACK != 0 ) - ul_tx_status_flag = GMAC_TSR_RLE | CIRC_CNT(p_gmac_dev->l_tx_head, - p_gmac_dev->l_tx_tail, p_gmac_dev->ul_tx_list_size); - p_tx_cb = &p_gmac_dev->func_tx_cb_list[p_gmac_dev->l_tx_tail]; -#endif - gmac_reset_tx_mem(p_gmac_dev); - gmac_enable_transmit(p_hw, 1); - } - /* Clear status */ - gmac_clear_tx_status(p_hw, ul_tsr); - -#if( GMAC_USES_TX_CALLBACK != 0 ) - if (!CIRC_EMPTY(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail)) { - /* Check the buffers */ - do { - p_tx_td = &p_gmac_dev->p_tx_dscr[p_gmac_dev->l_tx_tail]; - p_tx_cb = &p_gmac_dev->func_tx_cb_list[p_gmac_dev->l_tx_tail]; - /* Any error? Exit if buffer has not been sent yet */ - if ((p_tx_td->status.val & GMAC_TXD_USED) == 0) { - break; - } - - /* Notify upper layer that a packet has been sent */ - if (*p_tx_cb) { - (*p_tx_cb) (ul_tx_status_flag, (void*)p_tx_td->addr); - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - p_tx_td->addr = 0ul; - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - } - - circ_inc32(&p_gmac_dev->l_tx_tail, p_gmac_dev->ul_tx_list_size); - } while (CIRC_CNT(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail, - p_gmac_dev->ul_tx_list_size)); - } - - if (ul_tsr & GMAC_TSR_RLE) { - /* Notify upper layer RLE */ - if (*p_tx_cb) { - (*p_tx_cb) (ul_tx_status_flag, NULL); - } - } -#endif /* GMAC_USES_TX_CALLBACK */ - -#if( GMAC_USES_WAKEUP_CALLBACK ) - /* If a wakeup has been scheduled, notify upper layer that it can - send other packets, and the sending will be successful. */ - if ((CIRC_SPACE(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail, - p_gmac_dev->ul_tx_list_size) >= p_gmac_dev->uc_wakeup_threshold) - && p_gmac_dev->func_wakeup_cb) { - p_gmac_dev->func_wakeup_cb(); - } -#endif - } -} - -//@} - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -} -#endif -/**INDENT-ON**/ -/// @endcond + /** + * \file + * + * \brief GMAC (Ethernet MAC) driver for SAM. + * + * Copyright (c) 2013 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + */ + +/* Standard includes. */ +#include +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" + +#include "FreeRTOSIPConfig.h" + +#include "compiler.h" +#include "instance/gmac.h" +#include "ethernet_phy.h" + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +extern "C" { +#endif +/**INDENT-ON**/ +/// @endcond + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) (int)( sizeof(x) / sizeof(x)[0] ) +#endif +/** + * \defgroup gmac_group Ethernet Media Access Controller + * + * See \ref gmac_quickstart. + * + * Driver for the GMAC (Ethernet Media Access Controller). + * This file contains basic functions for the GMAC, with support for all modes, settings + * and clock speeds. + * + * \section dependencies Dependencies + * This driver does not depend on other modules. + * + * @{ + */ + +/** TX descriptor lists */ +COMPILER_ALIGNED(8) +static gmac_tx_descriptor_t gs_tx_desc[ GMAC_TX_BUFFERS ]; +#if( GMAC_USES_TX_CALLBACK != 0 ) +/** TX callback lists */ +static gmac_dev_tx_cb_t gs_tx_callback[ GMAC_TX_BUFFERS ]; +#endif +/** RX descriptors lists */ +COMPILER_ALIGNED(8) +static gmac_rx_descriptor_t gs_rx_desc[ GMAC_RX_BUFFERS ]; + +#if( ipconfigZERO_COPY_TX_DRIVER == 0 ) + /** Send Buffer. Section 3.6 of AMBA 2.0 spec states that burst should not cross the + * 1K Boundaries. Receive buffer manager write operations are burst of 2 words => 3 lsb bits + * of the address shall be set to 0. + */ + COMPILER_ALIGNED(8) + static uint8_t gs_uc_tx_buffer[ GMAC_TX_BUFFERS * GMAC_TX_UNITSIZE ]; +#endif /* ipconfigZERO_COPY_TX_DRIVER */ + +/** Receive Buffer */ +COMPILER_ALIGNED(8) +static uint8_t gs_uc_rx_buffer[ GMAC_RX_BUFFERS * GMAC_RX_UNITSIZE ]; + +/** + * GMAC device memory management struct. + */ +typedef struct gmac_dev_mem { + /* Pointer to allocated buffer for RX. The address should be 8-byte aligned + and the size should be GMAC_RX_UNITSIZE * wRxSize. */ + uint8_t *p_rx_buffer; + /* Pointer to allocated RX descriptor list. */ + gmac_rx_descriptor_t *p_rx_dscr; + /* RX size, in number of registered units (RX descriptors). */ + /* Increased size from 16- to 32-bits, because it's more efficient */ + uint32_t us_rx_size; + /* Pointer to allocated buffer for TX. The address should be 8-byte aligned + and the size should be GMAC_TX_UNITSIZE * wTxSize. */ + uint8_t *p_tx_buffer; + /* Pointer to allocated TX descriptor list. */ + gmac_tx_descriptor_t *p_tx_dscr; + /* TX size, in number of registered units (TX descriptors). */ + uint32_t us_tx_size; +} gmac_dev_mem_t; + +/** Return count in buffer */ +#define CIRC_CNT( head, tail, size ) ( ( ( head ) - ( tail ) ) % ( size ) ) + +/* + * Return space available, from 0 to size-1. + * Always leave one free char as a completely full buffer that has (head == tail), + * which is the same as empty. + */ +#define CIRC_SPACE( head, tail, size ) CIRC_CNT( ( tail ), ( ( head ) + 1 ), ( size ) ) + +/** Circular buffer is empty ? */ +#define CIRC_EMPTY( head, tail ) ( head == tail ) +/** Clear circular buffer */ +#define CIRC_CLEAR( head, tail ) do { ( head ) = 0; ( tail ) = 0; } while( 0 ) + +/** Increment head or tail */ +static __inline void circ_inc32( int32_t *lHeadOrTail, uint32_t ulSize ) +{ + ( *lHeadOrTail ) ++; + if( ( *lHeadOrTail ) >= ( int32_t )ulSize ) + { + ( *lHeadOrTail ) = 0; + } +} + +/** + * \brief Wait PHY operation to be completed. + * + * \param p_gmac HW controller address. + * \param ul_retry The retry times, 0 to wait forever until completeness. + * + * Return GMAC_OK if the operation is completed successfully. + */ +static uint8_t gmac_wait_phy(Gmac* p_gmac, const uint32_t ul_retry) +{ + volatile uint32_t ul_retry_count = 0; + const uint32_t xPHYPollDelay = pdMS_TO_TICKS( 1ul ); + + while (!gmac_is_phy_idle(p_gmac)) { + if (ul_retry == 0) { + continue; + } + + ul_retry_count++; + + if (ul_retry_count >= ul_retry) { + return GMAC_TIMEOUT; + } + + /* Block the task to allow other tasks to execute while the PHY + is not connected. */ + vTaskDelay( xPHYPollDelay ); + } + return GMAC_OK; +} + +/** + * \brief Disable transfer, reset registers and descriptor lists. + * + * \param p_dev Pointer to GMAC driver instance. + * + */ +static void gmac_reset_tx_mem(gmac_device_t* p_dev) +{ + Gmac *p_hw = p_dev->p_hw; + uint8_t *p_tx_buff = p_dev->p_tx_buffer; + gmac_tx_descriptor_t *p_td = p_dev->p_tx_dscr; + + uint32_t ul_index; + uint32_t ul_address; + + /* Disable TX */ + gmac_enable_transmit(p_hw, 0); + + /* Set up the TX descriptors */ + CIRC_CLEAR(p_dev->l_tx_head, p_dev->l_tx_tail); + for( ul_index = 0; ul_index < p_dev->ul_tx_list_size; ul_index++ ) + { + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + ul_address = (uint32_t) 0u; + } + #else + { + ul_address = (uint32_t) (&(p_tx_buff[ul_index * GMAC_TX_UNITSIZE])); + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + p_td[ul_index].addr = ul_address; + p_td[ul_index].status.val = GMAC_TXD_USED; + } + p_td[p_dev->ul_tx_list_size - 1].status.val = + GMAC_TXD_USED | GMAC_TXD_WRAP; + + /* Set transmit buffer queue */ + gmac_set_tx_queue(p_hw, (uint32_t) p_td); +} + +/** + * \brief Disable receiver, reset registers and descriptor list. + * + * \param p_drv Pointer to GMAC Driver instance. + */ +static void gmac_reset_rx_mem(gmac_device_t* p_dev) +{ + Gmac *p_hw = p_dev->p_hw; + uint8_t *p_rx_buff = p_dev->p_rx_buffer; + gmac_rx_descriptor_t *pRd = p_dev->p_rx_dscr; + + uint32_t ul_index; + uint32_t ul_address; + + /* Disable RX */ + gmac_enable_receive(p_hw, 0); + + /* Set up the RX descriptors */ + p_dev->ul_rx_idx = 0; + for( ul_index = 0; ul_index < p_dev->ul_rx_list_size; ul_index++ ) + { + ul_address = (uint32_t) (&(p_rx_buff[ul_index * GMAC_RX_UNITSIZE])); + pRd[ul_index].addr.val = ul_address & GMAC_RXD_ADDR_MASK; + pRd[ul_index].status.val = 0; + } + pRd[p_dev->ul_rx_list_size - 1].addr.val |= GMAC_RXD_WRAP; + + /* Set receive buffer queue */ + gmac_set_rx_queue(p_hw, (uint32_t) pRd); +} + + +/** + * \brief Initialize the allocated buffer lists for GMAC driver to transfer data. + * Must be invoked after gmac_dev_init() but before RX/TX starts. + * + * \note If input address is not 8-byte aligned, the address is automatically + * adjusted and the list size is reduced by one. + * + * \param p_gmac Pointer to GMAC instance. + * \param p_gmac_dev Pointer to GMAC device instance. + * \param p_dev_mm Pointer to the GMAC memory management control block. + * \param p_tx_cb Pointer to allocated TX callback list. + * + * \return GMAC_OK or GMAC_PARAM. + */ +static uint8_t gmac_init_mem(Gmac* p_gmac, gmac_device_t* p_gmac_dev, + gmac_dev_mem_t* p_dev_mm +#if( GMAC_USES_TX_CALLBACK != 0 ) + , gmac_dev_tx_cb_t* p_tx_cb +#endif + ) +{ + if (p_dev_mm->us_rx_size <= 1 || p_dev_mm->us_tx_size <= 1 +#if( GMAC_USES_TX_CALLBACK != 0 ) + || p_tx_cb == NULL +#endif + ) { + return GMAC_PARAM; + } + + /* Assign RX buffers */ + if (((uint32_t) p_dev_mm->p_rx_buffer & 0x7) + || ((uint32_t) p_dev_mm->p_rx_dscr & 0x7)) { + p_dev_mm->us_rx_size--; + } + p_gmac_dev->p_rx_buffer = + (uint8_t *) ((uint32_t) p_dev_mm->p_rx_buffer & 0xFFFFFFF8); + p_gmac_dev->p_rx_dscr = + (gmac_rx_descriptor_t *) ((uint32_t) p_dev_mm->p_rx_dscr + & 0xFFFFFFF8); + p_gmac_dev->ul_rx_list_size = p_dev_mm->us_rx_size; + + /* Assign TX buffers */ + if (((uint32_t) p_dev_mm->p_tx_buffer & 0x7) + || ((uint32_t) p_dev_mm->p_tx_dscr & 0x7)) { + p_dev_mm->us_tx_size--; + } + p_gmac_dev->p_tx_buffer = + (uint8_t *) ((uint32_t) p_dev_mm->p_tx_buffer & 0xFFFFFFF8); + p_gmac_dev->p_tx_dscr = + (gmac_tx_descriptor_t *) ((uint32_t) p_dev_mm->p_tx_dscr + & 0xFFFFFFF8); + p_gmac_dev->ul_tx_list_size = p_dev_mm->us_tx_size; +#if( GMAC_USES_TX_CALLBACK != 0 ) + p_gmac_dev->func_tx_cb_list = p_tx_cb; +#endif + /* Reset TX & RX */ + gmac_reset_rx_mem(p_gmac_dev); + gmac_reset_tx_mem(p_gmac_dev); + + /* Enable Rx and Tx, plus the statistics register */ + gmac_enable_transmit(p_gmac, true); + gmac_enable_receive(p_gmac, true); + gmac_enable_statistics_write(p_gmac, true); + + /* Set up the interrupts for transmission and errors */ + gmac_enable_interrupt(p_gmac, + GMAC_IER_RXUBR | /* Enable receive used bit read interrupt. */ + GMAC_IER_TUR | /* Enable transmit underrun interrupt. */ + GMAC_IER_RLEX | /* Enable retry limit exceeded interrupt. */ + GMAC_IER_TFC | /* Enable transmit buffers exhausted in mid-frame interrupt. */ + GMAC_IER_TCOMP | /* Enable transmit complete interrupt. */ + GMAC_IER_ROVR | /* Enable receive overrun interrupt. */ + GMAC_IER_HRESP | /* Enable Hresp not OK interrupt. */ + GMAC_IER_PFNZ | /* Enable pause frame received interrupt. */ + GMAC_IER_PTZ); /* Enable pause time zero interrupt. */ + + return GMAC_OK; +} + +/** + * \brief Read the PHY register. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_address PHY address. + * \param uc_address Register address. + * \param p_value Pointer to a 32-bit location to store read data. + * + * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t gmac_phy_read(Gmac* p_gmac, uint8_t uc_phy_address, uint8_t uc_address, + uint32_t* p_value) +{ + gmac_maintain_phy(p_gmac, uc_phy_address, uc_address, 1, 0); + + if (gmac_wait_phy(p_gmac, MAC_PHY_RETRY_MAX) == GMAC_TIMEOUT) { + return GMAC_TIMEOUT; + } + *p_value = gmac_get_phy_data(p_gmac); + return GMAC_OK; +} + +/** + * \brief Write the PHY register. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_address PHY Address. + * \param uc_address Register Address. + * \param ul_value Data to write, actually 16-bit data. + * + * \Return GMAC_OK if successfully, GMAC_TIMEOUT if timeout. + */ +uint8_t gmac_phy_write(Gmac* p_gmac, uint8_t uc_phy_address, + uint8_t uc_address, uint32_t ul_value) +{ + gmac_maintain_phy(p_gmac, uc_phy_address, uc_address, 0, ul_value); + + if (gmac_wait_phy(p_gmac, MAC_PHY_RETRY_MAX) == GMAC_TIMEOUT) { + return GMAC_TIMEOUT; + } + return GMAC_OK; +} + +/** + * \brief Initialize the GMAC driver. + * + * \param p_gmac Pointer to the GMAC instance. + * \param p_gmac_dev Pointer to the GMAC device instance. + * \param p_opt GMAC configure options. + */ +void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev, + gmac_options_t* p_opt) +{ + gmac_dev_mem_t gmac_dev_mm; + + /* Disable TX & RX and more */ + gmac_network_control(p_gmac, 0); + gmac_disable_interrupt(p_gmac, ~0u); + + + gmac_clear_statistics(p_gmac); + + /* Clear all status bits in the receive status register. */ + gmac_clear_rx_status(p_gmac, GMAC_RSR_RXOVR | GMAC_RSR_REC | GMAC_RSR_BNA); + + /* Clear all status bits in the transmit status register */ + gmac_clear_tx_status(p_gmac, GMAC_TSR_UBR | GMAC_TSR_COL | GMAC_TSR_RLE + | GMAC_TSR_TFC | GMAC_TSR_TXCOMP | GMAC_TSR_UND); + + /* Clear interrupts */ + gmac_get_interrupt_status(p_gmac); +#if !defined(ETHERNET_CONF_DATA_OFFSET) + /* Receive Buffer Offset + * Indicates the number of bytes by which the received data + * is offset from the start of the receive buffer + * which can be handy for alignment reasons */ + /* Note: FreeRTOS+TCP wants to have this offset set to 2 bytes */ + #error ETHERNET_CONF_DATA_OFFSET not defined, assuming 0 +#endif + /* Enable the copy of data into the buffers + ignore broadcasts, and not copy FCS. */ + + gmac_set_configure(p_gmac, + ( gmac_get_configure(p_gmac) & ~GMAC_NCFGR_RXBUFO_Msk ) | + GMAC_NCFGR_RFCS | /* Remove FCS, frame check sequence (last 4 bytes) */ + GMAC_NCFGR_PEN | /* Pause Enable */ + GMAC_NCFGR_RXBUFO( ETHERNET_CONF_DATA_OFFSET ) | + GMAC_RXD_RXCOEN ); + + /* + * GMAC_DCFGR_TXCOEN: (GMAC_DCFGR) Transmitter Checksum Generation Offload Enable. + * Note: tha SAM4E does have RX checksum offloading + * but TX checksum offloading has NOT been implemented. + */ + + gmac_set_dma(p_gmac, + gmac_get_dma(p_gmac) | GMAC_DCFGR_TXCOEN ); + + gmac_enable_copy_all(p_gmac, p_opt->uc_copy_all_frame); + gmac_disable_broadcast(p_gmac, p_opt->uc_no_boardcast); + + /* Fill in GMAC device memory management */ + gmac_dev_mm.p_rx_buffer = gs_uc_rx_buffer; + gmac_dev_mm.p_rx_dscr = gs_rx_desc; + gmac_dev_mm.us_rx_size = GMAC_RX_BUFFERS; + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + gmac_dev_mm.p_tx_buffer = NULL; + } + #else + { + gmac_dev_mm.p_tx_buffer = gs_uc_tx_buffer; + } + #endif + gmac_dev_mm.p_tx_dscr = gs_tx_desc; + gmac_dev_mm.us_tx_size = GMAC_TX_BUFFERS; + + gmac_init_mem(p_gmac, p_gmac_dev, &gmac_dev_mm +#if( GMAC_USES_TX_CALLBACK != 0 ) + , gs_tx_callback +#endif + ); + + gmac_set_address(p_gmac, 0, p_opt->uc_mac_addr); +} + +/** + * \brief Frames can be read from the GMAC in multiple sections. + * + * Returns > 0 if a complete frame is available + * It also it cleans up incomplete older frames + */ + +static uint32_t gmac_dev_poll(gmac_device_t* p_gmac_dev) +{ + uint32_t ulReturn = 0; + int32_t ulIndex = p_gmac_dev->ul_rx_idx; + gmac_rx_descriptor_t *pxHead = &p_gmac_dev->p_rx_dscr[ulIndex]; + + /* Discard any incomplete frames */ + while ((pxHead->addr.val & GMAC_RXD_OWNERSHIP) && + (pxHead->status.val & GMAC_RXD_SOF) == 0) { + pxHead->addr.val &= ~(GMAC_RXD_OWNERSHIP); + circ_inc32 (&ulIndex, p_gmac_dev->ul_rx_list_size); + pxHead = &p_gmac_dev->p_rx_dscr[ulIndex]; + p_gmac_dev->ul_rx_idx = ulIndex; + #if( GMAC_STATS != 0 ) + { + gmacStats.incompCount++; + } + #endif + } + + while ((pxHead->addr.val & GMAC_RXD_OWNERSHIP) != 0) { + if ((pxHead->status.val & GMAC_RXD_EOF) != 0) { + /* Here a complete frame has been seen with SOF and EOF */ + ulReturn = pxHead->status.bm.len; + break; + } + circ_inc32 (&ulIndex, p_gmac_dev->ul_rx_list_size); + pxHead = &p_gmac_dev->p_rx_dscr[ulIndex]; + if ((pxHead->addr.val & GMAC_RXD_OWNERSHIP) == 0) { + /* CPU is not the owner (yet) */ + break; + } + if ((pxHead->status.val & GMAC_RXD_SOF) != 0) { + /* Strange, we found a new Start Of Frame + * discard previous segments */ + int32_t ulPrev = p_gmac_dev->ul_rx_idx; + pxHead = &p_gmac_dev->p_rx_dscr[ulPrev]; + do { + pxHead->addr.val &= ~(GMAC_RXD_OWNERSHIP); + circ_inc32 (&ulPrev, p_gmac_dev->ul_rx_list_size); + pxHead = &p_gmac_dev->p_rx_dscr[ulPrev]; + #if( GMAC_STATS != 0 ) + { + gmacStats.truncCount++; + } + #endif + } while (ulPrev != ulIndex); + p_gmac_dev->ul_rx_idx = ulIndex; + } + } + return ulReturn; +} + +/** + * \brief Frames can be read from the GMAC in multiple sections. + * Read ul_frame_size bytes from the GMAC receive buffers to pcTo. + * p_rcv_size is the size of the entire frame. Generally gmac_read + * will be repeatedly called until the sum of all the ul_frame_size equals + * the value of p_rcv_size. + * + * \param p_gmac_dev Pointer to the GMAC device instance. + * \param p_frame Address of the frame buffer. + * \param ul_frame_size Length of the frame. + * \param p_rcv_size Received frame size. + * + * \return GMAC_OK if receiving frame successfully, otherwise failed. + */ +uint32_t gmac_dev_read(gmac_device_t* p_gmac_dev, uint8_t* p_frame, + uint32_t ul_frame_size, uint32_t* p_rcv_size) +{ + int32_t nextIdx; /* A copy of the Rx-index 'ul_rx_idx' */ + int32_t bytesLeft = gmac_dev_poll (p_gmac_dev); + gmac_rx_descriptor_t *pxHead; + + if (bytesLeft == 0 ) + { + return GMAC_RX_NULL; + } + + /* gmac_dev_poll has confirmed that there is a complete frame at + * the current position 'ul_rx_idx' + */ + nextIdx = p_gmac_dev->ul_rx_idx; + + /* Read +2 bytes because buffers are aligned at -2 bytes */ + bytesLeft = min( bytesLeft + 2, ( int32_t )ul_frame_size ); + + /* The frame will be copied in 1 or 2 memcpy's */ + if( ( p_frame != NULL ) && ( bytesLeft != 0 ) ) + { + const uint8_t *source; + int32_t left; + int32_t toCopy; + + source = p_gmac_dev->p_rx_buffer + nextIdx * GMAC_RX_UNITSIZE; + left = bytesLeft; + toCopy = ( p_gmac_dev->ul_rx_list_size - nextIdx ) * GMAC_RX_UNITSIZE; + if(toCopy > left ) + { + toCopy = left; + } + memcpy (p_frame, source, toCopy); + left -= toCopy; + + if( left != 0ul ) + { + memcpy (p_frame + toCopy, (void*)p_gmac_dev->p_rx_buffer, left); + } + } + + do + { + pxHead = &p_gmac_dev->p_rx_dscr[nextIdx]; + pxHead->addr.val &= ~(GMAC_RXD_OWNERSHIP); + circ_inc32 (&nextIdx, p_gmac_dev->ul_rx_list_size); + } while ((pxHead->status.val & GMAC_RXD_EOF) == 0); + + p_gmac_dev->ul_rx_idx = nextIdx; + + *p_rcv_size = bytesLeft; + + return GMAC_OK; +} + + +extern void vGMACGenerateChecksum( uint8_t *apBuffer ); + +/** + * \brief Send ulLength bytes from pcFrom. This copies the buffer to one of the + * GMAC Tx buffers, and then indicates to the GMAC that the buffer is ready. + * If lEndOfFrame is true then the data being copied is the end of the frame + * and the frame can be transmitted. + * + * \param p_gmac_dev Pointer to the GMAC device instance. + * \param p_buffer Pointer to the data buffer. + * \param ul_size Length of the frame. + * \param func_tx_cb Transmit callback function. + * + * \return Length sent. + */ +uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer, + uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb) +{ + + volatile gmac_tx_descriptor_t *p_tx_td; +#if( GMAC_USES_TX_CALLBACK != 0 ) + volatile gmac_dev_tx_cb_t *p_func_tx_cb; +#endif + + Gmac *p_hw = p_gmac_dev->p_hw; + +#if( GMAC_USES_TX_CALLBACK == 0 ) + ( void )func_tx_cb; +#endif + + /* Check parameter */ + if (ul_size > GMAC_TX_UNITSIZE) { + return GMAC_PARAM; + } + + /* Pointers to the current transmit descriptor */ + p_tx_td = &p_gmac_dev->p_tx_dscr[p_gmac_dev->l_tx_head]; + + /* If no free TxTd, buffer can't be sent, schedule the wakeup callback */ +// if (CIRC_SPACE(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail, +// p_gmac_dev->ul_tx_list_size) == 0) + { + if ((p_tx_td->status.val & GMAC_TXD_USED) == 0) + return GMAC_TX_BUSY; + } +#if( GMAC_USES_TX_CALLBACK != 0 ) + /* Pointers to the current Tx callback */ + p_func_tx_cb = &p_gmac_dev->func_tx_cb_list[p_gmac_dev->l_tx_head]; +#endif + + /* Set up/copy data to transmission buffer */ + if (p_buffer && ul_size) { + /* Driver manages the ring buffer */ + /* Calculating the checksum here is faster than calculating it from the GMAC buffer + * because withing p_buffer, it is well aligned */ + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* Zero-copy... */ + p_tx_td->addr = ( uint32_t ) p_buffer; + } + #else + { + /* Or Memcopy... */ + memcpy((void *)p_tx_td->addr, p_buffer, ul_size); + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + vGMACGenerateChecksum( ( uint8_t * ) p_tx_td->addr ); + } + +#if( GMAC_USES_TX_CALLBACK != 0 ) + /* Tx callback */ + *p_func_tx_cb = func_tx_cb; +#endif + + /* Update transmit descriptor status */ + + /* The buffer size defined is the length of ethernet frame, + so it's always the last buffer of the frame. */ + if( p_gmac_dev->l_tx_head == ( int32_t )( p_gmac_dev->ul_tx_list_size - 1 ) ) + { + /* No need to 'and' with GMAC_TXD_LEN_MASK because ul_size has been checked */ + p_tx_td->status.val = + ul_size | GMAC_TXD_LAST | GMAC_TXD_WRAP; + } else { + p_tx_td->status.val = + ul_size | GMAC_TXD_LAST; + } + + circ_inc32( &p_gmac_dev->l_tx_head, p_gmac_dev->ul_tx_list_size ); + + /* Now start to transmit if it is still not done */ + gmac_start_transmission(p_hw); + + return GMAC_OK; +} + +/** + * \brief Get current load of transmit. + * + * \param p_gmac_dev Pointer to the GMAC device instance. + * + * \return Current load of transmit. + */ +#if( GMAC_USES_TX_CALLBACK != 0 ) +/* Without defining GMAC_USES_TX_CALLBACK, l_tx_tail won't be updated */ +uint32_t gmac_dev_get_tx_load(gmac_device_t* p_gmac_dev) +{ + uint16_t us_head = p_gmac_dev->l_tx_head; + uint16_t us_tail = p_gmac_dev->l_tx_tail; + return CIRC_CNT(us_head, us_tail, p_gmac_dev->ul_tx_list_size); +} +#endif + +/** + * \brief Register/Clear RX callback. Callback will be invoked after the next received + * frame. + * + * When gmac_dev_read() returns GMAC_RX_NULL, the application task calls + * gmac_dev_set_rx_callback() to register func_rx_cb() callback and enters suspend state. + * The callback is in charge to resume the task once a new frame has been + * received. The next time gmac_dev_read() is called, it will be successful. + * + * This function is usually invoked from the RX callback itself with NULL + * callback, to unregister. Once the callback has resumed the application task, + * there is no need to invoke the callback again. + * + * \param p_gmac_dev Pointer to the GMAC device instance. + * \param func_tx_cb Receive callback function. + */ +void gmac_dev_set_rx_callback(gmac_device_t* p_gmac_dev, + gmac_dev_rx_cb_t func_rx_cb) +{ + Gmac *p_hw = p_gmac_dev->p_hw; + + if (func_rx_cb == NULL) { + gmac_disable_interrupt(p_hw, GMAC_IDR_RCOMP); + p_gmac_dev->func_rx_cb = NULL; + } else { + p_gmac_dev->func_rx_cb = func_rx_cb; + gmac_enable_interrupt(p_hw, GMAC_IER_RCOMP); + } +} + +/** + * \brief Register/Clear TX wakeup callback. + * + * When gmac_dev_write() returns GMAC_TX_BUSY (all transmit descriptor busy), the application + * task calls gmac_dev_set_tx_wakeup_callback() to register func_wakeup() callback and + * enters suspend state. The callback is in charge to resume the task once + * several transmit descriptors have been released. The next time gmac_dev_write() will be called, + * it shall be successful. + * + * This function is usually invoked with NULL callback from the TX wakeup + * callback itself, to unregister. Once the callback has resumed the + * application task, there is no need to invoke the callback again. + * + * \param p_gmac_dev Pointer to GMAC device instance. + * \param func_wakeup Pointer to wakeup callback function. + * \param uc_threshold Number of free transmit descriptor before wakeup callback invoked. + * + * \return GMAC_OK, GMAC_PARAM on parameter error. + */ +#if( GMAC_USES_WAKEUP_CALLBACK ) +uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t* p_gmac_dev, + gmac_dev_wakeup_cb_t func_wakeup_cb, uint8_t uc_threshold) +{ + if (func_wakeup_cb == NULL) { + p_gmac_dev->func_wakeup_cb = NULL; + } else { + if (uc_threshold <= p_gmac_dev->ul_tx_list_size) { + p_gmac_dev->func_wakeup_cb = func_wakeup_cb; + p_gmac_dev->uc_wakeup_threshold = uc_threshold; + } else { + return GMAC_PARAM; + } + } + + return GMAC_OK; +} +#endif /* GMAC_USES_WAKEUP_CALLBACK */ + +/** + * \brief Reset TX & RX queue & statistics. + * + * \param p_gmac_dev Pointer to GMAC device instance. + */ +void gmac_dev_reset(gmac_device_t* p_gmac_dev) +{ + Gmac *p_hw = p_gmac_dev->p_hw; + + gmac_reset_rx_mem(p_gmac_dev); + gmac_reset_tx_mem(p_gmac_dev); + gmac_network_control(p_hw, GMAC_NCR_TXEN | GMAC_NCR_RXEN + | GMAC_NCR_WESTAT | GMAC_NCR_CLRSTAT); +} + +void gmac_dev_halt(Gmac* p_gmac); + +void gmac_dev_halt(Gmac* p_gmac) +{ + gmac_network_control(p_gmac, GMAC_NCR_WESTAT | GMAC_NCR_CLRSTAT); + gmac_disable_interrupt(p_gmac, ~0u); +} + + +/** + * \brief GMAC Interrupt handler. + * + * \param p_gmac_dev Pointer to GMAC device instance. + */ + +#if( GMAC_STATS != 0 ) + extern int logPrintf( const char *pcFormat, ... ); + + void gmac_show_irq_counts () + { + int index; + for (index = 0; index < ARRAY_SIZE(intPairs); index++) { + if (gmacStats.intStatus[intPairs[index].index]) { + logPrintf("%s : %6u\n", intPairs[index].name, gmacStats.intStatus[intPairs[index].index]); + } + } + } +#endif + +void gmac_handler(gmac_device_t* p_gmac_dev) +{ + Gmac *p_hw = p_gmac_dev->p_hw; + +#if( GMAC_USES_TX_CALLBACK != 0 ) + gmac_tx_descriptor_t *p_tx_td; + gmac_dev_tx_cb_t *p_tx_cb = NULL; + uint32_t ul_tx_status_flag; +#endif +#if( GMAC_STATS != 0 ) + int index; +#endif + + /* volatile */ uint32_t ul_isr; + /* volatile */ uint32_t ul_rsr; + /* volatile */ uint32_t ul_tsr; + + ul_isr = gmac_get_interrupt_status(p_hw); + ul_rsr = gmac_get_rx_status(p_hw); + ul_tsr = gmac_get_tx_status(p_hw); + +/* Why clear bits that are ignored anyway ? */ +/* ul_isr &= ~(gmac_get_interrupt_mask(p_hw) | 0xF8030300); */ + #if( GMAC_STATS != 0 ) + { + for (index = 0; index < ARRAY_SIZE(intPairs); index++) { + if (ul_isr & intPairs[index].mask) + gmacStats.intStatus[intPairs[index].index]++; + } + } + #endif /* GMAC_STATS != 0 */ + + /* RX packet */ + if ((ul_isr & GMAC_ISR_RCOMP) || (ul_rsr & (GMAC_RSR_REC|GMAC_RSR_RXOVR|GMAC_RSR_BNA))) { + /* Clear status */ + gmac_clear_rx_status(p_hw, ul_rsr); + + if (ul_isr & GMAC_ISR_RCOMP) + ul_rsr |= GMAC_RSR_REC; + /* Invoke callbacks which can be useful to wake op a task */ + if (p_gmac_dev->func_rx_cb) { + p_gmac_dev->func_rx_cb(ul_rsr); + } + } + + /* TX packet */ + if ((ul_isr & GMAC_ISR_TCOMP) || (ul_tsr & (GMAC_TSR_TXCOMP|GMAC_TSR_COL|GMAC_TSR_RLE|GMAC_TSR_UND))) { + +#if( GMAC_USES_TX_CALLBACK != 0 ) + ul_tx_status_flag = GMAC_TSR_TXCOMP; +#endif + /* A frame transmitted */ + + /* Check RLE */ + if (ul_tsr & GMAC_TSR_RLE) { + /* Status RLE & Number of discarded buffers */ +#if( GMAC_USES_TX_CALLBACK != 0 ) + ul_tx_status_flag = GMAC_TSR_RLE | CIRC_CNT(p_gmac_dev->l_tx_head, + p_gmac_dev->l_tx_tail, p_gmac_dev->ul_tx_list_size); + p_tx_cb = &p_gmac_dev->func_tx_cb_list[p_gmac_dev->l_tx_tail]; +#endif + gmac_reset_tx_mem(p_gmac_dev); + gmac_enable_transmit(p_hw, 1); + } + /* Clear status */ + gmac_clear_tx_status(p_hw, ul_tsr); + +#if( GMAC_USES_TX_CALLBACK != 0 ) + if (!CIRC_EMPTY(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail)) { + /* Check the buffers */ + do { + p_tx_td = &p_gmac_dev->p_tx_dscr[p_gmac_dev->l_tx_tail]; + p_tx_cb = &p_gmac_dev->func_tx_cb_list[p_gmac_dev->l_tx_tail]; + /* Any error? Exit if buffer has not been sent yet */ + if ((p_tx_td->status.val & GMAC_TXD_USED) == 0) { + break; + } + + /* Notify upper layer that a packet has been sent */ + if (*p_tx_cb) { + (*p_tx_cb) (ul_tx_status_flag, (void*)p_tx_td->addr); + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + p_tx_td->addr = 0ul; + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + } + + circ_inc32(&p_gmac_dev->l_tx_tail, p_gmac_dev->ul_tx_list_size); + } while (CIRC_CNT(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail, + p_gmac_dev->ul_tx_list_size)); + } + + if (ul_tsr & GMAC_TSR_RLE) { + /* Notify upper layer RLE */ + if (*p_tx_cb) { + (*p_tx_cb) (ul_tx_status_flag, NULL); + } + } +#endif /* GMAC_USES_TX_CALLBACK */ + +#if( GMAC_USES_WAKEUP_CALLBACK ) + /* If a wakeup has been scheduled, notify upper layer that it can + send other packets, and the sending will be successful. */ + if ((CIRC_SPACE(p_gmac_dev->l_tx_head, p_gmac_dev->l_tx_tail, + p_gmac_dev->ul_tx_list_size) >= p_gmac_dev->uc_wakeup_threshold) + && p_gmac_dev->func_wakeup_cb) { + p_gmac_dev->func_wakeup_cb(); + } +#endif + } +} + +//@} + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +} +#endif +/**INDENT-ON**/ +/// @endcond diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.h index fca3ece33..d741a2a0a 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/gmac.h @@ -1,1346 +1,1346 @@ - /** - * \file - * - * \brief GMAC (Ethernet MAC) driver for SAM. - * - * Copyright (c) 2013 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - -#ifndef GMAC_H_INCLUDED -#define GMAC_H_INCLUDED - -#include "compiler.h" - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -extern "C" { -#endif -/**INDENT-ON**/ -/// @endcond - -/** The buffer addresses written into the descriptors must be aligned, so the - last few bits are zero. These bits have special meaning for the GMAC - peripheral and cannot be used as part of the address. */ -#define GMAC_RXD_ADDR_MASK 0xFFFFFFFC -#define GMAC_RXD_WRAP (1ul << 1) /**< Wrap bit */ -#define GMAC_RXD_OWNERSHIP (1ul << 0) /**< Ownership bit */ - -#define GMAC_RXD_BROADCAST (1ul << 31) /**< Broadcast detected */ -#define GMAC_RXD_MULTIHASH (1ul << 30) /**< Multicast hash match */ -#define GMAC_RXD_UNIHASH (1ul << 29) /**< Unicast hash match */ -#define GMAC_RXD_ADDR_FOUND (1ul << 27) /**< Specific address match found */ -#define GMAC_RXD_ADDR (3ul << 25) /**< Address match */ -#define GMAC_RXD_RXCOEN (1ul << 24) /**< RXCOEN related function */ -#define GMAC_RXD_TYPE (3ul << 22) /**< Type ID match */ -#define GMAC_RXD_VLAN (1ul << 21) /**< VLAN tag detected */ -#define GMAC_RXD_PRIORITY (1ul << 20) /**< Priority tag detected */ -#define GMAC_RXD_PRIORITY_MASK (3ul << 17) /**< VLAN priority */ -#define GMAC_RXD_CFI (1ul << 16) /**< Concatenation Format Indicator only if bit 21 is set */ -#define GMAC_RXD_EOF (1ul << 15) /**< End of frame */ -#define GMAC_RXD_SOF (1ul << 14) /**< Start of frame */ -#define GMAC_RXD_FCS (1ul << 13) /**< Frame check sequence */ -#define GMAC_RXD_OFFSET_MASK /**< Receive buffer offset */ -#define GMAC_RXD_LEN_MASK (0xFFF) /**< Length of frame including FCS (if selected) */ -#define GMAC_RXD_LENJUMBO_MASK (0x3FFF) /**< Jumbo frame length */ - -#define GMAC_TXD_USED (1ul << 31) /**< Frame is transmitted */ -#define GMAC_TXD_WRAP (1ul << 30) /**< Last descriptor */ -#define GMAC_TXD_ERROR (1ul << 29) /**< Retry limit exceeded, error */ -#define GMAC_TXD_UNDERRUN (1ul << 28) /**< Transmit underrun */ -#define GMAC_TXD_EXHAUSTED (1ul << 27) /**< Buffer exhausted */ -#define GMAC_TXD_LATE (1ul << 26) /**< Late collision,transmit error */ -#define GMAC_TXD_CHECKSUM_ERROR (7ul << 20) /**< Checksum error */ -#define GMAC_TXD_NOCRC (1ul << 16) /**< No CRC */ -#define GMAC_TXD_LAST (1ul << 15) /**< Last buffer in frame */ -#define GMAC_TXD_LEN_MASK (0x1FFF) /**< Length of buffer */ - -/** The MAC can support frame lengths up to 1536 bytes */ -#define GMAC_FRAME_LENTGH_MAX 1536 - -#define GMAC_RX_UNITSIZE 128 /**< Fixed size for RX buffer */ -#define GMAC_TX_UNITSIZE 1518 /**< Size for ETH frame length */ - -/** GMAC clock speed */ -#define GMAC_MCK_SPEED_240MHZ (240*1000*1000) -#define GMAC_MCK_SPEED_160MHZ (160*1000*1000) -#define GMAC_MCK_SPEED_120MHZ (120*1000*1000) -#define GMAC_MCK_SPEED_80MHZ (80*1000*1000) -#define GMAC_MCK_SPEED_40MHZ (40*1000*1000) -#define GMAC_MCK_SPEED_20MHZ (20*1000*1000) - -/** GMAC maintain code default value*/ -#define GMAC_MAN_CODE_VALUE (10) - -/** GMAC maintain start of frame default value*/ -#define GMAC_MAN_SOF_VALUE (1) - -/** GMAC maintain read/write*/ -#define GMAC_MAN_RW_TYPE (2) - -/** GMAC maintain read only*/ -#define GMAC_MAN_READ_ONLY (1) - -/** GMAC address length */ -#define GMAC_ADDR_LENGTH (6) - - -#define GMAC_DUPLEX_HALF 0 -#define GMAC_DUPLEX_FULL 1 - -#define GMAC_SPEED_10M 0 -#define GMAC_SPEED_100M 1 - -/** - * \brief Return codes for GMAC APIs. - */ -typedef enum { - GMAC_OK = 0, /** 0 Operation OK */ - GMAC_TIMEOUT = 1, /** 1 GMAC operation timeout */ - GMAC_TX_BUSY, /** 2 TX in progress */ - GMAC_RX_NULL, /** 3 No data received */ - GMAC_SIZE_TOO_SMALL, /** 4 Buffer size not enough */ - GMAC_PARAM, /** 5 Parameter error, TX packet invalid or RX size too small */ - GMAC_INVALID = 0xFF, /* Invalid */ -} gmac_status_t; - -/** - * \brief Media Independent Interface (MII) type. - */ -typedef enum { - GMAC_PHY_MII = 0, /** MII mode */ - GMAC_PHY_RMII = 1, /** Reduced MII mode */ - GMAC_PHY_INVALID = 0xFF, /* Invalid mode*/ -} gmac_mii_mode_t; - -/** Receive buffer descriptor struct */ -COMPILER_PACK_SET(8) -typedef struct gmac_rx_descriptor { - union gmac_rx_addr { - uint32_t val; - struct gmac_rx_addr_bm { - uint32_t b_ownership:1, /**< User clear, GMAC sets this to 1 once it has successfully written a frame to memory */ - b_wrap:1, /**< Marks last descriptor in receive buffer */ - addr_dw:30; /**< Address in number of DW */ - } bm; - } addr; /**< Address, Wrap & Ownership */ - union gmac_rx_status { - uint32_t val; - struct gmac_rx_status_bm { - uint32_t len:13, /** 0..12 Length of frame including FCS */ - b_fcs:1, /** 13 Receive buffer offset, bits 13:12 of frame length for jumbo frame */ - b_sof:1, /** 14 Start of frame */ - b_eof:1, /** 15 End of frame */ - b_cfi:1, /** 16 Concatenation Format Indicator */ - vlan_priority:3, /** 17..19 VLAN priority (if VLAN detected) */ - b_priority_detected:1, /** 20 Priority tag detected */ - b_vlan_detected:1, /** 21 VLAN tag detected */ - b_type_id_match:2, /** 22..23 Type ID match */ - b_checksumoffload:1, /** 24 Checksum offload specific function */ - b_addrmatch:2, /** 25..26 Address register match */ - b_ext_addr_match:1, /** 27 External address match found */ - reserved:1, /** 28 */ - b_uni_hash_match:1, /** 29 Unicast hash match */ - b_multi_hash_match:1, /** 30 Multicast hash match */ - b_boardcast_detect:1; /** 31 Global broadcast address detected */ - } bm; - } status; -} gmac_rx_descriptor_t; - -/** Transmit buffer descriptor struct */ -COMPILER_PACK_SET(8) -typedef struct gmac_tx_descriptor { - uint32_t addr; - union gmac_tx_status { - uint32_t val; - struct gmac_tx_status_bm { - uint32_t len:14, /** 0..13 Length of buffer */ - reserved:1, /** 14 */ - b_last_buffer:1, /** 15 Last buffer (in the current frame) */ - b_no_crc:1, /** 16 No CRC */ - reserved1:3, /** 17..19 */ - b_checksumoffload:3, /** 20..22 Transmit checksum generation offload errors */ - reserved2:3, /** 23..25 */ - b_lco:1, /** 26 Late collision, transmit error detected */ - b_exhausted:1, /** 27 Buffer exhausted in mid frame */ - b_underrun:1, /** 28 Transmit underrun */ - b_error:1, /** 29 Retry limit exceeded, error detected */ - b_wrap:1, /** 30 Marks last descriptor in TD list */ - b_used:1; /** 31 User clear, GMAC sets this to 1 once a frame has been successfully transmitted */ - } bm; - } status; -} gmac_tx_descriptor_t; - -COMPILER_PACK_RESET() - -/** - * \brief Input parameters when initializing the gmac module mode. - */ -typedef struct gmac_options { - /* Enable/Disable CopyAllFrame */ - uint8_t uc_copy_all_frame; - /* Enable/Disable NoBroadCast */ - uint8_t uc_no_boardcast; - /* MAC address */ - uint8_t uc_mac_addr[GMAC_ADDR_LENGTH]; -} gmac_options_t; - -/** RX callback */ -typedef void (*gmac_dev_tx_cb_t) (uint32_t ul_status); -/** Wakeup callback */ -typedef void (*gmac_dev_wakeup_cb_t) (void); - -/** - * GMAC driver structure. - */ -typedef struct gmac_device { - - /** Pointer to HW register base */ - Gmac *p_hw; - /** - * Pointer to allocated TX buffer. - * Section 3.6 of AMBA 2.0 spec states that burst should not cross - * 1K Boundaries. - * Receive buffer manager writes are burst of 2 words => 3 lsb bits - * of the address shall be set to 0. - */ - uint8_t *p_tx_buffer; - /** Pointer to allocated RX buffer */ - uint8_t *p_rx_buffer; - /** Pointer to Rx TDs (must be 8-byte aligned) */ - gmac_rx_descriptor_t *p_rx_dscr; - /** Pointer to Tx TDs (must be 8-byte aligned) */ - gmac_tx_descriptor_t *p_tx_dscr; - /** Optional callback to be invoked once a frame has been received */ - gmac_dev_tx_cb_t func_rx_cb; -#if( GMAC_USES_WAKEUP_CALLBACK ) - /** Optional callback to be invoked once several TDs have been released */ - gmac_dev_wakeup_cb_t func_wakeup_cb; -#endif -#if( GMAC_USES_TX_CALLBACK != 0 ) - /** Optional callback list to be invoked once TD has been processed */ - gmac_dev_tx_cb_t *func_tx_cb_list; -#endif - /** RX TD list size */ - uint32_t ul_rx_list_size; - /** RX index for current processing TD */ - uint32_t ul_rx_idx; - /** TX TD list size */ - uint32_t ul_tx_list_size; - /** Circular buffer head pointer by upper layer (buffer to be sent) */ - int32_t l_tx_head; - /** Circular buffer tail pointer incremented by handlers (buffer sent) */ - int32_t l_tx_tail; - - /** Number of free TD before wakeup callback is invoked */ - uint32_t uc_wakeup_threshold; -} gmac_device_t; - -/** - * \brief Write network control value. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_ncr Network control value. - */ -static inline void gmac_network_control(Gmac* p_gmac, uint32_t ul_ncr) -{ - p_gmac->GMAC_NCR = ul_ncr; -} - -/** - * \brief Get network control value. - * - * \param p_gmac Pointer to the GMAC instance. - */ - -static inline uint32_t gmac_get_network_control(Gmac* p_gmac) -{ - return p_gmac->GMAC_NCR; -} - -/** - * \brief Enable/Disable GMAC receive. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable GMAC receiver, else to enable it. - */ -static inline void gmac_enable_receive(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_RXEN; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_RXEN; - } -} - -/** - * \brief Enable/Disable GMAC transmit. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable GMAC transmit, else to enable it. - */ -static inline void gmac_enable_transmit(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_TXEN; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_TXEN; - } -} - -/** - * \brief Enable/Disable GMAC management. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable GMAC management, else to enable it. - */ -static inline void gmac_enable_management(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_MPE; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_MPE; - } -} - -/** - * \brief Clear all statistics registers. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_clear_statistics(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_CLRSTAT; -} - -/** - * \brief Increase all statistics registers. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_increase_statistics(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_INCSTAT; -} - -/** - * \brief Enable/Disable statistics registers writing. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the statistics registers writing, else to enable it. - */ -static inline void gmac_enable_statistics_write(Gmac* p_gmac, - uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_WESTAT; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_WESTAT; - } -} - -/** - * \brief In half-duplex mode, forces collisions on all received frames. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the back pressure, else to enable it. - */ -static inline void gmac_enable_back_pressure(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_BP; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_BP; - } -} - -/** - * \brief Start transmission. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_start_transmission(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TSTART; -} - -/** - * \brief Halt transmission. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_halt_transmission(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_THALT; -} - -/** - * \brief Transmit pause frame. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_tx_pause_frame(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TXPF; -} - -/** - * \brief Transmit zero quantum pause frame. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_tx_pause_zero_quantum_frame(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TXZQPF; -} - -/** - * \brief Read snapshot. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_read_snapshot(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_RDS; -} - -/** - * \brief Store receivetime stamp to memory. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to normal operation, else to enable the store. - */ -static inline void gmac_store_rx_time_stamp(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_SRTSM; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_SRTSM; - } -} - -/** - * \brief Enable PFC priority-based pause reception. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 1 to set the reception, 0 to disable. - */ -static inline void gmac_enable_pfc_pause_frame(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_ENPBPR; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_ENPBPR; - } -} - -/** - * \brief Transmit PFC priority-based pause reception. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_transmit_pfc_pause_frame(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TXPBPF; -} - -/** - * \brief Flush next packet. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_flush_next_packet(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_FNP; -} - -/** - * \brief Set up network configuration register. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_cfg Network configuration value. - */ -static inline void gmac_set_configure(Gmac* p_gmac, uint32_t ul_cfg) -{ - p_gmac->GMAC_NCFGR = ul_cfg; -} - -/** - * \brief Get network configuration. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Network configuration. - */ -static inline uint32_t gmac_get_configure(Gmac* p_gmac) -{ - return p_gmac->GMAC_NCFGR; -} - - -/* Get and set DMA Configuration Register */ -static inline void gmac_set_dma(Gmac* p_gmac, uint32_t ul_cfg) -{ - p_gmac->GMAC_DCFGR = ul_cfg; -} - -static inline uint32_t gmac_get_dma(Gmac* p_gmac) -{ - return p_gmac->GMAC_DCFGR; -} - -/** - * \brief Set speed. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_speed 1 to indicate 100Mbps, 0 to 10Mbps. - */ -static inline void gmac_set_speed(Gmac* p_gmac, uint8_t uc_speed) -{ - if (uc_speed) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_SPD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_SPD; - } -} - -/** - * \brief Enable/Disable Full-Duplex mode. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the Full-Duplex mode, else to enable it. - */ -static inline void gmac_enable_full_duplex(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_FD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_FD; - } -} - -/** - * \brief Enable/Disable Copy(Receive) All Valid Frames. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable copying all valid frames, else to enable it. - */ -static inline void gmac_enable_copy_all(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_CAF; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_CAF; - } -} - -/** - * \brief Enable/Disable jumbo frames (up to 10240 bytes). - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the jumbo frames, else to enable it. - */ -static inline void gmac_enable_jumbo_frames(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_JFRAME; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_JFRAME; - } -} - -/** - * \brief Disable/Enable broadcast receiving. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 1 to disable the broadcast, else to enable it. - */ -static inline void gmac_disable_broadcast(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_NBC; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_NBC; - } -} - -/** - * \brief Enable/Disable multicast hash. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the multicast hash, else to enable it. - */ -static inline void gmac_enable_multicast_hash(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_UNIHEN; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_UNIHEN; - } -} - -/** - * \brief Enable/Disable big frames (over 1518, up to 1536). - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable big frames else to enable it. - */ -static inline void gmac_enable_big_frame(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_MAXFS; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_MAXFS; - } -} - -/** - * \brief Set MDC clock divider. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_mck GMAC MCK. - * - * \return GMAC_OK if successfully. - */ -static inline uint8_t gmac_set_mdc_clock(Gmac* p_gmac, uint32_t ul_mck) -{ - uint32_t ul_clk; - - if (ul_mck > GMAC_MCK_SPEED_240MHZ) { - return GMAC_INVALID; - } else if (ul_mck > GMAC_MCK_SPEED_160MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_96; - } else if (ul_mck > GMAC_MCK_SPEED_120MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_64; - } else if (ul_mck > GMAC_MCK_SPEED_80MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_48; - } else if (ul_mck > GMAC_MCK_SPEED_40MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_32; - } else if (ul_mck > GMAC_MCK_SPEED_20MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_16; - } else { - ul_clk = GMAC_NCFGR_CLK_MCK_8; - } - ; - p_gmac->GMAC_NCFGR = (p_gmac->GMAC_NCFGR & ~GMAC_NCFGR_CLK_Msk) | ul_clk; - return GMAC_OK; -} - -/** - * \brief Enable/Disable retry test. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the GMAC receiver, else to enable it. - */ -static inline void gmac_enable_retry_test(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RTY; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RTY; - } -} - -/** - * \brief Enable/Disable pause (when a valid pause frame is received). - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable pause frame, else to enable it. - */ -static inline void gmac_enable_pause_frame(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_PEN; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_PEN; - } -} - -/** - * \brief Set receive buffer offset to 0 ~ 3. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_set_rx_buffer_offset(Gmac* p_gmac, uint8_t uc_offset) -{ - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RXBUFO_Msk; - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RXBUFO(uc_offset); -} - -/** - * \brief Enable/Disable receive length field checking. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable receive length field checking, else to enable it. - */ -static inline void gmac_enable_rx_length_check(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_LFERD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_LFERD; - } -} - -/** - * \brief Enable/Disable discarding FCS field of received frames. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable discarding FCS field of received frames, else to enable it. - */ -static inline void gmac_enable_discard_fcs(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RFCS; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RFCS; - } -} - - -/** - * \brief Enable/Disable frames to be received in half-duplex mode - * while transmitting. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the received in half-duplex mode, else to enable it. - */ -static inline void gmac_enable_efrhd(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_EFRHD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_EFRHD; - } -} - -/** - * \brief Enable/Disable ignore RX FCS. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable ignore RX FCS, else to enable it. - */ -static inline void gmac_enable_ignore_rx_fcs(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_IRXFCS; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_IRXFCS; - } -} - -/** - * \brief Get Network Status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Network status. - */ -static inline uint32_t gmac_get_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_NSR; -} - -/** - * \brief Get MDIO IN pin status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return MDIO IN pin status. - */ -static inline uint8_t gmac_get_MDIO(Gmac* p_gmac) -{ - return ((p_gmac->GMAC_NSR & GMAC_NSR_MDIO) > 0); -} - -/** - * \brief Check if PHY is idle. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return 1 if PHY is idle. - */ -static inline uint8_t gmac_is_phy_idle(Gmac* p_gmac) -{ - return ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) > 0); -} - -/** - * \brief Return transmit status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Transmit status. - */ -static inline uint32_t gmac_get_tx_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_TSR; -} - -/** - * \brief Clear transmit status. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_status Transmit status. - */ -static inline void gmac_clear_tx_status(Gmac* p_gmac, uint32_t ul_status) -{ - p_gmac->GMAC_TSR = ul_status; -} - -/** - * \brief Return receive status. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline uint32_t gmac_get_rx_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_RSR; -} - -/** - * \brief Clear receive status. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_status Receive status. - */ -static inline void gmac_clear_rx_status(Gmac* p_gmac, uint32_t ul_status) -{ - p_gmac->GMAC_RSR = ul_status; -} - -/** - * \brief Set Rx Queue. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_addr Rx queue address. - */ -static inline void gmac_set_rx_queue(Gmac* p_gmac, uint32_t ul_addr) -{ - p_gmac->GMAC_RBQB = GMAC_RBQB_ADDR_Msk & ul_addr; -} - -/** - * \brief Get Rx Queue Address. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Rx queue address. - */ -static inline uint32_t gmac_get_rx_queue(Gmac* p_gmac) -{ - return p_gmac->GMAC_RBQB; -} - -/** - * \brief Set Tx Queue. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_addr Tx queue address. - */ -static inline void gmac_set_tx_queue(Gmac* p_gmac, uint32_t ul_addr) -{ - p_gmac->GMAC_TBQB = GMAC_TBQB_ADDR_Msk & ul_addr; -} - -/** - * \brief Get Tx Queue. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Rx queue address. - */ -static inline uint32_t gmac_get_tx_queue(Gmac* p_gmac) -{ - return p_gmac->GMAC_TBQB; -} - -/** - * \brief Enable interrupt(s). - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_source Interrupt source(s) to be enabled. - */ -static inline void gmac_enable_interrupt(Gmac* p_gmac, uint32_t ul_source) -{ - p_gmac->GMAC_IER = ul_source; -} - -/** - * \brief Disable interrupt(s). - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_source Interrupt source(s) to be disabled. - */ -static inline void gmac_disable_interrupt(Gmac* p_gmac, uint32_t ul_source) -{ - p_gmac->GMAC_IDR = ul_source; -} - -/** - * \brief Return interrupt status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Interrupt status. - */ -static inline uint32_t gmac_get_interrupt_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_ISR; -} - -/** - * \brief Return interrupt mask. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Interrupt mask. - */ -static inline uint32_t gmac_get_interrupt_mask(Gmac* p_gmac) -{ - return p_gmac->GMAC_IMR; -} - -/** - * \brief Execute PHY maintenance command. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * \param uc_reg_addr Register address. - * \param uc_rw 1 to Read, 0 to write. - * \param us_data Data to be performed, write only. - */ -static inline void gmac_maintain_phy(Gmac* p_gmac, - uint8_t uc_phy_addr, uint8_t uc_reg_addr, uint8_t uc_rw, - uint16_t us_data) -{ - /* Wait until bus idle */ - while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); - /* Write maintain register */ - p_gmac->GMAC_MAN = GMAC_MAN_WTN(GMAC_MAN_CODE_VALUE) - | GMAC_MAN_CLTTO - | GMAC_MAN_PHYA(uc_phy_addr) - | GMAC_MAN_REGA(uc_reg_addr) - | GMAC_MAN_OP((uc_rw ? GMAC_MAN_RW_TYPE : GMAC_MAN_READ_ONLY)) - | GMAC_MAN_DATA(us_data); -} - -/** - * \brief Get PHY maintenance data returned. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Get PHY data. - */ -static inline uint16_t gmac_get_phy_data(Gmac* p_gmac) -{ - /* Wait until bus idle */ - while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); - /* Return data */ - return (uint16_t) (p_gmac->GMAC_MAN & GMAC_MAN_DATA_Msk); -} - -/** - * \brief Set Hash. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_hash_top Hash top. - * \param ul_hash_bottom Hash bottom. - */ -static inline void gmac_set_hash(Gmac* p_gmac, uint32_t ul_hash_top, - uint32_t ul_hash_bottom) -{ - p_gmac->GMAC_HRB = ul_hash_bottom; - p_gmac->GMAC_HRT = ul_hash_top; -} - -/** - * \brief Set 64 bits Hash. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ull_hash 64 bits hash value. - */ -static inline void gmac_set_hash64(Gmac* p_gmac, uint64_t ull_hash) -{ - p_gmac->GMAC_HRB = (uint32_t) ull_hash; - p_gmac->GMAC_HRT = (uint32_t) (ull_hash >> 32); -} - -/** - * \brief Set MAC Address. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_index GMAC specific address register index. - * \param p_mac_addr GMAC address. - */ -static inline void gmac_set_address(Gmac* p_gmac, uint8_t uc_index, - uint8_t* p_mac_addr) -{ - p_gmac->GMAC_SA[uc_index].GMAC_SAB = (p_mac_addr[3] << 24) - | (p_mac_addr[2] << 16) - | (p_mac_addr[1] << 8) - | (p_mac_addr[0]); - p_gmac->GMAC_SA[uc_index].GMAC_SAT = (p_mac_addr[5] << 8) - | (p_mac_addr[4]); -} - -/** - * \brief Set MAC Address via 2 dword. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_index GMAC specific address register index. - * \param ul_mac_top GMAC top address. - * \param ul_mac_bottom GMAC bottom address. - */ -static inline void gmac_set_address32(Gmac* p_gmac, uint8_t uc_index, - uint32_t ul_mac_top, uint32_t ul_mac_bottom) -{ - p_gmac->GMAC_SA[uc_index].GMAC_SAB = ul_mac_bottom; - p_gmac->GMAC_SA[uc_index].GMAC_SAT = ul_mac_top; -} - -/** - * \brief Set MAC Address via int64. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_index GMAC specific address register index. - * \param ull_mac 64-bit GMAC address. - */ -static inline void gmac_set_address64(Gmac* p_gmac, uint8_t uc_index, - uint64_t ull_mac) -{ - p_gmac->GMAC_SA[uc_index].GMAC_SAB = (uint32_t) ull_mac; - p_gmac->GMAC_SA[uc_index].GMAC_SAT = (uint32_t) (ull_mac >> 32); -} - -/** - * \brief Select media independent interface mode. - * - * \param p_gmac Pointer to the GMAC instance. - * \param mode Media independent interface mode. - */ -static inline void gmac_select_mii_mode(Gmac* p_gmac, gmac_mii_mode_t mode) -{ - switch (mode) { - case GMAC_PHY_MII: - case GMAC_PHY_RMII: - p_gmac->GMAC_UR |= GMAC_UR_RMIIMII; - break; - - default: - p_gmac->GMAC_UR &= ~GMAC_UR_RMIIMII; - break; - } -} - -uint8_t gmac_phy_read(Gmac* p_gmac, uint8_t uc_phy_address, uint8_t uc_address, - uint32_t* p_value); -uint8_t gmac_phy_write(Gmac* p_gmac, uint8_t uc_phy_address, - uint8_t uc_address, uint32_t ul_value); -void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev, - gmac_options_t* p_opt); -uint32_t gmac_dev_read(gmac_device_t* p_gmac_dev, uint8_t* p_frame, - uint32_t ul_frame_size, uint32_t* p_rcv_size); -uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer, - uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb); -uint32_t gmac_dev_get_tx_load(gmac_device_t* p_gmac_dev); -void gmac_dev_set_rx_callback(gmac_device_t* p_gmac_dev, - gmac_dev_tx_cb_t func_rx_cb); -uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t* p_gmac_dev, - gmac_dev_wakeup_cb_t func_wakeup, uint8_t uc_threshold); -void gmac_dev_reset(gmac_device_t* p_gmac_dev); -void gmac_handler(gmac_device_t* p_gmac_dev); - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -} -#endif -/**INDENT-ON**/ -/// @endcond - -/** - * \page gmac_quickstart Quickstart guide for GMAC driver. - * - * This is the quickstart guide for the \ref gmac_group "Ethernet MAC", - * with step-by-step instructions on how to configure and use the driver in a - * selection of use cases. - * - * The use cases contain several code fragments. The code fragments in the - * steps for setup can be copied into a custom initialization function, while - * the steps for usage can be copied into, e.g., the main application function. - * - * \section gmac_basic_use_case Basic use case - * In the basic use case, the GMAC driver are configured for: - * - PHY component KSZ8051MNL is used - * - GMAC uses MII mode - * - The number of receive buffer is 16 - * - The number of transfer buffer is 8 - * - MAC address is set to 00-04-25-1c-a0-02 - * - IP address is set to 192.168.0.2 - * - IP address is set to 192.168.0.2 - * - Gateway is set to 192.168.0.1 - * - Network mask is 255.255.255.0 - * - PHY operation max retry count is 1000000 - * - GMAC is configured to not support copy all frame and support broadcast - * - The data will be read from the ethernet - * - * \section gmac_basic_use_case_setup Setup steps - * - * \subsection gmac_basic_use_case_setup_prereq Prerequisites - * -# \ref sysclk_group "System Clock Management (sysclock)" - * -# \ref pmc_group "Power Management Controller (pmc)" - * -# \ref ksz8051mnl_ethernet_phy_group "PHY component (KSZ8051MNL)" - * - * \subsection gmac_basic_use_case_setup_code Example code - * Content of conf_eth.h - * \code - * #define GMAC_RX_BUFFERS 16 - * #define GMAC_TX_BUFFERS 8 - * #define MAC_PHY_RETRY_MAX 1000000 - * #define ETHERNET_CONF_ETHADDR0 0x00 - * #define ETHERNET_CONF_ETHADDR0 0x00 - * #define ETHERNET_CONF_ETHADDR1 0x04 - * #define ETHERNET_CONF_ETHADDR2 0x25 - * #define ETHERNET_CONF_ETHADDR3 0x1C - * #define ETHERNET_CONF_ETHADDR4 0xA0 - * #define ETHERNET_CONF_ETHADDR5 0x02 - * #define ETHERNET_CONF_IPADDR0 192 - * #define ETHERNET_CONF_IPADDR1 168 - * #define ETHERNET_CONF_IPADDR2 0 - * #define ETHERNET_CONF_IPADDR3 2 - * #define ETHERNET_CONF_GATEWAY_ADDR0 192 - * #define ETHERNET_CONF_GATEWAY_ADDR1 168 - * #define ETHERNET_CONF_GATEWAY_ADDR2 0 - * #define ETHERNET_CONF_GATEWAY_ADDR3 1 - * #define ETHERNET_CONF_NET_MASK0 255 - * #define ETHERNET_CONF_NET_MASK1 255 - * #define ETHERNET_CONF_NET_MASK2 255 - * #define ETHERNET_CONF_NET_MASK3 0 - * #define ETH_PHY_MODE ETH_PHY_MODE - * \endcode - * - * A specific gmac device and the receive data buffer must be defined; another ul_frm_size should be defined - * to trace the actual size of the data received. - * \code - * static gmac_device_t gs_gmac_dev; - * static volatile uint8_t gs_uc_eth_buffer[GMAC_FRAME_LENTGH_MAX]; - * - * uint32_t ul_frm_size; - * \endcode - * - * Add to application C-file: - * \code - * void gmac_init(void) - * { - * sysclk_init(); - * - * board_init(); - * - * pmc_enable_periph_clk(ID_GMAC); - * - * gmac_option.uc_copy_all_frame = 0; - * gmac_option.uc_no_boardcast = 0; - * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); - * gs_gmac_dev.p_hw = GMAC; - * - * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); - * - * NVIC_EnableIRQ(GMAC_IRQn); - * - * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); - * - * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); - * - * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); - * \endcode - * - * \subsection gmac_basic_use_case_setup_flow Workflow - * - Ensure that conf_eth.h is present and contains the - * following configuration symbol. This configuration file is used - * by the driver and should not be included by the application. - * -# Define the receiving buffer size used in the internal GMAC driver. - * The buffer size used for RX is GMAC_RX_BUFFERS * 128. - * If it was supposed receiving a large number of frame, the - * GMAC_RX_BUFFERS should be set higher. E.g., the application wants to accept - * a ping echo test of 2048, the GMAC_RX_BUFFERS should be set at least - * (2048/128)=16, and as there are additional frames coming, a preferred - * number is 24 depending on a normal Ethernet throughput. - * - \code - * #define GMAC_RX_BUFFERS 16 - * \endcode - * -# Define the transmitting buffer size used in the internal GMAC driver. - * The buffer size used for TX is GMAC_TX_BUFFERS * 1518. - * - \code - * #define GMAC_TX_BUFFERS 8 - * \endcode - * -# Define maximum retry time for a PHY read/write operation. - * - \code - * #define MAC_PHY_RETRY_MAX 1000000 - * \endcode - * -# Define the MAC address. 00:04:25:1C:A0:02 is the address reserved - * for ATMEL, application should always change this address to its' own. - * - \code - * #define ETHERNET_CONF_ETHADDR0 0x00 - * #define ETHERNET_CONF_ETHADDR1 0x04 - * #define ETHERNET_CONF_ETHADDR2 0x25 - * #define ETHERNET_CONF_ETHADDR3 0x1C - * #define ETHERNET_CONF_ETHADDR4 0xA0 - * #define ETHERNET_CONF_ETHADDR5 0x02 - * \endcode - * -# Define the IP address configration used in the application. When DHCP - * is enabled, this configuration is not effected. - * - \code - * #define ETHERNET_CONF_IPADDR0 192 - * #define ETHERNET_CONF_IPADDR1 168 - * #define ETHERNET_CONF_IPADDR2 0 - * #define ETHERNET_CONF_IPADDR3 2 - * #define ETHERNET_CONF_GATEWAY_ADDR0 192 - * #define ETHERNET_CONF_GATEWAY_ADDR1 168 - * #define ETHERNET_CONF_GATEWAY_ADDR2 0 - * #define ETHERNET_CONF_GATEWAY_ADDR3 1 - * #define ETHERNET_CONF_NET_MASK0 255 - * #define ETHERNET_CONF_NET_MASK1 255 - * #define ETHERNET_CONF_NET_MASK2 255 - * #define ETHERNET_CONF_NET_MASK3 0 - * \endcode - * -# Configure the PHY maintainance interface. - * - \code - * #define ETH_PHY_MODE GMAC_PHY_MII - * \endcode - * -# Enable the system clock: - * - \code sysclk_init(); \endcode - * -# Enable PIO configurations for GMAC: - * - \code board_init(); \endcode - * -# Enable PMC clock for GMAC: - * - \code pmc_enable_periph_clk(ID_GMAC); \endcode - * -# Set the GMAC options; it's set to copy all frame and support broadcast: - * - \code - * gmac_option.uc_copy_all_frame = 0; - * gmac_option.uc_no_boardcast = 0; - * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); - * gs_gmac_dev.p_hw = GMAC; - * \endcode - * -# Initialize GMAC device with the filled option: - * - \code - * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); - * \endcode - * -# Enable the interrupt service for GMAC: - * - \code - * NVIC_EnableIRQ(GMAC_IRQn); - * \endcode - * -# Initialize the PHY component: - * - \code - * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); - * \endcode - * -# The link will be established based on auto negotiation. - * - \code - * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); - * \endcode - * -# Establish the ethernet link; the network can be worked from now on: - * - \code - * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); - * \endcode - * - * \section gmac_basic_use_case_usage Usage steps - * \subsection gmac_basic_use_case_usage_code Example code - * Add to, e.g., main loop in application C-file: - * \code - * gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); - * \endcode - * - * \subsection gmac_basic_use_case_usage_flow Workflow - * -# Start reading the data from the ethernet: - * - \code gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); \endcode - */ - -# define GMAC_STATS 0 - -#if( GMAC_STATS != 0 ) - - /* Here below some code to study the types and - frequencies of GMAC interrupts. */ - #define GMAC_IDX_RXUBR 0 - #define GMAC_IDX_TUR 1 - #define GMAC_IDX_RLEX 2 - #define GMAC_IDX_TFC 3 - #define GMAC_IDX_RCOMP 4 - #define GMAC_IDX_TCOMP 5 - #define GMAC_IDX_ROVR 6 - #define GMAC_IDX_HRESP 7 - #define GMAC_IDX_PFNZ 8 - #define GMAC_IDX_PTZ 9 - - struct SGmacStats { - unsigned recvCount; - unsigned rovrCount; - unsigned bnaCount; - unsigned sendCount; - unsigned sovrCount; - unsigned incompCount; - unsigned truncCount; - - unsigned intStatus[10]; - }; - extern struct SGmacStats gmacStats; - - struct SIntPair { - const char *name; - unsigned mask; - int index; - }; - - #define MK_PAIR( NAME ) #NAME, GMAC_IER_##NAME, GMAC_IDX_##NAME - static const struct SIntPair intPairs[] = { - { MK_PAIR( RXUBR ) }, /* Enable receive used bit read interrupt. */ - { MK_PAIR( TUR ) }, /* Enable transmit underrun interrupt. */ - { MK_PAIR( RLEX ) }, /* Enable retry limit exceeded interrupt. */ - { MK_PAIR( TFC ) }, /* Enable transmit buffers exhausted in mid-frame interrupt. */ - { MK_PAIR( RCOMP ) }, /* Receive complete */ - { MK_PAIR( TCOMP ) }, /* Enable transmit complete interrupt. */ - { MK_PAIR( ROVR ) }, /* Enable receive overrun interrupt. */ - { MK_PAIR( HRESP ) }, /* Enable Hresp not OK interrupt. */ - { MK_PAIR( PFNZ ) }, /* Enable pause frame received interrupt. */ - { MK_PAIR( PTZ ) } /* Enable pause time zero interrupt. */ - }; - - void gmac_show_irq_counts (); - -#endif - -#endif /* GMAC_H_INCLUDED */ + /** + * \file + * + * \brief GMAC (Ethernet MAC) driver for SAM. + * + * Copyright (c) 2013 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + */ + +#ifndef GMAC_H_INCLUDED +#define GMAC_H_INCLUDED + +#include "compiler.h" + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +extern "C" { +#endif +/**INDENT-ON**/ +/// @endcond + +/** The buffer addresses written into the descriptors must be aligned, so the + last few bits are zero. These bits have special meaning for the GMAC + peripheral and cannot be used as part of the address. */ +#define GMAC_RXD_ADDR_MASK 0xFFFFFFFC +#define GMAC_RXD_WRAP (1ul << 1) /**< Wrap bit */ +#define GMAC_RXD_OWNERSHIP (1ul << 0) /**< Ownership bit */ + +#define GMAC_RXD_BROADCAST (1ul << 31) /**< Broadcast detected */ +#define GMAC_RXD_MULTIHASH (1ul << 30) /**< Multicast hash match */ +#define GMAC_RXD_UNIHASH (1ul << 29) /**< Unicast hash match */ +#define GMAC_RXD_ADDR_FOUND (1ul << 27) /**< Specific address match found */ +#define GMAC_RXD_ADDR (3ul << 25) /**< Address match */ +#define GMAC_RXD_RXCOEN (1ul << 24) /**< RXCOEN related function */ +#define GMAC_RXD_TYPE (3ul << 22) /**< Type ID match */ +#define GMAC_RXD_VLAN (1ul << 21) /**< VLAN tag detected */ +#define GMAC_RXD_PRIORITY (1ul << 20) /**< Priority tag detected */ +#define GMAC_RXD_PRIORITY_MASK (3ul << 17) /**< VLAN priority */ +#define GMAC_RXD_CFI (1ul << 16) /**< Concatenation Format Indicator only if bit 21 is set */ +#define GMAC_RXD_EOF (1ul << 15) /**< End of frame */ +#define GMAC_RXD_SOF (1ul << 14) /**< Start of frame */ +#define GMAC_RXD_FCS (1ul << 13) /**< Frame check sequence */ +#define GMAC_RXD_OFFSET_MASK /**< Receive buffer offset */ +#define GMAC_RXD_LEN_MASK (0xFFF) /**< Length of frame including FCS (if selected) */ +#define GMAC_RXD_LENJUMBO_MASK (0x3FFF) /**< Jumbo frame length */ + +#define GMAC_TXD_USED (1ul << 31) /**< Frame is transmitted */ +#define GMAC_TXD_WRAP (1ul << 30) /**< Last descriptor */ +#define GMAC_TXD_ERROR (1ul << 29) /**< Retry limit exceeded, error */ +#define GMAC_TXD_UNDERRUN (1ul << 28) /**< Transmit underrun */ +#define GMAC_TXD_EXHAUSTED (1ul << 27) /**< Buffer exhausted */ +#define GMAC_TXD_LATE (1ul << 26) /**< Late collision,transmit error */ +#define GMAC_TXD_CHECKSUM_ERROR (7ul << 20) /**< Checksum error */ +#define GMAC_TXD_NOCRC (1ul << 16) /**< No CRC */ +#define GMAC_TXD_LAST (1ul << 15) /**< Last buffer in frame */ +#define GMAC_TXD_LEN_MASK (0x1FFF) /**< Length of buffer */ + +/** The MAC can support frame lengths up to 1536 bytes */ +#define GMAC_FRAME_LENTGH_MAX 1536 + +#define GMAC_RX_UNITSIZE 128 /**< Fixed size for RX buffer */ +#define GMAC_TX_UNITSIZE 1518 /**< Size for ETH frame length */ + +/** GMAC clock speed */ +#define GMAC_MCK_SPEED_240MHZ (240*1000*1000) +#define GMAC_MCK_SPEED_160MHZ (160*1000*1000) +#define GMAC_MCK_SPEED_120MHZ (120*1000*1000) +#define GMAC_MCK_SPEED_80MHZ (80*1000*1000) +#define GMAC_MCK_SPEED_40MHZ (40*1000*1000) +#define GMAC_MCK_SPEED_20MHZ (20*1000*1000) + +/** GMAC maintain code default value*/ +#define GMAC_MAN_CODE_VALUE (10) + +/** GMAC maintain start of frame default value*/ +#define GMAC_MAN_SOF_VALUE (1) + +/** GMAC maintain read/write*/ +#define GMAC_MAN_RW_TYPE (2) + +/** GMAC maintain read only*/ +#define GMAC_MAN_READ_ONLY (1) + +/** GMAC address length */ +#define GMAC_ADDR_LENGTH (6) + + +#define GMAC_DUPLEX_HALF 0 +#define GMAC_DUPLEX_FULL 1 + +#define GMAC_SPEED_10M 0 +#define GMAC_SPEED_100M 1 + +/** + * \brief Return codes for GMAC APIs. + */ +typedef enum { + GMAC_OK = 0, /** 0 Operation OK */ + GMAC_TIMEOUT = 1, /** 1 GMAC operation timeout */ + GMAC_TX_BUSY, /** 2 TX in progress */ + GMAC_RX_NULL, /** 3 No data received */ + GMAC_SIZE_TOO_SMALL, /** 4 Buffer size not enough */ + GMAC_PARAM, /** 5 Parameter error, TX packet invalid or RX size too small */ + GMAC_INVALID = 0xFF, /* Invalid */ +} gmac_status_t; + +/** + * \brief Media Independent Interface (MII) type. + */ +typedef enum { + GMAC_PHY_MII = 0, /** MII mode */ + GMAC_PHY_RMII = 1, /** Reduced MII mode */ + GMAC_PHY_INVALID = 0xFF, /* Invalid mode*/ +} gmac_mii_mode_t; + +/** Receive buffer descriptor struct */ +COMPILER_PACK_SET(8) +typedef struct gmac_rx_descriptor { + union gmac_rx_addr { + uint32_t val; + struct gmac_rx_addr_bm { + uint32_t b_ownership:1, /**< User clear, GMAC sets this to 1 once it has successfully written a frame to memory */ + b_wrap:1, /**< Marks last descriptor in receive buffer */ + addr_dw:30; /**< Address in number of DW */ + } bm; + } addr; /**< Address, Wrap & Ownership */ + union gmac_rx_status { + uint32_t val; + struct gmac_rx_status_bm { + uint32_t len:13, /** 0..12 Length of frame including FCS */ + b_fcs:1, /** 13 Receive buffer offset, bits 13:12 of frame length for jumbo frame */ + b_sof:1, /** 14 Start of frame */ + b_eof:1, /** 15 End of frame */ + b_cfi:1, /** 16 Concatenation Format Indicator */ + vlan_priority:3, /** 17..19 VLAN priority (if VLAN detected) */ + b_priority_detected:1, /** 20 Priority tag detected */ + b_vlan_detected:1, /** 21 VLAN tag detected */ + b_type_id_match:2, /** 22..23 Type ID match */ + b_checksumoffload:1, /** 24 Checksum offload specific function */ + b_addrmatch:2, /** 25..26 Address register match */ + b_ext_addr_match:1, /** 27 External address match found */ + reserved:1, /** 28 */ + b_uni_hash_match:1, /** 29 Unicast hash match */ + b_multi_hash_match:1, /** 30 Multicast hash match */ + b_boardcast_detect:1; /** 31 Global broadcast address detected */ + } bm; + } status; +} gmac_rx_descriptor_t; + +/** Transmit buffer descriptor struct */ +COMPILER_PACK_SET(8) +typedef struct gmac_tx_descriptor { + uint32_t addr; + union gmac_tx_status { + uint32_t val; + struct gmac_tx_status_bm { + uint32_t len:14, /** 0..13 Length of buffer */ + reserved:1, /** 14 */ + b_last_buffer:1, /** 15 Last buffer (in the current frame) */ + b_no_crc:1, /** 16 No CRC */ + reserved1:3, /** 17..19 */ + b_checksumoffload:3, /** 20..22 Transmit checksum generation offload errors */ + reserved2:3, /** 23..25 */ + b_lco:1, /** 26 Late collision, transmit error detected */ + b_exhausted:1, /** 27 Buffer exhausted in mid frame */ + b_underrun:1, /** 28 Transmit underrun */ + b_error:1, /** 29 Retry limit exceeded, error detected */ + b_wrap:1, /** 30 Marks last descriptor in TD list */ + b_used:1; /** 31 User clear, GMAC sets this to 1 once a frame has been successfully transmitted */ + } bm; + } status; +} gmac_tx_descriptor_t; + +COMPILER_PACK_RESET() + +/** + * \brief Input parameters when initializing the gmac module mode. + */ +typedef struct gmac_options { + /* Enable/Disable CopyAllFrame */ + uint8_t uc_copy_all_frame; + /* Enable/Disable NoBroadCast */ + uint8_t uc_no_boardcast; + /* MAC address */ + uint8_t uc_mac_addr[GMAC_ADDR_LENGTH]; +} gmac_options_t; + +/** RX callback */ +typedef void (*gmac_dev_tx_cb_t) (uint32_t ul_status); +/** Wakeup callback */ +typedef void (*gmac_dev_wakeup_cb_t) (void); + +/** + * GMAC driver structure. + */ +typedef struct gmac_device { + + /** Pointer to HW register base */ + Gmac *p_hw; + /** + * Pointer to allocated TX buffer. + * Section 3.6 of AMBA 2.0 spec states that burst should not cross + * 1K Boundaries. + * Receive buffer manager writes are burst of 2 words => 3 lsb bits + * of the address shall be set to 0. + */ + uint8_t *p_tx_buffer; + /** Pointer to allocated RX buffer */ + uint8_t *p_rx_buffer; + /** Pointer to Rx TDs (must be 8-byte aligned) */ + gmac_rx_descriptor_t *p_rx_dscr; + /** Pointer to Tx TDs (must be 8-byte aligned) */ + gmac_tx_descriptor_t *p_tx_dscr; + /** Optional callback to be invoked once a frame has been received */ + gmac_dev_tx_cb_t func_rx_cb; +#if( GMAC_USES_WAKEUP_CALLBACK ) + /** Optional callback to be invoked once several TDs have been released */ + gmac_dev_wakeup_cb_t func_wakeup_cb; +#endif +#if( GMAC_USES_TX_CALLBACK != 0 ) + /** Optional callback list to be invoked once TD has been processed */ + gmac_dev_tx_cb_t *func_tx_cb_list; +#endif + /** RX TD list size */ + uint32_t ul_rx_list_size; + /** RX index for current processing TD */ + uint32_t ul_rx_idx; + /** TX TD list size */ + uint32_t ul_tx_list_size; + /** Circular buffer head pointer by upper layer (buffer to be sent) */ + int32_t l_tx_head; + /** Circular buffer tail pointer incremented by handlers (buffer sent) */ + int32_t l_tx_tail; + + /** Number of free TD before wakeup callback is invoked */ + uint32_t uc_wakeup_threshold; +} gmac_device_t; + +/** + * \brief Write network control value. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_ncr Network control value. + */ +static inline void gmac_network_control(Gmac* p_gmac, uint32_t ul_ncr) +{ + p_gmac->GMAC_NCR = ul_ncr; +} + +/** + * \brief Get network control value. + * + * \param p_gmac Pointer to the GMAC instance. + */ + +static inline uint32_t gmac_get_network_control(Gmac* p_gmac) +{ + return p_gmac->GMAC_NCR; +} + +/** + * \brief Enable/Disable GMAC receive. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable GMAC receiver, else to enable it. + */ +static inline void gmac_enable_receive(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_RXEN; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_RXEN; + } +} + +/** + * \brief Enable/Disable GMAC transmit. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable GMAC transmit, else to enable it. + */ +static inline void gmac_enable_transmit(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_TXEN; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_TXEN; + } +} + +/** + * \brief Enable/Disable GMAC management. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable GMAC management, else to enable it. + */ +static inline void gmac_enable_management(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_MPE; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_MPE; + } +} + +/** + * \brief Clear all statistics registers. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_clear_statistics(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_CLRSTAT; +} + +/** + * \brief Increase all statistics registers. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_increase_statistics(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_INCSTAT; +} + +/** + * \brief Enable/Disable statistics registers writing. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the statistics registers writing, else to enable it. + */ +static inline void gmac_enable_statistics_write(Gmac* p_gmac, + uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_WESTAT; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_WESTAT; + } +} + +/** + * \brief In half-duplex mode, forces collisions on all received frames. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the back pressure, else to enable it. + */ +static inline void gmac_enable_back_pressure(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_BP; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_BP; + } +} + +/** + * \brief Start transmission. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_start_transmission(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TSTART; +} + +/** + * \brief Halt transmission. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_halt_transmission(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_THALT; +} + +/** + * \brief Transmit pause frame. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_tx_pause_frame(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TXPF; +} + +/** + * \brief Transmit zero quantum pause frame. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_tx_pause_zero_quantum_frame(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TXZQPF; +} + +/** + * \brief Read snapshot. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_read_snapshot(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_RDS; +} + +/** + * \brief Store receivetime stamp to memory. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to normal operation, else to enable the store. + */ +static inline void gmac_store_rx_time_stamp(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_SRTSM; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_SRTSM; + } +} + +/** + * \brief Enable PFC priority-based pause reception. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 1 to set the reception, 0 to disable. + */ +static inline void gmac_enable_pfc_pause_frame(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_ENPBPR; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_ENPBPR; + } +} + +/** + * \brief Transmit PFC priority-based pause reception. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_transmit_pfc_pause_frame(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TXPBPF; +} + +/** + * \brief Flush next packet. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_flush_next_packet(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_FNP; +} + +/** + * \brief Set up network configuration register. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_cfg Network configuration value. + */ +static inline void gmac_set_configure(Gmac* p_gmac, uint32_t ul_cfg) +{ + p_gmac->GMAC_NCFGR = ul_cfg; +} + +/** + * \brief Get network configuration. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Network configuration. + */ +static inline uint32_t gmac_get_configure(Gmac* p_gmac) +{ + return p_gmac->GMAC_NCFGR; +} + + +/* Get and set DMA Configuration Register */ +static inline void gmac_set_dma(Gmac* p_gmac, uint32_t ul_cfg) +{ + p_gmac->GMAC_DCFGR = ul_cfg; +} + +static inline uint32_t gmac_get_dma(Gmac* p_gmac) +{ + return p_gmac->GMAC_DCFGR; +} + +/** + * \brief Set speed. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_speed 1 to indicate 100Mbps, 0 to 10Mbps. + */ +static inline void gmac_set_speed(Gmac* p_gmac, uint8_t uc_speed) +{ + if (uc_speed) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_SPD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_SPD; + } +} + +/** + * \brief Enable/Disable Full-Duplex mode. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the Full-Duplex mode, else to enable it. + */ +static inline void gmac_enable_full_duplex(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_FD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_FD; + } +} + +/** + * \brief Enable/Disable Copy(Receive) All Valid Frames. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable copying all valid frames, else to enable it. + */ +static inline void gmac_enable_copy_all(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_CAF; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_CAF; + } +} + +/** + * \brief Enable/Disable jumbo frames (up to 10240 bytes). + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the jumbo frames, else to enable it. + */ +static inline void gmac_enable_jumbo_frames(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_JFRAME; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_JFRAME; + } +} + +/** + * \brief Disable/Enable broadcast receiving. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 1 to disable the broadcast, else to enable it. + */ +static inline void gmac_disable_broadcast(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_NBC; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_NBC; + } +} + +/** + * \brief Enable/Disable multicast hash. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the multicast hash, else to enable it. + */ +static inline void gmac_enable_multicast_hash(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_UNIHEN; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_UNIHEN; + } +} + +/** + * \brief Enable/Disable big frames (over 1518, up to 1536). + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable big frames else to enable it. + */ +static inline void gmac_enable_big_frame(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_MAXFS; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_MAXFS; + } +} + +/** + * \brief Set MDC clock divider. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_mck GMAC MCK. + * + * \return GMAC_OK if successfully. + */ +static inline uint8_t gmac_set_mdc_clock(Gmac* p_gmac, uint32_t ul_mck) +{ + uint32_t ul_clk; + + if (ul_mck > GMAC_MCK_SPEED_240MHZ) { + return GMAC_INVALID; + } else if (ul_mck > GMAC_MCK_SPEED_160MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_96; + } else if (ul_mck > GMAC_MCK_SPEED_120MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_64; + } else if (ul_mck > GMAC_MCK_SPEED_80MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_48; + } else if (ul_mck > GMAC_MCK_SPEED_40MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_32; + } else if (ul_mck > GMAC_MCK_SPEED_20MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_16; + } else { + ul_clk = GMAC_NCFGR_CLK_MCK_8; + } + ; + p_gmac->GMAC_NCFGR = (p_gmac->GMAC_NCFGR & ~GMAC_NCFGR_CLK_Msk) | ul_clk; + return GMAC_OK; +} + +/** + * \brief Enable/Disable retry test. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the GMAC receiver, else to enable it. + */ +static inline void gmac_enable_retry_test(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RTY; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RTY; + } +} + +/** + * \brief Enable/Disable pause (when a valid pause frame is received). + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable pause frame, else to enable it. + */ +static inline void gmac_enable_pause_frame(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_PEN; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_PEN; + } +} + +/** + * \brief Set receive buffer offset to 0 ~ 3. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_set_rx_buffer_offset(Gmac* p_gmac, uint8_t uc_offset) +{ + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RXBUFO_Msk; + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RXBUFO(uc_offset); +} + +/** + * \brief Enable/Disable receive length field checking. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable receive length field checking, else to enable it. + */ +static inline void gmac_enable_rx_length_check(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_LFERD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_LFERD; + } +} + +/** + * \brief Enable/Disable discarding FCS field of received frames. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable discarding FCS field of received frames, else to enable it. + */ +static inline void gmac_enable_discard_fcs(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RFCS; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RFCS; + } +} + + +/** + * \brief Enable/Disable frames to be received in half-duplex mode + * while transmitting. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the received in half-duplex mode, else to enable it. + */ +static inline void gmac_enable_efrhd(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_EFRHD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_EFRHD; + } +} + +/** + * \brief Enable/Disable ignore RX FCS. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable ignore RX FCS, else to enable it. + */ +static inline void gmac_enable_ignore_rx_fcs(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_IRXFCS; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_IRXFCS; + } +} + +/** + * \brief Get Network Status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Network status. + */ +static inline uint32_t gmac_get_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_NSR; +} + +/** + * \brief Get MDIO IN pin status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return MDIO IN pin status. + */ +static inline uint8_t gmac_get_MDIO(Gmac* p_gmac) +{ + return ((p_gmac->GMAC_NSR & GMAC_NSR_MDIO) > 0); +} + +/** + * \brief Check if PHY is idle. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return 1 if PHY is idle. + */ +static inline uint8_t gmac_is_phy_idle(Gmac* p_gmac) +{ + return ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) > 0); +} + +/** + * \brief Return transmit status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Transmit status. + */ +static inline uint32_t gmac_get_tx_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_TSR; +} + +/** + * \brief Clear transmit status. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_status Transmit status. + */ +static inline void gmac_clear_tx_status(Gmac* p_gmac, uint32_t ul_status) +{ + p_gmac->GMAC_TSR = ul_status; +} + +/** + * \brief Return receive status. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline uint32_t gmac_get_rx_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_RSR; +} + +/** + * \brief Clear receive status. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_status Receive status. + */ +static inline void gmac_clear_rx_status(Gmac* p_gmac, uint32_t ul_status) +{ + p_gmac->GMAC_RSR = ul_status; +} + +/** + * \brief Set Rx Queue. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_addr Rx queue address. + */ +static inline void gmac_set_rx_queue(Gmac* p_gmac, uint32_t ul_addr) +{ + p_gmac->GMAC_RBQB = GMAC_RBQB_ADDR_Msk & ul_addr; +} + +/** + * \brief Get Rx Queue Address. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Rx queue address. + */ +static inline uint32_t gmac_get_rx_queue(Gmac* p_gmac) +{ + return p_gmac->GMAC_RBQB; +} + +/** + * \brief Set Tx Queue. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_addr Tx queue address. + */ +static inline void gmac_set_tx_queue(Gmac* p_gmac, uint32_t ul_addr) +{ + p_gmac->GMAC_TBQB = GMAC_TBQB_ADDR_Msk & ul_addr; +} + +/** + * \brief Get Tx Queue. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Rx queue address. + */ +static inline uint32_t gmac_get_tx_queue(Gmac* p_gmac) +{ + return p_gmac->GMAC_TBQB; +} + +/** + * \brief Enable interrupt(s). + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_source Interrupt source(s) to be enabled. + */ +static inline void gmac_enable_interrupt(Gmac* p_gmac, uint32_t ul_source) +{ + p_gmac->GMAC_IER = ul_source; +} + +/** + * \brief Disable interrupt(s). + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_source Interrupt source(s) to be disabled. + */ +static inline void gmac_disable_interrupt(Gmac* p_gmac, uint32_t ul_source) +{ + p_gmac->GMAC_IDR = ul_source; +} + +/** + * \brief Return interrupt status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Interrupt status. + */ +static inline uint32_t gmac_get_interrupt_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_ISR; +} + +/** + * \brief Return interrupt mask. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Interrupt mask. + */ +static inline uint32_t gmac_get_interrupt_mask(Gmac* p_gmac) +{ + return p_gmac->GMAC_IMR; +} + +/** + * \brief Execute PHY maintenance command. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * \param uc_reg_addr Register address. + * \param uc_rw 1 to Read, 0 to write. + * \param us_data Data to be performed, write only. + */ +static inline void gmac_maintain_phy(Gmac* p_gmac, + uint8_t uc_phy_addr, uint8_t uc_reg_addr, uint8_t uc_rw, + uint16_t us_data) +{ + /* Wait until bus idle */ + while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); + /* Write maintain register */ + p_gmac->GMAC_MAN = GMAC_MAN_WTN(GMAC_MAN_CODE_VALUE) + | GMAC_MAN_CLTTO + | GMAC_MAN_PHYA(uc_phy_addr) + | GMAC_MAN_REGA(uc_reg_addr) + | GMAC_MAN_OP((uc_rw ? GMAC_MAN_RW_TYPE : GMAC_MAN_READ_ONLY)) + | GMAC_MAN_DATA(us_data); +} + +/** + * \brief Get PHY maintenance data returned. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Get PHY data. + */ +static inline uint16_t gmac_get_phy_data(Gmac* p_gmac) +{ + /* Wait until bus idle */ + while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); + /* Return data */ + return (uint16_t) (p_gmac->GMAC_MAN & GMAC_MAN_DATA_Msk); +} + +/** + * \brief Set Hash. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_hash_top Hash top. + * \param ul_hash_bottom Hash bottom. + */ +static inline void gmac_set_hash(Gmac* p_gmac, uint32_t ul_hash_top, + uint32_t ul_hash_bottom) +{ + p_gmac->GMAC_HRB = ul_hash_bottom; + p_gmac->GMAC_HRT = ul_hash_top; +} + +/** + * \brief Set 64 bits Hash. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ull_hash 64 bits hash value. + */ +static inline void gmac_set_hash64(Gmac* p_gmac, uint64_t ull_hash) +{ + p_gmac->GMAC_HRB = (uint32_t) ull_hash; + p_gmac->GMAC_HRT = (uint32_t) (ull_hash >> 32); +} + +/** + * \brief Set MAC Address. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_index GMAC specific address register index. + * \param p_mac_addr GMAC address. + */ +static inline void gmac_set_address(Gmac* p_gmac, uint8_t uc_index, + uint8_t* p_mac_addr) +{ + p_gmac->GMAC_SA[uc_index].GMAC_SAB = (p_mac_addr[3] << 24) + | (p_mac_addr[2] << 16) + | (p_mac_addr[1] << 8) + | (p_mac_addr[0]); + p_gmac->GMAC_SA[uc_index].GMAC_SAT = (p_mac_addr[5] << 8) + | (p_mac_addr[4]); +} + +/** + * \brief Set MAC Address via 2 dword. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_index GMAC specific address register index. + * \param ul_mac_top GMAC top address. + * \param ul_mac_bottom GMAC bottom address. + */ +static inline void gmac_set_address32(Gmac* p_gmac, uint8_t uc_index, + uint32_t ul_mac_top, uint32_t ul_mac_bottom) +{ + p_gmac->GMAC_SA[uc_index].GMAC_SAB = ul_mac_bottom; + p_gmac->GMAC_SA[uc_index].GMAC_SAT = ul_mac_top; +} + +/** + * \brief Set MAC Address via int64. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_index GMAC specific address register index. + * \param ull_mac 64-bit GMAC address. + */ +static inline void gmac_set_address64(Gmac* p_gmac, uint8_t uc_index, + uint64_t ull_mac) +{ + p_gmac->GMAC_SA[uc_index].GMAC_SAB = (uint32_t) ull_mac; + p_gmac->GMAC_SA[uc_index].GMAC_SAT = (uint32_t) (ull_mac >> 32); +} + +/** + * \brief Select media independent interface mode. + * + * \param p_gmac Pointer to the GMAC instance. + * \param mode Media independent interface mode. + */ +static inline void gmac_select_mii_mode(Gmac* p_gmac, gmac_mii_mode_t mode) +{ + switch (mode) { + case GMAC_PHY_MII: + case GMAC_PHY_RMII: + p_gmac->GMAC_UR |= GMAC_UR_RMIIMII; + break; + + default: + p_gmac->GMAC_UR &= ~GMAC_UR_RMIIMII; + break; + } +} + +uint8_t gmac_phy_read(Gmac* p_gmac, uint8_t uc_phy_address, uint8_t uc_address, + uint32_t* p_value); +uint8_t gmac_phy_write(Gmac* p_gmac, uint8_t uc_phy_address, + uint8_t uc_address, uint32_t ul_value); +void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev, + gmac_options_t* p_opt); +uint32_t gmac_dev_read(gmac_device_t* p_gmac_dev, uint8_t* p_frame, + uint32_t ul_frame_size, uint32_t* p_rcv_size); +uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer, + uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb); +uint32_t gmac_dev_get_tx_load(gmac_device_t* p_gmac_dev); +void gmac_dev_set_rx_callback(gmac_device_t* p_gmac_dev, + gmac_dev_tx_cb_t func_rx_cb); +uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t* p_gmac_dev, + gmac_dev_wakeup_cb_t func_wakeup, uint8_t uc_threshold); +void gmac_dev_reset(gmac_device_t* p_gmac_dev); +void gmac_handler(gmac_device_t* p_gmac_dev); + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +} +#endif +/**INDENT-ON**/ +/// @endcond + +/** + * \page gmac_quickstart Quickstart guide for GMAC driver. + * + * This is the quickstart guide for the \ref gmac_group "Ethernet MAC", + * with step-by-step instructions on how to configure and use the driver in a + * selection of use cases. + * + * The use cases contain several code fragments. The code fragments in the + * steps for setup can be copied into a custom initialization function, while + * the steps for usage can be copied into, e.g., the main application function. + * + * \section gmac_basic_use_case Basic use case + * In the basic use case, the GMAC driver are configured for: + * - PHY component KSZ8051MNL is used + * - GMAC uses MII mode + * - The number of receive buffer is 16 + * - The number of transfer buffer is 8 + * - MAC address is set to 00-04-25-1c-a0-02 + * - IP address is set to 192.168.0.2 + * - IP address is set to 192.168.0.2 + * - Gateway is set to 192.168.0.1 + * - Network mask is 255.255.255.0 + * - PHY operation max retry count is 1000000 + * - GMAC is configured to not support copy all frame and support broadcast + * - The data will be read from the ethernet + * + * \section gmac_basic_use_case_setup Setup steps + * + * \subsection gmac_basic_use_case_setup_prereq Prerequisites + * -# \ref sysclk_group "System Clock Management (sysclock)" + * -# \ref pmc_group "Power Management Controller (pmc)" + * -# \ref ksz8051mnl_ethernet_phy_group "PHY component (KSZ8051MNL)" + * + * \subsection gmac_basic_use_case_setup_code Example code + * Content of conf_eth.h + * \code + * #define GMAC_RX_BUFFERS 16 + * #define GMAC_TX_BUFFERS 8 + * #define MAC_PHY_RETRY_MAX 1000000 + * #define ETHERNET_CONF_ETHADDR0 0x00 + * #define ETHERNET_CONF_ETHADDR0 0x00 + * #define ETHERNET_CONF_ETHADDR1 0x04 + * #define ETHERNET_CONF_ETHADDR2 0x25 + * #define ETHERNET_CONF_ETHADDR3 0x1C + * #define ETHERNET_CONF_ETHADDR4 0xA0 + * #define ETHERNET_CONF_ETHADDR5 0x02 + * #define ETHERNET_CONF_IPADDR0 192 + * #define ETHERNET_CONF_IPADDR1 168 + * #define ETHERNET_CONF_IPADDR2 0 + * #define ETHERNET_CONF_IPADDR3 2 + * #define ETHERNET_CONF_GATEWAY_ADDR0 192 + * #define ETHERNET_CONF_GATEWAY_ADDR1 168 + * #define ETHERNET_CONF_GATEWAY_ADDR2 0 + * #define ETHERNET_CONF_GATEWAY_ADDR3 1 + * #define ETHERNET_CONF_NET_MASK0 255 + * #define ETHERNET_CONF_NET_MASK1 255 + * #define ETHERNET_CONF_NET_MASK2 255 + * #define ETHERNET_CONF_NET_MASK3 0 + * #define ETH_PHY_MODE ETH_PHY_MODE + * \endcode + * + * A specific gmac device and the receive data buffer must be defined; another ul_frm_size should be defined + * to trace the actual size of the data received. + * \code + * static gmac_device_t gs_gmac_dev; + * static volatile uint8_t gs_uc_eth_buffer[GMAC_FRAME_LENTGH_MAX]; + * + * uint32_t ul_frm_size; + * \endcode + * + * Add to application C-file: + * \code + * void gmac_init(void) + * { + * sysclk_init(); + * + * board_init(); + * + * pmc_enable_periph_clk(ID_GMAC); + * + * gmac_option.uc_copy_all_frame = 0; + * gmac_option.uc_no_boardcast = 0; + * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); + * gs_gmac_dev.p_hw = GMAC; + * + * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); + * + * NVIC_EnableIRQ(GMAC_IRQn); + * + * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); + * + * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); + * + * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); + * \endcode + * + * \subsection gmac_basic_use_case_setup_flow Workflow + * - Ensure that conf_eth.h is present and contains the + * following configuration symbol. This configuration file is used + * by the driver and should not be included by the application. + * -# Define the receiving buffer size used in the internal GMAC driver. + * The buffer size used for RX is GMAC_RX_BUFFERS * 128. + * If it was supposed receiving a large number of frame, the + * GMAC_RX_BUFFERS should be set higher. E.g., the application wants to accept + * a ping echo test of 2048, the GMAC_RX_BUFFERS should be set at least + * (2048/128)=16, and as there are additional frames coming, a preferred + * number is 24 depending on a normal Ethernet throughput. + * - \code + * #define GMAC_RX_BUFFERS 16 + * \endcode + * -# Define the transmitting buffer size used in the internal GMAC driver. + * The buffer size used for TX is GMAC_TX_BUFFERS * 1518. + * - \code + * #define GMAC_TX_BUFFERS 8 + * \endcode + * -# Define maximum retry time for a PHY read/write operation. + * - \code + * #define MAC_PHY_RETRY_MAX 1000000 + * \endcode + * -# Define the MAC address. 00:04:25:1C:A0:02 is the address reserved + * for ATMEL, application should always change this address to its' own. + * - \code + * #define ETHERNET_CONF_ETHADDR0 0x00 + * #define ETHERNET_CONF_ETHADDR1 0x04 + * #define ETHERNET_CONF_ETHADDR2 0x25 + * #define ETHERNET_CONF_ETHADDR3 0x1C + * #define ETHERNET_CONF_ETHADDR4 0xA0 + * #define ETHERNET_CONF_ETHADDR5 0x02 + * \endcode + * -# Define the IP address configration used in the application. When DHCP + * is enabled, this configuration is not effected. + * - \code + * #define ETHERNET_CONF_IPADDR0 192 + * #define ETHERNET_CONF_IPADDR1 168 + * #define ETHERNET_CONF_IPADDR2 0 + * #define ETHERNET_CONF_IPADDR3 2 + * #define ETHERNET_CONF_GATEWAY_ADDR0 192 + * #define ETHERNET_CONF_GATEWAY_ADDR1 168 + * #define ETHERNET_CONF_GATEWAY_ADDR2 0 + * #define ETHERNET_CONF_GATEWAY_ADDR3 1 + * #define ETHERNET_CONF_NET_MASK0 255 + * #define ETHERNET_CONF_NET_MASK1 255 + * #define ETHERNET_CONF_NET_MASK2 255 + * #define ETHERNET_CONF_NET_MASK3 0 + * \endcode + * -# Configure the PHY maintainance interface. + * - \code + * #define ETH_PHY_MODE GMAC_PHY_MII + * \endcode + * -# Enable the system clock: + * - \code sysclk_init(); \endcode + * -# Enable PIO configurations for GMAC: + * - \code board_init(); \endcode + * -# Enable PMC clock for GMAC: + * - \code pmc_enable_periph_clk(ID_GMAC); \endcode + * -# Set the GMAC options; it's set to copy all frame and support broadcast: + * - \code + * gmac_option.uc_copy_all_frame = 0; + * gmac_option.uc_no_boardcast = 0; + * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); + * gs_gmac_dev.p_hw = GMAC; + * \endcode + * -# Initialize GMAC device with the filled option: + * - \code + * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); + * \endcode + * -# Enable the interrupt service for GMAC: + * - \code + * NVIC_EnableIRQ(GMAC_IRQn); + * \endcode + * -# Initialize the PHY component: + * - \code + * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); + * \endcode + * -# The link will be established based on auto negotiation. + * - \code + * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); + * \endcode + * -# Establish the ethernet link; the network can be worked from now on: + * - \code + * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); + * \endcode + * + * \section gmac_basic_use_case_usage Usage steps + * \subsection gmac_basic_use_case_usage_code Example code + * Add to, e.g., main loop in application C-file: + * \code + * gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); + * \endcode + * + * \subsection gmac_basic_use_case_usage_flow Workflow + * -# Start reading the data from the ethernet: + * - \code gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); \endcode + */ + +# define GMAC_STATS 0 + +#if( GMAC_STATS != 0 ) + + /* Here below some code to study the types and + frequencies of GMAC interrupts. */ + #define GMAC_IDX_RXUBR 0 + #define GMAC_IDX_TUR 1 + #define GMAC_IDX_RLEX 2 + #define GMAC_IDX_TFC 3 + #define GMAC_IDX_RCOMP 4 + #define GMAC_IDX_TCOMP 5 + #define GMAC_IDX_ROVR 6 + #define GMAC_IDX_HRESP 7 + #define GMAC_IDX_PFNZ 8 + #define GMAC_IDX_PTZ 9 + + struct SGmacStats { + unsigned recvCount; + unsigned rovrCount; + unsigned bnaCount; + unsigned sendCount; + unsigned sovrCount; + unsigned incompCount; + unsigned truncCount; + + unsigned intStatus[10]; + }; + extern struct SGmacStats gmacStats; + + struct SIntPair { + const char *name; + unsigned mask; + int index; + }; + + #define MK_PAIR( NAME ) #NAME, GMAC_IER_##NAME, GMAC_IDX_##NAME + static const struct SIntPair intPairs[] = { + { MK_PAIR( RXUBR ) }, /* Enable receive used bit read interrupt. */ + { MK_PAIR( TUR ) }, /* Enable transmit underrun interrupt. */ + { MK_PAIR( RLEX ) }, /* Enable retry limit exceeded interrupt. */ + { MK_PAIR( TFC ) }, /* Enable transmit buffers exhausted in mid-frame interrupt. */ + { MK_PAIR( RCOMP ) }, /* Receive complete */ + { MK_PAIR( TCOMP ) }, /* Enable transmit complete interrupt. */ + { MK_PAIR( ROVR ) }, /* Enable receive overrun interrupt. */ + { MK_PAIR( HRESP ) }, /* Enable Hresp not OK interrupt. */ + { MK_PAIR( PFNZ ) }, /* Enable pause frame received interrupt. */ + { MK_PAIR( PTZ ) } /* Enable pause time zero interrupt. */ + }; + + void gmac_show_irq_counts (); + +#endif + +#endif /* GMAC_H_INCLUDED */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/instance/gmac.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/instance/gmac.h index 24d806d94..dd29dfe78 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/instance/gmac.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/instance/gmac.h @@ -1,1349 +1,1349 @@ - /** - * \file - * - * \brief GMAC (Ethernet MAC) driver for SAM. - * - * Copyright (c) 2013 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ - -#ifndef GMAC_H_INCLUDED -#define GMAC_H_INCLUDED - -#include "compiler.h" -#include "component/gmac.h" - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -extern "C" { -#endif -/**INDENT-ON**/ -/// @endcond - -/** The buffer addresses written into the descriptors must be aligned, so the - last few bits are zero. These bits have special meaning for the GMAC - peripheral and cannot be used as part of the address. */ -#define GMAC_RXD_ADDR_MASK 0xFFFFFFFC -#define GMAC_RXD_WRAP (1ul << 1) /**< Wrap bit */ -#define GMAC_RXD_OWNERSHIP (1ul << 0) /**< Ownership bit */ - -#define GMAC_RXD_BROADCAST (1ul << 31) /**< Broadcast detected */ -#define GMAC_RXD_MULTIHASH (1ul << 30) /**< Multicast hash match */ -#define GMAC_RXD_UNIHASH (1ul << 29) /**< Unicast hash match */ -#define GMAC_RXD_ADDR_FOUND (1ul << 27) /**< Specific address match found */ -#define GMAC_RXD_ADDR (3ul << 25) /**< Address match */ -#define GMAC_RXD_RXCOEN (1ul << 24) /**< RXCOEN related function */ -#define GMAC_RXD_TYPE (3ul << 22) /**< Type ID match */ -#define GMAC_RXD_VLAN (1ul << 21) /**< VLAN tag detected */ -#define GMAC_RXD_PRIORITY (1ul << 20) /**< Priority tag detected */ -#define GMAC_RXD_PRIORITY_MASK (3ul << 17) /**< VLAN priority */ -#define GMAC_RXD_CFI (1ul << 16) /**< Concatenation Format Indicator only if bit 21 is set */ -#define GMAC_RXD_EOF (1ul << 15) /**< End of frame */ -#define GMAC_RXD_SOF (1ul << 14) /**< Start of frame */ -#define GMAC_RXD_FCS (1ul << 13) /**< Frame check sequence */ -#define GMAC_RXD_OFFSET_MASK /**< Receive buffer offset */ -#define GMAC_RXD_LEN_MASK (0xFFF) /**< Length of frame including FCS (if selected) */ -#define GMAC_RXD_LENJUMBO_MASK (0x3FFF) /**< Jumbo frame length */ - -#define GMAC_TXD_USED (1ul << 31) /**< Frame is transmitted */ -#define GMAC_TXD_WRAP (1ul << 30) /**< Last descriptor */ -#define GMAC_TXD_ERROR (1ul << 29) /**< Retry limit exceeded, error */ -#define GMAC_TXD_UNDERRUN (1ul << 28) /**< Transmit underrun */ -#define GMAC_TXD_EXHAUSTED (1ul << 27) /**< Buffer exhausted */ -#define GMAC_TXD_LATE (1ul << 26) /**< Late collision,transmit error */ -#define GMAC_TXD_CHECKSUM_ERROR (7ul << 20) /**< Checksum error */ -#define GMAC_TXD_NOCRC (1ul << 16) /**< No CRC */ -#define GMAC_TXD_LAST (1ul << 15) /**< Last buffer in frame */ -#define GMAC_TXD_LEN_MASK (0x1FFF) /**< Length of buffer */ - -/** The MAC can support frame lengths up to 1536 bytes */ -#define GMAC_FRAME_LENTGH_MAX 1536 - -#define GMAC_RX_UNITSIZE 128 /**< Fixed size for RX buffer */ -#define GMAC_TX_UNITSIZE 1518 /**< Size for ETH frame length */ - -/** GMAC clock speed */ -#define GMAC_MCK_SPEED_240MHZ (240*1000*1000) -#define GMAC_MCK_SPEED_160MHZ (160*1000*1000) -#define GMAC_MCK_SPEED_120MHZ (120*1000*1000) -#define GMAC_MCK_SPEED_80MHZ (80*1000*1000) -#define GMAC_MCK_SPEED_40MHZ (40*1000*1000) -#define GMAC_MCK_SPEED_20MHZ (20*1000*1000) - -/** GMAC maintain code default value*/ -#define GMAC_MAN_CODE_VALUE (10) - -/** GMAC maintain start of frame default value*/ -#define GMAC_MAN_SOF_VALUE (1) - -/** GMAC maintain read/write*/ -#define GMAC_MAN_RW_TYPE (2) - -/** GMAC maintain read only*/ -#define GMAC_MAN_READ_ONLY (1) - -/** GMAC address length */ -#define GMAC_ADDR_LENGTH (6) - - -#define GMAC_DUPLEX_HALF 0 -#define GMAC_DUPLEX_FULL 1 - -#define GMAC_SPEED_10M 0 -#define GMAC_SPEED_100M 1 - -/** - * \brief Return codes for GMAC APIs. - */ -typedef enum { - GMAC_OK = 0, /** 0 Operation OK */ - GMAC_TIMEOUT = 1, /** 1 GMAC operation timeout */ - GMAC_TX_BUSY, /** 2 TX in progress */ - GMAC_RX_NULL, /** 3 No data received */ - GMAC_SIZE_TOO_SMALL, /** 4 Buffer size not enough */ - GMAC_PARAM, /** 5 Parameter error, TX packet invalid or RX size too small */ - GMAC_INVALID = 0xFF, /* Invalid */ -} gmac_status_t; - -/** - * \brief Media Independent Interface (MII) type. - */ -typedef enum { - GMAC_PHY_MII = 0, /** MII mode */ - GMAC_PHY_RMII = 1, /** Reduced MII mode */ - GMAC_PHY_INVALID = 0xFF, /* Invalid mode*/ -} gmac_mii_mode_t; - -/** Receive buffer descriptor struct */ -COMPILER_PACK_SET(8) -typedef struct gmac_rx_descriptor { - union gmac_rx_addr { - uint32_t val; - struct gmac_rx_addr_bm { - uint32_t b_ownership:1, /**< User clear, GMAC sets this to 1 once it has successfully written a frame to memory */ - b_wrap:1, /**< Marks last descriptor in receive buffer */ - addr_dw:30; /**< Address in number of DW */ - } bm; - } addr; /**< Address, Wrap & Ownership */ - union gmac_rx_status { - uint32_t val; - struct gmac_rx_status_bm { - uint32_t len:13, /** 0..12 Length of frame including FCS */ - b_fcs:1, /** 13 Receive buffer offset, bits 13:12 of frame length for jumbo frame */ - b_sof:1, /** 14 Start of frame */ - b_eof:1, /** 15 End of frame */ - b_cfi:1, /** 16 Concatenation Format Indicator */ - vlan_priority:3, /** 17..19 VLAN priority (if VLAN detected) */ - b_priority_detected:1, /** 20 Priority tag detected */ - b_vlan_detected:1, /** 21 VLAN tag detected */ - b_type_id_match:2, /** 22..23 Type ID match */ - b_checksumoffload:1, /** 24 Checksum offload specific function */ - b_addrmatch:2, /** 25..26 Address register match */ - b_ext_addr_match:1, /** 27 External address match found */ - reserved:1, /** 28 */ - b_uni_hash_match:1, /** 29 Unicast hash match */ - b_multi_hash_match:1, /** 30 Multicast hash match */ - b_boardcast_detect:1; /** 31 Global broadcast address detected */ - } bm; - } status; -} gmac_rx_descriptor_t; - -/** Transmit buffer descriptor struct */ -COMPILER_PACK_SET(8) -typedef struct gmac_tx_descriptor { - uint32_t addr; - union gmac_tx_status { - uint32_t val; - struct gmac_tx_status_bm { - uint32_t len:14, /** 0..13 Length of buffer */ - reserved:1, /** 14 */ - b_last_buffer:1, /** 15 Last buffer (in the current frame) */ - b_no_crc:1, /** 16 No CRC */ - reserved1:3, /** 17..19 */ - b_checksumoffload:3, /** 20..22 Transmit checksum generation offload errors */ - reserved2:3, /** 23..25 */ - b_lco:1, /** 26 Late collision, transmit error detected */ - b_exhausted:1, /** 27 Buffer exhausted in mid frame */ - b_underrun:1, /** 28 Transmit underrun */ - b_error:1, /** 29 Retry limit exceeded, error detected */ - b_wrap:1, /** 30 Marks last descriptor in TD list */ - b_used:1; /** 31 User clear, GMAC sets this to 1 once a frame has been successfully transmitted */ - } bm; - } status; -} gmac_tx_descriptor_t; - -COMPILER_PACK_RESET() - -/** - * \brief Input parameters when initializing the gmac module mode. - */ -typedef struct gmac_options { - /* Enable/Disable CopyAllFrame */ - uint8_t uc_copy_all_frame; - /* Enable/Disable NoBroadCast */ - uint8_t uc_no_boardcast; - /* MAC address */ - uint8_t uc_mac_addr[GMAC_ADDR_LENGTH]; -} gmac_options_t; - -/** TX callback */ -typedef void (*gmac_dev_tx_cb_t) (uint32_t ul_status, uint8_t *puc_buffer); -/** RX callback */ -typedef void (*gmac_dev_rx_cb_t) (uint32_t ul_status); -/** Wakeup callback */ -typedef void (*gmac_dev_wakeup_cb_t) (void); - -/** - * GMAC driver structure. - */ -typedef struct gmac_device { - - /** Pointer to HW register base */ - Gmac *p_hw; - /** - * Pointer to allocated TX buffer. - * Section 3.6 of AMBA 2.0 spec states that burst should not cross - * 1K Boundaries. - * Receive buffer manager writes are burst of 2 words => 3 lsb bits - * of the address shall be set to 0. - */ - uint8_t *p_tx_buffer; - /** Pointer to allocated RX buffer */ - uint8_t *p_rx_buffer; - /** Pointer to Rx TDs (must be 8-byte aligned) */ - gmac_rx_descriptor_t *p_rx_dscr; - /** Pointer to Tx TDs (must be 8-byte aligned) */ - gmac_tx_descriptor_t *p_tx_dscr; - /** Optional callback to be invoked once a frame has been received */ - gmac_dev_rx_cb_t func_rx_cb; -#if( GMAC_USES_WAKEUP_CALLBACK ) - /** Optional callback to be invoked once several TDs have been released */ - gmac_dev_wakeup_cb_t func_wakeup_cb; -#endif -#if( GMAC_USES_TX_CALLBACK != 0 ) - /** Optional callback list to be invoked once TD has been processed */ - gmac_dev_tx_cb_t *func_tx_cb_list; -#endif - /** RX TD list size */ - uint32_t ul_rx_list_size; - /** RX index for current processing TD */ - uint32_t ul_rx_idx; - /** TX TD list size */ - uint32_t ul_tx_list_size; - /** Circular buffer head pointer by upper layer (buffer to be sent) */ - int32_t l_tx_head; - /** Circular buffer tail pointer incremented by handlers (buffer sent) */ - int32_t l_tx_tail; - - /** Number of free TD before wakeup callback is invoked */ - uint32_t uc_wakeup_threshold; -} gmac_device_t; - -/** - * \brief Write network control value. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_ncr Network control value. - */ -static inline void gmac_network_control(Gmac* p_gmac, uint32_t ul_ncr) -{ - p_gmac->GMAC_NCR = ul_ncr; -} - -/** - * \brief Get network control value. - * - * \param p_gmac Pointer to the GMAC instance. - */ - -static inline uint32_t gmac_get_network_control(Gmac* p_gmac) -{ - return p_gmac->GMAC_NCR; -} - -/** - * \brief Enable/Disable GMAC receive. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable GMAC receiver, else to enable it. - */ -static inline void gmac_enable_receive(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_RXEN; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_RXEN; - } -} - -/** - * \brief Enable/Disable GMAC transmit. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable GMAC transmit, else to enable it. - */ -static inline void gmac_enable_transmit(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_TXEN; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_TXEN; - } -} - -/** - * \brief Enable/Disable GMAC management. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable GMAC management, else to enable it. - */ -static inline void gmac_enable_management(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_MPE; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_MPE; - } -} - -/** - * \brief Clear all statistics registers. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_clear_statistics(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_CLRSTAT; -} - -/** - * \brief Increase all statistics registers. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_increase_statistics(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_INCSTAT; -} - -/** - * \brief Enable/Disable statistics registers writing. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the statistics registers writing, else to enable it. - */ -static inline void gmac_enable_statistics_write(Gmac* p_gmac, - uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_WESTAT; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_WESTAT; - } -} - -/** - * \brief In half-duplex mode, forces collisions on all received frames. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the back pressure, else to enable it. - */ -static inline void gmac_enable_back_pressure(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_BP; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_BP; - } -} - -/** - * \brief Start transmission. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_start_transmission(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TSTART; -} - -/** - * \brief Halt transmission. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_halt_transmission(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_THALT; -} - -/** - * \brief Transmit pause frame. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_tx_pause_frame(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TXPF; -} - -/** - * \brief Transmit zero quantum pause frame. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_tx_pause_zero_quantum_frame(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TXZQPF; -} - -/** - * \brief Read snapshot. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_read_snapshot(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_RDS; -} - -/** - * \brief Store receivetime stamp to memory. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to normal operation, else to enable the store. - */ -static inline void gmac_store_rx_time_stamp(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_SRTSM; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_SRTSM; - } -} - -/** - * \brief Enable PFC priority-based pause reception. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 1 to set the reception, 0 to disable. - */ -static inline void gmac_enable_pfc_pause_frame(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCR |= GMAC_NCR_ENPBPR; - } else { - p_gmac->GMAC_NCR &= ~GMAC_NCR_ENPBPR; - } -} - -/** - * \brief Transmit PFC priority-based pause reception. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_transmit_pfc_pause_frame(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_TXPBPF; -} - -/** - * \brief Flush next packet. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_flush_next_packet(Gmac* p_gmac) -{ - p_gmac->GMAC_NCR |= GMAC_NCR_FNP; -} - -/** - * \brief Set up network configuration register. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_cfg Network configuration value. - */ -static inline void gmac_set_configure(Gmac* p_gmac, uint32_t ul_cfg) -{ - p_gmac->GMAC_NCFGR = ul_cfg; -} - -/** - * \brief Get network configuration. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Network configuration. - */ -static inline uint32_t gmac_get_configure(Gmac* p_gmac) -{ - return p_gmac->GMAC_NCFGR; -} - - -/* Get and set DMA Configuration Register */ -static inline void gmac_set_dma(Gmac* p_gmac, uint32_t ul_cfg) -{ - p_gmac->GMAC_DCFGR = ul_cfg; -} - -static inline uint32_t gmac_get_dma(Gmac* p_gmac) -{ - return p_gmac->GMAC_DCFGR; -} - -/** - * \brief Set speed. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_speed 1 to indicate 100Mbps, 0 to 10Mbps. - */ -static inline void gmac_set_speed(Gmac* p_gmac, uint8_t uc_speed) -{ - if (uc_speed) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_SPD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_SPD; - } -} - -/** - * \brief Enable/Disable Full-Duplex mode. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the Full-Duplex mode, else to enable it. - */ -static inline void gmac_enable_full_duplex(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_FD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_FD; - } -} - -/** - * \brief Enable/Disable Copy(Receive) All Valid Frames. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable copying all valid frames, else to enable it. - */ -static inline void gmac_enable_copy_all(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_CAF; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_CAF; - } -} - -/** - * \brief Enable/Disable jumbo frames (up to 10240 bytes). - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the jumbo frames, else to enable it. - */ -static inline void gmac_enable_jumbo_frames(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_JFRAME; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_JFRAME; - } -} - -/** - * \brief Disable/Enable broadcast receiving. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 1 to disable the broadcast, else to enable it. - */ -static inline void gmac_disable_broadcast(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_NBC; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_NBC; - } -} - -/** - * \brief Enable/Disable multicast hash. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the multicast hash, else to enable it. - */ -static inline void gmac_enable_multicast_hash(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_UNIHEN; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_UNIHEN; - } -} - -/** - * \brief Enable/Disable big frames (over 1518, up to 1536). - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable big frames else to enable it. - */ -static inline void gmac_enable_big_frame(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_MAXFS; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_MAXFS; - } -} - -/** - * \brief Set MDC clock divider. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_mck GMAC MCK. - * - * \return GMAC_OK if successfully. - */ -static inline uint8_t gmac_set_mdc_clock(Gmac* p_gmac, uint32_t ul_mck) -{ - uint32_t ul_clk; - - if (ul_mck > GMAC_MCK_SPEED_240MHZ) { - return GMAC_INVALID; - } else if (ul_mck > GMAC_MCK_SPEED_160MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_96; - } else if (ul_mck > GMAC_MCK_SPEED_120MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_64; - } else if (ul_mck > GMAC_MCK_SPEED_80MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_48; - } else if (ul_mck > GMAC_MCK_SPEED_40MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_32; - } else if (ul_mck > GMAC_MCK_SPEED_20MHZ) { - ul_clk = GMAC_NCFGR_CLK_MCK_16; - } else { - ul_clk = GMAC_NCFGR_CLK_MCK_8; - } - ; - p_gmac->GMAC_NCFGR = (p_gmac->GMAC_NCFGR & ~GMAC_NCFGR_CLK_Msk) | ul_clk; - return GMAC_OK; -} - -/** - * \brief Enable/Disable retry test. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the GMAC receiver, else to enable it. - */ -static inline void gmac_enable_retry_test(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RTY; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RTY; - } -} - -/** - * \brief Enable/Disable pause (when a valid pause frame is received). - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable pause frame, else to enable it. - */ -static inline void gmac_enable_pause_frame(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_PEN; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_PEN; - } -} - -/** - * \brief Set receive buffer offset to 0 ~ 3. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline void gmac_set_rx_buffer_offset(Gmac* p_gmac, uint8_t uc_offset) -{ - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RXBUFO_Msk; - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RXBUFO(uc_offset); -} - -/** - * \brief Enable/Disable receive length field checking. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable receive length field checking, else to enable it. - */ -static inline void gmac_enable_rx_length_check(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_LFERD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_LFERD; - } -} - -/** - * \brief Enable/Disable discarding FCS field of received frames. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable discarding FCS field of received frames, else to enable it. - */ -static inline void gmac_enable_discard_fcs(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RFCS; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RFCS; - } -} - - -/** - * \brief Enable/Disable frames to be received in half-duplex mode - * while transmitting. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable the received in half-duplex mode, else to enable it. - */ -static inline void gmac_enable_efrhd(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_EFRHD; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_EFRHD; - } -} - -/** - * \brief Enable/Disable ignore RX FCS. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_enable 0 to disable ignore RX FCS, else to enable it. - */ -static inline void gmac_enable_ignore_rx_fcs(Gmac* p_gmac, uint8_t uc_enable) -{ - if (uc_enable) { - p_gmac->GMAC_NCFGR |= GMAC_NCFGR_IRXFCS; - } else { - p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_IRXFCS; - } -} - -/** - * \brief Get Network Status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Network status. - */ -static inline uint32_t gmac_get_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_NSR; -} - -/** - * \brief Get MDIO IN pin status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return MDIO IN pin status. - */ -static inline uint8_t gmac_get_MDIO(Gmac* p_gmac) -{ - return ((p_gmac->GMAC_NSR & GMAC_NSR_MDIO) > 0); -} - -/** - * \brief Check if PHY is idle. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return 1 if PHY is idle. - */ -static inline uint8_t gmac_is_phy_idle(Gmac* p_gmac) -{ - return ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) > 0); -} - -/** - * \brief Return transmit status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Transmit status. - */ -static inline uint32_t gmac_get_tx_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_TSR; -} - -/** - * \brief Clear transmit status. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_status Transmit status. - */ -static inline void gmac_clear_tx_status(Gmac* p_gmac, uint32_t ul_status) -{ - p_gmac->GMAC_TSR = ul_status; -} - -/** - * \brief Return receive status. - * - * \param p_gmac Pointer to the GMAC instance. - */ -static inline uint32_t gmac_get_rx_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_RSR; -} - -/** - * \brief Clear receive status. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_status Receive status. - */ -static inline void gmac_clear_rx_status(Gmac* p_gmac, uint32_t ul_status) -{ - p_gmac->GMAC_RSR = ul_status; -} - -/** - * \brief Set Rx Queue. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_addr Rx queue address. - */ -static inline void gmac_set_rx_queue(Gmac* p_gmac, uint32_t ul_addr) -{ - p_gmac->GMAC_RBQB = GMAC_RBQB_ADDR_Msk & ul_addr; -} - -/** - * \brief Get Rx Queue Address. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Rx queue address. - */ -static inline uint32_t gmac_get_rx_queue(Gmac* p_gmac) -{ - return p_gmac->GMAC_RBQB; -} - -/** - * \brief Set Tx Queue. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_addr Tx queue address. - */ -static inline void gmac_set_tx_queue(Gmac* p_gmac, uint32_t ul_addr) -{ - p_gmac->GMAC_TBQB = GMAC_TBQB_ADDR_Msk & ul_addr; -} - -/** - * \brief Get Tx Queue. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Rx queue address. - */ -static inline uint32_t gmac_get_tx_queue(Gmac* p_gmac) -{ - return p_gmac->GMAC_TBQB; -} - -/** - * \brief Enable interrupt(s). - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_source Interrupt source(s) to be enabled. - */ -static inline void gmac_enable_interrupt(Gmac* p_gmac, uint32_t ul_source) -{ - p_gmac->GMAC_IER = ul_source; -} - -/** - * \brief Disable interrupt(s). - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_source Interrupt source(s) to be disabled. - */ -static inline void gmac_disable_interrupt(Gmac* p_gmac, uint32_t ul_source) -{ - p_gmac->GMAC_IDR = ul_source; -} - -/** - * \brief Return interrupt status. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Interrupt status. - */ -static inline uint32_t gmac_get_interrupt_status(Gmac* p_gmac) -{ - return p_gmac->GMAC_ISR; -} - -/** - * \brief Return interrupt mask. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Interrupt mask. - */ -static inline uint32_t gmac_get_interrupt_mask(Gmac* p_gmac) -{ - return p_gmac->GMAC_IMR; -} - -/** - * \brief Execute PHY maintenance command. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_phy_addr PHY address. - * \param uc_reg_addr Register address. - * \param uc_rw 1 to Read, 0 to write. - * \param us_data Data to be performed, write only. - */ -static inline void gmac_maintain_phy(Gmac* p_gmac, - uint8_t uc_phy_addr, uint8_t uc_reg_addr, uint8_t uc_rw, - uint16_t us_data) -{ - /* Wait until bus idle */ - while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); - /* Write maintain register */ - p_gmac->GMAC_MAN = GMAC_MAN_WTN(GMAC_MAN_CODE_VALUE) - | GMAC_MAN_CLTTO - | GMAC_MAN_PHYA(uc_phy_addr) - | GMAC_MAN_REGA(uc_reg_addr) - | GMAC_MAN_OP((uc_rw ? GMAC_MAN_RW_TYPE : GMAC_MAN_READ_ONLY)) - | GMAC_MAN_DATA(us_data); -} - -/** - * \brief Get PHY maintenance data returned. - * - * \param p_gmac Pointer to the GMAC instance. - * - * \return Get PHY data. - */ -static inline uint16_t gmac_get_phy_data(Gmac* p_gmac) -{ - /* Wait until bus idle */ - while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); - /* Return data */ - return (uint16_t) (p_gmac->GMAC_MAN & GMAC_MAN_DATA_Msk); -} - -/** - * \brief Set Hash. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ul_hash_top Hash top. - * \param ul_hash_bottom Hash bottom. - */ -static inline void gmac_set_hash(Gmac* p_gmac, uint32_t ul_hash_top, - uint32_t ul_hash_bottom) -{ - p_gmac->GMAC_HRB = ul_hash_bottom; - p_gmac->GMAC_HRT = ul_hash_top; -} - -/** - * \brief Set 64 bits Hash. - * - * \param p_gmac Pointer to the GMAC instance. - * \param ull_hash 64 bits hash value. - */ -static inline void gmac_set_hash64(Gmac* p_gmac, uint64_t ull_hash) -{ - p_gmac->GMAC_HRB = (uint32_t) ull_hash; - p_gmac->GMAC_HRT = (uint32_t) (ull_hash >> 32); -} - -/** - * \brief Set MAC Address. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_index GMAC specific address register index. - * \param p_mac_addr GMAC address. - */ -static inline void gmac_set_address(Gmac* p_gmac, uint8_t uc_index, - uint8_t* p_mac_addr) -{ - p_gmac->GMAC_SA[uc_index].GMAC_SAB = (p_mac_addr[3] << 24) - | (p_mac_addr[2] << 16) - | (p_mac_addr[1] << 8) - | (p_mac_addr[0]); - p_gmac->GMAC_SA[uc_index].GMAC_SAT = (p_mac_addr[5] << 8) - | (p_mac_addr[4]); -} - -/** - * \brief Set MAC Address via 2 dword. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_index GMAC specific address register index. - * \param ul_mac_top GMAC top address. - * \param ul_mac_bottom GMAC bottom address. - */ -static inline void gmac_set_address32(Gmac* p_gmac, uint8_t uc_index, - uint32_t ul_mac_top, uint32_t ul_mac_bottom) -{ - p_gmac->GMAC_SA[uc_index].GMAC_SAB = ul_mac_bottom; - p_gmac->GMAC_SA[uc_index].GMAC_SAT = ul_mac_top; -} - -/** - * \brief Set MAC Address via int64. - * - * \param p_gmac Pointer to the GMAC instance. - * \param uc_index GMAC specific address register index. - * \param ull_mac 64-bit GMAC address. - */ -static inline void gmac_set_address64(Gmac* p_gmac, uint8_t uc_index, - uint64_t ull_mac) -{ - p_gmac->GMAC_SA[uc_index].GMAC_SAB = (uint32_t) ull_mac; - p_gmac->GMAC_SA[uc_index].GMAC_SAT = (uint32_t) (ull_mac >> 32); -} - -/** - * \brief Select media independent interface mode. - * - * \param p_gmac Pointer to the GMAC instance. - * \param mode Media independent interface mode. - */ -static inline void gmac_select_mii_mode(Gmac* p_gmac, gmac_mii_mode_t mode) -{ - switch (mode) { - case GMAC_PHY_MII: - case GMAC_PHY_RMII: - p_gmac->GMAC_UR |= GMAC_UR_RMIIMII; - break; - - default: - p_gmac->GMAC_UR &= ~GMAC_UR_RMIIMII; - break; - } -} - -uint8_t gmac_phy_read(Gmac* p_gmac, uint8_t uc_phy_address, uint8_t uc_address, - uint32_t* p_value); -uint8_t gmac_phy_write(Gmac* p_gmac, uint8_t uc_phy_address, - uint8_t uc_address, uint32_t ul_value); -void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev, - gmac_options_t* p_opt); -uint32_t gmac_dev_read(gmac_device_t* p_gmac_dev, uint8_t* p_frame, - uint32_t ul_frame_size, uint32_t* p_rcv_size); -uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer, - uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb); -uint32_t gmac_dev_get_tx_load(gmac_device_t* p_gmac_dev); -void gmac_dev_set_rx_callback(gmac_device_t* p_gmac_dev, - gmac_dev_rx_cb_t func_rx_cb); -uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t* p_gmac_dev, - gmac_dev_wakeup_cb_t func_wakeup, uint8_t uc_threshold); -void gmac_dev_reset(gmac_device_t* p_gmac_dev); -void gmac_handler(gmac_device_t* p_gmac_dev); - -/// @cond 0 -/**INDENT-OFF**/ -#ifdef __cplusplus -} -#endif -/**INDENT-ON**/ -/// @endcond - -/** - * \page gmac_quickstart Quickstart guide for GMAC driver. - * - * This is the quickstart guide for the \ref gmac_group "Ethernet MAC", - * with step-by-step instructions on how to configure and use the driver in a - * selection of use cases. - * - * The use cases contain several code fragments. The code fragments in the - * steps for setup can be copied into a custom initialization function, while - * the steps for usage can be copied into, e.g., the main application function. - * - * \section gmac_basic_use_case Basic use case - * In the basic use case, the GMAC driver are configured for: - * - PHY component KSZ8051MNL is used - * - GMAC uses MII mode - * - The number of receive buffer is 16 - * - The number of transfer buffer is 8 - * - MAC address is set to 00-04-25-1c-a0-02 - * - IP address is set to 192.168.0.2 - * - IP address is set to 192.168.0.2 - * - Gateway is set to 192.168.0.1 - * - Network mask is 255.255.255.0 - * - PHY operation max retry count is 1000000 - * - GMAC is configured to not support copy all frame and support broadcast - * - The data will be read from the ethernet - * - * \section gmac_basic_use_case_setup Setup steps - * - * \subsection gmac_basic_use_case_setup_prereq Prerequisites - * -# \ref sysclk_group "System Clock Management (sysclock)" - * -# \ref pmc_group "Power Management Controller (pmc)" - * -# \ref ksz8051mnl_ethernet_phy_group "PHY component (KSZ8051MNL)" - * - * \subsection gmac_basic_use_case_setup_code Example code - * Content of conf_eth.h - * \code - * #define GMAC_RX_BUFFERS 16 - * #define GMAC_TX_BUFFERS 8 - * #define MAC_PHY_RETRY_MAX 1000000 - * #define ETHERNET_CONF_ETHADDR0 0x00 - * #define ETHERNET_CONF_ETHADDR0 0x00 - * #define ETHERNET_CONF_ETHADDR1 0x04 - * #define ETHERNET_CONF_ETHADDR2 0x25 - * #define ETHERNET_CONF_ETHADDR3 0x1C - * #define ETHERNET_CONF_ETHADDR4 0xA0 - * #define ETHERNET_CONF_ETHADDR5 0x02 - * #define ETHERNET_CONF_IPADDR0 192 - * #define ETHERNET_CONF_IPADDR1 168 - * #define ETHERNET_CONF_IPADDR2 0 - * #define ETHERNET_CONF_IPADDR3 2 - * #define ETHERNET_CONF_GATEWAY_ADDR0 192 - * #define ETHERNET_CONF_GATEWAY_ADDR1 168 - * #define ETHERNET_CONF_GATEWAY_ADDR2 0 - * #define ETHERNET_CONF_GATEWAY_ADDR3 1 - * #define ETHERNET_CONF_NET_MASK0 255 - * #define ETHERNET_CONF_NET_MASK1 255 - * #define ETHERNET_CONF_NET_MASK2 255 - * #define ETHERNET_CONF_NET_MASK3 0 - * #define ETH_PHY_MODE ETH_PHY_MODE - * \endcode - * - * A specific gmac device and the receive data buffer must be defined; another ul_frm_size should be defined - * to trace the actual size of the data received. - * \code - * static gmac_device_t gs_gmac_dev; - * static volatile uint8_t gs_uc_eth_buffer[GMAC_FRAME_LENTGH_MAX]; - * - * uint32_t ul_frm_size; - * \endcode - * - * Add to application C-file: - * \code - * void gmac_init(void) - * { - * sysclk_init(); - * - * board_init(); - * - * pmc_enable_periph_clk(ID_GMAC); - * - * gmac_option.uc_copy_all_frame = 0; - * gmac_option.uc_no_boardcast = 0; - * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); - * gs_gmac_dev.p_hw = GMAC; - * - * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); - * - * NVIC_EnableIRQ(GMAC_IRQn); - * - * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); - * - * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); - * - * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); - * \endcode - * - * \subsection gmac_basic_use_case_setup_flow Workflow - * - Ensure that conf_eth.h is present and contains the - * following configuration symbol. This configuration file is used - * by the driver and should not be included by the application. - * -# Define the receiving buffer size used in the internal GMAC driver. - * The buffer size used for RX is GMAC_RX_BUFFERS * 128. - * If it was supposed receiving a large number of frame, the - * GMAC_RX_BUFFERS should be set higher. E.g., the application wants to accept - * a ping echo test of 2048, the GMAC_RX_BUFFERS should be set at least - * (2048/128)=16, and as there are additional frames coming, a preferred - * number is 24 depending on a normal Ethernet throughput. - * - \code - * #define GMAC_RX_BUFFERS 16 - * \endcode - * -# Define the transmitting buffer size used in the internal GMAC driver. - * The buffer size used for TX is GMAC_TX_BUFFERS * 1518. - * - \code - * #define GMAC_TX_BUFFERS 8 - * \endcode - * -# Define maximum retry time for a PHY read/write operation. - * - \code - * #define MAC_PHY_RETRY_MAX 1000000 - * \endcode - * -# Define the MAC address. 00:04:25:1C:A0:02 is the address reserved - * for ATMEL, application should always change this address to its' own. - * - \code - * #define ETHERNET_CONF_ETHADDR0 0x00 - * #define ETHERNET_CONF_ETHADDR1 0x04 - * #define ETHERNET_CONF_ETHADDR2 0x25 - * #define ETHERNET_CONF_ETHADDR3 0x1C - * #define ETHERNET_CONF_ETHADDR4 0xA0 - * #define ETHERNET_CONF_ETHADDR5 0x02 - * \endcode - * -# Define the IP address configration used in the application. When DHCP - * is enabled, this configuration is not effected. - * - \code - * #define ETHERNET_CONF_IPADDR0 192 - * #define ETHERNET_CONF_IPADDR1 168 - * #define ETHERNET_CONF_IPADDR2 0 - * #define ETHERNET_CONF_IPADDR3 2 - * #define ETHERNET_CONF_GATEWAY_ADDR0 192 - * #define ETHERNET_CONF_GATEWAY_ADDR1 168 - * #define ETHERNET_CONF_GATEWAY_ADDR2 0 - * #define ETHERNET_CONF_GATEWAY_ADDR3 1 - * #define ETHERNET_CONF_NET_MASK0 255 - * #define ETHERNET_CONF_NET_MASK1 255 - * #define ETHERNET_CONF_NET_MASK2 255 - * #define ETHERNET_CONF_NET_MASK3 0 - * \endcode - * -# Configure the PHY maintainance interface. - * - \code - * #define ETH_PHY_MODE GMAC_PHY_MII - * \endcode - * -# Enable the system clock: - * - \code sysclk_init(); \endcode - * -# Enable PIO configurations for GMAC: - * - \code board_init(); \endcode - * -# Enable PMC clock for GMAC: - * - \code pmc_enable_periph_clk(ID_GMAC); \endcode - * -# Set the GMAC options; it's set to copy all frame and support broadcast: - * - \code - * gmac_option.uc_copy_all_frame = 0; - * gmac_option.uc_no_boardcast = 0; - * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); - * gs_gmac_dev.p_hw = GMAC; - * \endcode - * -# Initialize GMAC device with the filled option: - * - \code - * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); - * \endcode - * -# Enable the interrupt service for GMAC: - * - \code - * NVIC_EnableIRQ(GMAC_IRQn); - * \endcode - * -# Initialize the PHY component: - * - \code - * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); - * \endcode - * -# The link will be established based on auto negotiation. - * - \code - * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); - * \endcode - * -# Establish the ethernet link; the network can be worked from now on: - * - \code - * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); - * \endcode - * - * \section gmac_basic_use_case_usage Usage steps - * \subsection gmac_basic_use_case_usage_code Example code - * Add to, e.g., main loop in application C-file: - * \code - * gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); - * \endcode - * - * \subsection gmac_basic_use_case_usage_flow Workflow - * -# Start reading the data from the ethernet: - * - \code gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); \endcode - */ - -# define GMAC_STATS 0 - -#if( GMAC_STATS != 0 ) - - /* Here below some code to study the types and - frequencies of GMAC interrupts. */ - #define GMAC_IDX_RXUBR 0 - #define GMAC_IDX_TUR 1 - #define GMAC_IDX_RLEX 2 - #define GMAC_IDX_TFC 3 - #define GMAC_IDX_RCOMP 4 - #define GMAC_IDX_TCOMP 5 - #define GMAC_IDX_ROVR 6 - #define GMAC_IDX_HRESP 7 - #define GMAC_IDX_PFNZ 8 - #define GMAC_IDX_PTZ 9 - - struct SGmacStats { - unsigned recvCount; - unsigned rovrCount; - unsigned bnaCount; - unsigned sendCount; - unsigned sovrCount; - unsigned incompCount; - unsigned truncCount; - - unsigned intStatus[10]; - }; - extern struct SGmacStats gmacStats; - - struct SIntPair { - const char *name; - unsigned mask; - int index; - }; - - #define MK_PAIR( NAME ) #NAME, GMAC_IER_##NAME, GMAC_IDX_##NAME - static const struct SIntPair intPairs[] = { - { MK_PAIR( RXUBR ) }, /* Enable receive used bit read interrupt. */ - { MK_PAIR( TUR ) }, /* Enable transmit underrun interrupt. */ - { MK_PAIR( RLEX ) }, /* Enable retry limit exceeded interrupt. */ - { MK_PAIR( TFC ) }, /* Enable transmit buffers exhausted in mid-frame interrupt. */ - { MK_PAIR( RCOMP ) }, /* Receive complete */ - { MK_PAIR( TCOMP ) }, /* Enable transmit complete interrupt. */ - { MK_PAIR( ROVR ) }, /* Enable receive overrun interrupt. */ - { MK_PAIR( HRESP ) }, /* Enable Hresp not OK interrupt. */ - { MK_PAIR( PFNZ ) }, /* Enable pause frame received interrupt. */ - { MK_PAIR( PTZ ) } /* Enable pause time zero interrupt. */ - }; - - void gmac_show_irq_counts (); - -#endif - -#endif /* GMAC_H_INCLUDED */ + /** + * \file + * + * \brief GMAC (Ethernet MAC) driver for SAM. + * + * Copyright (c) 2013 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + */ + +#ifndef GMAC_H_INCLUDED +#define GMAC_H_INCLUDED + +#include "compiler.h" +#include "component/gmac.h" + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +extern "C" { +#endif +/**INDENT-ON**/ +/// @endcond + +/** The buffer addresses written into the descriptors must be aligned, so the + last few bits are zero. These bits have special meaning for the GMAC + peripheral and cannot be used as part of the address. */ +#define GMAC_RXD_ADDR_MASK 0xFFFFFFFC +#define GMAC_RXD_WRAP (1ul << 1) /**< Wrap bit */ +#define GMAC_RXD_OWNERSHIP (1ul << 0) /**< Ownership bit */ + +#define GMAC_RXD_BROADCAST (1ul << 31) /**< Broadcast detected */ +#define GMAC_RXD_MULTIHASH (1ul << 30) /**< Multicast hash match */ +#define GMAC_RXD_UNIHASH (1ul << 29) /**< Unicast hash match */ +#define GMAC_RXD_ADDR_FOUND (1ul << 27) /**< Specific address match found */ +#define GMAC_RXD_ADDR (3ul << 25) /**< Address match */ +#define GMAC_RXD_RXCOEN (1ul << 24) /**< RXCOEN related function */ +#define GMAC_RXD_TYPE (3ul << 22) /**< Type ID match */ +#define GMAC_RXD_VLAN (1ul << 21) /**< VLAN tag detected */ +#define GMAC_RXD_PRIORITY (1ul << 20) /**< Priority tag detected */ +#define GMAC_RXD_PRIORITY_MASK (3ul << 17) /**< VLAN priority */ +#define GMAC_RXD_CFI (1ul << 16) /**< Concatenation Format Indicator only if bit 21 is set */ +#define GMAC_RXD_EOF (1ul << 15) /**< End of frame */ +#define GMAC_RXD_SOF (1ul << 14) /**< Start of frame */ +#define GMAC_RXD_FCS (1ul << 13) /**< Frame check sequence */ +#define GMAC_RXD_OFFSET_MASK /**< Receive buffer offset */ +#define GMAC_RXD_LEN_MASK (0xFFF) /**< Length of frame including FCS (if selected) */ +#define GMAC_RXD_LENJUMBO_MASK (0x3FFF) /**< Jumbo frame length */ + +#define GMAC_TXD_USED (1ul << 31) /**< Frame is transmitted */ +#define GMAC_TXD_WRAP (1ul << 30) /**< Last descriptor */ +#define GMAC_TXD_ERROR (1ul << 29) /**< Retry limit exceeded, error */ +#define GMAC_TXD_UNDERRUN (1ul << 28) /**< Transmit underrun */ +#define GMAC_TXD_EXHAUSTED (1ul << 27) /**< Buffer exhausted */ +#define GMAC_TXD_LATE (1ul << 26) /**< Late collision,transmit error */ +#define GMAC_TXD_CHECKSUM_ERROR (7ul << 20) /**< Checksum error */ +#define GMAC_TXD_NOCRC (1ul << 16) /**< No CRC */ +#define GMAC_TXD_LAST (1ul << 15) /**< Last buffer in frame */ +#define GMAC_TXD_LEN_MASK (0x1FFF) /**< Length of buffer */ + +/** The MAC can support frame lengths up to 1536 bytes */ +#define GMAC_FRAME_LENTGH_MAX 1536 + +#define GMAC_RX_UNITSIZE 128 /**< Fixed size for RX buffer */ +#define GMAC_TX_UNITSIZE 1518 /**< Size for ETH frame length */ + +/** GMAC clock speed */ +#define GMAC_MCK_SPEED_240MHZ (240*1000*1000) +#define GMAC_MCK_SPEED_160MHZ (160*1000*1000) +#define GMAC_MCK_SPEED_120MHZ (120*1000*1000) +#define GMAC_MCK_SPEED_80MHZ (80*1000*1000) +#define GMAC_MCK_SPEED_40MHZ (40*1000*1000) +#define GMAC_MCK_SPEED_20MHZ (20*1000*1000) + +/** GMAC maintain code default value*/ +#define GMAC_MAN_CODE_VALUE (10) + +/** GMAC maintain start of frame default value*/ +#define GMAC_MAN_SOF_VALUE (1) + +/** GMAC maintain read/write*/ +#define GMAC_MAN_RW_TYPE (2) + +/** GMAC maintain read only*/ +#define GMAC_MAN_READ_ONLY (1) + +/** GMAC address length */ +#define GMAC_ADDR_LENGTH (6) + + +#define GMAC_DUPLEX_HALF 0 +#define GMAC_DUPLEX_FULL 1 + +#define GMAC_SPEED_10M 0 +#define GMAC_SPEED_100M 1 + +/** + * \brief Return codes for GMAC APIs. + */ +typedef enum { + GMAC_OK = 0, /** 0 Operation OK */ + GMAC_TIMEOUT = 1, /** 1 GMAC operation timeout */ + GMAC_TX_BUSY, /** 2 TX in progress */ + GMAC_RX_NULL, /** 3 No data received */ + GMAC_SIZE_TOO_SMALL, /** 4 Buffer size not enough */ + GMAC_PARAM, /** 5 Parameter error, TX packet invalid or RX size too small */ + GMAC_INVALID = 0xFF, /* Invalid */ +} gmac_status_t; + +/** + * \brief Media Independent Interface (MII) type. + */ +typedef enum { + GMAC_PHY_MII = 0, /** MII mode */ + GMAC_PHY_RMII = 1, /** Reduced MII mode */ + GMAC_PHY_INVALID = 0xFF, /* Invalid mode*/ +} gmac_mii_mode_t; + +/** Receive buffer descriptor struct */ +COMPILER_PACK_SET(8) +typedef struct gmac_rx_descriptor { + union gmac_rx_addr { + uint32_t val; + struct gmac_rx_addr_bm { + uint32_t b_ownership:1, /**< User clear, GMAC sets this to 1 once it has successfully written a frame to memory */ + b_wrap:1, /**< Marks last descriptor in receive buffer */ + addr_dw:30; /**< Address in number of DW */ + } bm; + } addr; /**< Address, Wrap & Ownership */ + union gmac_rx_status { + uint32_t val; + struct gmac_rx_status_bm { + uint32_t len:13, /** 0..12 Length of frame including FCS */ + b_fcs:1, /** 13 Receive buffer offset, bits 13:12 of frame length for jumbo frame */ + b_sof:1, /** 14 Start of frame */ + b_eof:1, /** 15 End of frame */ + b_cfi:1, /** 16 Concatenation Format Indicator */ + vlan_priority:3, /** 17..19 VLAN priority (if VLAN detected) */ + b_priority_detected:1, /** 20 Priority tag detected */ + b_vlan_detected:1, /** 21 VLAN tag detected */ + b_type_id_match:2, /** 22..23 Type ID match */ + b_checksumoffload:1, /** 24 Checksum offload specific function */ + b_addrmatch:2, /** 25..26 Address register match */ + b_ext_addr_match:1, /** 27 External address match found */ + reserved:1, /** 28 */ + b_uni_hash_match:1, /** 29 Unicast hash match */ + b_multi_hash_match:1, /** 30 Multicast hash match */ + b_boardcast_detect:1; /** 31 Global broadcast address detected */ + } bm; + } status; +} gmac_rx_descriptor_t; + +/** Transmit buffer descriptor struct */ +COMPILER_PACK_SET(8) +typedef struct gmac_tx_descriptor { + uint32_t addr; + union gmac_tx_status { + uint32_t val; + struct gmac_tx_status_bm { + uint32_t len:14, /** 0..13 Length of buffer */ + reserved:1, /** 14 */ + b_last_buffer:1, /** 15 Last buffer (in the current frame) */ + b_no_crc:1, /** 16 No CRC */ + reserved1:3, /** 17..19 */ + b_checksumoffload:3, /** 20..22 Transmit checksum generation offload errors */ + reserved2:3, /** 23..25 */ + b_lco:1, /** 26 Late collision, transmit error detected */ + b_exhausted:1, /** 27 Buffer exhausted in mid frame */ + b_underrun:1, /** 28 Transmit underrun */ + b_error:1, /** 29 Retry limit exceeded, error detected */ + b_wrap:1, /** 30 Marks last descriptor in TD list */ + b_used:1; /** 31 User clear, GMAC sets this to 1 once a frame has been successfully transmitted */ + } bm; + } status; +} gmac_tx_descriptor_t; + +COMPILER_PACK_RESET() + +/** + * \brief Input parameters when initializing the gmac module mode. + */ +typedef struct gmac_options { + /* Enable/Disable CopyAllFrame */ + uint8_t uc_copy_all_frame; + /* Enable/Disable NoBroadCast */ + uint8_t uc_no_boardcast; + /* MAC address */ + uint8_t uc_mac_addr[GMAC_ADDR_LENGTH]; +} gmac_options_t; + +/** TX callback */ +typedef void (*gmac_dev_tx_cb_t) (uint32_t ul_status, uint8_t *puc_buffer); +/** RX callback */ +typedef void (*gmac_dev_rx_cb_t) (uint32_t ul_status); +/** Wakeup callback */ +typedef void (*gmac_dev_wakeup_cb_t) (void); + +/** + * GMAC driver structure. + */ +typedef struct gmac_device { + + /** Pointer to HW register base */ + Gmac *p_hw; + /** + * Pointer to allocated TX buffer. + * Section 3.6 of AMBA 2.0 spec states that burst should not cross + * 1K Boundaries. + * Receive buffer manager writes are burst of 2 words => 3 lsb bits + * of the address shall be set to 0. + */ + uint8_t *p_tx_buffer; + /** Pointer to allocated RX buffer */ + uint8_t *p_rx_buffer; + /** Pointer to Rx TDs (must be 8-byte aligned) */ + gmac_rx_descriptor_t *p_rx_dscr; + /** Pointer to Tx TDs (must be 8-byte aligned) */ + gmac_tx_descriptor_t *p_tx_dscr; + /** Optional callback to be invoked once a frame has been received */ + gmac_dev_rx_cb_t func_rx_cb; +#if( GMAC_USES_WAKEUP_CALLBACK ) + /** Optional callback to be invoked once several TDs have been released */ + gmac_dev_wakeup_cb_t func_wakeup_cb; +#endif +#if( GMAC_USES_TX_CALLBACK != 0 ) + /** Optional callback list to be invoked once TD has been processed */ + gmac_dev_tx_cb_t *func_tx_cb_list; +#endif + /** RX TD list size */ + uint32_t ul_rx_list_size; + /** RX index for current processing TD */ + uint32_t ul_rx_idx; + /** TX TD list size */ + uint32_t ul_tx_list_size; + /** Circular buffer head pointer by upper layer (buffer to be sent) */ + int32_t l_tx_head; + /** Circular buffer tail pointer incremented by handlers (buffer sent) */ + int32_t l_tx_tail; + + /** Number of free TD before wakeup callback is invoked */ + uint32_t uc_wakeup_threshold; +} gmac_device_t; + +/** + * \brief Write network control value. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_ncr Network control value. + */ +static inline void gmac_network_control(Gmac* p_gmac, uint32_t ul_ncr) +{ + p_gmac->GMAC_NCR = ul_ncr; +} + +/** + * \brief Get network control value. + * + * \param p_gmac Pointer to the GMAC instance. + */ + +static inline uint32_t gmac_get_network_control(Gmac* p_gmac) +{ + return p_gmac->GMAC_NCR; +} + +/** + * \brief Enable/Disable GMAC receive. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable GMAC receiver, else to enable it. + */ +static inline void gmac_enable_receive(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_RXEN; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_RXEN; + } +} + +/** + * \brief Enable/Disable GMAC transmit. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable GMAC transmit, else to enable it. + */ +static inline void gmac_enable_transmit(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_TXEN; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_TXEN; + } +} + +/** + * \brief Enable/Disable GMAC management. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable GMAC management, else to enable it. + */ +static inline void gmac_enable_management(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_MPE; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_MPE; + } +} + +/** + * \brief Clear all statistics registers. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_clear_statistics(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_CLRSTAT; +} + +/** + * \brief Increase all statistics registers. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_increase_statistics(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_INCSTAT; +} + +/** + * \brief Enable/Disable statistics registers writing. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the statistics registers writing, else to enable it. + */ +static inline void gmac_enable_statistics_write(Gmac* p_gmac, + uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_WESTAT; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_WESTAT; + } +} + +/** + * \brief In half-duplex mode, forces collisions on all received frames. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the back pressure, else to enable it. + */ +static inline void gmac_enable_back_pressure(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_BP; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_BP; + } +} + +/** + * \brief Start transmission. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_start_transmission(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TSTART; +} + +/** + * \brief Halt transmission. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_halt_transmission(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_THALT; +} + +/** + * \brief Transmit pause frame. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_tx_pause_frame(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TXPF; +} + +/** + * \brief Transmit zero quantum pause frame. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_tx_pause_zero_quantum_frame(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TXZQPF; +} + +/** + * \brief Read snapshot. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_read_snapshot(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_RDS; +} + +/** + * \brief Store receivetime stamp to memory. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to normal operation, else to enable the store. + */ +static inline void gmac_store_rx_time_stamp(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_SRTSM; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_SRTSM; + } +} + +/** + * \brief Enable PFC priority-based pause reception. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 1 to set the reception, 0 to disable. + */ +static inline void gmac_enable_pfc_pause_frame(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCR |= GMAC_NCR_ENPBPR; + } else { + p_gmac->GMAC_NCR &= ~GMAC_NCR_ENPBPR; + } +} + +/** + * \brief Transmit PFC priority-based pause reception. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_transmit_pfc_pause_frame(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_TXPBPF; +} + +/** + * \brief Flush next packet. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_flush_next_packet(Gmac* p_gmac) +{ + p_gmac->GMAC_NCR |= GMAC_NCR_FNP; +} + +/** + * \brief Set up network configuration register. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_cfg Network configuration value. + */ +static inline void gmac_set_configure(Gmac* p_gmac, uint32_t ul_cfg) +{ + p_gmac->GMAC_NCFGR = ul_cfg; +} + +/** + * \brief Get network configuration. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Network configuration. + */ +static inline uint32_t gmac_get_configure(Gmac* p_gmac) +{ + return p_gmac->GMAC_NCFGR; +} + + +/* Get and set DMA Configuration Register */ +static inline void gmac_set_dma(Gmac* p_gmac, uint32_t ul_cfg) +{ + p_gmac->GMAC_DCFGR = ul_cfg; +} + +static inline uint32_t gmac_get_dma(Gmac* p_gmac) +{ + return p_gmac->GMAC_DCFGR; +} + +/** + * \brief Set speed. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_speed 1 to indicate 100Mbps, 0 to 10Mbps. + */ +static inline void gmac_set_speed(Gmac* p_gmac, uint8_t uc_speed) +{ + if (uc_speed) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_SPD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_SPD; + } +} + +/** + * \brief Enable/Disable Full-Duplex mode. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the Full-Duplex mode, else to enable it. + */ +static inline void gmac_enable_full_duplex(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_FD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_FD; + } +} + +/** + * \brief Enable/Disable Copy(Receive) All Valid Frames. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable copying all valid frames, else to enable it. + */ +static inline void gmac_enable_copy_all(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_CAF; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_CAF; + } +} + +/** + * \brief Enable/Disable jumbo frames (up to 10240 bytes). + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the jumbo frames, else to enable it. + */ +static inline void gmac_enable_jumbo_frames(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_JFRAME; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_JFRAME; + } +} + +/** + * \brief Disable/Enable broadcast receiving. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 1 to disable the broadcast, else to enable it. + */ +static inline void gmac_disable_broadcast(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_NBC; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_NBC; + } +} + +/** + * \brief Enable/Disable multicast hash. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the multicast hash, else to enable it. + */ +static inline void gmac_enable_multicast_hash(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_UNIHEN; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_UNIHEN; + } +} + +/** + * \brief Enable/Disable big frames (over 1518, up to 1536). + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable big frames else to enable it. + */ +static inline void gmac_enable_big_frame(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_MAXFS; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_MAXFS; + } +} + +/** + * \brief Set MDC clock divider. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_mck GMAC MCK. + * + * \return GMAC_OK if successfully. + */ +static inline uint8_t gmac_set_mdc_clock(Gmac* p_gmac, uint32_t ul_mck) +{ + uint32_t ul_clk; + + if (ul_mck > GMAC_MCK_SPEED_240MHZ) { + return GMAC_INVALID; + } else if (ul_mck > GMAC_MCK_SPEED_160MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_96; + } else if (ul_mck > GMAC_MCK_SPEED_120MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_64; + } else if (ul_mck > GMAC_MCK_SPEED_80MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_48; + } else if (ul_mck > GMAC_MCK_SPEED_40MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_32; + } else if (ul_mck > GMAC_MCK_SPEED_20MHZ) { + ul_clk = GMAC_NCFGR_CLK_MCK_16; + } else { + ul_clk = GMAC_NCFGR_CLK_MCK_8; + } + ; + p_gmac->GMAC_NCFGR = (p_gmac->GMAC_NCFGR & ~GMAC_NCFGR_CLK_Msk) | ul_clk; + return GMAC_OK; +} + +/** + * \brief Enable/Disable retry test. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the GMAC receiver, else to enable it. + */ +static inline void gmac_enable_retry_test(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RTY; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RTY; + } +} + +/** + * \brief Enable/Disable pause (when a valid pause frame is received). + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable pause frame, else to enable it. + */ +static inline void gmac_enable_pause_frame(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_PEN; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_PEN; + } +} + +/** + * \brief Set receive buffer offset to 0 ~ 3. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline void gmac_set_rx_buffer_offset(Gmac* p_gmac, uint8_t uc_offset) +{ + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RXBUFO_Msk; + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RXBUFO(uc_offset); +} + +/** + * \brief Enable/Disable receive length field checking. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable receive length field checking, else to enable it. + */ +static inline void gmac_enable_rx_length_check(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_LFERD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_LFERD; + } +} + +/** + * \brief Enable/Disable discarding FCS field of received frames. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable discarding FCS field of received frames, else to enable it. + */ +static inline void gmac_enable_discard_fcs(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_RFCS; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_RFCS; + } +} + + +/** + * \brief Enable/Disable frames to be received in half-duplex mode + * while transmitting. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable the received in half-duplex mode, else to enable it. + */ +static inline void gmac_enable_efrhd(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_EFRHD; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_EFRHD; + } +} + +/** + * \brief Enable/Disable ignore RX FCS. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_enable 0 to disable ignore RX FCS, else to enable it. + */ +static inline void gmac_enable_ignore_rx_fcs(Gmac* p_gmac, uint8_t uc_enable) +{ + if (uc_enable) { + p_gmac->GMAC_NCFGR |= GMAC_NCFGR_IRXFCS; + } else { + p_gmac->GMAC_NCFGR &= ~GMAC_NCFGR_IRXFCS; + } +} + +/** + * \brief Get Network Status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Network status. + */ +static inline uint32_t gmac_get_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_NSR; +} + +/** + * \brief Get MDIO IN pin status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return MDIO IN pin status. + */ +static inline uint8_t gmac_get_MDIO(Gmac* p_gmac) +{ + return ((p_gmac->GMAC_NSR & GMAC_NSR_MDIO) > 0); +} + +/** + * \brief Check if PHY is idle. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return 1 if PHY is idle. + */ +static inline uint8_t gmac_is_phy_idle(Gmac* p_gmac) +{ + return ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) > 0); +} + +/** + * \brief Return transmit status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Transmit status. + */ +static inline uint32_t gmac_get_tx_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_TSR; +} + +/** + * \brief Clear transmit status. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_status Transmit status. + */ +static inline void gmac_clear_tx_status(Gmac* p_gmac, uint32_t ul_status) +{ + p_gmac->GMAC_TSR = ul_status; +} + +/** + * \brief Return receive status. + * + * \param p_gmac Pointer to the GMAC instance. + */ +static inline uint32_t gmac_get_rx_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_RSR; +} + +/** + * \brief Clear receive status. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_status Receive status. + */ +static inline void gmac_clear_rx_status(Gmac* p_gmac, uint32_t ul_status) +{ + p_gmac->GMAC_RSR = ul_status; +} + +/** + * \brief Set Rx Queue. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_addr Rx queue address. + */ +static inline void gmac_set_rx_queue(Gmac* p_gmac, uint32_t ul_addr) +{ + p_gmac->GMAC_RBQB = GMAC_RBQB_ADDR_Msk & ul_addr; +} + +/** + * \brief Get Rx Queue Address. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Rx queue address. + */ +static inline uint32_t gmac_get_rx_queue(Gmac* p_gmac) +{ + return p_gmac->GMAC_RBQB; +} + +/** + * \brief Set Tx Queue. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_addr Tx queue address. + */ +static inline void gmac_set_tx_queue(Gmac* p_gmac, uint32_t ul_addr) +{ + p_gmac->GMAC_TBQB = GMAC_TBQB_ADDR_Msk & ul_addr; +} + +/** + * \brief Get Tx Queue. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Rx queue address. + */ +static inline uint32_t gmac_get_tx_queue(Gmac* p_gmac) +{ + return p_gmac->GMAC_TBQB; +} + +/** + * \brief Enable interrupt(s). + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_source Interrupt source(s) to be enabled. + */ +static inline void gmac_enable_interrupt(Gmac* p_gmac, uint32_t ul_source) +{ + p_gmac->GMAC_IER = ul_source; +} + +/** + * \brief Disable interrupt(s). + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_source Interrupt source(s) to be disabled. + */ +static inline void gmac_disable_interrupt(Gmac* p_gmac, uint32_t ul_source) +{ + p_gmac->GMAC_IDR = ul_source; +} + +/** + * \brief Return interrupt status. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Interrupt status. + */ +static inline uint32_t gmac_get_interrupt_status(Gmac* p_gmac) +{ + return p_gmac->GMAC_ISR; +} + +/** + * \brief Return interrupt mask. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Interrupt mask. + */ +static inline uint32_t gmac_get_interrupt_mask(Gmac* p_gmac) +{ + return p_gmac->GMAC_IMR; +} + +/** + * \brief Execute PHY maintenance command. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_phy_addr PHY address. + * \param uc_reg_addr Register address. + * \param uc_rw 1 to Read, 0 to write. + * \param us_data Data to be performed, write only. + */ +static inline void gmac_maintain_phy(Gmac* p_gmac, + uint8_t uc_phy_addr, uint8_t uc_reg_addr, uint8_t uc_rw, + uint16_t us_data) +{ + /* Wait until bus idle */ + while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); + /* Write maintain register */ + p_gmac->GMAC_MAN = GMAC_MAN_WTN(GMAC_MAN_CODE_VALUE) + | GMAC_MAN_CLTTO + | GMAC_MAN_PHYA(uc_phy_addr) + | GMAC_MAN_REGA(uc_reg_addr) + | GMAC_MAN_OP((uc_rw ? GMAC_MAN_RW_TYPE : GMAC_MAN_READ_ONLY)) + | GMAC_MAN_DATA(us_data); +} + +/** + * \brief Get PHY maintenance data returned. + * + * \param p_gmac Pointer to the GMAC instance. + * + * \return Get PHY data. + */ +static inline uint16_t gmac_get_phy_data(Gmac* p_gmac) +{ + /* Wait until bus idle */ + while ((p_gmac->GMAC_NSR & GMAC_NSR_IDLE) == 0); + /* Return data */ + return (uint16_t) (p_gmac->GMAC_MAN & GMAC_MAN_DATA_Msk); +} + +/** + * \brief Set Hash. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ul_hash_top Hash top. + * \param ul_hash_bottom Hash bottom. + */ +static inline void gmac_set_hash(Gmac* p_gmac, uint32_t ul_hash_top, + uint32_t ul_hash_bottom) +{ + p_gmac->GMAC_HRB = ul_hash_bottom; + p_gmac->GMAC_HRT = ul_hash_top; +} + +/** + * \brief Set 64 bits Hash. + * + * \param p_gmac Pointer to the GMAC instance. + * \param ull_hash 64 bits hash value. + */ +static inline void gmac_set_hash64(Gmac* p_gmac, uint64_t ull_hash) +{ + p_gmac->GMAC_HRB = (uint32_t) ull_hash; + p_gmac->GMAC_HRT = (uint32_t) (ull_hash >> 32); +} + +/** + * \brief Set MAC Address. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_index GMAC specific address register index. + * \param p_mac_addr GMAC address. + */ +static inline void gmac_set_address(Gmac* p_gmac, uint8_t uc_index, + uint8_t* p_mac_addr) +{ + p_gmac->GMAC_SA[uc_index].GMAC_SAB = (p_mac_addr[3] << 24) + | (p_mac_addr[2] << 16) + | (p_mac_addr[1] << 8) + | (p_mac_addr[0]); + p_gmac->GMAC_SA[uc_index].GMAC_SAT = (p_mac_addr[5] << 8) + | (p_mac_addr[4]); +} + +/** + * \brief Set MAC Address via 2 dword. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_index GMAC specific address register index. + * \param ul_mac_top GMAC top address. + * \param ul_mac_bottom GMAC bottom address. + */ +static inline void gmac_set_address32(Gmac* p_gmac, uint8_t uc_index, + uint32_t ul_mac_top, uint32_t ul_mac_bottom) +{ + p_gmac->GMAC_SA[uc_index].GMAC_SAB = ul_mac_bottom; + p_gmac->GMAC_SA[uc_index].GMAC_SAT = ul_mac_top; +} + +/** + * \brief Set MAC Address via int64. + * + * \param p_gmac Pointer to the GMAC instance. + * \param uc_index GMAC specific address register index. + * \param ull_mac 64-bit GMAC address. + */ +static inline void gmac_set_address64(Gmac* p_gmac, uint8_t uc_index, + uint64_t ull_mac) +{ + p_gmac->GMAC_SA[uc_index].GMAC_SAB = (uint32_t) ull_mac; + p_gmac->GMAC_SA[uc_index].GMAC_SAT = (uint32_t) (ull_mac >> 32); +} + +/** + * \brief Select media independent interface mode. + * + * \param p_gmac Pointer to the GMAC instance. + * \param mode Media independent interface mode. + */ +static inline void gmac_select_mii_mode(Gmac* p_gmac, gmac_mii_mode_t mode) +{ + switch (mode) { + case GMAC_PHY_MII: + case GMAC_PHY_RMII: + p_gmac->GMAC_UR |= GMAC_UR_RMIIMII; + break; + + default: + p_gmac->GMAC_UR &= ~GMAC_UR_RMIIMII; + break; + } +} + +uint8_t gmac_phy_read(Gmac* p_gmac, uint8_t uc_phy_address, uint8_t uc_address, + uint32_t* p_value); +uint8_t gmac_phy_write(Gmac* p_gmac, uint8_t uc_phy_address, + uint8_t uc_address, uint32_t ul_value); +void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev, + gmac_options_t* p_opt); +uint32_t gmac_dev_read(gmac_device_t* p_gmac_dev, uint8_t* p_frame, + uint32_t ul_frame_size, uint32_t* p_rcv_size); +uint32_t gmac_dev_write(gmac_device_t* p_gmac_dev, void *p_buffer, + uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb); +uint32_t gmac_dev_get_tx_load(gmac_device_t* p_gmac_dev); +void gmac_dev_set_rx_callback(gmac_device_t* p_gmac_dev, + gmac_dev_rx_cb_t func_rx_cb); +uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t* p_gmac_dev, + gmac_dev_wakeup_cb_t func_wakeup, uint8_t uc_threshold); +void gmac_dev_reset(gmac_device_t* p_gmac_dev); +void gmac_handler(gmac_device_t* p_gmac_dev); + +/// @cond 0 +/**INDENT-OFF**/ +#ifdef __cplusplus +} +#endif +/**INDENT-ON**/ +/// @endcond + +/** + * \page gmac_quickstart Quickstart guide for GMAC driver. + * + * This is the quickstart guide for the \ref gmac_group "Ethernet MAC", + * with step-by-step instructions on how to configure and use the driver in a + * selection of use cases. + * + * The use cases contain several code fragments. The code fragments in the + * steps for setup can be copied into a custom initialization function, while + * the steps for usage can be copied into, e.g., the main application function. + * + * \section gmac_basic_use_case Basic use case + * In the basic use case, the GMAC driver are configured for: + * - PHY component KSZ8051MNL is used + * - GMAC uses MII mode + * - The number of receive buffer is 16 + * - The number of transfer buffer is 8 + * - MAC address is set to 00-04-25-1c-a0-02 + * - IP address is set to 192.168.0.2 + * - IP address is set to 192.168.0.2 + * - Gateway is set to 192.168.0.1 + * - Network mask is 255.255.255.0 + * - PHY operation max retry count is 1000000 + * - GMAC is configured to not support copy all frame and support broadcast + * - The data will be read from the ethernet + * + * \section gmac_basic_use_case_setup Setup steps + * + * \subsection gmac_basic_use_case_setup_prereq Prerequisites + * -# \ref sysclk_group "System Clock Management (sysclock)" + * -# \ref pmc_group "Power Management Controller (pmc)" + * -# \ref ksz8051mnl_ethernet_phy_group "PHY component (KSZ8051MNL)" + * + * \subsection gmac_basic_use_case_setup_code Example code + * Content of conf_eth.h + * \code + * #define GMAC_RX_BUFFERS 16 + * #define GMAC_TX_BUFFERS 8 + * #define MAC_PHY_RETRY_MAX 1000000 + * #define ETHERNET_CONF_ETHADDR0 0x00 + * #define ETHERNET_CONF_ETHADDR0 0x00 + * #define ETHERNET_CONF_ETHADDR1 0x04 + * #define ETHERNET_CONF_ETHADDR2 0x25 + * #define ETHERNET_CONF_ETHADDR3 0x1C + * #define ETHERNET_CONF_ETHADDR4 0xA0 + * #define ETHERNET_CONF_ETHADDR5 0x02 + * #define ETHERNET_CONF_IPADDR0 192 + * #define ETHERNET_CONF_IPADDR1 168 + * #define ETHERNET_CONF_IPADDR2 0 + * #define ETHERNET_CONF_IPADDR3 2 + * #define ETHERNET_CONF_GATEWAY_ADDR0 192 + * #define ETHERNET_CONF_GATEWAY_ADDR1 168 + * #define ETHERNET_CONF_GATEWAY_ADDR2 0 + * #define ETHERNET_CONF_GATEWAY_ADDR3 1 + * #define ETHERNET_CONF_NET_MASK0 255 + * #define ETHERNET_CONF_NET_MASK1 255 + * #define ETHERNET_CONF_NET_MASK2 255 + * #define ETHERNET_CONF_NET_MASK3 0 + * #define ETH_PHY_MODE ETH_PHY_MODE + * \endcode + * + * A specific gmac device and the receive data buffer must be defined; another ul_frm_size should be defined + * to trace the actual size of the data received. + * \code + * static gmac_device_t gs_gmac_dev; + * static volatile uint8_t gs_uc_eth_buffer[GMAC_FRAME_LENTGH_MAX]; + * + * uint32_t ul_frm_size; + * \endcode + * + * Add to application C-file: + * \code + * void gmac_init(void) + * { + * sysclk_init(); + * + * board_init(); + * + * pmc_enable_periph_clk(ID_GMAC); + * + * gmac_option.uc_copy_all_frame = 0; + * gmac_option.uc_no_boardcast = 0; + * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); + * gs_gmac_dev.p_hw = GMAC; + * + * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); + * + * NVIC_EnableIRQ(GMAC_IRQn); + * + * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); + * + * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); + * + * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); + * \endcode + * + * \subsection gmac_basic_use_case_setup_flow Workflow + * - Ensure that conf_eth.h is present and contains the + * following configuration symbol. This configuration file is used + * by the driver and should not be included by the application. + * -# Define the receiving buffer size used in the internal GMAC driver. + * The buffer size used for RX is GMAC_RX_BUFFERS * 128. + * If it was supposed receiving a large number of frame, the + * GMAC_RX_BUFFERS should be set higher. E.g., the application wants to accept + * a ping echo test of 2048, the GMAC_RX_BUFFERS should be set at least + * (2048/128)=16, and as there are additional frames coming, a preferred + * number is 24 depending on a normal Ethernet throughput. + * - \code + * #define GMAC_RX_BUFFERS 16 + * \endcode + * -# Define the transmitting buffer size used in the internal GMAC driver. + * The buffer size used for TX is GMAC_TX_BUFFERS * 1518. + * - \code + * #define GMAC_TX_BUFFERS 8 + * \endcode + * -# Define maximum retry time for a PHY read/write operation. + * - \code + * #define MAC_PHY_RETRY_MAX 1000000 + * \endcode + * -# Define the MAC address. 00:04:25:1C:A0:02 is the address reserved + * for ATMEL, application should always change this address to its' own. + * - \code + * #define ETHERNET_CONF_ETHADDR0 0x00 + * #define ETHERNET_CONF_ETHADDR1 0x04 + * #define ETHERNET_CONF_ETHADDR2 0x25 + * #define ETHERNET_CONF_ETHADDR3 0x1C + * #define ETHERNET_CONF_ETHADDR4 0xA0 + * #define ETHERNET_CONF_ETHADDR5 0x02 + * \endcode + * -# Define the IP address configration used in the application. When DHCP + * is enabled, this configuration is not effected. + * - \code + * #define ETHERNET_CONF_IPADDR0 192 + * #define ETHERNET_CONF_IPADDR1 168 + * #define ETHERNET_CONF_IPADDR2 0 + * #define ETHERNET_CONF_IPADDR3 2 + * #define ETHERNET_CONF_GATEWAY_ADDR0 192 + * #define ETHERNET_CONF_GATEWAY_ADDR1 168 + * #define ETHERNET_CONF_GATEWAY_ADDR2 0 + * #define ETHERNET_CONF_GATEWAY_ADDR3 1 + * #define ETHERNET_CONF_NET_MASK0 255 + * #define ETHERNET_CONF_NET_MASK1 255 + * #define ETHERNET_CONF_NET_MASK2 255 + * #define ETHERNET_CONF_NET_MASK3 0 + * \endcode + * -# Configure the PHY maintainance interface. + * - \code + * #define ETH_PHY_MODE GMAC_PHY_MII + * \endcode + * -# Enable the system clock: + * - \code sysclk_init(); \endcode + * -# Enable PIO configurations for GMAC: + * - \code board_init(); \endcode + * -# Enable PMC clock for GMAC: + * - \code pmc_enable_periph_clk(ID_GMAC); \endcode + * -# Set the GMAC options; it's set to copy all frame and support broadcast: + * - \code + * gmac_option.uc_copy_all_frame = 0; + * gmac_option.uc_no_boardcast = 0; + * memcpy(gmac_option.uc_mac_addr, gs_uc_mac_address, sizeof(gs_uc_mac_address)); + * gs_gmac_dev.p_hw = GMAC; + * \endcode + * -# Initialize GMAC device with the filled option: + * - \code + * gmac_dev_init(GMAC, &gs_gmac_dev, &gmac_option); + * \endcode + * -# Enable the interrupt service for GMAC: + * - \code + * NVIC_EnableIRQ(GMAC_IRQn); + * \endcode + * -# Initialize the PHY component: + * - \code + * ethernet_phy_init(GMAC, BOARD_GMAC_PHY_ADDR, sysclk_get_cpu_hz()); + * \endcode + * -# The link will be established based on auto negotiation. + * - \code + * ethernet_phy_auto_negotiate(GMAC, BOARD_GMAC_PHY_ADDR); + * \endcode + * -# Establish the ethernet link; the network can be worked from now on: + * - \code + * ethernet_phy_set_link(GMAC, BOARD_GMAC_PHY_ADDR, 1); + * \endcode + * + * \section gmac_basic_use_case_usage Usage steps + * \subsection gmac_basic_use_case_usage_code Example code + * Add to, e.g., main loop in application C-file: + * \code + * gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); + * \endcode + * + * \subsection gmac_basic_use_case_usage_flow Workflow + * -# Start reading the data from the ethernet: + * - \code gmac_dev_read(&gs_gmac_dev, (uint8_t *) gs_uc_eth_buffer, sizeof(gs_uc_eth_buffer), &ul_frm_size)); \endcode + */ + +# define GMAC_STATS 0 + +#if( GMAC_STATS != 0 ) + + /* Here below some code to study the types and + frequencies of GMAC interrupts. */ + #define GMAC_IDX_RXUBR 0 + #define GMAC_IDX_TUR 1 + #define GMAC_IDX_RLEX 2 + #define GMAC_IDX_TFC 3 + #define GMAC_IDX_RCOMP 4 + #define GMAC_IDX_TCOMP 5 + #define GMAC_IDX_ROVR 6 + #define GMAC_IDX_HRESP 7 + #define GMAC_IDX_PFNZ 8 + #define GMAC_IDX_PTZ 9 + + struct SGmacStats { + unsigned recvCount; + unsigned rovrCount; + unsigned bnaCount; + unsigned sendCount; + unsigned sovrCount; + unsigned incompCount; + unsigned truncCount; + + unsigned intStatus[10]; + }; + extern struct SGmacStats gmacStats; + + struct SIntPair { + const char *name; + unsigned mask; + int index; + }; + + #define MK_PAIR( NAME ) #NAME, GMAC_IER_##NAME, GMAC_IDX_##NAME + static const struct SIntPair intPairs[] = { + { MK_PAIR( RXUBR ) }, /* Enable receive used bit read interrupt. */ + { MK_PAIR( TUR ) }, /* Enable transmit underrun interrupt. */ + { MK_PAIR( RLEX ) }, /* Enable retry limit exceeded interrupt. */ + { MK_PAIR( TFC ) }, /* Enable transmit buffers exhausted in mid-frame interrupt. */ + { MK_PAIR( RCOMP ) }, /* Receive complete */ + { MK_PAIR( TCOMP ) }, /* Enable transmit complete interrupt. */ + { MK_PAIR( ROVR ) }, /* Enable receive overrun interrupt. */ + { MK_PAIR( HRESP ) }, /* Enable Hresp not OK interrupt. */ + { MK_PAIR( PFNZ ) }, /* Enable pause frame received interrupt. */ + { MK_PAIR( PTZ ) } /* Enable pause time zero interrupt. */ + }; + + void gmac_show_irq_counts (); + +#endif + +#endif /* GMAC_H_INCLUDED */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Common/phyHandling.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Common/phyHandling.c deleted file mode 100644 index fa7695942..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Common/phyHandling.c +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Handling of Ethernet PHY's - * PHY's communicate with an EMAC either through - * a Media-Independent Interface (MII), or a Reduced Media-Independent Interface (RMII). - * The EMAC can poll for PHY ports on 32 different addresses. Each of the PHY ports - * shall be treated independently. - * - */ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" - -#include "phyHandling.h" - -#define phyMIN_PHY_ADDRESS 0 -#define phyMAX_PHY_ADDRESS 31 - -#if defined( PHY_LS_HIGH_CHECK_TIME_MS ) || defined( PHY_LS_LOW_CHECK_TIME_MS ) - #warning please use the new defines with 'ipconfig' prefix -#endif - -#ifndef ipconfigPHY_LS_HIGH_CHECK_TIME_MS - /* Check if the LinkStatus in the PHY is still high after 15 seconds of not - receiving packets. */ - #define ipconfigPHY_LS_HIGH_CHECK_TIME_MS 15000uL -#endif - -#ifndef ipconfigPHY_LS_LOW_CHECK_TIME_MS - /* Check if the LinkStatus in the PHY is still low every second. */ - #define ipconfigPHY_LS_LOW_CHECK_TIME_MS 1000uL -#endif - -/* As the following 3 macro's are OK in most situations, and so they're not -included in 'FreeRTOSIPConfigDefaults.h'. -Users can change their values in the project's 'FreeRTOSIPConfig.h'. */ -#ifndef phyPHY_MAX_RESET_TIME_MS - #define phyPHY_MAX_RESET_TIME_MS 1000uL -#endif - -#ifndef phyPHY_MAX_NEGOTIATE_TIME_MS - #define phyPHY_MAX_NEGOTIATE_TIME_MS 3000uL -#endif - -#ifndef phySHORT_DELAY_MS - #define phySHORT_DELAY_MS 50uL -#endif - -/* Naming and numbering of basic PHY registers. */ -#define phyREG_00_BMCR 0x00u /* Basic Mode Control Register. */ -#define phyREG_01_BMSR 0x01u /* Basic Mode Status Register. */ -#define phyREG_02_PHYSID1 0x02u /* PHYS ID 1 */ -#define phyREG_03_PHYSID2 0x03u /* PHYS ID 2 */ -#define phyREG_04_ADVERTISE 0x04u /* Advertisement control reg */ - -/* Naming and numbering of extended PHY registers. */ -#define PHYREG_10_PHYSTS 0x10u /* 16 PHY status register Offset */ -#define phyREG_19_PHYCR 0x19u /* 25 RW PHY Control Register */ -#define phyREG_1F_PHYSPCS 0x1Fu /* 31 RW PHY Special Control Status */ - -/* Bit fields for 'phyREG_00_BMCR', the 'Basic Mode Control Register'. */ -#define phyBMCR_FULL_DUPLEX 0x0100u /* Full duplex. */ -#define phyBMCR_AN_RESTART 0x0200u /* Auto negotiation restart. */ -#define phyBMCR_ISOLATE 0x0400u /* 1 = Isolates 0 = Normal operation. */ -#define phyBMCR_AN_ENABLE 0x1000u /* Enable auto negotiation. */ -#define phyBMCR_SPEED_100 0x2000u /* Select 100Mbps. */ -#define phyBMCR_RESET 0x8000u /* Reset the PHY. */ - -/* Bit fields for 'phyREG_19_PHYCR', the 'PHY Control Register'. */ -#define PHYCR_MDIX_EN 0x8000u /* Enable Auto MDIX. */ -#define PHYCR_MDIX_FORCE 0x4000u /* Force MDIX crossed. */ - -#define phyBMSR_AN_COMPLETE 0x0020u /* Auto-Negotiation process completed */ - -#define phyBMSR_LINK_STATUS 0x0004u - -#define phyPHYSTS_LINK_STATUS 0x0001u /* PHY Link mask */ -#define phyPHYSTS_SPEED_STATUS 0x0002u /* PHY Speed mask */ -#define phyPHYSTS_DUPLEX_STATUS 0x0004u /* PHY Duplex mask */ - -/* Bit fields for 'phyREG_1F_PHYSPCS - 001 = 10BASE-T half-duplex - 101 = 10BASE-T full-duplex - 010 = 100BASE-TX half-duplex - 110 = 100BASE-TX full-duplex -*/ -#define phyPHYSPCS_SPEED_MASK 0x000Cu -#define phyPHYSPCS_SPEED_10 0x0004u -#define phyPHYSPCS_FULL_DUPLEX 0x0010u - -/* - * Description of all capabilities that can be advertised to - * the peer (usually a switch or router). - */ - -#define phyADVERTISE_CSMA 0x0001u /* Supports IEEE 802.3u: Fast Ethernet at 100 Mbit/s */ -#define phyADVERTISE_10HALF 0x0020u /* Try for 10mbps half-duplex. */ -#define phyADVERTISE_10FULL 0x0040u /* Try for 10mbps full-duplex. */ -#define phyADVERTISE_100HALF 0x0080u /* Try for 100mbps half-duplex. */ -#define phyADVERTISE_100FULL 0x0100u /* Try for 100mbps full-duplex. */ - -#define phyADVERTISE_ALL ( phyADVERTISE_10HALF | phyADVERTISE_10FULL | \ - phyADVERTISE_100HALF | phyADVERTISE_100FULL | \ - phyADVERTISE_CSMA ) - -/* Send a reset command to a set of PHY-ports. */ -static uint32_t xPhyReset( EthernetPhy_t *pxPhyObject, uint32_t ulPhyMask ); - -static BaseType_t xHas_1F_PHYSPCS( uint32_t ulPhyID ) -{ -BaseType_t xResult; - - switch( ulPhyID ) - { - case PHY_ID_LAN8720: - case PHY_ID_LAN8742A: - case PHY_ID_KSZ8041: -/* - case PHY_ID_KSZ8051: // same ID as 8041 - case PHY_ID_KSZ8081: // same ID as 8041 -*/ - case PHY_ID_KSZ8081MNXIA: - - case PHY_ID_KSZ8863: - default: - /* Most PHY's have a 1F_PHYSPCS */ - xResult = pdTRUE; - break; - case PHY_ID_DP83848I: - xResult = pdFALSE; - break; - } - return xResult; -} -/*-----------------------------------------------------------*/ - -static BaseType_t xHas_19_PHYCR( uint32_t ulPhyID ) -{ -BaseType_t xResult; - - switch( ulPhyID ) - { - case PHY_ID_LAN8742A: - case PHY_ID_DP83848I: - xResult = pdTRUE; - break; - default: - /* Most PHY's do not have a 19_PHYCR */ - xResult = pdFALSE; - break; - } - return xResult; -} -/*-----------------------------------------------------------*/ - -/* Initialise the struct and assign a PHY-read and -write function. */ -void vPhyInitialise( EthernetPhy_t *pxPhyObject, xApplicationPhyReadHook_t fnPhyRead, xApplicationPhyWriteHook_t fnPhyWrite ) -{ - memset( ( void * )pxPhyObject, '\0', sizeof( *pxPhyObject ) ); - - pxPhyObject->fnPhyRead = fnPhyRead; - pxPhyObject->fnPhyWrite = fnPhyWrite; -} -/*-----------------------------------------------------------*/ - -/* Discover all PHY's connected by polling 32 indexes ( zero-based ) */ -BaseType_t xPhyDiscover( EthernetPhy_t *pxPhyObject ) -{ -BaseType_t xPhyAddress; - - pxPhyObject->xPortCount = 0; - - for( xPhyAddress = phyMIN_PHY_ADDRESS; xPhyAddress <= phyMAX_PHY_ADDRESS; xPhyAddress++ ) - { - uint32_t ulLowerID; - - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_03_PHYSID2, &ulLowerID ); - /* A valid PHY id can not be all zeros or all ones. */ - if( ( ulLowerID != ( uint16_t )~0u ) && ( ulLowerID != ( uint16_t )0u ) ) - { - uint32_t ulUpperID; - uint32_t ulPhyID; - - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_02_PHYSID1, &ulUpperID ); - ulPhyID = ( ( ( uint32_t ) ulUpperID ) << 16 ) | ( ulLowerID & 0xFFF0 ); - - pxPhyObject->ucPhyIndexes[ pxPhyObject->xPortCount ] = xPhyAddress; - pxPhyObject->ulPhyIDs[ pxPhyObject->xPortCount ] = ulPhyID; - - pxPhyObject->xPortCount++; - - /* See if there is more storage space. */ - if( pxPhyObject->xPortCount == ipconfigPHY_MAX_PORTS ) - { - break; - } - } - } - if( pxPhyObject->xPortCount > 0 ) - { - FreeRTOS_printf( ( "PHY ID %lX\n", pxPhyObject->ulPhyIDs[ 0 ] ) ); - } - - return pxPhyObject->xPortCount; -} -/*-----------------------------------------------------------*/ - -/* Send a reset command to a set of PHY-ports. */ -static uint32_t xPhyReset( EthernetPhy_t *pxPhyObject, uint32_t ulPhyMask ) -{ -uint32_t ulDoneMask, ulConfig; -TickType_t xRemainingTime; -TimeOut_t xTimer; -BaseType_t xPhyIndex; - - /* A bit-mask of PHY ports that are ready. */ - ulDoneMask = 0ul; - - /* Set the RESET bits high. */ - for( xPhyIndex = 0; xPhyIndex < pxPhyObject->xPortCount; xPhyIndex++ ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - - /* Read Control register. */ - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_00_BMCR, &ulConfig ); - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_00_BMCR, ulConfig | phyBMCR_RESET ); - } - - xRemainingTime = ( TickType_t ) pdMS_TO_TICKS( phyPHY_MAX_RESET_TIME_MS ); - vTaskSetTimeOutState( &xTimer ); - - /* The reset should last less than a second. */ - for( ;; ) - { - for( xPhyIndex = 0; xPhyIndex < pxPhyObject->xPortCount; xPhyIndex++ ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_00_BMCR, &ulConfig ); - if( ( ulConfig & phyBMCR_RESET ) == 0 ) - { - FreeRTOS_printf( ( "xPhyReset: phyBMCR_RESET %d ready\n", (int)xPhyIndex ) ); - ulDoneMask |= ( 1ul << xPhyIndex ); - } - } - if( ulDoneMask == ulPhyMask ) - { - break; - } - if( xTaskCheckForTimeOut( &xTimer, &xRemainingTime ) != pdFALSE ) - { - FreeRTOS_printf( ( "xPhyReset: phyBMCR_RESET timed out ( done 0x%02lX )\n", ulDoneMask ) ); - break; - } - /* Block for a while */ - vTaskDelay( pdMS_TO_TICKS( phySHORT_DELAY_MS ) ); - } - - /* Clear the reset bits. */ - for( xPhyIndex = 0; xPhyIndex < pxPhyObject->xPortCount; xPhyIndex++ ) - { - if( ( ulDoneMask & ( 1ul << xPhyIndex ) ) == 0uL ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - - /* The reset operation timed out, clear the bit manually. */ - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_00_BMCR, &ulConfig ); - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_00_BMCR, ulConfig & ~phyBMCR_RESET ); - } - } - - vTaskDelay( pdMS_TO_TICKS( phySHORT_DELAY_MS ) ); - - return ulDoneMask; -} -/*-----------------------------------------------------------*/ - -BaseType_t xPhyConfigure( EthernetPhy_t *pxPhyObject, const PhyProperties_t *pxPhyProperties ) -{ -uint32_t ulConfig, ulAdvertise; -BaseType_t xPhyIndex; - - if( pxPhyObject->xPortCount < 1 ) - { - FreeRTOS_printf( ( "xPhyConfigure: No PHY's detected.\n" ) ); - return -1; - } - - /* The expected ID for the 'LAN8742A' is 0x0007c130. */ - /* The expected ID for the 'LAN8720' is 0x0007c0f0. */ - /* The expected ID for the 'DP83848I' is 0x20005C90. */ - - /* Set advertise register. */ - if( ( pxPhyProperties->ucSpeed == ( uint8_t )PHY_SPEED_AUTO ) && ( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_AUTO ) ) - { - ulAdvertise = phyADVERTISE_ALL; - /* Reset auto-negotiation capability. */ - } - else - { - /* Always select protocol 802.3u. */ - ulAdvertise = phyADVERTISE_CSMA; - - if( pxPhyProperties->ucSpeed == ( uint8_t )PHY_SPEED_AUTO ) - { - if( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_FULL ) - { - ulAdvertise |= phyADVERTISE_10FULL | phyADVERTISE_100FULL; - } - else - { - ulAdvertise |= phyADVERTISE_10HALF | phyADVERTISE_100HALF; - } - } - else if( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_AUTO ) - { - if( pxPhyProperties->ucSpeed == ( uint8_t )PHY_SPEED_10 ) - { - ulAdvertise |= phyADVERTISE_10FULL | phyADVERTISE_10HALF; - } - else - { - ulAdvertise |= phyADVERTISE_100FULL | phyADVERTISE_100HALF; - } - } - else if( pxPhyProperties->ucSpeed == ( uint8_t )PHY_SPEED_100 ) - { - if( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_FULL ) - { - ulAdvertise |= phyADVERTISE_100FULL; - } - else - { - ulAdvertise |= phyADVERTISE_100HALF; - } - } - else - { - if( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_FULL ) - { - ulAdvertise |= phyADVERTISE_10FULL; - } - else - { - ulAdvertise |= phyADVERTISE_10HALF; - } - } - } - - /* Send a reset command to a set of PHY-ports. */ - xPhyReset( pxPhyObject, xPhyGetMask( pxPhyObject ) ); - - for( xPhyIndex = 0; xPhyIndex < pxPhyObject->xPortCount; xPhyIndex++ ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - uint32_t ulPhyID = pxPhyObject->ulPhyIDs[ xPhyIndex ]; - - /* Write advertise register. */ - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_04_ADVERTISE, ulAdvertise ); - - /* - AN_EN AN1 AN0 Forced Mode - 0 0 0 10BASE-T, Half-Duplex - 0 0 1 10BASE-T, Full-Duplex - 0 1 0 100BASE-TX, Half-Duplex - 0 1 1 100BASE-TX, Full-Duplex - AN_EN AN1 AN0 Advertised Mode - 1 0 0 10BASE-T, Half/Full-Duplex - 1 0 1 100BASE-TX, Half/Full-Duplex - 1 1 0 10BASE-T Half-Duplex - 100BASE-TX, Half-Duplex - 1 1 1 10BASE-T, Half/Full-Duplex - 100BASE-TX, Half/Full-Duplex - */ - - /* Read Control register. */ - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_00_BMCR, &ulConfig ); - - ulConfig &= ~( phyBMCR_SPEED_100 | phyBMCR_FULL_DUPLEX ); - - ulConfig |= phyBMCR_AN_ENABLE; - - if( ( pxPhyProperties->ucSpeed == ( uint8_t )PHY_SPEED_100 ) || ( pxPhyProperties->ucSpeed == ( uint8_t )PHY_SPEED_AUTO ) ) - { - ulConfig |= phyBMCR_SPEED_100; - } - else if( pxPhyProperties->ucSpeed == ( uint8_t )PHY_SPEED_10 ) - { - ulConfig &= ~phyBMCR_SPEED_100; - } - - if( ( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_FULL ) || ( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_AUTO ) ) - { - ulConfig |= phyBMCR_FULL_DUPLEX; - } - else if( pxPhyProperties->ucDuplex == ( uint8_t )PHY_DUPLEX_HALF ) - { - ulConfig &= ~phyBMCR_FULL_DUPLEX; - } - - if( xHas_19_PHYCR( ulPhyID ) ) - { - uint32_t ulPhyControl; - /* Read PHY Control register. */ - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_19_PHYCR, &ulPhyControl ); - - /* Clear bits which might get set: */ - ulPhyControl &= ~( PHYCR_MDIX_EN|PHYCR_MDIX_FORCE ); - - if( pxPhyProperties->ucMDI_X == PHY_MDIX_AUTO ) - { - ulPhyControl |= PHYCR_MDIX_EN; - } - else if( pxPhyProperties->ucMDI_X == PHY_MDIX_CROSSED ) - { - /* Force direct link = Use crossed RJ45 cable. */ - ulPhyControl &= ~PHYCR_MDIX_FORCE; - } - else - { - /* Force crossed link = Use direct RJ45 cable. */ - ulPhyControl |= PHYCR_MDIX_FORCE; - } - /* update PHY Control Register. */ - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_19_PHYCR, ulPhyControl ); - } - - FreeRTOS_printf( ( "+TCP: advertise: %04lX config %04lX\n", ulAdvertise, ulConfig ) ); - } - - /* Keep these values for later use. */ - pxPhyObject->ulBCRValue = ulConfig & ~phyBMCR_ISOLATE; - pxPhyObject->ulACRValue = ulAdvertise; - - return 0; -} -/*-----------------------------------------------------------*/ - -/* xPhyFixedValue(): this function is called in case auto-negotiation is disabled. -The caller has set the values in 'xPhyPreferences' (ucDuplex and ucSpeed). -The PHY register phyREG_00_BMCR will be set for every connected PHY that matches -with ulPhyMask. */ -BaseType_t xPhyFixedValue( EthernetPhy_t *pxPhyObject, uint32_t ulPhyMask ) -{ -BaseType_t xPhyIndex; -uint32_t ulValue, ulBitMask = ( uint32_t )1u; - - ulValue = ( uint32_t )0u; - - if( pxPhyObject->xPhyPreferences.ucDuplex == PHY_DUPLEX_FULL ) - { - ulValue |= phyBMCR_FULL_DUPLEX; - } - if( pxPhyObject->xPhyPreferences.ucSpeed == PHY_SPEED_100 ) - { - ulValue |= phyBMCR_SPEED_100; - } - - for( xPhyIndex = 0; xPhyIndex < pxPhyObject->xPortCount; xPhyIndex++, ulBitMask <<= 1 ) - { - if( ( ulPhyMask & ulBitMask ) != 0lu ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - - /* Enable Auto-Negotiation. */ - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_00_BMCR, ulValue ); - } - } - return 0; -} -/*-----------------------------------------------------------*/ - -/* xPhyStartAutoNegotiation() is the alternative xPhyFixedValue(): -It sets the BMCR_AN_RESTART bit and waits for the auto-negotiation completion -( phyBMSR_AN_COMPLETE ). */ -BaseType_t xPhyStartAutoNegotiation( EthernetPhy_t *pxPhyObject, uint32_t ulPhyMask ) -{ -uint32_t xPhyIndex, ulDoneMask, ulBitMask; -uint32_t ulPHYLinkStatus, ulRegValue; -TickType_t xRemainingTime; -TimeOut_t xTimer; - - if( ulPhyMask == ( uint32_t )0u ) - { - return 0; - } - for( xPhyIndex = 0; xPhyIndex < ( uint32_t ) pxPhyObject->xPortCount; xPhyIndex++ ) - { - if( ( ulPhyMask & ( 1lu << xPhyIndex ) ) != 0lu ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - - /* Enable Auto-Negotiation. */ - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_04_ADVERTISE, pxPhyObject->ulACRValue); - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_00_BMCR, pxPhyObject->ulBCRValue | phyBMCR_AN_RESTART ); - } - } - xRemainingTime = ( TickType_t ) pdMS_TO_TICKS( phyPHY_MAX_NEGOTIATE_TIME_MS ); - vTaskSetTimeOutState( &xTimer ); - ulDoneMask = 0; - /* Wait until the auto-negotiation will be completed */ - for( ;; ) - { - ulBitMask = ( uint32_t )1u; - for( xPhyIndex = 0; xPhyIndex < ( uint32_t ) pxPhyObject->xPortCount; xPhyIndex++, ulBitMask <<= 1 ) - { - if( ( ulPhyMask & ulBitMask ) != 0lu ) - { - if( ( ulDoneMask & ulBitMask ) == 0lu ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_01_BMSR, &ulRegValue ); - if( ( ulRegValue & phyBMSR_AN_COMPLETE ) != 0 ) - { - ulDoneMask |= ulBitMask; - } - } - } - } - if( ulPhyMask == ulDoneMask ) - { - break; - } - if( xTaskCheckForTimeOut( &xTimer, &xRemainingTime ) != pdFALSE ) - { - FreeRTOS_printf( ( "xPhyStartAutoNegotiation: phyBMCR_RESET timed out ( done 0x%02lX )\n", ulDoneMask ) ); - break; - } - vTaskDelay( pdMS_TO_TICKS( phySHORT_DELAY_MS ) ); - } - - if( ulDoneMask != ( uint32_t)0u ) - { - ulBitMask = ( uint32_t )1u; - pxPhyObject->ulLinkStatusMask &= ~( ulDoneMask ); - for( xPhyIndex = 0; xPhyIndex < ( uint32_t ) pxPhyObject->xPortCount; xPhyIndex++, ulBitMask <<= 1 ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - uint32_t ulPhyID = pxPhyObject->ulPhyIDs[ xPhyIndex ]; - - if( ( ulDoneMask & ulBitMask ) == ( uint32_t )0u ) - { - continue; - } - - /* Clear the 'phyBMCR_AN_RESTART' bit. */ - pxPhyObject->fnPhyWrite( xPhyAddress, phyREG_00_BMCR, pxPhyObject->ulBCRValue ); - - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_01_BMSR, &ulRegValue); - if( ( ulRegValue & phyBMSR_LINK_STATUS ) != 0 ) - { - ulPHYLinkStatus |= phyBMSR_LINK_STATUS; - pxPhyObject->ulLinkStatusMask |= ulBitMask; - } - else - { - ulPHYLinkStatus &= ~( phyBMSR_LINK_STATUS ); - } - - if( ulPhyID == PHY_ID_KSZ8081MNXIA ) - { - uint32_t ulControlStatus; - - pxPhyObject->fnPhyRead( xPhyAddress, 0x1E, &ulControlStatus); - switch( ulControlStatus & 0x07 ) - { - case 0x01: - case 0x05: -// [001] = 10BASE-T half-duplex -// [101] = 10BASE-T full-duplex - /* 10 Mbps. */ - ulRegValue |= phyPHYSTS_SPEED_STATUS; - break; - case 0x02: - case 0x06: -// [010] = 100BASE-TX half-duplex -// [110] = 100BASE-TX full-duplex - break; - } - switch( ulControlStatus & 0x07 ) - { - case 0x05: - case 0x06: -// [101] = 10BASE-T full-duplex -// [110] = 100BASE-TX full-duplex - /* Full duplex. */ - ulRegValue |= phyPHYSTS_DUPLEX_STATUS; - break; - case 0x01: - case 0x02: -// [001] = 10BASE-T half-duplex -// [010] = 100BASE-TX half-duplex - break; - } - } - else if( xHas_1F_PHYSPCS( ulPhyID ) ) - { - /* 31 RW PHY Special Control Status */ - uint32_t ulControlStatus; - - pxPhyObject->fnPhyRead( xPhyAddress, phyREG_1F_PHYSPCS, &ulControlStatus); - ulRegValue = 0; - if( ( ulControlStatus & phyPHYSPCS_FULL_DUPLEX ) != 0 ) - { - ulRegValue |= phyPHYSTS_DUPLEX_STATUS; - } - if( ( ulControlStatus & phyPHYSPCS_SPEED_MASK ) == phyPHYSPCS_SPEED_10 ) - { - ulRegValue |= phyPHYSTS_SPEED_STATUS; - } - } - else - { - /* Read the result of the auto-negotiation. */ - pxPhyObject->fnPhyRead( xPhyAddress, PHYREG_10_PHYSTS, &ulRegValue); - } - - FreeRTOS_printf( ( "Autonego ready: %08lx: %s duplex %u mbit %s status\n", - ulRegValue, - ( ulRegValue & phyPHYSTS_DUPLEX_STATUS ) ? "full" : "half", - ( ulRegValue & phyPHYSTS_SPEED_STATUS ) ? 10 : 100, - ( ( ulPHYLinkStatus |= phyBMSR_LINK_STATUS ) != 0) ? "high" : "low" ) ); - if( ( ulRegValue & phyPHYSTS_DUPLEX_STATUS ) != ( uint32_t )0u ) - { - pxPhyObject->xPhyProperties.ucDuplex = PHY_DUPLEX_FULL; - } - else - { - pxPhyObject->xPhyProperties.ucDuplex = PHY_DUPLEX_HALF; - } - - if( ( ulRegValue & phyPHYSTS_SPEED_STATUS ) != 0 ) - { - pxPhyObject->xPhyProperties.ucSpeed = PHY_SPEED_10; - } - else - { - pxPhyObject->xPhyProperties.ucSpeed = PHY_SPEED_100; - } - } - } /* if( ulDoneMask != ( uint32_t)0u ) */ - - return 0; -} -/*-----------------------------------------------------------*/ - -BaseType_t xPhyCheckLinkStatus( EthernetPhy_t *pxPhyObject, BaseType_t xHadReception ) -{ -uint32_t ulStatus, ulBitMask = 1u; -BaseType_t xPhyIndex; -BaseType_t xNeedCheck = pdFALSE; - - if( xHadReception > 0 ) - { - /* A packet was received. No need to check for the PHY status now, - but set a timer to check it later on. */ - vTaskSetTimeOutState( &( pxPhyObject->xLinkStatusTimer ) ); - pxPhyObject->xLinkStatusRemaining = pdMS_TO_TICKS( ipconfigPHY_LS_HIGH_CHECK_TIME_MS ); - for( xPhyIndex = 0; xPhyIndex < pxPhyObject->xPortCount; xPhyIndex++, ulBitMask <<= 1 ) - { - if( ( pxPhyObject->ulLinkStatusMask & ulBitMask ) == 0ul ) - { - pxPhyObject->ulLinkStatusMask |= ulBitMask; - FreeRTOS_printf( ( "xPhyCheckLinkStatus: PHY LS now %02lX\n", pxPhyObject->ulLinkStatusMask ) ); - xNeedCheck = pdTRUE; - } - } - } - else if( xTaskCheckForTimeOut( &( pxPhyObject->xLinkStatusTimer ), &( pxPhyObject->xLinkStatusRemaining ) ) != pdFALSE ) - { - /* Frequent checking the PHY Link Status can affect for the performance of Ethernet controller. - As long as packets are received, no polling is needed. - Otherwise, polling will be done when the 'xLinkStatusTimer' expires. */ - for( xPhyIndex = 0; xPhyIndex < pxPhyObject->xPortCount; xPhyIndex++, ulBitMask <<= 1 ) - { - BaseType_t xPhyAddress = pxPhyObject->ucPhyIndexes[ xPhyIndex ]; - - if( pxPhyObject->fnPhyRead( xPhyAddress, phyREG_01_BMSR, &ulStatus ) == 0 ) - { - if( !!( pxPhyObject->ulLinkStatusMask & ulBitMask ) != !!( ulStatus & phyBMSR_LINK_STATUS ) ) - { - if( ( ulStatus & phyBMSR_LINK_STATUS ) != 0 ) - { - pxPhyObject->ulLinkStatusMask |= ulBitMask; - } - else - { - pxPhyObject->ulLinkStatusMask &= ~( ulBitMask ); - } - FreeRTOS_printf( ( "xPhyCheckLinkStatus: PHY LS now %02lX\n", pxPhyObject->ulLinkStatusMask ) ); - xNeedCheck = pdTRUE; - } - } - } - vTaskSetTimeOutState( &( pxPhyObject->xLinkStatusTimer ) ); - if( ( pxPhyObject->ulLinkStatusMask & phyBMSR_LINK_STATUS ) != 0 ) - { - /* The link status is high, so don't poll the PHY too often. */ - pxPhyObject->xLinkStatusRemaining = pdMS_TO_TICKS( ipconfigPHY_LS_HIGH_CHECK_TIME_MS ); - } - else - { - /* The link status is low, polling may be done more frequently. */ - pxPhyObject->xLinkStatusRemaining = pdMS_TO_TICKS( ipconfigPHY_LS_LOW_CHECK_TIME_MS ); - } - } - return xNeedCheck; -} -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC17xx/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC17xx/NetworkInterface.c index e0d04e454..7cee711cd 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC17xx/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC17xx/NetworkInterface.c @@ -1,267 +1,267 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* Hardware abstraction. */ -#include "FreeRTOS_IO.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_Sockets.h" -#include "NetworkBufferManagement.h" - -/* Driver includes. */ -#include "lpc17xx_emac.h" -#include "lpc17xx_pinsel.h" - -/* Demo includes. */ -#include "NetworkInterface.h" - -#if ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES != 1 - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#else - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#endif - -/* When a packet is ready to be sent, if it cannot be sent immediately then the -task performing the transmit will block for niTX_BUFFER_FREE_WAIT -milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving -up. */ -#define niTX_BUFFER_FREE_WAIT ( pdMS_TO_TICKS( 2UL ) ) -#define niMAX_TX_ATTEMPTS ( 5 ) - -/* The length of the queue used to send interrupt status words from the -interrupt handler to the deferred handler task. */ -#define niINTERRUPT_QUEUE_LENGTH ( 10 ) - -/*-----------------------------------------------------------*/ - -/* - * A deferred interrupt handler task that processes - */ -static void prvEMACHandlerTask( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -/* The queue used to communicate Ethernet events with the IP task. */ -extern QueueHandle_t xNetworkEventQueue; - -/* The semaphore used to wake the deferred interrupt handler task when an Rx -interrupt is received. */ -static SemaphoreHandle_t xEMACRxEventSemaphore = NULL; -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -EMAC_CFG_Type Emac_Config; -PINSEL_CFG_Type xPinConfig; -BaseType_t xStatus, xReturn; -extern uint8_t ucMACAddress[ 6 ]; - - /* Enable Ethernet Pins */ - boardCONFIGURE_ENET_PINS( xPinConfig ); - - Emac_Config.Mode = EMAC_MODE_AUTO; - Emac_Config.pbEMAC_Addr = ucMACAddress; - xStatus = EMAC_Init( &Emac_Config ); - - LPC_EMAC->IntEnable &= ~( EMAC_INT_TX_DONE ); - - if( xStatus != ERROR ) - { - vSemaphoreCreateBinary( xEMACRxEventSemaphore ); - configASSERT( xEMACRxEventSemaphore ); - - /* The handler task is created at the highest possible priority to - ensure the interrupt handler can return directly to it. */ - xTaskCreate( prvEMACHandlerTask, "EMAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); - - /* Enable the interrupt and set its priority to the minimum - interrupt priority. */ - NVIC_SetPriority( ENET_IRQn, configMAC_INTERRUPT_PRIORITY ); - NVIC_EnableIRQ( ENET_IRQn ); - - xReturn = pdPASS; - } - else - { - xReturn = pdFAIL; - } - - configASSERT( xStatus != ERROR ); - - return xReturn; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -BaseType_t xReturn = pdFAIL; -int32_t x; -extern void EMAC_StartTransmitNextBuffer( uint32_t ulLength ); -extern void EMAC_SetNextPacketToSend( uint8_t * pucBuffer ); - - - /* Attempt to obtain access to a Tx buffer. */ - for( x = 0; x < niMAX_TX_ATTEMPTS; x++ ) - { - if( EMAC_CheckTransmitIndex() == TRUE ) - { - /* Will the data fit in the Tx buffer? */ - if( pxNetworkBuffer->xDataLength < EMAC_ETH_MAX_FLEN ) /*_RB_ The size needs to come from FreeRTOSIPConfig.h. */ - { - /* Assign the buffer to the Tx descriptor that is now known to - be free. */ - EMAC_SetNextPacketToSend( pxNetworkBuffer->pucBuffer ); - - /* The EMAC now owns the buffer. */ - pxNetworkBuffer->pucBuffer = NULL; - - /* Initiate the Tx. */ - EMAC_StartTransmitNextBuffer( pxNetworkBuffer->xDataLength ); - iptraceNETWORK_INTERFACE_TRANSMIT(); - - /* The Tx has been initiated. */ - xReturn = pdPASS; - } - break; - } - else - { - vTaskDelay( niTX_BUFFER_FREE_WAIT ); - } - } - - /* Finished with the network buffer. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - - return xReturn; -} -/*-----------------------------------------------------------*/ - -void ENET_IRQHandler( void ) -{ -uint32_t ulInterruptCause; - - while( ( ulInterruptCause = LPC_EMAC->IntStatus ) != 0 ) - { - /* Clear the interrupt. */ - LPC_EMAC->IntClear = ulInterruptCause; - - /* Clear fatal error conditions. NOTE: The driver does not clear all - errors, only those actually experienced. For future reference, range - errors are not actually errors so can be ignored. */ - if( ( ulInterruptCause & EMAC_INT_TX_UNDERRUN ) != 0U ) - { - LPC_EMAC->Command |= EMAC_CR_TX_RES; - } - - /* Unblock the deferred interrupt handler task if the event was an - Rx. */ - if( ( ulInterruptCause & EMAC_INT_RX_DONE ) != 0UL ) - { - xSemaphoreGiveFromISR( xEMACRxEventSemaphore, NULL ); - } - } - - /* ulInterruptCause is used for convenience here. A context switch is - wanted, but coding portEND_SWITCHING_ISR( 1 ) would likely result in a - compiler warning. */ - portEND_SWITCHING_ISR( ulInterruptCause ); -} -/*-----------------------------------------------------------*/ - -static void prvEMACHandlerTask( void *pvParameters ) -{ -size_t xDataLength; -const uint16_t usCRCLength = 4; -NetworkBufferDescriptor_t *pxNetworkBuffer; -IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; - -/* This is not included in the header file for some reason. */ -extern uint8_t *EMAC_NextPacketToRead( void ); - - ( void ) pvParameters; - configASSERT( xEMACRxEventSemaphore ); - - for( ;; ) - { - /* Wait for the EMAC interrupt to indicate that another packet has been - received. The while() loop is only needed if INCLUDE_vTaskSuspend is - set to 0 in FreeRTOSConfig.h. */ - while( xSemaphoreTake( xEMACRxEventSemaphore, portMAX_DELAY ) == pdFALSE ); - - /* At least one packet has been received. */ - while( EMAC_CheckReceiveIndex() != FALSE ) - { - /* Obtain the length, minus the CRC. The CRC is four bytes - but the length is already minus 1. */ - xDataLength = ( size_t ) EMAC_GetReceiveDataSize() - ( usCRCLength - 1U ); - - if( xDataLength > 0U ) - { - /* Obtain a network buffer to pass this data into the - stack. No storage is required as the network buffer - will point directly to the buffer that already holds - the received data. */ - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( 0, ( TickType_t ) 0 ); - - if( pxNetworkBuffer != NULL ) - { - pxNetworkBuffer->pucBuffer = EMAC_NextPacketToRead(); - pxNetworkBuffer->xDataLength = xDataLength; - xRxEvent.pvData = ( void * ) pxNetworkBuffer; - - /* Data was received and stored. Send a message to the IP - task to let it know. */ - if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - iptraceETHERNET_RX_EVENT_LOST(); - } - } - else - { - iptraceETHERNET_RX_EVENT_LOST(); - } - - iptraceNETWORK_INTERFACE_RECEIVE(); - } - - /* Release the frame. */ - EMAC_UpdateRxConsumeIndex(); - } - } -} -/*-----------------------------------------------------------*/ - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* Hardware abstraction. */ +#include "FreeRTOS_IO.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_Sockets.h" +#include "NetworkBufferManagement.h" + +/* Driver includes. */ +#include "lpc17xx_emac.h" +#include "lpc17xx_pinsel.h" + +/* Demo includes. */ +#include "NetworkInterface.h" + +#if ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES != 1 + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +#else + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +#endif + +/* When a packet is ready to be sent, if it cannot be sent immediately then the +task performing the transmit will block for niTX_BUFFER_FREE_WAIT +milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving +up. */ +#define niTX_BUFFER_FREE_WAIT ( pdMS_TO_TICKS( 2UL ) ) +#define niMAX_TX_ATTEMPTS ( 5 ) + +/* The length of the queue used to send interrupt status words from the +interrupt handler to the deferred handler task. */ +#define niINTERRUPT_QUEUE_LENGTH ( 10 ) + +/*-----------------------------------------------------------*/ + +/* + * A deferred interrupt handler task that processes + */ +static void prvEMACHandlerTask( void *pvParameters ); + +/*-----------------------------------------------------------*/ + +/* The queue used to communicate Ethernet events with the IP task. */ +extern QueueHandle_t xNetworkEventQueue; + +/* The semaphore used to wake the deferred interrupt handler task when an Rx +interrupt is received. */ +static SemaphoreHandle_t xEMACRxEventSemaphore = NULL; +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +EMAC_CFG_Type Emac_Config; +PINSEL_CFG_Type xPinConfig; +BaseType_t xStatus, xReturn; +extern uint8_t ucMACAddress[ 6 ]; + + /* Enable Ethernet Pins */ + boardCONFIGURE_ENET_PINS( xPinConfig ); + + Emac_Config.Mode = EMAC_MODE_AUTO; + Emac_Config.pbEMAC_Addr = ucMACAddress; + xStatus = EMAC_Init( &Emac_Config ); + + LPC_EMAC->IntEnable &= ~( EMAC_INT_TX_DONE ); + + if( xStatus != ERROR ) + { + vSemaphoreCreateBinary( xEMACRxEventSemaphore ); + configASSERT( xEMACRxEventSemaphore ); + + /* The handler task is created at the highest possible priority to + ensure the interrupt handler can return directly to it. */ + xTaskCreate( prvEMACHandlerTask, "EMAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); + + /* Enable the interrupt and set its priority to the minimum + interrupt priority. */ + NVIC_SetPriority( ENET_IRQn, configMAC_INTERRUPT_PRIORITY ); + NVIC_EnableIRQ( ENET_IRQn ); + + xReturn = pdPASS; + } + else + { + xReturn = pdFAIL; + } + + configASSERT( xStatus != ERROR ); + + return xReturn; +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +BaseType_t xReturn = pdFAIL; +int32_t x; +extern void EMAC_StartTransmitNextBuffer( uint32_t ulLength ); +extern void EMAC_SetNextPacketToSend( uint8_t * pucBuffer ); + + + /* Attempt to obtain access to a Tx buffer. */ + for( x = 0; x < niMAX_TX_ATTEMPTS; x++ ) + { + if( EMAC_CheckTransmitIndex() == TRUE ) + { + /* Will the data fit in the Tx buffer? */ + if( pxNetworkBuffer->xDataLength < EMAC_ETH_MAX_FLEN ) /*_RB_ The size needs to come from FreeRTOSIPConfig.h. */ + { + /* Assign the buffer to the Tx descriptor that is now known to + be free. */ + EMAC_SetNextPacketToSend( pxNetworkBuffer->pucBuffer ); + + /* The EMAC now owns the buffer. */ + pxNetworkBuffer->pucBuffer = NULL; + + /* Initiate the Tx. */ + EMAC_StartTransmitNextBuffer( pxNetworkBuffer->xDataLength ); + iptraceNETWORK_INTERFACE_TRANSMIT(); + + /* The Tx has been initiated. */ + xReturn = pdPASS; + } + break; + } + else + { + vTaskDelay( niTX_BUFFER_FREE_WAIT ); + } + } + + /* Finished with the network buffer. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + + return xReturn; +} +/*-----------------------------------------------------------*/ + +void ENET_IRQHandler( void ) +{ +uint32_t ulInterruptCause; + + while( ( ulInterruptCause = LPC_EMAC->IntStatus ) != 0 ) + { + /* Clear the interrupt. */ + LPC_EMAC->IntClear = ulInterruptCause; + + /* Clear fatal error conditions. NOTE: The driver does not clear all + errors, only those actually experienced. For future reference, range + errors are not actually errors so can be ignored. */ + if( ( ulInterruptCause & EMAC_INT_TX_UNDERRUN ) != 0U ) + { + LPC_EMAC->Command |= EMAC_CR_TX_RES; + } + + /* Unblock the deferred interrupt handler task if the event was an + Rx. */ + if( ( ulInterruptCause & EMAC_INT_RX_DONE ) != 0UL ) + { + xSemaphoreGiveFromISR( xEMACRxEventSemaphore, NULL ); + } + } + + /* ulInterruptCause is used for convenience here. A context switch is + wanted, but coding portEND_SWITCHING_ISR( 1 ) would likely result in a + compiler warning. */ + portEND_SWITCHING_ISR( ulInterruptCause ); +} +/*-----------------------------------------------------------*/ + +static void prvEMACHandlerTask( void *pvParameters ) +{ +size_t xDataLength; +const uint16_t usCRCLength = 4; +NetworkBufferDescriptor_t *pxNetworkBuffer; +IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; + +/* This is not included in the header file for some reason. */ +extern uint8_t *EMAC_NextPacketToRead( void ); + + ( void ) pvParameters; + configASSERT( xEMACRxEventSemaphore ); + + for( ;; ) + { + /* Wait for the EMAC interrupt to indicate that another packet has been + received. The while() loop is only needed if INCLUDE_vTaskSuspend is + set to 0 in FreeRTOSConfig.h. */ + while( xSemaphoreTake( xEMACRxEventSemaphore, portMAX_DELAY ) == pdFALSE ); + + /* At least one packet has been received. */ + while( EMAC_CheckReceiveIndex() != FALSE ) + { + /* Obtain the length, minus the CRC. The CRC is four bytes + but the length is already minus 1. */ + xDataLength = ( size_t ) EMAC_GetReceiveDataSize() - ( usCRCLength - 1U ); + + if( xDataLength > 0U ) + { + /* Obtain a network buffer to pass this data into the + stack. No storage is required as the network buffer + will point directly to the buffer that already holds + the received data. */ + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( 0, ( TickType_t ) 0 ); + + if( pxNetworkBuffer != NULL ) + { + pxNetworkBuffer->pucBuffer = EMAC_NextPacketToRead(); + pxNetworkBuffer->xDataLength = xDataLength; + xRxEvent.pvData = ( void * ) pxNetworkBuffer; + + /* Data was received and stored. Send a message to the IP + task to let it know. */ + if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + iptraceETHERNET_RX_EVENT_LOST(); + } + } + else + { + iptraceETHERNET_RX_EVENT_LOST(); + } + + iptraceNETWORK_INTERFACE_RECEIVE(); + } + + /* Release the frame. */ + EMAC_UpdateRxConsumeIndex(); + } + } +} +/*-----------------------------------------------------------*/ + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/NetworkInterface.c index ac01d41af..0b1f74d07 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/NetworkInterface.c @@ -1,1068 +1,1068 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -/* LPCOpen includes. */ -#include "chip.h" -#include "lpc_phy.h" - -/* The size of the stack allocated to the task that handles Rx packets. */ -#define nwRX_TASK_STACK_SIZE 140 - -#ifndef PHY_LS_HIGH_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not - receiving packets. */ - #define PHY_LS_HIGH_CHECK_TIME_MS 15000 -#endif - -#ifndef PHY_LS_LOW_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still low every second. */ - #define PHY_LS_LOW_CHECK_TIME_MS 1000 -#endif - -#ifndef configUSE_RMII - #define configUSE_RMII 1 -#endif - -#ifndef configNUM_RX_DESCRIPTORS - #error please define configNUM_RX_DESCRIPTORS in your FreeRTOSIPConfig.h -#endif - -#ifndef configNUM_TX_DESCRIPTORS - #error please define configNUM_TX_DESCRIPTORS in your FreeRTOSIPConfig.h -#endif - -#ifndef NETWORK_IRQHandler - #error NETWORK_IRQHandler must be defined to the name of the function that is installed in the interrupt vector table to handle Ethernet interrupts. -#endif - -#if !defined( MAC_FF_HMC ) - /* Hash for multicast. */ - #define MAC_FF_HMC ( 1UL << 2UL ) -#endif - -#ifndef iptraceEMAC_TASK_STARTING - #define iptraceEMAC_TASK_STARTING() do { } while( 0 ) -#endif - -/* Define the bits of .STATUS that indicate a reception error. */ -#define nwRX_STATUS_ERROR_BITS \ - ( RDES_CE /* CRC Error */ | \ - RDES_RE /* Receive Error */ | \ - RDES_DE /* Descriptor Error */ | \ - RDES_RWT /* Receive Watchdog Timeout */ | \ - RDES_LC /* Late Collision */ | \ - RDES_OE /* Overflow Error */ | \ - RDES_SAF /* Source Address Filter Fail */ | \ - RDES_AFM /* Destination Address Filter Fail */ | \ - RDES_LE /* Length Error */ ) - -/* Define the EMAC status bits that should trigger an interrupt. */ -#define nwDMA_INTERRUPT_MASK \ - ( DMA_IE_TIE /* Transmit interrupt enable */ | \ - DMA_IE_TSE /* Transmit stopped enable */ | \ - DMA_IE_OVE /* Overflow interrupt enable */ | \ - DMA_IE_RIE /* Receive interrupt enable */ | \ - DMA_IE_NIE /* Normal interrupt summary enable */ | \ - DMA_IE_AIE /* Abnormal interrupt summary enable */ | \ - DMA_IE_RUE /* Receive buffer unavailable enable */ | \ - DMA_IE_UNE /* Underflow interrupt enable. */ | \ - DMA_IE_TJE /* Transmit jabber timeout enable */ | \ - DMA_IE_RSE /* Received stopped enable */ | \ - DMA_IE_RWE /* Receive watchdog timeout enable */ | \ - DMA_IE_FBE )/* Fatal bus error enable */ - -/* Interrupt events to process. Currently only the RX/TX events are processed -although code for other events is included to allow for possible future -expansion. */ -#define EMAC_IF_RX_EVENT 1UL -#define EMAC_IF_TX_EVENT 2UL -#define EMAC_IF_ERR_EVENT 4UL -#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) - - /* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet - driver will filter incoming packets and only pass the stack those packets it - considers need processing. */ - #if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer - #else - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) - #endif - -#if( ipconfigZERO_COPY_RX_DRIVER == 0 ) || ( ipconfigZERO_COPY_TX_DRIVER == 0 ) - #warning It is adviced to enable both macros -#endif - -#ifndef configPLACE_IN_SECTION_RAM - #define configPLACE_IN_SECTION_RAM -/* - #define configPLACE_IN_SECTION_RAM __attribute__ ((section(".ramfunc"))) -*/ -#endif - -/*-----------------------------------------------------------*/ - -/* - * Delay function passed into the library. The implementation uses FreeRTOS - * calls so the scheduler must be started before the driver can be used. - */ -static void prvDelay( uint32_t ulMilliSeconds ); - -/* - * Initialises the Tx and Rx descriptors respectively. - */ -static void prvSetupTxDescriptors( void ); -static void prvSetupRxDescriptors( void ); - -/* - * A task that processes received frames. - */ -static void prvEMACHandlerTask( void *pvParameters ); - -/* - * Sets up the MAC with the results of an auto-negotiation. - */ -static BaseType_t prvSetLinkSpeed( void ); - -/* - * Generates a CRC for a MAC address that is then used to generate a hash index. - */ -static uint32_t prvGenerateCRC32( const uint8_t *ucAddress ); - -/* - * Generates a hash index when setting a filter to permit a MAC address. - */ -static uint32_t prvGetHashIndex( const uint8_t *ucAddress ); - -/* - * Update the hash table to allow a MAC address. - */ -static void prvAddMACAddress( const uint8_t* ucMacAddress ); - -/* - * Sometimes the DMA will report received data as being longer than the actual - * received from length. This function checks the reported length and corrects - * if if necessary. - */ -static void prvRemoveTrailingBytes( NetworkBufferDescriptor_t *pxDescriptor ); - -/*-----------------------------------------------------------*/ - -/* Bit map of outstanding ETH interrupt events for processing. Currently only -the Rx and Tx interrupt is handled, although code is included for other events -to enable future expansion. */ -static volatile uint32_t ulISREvents; - -/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ -static uint32_t ulPHYLinkStatus = 0; - -/* Tx descriptors and index. */ -static ENET_ENHTXDESC_T xDMATxDescriptors[ configNUM_TX_DESCRIPTORS ]; - -/* ulNextFreeTxDescriptor is declared volatile, because it is accessed from -to different tasks. */ -static volatile uint32_t ulNextFreeTxDescriptor; -static uint32_t ulTxDescriptorToClear; - -/* Rx descriptors and index. */ -static ENET_ENHRXDESC_T xDMARxDescriptors[ configNUM_RX_DESCRIPTORS ]; -static uint32_t ulNextRxDescriptorToProcess; - -/* Must be defined externally - the demo applications define this in main.c. */ -extern uint8_t ucMACAddress[ 6 ]; - -/* The handle of the task that processes Rx packets. The handle is required so -the task can be notified when new packets arrive. */ -static TaskHandle_t xRxHanderTask = NULL; - -#if( ipconfigUSE_LLMNR == 1 ) - static const uint8_t xLLMNR_MACAddress[] = { '\x01', '\x00', '\x5E', '\x00', '\x00', '\xFC' }; -#endif /* ipconfigUSE_LLMNR == 1 */ - -/* xTXDescriptorSemaphore is a counting semaphore with -a maximum count of ETH_TXBUFNB, which is the number of -DMA TX descriptors. */ -static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; - -/*-----------------------------------------------------------*/ - - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -BaseType_t xReturn = pdPASS; - - /* The interrupt will be turned on when a link is established. */ - NVIC_DisableIRQ( ETHERNET_IRQn ); - - /* Disable receive and transmit DMA processes. */ - LPC_ETHERNET->DMA_OP_MODE &= ~( DMA_OM_ST | DMA_OM_SR ); - - /* Disable packet reception. */ - LPC_ETHERNET->MAC_CONFIG &= ~( MAC_CFG_RE | MAC_CFG_TE ); - - /* Call the LPCOpen function to initialise the hardware. */ - Chip_ENET_Init( LPC_ETHERNET ); - - /* Save MAC address. */ - Chip_ENET_SetADDR( LPC_ETHERNET, ucMACAddress ); - - /* Clear all MAC address hash entries. */ - LPC_ETHERNET->MAC_HASHTABLE_HIGH = 0; - LPC_ETHERNET->MAC_HASHTABLE_LOW = 0; - - #if( ipconfigUSE_LLMNR == 1 ) - { - prvAddMACAddress( xLLMNR_MACAddress ); - } - #endif /* ipconfigUSE_LLMNR == 1 */ - - /* Promiscuous flag (PR) and Receive All flag (RA) set to zero. The - registers MAC_HASHTABLE_[LOW|HIGH] will be loaded to allow certain - multi-cast addresses. */ - LPC_ETHERNET->MAC_FRAME_FILTER = MAC_FF_HMC; - - #if( configUSE_RMII == 1 ) - { - if( lpc_phy_init( pdTRUE, prvDelay ) != SUCCESS ) - { - xReturn = pdFAIL; - } - } - #else - { - #warning This path has not been tested. - if( lpc_phy_init( pdFALSE, prvDelay ) != SUCCESS ) - { - xReturn = pdFAIL; - } - } - #endif - - if( xReturn == pdPASS ) - { - /* Guard against the task being created more than once and the - descriptors being initialised more than once. */ - if( xRxHanderTask == NULL ) - { - xReturn = xTaskCreate( prvEMACHandlerTask, "EMAC", nwRX_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xRxHanderTask ); - configASSERT( xReturn ); - } - - if( xTXDescriptorSemaphore == NULL ) - { - /* Create a counting semaphore, with a value of 'configNUM_TX_DESCRIPTORS' - and a maximum of 'configNUM_TX_DESCRIPTORS'. */ - xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) configNUM_TX_DESCRIPTORS, ( UBaseType_t ) configNUM_TX_DESCRIPTORS ); - configASSERT( xTXDescriptorSemaphore ); - } - - /* Enable MAC interrupts. */ - LPC_ETHERNET->DMA_INT_EN = nwDMA_INTERRUPT_MASK; - } - - if( xReturn != pdFAIL ) - { - /* Auto-negotiate was already started. Wait for it to complete. */ - xReturn = prvSetLinkSpeed(); - - if( xReturn == pdPASS ) - { - /* Initialise the descriptors. */ - prvSetupTxDescriptors(); - prvSetupRxDescriptors(); - - /* Clear all interrupts. */ - LPC_ETHERNET->DMA_STAT = DMA_ST_ALL; - - /* Enable receive and transmit DMA processes. */ - LPC_ETHERNET->DMA_OP_MODE |= DMA_OM_ST | DMA_OM_SR; - - /* Set Receiver / Transmitter Enable. */ - LPC_ETHERNET->MAC_CONFIG |= MAC_CFG_RE | MAC_CFG_TE; - - /* Start receive polling. */ - LPC_ETHERNET->DMA_REC_POLL_DEMAND = 1; - - /* Enable interrupts in the NVIC. */ - NVIC_SetPriority( ETHERNET_IRQn, configMAC_INTERRUPT_PRIORITY ); - NVIC_EnableIRQ( ETHERNET_IRQn ); - } - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -#define niBUFFER_1_PACKET_SIZE 1536 - -static __attribute__ ((section("._ramAHB32"))) uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] __attribute__ ( ( aligned( 32 ) ) ); - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ - -uint8_t *ucRAMBuffer = ucNetworkPackets; -uint32_t ul; - - for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) - { - pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; - *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); - ucRAMBuffer += niBUFFER_1_PACKET_SIZE; - } -} -/*-----------------------------------------------------------*/ - -configPLACE_IN_SECTION_RAM -static void vClearTXBuffers() -{ -uint32_t ulLastDescriptor = ulNextFreeTxDescriptor; -size_t uxCount = ( ( size_t ) configNUM_TX_DESCRIPTORS ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - NetworkBufferDescriptor_t *pxNetworkBuffer; - uint8_t *ucPayLoad; -#endif - - /* This function is called after a TX-completion interrupt. - It will release each Network Buffer used in xNetworkInterfaceOutput(). - 'uxCount' represents the number of descriptors given to DMA for transmission. - After sending a packet, the DMA will clear the 'TDES_OWN' bit. */ - while( ( uxCount > ( size_t ) 0u ) && ( ( xDMATxDescriptors[ ulTxDescriptorToClear ].CTRLSTAT & TDES_OWN ) == 0 ) ) - { - if( ( ulTxDescriptorToClear == ulLastDescriptor ) && ( uxCount != ( size_t ) configNUM_TX_DESCRIPTORS ) ) - { - break; - } - - - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - ucPayLoad = ( uint8_t * )xDMATxDescriptors[ ulTxDescriptorToClear ].B1ADD; - if( ucPayLoad != NULL ) - { - /* B1ADD points to a pucEthernetBuffer of a Network Buffer descriptor. */ - pxNetworkBuffer = pxPacketBuffer_to_NetworkBuffer( ucPayLoad ); - - configASSERT( pxNetworkBuffer != NULL ); - - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ) ; - xDMATxDescriptors[ ulTxDescriptorToClear ].B1ADD = ( uint32_t )0u; - } - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - /* Move onto the next descriptor, wrapping if necessary. */ - ulTxDescriptorToClear++; - if( ulTxDescriptorToClear >= configNUM_TX_DESCRIPTORS ) - { - ulTxDescriptorToClear = 0; - } - - uxCount--; - /* Tell the counting semaphore that one more TX descriptor is available. */ - xSemaphoreGive( xTXDescriptorSemaphore ); - } -} - -/*-----------------------------------------------------------*/ - -configPLACE_IN_SECTION_RAM -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t bReleaseAfterSend ) -{ -BaseType_t xReturn = pdFAIL; -const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50 ); - - /* Attempt to obtain access to a Tx descriptor. */ - do - { - if( xTXDescriptorSemaphore == NULL ) - { - break; - } - if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) - { - /* Time-out waiting for a free TX descriptor. */ - break; - } - - /* If the descriptor is still owned by the DMA it can't be used. */ - if( ( xDMATxDescriptors[ ulNextFreeTxDescriptor ].CTRLSTAT & TDES_OWN ) != 0 ) - { - /* The semaphore was taken, the TX DMA-descriptor is still not available. - Actually that should not occur, the 'TDES_OWN' was already confirmed low in vClearTXBuffers(). */ - xSemaphoreGive( xTXDescriptorSemaphore ); - } - else - { - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* bReleaseAfterSend should always be set when using the zero - copy driver. */ - configASSERT( bReleaseAfterSend != pdFALSE ); - - /* The DMA's descriptor to point directly to the data in the - network buffer descriptor. The data is not copied. */ - xDMATxDescriptors[ ulNextFreeTxDescriptor ].B1ADD = ( uint32_t ) pxDescriptor->pucEthernetBuffer; - - /* The DMA descriptor will 'own' this Network Buffer, - until it has been sent. So don't release it now. */ - bReleaseAfterSend = false; - } - #else - { - /* The data is copied from the network buffer descriptor into - the DMA's descriptor. */ - memcpy( ( void * ) xDMATxDescriptors[ ulNextFreeTxDescriptor ].B1ADD, ( void * ) pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength ); - } - #endif - - xDMATxDescriptors[ ulNextFreeTxDescriptor ].BSIZE = ( uint32_t ) TDES_ENH_BS1( pxDescriptor->xDataLength ); - - /* This descriptor is given back to the DMA. */ - xDMATxDescriptors[ ulNextFreeTxDescriptor ].CTRLSTAT |= TDES_OWN; - - /* Ensure the DMA is polling Tx descriptors. */ - LPC_ETHERNET->DMA_TRANS_POLL_DEMAND = 1; - - iptraceNETWORK_INTERFACE_TRANSMIT(); - - /* Move onto the next descriptor, wrapping if necessary. */ - ulNextFreeTxDescriptor++; - if( ulNextFreeTxDescriptor >= configNUM_TX_DESCRIPTORS ) - { - ulNextFreeTxDescriptor = 0; - } - - /* The Tx has been initiated. */ - xReturn = pdPASS; - } - } while( 0 ); - - /* The buffer has been sent so can be released. */ - if( bReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static void prvDelay( uint32_t ulMilliSeconds ) -{ - /* Ensure the scheduler was started before attempting to use the scheduler to - create a delay. */ - configASSERT( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ); - - vTaskDelay( pdMS_TO_TICKS( ulMilliSeconds ) ); -} -/*-----------------------------------------------------------*/ - -static void prvSetupTxDescriptors( void ) -{ -BaseType_t x; - - /* Start with Tx descriptors clear. */ - memset( ( void * ) xDMATxDescriptors, 0, sizeof( xDMATxDescriptors ) ); - - /* Index to the next Tx descriptor to use. */ - ulNextFreeTxDescriptor = 0ul; - - /* Index to the next Tx descriptor to clear ( after transmission ). */ - ulTxDescriptorToClear = 0ul; - - for( x = 0; x < configNUM_TX_DESCRIPTORS; x++ ) - { - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* Nothing to do, B1ADD will be set when data is ready to transmit. - Currently the memset above will have set it to NULL. */ - } - #else - { - /* Allocate a buffer to the Tx descriptor. This is the most basic - way of creating a driver as the data is then copied into the - buffer. */ - xDMATxDescriptors[ x ].B1ADD = ( uint32_t ) pvPortMalloc( ipTOTAL_ETHERNET_FRAME_SIZE ); - - /* Use an assert to check the allocation as +TCP applications will - often not use a malloc() failed hook as the TCP stack will recover - from allocation failures. */ - configASSERT( xDMATxDescriptors[ x ].B1ADD ); - } - #endif - - /* Buffers hold an entire frame so all buffers are both the start and - end of a frame. */ - /* TDES_ENH_TCH Second Address Chained. */ - /* TDES_ENH_CIC(n) Checksum Insertion Control, tried but it does not work for the LPC18xx... */ - /* TDES_ENH_FS First Segment. */ - /* TDES_ENH_LS Last Segment. */ - /* TDES_ENH_IC Interrupt on Completion. */ - xDMATxDescriptors[ x ].CTRLSTAT = TDES_ENH_TCH | TDES_ENH_CIC( 3 ) | TDES_ENH_FS | TDES_ENH_LS | TDES_ENH_IC; - xDMATxDescriptors[ x ].B2ADD = ( uint32_t ) &xDMATxDescriptors[ x + 1 ]; - } - - xDMATxDescriptors[ configNUM_TX_DESCRIPTORS - 1 ].CTRLSTAT |= TDES_ENH_TER; - xDMATxDescriptors[ configNUM_TX_DESCRIPTORS - 1 ].B2ADD = ( uint32_t ) &xDMATxDescriptors[ 0 ]; - - /* Point the DMA to the base of the descriptor list. */ - LPC_ETHERNET->DMA_TRANS_DES_ADDR = ( uint32_t ) xDMATxDescriptors; -} -/*-----------------------------------------------------------*/ - -static void prvSetupRxDescriptors( void ) -{ -BaseType_t x; -#if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - NetworkBufferDescriptor_t *pxNetworkBuffer; -#endif - - /* Index to the next Rx descriptor to use. */ - ulNextRxDescriptorToProcess = 0; - - /* Clear RX descriptor list. */ - memset( ( void * ) xDMARxDescriptors, 0, sizeof( xDMARxDescriptors ) ); - - for( x = 0; x < configNUM_RX_DESCRIPTORS; x++ ) - { - /* Allocate a buffer of the largest possible frame size as it is not - known what size received frames will be. */ - - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE, 0 ); - - /* During start-up there should be enough Network Buffers available, - so it is safe to use configASSERT(). - In case this assert fails, please check: configNUM_RX_DESCRIPTORS, - ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, and in case BufferAllocation_2.c - is included, check the amount of available heap. */ - configASSERT( pxNetworkBuffer != NULL ); - - /* Pass the actual buffer to DMA. */ - xDMARxDescriptors[ x ].B1ADD = ( uint32_t ) pxNetworkBuffer->pucEthernetBuffer; - } - #else - { - /* All DMA descriptors are populated with permanent memory blocks. - Their contents will be copy to Network Buffers. */ - xDMARxDescriptors[ x ].B1ADD = ( uint32_t ) pvPortMalloc( ipTOTAL_ETHERNET_FRAME_SIZE ); - } - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - - /* Use an assert to check the allocation as +TCP applications will often - not use a malloc failed hook as the TCP stack will recover from - allocation failures. */ - configASSERT( xDMARxDescriptors[ x ].B1ADD ); - - xDMARxDescriptors[ x ].B2ADD = ( uint32_t ) &( xDMARxDescriptors[ x + 1 ] ); - xDMARxDescriptors[ x ].CTRL = ( uint32_t ) RDES_ENH_BS1( ipTOTAL_ETHERNET_FRAME_SIZE ) | RDES_ENH_RCH; - - /* The descriptor is available for use by the DMA. */ - xDMARxDescriptors[ x ].STATUS = RDES_OWN; - } - - /* RDES_ENH_RER Receive End of Ring. */ - xDMARxDescriptors[ ( configNUM_RX_DESCRIPTORS - 1 ) ].CTRL |= RDES_ENH_RER; - xDMARxDescriptors[ configNUM_RX_DESCRIPTORS - 1 ].B2ADD = ( uint32_t ) &( xDMARxDescriptors[ 0 ] ); - - /* Point the DMA to the base of the descriptor list. */ - LPC_ETHERNET->DMA_REC_DES_ADDR = ( uint32_t ) xDMARxDescriptors; -} -/*-----------------------------------------------------------*/ -configPLACE_IN_SECTION_RAM -static void prvRemoveTrailingBytes( NetworkBufferDescriptor_t *pxDescriptor ) -{ -size_t xExpectedLength; -IPPacket_t *pxIPPacket; - - pxIPPacket = ( IPPacket_t * ) pxDescriptor->pucEthernetBuffer; - /* Look at the actual length of the packet, translate it to a host-endial notation. */ - xExpectedLength = sizeof( EthernetHeader_t ) + ( size_t ) FreeRTOS_htons( pxIPPacket->xIPHeader.usLength ); - - if( xExpectedLength == ( pxDescriptor->xDataLength + 4 ) ) - { - pxDescriptor->xDataLength -= 4; - } - else - { - if( pxDescriptor->xDataLength > xExpectedLength ) - { - pxDescriptor->xDataLength = ( size_t ) xExpectedLength; - } - } -} -/*-----------------------------------------------------------*/ -configPLACE_IN_SECTION_RAM -BaseType_t xGetPhyLinkStatus( void ) -{ -BaseType_t xReturn; - - if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) == 0 ) - { - xReturn = pdFALSE; - } - else - { - xReturn = pdTRUE; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -uint32_t ulDataAvailable; - -configPLACE_IN_SECTION_RAM -static BaseType_t prvNetworkInterfaceInput() -{ -BaseType_t xResult = pdFALSE; -uint32_t ulStatus; -eFrameProcessingResult_t eResult; -const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); -const UBaseType_t uxMinimumBuffersRemaining = 3UL; -uint16_t usLength; -NetworkBufferDescriptor_t *pxDescriptor; -#if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - NetworkBufferDescriptor_t *pxNewDescriptor; -#endif /* ipconfigZERO_COPY_RX_DRIVER */ -#if( ipconfigUSE_LINKED_RX_MESSAGES == 0 ) - IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; -#endif - - /* Process each descriptor that is not still in use by the DMA. */ - ulStatus = xDMARxDescriptors[ ulNextRxDescriptorToProcess ].STATUS; - if( ( ulStatus & RDES_OWN ) == 0 ) - { - /* Check packet for errors */ - if( ( ulStatus & nwRX_STATUS_ERROR_BITS ) != 0 ) - { - /* There is some reception error. */ - intCount[ 3 ]++; - /* Clear error bits. */ - ulStatus &= ~( ( uint32_t )nwRX_STATUS_ERROR_BITS ); - } - else - { - xResult++; - - eResult = ipCONSIDER_FRAME_FOR_PROCESSING( ( const uint8_t * const ) ( xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD ) ); - if( eResult == eProcessBuffer ) - { - if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) == 0 ) - { - ulPHYLinkStatus |= PHY_LINK_CONNECTED; - FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d (message received)\n", ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != 0 ) ); - } - - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - if( uxGetNumberOfFreeNetworkBuffers() > uxMinimumBuffersRemaining ) - { - pxNewDescriptor = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE, xDescriptorWaitTime ); - } - else - { - /* Too risky to allocate a new Network Buffer. */ - pxNewDescriptor = NULL; - } - if( pxNewDescriptor != NULL ) - #else - if( uxGetNumberOfFreeNetworkBuffers() > uxMinimumBuffersRemaining ) - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - { - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - const uint8_t *pucBuffer; - #endif - - /* Get the actual length. */ - usLength = RDES_FLMSK( ulStatus ); - - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Replace the character buffer 'B1ADD'. */ - pucBuffer = ( const uint8_t * const ) ( xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD ); - xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD = ( uint32_t ) pxNewDescriptor->pucEthernetBuffer; - - /* 'B1ADD' contained the address of a 'pucEthernetBuffer' that - belongs to a Network Buffer. Find the original Network Buffer. */ - pxDescriptor = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); - /* This zero-copy driver makes sure that every 'xDMARxDescriptors' contains - a reference to a Network Buffer at any time. - In case it runs out of Network Buffers, a DMA buffer won't be replaced, - and the received messages is dropped. */ - configASSERT( pxDescriptor != NULL ); - } - #else - { - /* Create a buffer of exactly the required length. */ - pxDescriptor = pxGetNetworkBufferWithDescriptor( usLength, xDescriptorWaitTime ); - } - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - - if( pxDescriptor != NULL ) - { - pxDescriptor->xDataLength = ( size_t ) usLength; - #if( ipconfigZERO_COPY_RX_DRIVER == 0 ) - { - /* Copy the data into the allocated buffer. */ - memcpy( ( void * ) pxDescriptor->pucEthernetBuffer, ( void * ) xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD, usLength ); - } - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - /* It is possible that more data was copied than - actually makes up the frame. If this is the case - adjust the length to remove any trailing bytes. */ - prvRemoveTrailingBytes( pxDescriptor ); - - /* Pass the data to the TCP/IP task for processing. */ - xRxEvent.pvData = ( void * ) pxDescriptor; - if( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime ) == pdFALSE ) - { - /* Could not send the descriptor into the TCP/IP - stack, it must be released. */ - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - else - { - iptraceNETWORK_INTERFACE_RECEIVE(); - - /* The data that was available at the top of this - loop has been sent, so is no longer available. */ - ulDataAvailable = pdFALSE; - } - } - } - } - else - { - /* The packet is discarded as uninteresting. */ - ulDataAvailable = pdFALSE; - } - /* Got here because received data was sent to the IP task or the - data contained an error and was discarded. Give the descriptor - back to the DMA. */ - xDMARxDescriptors[ ulNextRxDescriptorToProcess ].STATUS = ulStatus | RDES_OWN; - - /* Move onto the next descriptor. */ - ulNextRxDescriptorToProcess++; - if( ulNextRxDescriptorToProcess >= configNUM_RX_DESCRIPTORS ) - { - ulNextRxDescriptorToProcess = 0; - } - - ulStatus = xDMARxDescriptors[ ulNextRxDescriptorToProcess ].STATUS; - } /* if( ( ulStatus & nwRX_STATUS_ERROR_BITS ) != 0 ) */ - } /* if( ( ulStatus & RDES_OWN ) == 0 ) */ - - /* Restart receive polling. */ - LPC_ETHERNET->DMA_REC_POLL_DEMAND = 1; - - return xResult; -} -/*-----------------------------------------------------------*/ - -configPLACE_IN_SECTION_RAM -void NETWORK_IRQHandler( void ) -{ -BaseType_t xHigherPriorityTaskWoken = pdFALSE; -uint32_t ulDMAStatus; -const uint32_t ulRxInterruptMask = - DMA_ST_RI | /* Receive interrupt */ - DMA_ST_RU; /* Receive buffer unavailable */ -const uint32_t ulTxInterruptMask = - DMA_ST_TI | /* Transmit interrupt */ - DMA_ST_TPS; /* Transmit process stopped */ - - configASSERT( xRxHanderTask ); - - /* Get pending interrupts. */ - ulDMAStatus = LPC_ETHERNET->DMA_STAT; - - /* RX group interrupt(s). */ - if( ( ulDMAStatus & ulRxInterruptMask ) != 0x00 ) - { - /* Remember that an RX event has happened. */ - ulISREvents |= EMAC_IF_RX_EVENT; - vTaskNotifyGiveFromISR( xRxHanderTask, &xHigherPriorityTaskWoken ); - intCount[ 0 ]++; - } - - /* TX group interrupt(s). */ - if( ( ulDMAStatus & ulTxInterruptMask ) != 0x00 ) - { - /* Remember that a TX event has happened. */ - ulISREvents |= EMAC_IF_TX_EVENT; - vTaskNotifyGiveFromISR( xRxHanderTask, &xHigherPriorityTaskWoken ); - intCount[ 1 ]++; - } - - /* Test for 'Abnormal interrupt summary'. */ - if( ( ulDMAStatus & DMA_ST_AIE ) != 0x00 ) - { - /* The trace macro must be written such that it can be called from - an interrupt. */ - iptraceETHERNET_RX_EVENT_LOST(); - } - - /* Clear pending interrupts */ - LPC_ETHERNET->DMA_STAT = ulDMAStatus; - - /* Context switch needed? */ - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvSetLinkSpeed( void ) -{ -BaseType_t xReturn = pdFAIL; -TickType_t xTimeOnEntering; -uint32_t ulPhyStatus; -const TickType_t xAutoNegotiateDelay = pdMS_TO_TICKS( 5000UL ); - - /* Ensure polling does not starve lower priority tasks by temporarily - setting the priority of this task to that of the idle task. */ - vTaskPrioritySet( NULL, tskIDLE_PRIORITY ); - - xTimeOnEntering = xTaskGetTickCount(); - do - { - ulPhyStatus = lpcPHYStsPoll(); - if( ( ulPhyStatus & PHY_LINK_CONNECTED ) != 0x00 ) - { - /* Set interface speed and duplex. */ - if( ( ulPhyStatus & PHY_LINK_SPEED100 ) != 0x00 ) - { - Chip_ENET_SetSpeed( LPC_ETHERNET, 1 ); - } - else - { - Chip_ENET_SetSpeed( LPC_ETHERNET, 0 ); - } - - if( ( ulPhyStatus & PHY_LINK_FULLDUPLX ) != 0x00 ) - { - Chip_ENET_SetDuplex( LPC_ETHERNET, true ); - } - else - { - Chip_ENET_SetDuplex( LPC_ETHERNET, false ); - } - - xReturn = pdPASS; - break; - } - } while( ( xTaskGetTickCount() - xTimeOnEntering ) < xAutoNegotiateDelay ); - - /* Reset the priority of this task back to its original value. */ - vTaskPrioritySet( NULL, ipconfigIP_TASK_PRIORITY ); - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static uint32_t prvGenerateCRC32( const uint8_t *ucAddress ) -{ -unsigned int j; -const uint32_t Polynomial = 0xEDB88320; -uint32_t crc = ~0ul; -const uint8_t *pucCurrent = ( const uint8_t * ) ucAddress; -const uint8_t *pucLast = pucCurrent + 6; - - /* Calculate normal CRC32 */ - while( pucCurrent < pucLast ) - { - crc ^= *( pucCurrent++ ); - for( j = 0; j < 8; j++ ) - { - if( ( crc & 1 ) != 0 ) - { - crc = (crc >> 1) ^ Polynomial; - } - else - { - crc >>= 1; - } - } - } - return ~crc; -} -/*-----------------------------------------------------------*/ - -static uint32_t prvGetHashIndex( const uint8_t *ucAddress ) -{ -uint32_t ulCrc = prvGenerateCRC32( ucAddress ); -uint32_t ulIndex = 0ul; -BaseType_t xCount = 6; - - /* Take the lowest 6 bits of the CRC32 and reverse them */ - while( xCount-- ) - { - ulIndex <<= 1; - ulIndex |= ( ulCrc & 1 ); - ulCrc >>= 1; - } - - /* This is the has value of 'ucAddress' */ - return ulIndex; -} -/*-----------------------------------------------------------*/ - -static void prvAddMACAddress( const uint8_t* ucMacAddress ) -{ -BaseType_t xIndex; - - xIndex = prvGetHashIndex( ucMacAddress ); - if( xIndex >= 32 ) - { - LPC_ETHERNET->MAC_HASHTABLE_HIGH |= ( 1u << ( xIndex - 32 ) ); - } - else - { - LPC_ETHERNET->MAC_HASHTABLE_LOW |= ( 1u << xIndex ); - } -} -/*-----------------------------------------------------------*/ - -configPLACE_IN_SECTION_RAM -static void prvEMACHandlerTask( void *pvParameters ) -{ -TimeOut_t xPhyTime; -TickType_t xPhyRemTime; -UBaseType_t uxLastMinBufferCount = 0; -UBaseType_t uxCurrentCount; -BaseType_t xResult = 0; -uint32_t ulStatus; -const TickType_t xBlockTime = pdMS_TO_TICKS( 5000ul ); - - /* Remove compiler warning about unused parameter. */ - ( void ) pvParameters; - - /* A possibility to set some additional task properties. */ - iptraceEMAC_TASK_STARTING(); - - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - - for( ;; ) - { - uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); - if( uxLastMinBufferCount != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); - } - - #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - static UBaseType_t uxLastMinQueueSpace = 0; - - uxCurrentCount = uxGetMinimumIPQueueSpace(); - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - - ulTaskNotifyTake( pdTRUE, xBlockTime ); - - xResult = ( BaseType_t ) 0; - - if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) - { - /* Code to release TX buffers if zero-copy is used. */ - ulISREvents &= ~EMAC_IF_TX_EVENT; - { - /* Check if DMA packets have been delivered. */ - vClearTXBuffers(); - } - } - - if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) - { - ulISREvents &= ~EMAC_IF_RX_EVENT; - - xResult = prvNetworkInterfaceInput(); - if( xResult > 0 ) - { - while( prvNetworkInterfaceInput() > 0 ) - { - } - } - } - - if( xResult > 0 ) - { - /* A packet was received. No need to check for the PHY status now, - but set a timer to check it later on. */ - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - xResult = 0; - } - else if( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) - { - ulStatus = lpcPHYStsPoll(); - - if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != ( ulStatus & PHY_LINK_CONNECTED ) ) - { - ulPHYLinkStatus = ulStatus; - FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d (polled PHY)\n", ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != 0 ) ); - } - - vTaskSetTimeOutState( &xPhyTime ); - if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != 0 ) - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - } - else - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - } - } - } -} -/*-----------------------------------------------------------*/ +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* Standard includes. */ +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +/* LPCOpen includes. */ +#include "chip.h" +#include "lpc_phy.h" + +/* The size of the stack allocated to the task that handles Rx packets. */ +#define nwRX_TASK_STACK_SIZE 140 + +#ifndef PHY_LS_HIGH_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not + receiving packets. */ + #define PHY_LS_HIGH_CHECK_TIME_MS 15000 +#endif + +#ifndef PHY_LS_LOW_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still low every second. */ + #define PHY_LS_LOW_CHECK_TIME_MS 1000 +#endif + +#ifndef configUSE_RMII + #define configUSE_RMII 1 +#endif + +#ifndef configNUM_RX_DESCRIPTORS + #error please define configNUM_RX_DESCRIPTORS in your FreeRTOSIPConfig.h +#endif + +#ifndef configNUM_TX_DESCRIPTORS + #error please define configNUM_TX_DESCRIPTORS in your FreeRTOSIPConfig.h +#endif + +#ifndef NETWORK_IRQHandler + #error NETWORK_IRQHandler must be defined to the name of the function that is installed in the interrupt vector table to handle Ethernet interrupts. +#endif + +#if !defined( MAC_FF_HMC ) + /* Hash for multicast. */ + #define MAC_FF_HMC ( 1UL << 2UL ) +#endif + +#ifndef iptraceEMAC_TASK_STARTING + #define iptraceEMAC_TASK_STARTING() do { } while( 0 ) +#endif + +/* Define the bits of .STATUS that indicate a reception error. */ +#define nwRX_STATUS_ERROR_BITS \ + ( RDES_CE /* CRC Error */ | \ + RDES_RE /* Receive Error */ | \ + RDES_DE /* Descriptor Error */ | \ + RDES_RWT /* Receive Watchdog Timeout */ | \ + RDES_LC /* Late Collision */ | \ + RDES_OE /* Overflow Error */ | \ + RDES_SAF /* Source Address Filter Fail */ | \ + RDES_AFM /* Destination Address Filter Fail */ | \ + RDES_LE /* Length Error */ ) + +/* Define the EMAC status bits that should trigger an interrupt. */ +#define nwDMA_INTERRUPT_MASK \ + ( DMA_IE_TIE /* Transmit interrupt enable */ | \ + DMA_IE_TSE /* Transmit stopped enable */ | \ + DMA_IE_OVE /* Overflow interrupt enable */ | \ + DMA_IE_RIE /* Receive interrupt enable */ | \ + DMA_IE_NIE /* Normal interrupt summary enable */ | \ + DMA_IE_AIE /* Abnormal interrupt summary enable */ | \ + DMA_IE_RUE /* Receive buffer unavailable enable */ | \ + DMA_IE_UNE /* Underflow interrupt enable. */ | \ + DMA_IE_TJE /* Transmit jabber timeout enable */ | \ + DMA_IE_RSE /* Received stopped enable */ | \ + DMA_IE_RWE /* Receive watchdog timeout enable */ | \ + DMA_IE_FBE )/* Fatal bus error enable */ + +/* Interrupt events to process. Currently only the RX/TX events are processed +although code for other events is included to allow for possible future +expansion. */ +#define EMAC_IF_RX_EVENT 1UL +#define EMAC_IF_TX_EVENT 2UL +#define EMAC_IF_ERR_EVENT 4UL +#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) + + /* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet + driver will filter incoming packets and only pass the stack those packets it + considers need processing. */ + #if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer + #else + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) + #endif + +#if( ipconfigZERO_COPY_RX_DRIVER == 0 ) || ( ipconfigZERO_COPY_TX_DRIVER == 0 ) + #warning It is adviced to enable both macros +#endif + +#ifndef configPLACE_IN_SECTION_RAM + #define configPLACE_IN_SECTION_RAM +/* + #define configPLACE_IN_SECTION_RAM __attribute__ ((section(".ramfunc"))) +*/ +#endif + +/*-----------------------------------------------------------*/ + +/* + * Delay function passed into the library. The implementation uses FreeRTOS + * calls so the scheduler must be started before the driver can be used. + */ +static void prvDelay( uint32_t ulMilliSeconds ); + +/* + * Initialises the Tx and Rx descriptors respectively. + */ +static void prvSetupTxDescriptors( void ); +static void prvSetupRxDescriptors( void ); + +/* + * A task that processes received frames. + */ +static void prvEMACHandlerTask( void *pvParameters ); + +/* + * Sets up the MAC with the results of an auto-negotiation. + */ +static BaseType_t prvSetLinkSpeed( void ); + +/* + * Generates a CRC for a MAC address that is then used to generate a hash index. + */ +static uint32_t prvGenerateCRC32( const uint8_t *ucAddress ); + +/* + * Generates a hash index when setting a filter to permit a MAC address. + */ +static uint32_t prvGetHashIndex( const uint8_t *ucAddress ); + +/* + * Update the hash table to allow a MAC address. + */ +static void prvAddMACAddress( const uint8_t* ucMacAddress ); + +/* + * Sometimes the DMA will report received data as being longer than the actual + * received from length. This function checks the reported length and corrects + * if if necessary. + */ +static void prvRemoveTrailingBytes( NetworkBufferDescriptor_t *pxDescriptor ); + +/*-----------------------------------------------------------*/ + +/* Bit map of outstanding ETH interrupt events for processing. Currently only +the Rx and Tx interrupt is handled, although code is included for other events +to enable future expansion. */ +static volatile uint32_t ulISREvents; + +/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ +static uint32_t ulPHYLinkStatus = 0; + +/* Tx descriptors and index. */ +static ENET_ENHTXDESC_T xDMATxDescriptors[ configNUM_TX_DESCRIPTORS ]; + +/* ulNextFreeTxDescriptor is declared volatile, because it is accessed from +to different tasks. */ +static volatile uint32_t ulNextFreeTxDescriptor; +static uint32_t ulTxDescriptorToClear; + +/* Rx descriptors and index. */ +static ENET_ENHRXDESC_T xDMARxDescriptors[ configNUM_RX_DESCRIPTORS ]; +static uint32_t ulNextRxDescriptorToProcess; + +/* Must be defined externally - the demo applications define this in main.c. */ +extern uint8_t ucMACAddress[ 6 ]; + +/* The handle of the task that processes Rx packets. The handle is required so +the task can be notified when new packets arrive. */ +static TaskHandle_t xRxHanderTask = NULL; + +#if( ipconfigUSE_LLMNR == 1 ) + static const uint8_t xLLMNR_MACAddress[] = { '\x01', '\x00', '\x5E', '\x00', '\x00', '\xFC' }; +#endif /* ipconfigUSE_LLMNR == 1 */ + +/* xTXDescriptorSemaphore is a counting semaphore with +a maximum count of ETH_TXBUFNB, which is the number of +DMA TX descriptors. */ +static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; + +/*-----------------------------------------------------------*/ + + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +BaseType_t xReturn = pdPASS; + + /* The interrupt will be turned on when a link is established. */ + NVIC_DisableIRQ( ETHERNET_IRQn ); + + /* Disable receive and transmit DMA processes. */ + LPC_ETHERNET->DMA_OP_MODE &= ~( DMA_OM_ST | DMA_OM_SR ); + + /* Disable packet reception. */ + LPC_ETHERNET->MAC_CONFIG &= ~( MAC_CFG_RE | MAC_CFG_TE ); + + /* Call the LPCOpen function to initialise the hardware. */ + Chip_ENET_Init( LPC_ETHERNET ); + + /* Save MAC address. */ + Chip_ENET_SetADDR( LPC_ETHERNET, ucMACAddress ); + + /* Clear all MAC address hash entries. */ + LPC_ETHERNET->MAC_HASHTABLE_HIGH = 0; + LPC_ETHERNET->MAC_HASHTABLE_LOW = 0; + + #if( ipconfigUSE_LLMNR == 1 ) + { + prvAddMACAddress( xLLMNR_MACAddress ); + } + #endif /* ipconfigUSE_LLMNR == 1 */ + + /* Promiscuous flag (PR) and Receive All flag (RA) set to zero. The + registers MAC_HASHTABLE_[LOW|HIGH] will be loaded to allow certain + multi-cast addresses. */ + LPC_ETHERNET->MAC_FRAME_FILTER = MAC_FF_HMC; + + #if( configUSE_RMII == 1 ) + { + if( lpc_phy_init( pdTRUE, prvDelay ) != SUCCESS ) + { + xReturn = pdFAIL; + } + } + #else + { + #warning This path has not been tested. + if( lpc_phy_init( pdFALSE, prvDelay ) != SUCCESS ) + { + xReturn = pdFAIL; + } + } + #endif + + if( xReturn == pdPASS ) + { + /* Guard against the task being created more than once and the + descriptors being initialised more than once. */ + if( xRxHanderTask == NULL ) + { + xReturn = xTaskCreate( prvEMACHandlerTask, "EMAC", nwRX_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xRxHanderTask ); + configASSERT( xReturn ); + } + + if( xTXDescriptorSemaphore == NULL ) + { + /* Create a counting semaphore, with a value of 'configNUM_TX_DESCRIPTORS' + and a maximum of 'configNUM_TX_DESCRIPTORS'. */ + xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) configNUM_TX_DESCRIPTORS, ( UBaseType_t ) configNUM_TX_DESCRIPTORS ); + configASSERT( xTXDescriptorSemaphore ); + } + + /* Enable MAC interrupts. */ + LPC_ETHERNET->DMA_INT_EN = nwDMA_INTERRUPT_MASK; + } + + if( xReturn != pdFAIL ) + { + /* Auto-negotiate was already started. Wait for it to complete. */ + xReturn = prvSetLinkSpeed(); + + if( xReturn == pdPASS ) + { + /* Initialise the descriptors. */ + prvSetupTxDescriptors(); + prvSetupRxDescriptors(); + + /* Clear all interrupts. */ + LPC_ETHERNET->DMA_STAT = DMA_ST_ALL; + + /* Enable receive and transmit DMA processes. */ + LPC_ETHERNET->DMA_OP_MODE |= DMA_OM_ST | DMA_OM_SR; + + /* Set Receiver / Transmitter Enable. */ + LPC_ETHERNET->MAC_CONFIG |= MAC_CFG_RE | MAC_CFG_TE; + + /* Start receive polling. */ + LPC_ETHERNET->DMA_REC_POLL_DEMAND = 1; + + /* Enable interrupts in the NVIC. */ + NVIC_SetPriority( ETHERNET_IRQn, configMAC_INTERRUPT_PRIORITY ); + NVIC_EnableIRQ( ETHERNET_IRQn ); + } + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +#define niBUFFER_1_PACKET_SIZE 1536 + +static __attribute__ ((section("._ramAHB32"))) uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] __attribute__ ( ( aligned( 32 ) ) ); + +void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +{ + +uint8_t *ucRAMBuffer = ucNetworkPackets; +uint32_t ul; + + for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) + { + pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; + *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); + ucRAMBuffer += niBUFFER_1_PACKET_SIZE; + } +} +/*-----------------------------------------------------------*/ + +configPLACE_IN_SECTION_RAM +static void vClearTXBuffers() +{ +uint32_t ulLastDescriptor = ulNextFreeTxDescriptor; +size_t uxCount = ( ( size_t ) configNUM_TX_DESCRIPTORS ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + NetworkBufferDescriptor_t *pxNetworkBuffer; + uint8_t *ucPayLoad; +#endif + + /* This function is called after a TX-completion interrupt. + It will release each Network Buffer used in xNetworkInterfaceOutput(). + 'uxCount' represents the number of descriptors given to DMA for transmission. + After sending a packet, the DMA will clear the 'TDES_OWN' bit. */ + while( ( uxCount > ( size_t ) 0u ) && ( ( xDMATxDescriptors[ ulTxDescriptorToClear ].CTRLSTAT & TDES_OWN ) == 0 ) ) + { + if( ( ulTxDescriptorToClear == ulLastDescriptor ) && ( uxCount != ( size_t ) configNUM_TX_DESCRIPTORS ) ) + { + break; + } + + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + ucPayLoad = ( uint8_t * )xDMATxDescriptors[ ulTxDescriptorToClear ].B1ADD; + if( ucPayLoad != NULL ) + { + /* B1ADD points to a pucEthernetBuffer of a Network Buffer descriptor. */ + pxNetworkBuffer = pxPacketBuffer_to_NetworkBuffer( ucPayLoad ); + + configASSERT( pxNetworkBuffer != NULL ); + + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ) ; + xDMATxDescriptors[ ulTxDescriptorToClear ].B1ADD = ( uint32_t )0u; + } + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + /* Move onto the next descriptor, wrapping if necessary. */ + ulTxDescriptorToClear++; + if( ulTxDescriptorToClear >= configNUM_TX_DESCRIPTORS ) + { + ulTxDescriptorToClear = 0; + } + + uxCount--; + /* Tell the counting semaphore that one more TX descriptor is available. */ + xSemaphoreGive( xTXDescriptorSemaphore ); + } +} + +/*-----------------------------------------------------------*/ + +configPLACE_IN_SECTION_RAM +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t bReleaseAfterSend ) +{ +BaseType_t xReturn = pdFAIL; +const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50 ); + + /* Attempt to obtain access to a Tx descriptor. */ + do + { + if( xTXDescriptorSemaphore == NULL ) + { + break; + } + if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) + { + /* Time-out waiting for a free TX descriptor. */ + break; + } + + /* If the descriptor is still owned by the DMA it can't be used. */ + if( ( xDMATxDescriptors[ ulNextFreeTxDescriptor ].CTRLSTAT & TDES_OWN ) != 0 ) + { + /* The semaphore was taken, the TX DMA-descriptor is still not available. + Actually that should not occur, the 'TDES_OWN' was already confirmed low in vClearTXBuffers(). */ + xSemaphoreGive( xTXDescriptorSemaphore ); + } + else + { + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* bReleaseAfterSend should always be set when using the zero + copy driver. */ + configASSERT( bReleaseAfterSend != pdFALSE ); + + /* The DMA's descriptor to point directly to the data in the + network buffer descriptor. The data is not copied. */ + xDMATxDescriptors[ ulNextFreeTxDescriptor ].B1ADD = ( uint32_t ) pxDescriptor->pucEthernetBuffer; + + /* The DMA descriptor will 'own' this Network Buffer, + until it has been sent. So don't release it now. */ + bReleaseAfterSend = false; + } + #else + { + /* The data is copied from the network buffer descriptor into + the DMA's descriptor. */ + memcpy( ( void * ) xDMATxDescriptors[ ulNextFreeTxDescriptor ].B1ADD, ( void * ) pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength ); + } + #endif + + xDMATxDescriptors[ ulNextFreeTxDescriptor ].BSIZE = ( uint32_t ) TDES_ENH_BS1( pxDescriptor->xDataLength ); + + /* This descriptor is given back to the DMA. */ + xDMATxDescriptors[ ulNextFreeTxDescriptor ].CTRLSTAT |= TDES_OWN; + + /* Ensure the DMA is polling Tx descriptors. */ + LPC_ETHERNET->DMA_TRANS_POLL_DEMAND = 1; + + iptraceNETWORK_INTERFACE_TRANSMIT(); + + /* Move onto the next descriptor, wrapping if necessary. */ + ulNextFreeTxDescriptor++; + if( ulNextFreeTxDescriptor >= configNUM_TX_DESCRIPTORS ) + { + ulNextFreeTxDescriptor = 0; + } + + /* The Tx has been initiated. */ + xReturn = pdPASS; + } + } while( 0 ); + + /* The buffer has been sent so can be released. */ + if( bReleaseAfterSend != pdFALSE ) + { + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static void prvDelay( uint32_t ulMilliSeconds ) +{ + /* Ensure the scheduler was started before attempting to use the scheduler to + create a delay. */ + configASSERT( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ); + + vTaskDelay( pdMS_TO_TICKS( ulMilliSeconds ) ); +} +/*-----------------------------------------------------------*/ + +static void prvSetupTxDescriptors( void ) +{ +BaseType_t x; + + /* Start with Tx descriptors clear. */ + memset( ( void * ) xDMATxDescriptors, 0, sizeof( xDMATxDescriptors ) ); + + /* Index to the next Tx descriptor to use. */ + ulNextFreeTxDescriptor = 0ul; + + /* Index to the next Tx descriptor to clear ( after transmission ). */ + ulTxDescriptorToClear = 0ul; + + for( x = 0; x < configNUM_TX_DESCRIPTORS; x++ ) + { + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* Nothing to do, B1ADD will be set when data is ready to transmit. + Currently the memset above will have set it to NULL. */ + } + #else + { + /* Allocate a buffer to the Tx descriptor. This is the most basic + way of creating a driver as the data is then copied into the + buffer. */ + xDMATxDescriptors[ x ].B1ADD = ( uint32_t ) pvPortMalloc( ipTOTAL_ETHERNET_FRAME_SIZE ); + + /* Use an assert to check the allocation as +TCP applications will + often not use a malloc() failed hook as the TCP stack will recover + from allocation failures. */ + configASSERT( xDMATxDescriptors[ x ].B1ADD ); + } + #endif + + /* Buffers hold an entire frame so all buffers are both the start and + end of a frame. */ + /* TDES_ENH_TCH Second Address Chained. */ + /* TDES_ENH_CIC(n) Checksum Insertion Control, tried but it does not work for the LPC18xx... */ + /* TDES_ENH_FS First Segment. */ + /* TDES_ENH_LS Last Segment. */ + /* TDES_ENH_IC Interrupt on Completion. */ + xDMATxDescriptors[ x ].CTRLSTAT = TDES_ENH_TCH | TDES_ENH_CIC( 3 ) | TDES_ENH_FS | TDES_ENH_LS | TDES_ENH_IC; + xDMATxDescriptors[ x ].B2ADD = ( uint32_t ) &xDMATxDescriptors[ x + 1 ]; + } + + xDMATxDescriptors[ configNUM_TX_DESCRIPTORS - 1 ].CTRLSTAT |= TDES_ENH_TER; + xDMATxDescriptors[ configNUM_TX_DESCRIPTORS - 1 ].B2ADD = ( uint32_t ) &xDMATxDescriptors[ 0 ]; + + /* Point the DMA to the base of the descriptor list. */ + LPC_ETHERNET->DMA_TRANS_DES_ADDR = ( uint32_t ) xDMATxDescriptors; +} +/*-----------------------------------------------------------*/ + +static void prvSetupRxDescriptors( void ) +{ +BaseType_t x; +#if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + NetworkBufferDescriptor_t *pxNetworkBuffer; +#endif + + /* Index to the next Rx descriptor to use. */ + ulNextRxDescriptorToProcess = 0; + + /* Clear RX descriptor list. */ + memset( ( void * ) xDMARxDescriptors, 0, sizeof( xDMARxDescriptors ) ); + + for( x = 0; x < configNUM_RX_DESCRIPTORS; x++ ) + { + /* Allocate a buffer of the largest possible frame size as it is not + known what size received frames will be. */ + + #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + { + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE, 0 ); + + /* During start-up there should be enough Network Buffers available, + so it is safe to use configASSERT(). + In case this assert fails, please check: configNUM_RX_DESCRIPTORS, + ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, and in case BufferAllocation_2.c + is included, check the amount of available heap. */ + configASSERT( pxNetworkBuffer != NULL ); + + /* Pass the actual buffer to DMA. */ + xDMARxDescriptors[ x ].B1ADD = ( uint32_t ) pxNetworkBuffer->pucEthernetBuffer; + } + #else + { + /* All DMA descriptors are populated with permanent memory blocks. + Their contents will be copy to Network Buffers. */ + xDMARxDescriptors[ x ].B1ADD = ( uint32_t ) pvPortMalloc( ipTOTAL_ETHERNET_FRAME_SIZE ); + } + #endif /* ipconfigZERO_COPY_RX_DRIVER */ + + /* Use an assert to check the allocation as +TCP applications will often + not use a malloc failed hook as the TCP stack will recover from + allocation failures. */ + configASSERT( xDMARxDescriptors[ x ].B1ADD ); + + xDMARxDescriptors[ x ].B2ADD = ( uint32_t ) &( xDMARxDescriptors[ x + 1 ] ); + xDMARxDescriptors[ x ].CTRL = ( uint32_t ) RDES_ENH_BS1( ipTOTAL_ETHERNET_FRAME_SIZE ) | RDES_ENH_RCH; + + /* The descriptor is available for use by the DMA. */ + xDMARxDescriptors[ x ].STATUS = RDES_OWN; + } + + /* RDES_ENH_RER Receive End of Ring. */ + xDMARxDescriptors[ ( configNUM_RX_DESCRIPTORS - 1 ) ].CTRL |= RDES_ENH_RER; + xDMARxDescriptors[ configNUM_RX_DESCRIPTORS - 1 ].B2ADD = ( uint32_t ) &( xDMARxDescriptors[ 0 ] ); + + /* Point the DMA to the base of the descriptor list. */ + LPC_ETHERNET->DMA_REC_DES_ADDR = ( uint32_t ) xDMARxDescriptors; +} +/*-----------------------------------------------------------*/ +configPLACE_IN_SECTION_RAM +static void prvRemoveTrailingBytes( NetworkBufferDescriptor_t *pxDescriptor ) +{ +size_t xExpectedLength; +IPPacket_t *pxIPPacket; + + pxIPPacket = ( IPPacket_t * ) pxDescriptor->pucEthernetBuffer; + /* Look at the actual length of the packet, translate it to a host-endial notation. */ + xExpectedLength = sizeof( EthernetHeader_t ) + ( size_t ) FreeRTOS_htons( pxIPPacket->xIPHeader.usLength ); + + if( xExpectedLength == ( pxDescriptor->xDataLength + 4 ) ) + { + pxDescriptor->xDataLength -= 4; + } + else + { + if( pxDescriptor->xDataLength > xExpectedLength ) + { + pxDescriptor->xDataLength = ( size_t ) xExpectedLength; + } + } +} +/*-----------------------------------------------------------*/ +configPLACE_IN_SECTION_RAM +BaseType_t xGetPhyLinkStatus( void ) +{ +BaseType_t xReturn; + + if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) == 0 ) + { + xReturn = pdFALSE; + } + else + { + xReturn = pdTRUE; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +uint32_t ulDataAvailable; + +configPLACE_IN_SECTION_RAM +static BaseType_t prvNetworkInterfaceInput() +{ +BaseType_t xResult = pdFALSE; +uint32_t ulStatus; +eFrameProcessingResult_t eResult; +const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); +const UBaseType_t uxMinimumBuffersRemaining = 3UL; +uint16_t usLength; +NetworkBufferDescriptor_t *pxDescriptor; +#if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + NetworkBufferDescriptor_t *pxNewDescriptor; +#endif /* ipconfigZERO_COPY_RX_DRIVER */ +#if( ipconfigUSE_LINKED_RX_MESSAGES == 0 ) + IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; +#endif + + /* Process each descriptor that is not still in use by the DMA. */ + ulStatus = xDMARxDescriptors[ ulNextRxDescriptorToProcess ].STATUS; + if( ( ulStatus & RDES_OWN ) == 0 ) + { + /* Check packet for errors */ + if( ( ulStatus & nwRX_STATUS_ERROR_BITS ) != 0 ) + { + /* There is some reception error. */ + intCount[ 3 ]++; + /* Clear error bits. */ + ulStatus &= ~( ( uint32_t )nwRX_STATUS_ERROR_BITS ); + } + else + { + xResult++; + + eResult = ipCONSIDER_FRAME_FOR_PROCESSING( ( const uint8_t * const ) ( xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD ) ); + if( eResult == eProcessBuffer ) + { + if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) == 0 ) + { + ulPHYLinkStatus |= PHY_LINK_CONNECTED; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d (message received)\n", ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != 0 ) ); + } + + #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + if( uxGetNumberOfFreeNetworkBuffers() > uxMinimumBuffersRemaining ) + { + pxNewDescriptor = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE, xDescriptorWaitTime ); + } + else + { + /* Too risky to allocate a new Network Buffer. */ + pxNewDescriptor = NULL; + } + if( pxNewDescriptor != NULL ) + #else + if( uxGetNumberOfFreeNetworkBuffers() > uxMinimumBuffersRemaining ) + #endif /* ipconfigZERO_COPY_RX_DRIVER */ + { + #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + const uint8_t *pucBuffer; + #endif + + /* Get the actual length. */ + usLength = RDES_FLMSK( ulStatus ); + + #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + { + /* Replace the character buffer 'B1ADD'. */ + pucBuffer = ( const uint8_t * const ) ( xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD ); + xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD = ( uint32_t ) pxNewDescriptor->pucEthernetBuffer; + + /* 'B1ADD' contained the address of a 'pucEthernetBuffer' that + belongs to a Network Buffer. Find the original Network Buffer. */ + pxDescriptor = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); + /* This zero-copy driver makes sure that every 'xDMARxDescriptors' contains + a reference to a Network Buffer at any time. + In case it runs out of Network Buffers, a DMA buffer won't be replaced, + and the received messages is dropped. */ + configASSERT( pxDescriptor != NULL ); + } + #else + { + /* Create a buffer of exactly the required length. */ + pxDescriptor = pxGetNetworkBufferWithDescriptor( usLength, xDescriptorWaitTime ); + } + #endif /* ipconfigZERO_COPY_RX_DRIVER */ + + if( pxDescriptor != NULL ) + { + pxDescriptor->xDataLength = ( size_t ) usLength; + #if( ipconfigZERO_COPY_RX_DRIVER == 0 ) + { + /* Copy the data into the allocated buffer. */ + memcpy( ( void * ) pxDescriptor->pucEthernetBuffer, ( void * ) xDMARxDescriptors[ ulNextRxDescriptorToProcess ].B1ADD, usLength ); + } + #endif /* ipconfigZERO_COPY_RX_DRIVER */ + /* It is possible that more data was copied than + actually makes up the frame. If this is the case + adjust the length to remove any trailing bytes. */ + prvRemoveTrailingBytes( pxDescriptor ); + + /* Pass the data to the TCP/IP task for processing. */ + xRxEvent.pvData = ( void * ) pxDescriptor; + if( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime ) == pdFALSE ) + { + /* Could not send the descriptor into the TCP/IP + stack, it must be released. */ + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + else + { + iptraceNETWORK_INTERFACE_RECEIVE(); + + /* The data that was available at the top of this + loop has been sent, so is no longer available. */ + ulDataAvailable = pdFALSE; + } + } + } + } + else + { + /* The packet is discarded as uninteresting. */ + ulDataAvailable = pdFALSE; + } + /* Got here because received data was sent to the IP task or the + data contained an error and was discarded. Give the descriptor + back to the DMA. */ + xDMARxDescriptors[ ulNextRxDescriptorToProcess ].STATUS = ulStatus | RDES_OWN; + + /* Move onto the next descriptor. */ + ulNextRxDescriptorToProcess++; + if( ulNextRxDescriptorToProcess >= configNUM_RX_DESCRIPTORS ) + { + ulNextRxDescriptorToProcess = 0; + } + + ulStatus = xDMARxDescriptors[ ulNextRxDescriptorToProcess ].STATUS; + } /* if( ( ulStatus & nwRX_STATUS_ERROR_BITS ) != 0 ) */ + } /* if( ( ulStatus & RDES_OWN ) == 0 ) */ + + /* Restart receive polling. */ + LPC_ETHERNET->DMA_REC_POLL_DEMAND = 1; + + return xResult; +} +/*-----------------------------------------------------------*/ + +configPLACE_IN_SECTION_RAM +void NETWORK_IRQHandler( void ) +{ +BaseType_t xHigherPriorityTaskWoken = pdFALSE; +uint32_t ulDMAStatus; +const uint32_t ulRxInterruptMask = + DMA_ST_RI | /* Receive interrupt */ + DMA_ST_RU; /* Receive buffer unavailable */ +const uint32_t ulTxInterruptMask = + DMA_ST_TI | /* Transmit interrupt */ + DMA_ST_TPS; /* Transmit process stopped */ + + configASSERT( xRxHanderTask ); + + /* Get pending interrupts. */ + ulDMAStatus = LPC_ETHERNET->DMA_STAT; + + /* RX group interrupt(s). */ + if( ( ulDMAStatus & ulRxInterruptMask ) != 0x00 ) + { + /* Remember that an RX event has happened. */ + ulISREvents |= EMAC_IF_RX_EVENT; + vTaskNotifyGiveFromISR( xRxHanderTask, &xHigherPriorityTaskWoken ); + intCount[ 0 ]++; + } + + /* TX group interrupt(s). */ + if( ( ulDMAStatus & ulTxInterruptMask ) != 0x00 ) + { + /* Remember that a TX event has happened. */ + ulISREvents |= EMAC_IF_TX_EVENT; + vTaskNotifyGiveFromISR( xRxHanderTask, &xHigherPriorityTaskWoken ); + intCount[ 1 ]++; + } + + /* Test for 'Abnormal interrupt summary'. */ + if( ( ulDMAStatus & DMA_ST_AIE ) != 0x00 ) + { + /* The trace macro must be written such that it can be called from + an interrupt. */ + iptraceETHERNET_RX_EVENT_LOST(); + } + + /* Clear pending interrupts */ + LPC_ETHERNET->DMA_STAT = ulDMAStatus; + + /* Context switch needed? */ + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvSetLinkSpeed( void ) +{ +BaseType_t xReturn = pdFAIL; +TickType_t xTimeOnEntering; +uint32_t ulPhyStatus; +const TickType_t xAutoNegotiateDelay = pdMS_TO_TICKS( 5000UL ); + + /* Ensure polling does not starve lower priority tasks by temporarily + setting the priority of this task to that of the idle task. */ + vTaskPrioritySet( NULL, tskIDLE_PRIORITY ); + + xTimeOnEntering = xTaskGetTickCount(); + do + { + ulPhyStatus = lpcPHYStsPoll(); + if( ( ulPhyStatus & PHY_LINK_CONNECTED ) != 0x00 ) + { + /* Set interface speed and duplex. */ + if( ( ulPhyStatus & PHY_LINK_SPEED100 ) != 0x00 ) + { + Chip_ENET_SetSpeed( LPC_ETHERNET, 1 ); + } + else + { + Chip_ENET_SetSpeed( LPC_ETHERNET, 0 ); + } + + if( ( ulPhyStatus & PHY_LINK_FULLDUPLX ) != 0x00 ) + { + Chip_ENET_SetDuplex( LPC_ETHERNET, true ); + } + else + { + Chip_ENET_SetDuplex( LPC_ETHERNET, false ); + } + + xReturn = pdPASS; + break; + } + } while( ( xTaskGetTickCount() - xTimeOnEntering ) < xAutoNegotiateDelay ); + + /* Reset the priority of this task back to its original value. */ + vTaskPrioritySet( NULL, ipconfigIP_TASK_PRIORITY ); + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static uint32_t prvGenerateCRC32( const uint8_t *ucAddress ) +{ +unsigned int j; +const uint32_t Polynomial = 0xEDB88320; +uint32_t crc = ~0ul; +const uint8_t *pucCurrent = ( const uint8_t * ) ucAddress; +const uint8_t *pucLast = pucCurrent + 6; + + /* Calculate normal CRC32 */ + while( pucCurrent < pucLast ) + { + crc ^= *( pucCurrent++ ); + for( j = 0; j < 8; j++ ) + { + if( ( crc & 1 ) != 0 ) + { + crc = (crc >> 1) ^ Polynomial; + } + else + { + crc >>= 1; + } + } + } + return ~crc; +} +/*-----------------------------------------------------------*/ + +static uint32_t prvGetHashIndex( const uint8_t *ucAddress ) +{ +uint32_t ulCrc = prvGenerateCRC32( ucAddress ); +uint32_t ulIndex = 0ul; +BaseType_t xCount = 6; + + /* Take the lowest 6 bits of the CRC32 and reverse them */ + while( xCount-- ) + { + ulIndex <<= 1; + ulIndex |= ( ulCrc & 1 ); + ulCrc >>= 1; + } + + /* This is the has value of 'ucAddress' */ + return ulIndex; +} +/*-----------------------------------------------------------*/ + +static void prvAddMACAddress( const uint8_t* ucMacAddress ) +{ +BaseType_t xIndex; + + xIndex = prvGetHashIndex( ucMacAddress ); + if( xIndex >= 32 ) + { + LPC_ETHERNET->MAC_HASHTABLE_HIGH |= ( 1u << ( xIndex - 32 ) ); + } + else + { + LPC_ETHERNET->MAC_HASHTABLE_LOW |= ( 1u << xIndex ); + } +} +/*-----------------------------------------------------------*/ + +configPLACE_IN_SECTION_RAM +static void prvEMACHandlerTask( void *pvParameters ) +{ +TimeOut_t xPhyTime; +TickType_t xPhyRemTime; +UBaseType_t uxLastMinBufferCount = 0; +UBaseType_t uxCurrentCount; +BaseType_t xResult = 0; +uint32_t ulStatus; +const TickType_t xBlockTime = pdMS_TO_TICKS( 5000ul ); + + /* Remove compiler warning about unused parameter. */ + ( void ) pvParameters; + + /* A possibility to set some additional task properties. */ + iptraceEMAC_TASK_STARTING(); + + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + + for( ;; ) + { + uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); + if( uxLastMinBufferCount != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinBufferCount = uxCurrentCount; + FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", + uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); + } + + #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + { + static UBaseType_t uxLastMinQueueSpace = 0; + + uxCurrentCount = uxGetMinimumIPQueueSpace(); + if( uxLastMinQueueSpace != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinQueueSpace = uxCurrentCount; + FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); + } + } + #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ + + ulTaskNotifyTake( pdTRUE, xBlockTime ); + + xResult = ( BaseType_t ) 0; + + if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) + { + /* Code to release TX buffers if zero-copy is used. */ + ulISREvents &= ~EMAC_IF_TX_EVENT; + { + /* Check if DMA packets have been delivered. */ + vClearTXBuffers(); + } + } + + if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) + { + ulISREvents &= ~EMAC_IF_RX_EVENT; + + xResult = prvNetworkInterfaceInput(); + if( xResult > 0 ) + { + while( prvNetworkInterfaceInput() > 0 ) + { + } + } + } + + if( xResult > 0 ) + { + /* A packet was received. No need to check for the PHY status now, + but set a timer to check it later on. */ + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + xResult = 0; + } + else if( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) + { + ulStatus = lpcPHYStsPoll(); + + if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != ( ulStatus & PHY_LINK_CONNECTED ) ) + { + ulPHYLinkStatus = ulStatus; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d (polled PHY)\n", ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != 0 ) ); + } + + vTaskSetTimeOutState( &xPhyTime ); + if( ( ulPHYLinkStatus & PHY_LINK_CONNECTED ) != 0 ) + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + } + else + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + } + } + } +} +/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/ReadMe.txt b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/ReadMe.txt index 86a7f9121..cde8e0e3d 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/ReadMe.txt +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC18xx/ReadMe.txt @@ -1,3 +1,3 @@ -NetworkInterface.c: -Requires NXP's LPCOpen library and was developed on an LPC1830 and LPC1835 Xplorer +NetworkInterface.c: +Requires NXP's LPCOpen library and was developed on an LPC1830 and LPC1835 Xplorer boards from NGX. \ No newline at end of file diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/NetworkInterface.c index e759141cc..6b926c811 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/NetworkInterface.c @@ -1,331 +1,331 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "list.h" -#include "queue.h" -#include "semphr.h" -#include "task.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - - -#include "m480_eth.h" - -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet -driver will filter incoming packets and only pass the stack those packets it -considers need processing. */ -#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) -#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#else -#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#endif - -/* Default the size of the stack used by the EMAC deferred handler task to twice -the size of the stack used by the idle task - but allow this to be overridden in -FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ -#ifndef configEMAC_TASK_STACK_SIZE - #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) -#endif - - -static SemaphoreHandle_t xTXMutex = NULL; - -/* The handle of the task that processes Rx packets. The handle is required so -the task can be notified when new packets arrive. */ -static TaskHandle_t xRxHanderTask = NULL; -static TimerHandle_t xPhyHandlerTask = NULL; -/* - * A task that processes received frames. - */ -static void prvEMACHandlerTask( void *pvParameters ); -static void prvPhyTmrCallback( TimerHandle_t xTimer ); - -/* The size of each buffer when BufferAllocation_1 is used: -http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html */ - -#define niBUFFER_1_PACKET_SIZE 1536 -#ifdef __ICCARM__ -#pragma data_alignment=4 -static uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] -#else -static uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] __attribute__ ((aligned(4))); -#endif - -BaseType_t xNetworkInterfaceInitialise( void ) -{ - uint8_t hwaddr[6]; - BaseType_t xReturn = pdPASS; - - /* Init ETH */ - numaker_mac_address(hwaddr); - FreeRTOS_UpdateMACAddress(hwaddr); - FreeRTOS_printf( ("mac address %02x-%02x-%02x-%02x-%02x-%02x \r\n", hwaddr[0], hwaddr[1],hwaddr[2],hwaddr[3],hwaddr[4],hwaddr[5]) ); - /* Enable clock & set EMAC configuration */ - /* Enable MAC and DMA transmission and reception */ - if( numaker_eth_init(hwaddr) < 0) - { - xReturn = pdFAIL; - } else { - xReturn = pdPASS; - /* Guard against the task being created more than once and the - descriptors being initialized more than once. */ - /* Timer task to monitor PHY Link status */ - if( xPhyHandlerTask == NULL ) - { - xPhyHandlerTask = xTimerCreate( "TimerPhy", pdMS_TO_TICKS( 1000 ), pdTRUE, 0, prvPhyTmrCallback ); - configASSERT(xPhyHandlerTask); - xReturn = xTimerStart( xPhyHandlerTask, 0 ) ; - configASSERT( xReturn ); - } - /* Rx task */ - if( xRxHanderTask == NULL ) - { - xReturn = xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xRxHanderTask ); - configASSERT( xReturn ); - } - - if( xTXMutex == NULL ) - { - xTXMutex = xSemaphoreCreateMutex(); - configASSERT( xTXMutex ); - } - } - - NVIC_SetPriority( EMAC_RX_IRQn, configMAC_INTERRUPT_PRIORITY ); - NVIC_SetPriority( EMAC_TX_IRQn, configMAC_INTERRUPT_PRIORITY ); - - numaker_eth_enable_interrupts(); - - FreeRTOS_printf( ("ETH-RX priority:%d\n",NVIC_GetPriority( EMAC_RX_IRQn)) ); - - return xReturn; -} - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t xReleaseAfterSend ) -{ - uint8_t *buffer=NULL; -// FreeRTOS_printf(("<-- dataLength=%d\n",pxDescriptor->xDataLength)); - if( pxDescriptor->xDataLength >= PACKET_BUFFER_SIZE ) - { - FreeRTOS_printf(("TX buffer length %d over %d\n", pxDescriptor->xDataLength, PACKET_BUFFER_SIZE)); - return pdFALSE; - } - - buffer = numaker_eth_get_tx_buf(); - if( buffer == NULL ) - { - NU_DEBUGF(("Eth TX slots are busy\n")); - return pdFALSE; - } - - /* Get exclusive access */ - xSemaphoreTake(xTXMutex, portMAX_DELAY); - NU_DEBUGF(("%s ... buffer=0x%x\r\n",__FUNCTION__, buffer)); - //SendData: pt = pxDescriptor->pucBuffer, length = pxDescriptor->xDataLength - memcpy(buffer, pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength); - numaker_eth_trigger_tx(pxDescriptor->xDataLength, NULL); - /* Call the standard trace macro to log the send event. */ - iptraceNETWORK_INTERFACE_TRANSMIT(); - - if( xReleaseAfterSend != pdFALSE ) - { - /* It is assumed SendData() copies the data out of the FreeRTOS+TCP Ethernet - buffer. The Ethernet buffer is therefore no longer needed, and must be - freed for re-use. */ - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - - xSemaphoreGive(xTXMutex); - - return pdTRUE; -} - - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ - - uint8_t *ucRAMBuffer = ucNetworkPackets; - uint32_t ul; - - for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) - { - pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; - *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); - ucRAMBuffer += niBUFFER_1_PACKET_SIZE; - } -} - - -BaseType_t xGetPhyLinkStatus( void ) -{ - BaseType_t xReturn; - - if( numaker_eth_link_ok() ) - { - xReturn = pdPASS; - } - else - { - xReturn = pdFAIL; - } - - return xReturn; -} - -static void prvPhyTmrCallback( TimerHandle_t xTimer ) -{ - IPStackEvent_t xRxEvent; - static BaseType_t lastLink = pdFAIL; - BaseType_t currLink = xGetPhyLinkStatus(); - if( currLink != lastLink ) - { - FreeRTOS_printf(("PHY Link %s\n", (currLink) ? "Up" : "Down")); - if( !currLink ) - { - xRxEvent.eEventType = eNetworkDownEvent; - xSendEventStructToIPTask( &xRxEvent, 0 ); - } - lastLink = currLink; - } - -} - - -static void prvEMACHandlerTask( void *pvParameters ) -{ - TimeOut_t xPhyTime; - TickType_t xPhyRemTime; - UBaseType_t uxLastMinBufferCount = 0; - UBaseType_t uxCurrentCount; - BaseType_t xResult = 0; - uint32_t ulStatus; - uint16_t dataLength = 0; - uint8_t *buffer = NULL; - NetworkBufferDescriptor_t *pxBufferDescriptor = NULL; - IPStackEvent_t xRxEvent; - const TickType_t xBlockTime = pdMS_TO_TICKS( 5000ul ); - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - /* A possibility to set some additional task properties. */ - - for( ;; ) - { - uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); - if( uxLastMinBufferCount != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); - } - - /* No events to process now, wait for the next. */ - ulTaskNotifyTake( pdFALSE, portMAX_DELAY ); - while(1) - { - /* get received frame */ - if ( numaker_eth_get_rx_buf(&dataLength, &buffer) != 0) { - /* The event was lost because a network buffer was not available. - Call the standard trace macro to log the occurrence. */ - iptraceETHERNET_RX_EVENT_LOST(); - break; - } - - /* Allocate a network buffer descriptor that points to a buffer - large enough to hold the received frame. As this is the simple - rather than efficient example the received data will just be copied - into this buffer. */ - - pxBufferDescriptor = pxGetNetworkBufferWithDescriptor( PACKET_BUFFER_SIZE, 0 ); - - if( pxBufferDescriptor != NULL ) - { - memcpy( pxBufferDescriptor->pucEthernetBuffer, buffer, dataLength ); -// FreeRTOS_printf(("--> dataLength=%d\n",dataLength)); - pxBufferDescriptor->xDataLength = dataLength; - } else { - numaker_eth_rx_next(); - iptraceETHERNET_RX_EVENT_LOST(); - break; - } - /* The event about to be sent to the TCP/IP is an Rx event. */ - xRxEvent.eEventType = eNetworkRxEvent; - - /* pvData is used to point to the network buffer descriptor that - now references the received data. */ - xRxEvent.pvData = ( void * ) pxBufferDescriptor; - - /* Send the data to the TCP/IP stack. */ - if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) - { - /* The buffer could not be sent to the IP task so the buffer - must be released. */ - vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); - - /* Make a call to the standard trace macro to log the - occurrence. */ - - iptraceETHERNET_RX_EVENT_LOST(); - } else - { - /* The message was successfully sent to the TCP/IP stack. - Call the standard trace macro to log the occurrence. */ - iptraceNETWORK_INTERFACE_RECEIVE(); - } - numaker_eth_rx_next(); - } - numaker_eth_trigger_rx(); - } -} - -void xNetworkCallback(char event) -{ - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - switch (event) - { - case 'R': //For RX event - /* Wakeup the prvEMACHandlerTask. */ - if( xRxHanderTask != NULL ) - { - vTaskNotifyGiveFromISR( xRxHanderTask, &xHigherPriorityTaskWoken ); - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - } - break; - case 'T': //For TX event - // ack of tx done, no-op in this stage - break; - default: - break; - } -} +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "list.h" +#include "queue.h" +#include "semphr.h" +#include "task.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + + +#include "m480_eth.h" + +/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet +driver will filter incoming packets and only pass the stack those packets it +considers need processing. */ +#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) +#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +#else +#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +#endif + +/* Default the size of the stack used by the EMAC deferred handler task to twice +the size of the stack used by the idle task - but allow this to be overridden in +FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ +#ifndef configEMAC_TASK_STACK_SIZE + #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) +#endif + + +static SemaphoreHandle_t xTXMutex = NULL; + +/* The handle of the task that processes Rx packets. The handle is required so +the task can be notified when new packets arrive. */ +static TaskHandle_t xRxHanderTask = NULL; +static TimerHandle_t xPhyHandlerTask = NULL; +/* + * A task that processes received frames. + */ +static void prvEMACHandlerTask( void *pvParameters ); +static void prvPhyTmrCallback( TimerHandle_t xTimer ); + +/* The size of each buffer when BufferAllocation_1 is used: +http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html */ + +#define niBUFFER_1_PACKET_SIZE 1536 +#ifdef __ICCARM__ +#pragma data_alignment=4 +static uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] +#else +static uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] __attribute__ ((aligned(4))); +#endif + +BaseType_t xNetworkInterfaceInitialise( void ) +{ + uint8_t hwaddr[6]; + BaseType_t xReturn = pdPASS; + + /* Init ETH */ + numaker_mac_address(hwaddr); + FreeRTOS_UpdateMACAddress(hwaddr); + FreeRTOS_printf( ("mac address %02x-%02x-%02x-%02x-%02x-%02x \r\n", hwaddr[0], hwaddr[1],hwaddr[2],hwaddr[3],hwaddr[4],hwaddr[5]) ); + /* Enable clock & set EMAC configuration */ + /* Enable MAC and DMA transmission and reception */ + if( numaker_eth_init(hwaddr) < 0) + { + xReturn = pdFAIL; + } else { + xReturn = pdPASS; + /* Guard against the task being created more than once and the + descriptors being initialized more than once. */ + /* Timer task to monitor PHY Link status */ + if( xPhyHandlerTask == NULL ) + { + xPhyHandlerTask = xTimerCreate( "TimerPhy", pdMS_TO_TICKS( 1000 ), pdTRUE, 0, prvPhyTmrCallback ); + configASSERT(xPhyHandlerTask); + xReturn = xTimerStart( xPhyHandlerTask, 0 ) ; + configASSERT( xReturn ); + } + /* Rx task */ + if( xRxHanderTask == NULL ) + { + xReturn = xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xRxHanderTask ); + configASSERT( xReturn ); + } + + if( xTXMutex == NULL ) + { + xTXMutex = xSemaphoreCreateMutex(); + configASSERT( xTXMutex ); + } + } + + NVIC_SetPriority( EMAC_RX_IRQn, configMAC_INTERRUPT_PRIORITY ); + NVIC_SetPriority( EMAC_TX_IRQn, configMAC_INTERRUPT_PRIORITY ); + + numaker_eth_enable_interrupts(); + + FreeRTOS_printf( ("ETH-RX priority:%d\n",NVIC_GetPriority( EMAC_RX_IRQn)) ); + + return xReturn; +} + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t xReleaseAfterSend ) +{ + uint8_t *buffer=NULL; +// FreeRTOS_printf(("<-- dataLength=%d\n",pxDescriptor->xDataLength)); + if( pxDescriptor->xDataLength >= PACKET_BUFFER_SIZE ) + { + FreeRTOS_printf(("TX buffer length %d over %d\n", pxDescriptor->xDataLength, PACKET_BUFFER_SIZE)); + return pdFALSE; + } + + buffer = numaker_eth_get_tx_buf(); + if( buffer == NULL ) + { + NU_DEBUGF(("Eth TX slots are busy\n")); + return pdFALSE; + } + + /* Get exclusive access */ + xSemaphoreTake(xTXMutex, portMAX_DELAY); + NU_DEBUGF(("%s ... buffer=0x%x\r\n",__FUNCTION__, buffer)); + //SendData: pt = pxDescriptor->pucBuffer, length = pxDescriptor->xDataLength + memcpy(buffer, pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength); + numaker_eth_trigger_tx(pxDescriptor->xDataLength, NULL); + /* Call the standard trace macro to log the send event. */ + iptraceNETWORK_INTERFACE_TRANSMIT(); + + if( xReleaseAfterSend != pdFALSE ) + { + /* It is assumed SendData() copies the data out of the FreeRTOS+TCP Ethernet + buffer. The Ethernet buffer is therefore no longer needed, and must be + freed for re-use. */ + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + + xSemaphoreGive(xTXMutex); + + return pdTRUE; +} + + +void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +{ + + uint8_t *ucRAMBuffer = ucNetworkPackets; + uint32_t ul; + + for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) + { + pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; + *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); + ucRAMBuffer += niBUFFER_1_PACKET_SIZE; + } +} + + +BaseType_t xGetPhyLinkStatus( void ) +{ + BaseType_t xReturn; + + if( numaker_eth_link_ok() ) + { + xReturn = pdPASS; + } + else + { + xReturn = pdFAIL; + } + + return xReturn; +} + +static void prvPhyTmrCallback( TimerHandle_t xTimer ) +{ + IPStackEvent_t xRxEvent; + static BaseType_t lastLink = pdFAIL; + BaseType_t currLink = xGetPhyLinkStatus(); + if( currLink != lastLink ) + { + FreeRTOS_printf(("PHY Link %s\n", (currLink) ? "Up" : "Down")); + if( !currLink ) + { + xRxEvent.eEventType = eNetworkDownEvent; + xSendEventStructToIPTask( &xRxEvent, 0 ); + } + lastLink = currLink; + } + +} + + +static void prvEMACHandlerTask( void *pvParameters ) +{ + TimeOut_t xPhyTime; + TickType_t xPhyRemTime; + UBaseType_t uxLastMinBufferCount = 0; + UBaseType_t uxCurrentCount; + BaseType_t xResult = 0; + uint32_t ulStatus; + uint16_t dataLength = 0; + uint8_t *buffer = NULL; + NetworkBufferDescriptor_t *pxBufferDescriptor = NULL; + IPStackEvent_t xRxEvent; + const TickType_t xBlockTime = pdMS_TO_TICKS( 5000ul ); + + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParameters; + /* A possibility to set some additional task properties. */ + + for( ;; ) + { + uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); + if( uxLastMinBufferCount != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinBufferCount = uxCurrentCount; + FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", + uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); + } + + /* No events to process now, wait for the next. */ + ulTaskNotifyTake( pdFALSE, portMAX_DELAY ); + while(1) + { + /* get received frame */ + if ( numaker_eth_get_rx_buf(&dataLength, &buffer) != 0) { + /* The event was lost because a network buffer was not available. + Call the standard trace macro to log the occurrence. */ + iptraceETHERNET_RX_EVENT_LOST(); + break; + } + + /* Allocate a network buffer descriptor that points to a buffer + large enough to hold the received frame. As this is the simple + rather than efficient example the received data will just be copied + into this buffer. */ + + pxBufferDescriptor = pxGetNetworkBufferWithDescriptor( PACKET_BUFFER_SIZE, 0 ); + + if( pxBufferDescriptor != NULL ) + { + memcpy( pxBufferDescriptor->pucEthernetBuffer, buffer, dataLength ); +// FreeRTOS_printf(("--> dataLength=%d\n",dataLength)); + pxBufferDescriptor->xDataLength = dataLength; + } else { + numaker_eth_rx_next(); + iptraceETHERNET_RX_EVENT_LOST(); + break; + } + /* The event about to be sent to the TCP/IP is an Rx event. */ + xRxEvent.eEventType = eNetworkRxEvent; + + /* pvData is used to point to the network buffer descriptor that + now references the received data. */ + xRxEvent.pvData = ( void * ) pxBufferDescriptor; + + /* Send the data to the TCP/IP stack. */ + if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) + { + /* The buffer could not be sent to the IP task so the buffer + must be released. */ + vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); + + /* Make a call to the standard trace macro to log the + occurrence. */ + + iptraceETHERNET_RX_EVENT_LOST(); + } else + { + /* The message was successfully sent to the TCP/IP stack. + Call the standard trace macro to log the occurrence. */ + iptraceNETWORK_INTERFACE_RECEIVE(); + } + numaker_eth_rx_next(); + } + numaker_eth_trigger_rx(); + } +} + +void xNetworkCallback(char event) +{ + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + switch (event) + { + case 'R': //For RX event + /* Wakeup the prvEMACHandlerTask. */ + if( xRxHanderTask != NULL ) + { + vTaskNotifyGiveFromISR( xRxHanderTask, &xHigherPriorityTaskWoken ); + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); + } + break; + case 'T': //For TX event + // ack of tx done, no-op in this stage + break; + default: + break; + } +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.c index 2d45661d0..cf862da3e 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.c @@ -1,448 +1,448 @@ -/**************************************************************************//** - * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*****************************************************************************/ -#include "FreeRTOS.h" -#include "list.h" -#include "FreeRTOS_IP.h" - -#include "m480_eth.h" - -#define ETH_TRIGGER_RX() do{EMAC->RXST = 0;}while(0) -#define ETH_TRIGGER_TX() do{EMAC->TXST = 0;}while(0) -#define ETH_ENABLE_TX() do{EMAC->CTL |= EMAC_CTL_TXON;}while(0) -#define ETH_ENABLE_RX() do{EMAC->CTL |= EMAC_CTL_RXON;}while(0) -#define ETH_DISABLE_TX() do{EMAC->CTL &= ~EMAC_CTL_TXON;}while(0) -#define ETH_DISABLE_RX() do{EMAC->CTL &= ~EMAC_CTL_RXON;}while(0) - - -struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); -struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); -#ifdef __ICCARM__ -#pragma data_alignment=4 -struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM]; -struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM]; -uint8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE]; -uint8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE]; -#else -struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); -struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); -uint8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] __attribute__ ((aligned(4))); -uint8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] __attribute__ ((aligned(4))); -#endif -struct eth_descriptor volatile *cur_tx_desc_ptr, *cur_rx_desc_ptr, *fin_tx_desc_ptr; - - -// PTP source clock is 84MHz (Real chip using PLL). Each tick is 11.90ns -// Assume we want to set each tick to 100ns. -// Increase register = (100 * 2^31) / (10^9) = 214.71 =~ 215 = 0xD7 -// Addend register = 2^32 * tick_freq / (84MHz), where tick_freq = (2^31 / 215) MHz -// From above equation, addend register = 2^63 / (84M * 215) ~= 510707200 = 0x1E70C600 - - - -static void mdio_write(uint8_t addr, uint8_t reg, uint16_t val) -{ - - EMAC->MIIMDAT = val; - EMAC->MIIMCTL = (addr << EMAC_MIIMCTL_PHYADDR_Pos) | reg | EMAC_MIIMCTL_BUSY_Msk | EMAC_MIIMCTL_WRITE_Msk | EMAC_MIIMCTL_MDCON_Msk; - - while (EMAC->MIIMCTL & EMAC_MIIMCTL_BUSY_Msk); - -} - - -static uint16_t mdio_read(uint8_t addr, uint8_t reg) -{ - EMAC->MIIMCTL = (addr << EMAC_MIIMCTL_PHYADDR_Pos) | reg | EMAC_MIIMCTL_BUSY_Msk | EMAC_MIIMCTL_MDCON_Msk; - while (EMAC->MIIMCTL & EMAC_MIIMCTL_BUSY_Msk); - - return(EMAC->MIIMDAT); -} - -static int reset_phy(void) -{ - - uint16_t reg; - uint32_t delayCnt; - - - mdio_write(CONFIG_PHY_ADDR, MII_BMCR, BMCR_RESET); - - delayCnt = 2000; - while(delayCnt-- > 0) { - if((mdio_read(CONFIG_PHY_ADDR, MII_BMCR) & BMCR_RESET) == 0) - break; - - } - - if(delayCnt == 0) { - NU_DEBUGF(("Reset phy failed\n")); - return(-1); - } - - mdio_write(CONFIG_PHY_ADDR, MII_ADVERTISE, ADVERTISE_CSMA | - ADVERTISE_10HALF | - ADVERTISE_10FULL | - ADVERTISE_100HALF | - ADVERTISE_100FULL); - - reg = mdio_read(CONFIG_PHY_ADDR, MII_BMCR); - mdio_write(CONFIG_PHY_ADDR, MII_BMCR, reg | BMCR_ANRESTART); - - delayCnt = 200000; - while(delayCnt-- > 0) { - if((mdio_read(CONFIG_PHY_ADDR, MII_BMSR) & (BMSR_ANEGCOMPLETE | BMSR_LSTATUS)) - == (BMSR_ANEGCOMPLETE | BMSR_LSTATUS)) - break; - } - - if(delayCnt == 0) { - NU_DEBUGF(("AN failed. Set to 100 FULL\n")); - EMAC->CTL |= (EMAC_CTL_OPMODE_Msk | EMAC_CTL_FUDUP_Msk); - return(-1); - } else { - reg = mdio_read(CONFIG_PHY_ADDR, MII_LPA); - - if(reg & ADVERTISE_100FULL) { - NU_DEBUGF(("100 full\n")); - EMAC->CTL |= (EMAC_CTL_OPMODE_Msk | EMAC_CTL_FUDUP_Msk); - } else if(reg & ADVERTISE_100HALF) { - NU_DEBUGF(("100 half\n")); - EMAC->CTL = (EMAC->CTL & ~EMAC_CTL_FUDUP_Msk) | EMAC_CTL_OPMODE_Msk; - } else if(reg & ADVERTISE_10FULL) { - NU_DEBUGF(("10 full\n")); - EMAC->CTL = (EMAC->CTL & ~EMAC_CTL_OPMODE_Msk) | EMAC_CTL_FUDUP_Msk; - } else { - NU_DEBUGF(("10 half\n")); - EMAC->CTL &= ~(EMAC_CTL_OPMODE_Msk | EMAC_CTL_FUDUP_Msk); - } - } - FreeRTOS_printf(("PHY ID 1:0x%x\r\n", mdio_read(CONFIG_PHY_ADDR, MII_PHYSID1))); - FreeRTOS_printf(("PHY ID 2:0x%x\r\n", mdio_read(CONFIG_PHY_ADDR, MII_PHYSID2))); - - return(0); -} - - -static void init_tx_desc(void) -{ - uint32_t i; - - - cur_tx_desc_ptr = fin_tx_desc_ptr = &tx_desc[0]; - - for(i = 0; i < TX_DESCRIPTOR_NUM; i++) { - tx_desc[i].status1 = TXFD_PADEN | TXFD_CRCAPP | TXFD_INTEN; - tx_desc[i].buf = &tx_buf[i][0]; - tx_desc[i].status2 = 0; - tx_desc[i].next = &tx_desc[(i + 1) % TX_DESCRIPTOR_NUM]; - - } - EMAC->TXDSA = (unsigned int)&tx_desc[0]; - return; -} - -static void init_rx_desc(void) -{ - uint32_t i; - - - cur_rx_desc_ptr = &rx_desc[0]; - - for(i = 0; i < RX_DESCRIPTOR_NUM; i++) { - rx_desc[i].status1 = OWNERSHIP_EMAC; - rx_desc[i].buf = &rx_buf[i][0]; - rx_desc[i].status2 = 0; - rx_desc[i].next = &rx_desc[(i + 1) % TX_DESCRIPTOR_NUM]; - } - EMAC->RXDSA = (unsigned int)&rx_desc[0]; - return; -} - -void numaker_set_mac_addr(uint8_t *addr) -{ - - EMAC->CAM0M = (addr[0] << 24) | - (addr[1] << 16) | - (addr[2] << 8) | - addr[3]; - - EMAC->CAM0L = (addr[4] << 24) | - (addr[5] << 16); - - -} - -static void __eth_clk_pin_init() -{ - /* Unlock protected registers */ - SYS_UnlockReg(); - - /* Enable IP clock */ - CLK_EnableModuleClock(EMAC_MODULE); - - // Configure MDC clock rate to HCLK / (127 + 1) = 1.25 MHz if system is running at 160 MH - CLK_SetModuleClock(EMAC_MODULE, 0, CLK_CLKDIV3_EMAC(127)); - - /* Update System Core Clock */ - SystemCoreClockUpdate(); - - /*---------------------------------------------------------------------------------------------------------*/ - /* Init I/O Multi-function */ - /*---------------------------------------------------------------------------------------------------------*/ - // Configure RMII pins - SYS->GPA_MFPL &= ~(SYS_GPA_MFPL_PA6MFP_Msk | SYS_GPA_MFPL_PA7MFP_Msk); - SYS->GPA_MFPL |= SYS_GPA_MFPL_PA6MFP_EMAC_RMII_RXERR | SYS_GPA_MFPL_PA7MFP_EMAC_RMII_CRSDV; - SYS->GPC_MFPL &= ~(SYS_GPC_MFPL_PC6MFP_Msk | SYS_GPC_MFPL_PC7MFP_Msk); - SYS->GPC_MFPL |= SYS_GPC_MFPL_PC6MFP_EMAC_RMII_RXD1 | SYS_GPC_MFPL_PC7MFP_EMAC_RMII_RXD0; - SYS->GPC_MFPH &= ~SYS_GPC_MFPH_PC8MFP_Msk; - SYS->GPC_MFPH |= SYS_GPC_MFPH_PC8MFP_EMAC_RMII_REFCLK; - SYS->GPE_MFPH &= ~(SYS_GPE_MFPH_PE8MFP_Msk | SYS_GPE_MFPH_PE9MFP_Msk | SYS_GPE_MFPH_PE10MFP_Msk | - SYS_GPE_MFPH_PE11MFP_Msk | SYS_GPE_MFPH_PE12MFP_Msk); - SYS->GPE_MFPH |= SYS_GPE_MFPH_PE8MFP_EMAC_RMII_MDC | - SYS_GPE_MFPH_PE9MFP_EMAC_RMII_MDIO | - SYS_GPE_MFPH_PE10MFP_EMAC_RMII_TXD0 | - SYS_GPE_MFPH_PE11MFP_EMAC_RMII_TXD1 | - SYS_GPE_MFPH_PE12MFP_EMAC_RMII_TXEN; - - // Enable high slew rate on all RMII TX output pins - PE->SLEWCTL = (GPIO_SLEWCTL_HIGH << GPIO_SLEWCTL_HSREN10_Pos) | - (GPIO_SLEWCTL_HIGH << GPIO_SLEWCTL_HSREN11_Pos) | - (GPIO_SLEWCTL_HIGH << GPIO_SLEWCTL_HSREN12_Pos); - - - /* Lock protected registers */ - SYS_LockReg(); - - -} - -int numaker_eth_init(uint8_t *mac_addr) -{ - int ret = 0; - // init CLK & pins - __eth_clk_pin_init(); - - // Reset MAC - EMAC->CTL = EMAC_CTL_RST_Msk; - while(EMAC->CTL & EMAC_CTL_RST_Msk) {} - - init_tx_desc(); - init_rx_desc(); - - numaker_set_mac_addr(mac_addr); // need to reconfigure hardware address 'cos we just RESET emc... - - - /* Configure the MAC interrupt enable register. */ - EMAC->INTEN = EMAC_INTEN_RXIEN_Msk | - EMAC_INTEN_TXIEN_Msk | - EMAC_INTEN_RXGDIEN_Msk | - EMAC_INTEN_TXCPIEN_Msk | - EMAC_INTEN_RXBEIEN_Msk | - EMAC_INTEN_TXBEIEN_Msk | - EMAC_INTEN_RDUIEN_Msk | - EMAC_INTEN_TSALMIEN_Msk | - EMAC_INTEN_WOLIEN_Msk; - - /* Configure the MAC control register. */ - EMAC->CTL = EMAC_CTL_STRIPCRC_Msk | EMAC_CTL_RMIIEN_Msk; - - /* Accept packets for us and all broadcast and multicast packets */ - EMAC->CAMCTL = EMAC_CAMCTL_CMPEN_Msk | - EMAC_CAMCTL_AMP_Msk | - EMAC_CAMCTL_ABP_Msk; - EMAC->CAMEN = 1; // Enable CAM entry 0 - - ret= reset_phy(); - - EMAC_ENABLE_RX(); - EMAC_ENABLE_TX(); - return ret; -} - - - -void ETH_halt(void) -{ - - EMAC->CTL &= ~(EMAC_CTL_RXON_Msk | EMAC_CTL_TXON_Msk); -} - -unsigned int m_status; - -void EMAC_RX_IRQHandler(void) -{ -// NU_DEBUGF(("%s ... \r\n", __FUNCTION__)); - m_status = EMAC->INTSTS & 0xFFFF; - EMAC->INTSTS = m_status; - if (m_status & EMAC_INTSTS_RXBEIF_Msk) { - // Shouldn't goes here, unless descriptor corrupted - NU_DEBUGF(("RX descriptor corrupted \r\n")); - //return; - } - // FIX ME: for rx-event, to ack rx_isr into event queue - xNetworkCallback('R'); -} - - -void numaker_eth_trigger_rx(void) -{ - ETH_TRIGGER_RX(); -} - -int numaker_eth_get_rx_buf(uint16_t *len, uint8_t **buf) -{ - unsigned int cur_entry, status; - - cur_entry = EMAC->CRXDSA; - if ((cur_entry == (uint32_t)cur_rx_desc_ptr) && (!(m_status & EMAC_INTSTS_RDUIF_Msk))) // cur_entry may equal to cur_rx_desc_ptr if RDU occures - return -1; - status = cur_rx_desc_ptr->status1; - - if(status & OWNERSHIP_EMAC) - return -1; - - if (status & RXFD_RXGD) { - *buf = cur_rx_desc_ptr->buf; - *len = status & 0xFFFF; - } - return 0; -} - -void numaker_eth_rx_next(void) -{ - cur_rx_desc_ptr->status1 = OWNERSHIP_EMAC; - cur_rx_desc_ptr = cur_rx_desc_ptr->next; -} - -void EMAC_TX_IRQHandler(void) -{ - unsigned int cur_entry, status; - - status = EMAC->INTSTS & 0xFFFF0000; - EMAC->INTSTS = status; - if(status & EMAC_INTSTS_TXBEIF_Msk) { - // Shouldn't goes here, unless descriptor corrupted - return; - } - - cur_entry = EMAC->CTXDSA; - - while (cur_entry != (uint32_t)fin_tx_desc_ptr) { - - fin_tx_desc_ptr = fin_tx_desc_ptr->next; - } - // FIX ME: for tx-event, no-op at this stage - xNetworkCallback('T'); -} - -uint8_t *numaker_eth_get_tx_buf(void) -{ - if(cur_tx_desc_ptr->status1 & OWNERSHIP_EMAC) - return(NULL); - else - return(cur_tx_desc_ptr->buf); -} - -void numaker_eth_trigger_tx(uint16_t length, void *p) -{ - struct eth_descriptor volatile *desc; - cur_tx_desc_ptr->status2 = (unsigned int)length; - desc = cur_tx_desc_ptr->next; // in case TX is transmitting and overwrite next pointer before we can update cur_tx_desc_ptr - cur_tx_desc_ptr->status1 |= OWNERSHIP_EMAC; - cur_tx_desc_ptr = desc; - - ETH_TRIGGER_TX(); - -} - -int numaker_eth_link_ok(void) -{ - /* first, a dummy read to latch */ - mdio_read(CONFIG_PHY_ADDR, MII_BMSR); - if(mdio_read(CONFIG_PHY_ADDR, MII_BMSR) & BMSR_LSTATUS) - return 1; - return 0; -} - -//void numaker_eth_set_cb(eth_callback_t eth_cb, void *userData) -//{ -// nu_eth_txrx_cb = eth_cb; -// nu_userData = userData; -//} - -// Provide ethernet devices with a semi-unique MAC address -void numaker_mac_address(uint8_t *mac) -{ - uint32_t uID1; - // Fetch word 0 - uint32_t word0 = *(uint32_t *)0x7F804; // 2KB Data Flash at 0x7F800 - // Fetch word 1 - // we only want bottom 16 bits of word1 (MAC bits 32-47) - // and bit 9 forced to 1, bit 8 forced to 0 - // Locally administered MAC, reduced conflicts - // http://en.wikipedia.org/wiki/MAC_address - uint32_t word1 = *(uint32_t *)0x7F800; // 2KB Data Flash at 0x7F800 - - if( word0 == 0xFFFFFFFF ) // Not burn any mac address at 1st 2 words of Data Flash - { - // with a semi-unique MAC address from the UUID - /* Enable FMC ISP function */ - SYS_UnlockReg(); - FMC_Open(); - // = FMC_ReadUID(0); - uID1 = FMC_ReadUID(1); - word1 = (uID1 & 0x003FFFFF) | ((uID1 & 0x030000) << 6) >> 8; - word0 = ((FMC_ReadUID(0) >> 4) << 20) | ((uID1 & 0xFF)<<12) | (FMC_ReadUID(2) & 0xFFF); - /* Disable FMC ISP function */ - FMC_Close(); - /* Lock protected registers */ - SYS_LockReg(); - } - - word1 |= 0x00000200; - word1 &= 0x0000FEFF; - - mac[0] = (word1 & 0x0000ff00) >> 8; - mac[1] = (word1 & 0x000000ff); - mac[2] = (word0 & 0xff000000) >> 24; - mac[3] = (word0 & 0x00ff0000) >> 16; - mac[4] = (word0 & 0x0000ff00) >> 8; - mac[5] = (word0 & 0x000000ff); - - NU_DEBUGF(("mac address %02x-%02x-%02x-%02x-%02x-%02x \r\n", mac[0], mac[1],mac[2],mac[3],mac[4],mac[5])); -} - -void numaker_eth_enable_interrupts(void) { - EMAC->INTEN |= EMAC_INTEN_RXIEN_Msk | - EMAC_INTEN_TXIEN_Msk ; - NVIC_EnableIRQ(EMAC_RX_IRQn); - NVIC_EnableIRQ(EMAC_TX_IRQn); -} - -void numaker_eth_disable_interrupts(void) { - NVIC_DisableIRQ(EMAC_RX_IRQn); - NVIC_DisableIRQ(EMAC_TX_IRQn); -} +/**************************************************************************//** + * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*****************************************************************************/ +#include "FreeRTOS.h" +#include "list.h" +#include "FreeRTOS_IP.h" + +#include "m480_eth.h" + +#define ETH_TRIGGER_RX() do{EMAC->RXST = 0;}while(0) +#define ETH_TRIGGER_TX() do{EMAC->TXST = 0;}while(0) +#define ETH_ENABLE_TX() do{EMAC->CTL |= EMAC_CTL_TXON;}while(0) +#define ETH_ENABLE_RX() do{EMAC->CTL |= EMAC_CTL_RXON;}while(0) +#define ETH_DISABLE_TX() do{EMAC->CTL &= ~EMAC_CTL_TXON;}while(0) +#define ETH_DISABLE_RX() do{EMAC->CTL &= ~EMAC_CTL_RXON;}while(0) + + +struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); +struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); +#ifdef __ICCARM__ +#pragma data_alignment=4 +struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM]; +struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM]; +uint8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE]; +uint8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE]; +#else +struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); +struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); +uint8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] __attribute__ ((aligned(4))); +uint8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] __attribute__ ((aligned(4))); +#endif +struct eth_descriptor volatile *cur_tx_desc_ptr, *cur_rx_desc_ptr, *fin_tx_desc_ptr; + + +// PTP source clock is 84MHz (Real chip using PLL). Each tick is 11.90ns +// Assume we want to set each tick to 100ns. +// Increase register = (100 * 2^31) / (10^9) = 214.71 =~ 215 = 0xD7 +// Addend register = 2^32 * tick_freq / (84MHz), where tick_freq = (2^31 / 215) MHz +// From above equation, addend register = 2^63 / (84M * 215) ~= 510707200 = 0x1E70C600 + + + +static void mdio_write(uint8_t addr, uint8_t reg, uint16_t val) +{ + + EMAC->MIIMDAT = val; + EMAC->MIIMCTL = (addr << EMAC_MIIMCTL_PHYADDR_Pos) | reg | EMAC_MIIMCTL_BUSY_Msk | EMAC_MIIMCTL_WRITE_Msk | EMAC_MIIMCTL_MDCON_Msk; + + while (EMAC->MIIMCTL & EMAC_MIIMCTL_BUSY_Msk); + +} + + +static uint16_t mdio_read(uint8_t addr, uint8_t reg) +{ + EMAC->MIIMCTL = (addr << EMAC_MIIMCTL_PHYADDR_Pos) | reg | EMAC_MIIMCTL_BUSY_Msk | EMAC_MIIMCTL_MDCON_Msk; + while (EMAC->MIIMCTL & EMAC_MIIMCTL_BUSY_Msk); + + return(EMAC->MIIMDAT); +} + +static int reset_phy(void) +{ + + uint16_t reg; + uint32_t delayCnt; + + + mdio_write(CONFIG_PHY_ADDR, MII_BMCR, BMCR_RESET); + + delayCnt = 2000; + while(delayCnt-- > 0) { + if((mdio_read(CONFIG_PHY_ADDR, MII_BMCR) & BMCR_RESET) == 0) + break; + + } + + if(delayCnt == 0) { + NU_DEBUGF(("Reset phy failed\n")); + return(-1); + } + + mdio_write(CONFIG_PHY_ADDR, MII_ADVERTISE, ADVERTISE_CSMA | + ADVERTISE_10HALF | + ADVERTISE_10FULL | + ADVERTISE_100HALF | + ADVERTISE_100FULL); + + reg = mdio_read(CONFIG_PHY_ADDR, MII_BMCR); + mdio_write(CONFIG_PHY_ADDR, MII_BMCR, reg | BMCR_ANRESTART); + + delayCnt = 200000; + while(delayCnt-- > 0) { + if((mdio_read(CONFIG_PHY_ADDR, MII_BMSR) & (BMSR_ANEGCOMPLETE | BMSR_LSTATUS)) + == (BMSR_ANEGCOMPLETE | BMSR_LSTATUS)) + break; + } + + if(delayCnt == 0) { + NU_DEBUGF(("AN failed. Set to 100 FULL\n")); + EMAC->CTL |= (EMAC_CTL_OPMODE_Msk | EMAC_CTL_FUDUP_Msk); + return(-1); + } else { + reg = mdio_read(CONFIG_PHY_ADDR, MII_LPA); + + if(reg & ADVERTISE_100FULL) { + NU_DEBUGF(("100 full\n")); + EMAC->CTL |= (EMAC_CTL_OPMODE_Msk | EMAC_CTL_FUDUP_Msk); + } else if(reg & ADVERTISE_100HALF) { + NU_DEBUGF(("100 half\n")); + EMAC->CTL = (EMAC->CTL & ~EMAC_CTL_FUDUP_Msk) | EMAC_CTL_OPMODE_Msk; + } else if(reg & ADVERTISE_10FULL) { + NU_DEBUGF(("10 full\n")); + EMAC->CTL = (EMAC->CTL & ~EMAC_CTL_OPMODE_Msk) | EMAC_CTL_FUDUP_Msk; + } else { + NU_DEBUGF(("10 half\n")); + EMAC->CTL &= ~(EMAC_CTL_OPMODE_Msk | EMAC_CTL_FUDUP_Msk); + } + } + FreeRTOS_printf(("PHY ID 1:0x%x\r\n", mdio_read(CONFIG_PHY_ADDR, MII_PHYSID1))); + FreeRTOS_printf(("PHY ID 2:0x%x\r\n", mdio_read(CONFIG_PHY_ADDR, MII_PHYSID2))); + + return(0); +} + + +static void init_tx_desc(void) +{ + uint32_t i; + + + cur_tx_desc_ptr = fin_tx_desc_ptr = &tx_desc[0]; + + for(i = 0; i < TX_DESCRIPTOR_NUM; i++) { + tx_desc[i].status1 = TXFD_PADEN | TXFD_CRCAPP | TXFD_INTEN; + tx_desc[i].buf = &tx_buf[i][0]; + tx_desc[i].status2 = 0; + tx_desc[i].next = &tx_desc[(i + 1) % TX_DESCRIPTOR_NUM]; + + } + EMAC->TXDSA = (unsigned int)&tx_desc[0]; + return; +} + +static void init_rx_desc(void) +{ + uint32_t i; + + + cur_rx_desc_ptr = &rx_desc[0]; + + for(i = 0; i < RX_DESCRIPTOR_NUM; i++) { + rx_desc[i].status1 = OWNERSHIP_EMAC; + rx_desc[i].buf = &rx_buf[i][0]; + rx_desc[i].status2 = 0; + rx_desc[i].next = &rx_desc[(i + 1) % TX_DESCRIPTOR_NUM]; + } + EMAC->RXDSA = (unsigned int)&rx_desc[0]; + return; +} + +void numaker_set_mac_addr(uint8_t *addr) +{ + + EMAC->CAM0M = (addr[0] << 24) | + (addr[1] << 16) | + (addr[2] << 8) | + addr[3]; + + EMAC->CAM0L = (addr[4] << 24) | + (addr[5] << 16); + + +} + +static void __eth_clk_pin_init() +{ + /* Unlock protected registers */ + SYS_UnlockReg(); + + /* Enable IP clock */ + CLK_EnableModuleClock(EMAC_MODULE); + + // Configure MDC clock rate to HCLK / (127 + 1) = 1.25 MHz if system is running at 160 MH + CLK_SetModuleClock(EMAC_MODULE, 0, CLK_CLKDIV3_EMAC(127)); + + /* Update System Core Clock */ + SystemCoreClockUpdate(); + + /*---------------------------------------------------------------------------------------------------------*/ + /* Init I/O Multi-function */ + /*---------------------------------------------------------------------------------------------------------*/ + // Configure RMII pins + SYS->GPA_MFPL &= ~(SYS_GPA_MFPL_PA6MFP_Msk | SYS_GPA_MFPL_PA7MFP_Msk); + SYS->GPA_MFPL |= SYS_GPA_MFPL_PA6MFP_EMAC_RMII_RXERR | SYS_GPA_MFPL_PA7MFP_EMAC_RMII_CRSDV; + SYS->GPC_MFPL &= ~(SYS_GPC_MFPL_PC6MFP_Msk | SYS_GPC_MFPL_PC7MFP_Msk); + SYS->GPC_MFPL |= SYS_GPC_MFPL_PC6MFP_EMAC_RMII_RXD1 | SYS_GPC_MFPL_PC7MFP_EMAC_RMII_RXD0; + SYS->GPC_MFPH &= ~SYS_GPC_MFPH_PC8MFP_Msk; + SYS->GPC_MFPH |= SYS_GPC_MFPH_PC8MFP_EMAC_RMII_REFCLK; + SYS->GPE_MFPH &= ~(SYS_GPE_MFPH_PE8MFP_Msk | SYS_GPE_MFPH_PE9MFP_Msk | SYS_GPE_MFPH_PE10MFP_Msk | + SYS_GPE_MFPH_PE11MFP_Msk | SYS_GPE_MFPH_PE12MFP_Msk); + SYS->GPE_MFPH |= SYS_GPE_MFPH_PE8MFP_EMAC_RMII_MDC | + SYS_GPE_MFPH_PE9MFP_EMAC_RMII_MDIO | + SYS_GPE_MFPH_PE10MFP_EMAC_RMII_TXD0 | + SYS_GPE_MFPH_PE11MFP_EMAC_RMII_TXD1 | + SYS_GPE_MFPH_PE12MFP_EMAC_RMII_TXEN; + + // Enable high slew rate on all RMII TX output pins + PE->SLEWCTL = (GPIO_SLEWCTL_HIGH << GPIO_SLEWCTL_HSREN10_Pos) | + (GPIO_SLEWCTL_HIGH << GPIO_SLEWCTL_HSREN11_Pos) | + (GPIO_SLEWCTL_HIGH << GPIO_SLEWCTL_HSREN12_Pos); + + + /* Lock protected registers */ + SYS_LockReg(); + + +} + +int numaker_eth_init(uint8_t *mac_addr) +{ + int ret = 0; + // init CLK & pins + __eth_clk_pin_init(); + + // Reset MAC + EMAC->CTL = EMAC_CTL_RST_Msk; + while(EMAC->CTL & EMAC_CTL_RST_Msk) {} + + init_tx_desc(); + init_rx_desc(); + + numaker_set_mac_addr(mac_addr); // need to reconfigure hardware address 'cos we just RESET emc... + + + /* Configure the MAC interrupt enable register. */ + EMAC->INTEN = EMAC_INTEN_RXIEN_Msk | + EMAC_INTEN_TXIEN_Msk | + EMAC_INTEN_RXGDIEN_Msk | + EMAC_INTEN_TXCPIEN_Msk | + EMAC_INTEN_RXBEIEN_Msk | + EMAC_INTEN_TXBEIEN_Msk | + EMAC_INTEN_RDUIEN_Msk | + EMAC_INTEN_TSALMIEN_Msk | + EMAC_INTEN_WOLIEN_Msk; + + /* Configure the MAC control register. */ + EMAC->CTL = EMAC_CTL_STRIPCRC_Msk | EMAC_CTL_RMIIEN_Msk; + + /* Accept packets for us and all broadcast and multicast packets */ + EMAC->CAMCTL = EMAC_CAMCTL_CMPEN_Msk | + EMAC_CAMCTL_AMP_Msk | + EMAC_CAMCTL_ABP_Msk; + EMAC->CAMEN = 1; // Enable CAM entry 0 + + ret= reset_phy(); + + EMAC_ENABLE_RX(); + EMAC_ENABLE_TX(); + return ret; +} + + + +void ETH_halt(void) +{ + + EMAC->CTL &= ~(EMAC_CTL_RXON_Msk | EMAC_CTL_TXON_Msk); +} + +unsigned int m_status; + +void EMAC_RX_IRQHandler(void) +{ +// NU_DEBUGF(("%s ... \r\n", __FUNCTION__)); + m_status = EMAC->INTSTS & 0xFFFF; + EMAC->INTSTS = m_status; + if (m_status & EMAC_INTSTS_RXBEIF_Msk) { + // Shouldn't goes here, unless descriptor corrupted + NU_DEBUGF(("RX descriptor corrupted \r\n")); + //return; + } + // FIX ME: for rx-event, to ack rx_isr into event queue + xNetworkCallback('R'); +} + + +void numaker_eth_trigger_rx(void) +{ + ETH_TRIGGER_RX(); +} + +int numaker_eth_get_rx_buf(uint16_t *len, uint8_t **buf) +{ + unsigned int cur_entry, status; + + cur_entry = EMAC->CRXDSA; + if ((cur_entry == (uint32_t)cur_rx_desc_ptr) && (!(m_status & EMAC_INTSTS_RDUIF_Msk))) // cur_entry may equal to cur_rx_desc_ptr if RDU occures + return -1; + status = cur_rx_desc_ptr->status1; + + if(status & OWNERSHIP_EMAC) + return -1; + + if (status & RXFD_RXGD) { + *buf = cur_rx_desc_ptr->buf; + *len = status & 0xFFFF; + } + return 0; +} + +void numaker_eth_rx_next(void) +{ + cur_rx_desc_ptr->status1 = OWNERSHIP_EMAC; + cur_rx_desc_ptr = cur_rx_desc_ptr->next; +} + +void EMAC_TX_IRQHandler(void) +{ + unsigned int cur_entry, status; + + status = EMAC->INTSTS & 0xFFFF0000; + EMAC->INTSTS = status; + if(status & EMAC_INTSTS_TXBEIF_Msk) { + // Shouldn't goes here, unless descriptor corrupted + return; + } + + cur_entry = EMAC->CTXDSA; + + while (cur_entry != (uint32_t)fin_tx_desc_ptr) { + + fin_tx_desc_ptr = fin_tx_desc_ptr->next; + } + // FIX ME: for tx-event, no-op at this stage + xNetworkCallback('T'); +} + +uint8_t *numaker_eth_get_tx_buf(void) +{ + if(cur_tx_desc_ptr->status1 & OWNERSHIP_EMAC) + return(NULL); + else + return(cur_tx_desc_ptr->buf); +} + +void numaker_eth_trigger_tx(uint16_t length, void *p) +{ + struct eth_descriptor volatile *desc; + cur_tx_desc_ptr->status2 = (unsigned int)length; + desc = cur_tx_desc_ptr->next; // in case TX is transmitting and overwrite next pointer before we can update cur_tx_desc_ptr + cur_tx_desc_ptr->status1 |= OWNERSHIP_EMAC; + cur_tx_desc_ptr = desc; + + ETH_TRIGGER_TX(); + +} + +int numaker_eth_link_ok(void) +{ + /* first, a dummy read to latch */ + mdio_read(CONFIG_PHY_ADDR, MII_BMSR); + if(mdio_read(CONFIG_PHY_ADDR, MII_BMSR) & BMSR_LSTATUS) + return 1; + return 0; +} + +//void numaker_eth_set_cb(eth_callback_t eth_cb, void *userData) +//{ +// nu_eth_txrx_cb = eth_cb; +// nu_userData = userData; +//} + +// Provide ethernet devices with a semi-unique MAC address +void numaker_mac_address(uint8_t *mac) +{ + uint32_t uID1; + // Fetch word 0 + uint32_t word0 = *(uint32_t *)0x7F804; // 2KB Data Flash at 0x7F800 + // Fetch word 1 + // we only want bottom 16 bits of word1 (MAC bits 32-47) + // and bit 9 forced to 1, bit 8 forced to 0 + // Locally administered MAC, reduced conflicts + // http://en.wikipedia.org/wiki/MAC_address + uint32_t word1 = *(uint32_t *)0x7F800; // 2KB Data Flash at 0x7F800 + + if( word0 == 0xFFFFFFFF ) // Not burn any mac address at 1st 2 words of Data Flash + { + // with a semi-unique MAC address from the UUID + /* Enable FMC ISP function */ + SYS_UnlockReg(); + FMC_Open(); + // = FMC_ReadUID(0); + uID1 = FMC_ReadUID(1); + word1 = (uID1 & 0x003FFFFF) | ((uID1 & 0x030000) << 6) >> 8; + word0 = ((FMC_ReadUID(0) >> 4) << 20) | ((uID1 & 0xFF)<<12) | (FMC_ReadUID(2) & 0xFFF); + /* Disable FMC ISP function */ + FMC_Close(); + /* Lock protected registers */ + SYS_LockReg(); + } + + word1 |= 0x00000200; + word1 &= 0x0000FEFF; + + mac[0] = (word1 & 0x0000ff00) >> 8; + mac[1] = (word1 & 0x000000ff); + mac[2] = (word0 & 0xff000000) >> 24; + mac[3] = (word0 & 0x00ff0000) >> 16; + mac[4] = (word0 & 0x0000ff00) >> 8; + mac[5] = (word0 & 0x000000ff); + + NU_DEBUGF(("mac address %02x-%02x-%02x-%02x-%02x-%02x \r\n", mac[0], mac[1],mac[2],mac[3],mac[4],mac[5])); +} + +void numaker_eth_enable_interrupts(void) { + EMAC->INTEN |= EMAC_INTEN_RXIEN_Msk | + EMAC_INTEN_TXIEN_Msk ; + NVIC_EnableIRQ(EMAC_RX_IRQn); + NVIC_EnableIRQ(EMAC_TX_IRQn); +} + +void numaker_eth_disable_interrupts(void) { + NVIC_DisableIRQ(EMAC_RX_IRQn); + NVIC_DisableIRQ(EMAC_TX_IRQn); +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.h index 4e4d98d6d..3d370bca7 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/M487/m480_eth.h @@ -1,164 +1,164 @@ -/**************************************************************************//** - * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*****************************************************************************/ -#include "M480.h" -#ifndef _M480_ETH_ -#define _M480_ETH_ - -/* Generic MII registers. */ - -#define MII_BMCR 0x00 /* Basic mode control register */ -#define MII_BMSR 0x01 /* Basic mode status register */ -#define MII_PHYSID1 0x02 /* PHYS ID 1 */ -#define MII_PHYSID2 0x03 /* PHYS ID 2 */ -#define MII_ADVERTISE 0x04 /* Advertisement control reg */ -#define MII_LPA 0x05 /* Link partner ability reg */ -#define MII_EXPANSION 0x06 /* Expansion register */ -#define MII_DCOUNTER 0x12 /* Disconnect counter */ -#define MII_FCSCOUNTER 0x13 /* False carrier counter */ -#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ -#define MII_RERRCOUNTER 0x15 /* Receive error counter */ -#define MII_SREVISION 0x16 /* Silicon revision */ -#define MII_RESV1 0x17 /* Reserved... */ -#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ -#define MII_PHYADDR 0x19 /* PHY address */ -#define MII_RESV2 0x1a /* Reserved... */ -#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ -#define MII_NCONFIG 0x1c /* Network interface config */ - -/* Basic mode control register. */ -#define BMCR_RESV 0x007f /* Unused... */ -#define BMCR_CTST 0x0080 /* Collision test */ -#define BMCR_FULLDPLX 0x0100 /* Full duplex */ -#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ -#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ -#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ -#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ -#define BMCR_SPEED100 0x2000 /* Select 100Mbps */ -#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ -#define BMCR_RESET 0x8000 /* Reset the DP83840 */ - -/* Basic mode status register. */ -#define BMSR_ERCAP 0x0001 /* Ext-reg capability */ -#define BMSR_JCD 0x0002 /* Jabber detected */ -#define BMSR_LSTATUS 0x0004 /* Link status */ -#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ -#define BMSR_RFAULT 0x0010 /* Remote fault detected */ -#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ -#define BMSR_RESV 0x07c0 /* Unused... */ -#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ -#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ -#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ -#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ -#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ - -/* Advertisement control register. */ -#define ADVERTISE_SLCT 0x001f /* Selector bits */ -#define ADVERTISE_CSMA 0x0001 /* Only selector supported */ -#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ -#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ -#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ -#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ -#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ -#define ADVERTISE_RESV 0x1c00 /* Unused... */ -#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ -#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ -#define ADVERTISE_NPAGE 0x8000 /* Next page bit */ - -#define RX_DESCRIPTOR_NUM 4 //8 // Max Number of Rx Frame Descriptors -#define TX_DESCRIPTOR_NUM 2 //4 // Max number of Tx Frame Descriptors - -#define PACKET_BUFFER_SIZE 1520 - -#define CONFIG_PHY_ADDR 1 - - -// Frame Descriptor's Owner bit -#define OWNERSHIP_EMAC 0x80000000 // 1 = EMAC -//#define OWNERSHIP_CPU 0x7fffffff // 0 = CPU - - - -// Rx Frame Descriptor Status -#define RXFD_RXGD 0x00100000 // Receiving Good Packet Received -#define RXFD_RTSAS 0x00800000 // RX Time Stamp Available - - -// Tx Frame Descriptor's Control bits -#define TXFD_TTSEN 0x08 // Tx Time Stamp Enable -#define TXFD_INTEN 0x04 // Interrupt Enable -#define TXFD_CRCAPP 0x02 // Append CRC -#define TXFD_PADEN 0x01 // Padding Enable - -// Tx Frame Descriptor Status -#define TXFD_TXCP 0x00080000 // Transmission Completion -#define TXFD_TTSAS 0x08000000 // TX Time Stamp Available - -// Tx/Rx buffer descriptor structure -struct eth_descriptor; -struct eth_descriptor { - uint32_t status1; - uint8_t *buf; - uint32_t status2; - struct eth_descriptor *next; -#ifdef TIME_STAMPING - uint32_t backup1; - uint32_t backup2; - uint32_t reserved1; - uint32_t reserved2; -#endif -}; - -#ifdef TIME_STAMPING - -#define ETH_TS_ENABLE() do{EMAC->TSCTL = EMAC_TSCTL_TSEN_Msk;}while(0) -#define ETH_TS_START() do{EMAC->TSCTL |= (EMAC_TSCTL_TSMODE_Msk | EMAC_TSCTL_TSIEN_Msk);}while(0) -s32_t ETH_settime(u32_t sec, u32_t nsec); -s32_t ETH_gettime(u32_t *sec, u32_t *nsec); -s32_t ETH_updatetime(u32_t neg, u32_t sec, u32_t nsec); -s32_t ETH_adjtimex(int ppm); -void ETH_setinc(void); - -#endif - -#ifdef NU_TRACE -#define NU_DEBUGF(x) { printf x; } -#else -#define NU_DEBUGF(x) -#endif - -void numaker_set_mac_addr(uint8_t *addr); -int numaker_eth_init(uint8_t *mac_addr); -uint8_t *numaker_eth_get_tx_buf(void); -void numaker_eth_trigger_tx(uint16_t length, void *p); -int numaker_eth_get_rx_buf(uint16_t *len, uint8_t **buf); -void numaker_eth_rx_next(void); -void numaker_eth_trigger_rx(void); -int numaker_eth_link_ok(void); -void numaker_mac_address(uint8_t *mac); -void numaker_eth_enable_interrupts(void); -void numaker_eth_disable_interrupts(void); - -#endif /* _M480_ETH_ */ +/**************************************************************************//** + * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*****************************************************************************/ +#include "M480.h" +#ifndef _M480_ETH_ +#define _M480_ETH_ + +/* Generic MII registers. */ + +#define MII_BMCR 0x00 /* Basic mode control register */ +#define MII_BMSR 0x01 /* Basic mode status register */ +#define MII_PHYSID1 0x02 /* PHYS ID 1 */ +#define MII_PHYSID2 0x03 /* PHYS ID 2 */ +#define MII_ADVERTISE 0x04 /* Advertisement control reg */ +#define MII_LPA 0x05 /* Link partner ability reg */ +#define MII_EXPANSION 0x06 /* Expansion register */ +#define MII_DCOUNTER 0x12 /* Disconnect counter */ +#define MII_FCSCOUNTER 0x13 /* False carrier counter */ +#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ +#define MII_RERRCOUNTER 0x15 /* Receive error counter */ +#define MII_SREVISION 0x16 /* Silicon revision */ +#define MII_RESV1 0x17 /* Reserved... */ +#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ +#define MII_PHYADDR 0x19 /* PHY address */ +#define MII_RESV2 0x1a /* Reserved... */ +#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ +#define MII_NCONFIG 0x1c /* Network interface config */ + +/* Basic mode control register. */ +#define BMCR_RESV 0x007f /* Unused... */ +#define BMCR_CTST 0x0080 /* Collision test */ +#define BMCR_FULLDPLX 0x0100 /* Full duplex */ +#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ +#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ +#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ +#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ +#define BMCR_SPEED100 0x2000 /* Select 100Mbps */ +#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ +#define BMCR_RESET 0x8000 /* Reset the DP83840 */ + +/* Basic mode status register. */ +#define BMSR_ERCAP 0x0001 /* Ext-reg capability */ +#define BMSR_JCD 0x0002 /* Jabber detected */ +#define BMSR_LSTATUS 0x0004 /* Link status */ +#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ +#define BMSR_RFAULT 0x0010 /* Remote fault detected */ +#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ +#define BMSR_RESV 0x07c0 /* Unused... */ +#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ +#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ +#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ +#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ +#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ + +/* Advertisement control register. */ +#define ADVERTISE_SLCT 0x001f /* Selector bits */ +#define ADVERTISE_CSMA 0x0001 /* Only selector supported */ +#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ +#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ +#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ +#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ +#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ +#define ADVERTISE_RESV 0x1c00 /* Unused... */ +#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ +#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ +#define ADVERTISE_NPAGE 0x8000 /* Next page bit */ + +#define RX_DESCRIPTOR_NUM 4 //8 // Max Number of Rx Frame Descriptors +#define TX_DESCRIPTOR_NUM 2 //4 // Max number of Tx Frame Descriptors + +#define PACKET_BUFFER_SIZE 1520 + +#define CONFIG_PHY_ADDR 1 + + +// Frame Descriptor's Owner bit +#define OWNERSHIP_EMAC 0x80000000 // 1 = EMAC +//#define OWNERSHIP_CPU 0x7fffffff // 0 = CPU + + + +// Rx Frame Descriptor Status +#define RXFD_RXGD 0x00100000 // Receiving Good Packet Received +#define RXFD_RTSAS 0x00800000 // RX Time Stamp Available + + +// Tx Frame Descriptor's Control bits +#define TXFD_TTSEN 0x08 // Tx Time Stamp Enable +#define TXFD_INTEN 0x04 // Interrupt Enable +#define TXFD_CRCAPP 0x02 // Append CRC +#define TXFD_PADEN 0x01 // Padding Enable + +// Tx Frame Descriptor Status +#define TXFD_TXCP 0x00080000 // Transmission Completion +#define TXFD_TTSAS 0x08000000 // TX Time Stamp Available + +// Tx/Rx buffer descriptor structure +struct eth_descriptor; +struct eth_descriptor { + uint32_t status1; + uint8_t *buf; + uint32_t status2; + struct eth_descriptor *next; +#ifdef TIME_STAMPING + uint32_t backup1; + uint32_t backup2; + uint32_t reserved1; + uint32_t reserved2; +#endif +}; + +#ifdef TIME_STAMPING + +#define ETH_TS_ENABLE() do{EMAC->TSCTL = EMAC_TSCTL_TSEN_Msk;}while(0) +#define ETH_TS_START() do{EMAC->TSCTL |= (EMAC_TSCTL_TSMODE_Msk | EMAC_TSCTL_TSIEN_Msk);}while(0) +s32_t ETH_settime(u32_t sec, u32_t nsec); +s32_t ETH_gettime(u32_t *sec, u32_t *nsec); +s32_t ETH_updatetime(u32_t neg, u32_t sec, u32_t nsec); +s32_t ETH_adjtimex(int ppm); +void ETH_setinc(void); + +#endif + +#ifdef NU_TRACE +#define NU_DEBUGF(x) { printf x; } +#else +#define NU_DEBUGF(x) +#endif + +void numaker_set_mac_addr(uint8_t *addr); +int numaker_eth_init(uint8_t *mac_addr); +uint8_t *numaker_eth_get_tx_buf(void); +void numaker_eth_trigger_tx(uint16_t length, void *p); +int numaker_eth_get_rx_buf(uint16_t *len, uint8_t **buf); +void numaker_eth_rx_next(void); +void numaker_eth_trigger_rx(void); +int numaker_eth_link_ok(void); +void numaker_mac_address(uint8_t *mac); +void numaker_eth_enable_interrupts(void); +void numaker_eth_disable_interrupts(void); + +#endif /* _M480_ETH_ */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/README_DRIVER_DISCLAIMER.txt b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/README_DRIVER_DISCLAIMER.txt index 347bb113e..d4dc8687c 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/README_DRIVER_DISCLAIMER.txt +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/README_DRIVER_DISCLAIMER.txt @@ -1,10 +1,10 @@ -Network drivers are provided as examples only, and do not form part of the -FreeRTOS+TCP stack itself. They: - - + May be based on driver code provided by the chip vendors, - + May not have been tested in all possible configurations, - + Will not necessarily be optimised. - + May have a dependency on a particular PHY part number. - + May not necessarily comply with any particular coding standard. - + May have dependencies on chip company libraries. - + May include other hardware board dependencies. +Network drivers are provided as examples only, and do not form part of the +FreeRTOS+TCP stack itself. They: + + + May be based on driver code provided by the chip vendors, + + May not have been tested in all possible configurations, + + Will not necessarily be optimised. + + May have a dependency on a particular PHY part number. + + May not necessarily comply with any particular coding standard. + + May have dependencies on chip company libraries. + + May include other hardware board dependencies. diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/NetworkInterface.c index 5a605af9b..139979cce 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/NetworkInterface.c @@ -1,629 +1,622 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2018 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -* File Name : NetworkInterface.c -* Device(s) : RX -* Description : Interfaces FreeRTOS TCP/IP stack to RX Ethernet driver. -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 07.03.2018 0.1 Development -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -* Includes , "Project Includes" -***********************************************************************************************************************/ -#include -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "FreeRTOS_IP.h" -#include "FreeRTOS_IP_Private.h" -/*#include "FreeRTOS_DNS.h" */ -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -#include "r_ether_rx_if.h" -#include "r_pinset.h" - -/*********************************************************************************************************************** - * Macro definitions - **********************************************************************************************************************/ -#define ETHER_BUFSIZE_MIN 60 - -#if defined( BSP_MCU_RX65N ) || defined( BSP_MCU_RX64M ) || defined( BSP_MCU_RX71M ) - #if ETHER_CFG_MODE_SEL == 0 - #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC0_MII() - #elif ETHER_CFG_MODE_SEL == 1 - #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC0_RMII() - #endif -#elif defined( BSP_MCU_RX63N ) - #if ETHER_CFG_MODE_SEL == 0 - #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC_MII() - #elif ETHER_CFG_MODE_SEL == 1 - #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC_RMII() - #endif -#endif /* if defined( BSP_MCU_RX65N ) || defined( BSP_MCU_RX64M ) || defined( BSP_MCU_RX71M ) */ - -#ifndef PHY_LS_HIGH_CHECK_TIME_MS - -/* Check if the LinkSStatus in the PHY is still high after 2 seconds of not - * receiving packets. */ - #define PHY_LS_HIGH_CHECK_TIME_MS 2000 -#endif - -#ifndef PHY_LS_LOW_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still low every second. */ - #define PHY_LS_LOW_CHECK_TIME_MS 1000 -#endif - -/*********************************************************************************************************************** - * Private global variables and functions - **********************************************************************************************************************/ -typedef enum -{ - eMACInit, /* Must initialise MAC. */ - eMACPass, /* Initialisation was successful. */ - eMACFailed, /* Initialisation failed. */ -} eMAC_INIT_STATUS_TYPE; - -static TaskHandle_t ether_receive_check_task_handle = 0; -static TaskHandle_t ether_link_check_task_handle = 0; -static TaskHandle_t xTaskToNotify = NULL; -static BaseType_t xPHYLinkStatus; -static BaseType_t xReportedStatus; -static eMAC_INIT_STATUS_TYPE xMacInitStatus = eMACInit; - -static int16_t SendData( uint8_t * pucBuffer, - size_t length ); -static int InitializeNetwork( void ); -static void prvEMACDeferredInterruptHandlerTask( void * pvParameters ); -static void clear_all_ether_rx_discriptors( uint32_t event ); - -int32_t callback_ether_regist( void ); -void EINT_Trig_isr( void * ); -void get_random_number( uint8_t * data, - uint32_t len ); - -void prvLinkStatusChange( BaseType_t xStatus ); -#if ( ipconfigHAS_PRINTF != 0 ) - static void prvMonitorResources( void ); -#endif - -/*********************************************************************************************************************** - * Function Name: xNetworkInterfaceInitialise () - * Description : Initialization of Ethernet driver. - * Arguments : none - * Return Value : pdPASS, pdFAIL - **********************************************************************************************************************/ -BaseType_t xNetworkInterfaceInitialise( void ) -{ - BaseType_t xReturn; - - if( xMacInitStatus == eMACInit ) - { - /* - * Perform the hardware specific network initialization here using the Ethernet driver library to initialize the - * Ethernet hardware, initialize DMA descriptors, and perform a PHY auto-negotiation to obtain a network link. - * - * InitialiseNetwork() uses Ethernet peripheral driver library function, and returns 0 if the initialization fails. - */ - if( InitializeNetwork() == pdFALSE ) - { - xMacInitStatus = eMACFailed; - } - else - { - /* Indicate that the MAC initialisation succeeded. */ - xMacInitStatus = eMACPass; - } - - FreeRTOS_printf( ( "InitializeNetwork returns %s\n", ( xMacInitStatus == eMACPass ) ? "OK" : " Fail" ) ); - } - - if( xMacInitStatus == eMACPass ) - { - xReturn = xPHYLinkStatus; - } - else - { - xReturn = pdFAIL; - } - - FreeRTOS_printf( ( "xNetworkInterfaceInitialise returns %d\n", xReturn ) ); - - return xReturn; -} /* End of function xNetworkInterfaceInitialise() */ - - -/*********************************************************************************************************************** - * Function Name: xNetworkInterfaceOutput () - * Description : Simple network output interface. - * Arguments : pxDescriptor, xReleaseAfterSend - * Return Value : pdTRUE, pdFALSE - **********************************************************************************************************************/ -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, - BaseType_t xReleaseAfterSend ) -{ - BaseType_t xReturn = pdFALSE; - - /* Simple network interfaces (as opposed to more efficient zero copy network - * interfaces) just use Ethernet peripheral driver library functions to copy - * data from the FreeRTOS+TCP buffer into the peripheral driver's own buffer. - * This example assumes SendData() is a peripheral driver library function that - * takes a pointer to the start of the data to be sent and the length of the - * data to be sent as two separate parameters. The start of the data is located - * by pxDescriptor->pucEthernetBuffer. The length of the data is located - * by pxDescriptor->xDataLength. */ - if( xPHYLinkStatus != 0 ) - { - if( SendData( pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength ) >= 0 ) - { - xReturn = pdTRUE; - /* Call the standard trace macro to log the send event. */ - iptraceNETWORK_INTERFACE_TRANSMIT(); - } - } - else - { - /* As the PHY Link Status is low, it makes no sense trying to deliver a packet. */ - } - - if( xReleaseAfterSend != pdFALSE ) - { - /* It is assumed SendData() copies the data out of the FreeRTOS+TCP Ethernet - * buffer. The Ethernet buffer is therefore no longer needed, and must be - * freed for re-use. */ - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - - return xReturn; -} /* End of function xNetworkInterfaceOutput() */ - - -#if ( ipconfigHAS_PRINTF != 0 ) - static void prvMonitorResources() - { - static UBaseType_t uxLastMinBufferCount = 0u; - static UBaseType_t uxCurrentBufferCount = 0u; - static size_t uxMinLastSize = 0uL; - static size_t uxCurLastSize = 0uL; - size_t uxMinSize; - size_t uxCurSize; - - uxCurrentBufferCount = uxGetMinimumFreeNetworkBuffers(); - - if( uxLastMinBufferCount != uxCurrentBufferCount ) - { - /* The logging produced below may be helpful - * while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentBufferCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentBufferCount ) ); - } - - uxMinSize = xPortGetMinimumEverFreeHeapSize(); - uxCurSize = xPortGetFreeHeapSize(); - - if( uxMinLastSize != uxMinSize ) - { - uxCurLastSize = uxCurSize; - uxMinLastSize = uxMinSize; - FreeRTOS_printf( ( "Heap: current %lu lowest %lu\n", uxCurSize, uxMinSize ) ); - } - - #if ( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - static UBaseType_t uxLastMinQueueSpace = 0; - UBaseType_t uxCurrentCount = 0u; - - uxCurrentCount = uxGetMinimumIPQueueSpace(); - - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - * while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - } -#endif /* ( ipconfigHAS_PRINTF != 0 ) */ - -/*********************************************************************************************************************** - * Function Name: prvEMACDeferredInterruptHandlerTask () - * Description : The deferred interrupt handler is a standard RTOS task. - * Arguments : pvParameters - * Return Value : none - **********************************************************************************************************************/ -static void prvEMACDeferredInterruptHandlerTask( void * pvParameters ) -{ - NetworkBufferDescriptor_t * pxBufferDescriptor; - int32_t xBytesReceived = 0; - - /* Avoid compiler warning about unreferenced parameter. */ - ( void ) pvParameters; - - /* Used to indicate that xSendEventStructToIPTask() is being called because - * of an Ethernet receive event. */ - IPStackEvent_t xRxEvent; - - uint8_t * buffer_pointer; - - /* Some variables related to monitoring the PHY. */ - TimeOut_t xPhyTime; - TickType_t xPhyRemTime; - const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); - - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - - FreeRTOS_printf( ( "Deferred Interrupt Handler Task started\n" ) ); - xTaskToNotify = ether_receive_check_task_handle; - - for( ; ; ) - { - #if ( ipconfigHAS_PRINTF != 0 ) - { - prvMonitorResources(); - } - #endif /* ipconfigHAS_PRINTF != 0 ) */ - - /* Wait for the Ethernet MAC interrupt to indicate that another packet - * has been received. */ - if( xBytesReceived <= 0 ) - { - ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); - } - - /* See how much data was received. */ - xBytesReceived = R_ETHER_Read_ZC2( ETHER_CHANNEL_0, ( void ** ) &buffer_pointer ); - - if( xBytesReceived < 0 ) - { - /* This is an error. Logged. */ - if( xBytesReceived == ETHER_ERR_LINK ) - { - /* Auto-negotiation is not completed, and transmission/ - reception is not enabled. Will be logged elsewhere. */ - } - else - { - FreeRTOS_printf( ( "R_ETHER_Read_ZC2: rc = %d not %d\n", xBytesReceived, ETHER_ERR_LINK ) ); - } - } - else if( xBytesReceived > 0 ) - { - /* Allocate a network buffer descriptor that points to a buffer - * large enough to hold the received frame. As this is the simple - * rather than efficient example the received data will just be copied - * into this buffer. */ - pxBufferDescriptor = pxGetNetworkBufferWithDescriptor( ( size_t ) xBytesReceived, 0 ); - - if( pxBufferDescriptor != NULL ) - { - /* pxBufferDescriptor->pucEthernetBuffer now points to an Ethernet - * buffer large enough to hold the received data. Copy the - * received data into pcNetworkBuffer->pucEthernetBuffer. Here it - * is assumed ReceiveData() is a peripheral driver function that - * copies the received data into a buffer passed in as the function's - * parameter. Remember! While is is a simple robust technique - - * it is not efficient. An example that uses a zero copy technique - * is provided further down this page. */ - memcpy( pxBufferDescriptor->pucEthernetBuffer, buffer_pointer, ( size_t ) xBytesReceived ); - /*ReceiveData( pxBufferDescriptor->pucEthernetBuffer ); */ - - /* Set the actual packet length, in case a larger buffer was returned. */ - pxBufferDescriptor->xDataLength = ( size_t ) xBytesReceived; - - R_ETHER_Read_ZC2_BufRelease( ETHER_CHANNEL_0 ); - - /* See if the data contained in the received Ethernet frame needs - * to be processed. NOTE! It is preferable to do this in - * the interrupt service routine itself, which would remove the need - * to unblock this task for packets that don't need processing. */ - if( eConsiderFrameForProcessing( pxBufferDescriptor->pucEthernetBuffer ) == eProcessBuffer ) - { - /* The event about to be sent to the TCP/IP is an Rx event. */ - xRxEvent.eEventType = eNetworkRxEvent; - - /* pvData is used to point to the network buffer descriptor that - * now references the received data. */ - xRxEvent.pvData = ( void * ) pxBufferDescriptor; - - /* Send the data to the TCP/IP stack. */ - if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) - { - /* The buffer could not be sent to the IP task so the buffer must be released. */ - vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); - - /* Make a call to the standard trace macro to log the occurrence. */ - iptraceETHERNET_RX_EVENT_LOST(); - clear_all_ether_rx_discriptors( 0 ); - } - else - { - /* The message was successfully sent to the TCP/IP stack. - * Call the standard trace macro to log the occurrence. */ - iptraceNETWORK_INTERFACE_RECEIVE(); - R_NOP(); - } - } - else - { - /* The Ethernet frame can be dropped, but the Ethernet buffer must be released. */ - vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); - } - } - else - { - /* The event was lost because a network buffer was not available. - * Call the standard trace macro to log the occurrence. */ - iptraceETHERNET_RX_EVENT_LOST(); - clear_all_ether_rx_discriptors( 1 ); - FreeRTOS_printf( ( "R_ETHER_Read_ZC2: Cleared descriptors\n" ) ); - } - } - - if( xBytesReceived > 0 ) - { - /* A packet was received. No need to check for the PHY status now, - * but set a timer to check it later on. */ - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - - /* Indicate that the Link Status is high, so that - * xNetworkInterfaceOutput() can send packets. */ - if( xPHYLinkStatus == 0 ) - { - xPHYLinkStatus = 1; - FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS assume %d\n", xPHYLinkStatus ) ); - } - } - else if( ( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) || ( FreeRTOS_IsNetworkUp() == pdFALSE ) ) - { - R_ETHER_LinkProcess( 0 ); - - if( xPHYLinkStatus != xReportedStatus ) - { - xPHYLinkStatus = xReportedStatus; - FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", xPHYLinkStatus ) ); - } - - vTaskSetTimeOutState( &xPhyTime ); - - if( xPHYLinkStatus != 0 ) - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - } - else - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - } - } - } -} /* End of function prvEMACDeferredInterruptHandlerTask() */ - - -/*********************************************************************************************************************** - * Function Name: vNetworkInterfaceAllocateRAMToBuffers () - * Description : . - * Arguments : pxNetworkBuffers - * Return Value : none - **********************************************************************************************************************/ -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ - uint32_t ul; - uint8_t * buffer_address; - - R_EXTERN_SEC( B_ETHERNET_BUFFERS_1 ) - - buffer_address = R_SECTOP( B_ETHERNET_BUFFERS_1 ); - - for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) - { - pxNetworkBuffers[ ul ].pucEthernetBuffer = ( buffer_address + ( ETHER_CFG_BUFSIZE * ul ) ); - } -} /* End of function vNetworkInterfaceAllocateRAMToBuffers() */ - - -/*********************************************************************************************************************** - * Function Name: prvLinkStatusChange () - * Description : Function will be called when the Link Status of the phy has changed ( see ether_callback.c ) - * Arguments : xStatus : true when statyus has become high - * Return Value : void - **********************************************************************************************************************/ -void prvLinkStatusChange( BaseType_t xStatus ) -{ - if( xReportedStatus != xStatus ) - { - xReportedStatus = xStatus; - } -} - -/*********************************************************************************************************************** - * Function Name: InitializeNetwork () - * Description : - * Arguments : none - * Return Value : pdTRUE, pdFALSE - **********************************************************************************************************************/ -static int InitializeNetwork( void ) -{ - ether_return_t eth_ret; - BaseType_t return_code = pdFALSE; - ether_param_t param; - uint8_t myethaddr[ 6 ] = - { - configMAC_ADDR0, - configMAC_ADDR1, - configMAC_ADDR2, - configMAC_ADDR3, - configMAC_ADDR4, - configMAC_ADDR5 - }; /*XXX Fix me */ - - R_ETHER_PinSet_CHANNEL_0(); - R_ETHER_Initial(); - callback_ether_regist(); - - param.channel = ETHER_CHANNEL_0; - eth_ret = R_ETHER_Control( CONTROL_POWER_ON, param ); /* PHY mode settings, module stop cancellation */ - - if( ETHER_SUCCESS != eth_ret ) - { - return pdFALSE; - } - - eth_ret = R_ETHER_Open_ZC2( ETHER_CHANNEL_0, myethaddr, ETHER_FLAG_OFF ); - - if( ETHER_SUCCESS != eth_ret ) - { - return pdFALSE; - } - - return_code = xTaskCreate( prvEMACDeferredInterruptHandlerTask, - "ETHER_RECEIVE_CHECK_TASK", - 512u, - 0, - configMAX_PRIORITIES - 1, - ðer_receive_check_task_handle ); - - if( pdFALSE == return_code ) - { - return pdFALSE; - } - - return pdTRUE; -} /* End of function InitializeNetwork() */ - - -/*********************************************************************************************************************** - * Function Name: SendData () - * Description : - * Arguments : pucBuffer, length - * Return Value : 0 success, negative fail - **********************************************************************************************************************/ -static int16_t SendData( uint8_t * pucBuffer, - size_t length ) /*TODO complete stub function */ -{ - ether_return_t ret; - uint8_t * pwrite_buffer; - uint16_t write_buf_size; - - /* (1) Retrieve the transmit buffer location controlled by the descriptor. */ - ret = R_ETHER_Write_ZC2_GetBuf( ETHER_CHANNEL_0, ( void ** ) &pwrite_buffer, &write_buf_size ); - - if( ETHER_SUCCESS == ret ) - { - if( write_buf_size >= length ) - { - memcpy( pwrite_buffer, pucBuffer, length ); - } - - if( length < ETHER_BUFSIZE_MIN ) /*under minimum*/ - { - memset( ( pwrite_buffer + length ), 0, ( ETHER_BUFSIZE_MIN - length ) ); /*padding*/ - length = ETHER_BUFSIZE_MIN; /*resize*/ - } - - ret = R_ETHER_Write_ZC2_SetBuf( ETHER_CHANNEL_0, ( uint16_t ) length ); - ret = R_ETHER_CheckWrite( ETHER_CHANNEL_0 ); - } - - if( ETHER_SUCCESS != ret ) - { - return -5; /* XXX return meaningful value */ - } - else - { - return 0; - } -} /* End of function SendData() */ - - -/*********************************************************************************************************************** -* Function Name: EINT_Trig_isr -* Description : Standard frame received interrupt handler -* Arguments : ectrl - EDMAC and ETHERC control structure -* Return Value : None -* Note : This callback function is executed when EINT0 interrupt occurred. -***********************************************************************************************************************/ -void EINT_Trig_isr( void * ectrl ) -{ - ether_cb_arg_t * pdecode; - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - pdecode = ( ether_cb_arg_t * ) ectrl; - - if( pdecode->status_eesr & 0x00040000 ) /* EDMAC FR (Frame Receive Event) interrupt */ - { - if( xTaskToNotify != NULL ) - { - vTaskNotifyGiveFromISR( ether_receive_check_task_handle, &xHigherPriorityTaskWoken ); - } - - /* If xHigherPriorityTaskWoken is now set to pdTRUE then a context switch - * should be performed to ensure the interrupt returns directly to the highest - * priority task. The macro used for this purpose is dependent on the port in - * use and may be called portEND_SWITCHING_ISR(). */ - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - /*TODO complete interrupt handler for other events. */ - } -} /* End of function EINT_Trig_isr() */ - - -static void clear_all_ether_rx_discriptors( uint32_t event ) -{ - int32_t xBytesReceived; - uint8_t * buffer_pointer; - - /* Avoid compiler warning about unreferenced parameter. */ - ( void ) event; - - while( 1 ) - { - /* See how much data was received. */ - xBytesReceived = R_ETHER_Read_ZC2( ETHER_CHANNEL_0, ( void ** ) &buffer_pointer ); - - if( 0 > xBytesReceived ) - { - /* This is an error. Ignored. */ - } - else if( 0 < xBytesReceived ) - { - R_ETHER_Read_ZC2_BufRelease( ETHER_CHANNEL_0 ); - iptraceETHERNET_RX_EVENT_LOST(); - } - else - { - break; - } - } -} - -/*********************************************************************************************************************** - * End of file "NetworkInterface.c" - **********************************************************************************************************************/ +/*********************************************************************************************************************** +* DISCLAIMER +* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No +* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all +* applicable laws, including copyright laws. +* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING +* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM +* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES +* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS +* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of +* this software. By using this software, you agree to the additional terms and conditions found by accessing the +* following link: +* http://www.renesas.com/disclaimer +* +* Copyright (C) 2018 Renesas Electronics Corporation. All rights reserved. +***********************************************************************************************************************/ + +/*********************************************************************************************************************** +* File Name : NetworkInterface.c +* Device(s) : RX +* Description : Interfaces FreeRTOS TCP/IP stack to RX Ethernet driver. +***********************************************************************************************************************/ + +/*********************************************************************************************************************** +* History : DD.MM.YYYY Version Description +* : 07.03.2018 0.1 Development +***********************************************************************************************************************/ + +/*********************************************************************************************************************** +* Includes , "Project Includes" +***********************************************************************************************************************/ +#include +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "FreeRTOS_IP.h" +#include "FreeRTOS_IP_Private.h" +/*#include "FreeRTOS_DNS.h" */ +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +#include "r_ether_rx_if.h" +#include "r_pinset.h" + +/*********************************************************************************************************************** + * Macro definitions + **********************************************************************************************************************/ +#define ETHER_BUFSIZE_MIN 60 + +#if defined( BSP_MCU_RX65N ) || defined( BSP_MCU_RX64M ) || defined( BSP_MCU_RX71M ) + #if ETHER_CFG_MODE_SEL == 0 + #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC0_MII() + #elif ETHER_CFG_MODE_SEL == 1 + #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC0_RMII() + #endif +#elif defined( BSP_MCU_RX63N ) + #if ETHER_CFG_MODE_SEL == 0 + #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC_MII() + #elif ETHER_CFG_MODE_SEL == 1 + #define R_ETHER_PinSet_CHANNEL_0() R_ETHER_PinSet_ETHERC_RMII() + #endif +#endif /* if defined( BSP_MCU_RX65N ) || defined( BSP_MCU_RX64M ) || defined( BSP_MCU_RX71M ) */ + +#ifndef PHY_LS_HIGH_CHECK_TIME_MS + +/* Check if the LinkSStatus in the PHY is still high after 2 seconds of not + * receiving packets. */ + #define PHY_LS_HIGH_CHECK_TIME_MS 2000 +#endif + +#ifndef PHY_LS_LOW_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still low every second. */ + #define PHY_LS_LOW_CHECK_TIME_MS 1000 +#endif + +/*********************************************************************************************************************** + * Private global variables and functions + **********************************************************************************************************************/ +typedef enum +{ + eMACInit, /* Must initialise MAC. */ + eMACPass, /* Initialisation was successful. */ + eMACFailed, /* Initialisation failed. */ +} eMAC_INIT_STATUS_TYPE; + +static TaskHandle_t ether_receive_check_task_handle = 0; +static TaskHandle_t ether_link_check_task_handle = 0; +static TaskHandle_t xTaskToNotify = NULL; +static BaseType_t xPHYLinkStatus; +static BaseType_t xReportedStatus; +static eMAC_INIT_STATUS_TYPE xMacInitStatus = eMACInit; + +static int16_t SendData( uint8_t * pucBuffer, + size_t length ); +static int InitializeNetwork( void ); +static void prvEMACDeferredInterruptHandlerTask( void * pvParameters ); +static void clear_all_ether_rx_discriptors( uint32_t event ); + +int32_t callback_ether_regist( void ); +void EINT_Trig_isr( void * ); +void get_random_number( uint8_t * data, + uint32_t len ); + +void prvLinkStatusChange( BaseType_t xStatus ); +#if ( ipconfigHAS_PRINTF != 0 ) + static void prvMonitorResources( void ); +#endif + +/*********************************************************************************************************************** + * Function Name: xNetworkInterfaceInitialise () + * Description : Initialization of Ethernet driver. + * Arguments : none + * Return Value : pdPASS, pdFAIL + **********************************************************************************************************************/ +BaseType_t xNetworkInterfaceInitialise( void ) +{ + BaseType_t xReturn; + + if( xMacInitStatus == eMACInit ) + { + /* + * Perform the hardware specific network initialization here using the Ethernet driver library to initialize the + * Ethernet hardware, initialize DMA descriptors, and perform a PHY auto-negotiation to obtain a network link. + * + * InitialiseNetwork() uses Ethernet peripheral driver library function, and returns 0 if the initialization fails. + */ + if( InitializeNetwork() == pdFALSE ) + { + xMacInitStatus = eMACFailed; + } + else + { + /* Indicate that the MAC initialisation succeeded. */ + xMacInitStatus = eMACPass; + } + + FreeRTOS_printf( ( "InitializeNetwork returns %s\n", ( xMacInitStatus == eMACPass ) ? "OK" : " Fail" ) ); + } + + if( xMacInitStatus == eMACPass ) + { + xReturn = xPHYLinkStatus; + } + else + { + xReturn = pdFAIL; + } + + FreeRTOS_printf( ( "xNetworkInterfaceInitialise returns %d\n", xReturn ) ); + + return xReturn; +} /* End of function xNetworkInterfaceInitialise() */ + + +/*********************************************************************************************************************** + * Function Name: xNetworkInterfaceOutput () + * Description : Simple network output interface. + * Arguments : pxDescriptor, xReleaseAfterSend + * Return Value : pdTRUE, pdFALSE + **********************************************************************************************************************/ +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, + BaseType_t xReleaseAfterSend ) +{ + BaseType_t xReturn = pdFALSE; + + /* Simple network interfaces (as opposed to more efficient zero copy network + * interfaces) just use Ethernet peripheral driver library functions to copy + * data from the FreeRTOS+TCP buffer into the peripheral driver's own buffer. + * This example assumes SendData() is a peripheral driver library function that + * takes a pointer to the start of the data to be sent and the length of the + * data to be sent as two separate parameters. The start of the data is located + * by pxDescriptor->pucEthernetBuffer. The length of the data is located + * by pxDescriptor->xDataLength. */ + if( xPHYLinkStatus != 0 ) + { + if( SendData( pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength ) >= 0 ) + { + xReturn = pdTRUE; + /* Call the standard trace macro to log the send event. */ + iptraceNETWORK_INTERFACE_TRANSMIT(); + } + } + else + { + /* As the PHY Link Status is low, it makes no sense trying to deliver a packet. */ + } + + if( xReleaseAfterSend != pdFALSE ) + { + /* It is assumed SendData() copies the data out of the FreeRTOS+TCP Ethernet + * buffer. The Ethernet buffer is therefore no longer needed, and must be + * freed for re-use. */ + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + + return xReturn; +} /* End of function xNetworkInterfaceOutput() */ + + +#if ( ipconfigHAS_PRINTF != 0 ) + static void prvMonitorResources() + { + static UBaseType_t uxLastMinBufferCount = 0u; + static UBaseType_t uxCurrentBufferCount = 0u; + static size_t uxMinLastSize = 0uL; + static size_t uxCurLastSize = 0uL; + size_t uxMinSize; + size_t uxCurSize; + + uxCurrentBufferCount = uxGetMinimumFreeNetworkBuffers(); + + if( uxLastMinBufferCount != uxCurrentBufferCount ) + { + /* The logging produced below may be helpful + * while tuning +TCP: see how many buffers are in use. */ + uxLastMinBufferCount = uxCurrentBufferCount; + FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", + uxGetNumberOfFreeNetworkBuffers(), uxCurrentBufferCount ) ); + } + + uxMinSize = xPortGetMinimumEverFreeHeapSize(); + uxCurSize = xPortGetFreeHeapSize(); + + if( uxMinLastSize != uxMinSize ) + { + uxCurLastSize = uxCurSize; + uxMinLastSize = uxMinSize; + FreeRTOS_printf( ( "Heap: current %lu lowest %lu\n", uxCurSize, uxMinSize ) ); + } + + #if ( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + { + static UBaseType_t uxLastMinQueueSpace = 0; + UBaseType_t uxCurrentCount = 0u; + + uxCurrentCount = uxGetMinimumIPQueueSpace(); + + if( uxLastMinQueueSpace != uxCurrentCount ) + { + /* The logging produced below may be helpful + * while tuning +TCP: see how many buffers are in use. */ + uxLastMinQueueSpace = uxCurrentCount; + FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); + } + } + #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ + } +#endif /* ( ipconfigHAS_PRINTF != 0 ) */ + +/*********************************************************************************************************************** + * Function Name: prvEMACDeferredInterruptHandlerTask () + * Description : The deferred interrupt handler is a standard RTOS task. + * Arguments : pvParameters + * Return Value : none + **********************************************************************************************************************/ +static void prvEMACDeferredInterruptHandlerTask( void * pvParameters ) +{ + NetworkBufferDescriptor_t * pxBufferDescriptor; + int32_t xBytesReceived = 0; + + /* Avoid compiler warning about unreferenced parameter. */ + ( void ) pvParameters; + + /* Used to indicate that xSendEventStructToIPTask() is being called because + * of an Ethernet receive event. */ + IPStackEvent_t xRxEvent; + + uint8_t * buffer_pointer; + + /* Some variables related to monitoring the PHY. */ + TimeOut_t xPhyTime; + TickType_t xPhyRemTime; + const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); + + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + + FreeRTOS_printf( ( "Deferred Interrupt Handler Task started\n" ) ); + xTaskToNotify = ether_receive_check_task_handle; + + for( ; ; ) + { + #if ( ipconfigHAS_PRINTF != 0 ) + { + prvMonitorResources(); + } + #endif /* ipconfigHAS_PRINTF != 0 ) */ + + /* Wait for the Ethernet MAC interrupt to indicate that another packet + * has been received. */ + if( xBytesReceived <= 0 ) + { + ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); + } + + /* See how much data was received. */ + xBytesReceived = R_ETHER_Read_ZC2( ETHER_CHANNEL_0, ( void ** ) &buffer_pointer ); + + if( xBytesReceived < 0 ) + { + /* This is an error. Logged. */ + FreeRTOS_printf( ( "R_ETHER_Read_ZC2: rc = %d\n", xBytesReceived ) ); + } + else if( xBytesReceived > 0 ) + { + /* Allocate a network buffer descriptor that points to a buffer + * large enough to hold the received frame. As this is the simple + * rather than efficient example the received data will just be copied + * into this buffer. */ + pxBufferDescriptor = pxGetNetworkBufferWithDescriptor( ( size_t ) xBytesReceived, 0 ); + + if( pxBufferDescriptor != NULL ) + { + /* pxBufferDescriptor->pucEthernetBuffer now points to an Ethernet + * buffer large enough to hold the received data. Copy the + * received data into pcNetworkBuffer->pucEthernetBuffer. Here it + * is assumed ReceiveData() is a peripheral driver function that + * copies the received data into a buffer passed in as the function's + * parameter. Remember! While is is a simple robust technique - + * it is not efficient. An example that uses a zero copy technique + * is provided further down this page. */ + memcpy( pxBufferDescriptor->pucEthernetBuffer, buffer_pointer, ( size_t ) xBytesReceived ); + /*ReceiveData( pxBufferDescriptor->pucEthernetBuffer ); */ + + /* Set the actual packet length, in case a larger buffer was returned. */ + pxBufferDescriptor->xDataLength = ( size_t ) xBytesReceived; + + R_ETHER_Read_ZC2_BufRelease( ETHER_CHANNEL_0 ); + + /* See if the data contained in the received Ethernet frame needs + * to be processed. NOTE! It is preferable to do this in + * the interrupt service routine itself, which would remove the need + * to unblock this task for packets that don't need processing. */ + if( eConsiderFrameForProcessing( pxBufferDescriptor->pucEthernetBuffer ) == eProcessBuffer ) + { + /* The event about to be sent to the TCP/IP is an Rx event. */ + xRxEvent.eEventType = eNetworkRxEvent; + + /* pvData is used to point to the network buffer descriptor that + * now references the received data. */ + xRxEvent.pvData = ( void * ) pxBufferDescriptor; + + /* Send the data to the TCP/IP stack. */ + if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) + { + /* The buffer could not be sent to the IP task so the buffer must be released. */ + vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); + + /* Make a call to the standard trace macro to log the occurrence. */ + iptraceETHERNET_RX_EVENT_LOST(); + clear_all_ether_rx_discriptors( 0 ); + } + else + { + /* The message was successfully sent to the TCP/IP stack. + * Call the standard trace macro to log the occurrence. */ + iptraceNETWORK_INTERFACE_RECEIVE(); + R_NOP(); + } + } + else + { + /* The Ethernet frame can be dropped, but the Ethernet buffer must be released. */ + vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); + } + } + else + { + /* The event was lost because a network buffer was not available. + * Call the standard trace macro to log the occurrence. */ + iptraceETHERNET_RX_EVENT_LOST(); + clear_all_ether_rx_discriptors( 1 ); + FreeRTOS_printf( ( "R_ETHER_Read_ZC2: Cleared descriptors\n" ) ); + } + } + + if( xBytesReceived > 0 ) + { + /* A packet was received. No need to check for the PHY status now, + * but set a timer to check it later on. */ + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + + /* Indicate that the Link Status is high, so that + * xNetworkInterfaceOutput() can send packets. */ + if( xPHYLinkStatus == 0 ) + { + xPHYLinkStatus = 1; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS assume %d\n", xPHYLinkStatus ) ); + } + } + else if( ( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) || ( FreeRTOS_IsNetworkUp() == pdFALSE ) ) + { + R_ETHER_LinkProcess( 0 ); + + if( xPHYLinkStatus != xReportedStatus ) + { + xPHYLinkStatus = xReportedStatus; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", xPHYLinkStatus ) ); + } + + vTaskSetTimeOutState( &xPhyTime ); + + if( xPHYLinkStatus != 0 ) + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + } + else + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + } + } + } +} /* End of function prvEMACDeferredInterruptHandlerTask() */ + + +/*********************************************************************************************************************** + * Function Name: vNetworkInterfaceAllocateRAMToBuffers () + * Description : . + * Arguments : pxNetworkBuffers + * Return Value : none + **********************************************************************************************************************/ +void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +{ + uint32_t ul; + uint8_t * buffer_address; + + R_EXTERN_SEC( B_ETHERNET_BUFFERS_1 ) + + buffer_address = R_SECTOP( B_ETHERNET_BUFFERS_1 ); + + for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) + { + pxNetworkBuffers[ ul ].pucEthernetBuffer = ( buffer_address + ( ETHER_CFG_BUFSIZE * ul ) ); + } +} /* End of function vNetworkInterfaceAllocateRAMToBuffers() */ + + +/*********************************************************************************************************************** + * Function Name: prvLinkStatusChange () + * Description : Function will be called when the Link Status of the phy has changed ( see ether_callback.c ) + * Arguments : xStatus : true when statyus has become high + * Return Value : void + **********************************************************************************************************************/ +void prvLinkStatusChange( BaseType_t xStatus ) +{ + if( xReportedStatus != xStatus ) + { + FreeRTOS_printf( ( "prvLinkStatusChange( %d )\n", xStatus ) ); + xReportedStatus = xStatus; + } +} + +/*********************************************************************************************************************** + * Function Name: InitializeNetwork () + * Description : + * Arguments : none + * Return Value : pdTRUE, pdFALSE + **********************************************************************************************************************/ +static int InitializeNetwork( void ) +{ + ether_return_t eth_ret; + BaseType_t return_code = pdFALSE; + ether_param_t param; + uint8_t myethaddr[ 6 ] = + { + configMAC_ADDR0, + configMAC_ADDR1, + configMAC_ADDR2, + configMAC_ADDR3, + configMAC_ADDR4, + configMAC_ADDR5 + }; /*XXX Fix me */ + + R_ETHER_PinSet_CHANNEL_0(); + R_ETHER_Initial(); + callback_ether_regist(); + + param.channel = ETHER_CHANNEL_0; + eth_ret = R_ETHER_Control( CONTROL_POWER_ON, param ); /* PHY mode settings, module stop cancellation */ + + if( ETHER_SUCCESS != eth_ret ) + { + return pdFALSE; + } + + eth_ret = R_ETHER_Open_ZC2( ETHER_CHANNEL_0, myethaddr, ETHER_FLAG_OFF ); + + if( ETHER_SUCCESS != eth_ret ) + { + return pdFALSE; + } + + return_code = xTaskCreate( prvEMACDeferredInterruptHandlerTask, + "ETHER_RECEIVE_CHECK_TASK", + 512u, + 0, + configMAX_PRIORITIES - 1, + ðer_receive_check_task_handle ); + + if( pdFALSE == return_code ) + { + return pdFALSE; + } + + return pdTRUE; +} /* End of function InitializeNetwork() */ + + +/*********************************************************************************************************************** + * Function Name: SendData () + * Description : + * Arguments : pucBuffer, length + * Return Value : 0 success, negative fail + **********************************************************************************************************************/ +static int16_t SendData( uint8_t * pucBuffer, + size_t length ) /*TODO complete stub function */ +{ + ether_return_t ret; + uint8_t * pwrite_buffer; + uint16_t write_buf_size; + + /* (1) Retrieve the transmit buffer location controlled by the descriptor. */ + ret = R_ETHER_Write_ZC2_GetBuf( ETHER_CHANNEL_0, ( void ** ) &pwrite_buffer, &write_buf_size ); + + if( ETHER_SUCCESS == ret ) + { + if( write_buf_size >= length ) + { + memcpy( pwrite_buffer, pucBuffer, length ); + } + + if( length < ETHER_BUFSIZE_MIN ) /*under minimum*/ + { + memset( ( pwrite_buffer + length ), 0, ( ETHER_BUFSIZE_MIN - length ) ); /*padding*/ + length = ETHER_BUFSIZE_MIN; /*resize*/ + } + + ret = R_ETHER_Write_ZC2_SetBuf( ETHER_CHANNEL_0, ( uint16_t ) length ); + ret = R_ETHER_CheckWrite( ETHER_CHANNEL_0 ); + } + + if( ETHER_SUCCESS != ret ) + { + return -5; /* XXX return meaningful value */ + } + else + { + return 0; + } +} /* End of function SendData() */ + + +/*********************************************************************************************************************** +* Function Name: EINT_Trig_isr +* Description : Standard frame received interrupt handler +* Arguments : ectrl - EDMAC and ETHERC control structure +* Return Value : None +* Note : This callback function is executed when EINT0 interrupt occurred. +***********************************************************************************************************************/ +void EINT_Trig_isr( void * ectrl ) +{ + ether_cb_arg_t * pdecode; + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + pdecode = ( ether_cb_arg_t * ) ectrl; + + if( pdecode->status_eesr & 0x00040000 ) /* EDMAC FR (Frame Receive Event) interrupt */ + { + if( xTaskToNotify != NULL ) + { + vTaskNotifyGiveFromISR( ether_receive_check_task_handle, &xHigherPriorityTaskWoken ); + } + + /* If xHigherPriorityTaskWoken is now set to pdTRUE then a context switch + * should be performed to ensure the interrupt returns directly to the highest + * priority task. The macro used for this purpose is dependent on the port in + * use and may be called portEND_SWITCHING_ISR(). */ + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); + /*TODO complete interrupt handler for other events. */ + } +} /* End of function EINT_Trig_isr() */ + + +static void clear_all_ether_rx_discriptors( uint32_t event ) +{ + int32_t xBytesReceived; + uint8_t * buffer_pointer; + + /* Avoid compiler warning about unreferenced parameter. */ + ( void ) event; + + while( 1 ) + { + /* See how much data was received. */ + xBytesReceived = R_ETHER_Read_ZC2( ETHER_CHANNEL_0, ( void ** ) &buffer_pointer ); + + if( 0 > xBytesReceived ) + { + /* This is an error. Ignored. */ + } + else if( 0 < xBytesReceived ) + { + R_ETHER_Read_ZC2_BufRelease( ETHER_CHANNEL_0 ); + iptraceETHERNET_RX_EVENT_LOST(); + } + else + { + break; + } + } +} + +/*********************************************************************************************************************** + * End of file "NetworkInterface.c" + **********************************************************************************************************************/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/ether_callback.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/ether_callback.c index c42d8a20b..8cb38ce30 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/ether_callback.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/RX/ether_callback.c @@ -1,177 +1,177 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : ether_callback.c -* Version : ---- -* Description : This module solves all the world's problems -***********************************************************************************************************************/ -/********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 05.01.2015 ---- Clean up source code. -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -Includes , "Project Includes" -***********************************************************************************************************************/ -#include "r_ether_rx_if.h" - -/*********************************************************************************************************************** -Private global variables and functions -***********************************************************************************************************************/ -int32_t callback_ether_regist(void); -void callback_ether(void * pparam); -static void callback_wakeon_lan(uint32_t channel); -static void callback_link_on(uint32_t channel); -static void callback_link_off(uint32_t channel); - -volatile uint8_t pause_enable = ETHER_FLAG_OFF; -volatile uint8_t magic_packet_detect[ETHER_CHANNEL_MAX]; -volatile uint8_t link_detect[ETHER_CHANNEL_MAX]; - -void EINT_Trig_isr(void *); - -/* - * When that Link Status changes, the following function will be called: - */ -void prvLinkStatusChange( BaseType_t xStatus ); - -/*********************************************************************************************************************** -* Function Name: callback_ether -* Description : Regist of callback function -* Arguments : - -* Return Value : 0: success, -1:failed -***********************************************************************************************************************/ -int32_t callback_ether_regist(void) -{ - ether_param_t param; - ether_cb_t cb_func; - - int32_t ret; - - /* Set the callback function (LAN cable connect/disconnect event) */ - cb_func.pcb_func = &callback_ether; - param.ether_callback = cb_func; - ret = R_ETHER_Control(CONTROL_SET_CALLBACK, param); - if (ETHER_SUCCESS != ret) - { - return -1; - } - - /* Set the callback function (Ether interrupt event) */ - cb_func.pcb_int_hnd = &EINT_Trig_isr; - param.ether_callback = cb_func; - ret = R_ETHER_Control(CONTROL_SET_INT_HANDLER, param); - if (ETHER_SUCCESS != ret) - { - return -1; - } - return 0; -} /* End of function callback_ether_regist() */ - -/*********************************************************************************************************************** -* Function Name: callback_ether -* Description : Sample of the callback function -* Arguments : pparam - -* -* Return Value : none -***********************************************************************************************************************/ -void callback_ether(void * pparam) -{ - ether_cb_arg_t * pdecode; - uint32_t channel; - - pdecode = (ether_cb_arg_t *)pparam; - channel = pdecode->channel; /* Get Ethernet channel number */ - - switch (pdecode->event_id) - { - /* Callback function that notifies user to have detected magic packet. */ - case ETHER_CB_EVENT_ID_WAKEON_LAN: - callback_wakeon_lan(channel); - break; - - /* Callback function that notifies user to have become Link up. */ - case ETHER_CB_EVENT_ID_LINK_ON: - callback_link_on(channel); - break; - - /* Callback function that notifies user to have become Link down. */ - case ETHER_CB_EVENT_ID_LINK_OFF: - callback_link_off(channel); - break; - - default: - break; - } -} /* End of function callback_ether() */ - -/*********************************************************************************************************************** -* Function Name: callback_wakeon_lan -* Description : -* Arguments : channel - -* Ethernet channel number -* Return Value : none -***********************************************************************************************************************/ -static void callback_wakeon_lan(uint32_t channel) -{ - if (ETHER_CHANNEL_MAX > channel) - { - magic_packet_detect[channel] = 1; - - /* Please add necessary processing when magic packet is detected. */ - } -} /* End of function callback_wakeon_lan() */ - -/*********************************************************************************************************************** -* Function Name: callback_link_on -* Description : -* Arguments : channel - -* Ethernet channel number -* Return Value : none -***********************************************************************************************************************/ -static void callback_link_on(uint32_t channel) -{ - if (ETHER_CHANNEL_MAX > channel) - { - link_detect[channel] = ETHER_FLAG_ON_LINK_ON; - - /* Please add necessary processing when becoming Link up. */ - prvLinkStatusChange( 1 ); - } -} /* End of function callback_link_on() */ - -/*********************************************************************************************************************** -* Function Name: callback_link_off -* Description : -* Arguments : channel - -* Ethernet channel number -* Return Value : none -***********************************************************************************************************************/ -static void callback_link_off(uint32_t channel) -{ - if (ETHER_CHANNEL_MAX > channel) - { - link_detect[channel] = ETHER_FLAG_ON_LINK_OFF; - - /* Please add necessary processing when becoming Link down. */ - prvLinkStatusChange( 0 ); - } -} /* End of function ether_cb_link_off() */ - -/* End of File */ +/*********************************************************************************************************************** +* DISCLAIMER +* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No +* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all +* applicable laws, including copyright laws. +* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING +* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM +* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES +* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS +* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of +* this software. By using this software, you agree to the additional terms and conditions found by accessing the +* following link: +* http://www.renesas.com/disclaimer +* +* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved. +***********************************************************************************************************************/ +/*********************************************************************************************************************** +* File Name : ether_callback.c +* Version : ---- +* Description : This module solves all the world's problems +***********************************************************************************************************************/ +/********************************************************************************************************************** +* History : DD.MM.YYYY Version Description +* : 05.01.2015 ---- Clean up source code. +***********************************************************************************************************************/ + +/*********************************************************************************************************************** +Includes , "Project Includes" +***********************************************************************************************************************/ +#include "r_ether_rx_if.h" + +/*********************************************************************************************************************** +Private global variables and functions +***********************************************************************************************************************/ +int32_t callback_ether_regist(void); +void callback_ether(void * pparam); +static void callback_wakeon_lan(uint32_t channel); +static void callback_link_on(uint32_t channel); +static void callback_link_off(uint32_t channel); + +volatile uint8_t pause_enable = ETHER_FLAG_OFF; +volatile uint8_t magic_packet_detect[ETHER_CHANNEL_MAX]; +volatile uint8_t link_detect[ETHER_CHANNEL_MAX]; + +void EINT_Trig_isr(void *); + +/* + * When that Link Status changes, the following function will be called: + */ +void prvLinkStatusChange( BaseType_t xStatus ); + +/*********************************************************************************************************************** +* Function Name: callback_ether +* Description : Regist of callback function +* Arguments : - +* Return Value : 0: success, -1:failed +***********************************************************************************************************************/ +int32_t callback_ether_regist(void) +{ + ether_param_t param; + ether_cb_t cb_func; + + int32_t ret; + + /* Set the callback function (LAN cable connect/disconnect event) */ + cb_func.pcb_func = &callback_ether; + param.ether_callback = cb_func; + ret = R_ETHER_Control(CONTROL_SET_CALLBACK, param); + if (ETHER_SUCCESS != ret) + { + return -1; + } + + /* Set the callback function (Ether interrupt event) */ + cb_func.pcb_int_hnd = &EINT_Trig_isr; + param.ether_callback = cb_func; + ret = R_ETHER_Control(CONTROL_SET_INT_HANDLER, param); + if (ETHER_SUCCESS != ret) + { + return -1; + } + return 0; +} /* End of function callback_ether_regist() */ + +/*********************************************************************************************************************** +* Function Name: callback_ether +* Description : Sample of the callback function +* Arguments : pparam - +* +* Return Value : none +***********************************************************************************************************************/ +void callback_ether(void * pparam) +{ + ether_cb_arg_t * pdecode; + uint32_t channel; + + pdecode = (ether_cb_arg_t *)pparam; + channel = pdecode->channel; /* Get Ethernet channel number */ + + switch (pdecode->event_id) + { + /* Callback function that notifies user to have detected magic packet. */ + case ETHER_CB_EVENT_ID_WAKEON_LAN: + callback_wakeon_lan(channel); + break; + + /* Callback function that notifies user to have become Link up. */ + case ETHER_CB_EVENT_ID_LINK_ON: + callback_link_on(channel); + break; + + /* Callback function that notifies user to have become Link down. */ + case ETHER_CB_EVENT_ID_LINK_OFF: + callback_link_off(channel); + break; + + default: + break; + } +} /* End of function callback_ether() */ + +/*********************************************************************************************************************** +* Function Name: callback_wakeon_lan +* Description : +* Arguments : channel - +* Ethernet channel number +* Return Value : none +***********************************************************************************************************************/ +static void callback_wakeon_lan(uint32_t channel) +{ + if (ETHER_CHANNEL_MAX > channel) + { + magic_packet_detect[channel] = 1; + + /* Please add necessary processing when magic packet is detected. */ + } +} /* End of function callback_wakeon_lan() */ + +/*********************************************************************************************************************** +* Function Name: callback_link_on +* Description : +* Arguments : channel - +* Ethernet channel number +* Return Value : none +***********************************************************************************************************************/ +static void callback_link_on(uint32_t channel) +{ + if (ETHER_CHANNEL_MAX > channel) + { + link_detect[channel] = ETHER_FLAG_ON_LINK_ON; + + /* Please add necessary processing when becoming Link up. */ + prvLinkStatusChange( 1 ); + } +} /* End of function callback_link_on() */ + +/*********************************************************************************************************************** +* Function Name: callback_link_off +* Description : +* Arguments : channel - +* Ethernet channel number +* Return Value : none +***********************************************************************************************************************/ +static void callback_link_off(uint32_t channel) +{ + if (ETHER_CHANNEL_MAX > channel) + { + link_detect[channel] = ETHER_FLAG_ON_LINK_OFF; + + /* Please add necessary processing when becoming Link down. */ + prvLinkStatusChange( 0 ); + } +} /* End of function ether_cb_link_off() */ + +/* End of File */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/SH2A/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/SH2A/NetworkInterface.c index 44d19f3a9..adc603c52 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/SH2A/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/SH2A/NetworkInterface.c @@ -1,118 +1,118 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_Sockets.h" -#include "NetworkBufferManagement.h" - -/* Hardware includes. */ -#include "hwEthernet.h" - -/* Demo includes. */ -#include "NetworkInterface.h" - -#if ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES != 1 - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#else - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#endif - -/* When a packet is ready to be sent, if it cannot be sent immediately then the -task performing the transmit will block for niTX_BUFFER_FREE_WAIT -milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving -up. */ -#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_PERIOD_MS ) -#define niMAX_TX_ATTEMPTS ( 5 ) - -/* The length of the queue used to send interrupt status words from the -interrupt handler to the deferred handler task. */ -#define niINTERRUPT_QUEUE_LENGTH ( 10 ) - -/*-----------------------------------------------------------*/ - -/* - * A deferred interrupt handler task that processes - */ -extern void vEMACHandlerTask( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -/* The queue used to communicate Ethernet events with the IP task. */ -extern QueueHandle_t xNetworkEventQueue; - -/* The semaphore used to wake the deferred interrupt handler task when an Rx -interrupt is received. */ -SemaphoreHandle_t xEMACRxEventSemaphore = NULL; -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -BaseType_t xStatus, xReturn; -extern uint8_t ucMACAddress[ 6 ]; - - /* Initialise the MAC. */ - vInitEmac(); - - while( lEMACWaitForLink() != pdPASS ) - { - vTaskDelay( 20 ); - } - - vSemaphoreCreateBinary( xEMACRxEventSemaphore ); - configASSERT( xEMACRxEventSemaphore ); - - /* The handler task is created at the highest possible priority to - ensure the interrupt handler can return directly to it. */ - xTaskCreate( vEMACHandlerTask, "EMAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); - xReturn = pdPASS; - - return xReturn; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ -extern void vEMACCopyWrite( uint8_t * pucBuffer, uint16_t usLength ); - - vEMACCopyWrite( pxNetworkBuffer->pucBuffer, pxNetworkBuffer->xDataLength ); - - /* Finished with the network buffer. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_Sockets.h" +#include "NetworkBufferManagement.h" + +/* Hardware includes. */ +#include "hwEthernet.h" + +/* Demo includes. */ +#include "NetworkInterface.h" + +#if ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES != 1 + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +#else + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +#endif + +/* When a packet is ready to be sent, if it cannot be sent immediately then the +task performing the transmit will block for niTX_BUFFER_FREE_WAIT +milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving +up. */ +#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_PERIOD_MS ) +#define niMAX_TX_ATTEMPTS ( 5 ) + +/* The length of the queue used to send interrupt status words from the +interrupt handler to the deferred handler task. */ +#define niINTERRUPT_QUEUE_LENGTH ( 10 ) + +/*-----------------------------------------------------------*/ + +/* + * A deferred interrupt handler task that processes + */ +extern void vEMACHandlerTask( void *pvParameters ); + +/*-----------------------------------------------------------*/ + +/* The queue used to communicate Ethernet events with the IP task. */ +extern QueueHandle_t xNetworkEventQueue; + +/* The semaphore used to wake the deferred interrupt handler task when an Rx +interrupt is received. */ +SemaphoreHandle_t xEMACRxEventSemaphore = NULL; +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +BaseType_t xStatus, xReturn; +extern uint8_t ucMACAddress[ 6 ]; + + /* Initialise the MAC. */ + vInitEmac(); + + while( lEMACWaitForLink() != pdPASS ) + { + vTaskDelay( 20 ); + } + + vSemaphoreCreateBinary( xEMACRxEventSemaphore ); + configASSERT( xEMACRxEventSemaphore ); + + /* The handler task is created at the highest possible priority to + ensure the interrupt handler can return directly to it. */ + xTaskCreate( vEMACHandlerTask, "EMAC", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL ); + xReturn = pdPASS; + + return xReturn; +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ +extern void vEMACCopyWrite( uint8_t * pucBuffer, uint16_t usLength ); + + vEMACCopyWrite( pxNetworkBuffer->pucBuffer, pxNetworkBuffer->xDataLength ); + + /* Finished with the network buffer. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + + return pdTRUE; +} +/*-----------------------------------------------------------*/ + + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/NetworkInterface.c deleted file mode 100644 index 7de2902f8..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/NetworkInterface.c +++ /dev/null @@ -1,1193 +0,0 @@ -/* - * Some constants, hardware definitions and comments taken from ST's HAL driver - * library, COPYRIGHT(c) 2015 STMicroelectronics. - */ - -/* - * FreeRTOS+TCP V2.0.11 - * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_DNS.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -#include "phyHandling.h" - -/* ST includes. */ -#ifdef STM32F7xx - #include "stm32f7xx_hal.h" -#else - #include "stm32f4xx_hal.h" -#endif - -/* Interrupt events to process. Currently only the Rx event is processed -although code for other events is included to allow for possible future -expansion. */ -#define EMAC_IF_RX_EVENT 1UL -#define EMAC_IF_TX_EVENT 2UL -#define EMAC_IF_ERR_EVENT 4UL -#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) - -#define ETH_DMA_ALL_INTS \ - ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_ER | \ - ETH_DMA_IT_FBE | ETH_DMA_IT_RWT | ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | \ - ETH_DMA_IT_TU | ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) - - - -#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff ) /* The bits in the two byte IP header field that make up the fragment offset value. */ - -/* - * Most users will want a PHY that negotiates about - * the connection properties: speed, dmix and duplex. - * On some rare cases, you want to select what is being - * advertised, properties like MDIX and duplex. - */ - -#if !defined( ipconfigETHERNET_AN_ENABLE ) - /* Enable auto-negotiation */ - #define ipconfigETHERNET_AN_ENABLE 1 -#endif - -#if !defined( ipconfigETHERNET_AUTO_CROSS_ENABLE ) - #define ipconfigETHERNET_AUTO_CROSS_ENABLE 1 -#endif - -#if( ipconfigETHERNET_AN_ENABLE == 0 ) - /* - * The following three defines are only used in case there - * is no auto-negotiation. - */ - #if !defined( ipconfigETHERNET_CROSSED_LINK ) - #define ipconfigETHERNET_CROSSED_LINK 1 - #endif - - #if !defined( ipconfigETHERNET_USE_100MB ) - #define ipconfigETHERNET_USE_100MB 1 - #endif - - #if !defined( ipconfigETHERNET_USE_FULL_DUPLEX ) - #define ipconfigETHERNET_USE_FULL_DUPLEX 1 - #endif -#endif /* ipconfigETHERNET_AN_ENABLE == 0 */ - -/* Default the size of the stack used by the EMAC deferred handler task to twice -the size of the stack used by the idle task - but allow this to be overridden in -FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ -#ifndef configEMAC_TASK_STACK_SIZE - #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) -#endif - -/* Two choices must be made: RMII versus MII, -and the index of the PHY in use ( between 0 and 31 ). */ -#ifndef ipconfigUSE_RMII - #ifdef STM32F7xx - #define ipconfigUSE_RMII 1 - #else - #define ipconfigUSE_RMII 0 - #endif /* STM32F7xx */ -#endif /* ipconfigUSE_RMII */ - -#ifndef ipconfigPHY_INDEX - #ifdef STM32F7xx - #define ipconfigPHY_INDEX 0 - #else - #define ipconfigPHY_INDEX 1 - #endif /* STM32F7xx */ -#endif /* ipconfigPHY_INDEX */ - - -/*-----------------------------------------------------------*/ - -/* - * A deferred interrupt handler task that processes - */ -static void prvEMACHandlerTask( void *pvParameters ); - -/* - * Force a negotiation with the Switch or Router and wait for LS. - */ -static void prvEthernetUpdateConfig( BaseType_t xForce ); - -/* - * See if there is a new packet and forward it to the IP-task. - */ -static BaseType_t prvNetworkInterfaceInput( void ); - -#if( ipconfigUSE_LLMNR != 0 ) - /* - * For LLMNR, an extra MAC-address must be configured to - * be able to receive the multicast messages. - */ - static void prvMACAddressConfig(ETH_HandleTypeDef *heth, uint32_t ulIndex, uint8_t *Addr); -#endif - -/* - * Check if a given packet should be accepted. - */ -static BaseType_t xMayAcceptPacket( uint8_t *pcBuffer ); - -/* - * Initialise the TX descriptors. - */ -static void prvDMATxDescListInit( void ); - -/* - * Initialise the RX descriptors. - */ -static void prvDMARxDescListInit( void ); - -/* After packets have been sent, the network -buffers will be released. */ -static void vClearTXBuffers( void ); - -/*-----------------------------------------------------------*/ - -/* Bit map of outstanding ETH interrupt events for processing. Currently only -the Rx interrupt is handled, although code is included for other events to -enable future expansion. */ -static volatile uint32_t ulISREvents; - -#if( ipconfigUSE_LLMNR == 1 ) - static const uint8_t xLLMNR_MACAddress[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; -#endif - -static EthernetPhy_t xPhyObject; - -/* Ethernet handle. */ -static ETH_HandleTypeDef xETH; - -/* xTXDescriptorSemaphore is a counting semaphore with -a maximum count of ETH_TXBUFNB, which is the number of -DMA TX descriptors. */ -static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; - -/* - * Note: it is adviced to define both - * - * #define ipconfigZERO_COPY_RX_DRIVER 1 - * #define ipconfigZERO_COPY_TX_DRIVER 1 - * - * The method using memcpy is slower and probaly uses more RAM memory. - * The possibility is left in the code just for comparison. - * - * It is adviced to define ETH_TXBUFNB at least 4. Note that no - * TX buffers are allocated in a zero-copy driver. - */ -/* MAC buffers: ---------------------------------------------------------*/ - -/* Put the DMA descriptors in '.first_data'. -This is important for STM32F7, which has an L1 data cache. -The first 64KB of the SRAM is not cached. */ - -/* Ethernet Rx MA Descriptor */ -__attribute__ ((aligned (32))) -__attribute__ ((section(".first_data"))) - ETH_DMADescTypeDef DMARxDscrTab[ ETH_RXBUFNB ]; - -#if( ipconfigZERO_COPY_RX_DRIVER == 0 ) - /* Ethernet Receive Buffer */ - __ALIGN_BEGIN uint8_t Rx_Buff[ ETH_RXBUFNB ][ ETH_RX_BUF_SIZE ] __ALIGN_END; -#endif - -/* Ethernet Tx DMA Descriptor */ -__attribute__ ((aligned (32))) -__attribute__ ((section(".first_data"))) - ETH_DMADescTypeDef DMATxDscrTab[ ETH_TXBUFNB ]; - -#if( ipconfigZERO_COPY_TX_DRIVER == 0 ) - /* Ethernet Transmit Buffer */ - __ALIGN_BEGIN uint8_t Tx_Buff[ ETH_TXBUFNB ][ ETH_TX_BUF_SIZE ] __ALIGN_END; -#endif - -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - /* DMATxDescToClear points to the next TX DMA descriptor - that must be cleared by vClearTXBuffers(). */ - static __IO ETH_DMADescTypeDef *DMATxDescToClear; -#endif - -/* ucMACAddress as it appears in main.c */ -extern const uint8_t ucMACAddress[ 6 ]; - -/* Holds the handle of the task used as a deferred interrupt processor. The -handle is used so direct notifications can be sent to the task for all EMAC/DMA -related interrupts. */ -static TaskHandle_t xEMACTaskHandle = NULL; - -/* For local use only: describe the PHY's properties: */ -const PhyProperties_t xPHYProperties = -{ - #if( ipconfigETHERNET_AN_ENABLE != 0 ) - .ucSpeed = PHY_SPEED_AUTO, - .ucDuplex = PHY_DUPLEX_AUTO, - #else - #if( ipconfigETHERNET_USE_100MB != 0 ) - .ucSpeed = PHY_SPEED_100, - #else - .ucSpeed = PHY_SPEED_10, - #endif - - #if( ipconfigETHERNET_USE_FULL_DUPLEX != 0 ) - .duplex = PHY_DUPLEX_FULL, - #else - .duplex = PHY_DUPLEX_HALF, - #endif - #endif - - #if( ipconfigETHERNET_AN_ENABLE != 0 ) && ( ipconfigETHERNET_AUTO_CROSS_ENABLE != 0 ) - .ucMDI_X = PHY_MDIX_AUTO, - #elif( ipconfigETHERNET_CROSSED_LINK != 0 ) - .ucMDI_X = PHY_MDIX_CROSSED, - #else - .ucMDI_X = PHY_MDIX_DIRECT, - #endif -}; - -/*-----------------------------------------------------------*/ - -void HAL_ETH_RxCpltCallback( ETH_HandleTypeDef *heth ) -{ -BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - /* Ethernet RX-Complete callback function, elsewhere declared as weak. */ - ulISREvents |= EMAC_IF_RX_EVENT; - /* Wakeup the prvEMACHandlerTask. */ - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - } -} -/*-----------------------------------------------------------*/ - -void HAL_ETH_TxCpltCallback( ETH_HandleTypeDef *heth ) -{ -BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - /* This call-back is only useful in case packets are being sent - zero-copy. Once they're sent, the buffers will be released - by the function vClearTXBuffers(). */ - ulISREvents |= EMAC_IF_TX_EVENT; - /* Wakeup the prvEMACHandlerTask. */ - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - } - -} -/*-----------------------------------------------------------*/ - -static void vClearTXBuffers() -{ -__IO ETH_DMADescTypeDef *txLastDescriptor = xETH.TxDesc; -size_t uxCount = ( ( UBaseType_t ) ETH_TXBUFNB ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - NetworkBufferDescriptor_t *pxNetworkBuffer; - uint8_t *ucPayLoad; -#endif - - /* This function is called after a TX-completion interrupt. - It will release each Network Buffer used in xNetworkInterfaceOutput(). - 'uxCount' represents the number of descriptors given to DMA for transmission. - After sending a packet, the DMA will clear the 'ETH_DMATXDESC_OWN' bit. */ - while( ( uxCount > 0 ) && ( ( DMATxDescToClear->Status & ETH_DMATXDESC_OWN ) == 0 ) ) - { - if( ( DMATxDescToClear == txLastDescriptor ) && ( uxCount != ETH_TXBUFNB ) ) - { - break; - } - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - ucPayLoad = ( uint8_t * )DMATxDescToClear->Buffer1Addr; - - if( ucPayLoad != NULL ) - { - pxNetworkBuffer = pxPacketBuffer_to_NetworkBuffer( ucPayLoad ); - if( pxNetworkBuffer != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ) ; - } - DMATxDescToClear->Buffer1Addr = ( uint32_t )0u; - } - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - DMATxDescToClear = ( ETH_DMADescTypeDef * )( DMATxDescToClear->Buffer2NextDescAddr ); - - uxCount--; - /* Tell the counting semaphore that one more TX descriptor is available. */ - xSemaphoreGive( xTXDescriptorSemaphore ); - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -HAL_StatusTypeDef hal_eth_init_status; -BaseType_t xResult; - - if( xEMACTaskHandle == NULL ) - { - if( xTXDescriptorSemaphore == NULL ) - { - xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ETH_TXBUFNB, ( UBaseType_t ) ETH_TXBUFNB ); - configASSERT( xTXDescriptorSemaphore ); - } - - /* Initialise ETH */ - - xETH.Instance = ETH; -//#warning Enable auto-nego again - xETH.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; -// xETH.Init.AutoNegotiation = ETH_AUTONEGOTIATION_DISABLE; - xETH.Init.Speed = ETH_SPEED_100M; - xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - xETH.Init.PhyAddress = ipconfigPHY_INDEX; - - xETH.Init.MACAddr = ( uint8_t *) ucMACAddress; - xETH.Init.RxMode = ETH_RXINTERRUPT_MODE; - - /* using the ETH_CHECKSUM_BY_HARDWARE option: - both the IP and the protocol checksums will be calculated - by the peripheral. */ - xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; - - #if( ipconfigUSE_RMII != 0 ) - { - xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; - } - #else - { - xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_MII; - } - #endif /* ipconfigUSE_RMII */ - - hal_eth_init_status = HAL_ETH_Init( &xETH ); - - /* Only for inspection by debugger. */ - ( void ) hal_eth_init_status; - - /* Set the TxDesc and RxDesc pointers. */ - xETH.TxDesc = DMATxDscrTab; - xETH.RxDesc = DMARxDscrTab; - - /* Make sure that all unused fields are cleared. */ - memset( &DMATxDscrTab, '\0', sizeof( DMATxDscrTab ) ); - memset( &DMARxDscrTab, '\0', sizeof( DMARxDscrTab ) ); - - /* Initialize Tx Descriptors list: Chain Mode */ - DMATxDescToClear = DMATxDscrTab; - - /* Initialise TX-descriptors. */ - prvDMATxDescListInit(); - - /* Initialise RX-descriptors. */ - prvDMARxDescListInit(); - - #if( ipconfigUSE_LLMNR != 0 ) - { - /* Program the LLMNR address at index 1. */ - prvMACAddressConfig( &xETH, ETH_MAC_ADDRESS1, ( uint8_t *) xLLMNR_MACAddress ); - } - #endif - - /* Force a negotiation with the Switch or Router and wait for LS. */ - prvEthernetUpdateConfig( pdTRUE ); - - /* The deferred interrupt handler task is created at the highest - possible priority to ensure the interrupt handler can return directly - to it. The task's handle is stored in xEMACTaskHandle so interrupts can - notify the task when there is something to process. */ - xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); - } /* if( xEMACTaskHandle == NULL ) */ - - if( xPhyObject.ulLinkStatusMask != 0 ) - { - xETH.Instance->DMAIER |= ETH_DMA_ALL_INTS; - xResult = pdPASS; - FreeRTOS_printf( ( "Link Status is high\n" ) ) ; - } - else - { - /* For now pdFAIL will be returned. But prvEMACHandlerTask() is running - and it will keep on checking the PHY and set 'ulLinkStatusMask' when necessary. */ - xResult = pdFAIL; - FreeRTOS_printf( ( "Link Status still low\n" ) ) ; - } - /* When returning non-zero, the stack will become active and - start DHCP (in configured) */ - return xResult; -} -/*-----------------------------------------------------------*/ - -static void prvDMATxDescListInit() -{ -ETH_DMADescTypeDef *pxDMADescriptor; -BaseType_t xIndex; - - /* Get the pointer on the first member of the descriptor list */ - pxDMADescriptor = DMATxDscrTab; - - /* Fill each DMA descriptor with the right values */ - for( xIndex = 0; xIndex < ETH_TXBUFNB; xIndex++, pxDMADescriptor++ ) - { - /* Set Second Address Chained bit */ - pxDMADescriptor->Status = ETH_DMATXDESC_TCH; - - #if( ipconfigZERO_COPY_TX_DRIVER == 0 ) - { - /* Set Buffer1 address pointer */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )( Tx_Buff[ xIndex ] ); - } - #endif - - if( xETH.Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE ) - { - /* Set the DMA Tx descriptors checksum insertion for TCP, UDP, and ICMP */ - pxDMADescriptor->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if( xIndex < ETH_TXBUFNB - 1 ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMADescriptor + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMATxDscrTab; - } - } - - /* Set Transmit Descriptor List Address Register */ - xETH.Instance->DMATDLAR = ( uint32_t ) DMATxDscrTab; -} -/*-----------------------------------------------------------*/ - -static void prvDMARxDescListInit() -{ -ETH_DMADescTypeDef *pxDMADescriptor; -BaseType_t xIndex; - /* - * RX-descriptors. - */ - - /* Get the pointer on the first member of the descriptor list */ - pxDMADescriptor = DMARxDscrTab; - - /* Fill each DMA descriptor with the right values */ - for( xIndex = 0; xIndex < ETH_RXBUFNB; xIndex++, pxDMADescriptor++ ) - { - - /* Set Buffer1 size and Second Address Chained bit */ - pxDMADescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | (uint32_t)ETH_RX_BUF_SIZE; - - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Set Buffer1 address pointer */ - NetworkBufferDescriptor_t *pxBuffer; - - pxBuffer = pxGetNetworkBufferWithDescriptor( ETH_RX_BUF_SIZE, 100ul ); - /* If the assert below fails, make sure that there are at least 'ETH_RXBUFNB' - Network Buffers available during start-up ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) */ - configASSERT( pxBuffer != NULL ); - if( pxBuffer != NULL ) - { - pxDMADescriptor->Buffer1Addr = (uint32_t)pxBuffer->pucEthernetBuffer; - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - } - } - #else - { - /* Set Buffer1 address pointer */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )( Rx_Buff[ xIndex ] ); - /* Set Own bit of the Rx descriptor Status */ - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - } - #endif - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if( xIndex < ETH_RXBUFNB - 1 ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t )( pxDMADescriptor + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMARxDscrTab; - } - - } - /* Set Receive Descriptor List Address Register */ - xETH.Instance->DMARDLAR = ( uint32_t ) DMARxDscrTab; -} -/*-----------------------------------------------------------*/ - -static void prvMACAddressConfig(ETH_HandleTypeDef *heth, uint32_t ulIndex, uint8_t *Addr) -{ -uint32_t ulTempReg; - - /* Calculate the selected MAC address high register. */ - ulTempReg = 0x80000000ul | ( ( uint32_t ) Addr[ 5 ] << 8 ) | ( uint32_t ) Addr[ 4 ]; - - /* Load the selected MAC address high register. */ - ( *(__IO uint32_t *)( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + ulIndex ) ) ) = ulTempReg; - - /* Calculate the selected MAC address low register. */ - ulTempReg = ( ( uint32_t ) Addr[ 3 ] << 24 ) | ( ( uint32_t ) Addr[ 2 ] << 16 ) | ( ( uint32_t ) Addr[ 1 ] << 8 ) | Addr[ 0 ]; - - /* Load the selected MAC address low register */ - ( *(__IO uint32_t *) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + ulIndex ) ) ) = ulTempReg; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t bReleaseAfterSend ) -{ -BaseType_t xReturn = pdFAIL; -uint32_t ulTransmitSize = 0; -__IO ETH_DMADescTypeDef *pxDmaTxDesc; -/* Do not wait too long for a free TX DMA buffer. */ -const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50u ); - - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - { - ProtocolPacket_t *pxPacket; - - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - configASSERT( bReleaseAfterSend != 0 ); - } - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - - /* If the peripheral must calculate the checksum, it wants - the protocol checksum to have a value of zero. */ - pxPacket = ( ProtocolPacket_t * ) ( pxDescriptor->pucEthernetBuffer ); - - if( pxPacket->xICMPPacket.xIPHeader.ucProtocol == ipPROTOCOL_ICMP ) - { - pxPacket->xICMPPacket.xICMPHeader.usChecksum = ( uint16_t )0u; - } - } - #endif - - /* Open a do {} while ( 0 ) loop to be able to call break. */ - do - { - if( xPhyObject.ulLinkStatusMask != 0 ) - { - if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) - { - /* Time-out waiting for a free TX descriptor. */ - break; - } - - /* This function does the actual transmission of the packet. The packet is - contained in 'pxDescriptor' that is passed to the function. */ - pxDmaTxDesc = xETH.TxDesc; - - /* Is this buffer available? */ - configASSERT ( ( pxDmaTxDesc->Status & ETH_DMATXDESC_OWN ) == 0 ); - - { - /* Is this buffer available? */ - /* Get bytes in current buffer. */ - ulTransmitSize = pxDescriptor->xDataLength; - - if( ulTransmitSize > ETH_TX_BUF_SIZE ) - { - ulTransmitSize = ETH_TX_BUF_SIZE; - } - - #if( ipconfigZERO_COPY_TX_DRIVER == 0 ) - { - /* Copy the bytes. */ - memcpy( ( void * ) pxDmaTxDesc->Buffer1Addr, pxDescriptor->pucEthernetBuffer, ulTransmitSize ); - } - #else - { - /* Move the buffer. */ - pxDmaTxDesc->Buffer1Addr = ( uint32_t )pxDescriptor->pucEthernetBuffer; - /* The Network Buffer has been passed to DMA, no need to release it. */ - bReleaseAfterSend = pdFALSE_UNSIGNED; - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - /* Ask to set the IPv4 checksum. - Also need an Interrupt on Completion so that 'vClearTXBuffers()' will be called.. */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_CIC_TCPUDPICMP_FULL | ETH_DMATXDESC_IC; - - /* Prepare transmit descriptors to give to DMA. */ - - /* Set LAST and FIRST segment */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; - /* Set frame size */ - pxDmaTxDesc->ControlBufferSize = ( ulTransmitSize & ETH_DMATXDESC_TBS1 ); - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_OWN; - - /* Point to next descriptor */ - xETH.TxDesc = ( ETH_DMADescTypeDef * ) ( xETH.TxDesc->Buffer2NextDescAddr ); - /* Ensure completion of memory access */ - __DSB(); - /* Resume DMA transmission*/ - xETH.Instance->DMATPDR = 0; - iptraceNETWORK_INTERFACE_TRANSMIT(); - xReturn = pdPASS; - } - } - else - { - /* The PHY has no Link Status, packet shall be dropped. */ - } - } while( 0 ); - /* The buffer has been sent so can be released. */ - if( bReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static BaseType_t xMayAcceptPacket( uint8_t *pcBuffer ) -{ -const ProtocolPacket_t *pxProtPacket = ( const ProtocolPacket_t * )pcBuffer; - - switch( pxProtPacket->xTCPPacket.xEthernetHeader.usFrameType ) - { - case ipARP_FRAME_TYPE: - /* Check it later. */ - return pdTRUE; - case ipIPv4_FRAME_TYPE: - /* Check it here. */ - break; - default: - /* Refuse the packet. */ - return pdFALSE; - } - - #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - { - const IPHeader_t *pxIPHeader = &(pxProtPacket->xTCPPacket.xIPHeader); - uint32_t ulDestinationIPAddress; - - /* Ensure that the incoming packet is not fragmented (only outgoing packets - * can be fragmented) as these are the only handled IP frames currently. */ - if( ( pxIPHeader->usFragmentOffset & FreeRTOS_ntohs( ipFRAGMENT_OFFSET_BIT_MASK ) ) != 0U ) - { - return pdFALSE; - } - /* HT: Might want to make the following configurable because - * most IP messages have a standard length of 20 bytes */ - - /* 0x45 means: IPv4 with an IP header of 5 x 4 = 20 bytes - * 0x47 means: IPv4 with an IP header of 7 x 4 = 28 bytes */ - if( pxIPHeader->ucVersionHeaderLength < 0x45 || pxIPHeader->ucVersionHeaderLength > 0x4F ) - { - return pdFALSE; - } - - ulDestinationIPAddress = pxIPHeader->ulDestinationIPAddress; - /* Is the packet for this node? */ - if( ( ulDestinationIPAddress != *ipLOCAL_IP_ADDRESS_POINTER ) && - /* Is it a broadcast address x.x.x.255 ? */ - ( ( FreeRTOS_ntohl( ulDestinationIPAddress ) & 0xff ) != 0xff ) && - #if( ipconfigUSE_LLMNR == 1 ) - ( ulDestinationIPAddress != ipLLMNR_IP_ADDR ) && - #endif - ( *ipLOCAL_IP_ADDRESS_POINTER != 0 ) ) { - FreeRTOS_printf( ( "Drop IP %lxip\n", FreeRTOS_ntohl( ulDestinationIPAddress ) ) ); - return pdFALSE; - } - - if( pxIPHeader->ucProtocol == ipPROTOCOL_UDP ) - { - uint16_t port = pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort; - - if( ( xPortHasUDPSocket( port ) == pdFALSE ) - #if ipconfigUSE_LLMNR == 1 - && ( port != FreeRTOS_ntohs( ipLLMNR_PORT ) ) - #endif - #if ipconfigUSE_NBNS == 1 - && ( port != FreeRTOS_ntohs( ipNBNS_PORT ) ) - #endif - #if ipconfigUSE_DNS == 1 - && ( pxProtPacket->xUDPPacket.xUDPHeader.usSourcePort != FreeRTOS_ntohs( ipDNS_PORT ) ) - #endif - ) { - /* Drop this packet, not for this device. */ - return pdFALSE; - } - } - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvNetworkInterfaceInput( void ) -{ -NetworkBufferDescriptor_t *pxCurDescriptor; -NetworkBufferDescriptor_t *pxNewDescriptor = NULL; -BaseType_t xReceivedLength, xAccepted; -__IO ETH_DMADescTypeDef *pxDMARxDescriptor; -xIPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; -const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); -uint8_t *pucBuffer; - - pxDMARxDescriptor = xETH.RxDesc; - - if( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_OWN) == 0 ) - { - /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ - xReceivedLength = ( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4; - - pucBuffer = (uint8_t *) pxDMARxDescriptor->Buffer1Addr; - - /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ - /* Chained Mode */ - /* Selects the next DMA Rx descriptor list for next buffer to read */ - xETH.RxDesc = ( ETH_DMADescTypeDef* )pxDMARxDescriptor->Buffer2NextDescAddr; - } - else - { - xReceivedLength = 0; - } - - /* Obtain the size of the packet and put it into the "usReceivedLength" variable. */ - - /* get received frame */ - if( xReceivedLength > 0ul ) - { - /* In order to make the code easier and faster, only packets in a single buffer - will be accepted. This can be done by making the buffers large enough to - hold a complete Ethernet packet (1536 bytes). - Therefore, two sanity checks: */ - configASSERT( xReceivedLength <= ETH_RX_BUF_SIZE ); - - if( ( pxDMARxDescriptor->Status & ( ETH_DMARXDESC_CE | ETH_DMARXDESC_IPV4HCE | ETH_DMARXDESC_FT ) ) != ETH_DMARXDESC_FT ) - { - /* Not an Ethernet frame-type or a checmsum error. */ - xAccepted = pdFALSE; - } - else - { - /* See if this packet must be handled. */ - xAccepted = xMayAcceptPacket( pucBuffer ); - } - - if( xAccepted != pdFALSE ) - { - /* The packet wil be accepted, but check first if a new Network Buffer can - be obtained. If not, the packet will still be dropped. */ - pxNewDescriptor = pxGetNetworkBufferWithDescriptor( ETH_RX_BUF_SIZE, xDescriptorWaitTime ); - - if( pxNewDescriptor == NULL ) - { - /* A new descriptor can not be allocated now. This packet will be dropped. */ - xAccepted = pdFALSE; - } - } - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Find out which Network Buffer was originally passed to the descriptor. */ - pxCurDescriptor = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); - configASSERT( pxCurDescriptor != NULL ); - } - #else - { - /* In this mode, the two descriptors are the same. */ - pxCurDescriptor = pxNewDescriptor; - if( pxNewDescriptor != NULL ) - { - /* The packet is acepted and a new Network Buffer was created, - copy data to the Network Bufffer. */ - memcpy( pxNewDescriptor->pucEthernetBuffer, pucBuffer, xReceivedLength ); - } - } - #endif - - if( xAccepted != pdFALSE ) - { - pxCurDescriptor->xDataLength = xReceivedLength; - xRxEvent.pvData = ( void * ) pxCurDescriptor; - - /* Pass the data to the TCP/IP task for processing. */ - if( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime ) == pdFALSE ) - { - /* Could not send the descriptor into the TCP/IP stack, it - must be released. */ - vReleaseNetworkBufferAndDescriptor( pxCurDescriptor ); - iptraceETHERNET_RX_EVENT_LOST(); - } - else - { - iptraceNETWORK_INTERFACE_RECEIVE(); - } - } - - /* Release descriptors to DMA */ - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Set Buffer1 address pointer */ - if( pxNewDescriptor != NULL ) - { - pxDMARxDescriptor->Buffer1Addr = (uint32_t)pxNewDescriptor->pucEthernetBuffer; - } - else - { - /* The packet was dropped and the same Network - Buffer will be used to receive a new packet. */ - } - } - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - - /* Set Buffer1 size and Second Address Chained bit */ - pxDMARxDescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | (uint32_t)ETH_RX_BUF_SIZE; - pxDMARxDescriptor->Status = ETH_DMARXDESC_OWN; - - /* Ensure completion of memory access */ - __DSB(); - /* When Rx Buffer unavailable flag is set clear it and resume - reception. */ - if( ( xETH.Instance->DMASR & ETH_DMASR_RBUS ) != 0 ) - { - /* Clear RBUS ETHERNET DMA flag. */ - xETH.Instance->DMASR = ETH_DMASR_RBUS; - - /* Resume DMA reception. */ - xETH.Instance->DMARPDR = 0; - } - } - - return ( xReceivedLength > 0 ); -} -/*-----------------------------------------------------------*/ - - -BaseType_t xSTM32_PhyRead( BaseType_t xAddress, BaseType_t xRegister, uint32_t *pulValue ) -{ -uint16_t usPrevAddress = xETH.Init.PhyAddress; -BaseType_t xResult; -HAL_StatusTypeDef xHALResult; - - xETH.Init.PhyAddress = xAddress; - xHALResult = HAL_ETH_ReadPHYRegister( &xETH, ( uint16_t )xRegister, pulValue ); - xETH.Init.PhyAddress = usPrevAddress; - - if( xHALResult == HAL_OK ) - { - xResult = 0; - } - else - { - xResult = -1; - } - return xResult; -} -/*-----------------------------------------------------------*/ - -BaseType_t xSTM32_PhyWrite( BaseType_t xAddress, BaseType_t xRegister, uint32_t ulValue ) -{ -uint16_t usPrevAddress = xETH.Init.PhyAddress; -BaseType_t xResult; -HAL_StatusTypeDef xHALResult; - - xETH.Init.PhyAddress = xAddress; - xHALResult = HAL_ETH_WritePHYRegister( &xETH, ( uint16_t )xRegister, ulValue ); - xETH.Init.PhyAddress = usPrevAddress; - - if( xHALResult == HAL_OK ) - { - xResult = 0; - } - else - { - xResult = -1; - } - return xResult; -} -/*-----------------------------------------------------------*/ - -void phy_test() -{ -BaseType_t xPhyCount; -BaseType_t xPhyIndex; - - vPhyInitialise( &xPhyObject, xSTM32_PhyRead, xSTM32_PhyWrite ); - xPhyCount = xPhyDiscover( &xPhyObject ); - FreeRTOS_printf( ( "PHY count %ld\n", xPhyCount ) ); - for( xPhyIndex = 0; xPhyIndex < xPhyCount; xPhyIndex++ ) - { - FreeRTOS_printf( ( "PHY[%d] at address %d ( 0x%08X )\n", - xPhyIndex, - xPhyObject.ucPhyIndexes[ xPhyIndex ], - xPhyObject.ulPhyIDs[ xPhyIndex ] ) ); - - } - -} - -void vMACBProbePhy( void ) -{ - vPhyInitialise( &xPhyObject, xSTM32_PhyRead, xSTM32_PhyWrite ); - xPhyDiscover( &xPhyObject ); - xPhyConfigure( &xPhyObject, &xPHYProperties ); -} -/*-----------------------------------------------------------*/ - -static void prvEthernetUpdateConfig( BaseType_t xForce ) -{ - FreeRTOS_printf( ( "prvEthernetUpdateConfig: LS mask %02X Force %d\n", - xPhyObject.ulLinkStatusMask, - ( int )xForce ) ); - - if( ( xForce != pdFALSE ) || ( xPhyObject.ulLinkStatusMask != 0 ) ) - { - /* Restart the auto-negotiation. */ - if( xETH.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE ) - { - xPhyStartAutoNegotiation( &xPhyObject, xPhyGetMask( &xPhyObject ) ); - - /* Configure the MAC with the Duplex Mode fixed by the - auto-negotiation process. */ - if( xPhyObject.xPhyProperties.ucDuplex == PHY_DUPLEX_FULL ) - { - xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - } - else - { - xETH.Init.DuplexMode = ETH_MODE_HALFDUPLEX; - } - - /* Configure the MAC with the speed fixed by the - auto-negotiation process. */ - if( xPhyObject.xPhyProperties.ucSpeed == PHY_SPEED_10 ) - { - xETH.Init.Speed = ETH_SPEED_10M; - } - else - { - xETH.Init.Speed = ETH_SPEED_100M; - } - } - else /* AutoNegotiation Disable */ - { - /* Check parameters */ - assert_param( IS_ETH_SPEED( xETH.Init.Speed ) ); - assert_param( IS_ETH_DUPLEX_MODE( xETH.Init.DuplexMode ) ); - - if( xETH.Init.DuplexMode == ETH_MODE_FULLDUPLEX ) - { - xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_HALF; - } - else - { - xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_FULL; - } - - if( xETH.Init.Speed == ETH_SPEED_10M ) - { - xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_10; - } - else - { - xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_100; - } - - xPhyObject.xPhyPreferences.ucMDI_X = PHY_MDIX_AUTO; - - /* Use predefined (fixed) configuration. */ - xPhyFixedValue( &xPhyObject, xPhyGetMask( &xPhyObject ) ); - } - - /* ETHERNET MAC Re-Configuration */ - HAL_ETH_ConfigMAC( &xETH, (ETH_MACInitTypeDef *) NULL); - - /* Restart MAC interface */ - HAL_ETH_Start( &xETH); - } - else - { - /* Stop MAC interface */ - HAL_ETH_Stop( &xETH ); - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xGetPhyLinkStatus( void ) -{ -BaseType_t xReturn; - - if( xPhyObject.ulLinkStatusMask != 0 ) - { - xReturn = pdPASS; - } - else - { - xReturn = pdFAIL; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -#define niBUFFER_1_PACKET_SIZE 1536 - -static __attribute__ ((section(".first_data"))) uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] __attribute__ ( ( aligned( 32 ) ) ); - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ - -uint8_t *ucRAMBuffer = ucNetworkPackets; -uint32_t ul; - - for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) - { - pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; - *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); - ucRAMBuffer += niBUFFER_1_PACKET_SIZE; - } -} -/*-----------------------------------------------------------*/ - -static void prvEMACHandlerTask( void *pvParameters ) -{ -UBaseType_t uxLastMinBufferCount = 0; -#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) -UBaseType_t uxLastMinQueueSpace = 0; -#endif -UBaseType_t uxCurrentCount; -BaseType_t xResult; -const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - for( ;; ) - { - xResult = 0; - uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); - if( uxLastMinBufferCount != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); - } - - if( xTXDescriptorSemaphore != NULL ) - { - static UBaseType_t uxLowestSemCount = ( UBaseType_t ) ETH_TXBUFNB - 1; - - uxCurrentCount = uxSemaphoreGetCount( xTXDescriptorSemaphore ); - if( uxLowestSemCount > uxCurrentCount ) - { - uxLowestSemCount = uxCurrentCount; - FreeRTOS_printf( ( "TX DMA buffers: lowest %lu\n", uxLowestSemCount ) ); - } - - } - - #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - uxCurrentCount = uxGetMinimumIPQueueSpace(); - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - - if( ( ulISREvents & EMAC_IF_ALL_EVENT ) == 0 ) - { - /* No events to process now, wait for the next. */ - ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); - } - - if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) - { - ulISREvents &= ~EMAC_IF_RX_EVENT; - - xResult = prvNetworkInterfaceInput(); - if( xResult > 0 ) - { - while( prvNetworkInterfaceInput() > 0 ) - { - } - } - } - - if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) - { - /* Code to release TX buffers if zero-copy is used. */ - ulISREvents &= ~EMAC_IF_TX_EVENT; - /* Check if DMA packets have been delivered. */ - vClearTXBuffers(); - } - - if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) - { - /* Future extension: logging about errors that occurred. */ - ulISREvents &= ~EMAC_IF_ERR_EVENT; - } - if( xPhyCheckLinkStatus( &xPhyObject, xResult ) != 0 ) - { - /* Something has changed to a Link Status, need re-check. */ - prvEthernetUpdateConfig( pdFALSE ); - } - } -} -/*-----------------------------------------------------------*/ - -void ETH_IRQHandler( void ) -{ - HAL_ETH_IRQHandler( &xETH ); -} - diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.c deleted file mode 100644 index 6f335c512..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.c +++ /dev/null @@ -1,1835 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f7xx_hal_eth.c - * @author MCD Application Team - * @version V1.3.2 - * @date 26-June-2015 - * @brief ETH HAL module driver. - * This file provides firmware functions to manage the following - * functionalities of the Ethernet (ETH) peripheral: - * + Initialization and de-initialization functions - * + IO operation functions - * + Peripheral Control functions - * + Peripheral State and Errors functions - * - @verbatim - ============================================================================== - ##### How to use this driver ##### - ============================================================================== - [..] - (#)Declare a ETH_HandleTypeDef handle structure, for example: - ETH_HandleTypeDef heth; - - (#)Fill parameters of Init structure in heth handle - - (#)Call HAL_ETH_Init() API to initialize the Ethernet peripheral (MAC, DMA, ...) - - (#)Initialize the ETH low level resources through the HAL_ETH_MspInit() API: - (##) Enable the Ethernet interface clock using - (+++) __HAL_RCC_ETHMAC_CLK_ENABLE(); - (+++) __HAL_RCC_ETHMACTX_CLK_ENABLE(); - (+++) __HAL_RCC_ETHMACRX_CLK_ENABLE(); - - (##) Initialize the related GPIO clocks - (##) Configure Ethernet pin-out - (##) Configure Ethernet NVIC interrupt (IT mode) - - (#)Initialize Ethernet DMA Descriptors in chain mode and point to allocated buffers: - (##) HAL_ETH_DMATxDescListInit(); for Transmission process - (##) HAL_ETH_DMARxDescListInit(); for Reception process - - (#)Enable MAC and DMA transmission and reception: - (##) HAL_ETH_Start(); - - (#)Prepare ETH DMA TX Descriptors and give the hand to ETH DMA to transfer - the frame to MAC TX FIFO: - (##) HAL_ETH_TransmitFrame(); - - (#)Poll for a received frame in ETH RX DMA Descriptors and get received - frame parameters - (##) HAL_ETH_GetReceivedFrame(); (should be called into an infinite loop) - - (#) Get a received frame when an ETH RX interrupt occurs: - (##) HAL_ETH_GetReceivedFrame_IT(); (called in IT mode only) - - (#) Communicate with external PHY device: - (##) Read a specific register from the PHY - HAL_ETH_ReadPHYRegister(); - (##) Write data to a specific RHY register: - HAL_ETH_WritePHYRegister(); - - (#) Configure the Ethernet MAC after ETH peripheral initialization - HAL_ETH_ConfigMAC(); all MAC parameters should be filled. - - (#) Configure the Ethernet DMA after ETH peripheral initialization - HAL_ETH_ConfigDMA(); all DMA parameters should be filled. - - -@- The PTP protocol and the DMA descriptors ring mode are not supported - in this driver - - @endverbatim - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2015 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f7xx_hal.h" - - -int lUDPLoggingPrintf( const char *pcFormatString, ... ); - -/** @addtogroup STM32F4xx_HAL_Driver - * @{ - */ - -/** @defgroup ETH ETH - * @brief ETH HAL module driver - * @{ - */ - -#if !defined( ARRAY_SIZE ) - #define ARRAY_SIZE( x ) ( sizeof ( x ) / sizeof ( x )[ 0 ] ) -#endif - -#ifdef HAL_ETH_MODULE_ENABLED - -#if defined(STM32F7xx) - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/** @defgroup ETH_Private_Constants ETH Private Constants - * @{ - */ -#define LINKED_STATE_TIMEOUT_VALUE ((uint32_t)2000) /* 2000 ms */ -#define AUTONEGO_COMPLETED_TIMEOUT_VALUE ((uint32_t)1000) /* 1000 ms */ - -/** - * @} - */ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -/* Private function prototypes -----------------------------------------------*/ -/** @defgroup ETH_Private_Functions ETH Private Functions - * @{ - */ -static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err); -static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr); -static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth); -static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth); -static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth); -static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth); -static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth); -static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth); -static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth); -static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth); -static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth); - -/** - * @} - */ -/* Private functions ---------------------------------------------------------*/ - -/** @defgroup ETH_Exported_Functions ETH Exported Functions - * @{ - */ - -/** @defgroup ETH_Exported_Functions_Group1 Initialization and de-initialization functions - * @brief Initialization and Configuration functions - * - @verbatim - =============================================================================== - ##### Initialization and de-initialization functions ##### - =============================================================================== - [..] This section provides functions allowing to: - (+) Initialize and configure the Ethernet peripheral - (+) De-initialize the Ethernet peripheral - - @endverbatim - * @{ - */ -extern void vMACBProbePhy ( void ); - -/** - * @brief Initializes the Ethernet MAC and DMA according to default - * parameters. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = 0; - uint32_t hclk = 60000000; - uint32_t err = ETH_SUCCESS; - - /* Check the ETH peripheral state */ - if( heth == NULL ) - { - return HAL_ERROR; - } - - /* Check parameters */ - assert_param(IS_ETH_AUTONEGOTIATION(heth->Init.AutoNegotiation)); - assert_param(IS_ETH_RX_MODE(heth->Init.RxMode)); - assert_param(IS_ETH_CHECKSUM_MODE(heth->Init.ChecksumMode)); - assert_param(IS_ETH_MEDIA_INTERFACE(heth->Init.MediaInterface)); - - if( heth->State == HAL_ETH_STATE_RESET ) - { - /* Init the low level hardware : GPIO, CLOCK, NVIC. */ - HAL_ETH_MspInit( heth ); - } - - /* Enable SYSCFG Clock */ - __HAL_RCC_SYSCFG_CLK_ENABLE(); - - /* Select MII or RMII Mode*/ - SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL); - SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface; - - /* Ethernet Software reset */ - /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ - /* After reset all the registers holds their respective reset values */ - /* Also enable EDFE: Enhanced descriptor format enable. */ -// heth->Instance->DMABMR |= ETH_DMABMR_SR | ETH_DMABMR_EDE; - heth->Instance->DMABMR |= ETH_DMABMR_SR; - - /* Wait for software reset */ - while ((heth->Instance->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) - { - } - - /*-------------------------------- MAC Initialization ----------------------*/ - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - /* Clear CSR Clock Range CR[2:0] bits */ - tmpreg &= ETH_MACMIIAR_CR_MASK; - - /* Get hclk frequency value (168,000,000) */ - hclk = HAL_RCC_GetHCLKFreq(); - - /* Set CR bits depending on hclk value */ - if( ( hclk >= 20000000 ) && ( hclk < 35000000 ) ) - { - /* CSR Clock Range between 20-35 MHz */ - tmpreg |= (uint32_t) ETH_MACMIIAR_CR_Div16; - } - else if( ( hclk >= 35000000 ) && ( hclk < 60000000 ) ) - { - /* CSR Clock Range between 35-60 MHz */ - tmpreg |= ( uint32_t ) ETH_MACMIIAR_CR_Div26; - } - else if((hclk >= 60000000 ) && ( hclk < 100000000 ) ) - { - /* CSR Clock Range between 60-100 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; - } - else if((hclk >= 100000000 ) && ( hclk < 150000000)) - { - /* CSR Clock Range between 100-150 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; - } - else /* ((hclk >= 150000000 ) && ( hclk <= 168000000)) */ - { - /* CSR Clock Range between 150-168 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102; - } - - /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ - heth->Instance->MACMIIAR = (uint32_t)tmpreg; - - /* Initialise the MACB and set all PHY properties */ - vMACBProbePhy(); - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - - /* Set ETH HAL State to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief De-Initializes the ETH peripheral. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth) -{ - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* De-Init the low level hardware : GPIO, CLOCK, NVIC. */ - HAL_ETH_MspDeInit( heth ); - - /* Set ETH HAL state to Disabled */ - heth->State= HAL_ETH_STATE_RESET; - - /* Release Lock */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Initializes the DMA Tx descriptors in chain mode. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param DMATxDescTab: Pointer to the first Tx desc list - * @param TxBuff: Pointer to the first TxBuffer list - * @param TxBuffCount: Number of the used Tx desc in the list - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *pxDMATable, uint8_t *ucDataBuffer, uint32_t ulBufferCount) -{ - uint32_t i = 0; - ETH_DMADescTypeDef *pxDMADescriptor; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Set the TxDesc pointer with the first one of the pxDMATable list */ - heth->TxDesc = pxDMATable; - - /* Fill each DMA descriptor with the right values */ - for( i=0; i < ulBufferCount; i++ ) - { - /* Get the pointer on the ith member of the descriptor list */ - pxDMADescriptor = pxDMATable + i; - - /* Set Second Address Chained bit */ - pxDMADescriptor->Status = ETH_DMATXDESC_TCH; - - pxDMADescriptor->ControlBufferSize = 0; - - /* Set Buffer1 address pointer */ - if( ucDataBuffer != NULL ) - { - pxDMADescriptor->Buffer1Addr = ( uint32_t )( &ucDataBuffer[ i * ETH_TX_BUF_SIZE ] ); - } - else - { - /* Buffer space is not provided because it uses zero-copy transmissions. */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )0u; - } - - if (heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) - { - /* Set the DMA Tx descriptors checksum insertion for TCP, UDP, and ICMP */ - pxDMADescriptor->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if(i < ( ulBufferCount - 1 ) ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMATable + i + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) pxDMATable; - } - } - - /* Set Transmit Descriptor List Address Register */ - heth->Instance->DMATDLAR = ( uint32_t ) pxDMATable; - - /* Set ETH HAL State to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Initializes the DMA Rx descriptors in chain mode. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param DMARxDescTab: Pointer to the first Rx desc list - * @param RxBuff: Pointer to the first RxBuffer list - * @param RxBuffCount: Number of the used Rx desc in the list - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *pxDMATable, uint8_t *ucDataBuffer, uint32_t ulBufferCount) -{ - uint32_t i = 0; - ETH_DMADescTypeDef *pxDMADescriptor; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Set the RxDesc pointer with the first one of the pxDMATable list */ - heth->RxDesc = pxDMATable; - - /* Fill each DMA descriptor with the right values */ - for(i=0; i < ulBufferCount; i++) - { - /* Get the pointer on the ith member of the descriptor list */ - pxDMADescriptor = pxDMATable+i; - - /* Set Own bit of the Rx descriptor Status */ - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - - /* Set Buffer1 size and Second Address Chained bit */ - pxDMADescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE; - - /* Set Buffer1 address pointer */ - if( ucDataBuffer != NULL ) - { - pxDMADescriptor->Buffer1Addr = ( uint32_t )( &ucDataBuffer[ i * ETH_RX_BUF_SIZE ] ); - } - else - { - /* Buffer space is not provided because it uses zero-copy reception. */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )0u; - } - - if( heth->Init.RxMode == ETH_RXINTERRUPT_MODE ) - { - /* Enable Ethernet DMA Rx Descriptor interrupt */ - pxDMADescriptor->ControlBufferSize &= ~ETH_DMARXDESC_DIC; - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if(i < (ulBufferCount-1)) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = (uint32_t)(pxDMATable+i+1); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) pxDMATable; - } - } - - /* Set Receive Descriptor List Address Register */ - heth->Instance->DMARDLAR = ( uint32_t ) pxDMATable; - - /* Set ETH HAL State to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Initializes the ETH MSP. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_MspInit could be implemented in the user file - */ -} - -/** - * @brief DeInitializes ETH MSP. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_MspDeInit could be implemented in the user file - */ -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group2 IO operation functions - * @brief Data transfers functions - * - @verbatim - ============================================================================== - ##### IO operation functions ##### - ============================================================================== - [..] This section provides functions allowing to: - (+) Transmit a frame - HAL_ETH_TransmitFrame(); - (+) Receive a frame - HAL_ETH_GetReceivedFrame(); - HAL_ETH_GetReceivedFrame_IT(); - (+) Read from an External PHY register - HAL_ETH_ReadPHYRegister(); - (+) Write to an External PHY register - HAL_ETH_WritePHYRegister(); - - @endverbatim - - * @{ - */ - -/** - * @brief Sends an Ethernet frame. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param FrameLength: Amount of data to be sent - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength) -{ - uint32_t bufcount = 0, size = 0, i = 0; - __IO ETH_DMADescTypeDef *pxDmaTxDesc = heth->TxDesc; - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - if( FrameLength == 0 ) - { - /* Set ETH HAL state to READY */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - return HAL_ERROR; - } - - /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ - if( ( pxDmaTxDesc->Status & ETH_DMATXDESC_OWN ) != ( uint32_t ) RESET ) - { - /* OWN bit set */ - heth->State = HAL_ETH_STATE_BUSY_TX; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - return HAL_ERROR; - } - - /* Get the number of needed Tx buffers for the current frame, rounding up. */ - bufcount = ( FrameLength + ETH_TX_BUF_SIZE - 1 ) / ETH_TX_BUF_SIZE; - - if (bufcount == 1) - { - /* Set LAST and FIRST segment */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; - /* Set frame size */ - pxDmaTxDesc->ControlBufferSize = ( FrameLength & ETH_DMATXDESC_TBS1 ); - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_OWN; - /* Point to next descriptor */ - heth->TxDesc = ( ETH_DMADescTypeDef * ) ( heth->TxDesc->Buffer2NextDescAddr ); - } - else - { - for( i = 0; i < bufcount; i++ ) - { - /* Clear FIRST and LAST segment bits */ - uint32_t ulStatus = heth->TxDesc->Status & ~( ETH_DMATXDESC_FS | ETH_DMATXDESC_LS ); - - if( i == 0 ) - { - /* Setting the first segment bit */ - heth->TxDesc->Status = ulStatus | ETH_DMATXDESC_FS; - } - - /* Program size */ - if (i < (bufcount-1)) - { - heth->TxDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATXDESC_TBS1); - } - else - { - /* Setting the last segment bit */ - heth->TxDesc->Status = ulStatus | ETH_DMATXDESC_LS; - size = FrameLength - (bufcount-1)*ETH_TX_BUF_SIZE; - heth->TxDesc->ControlBufferSize = (size & ETH_DMATXDESC_TBS1); - } - - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - heth->TxDesc->Status |= ETH_DMATXDESC_OWN; - /* point to next descriptor */ - heth->TxDesc = (ETH_DMADescTypeDef *)( heth->TxDesc->Buffer2NextDescAddr ); - } - } - - __DSB(); - - /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ - if( ( heth->Instance->DMASR & ETH_DMASR_TBUS ) != ( uint32_t )RESET ) - { - heth->Instance->DMACHTDR = ( uint32_t )pxDmaTxDesc; - - /* Clear TBUS ETHERNET DMA flag */ - heth->Instance->DMASR = ETH_DMASR_TBUS; - /* Resume DMA transmission*/ - heth->Instance->DMATPDR = 0; - } - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Checks for received frames. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT( ETH_HandleTypeDef *heth ) -{ - return HAL_ETH_GetReceivedFrame( heth ); -} - -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame( ETH_HandleTypeDef *heth ) -{ -uint32_t ulCounter = 0; -ETH_DMADescTypeDef *pxDescriptor = heth->RxDesc; -HAL_StatusTypeDef xResult = HAL_ERROR; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Check the ETH state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Scan descriptors owned by CPU */ - while( ( ( pxDescriptor->Status & ETH_DMARXDESC_OWN ) == 0ul ) && ( ulCounter < ETH_RXBUFNB ) ) - { - uint32_t ulStatus = pxDescriptor->Status; - - /* Just for security. */ - ulCounter++; - - if( ( ulStatus & ( ETH_DMARXDESC_FS | ETH_DMARXDESC_LS ) ) == ( uint32_t )ETH_DMARXDESC_FS ) - { - /* First segment in frame, but not the last. */ - heth->RxFrameInfos.FSRxDesc = pxDescriptor; - heth->RxFrameInfos.LSRxDesc = ( ETH_DMADescTypeDef *)NULL; - heth->RxFrameInfos.SegCount = 1; - /* Point to next descriptor. */ - pxDescriptor = (ETH_DMADescTypeDef*) (pxDescriptor->Buffer2NextDescAddr); - heth->RxDesc = pxDescriptor; - } - else if( ( ulStatus & ( ETH_DMARXDESC_LS | ETH_DMARXDESC_FS ) ) == 0ul ) - { - /* This is an intermediate segment, not first, not last. */ - /* Increment segment count. */ - heth->RxFrameInfos.SegCount++; - /* Move to the next descriptor. */ - pxDescriptor = ( ETH_DMADescTypeDef * ) ( pxDescriptor->Buffer2NextDescAddr ); - heth->RxDesc = pxDescriptor; - } - /* Must be a last segment */ - else - { - /* This is the last segment. */ - /* Check if last segment is first segment: one segment contains the frame */ - if( heth->RxFrameInfos.SegCount == 0 ) - { - /* Remember the first segment. */ - heth->RxFrameInfos.FSRxDesc = pxDescriptor; - } - - /* Increment segment count */ - heth->RxFrameInfos.SegCount++; - - /* Remember the last segment. */ - heth->RxFrameInfos.LSRxDesc = pxDescriptor; - - /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ - heth->RxFrameInfos.length = - ( ( ulStatus & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4; - - /* Get the address of the buffer start address */ - heth->RxFrameInfos.buffer = heth->RxFrameInfos.FSRxDesc->Buffer1Addr; - - /* Point to next descriptor */ - heth->RxDesc = ( ETH_DMADescTypeDef * ) pxDescriptor->Buffer2NextDescAddr; - - /* Return OK status: a packet was received. */ - xResult = HAL_OK; - break; - } - } - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return xResult; -} - -#if( STM32_ETHERNET_STATS != 0 ) - - volatile int rx_count, tx_count, int_count; - /** - * @brief This function handles ETH interrupt request. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ - volatile int int_counts[32]; - volatile int tx_status[8]; - volatile unsigned sr_history[32]; - volatile int sr_head; - #define STM32_STAT_INC( x ) do { ( x )++; } while( 0 ) - -#else - #define STM32_STAT_INC( x ) do { } while( 0 ) -#endif /* STM32_ETHERNET_STATS */ - -#define ETH_DMA_ALL_INTS \ - ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_AIS | ETH_DMA_IT_ER | \ - ETH_DMA_IT_FBE | ETH_DMA_IT_ET | ETH_DMA_IT_RWT | ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | \ - ETH_DMA_IT_TU | ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) - -//#define ETH_DMA_ALL_INTS ETH_DMA_IT_RBU | ETH_DMA_FLAG_T | ETH_DMA_FLAG_AIS - -#define INT_MASK ( ( uint32_t ) ~ ( ETH_DMA_IT_TBU ) ) -void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth) -{ - uint32_t dmasr; - - STM32_STAT_INC( int_count ); - - dmasr = heth->Instance->DMASR & ETH_DMA_ALL_INTS; - heth->Instance->DMASR = dmasr; - -#if( STM32_ETHERNET_STATS != 0 ) - if( sr_head < ARRAY_SIZE( sr_history ) ) - { - sr_history[ sr_head++ ] = dmasr; - } - - { - int i; - for (i = 0; i < 32; i++) { - if (dmasr & (1u << i)) { - int_counts[i]++; - } - } - tx_status[ ( dmasr >> 20 ) & 0x07 ]++; - } -#endif - - /* Frame received */ - if( ( dmasr & ( ETH_DMA_FLAG_R | ETH_DMA_IT_RBU ) ) != 0 ) - { - /* Receive complete callback */ - HAL_ETH_RxCpltCallback( heth ); - STM32_STAT_INC( rx_count ); - } - /* Frame transmitted */ - if( ( dmasr & ( ETH_DMA_FLAG_T ) ) != 0 ) - { - /* Transfer complete callback */ - HAL_ETH_TxCpltCallback( heth ); - STM32_STAT_INC( tx_count ); - } - - /* ETH DMA Error */ - if( ( dmasr & ( ETH_DMA_FLAG_AIS ) ) != 0 ) - { - /* Ethernet Error callback */ - HAL_ETH_ErrorCallback( heth ); - } -} - -/** - * @brief Tx Transfer completed callbacks. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ -} - -/** - * @brief Rx Transfer completed callbacks. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ -} - -/** - * @brief Ethernet transfer error callbacks - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ -} - -/** - * @brief Reads a PHY register - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. - * This parameter can be one of the following values: - * PHY_BCR: Transceiver Basic Control Register, - * PHY_BSR: Transceiver Basic Status Register. - * More PHY register could be read depending on the used PHY - * @param RegValue: PHY register value - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) -{ -uint32_t tmpreg = 0; -uint32_t tickstart = 0; -HAL_StatusTypeDef xResult; - - /* Check parameters */ - assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); - - /* Check the ETH peripheral state */ - if( heth->State == HAL_ETH_STATE_BUSY_RD ) - { - xResult = HAL_BUSY; - } - else - { - __HAL_LOCK( heth ); - - /* Set ETH HAL State to BUSY_RD */ - heth->State = HAL_ETH_STATE_BUSY_RD; - - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg &= ~ETH_MACMIIAR_CR_MASK; - - /* Prepare the MII address register value */ - tmpreg |= ( ( ( uint32_t )heth->Init.PhyAddress << 11) & ETH_MACMIIAR_PA ); /* Set the PHY device address */ - tmpreg |= ( ( ( uint32_t )PHYReg << 6 ) & ETH_MACMIIAR_MR ); /* Set the PHY register address */ - tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ - tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg; - - /* Get tick */ - tickstart = HAL_GetTick(); - - /* Check for the Busy flag */ - while( 1 ) - { - tmpreg = heth->Instance->MACMIIAR; - - if( ( tmpreg & ETH_MACMIIAR_MB ) == 0ul ) - { - /* Get MACMIIDR value */ - *RegValue = ( uint32_t ) heth->Instance->MACMIIDR; - xResult = HAL_OK; - break; - } - /* Check for the Timeout */ - if( ( HAL_GetTick( ) - tickstart ) > PHY_READ_TO ) - { - xResult = HAL_TIMEOUT; - break; - } - - } - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - } - - if( xResult != HAL_OK ) - { - lUDPLoggingPrintf( "ReadPHY: %d\n", xResult ); - } - /* Return function status */ - return xResult; -} - -/** - * @brief Writes to a PHY register. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. - * This parameter can be one of the following values: - * PHY_BCR: Transceiver Control Register. - * More PHY register could be written depending on the used PHY - * @param RegValue: the value to write - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue) -{ -uint32_t tmpreg = 0; -uint32_t tickstart = 0; -HAL_StatusTypeDef xResult; - - /* Check parameters */ - assert_param( IS_ETH_PHY_ADDRESS( heth->Init.PhyAddress ) ); - - /* Check the ETH peripheral state */ - if( heth->State == HAL_ETH_STATE_BUSY_WR ) - { - xResult = HAL_BUSY; - } - else - { - __HAL_LOCK( heth ); - - /* Set ETH HAL State to BUSY_WR */ - heth->State = HAL_ETH_STATE_BUSY_WR; - - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg &= ~ETH_MACMIIAR_CR_MASK; - - /* Prepare the MII register address value */ - tmpreg |= ( ( ( uint32_t ) heth->Init.PhyAddress << 11 ) & ETH_MACMIIAR_PA ); /* Set the PHY device address */ - tmpreg |= ( ( ( uint32_t ) PHYReg << 6 ) & ETH_MACMIIAR_MR ); /* Set the PHY register address */ - tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ - tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - - /* Give the value to the MII data register */ - heth->Instance->MACMIIDR = ( uint16_t ) RegValue; - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg; - - /* Get tick */ - tickstart = HAL_GetTick(); - - /* Check for the Busy flag */ - while( 1 ) - { - tmpreg = heth->Instance->MACMIIAR; - - if( ( tmpreg & ETH_MACMIIAR_MB ) == 0ul ) - { - xResult = HAL_OK; - break; - } - /* Check for the Timeout */ - if( ( HAL_GetTick( ) - tickstart ) > PHY_WRITE_TO ) - { - xResult = HAL_TIMEOUT; - break; - } - } - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - } - - if( xResult != HAL_OK ) - { - lUDPLoggingPrintf( "WritePHY: %d\n", xResult ); - } - /* Return function status */ - return xResult; -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group3 Peripheral Control functions - * @brief Peripheral Control functions - * -@verbatim - =============================================================================== - ##### Peripheral Control functions ##### - =============================================================================== - [..] This section provides functions allowing to: - (+) Enable MAC and DMA transmission and reception. - HAL_ETH_Start(); - (+) Disable MAC and DMA transmission and reception. - HAL_ETH_Stop(); - (+) Set the MAC configuration in runtime mode - HAL_ETH_ConfigMAC(); - (+) Set the DMA configuration in runtime mode - HAL_ETH_ConfigDMA(); - -@endverbatim - * @{ - */ - - /** - * @brief Enables Ethernet MAC and DMA reception/transmission - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Start( ETH_HandleTypeDef *heth ) -{ - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Enable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionEnable( heth ); - - /* Enable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionEnable( heth ); - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO( heth ); - - /* Start DMA transmission */ - ETH_DMATransmissionEnable( heth ); - - /* Start DMA reception */ - ETH_DMAReceptionEnable( heth ); - - /* Set the ETH state to READY*/ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Stop Ethernet MAC and DMA reception/transmission - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) -{ - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Stop DMA transmission */ - ETH_DMATransmissionDisable( heth ); - - /* Stop DMA reception */ - ETH_DMAReceptionDisable( heth ); - - /* Disable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionDisable( heth ); - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO( heth ); - - /* Disable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionDisable( heth ); - - /* Set the ETH state*/ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -static void prvWriteMACFCR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->MACFCR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->MACFCR; - - HAL_Delay( ETH_REG_WRITE_DELAY ); - - heth->Instance->MACFCR = ulValue; -} - -static void prvWriteDMAOMR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->DMAOMR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->DMAOMR; - - HAL_Delay( ETH_REG_WRITE_DELAY ); - - heth->Instance->DMAOMR = ulValue; -} - -static void prvWriteMACCR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->MACCR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->MACCR; - - HAL_Delay( ETH_REG_WRITE_DELAY ); - - heth->Instance->MACCR = ulValue; -} - -/** - * @brief Set ETH MAC Configuration. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param macconf: MAC Configuration structure - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf) -{ - uint32_t tmpreg = 0; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State= HAL_ETH_STATE_BUSY; - - assert_param(IS_ETH_SPEED(heth->Init.Speed)); - assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); - - if (macconf != NULL) - { - /* Check the parameters */ - assert_param(IS_ETH_WATCHDOG(macconf->Watchdog)); - assert_param(IS_ETH_JABBER(macconf->Jabber)); - assert_param(IS_ETH_INTER_FRAME_GAP(macconf->InterFrameGap)); - assert_param(IS_ETH_CARRIER_SENSE(macconf->CarrierSense)); - assert_param(IS_ETH_RECEIVE_OWN(macconf->ReceiveOwn)); - assert_param(IS_ETH_LOOPBACK_MODE(macconf->LoopbackMode)); - assert_param(IS_ETH_CHECKSUM_OFFLOAD(macconf->ChecksumOffload)); - assert_param(IS_ETH_RETRY_TRANSMISSION(macconf->RetryTransmission)); - assert_param(IS_ETH_AUTOMATIC_PADCRC_STRIP(macconf->AutomaticPadCRCStrip)); - assert_param(IS_ETH_BACKOFF_LIMIT(macconf->BackOffLimit)); - assert_param(IS_ETH_DEFERRAL_CHECK(macconf->DeferralCheck)); - assert_param(IS_ETH_RECEIVE_ALL(macconf->ReceiveAll)); - assert_param(IS_ETH_SOURCE_ADDR_FILTER(macconf->SourceAddrFilter)); - assert_param(IS_ETH_CONTROL_FRAMES(macconf->PassControlFrames)); - assert_param(IS_ETH_BROADCAST_FRAMES_RECEPTION(macconf->BroadcastFramesReception)); - assert_param(IS_ETH_DESTINATION_ADDR_FILTER(macconf->DestinationAddrFilter)); - assert_param(IS_ETH_PROMISCUOUS_MODE(macconf->PromiscuousMode)); - assert_param(IS_ETH_MULTICAST_FRAMES_FILTER(macconf->MulticastFramesFilter)); - assert_param(IS_ETH_UNICAST_FRAMES_FILTER(macconf->UnicastFramesFilter)); - assert_param(IS_ETH_PAUSE_TIME(macconf->PauseTime)); - assert_param(IS_ETH_ZEROQUANTA_PAUSE(macconf->ZeroQuantaPause)); - assert_param(IS_ETH_PAUSE_LOW_THRESHOLD(macconf->PauseLowThreshold)); - assert_param(IS_ETH_UNICAST_PAUSE_FRAME_DETECT(macconf->UnicastPauseFrameDetect)); - assert_param(IS_ETH_RECEIVE_FLOWCONTROL(macconf->ReceiveFlowControl)); - assert_param(IS_ETH_TRANSMIT_FLOWCONTROL(macconf->TransmitFlowControl)); - assert_param(IS_ETH_VLAN_TAG_COMPARISON(macconf->VLANTagComparison)); - assert_param(IS_ETH_VLAN_TAG_IDENTIFIER(macconf->VLANTagIdentifier)); - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg &= ETH_MACCR_CLEAR_MASK; - - tmpreg |= (uint32_t)( - macconf->Watchdog | - macconf->Jabber | - macconf->InterFrameGap | - macconf->CarrierSense | - heth->Init.Speed | - macconf->ReceiveOwn | - macconf->LoopbackMode | - heth->Init.DuplexMode | - macconf->ChecksumOffload | - macconf->RetryTransmission | - macconf->AutomaticPadCRCStrip | - macconf->BackOffLimit | - macconf->DeferralCheck); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACFFR Configuration --------------------*/ - /* Write to ETHERNET MACFFR */ - heth->Instance->MACFFR = (uint32_t)( - macconf->ReceiveAll | - macconf->SourceAddrFilter | - macconf->PassControlFrames | - macconf->BroadcastFramesReception | - macconf->DestinationAddrFilter | - macconf->PromiscuousMode | - macconf->MulticastFramesFilter | - macconf->UnicastFramesFilter); - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACFFR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACFFR = tmpreg; - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ - /* Write to ETHERNET MACHTHR */ - heth->Instance->MACHTHR = (uint32_t)macconf->HashTableHigh; - - /* Write to ETHERNET MACHTLR */ - heth->Instance->MACHTLR = (uint32_t)macconf->HashTableLow; - /*----------------------- ETHERNET MACFCR Configuration --------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg = heth->Instance->MACFCR; - /* Clear xx bits */ - tmpreg &= ETH_MACFCR_CLEAR_MASK; - - tmpreg |= (uint32_t)(( - macconf->PauseTime << 16) | - macconf->ZeroQuantaPause | - macconf->PauseLowThreshold | - macconf->UnicastPauseFrameDetect | - macconf->ReceiveFlowControl | - macconf->TransmitFlowControl); - - /* Write to ETHERNET MACFCR */ - prvWriteMACFCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ - heth->Instance->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | - macconf->VLANTagIdentifier); - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACVLANTR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACVLANTR = tmpreg; - } - else /* macconf == NULL : here we just configure Speed and Duplex mode */ - { - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - - /* Clear FES and DM bits */ - tmpreg &= ~((uint32_t)0x00004800); - - tmpreg |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - } - - /* Set the ETH state to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Sets ETH DMA Configuration. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param dmaconf: DMA Configuration structure - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_DMAInitTypeDef *dmaconf) -{ - uint32_t tmpreg = 0; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State= HAL_ETH_STATE_BUSY; - - /* Check parameters */ - assert_param(IS_ETH_DROP_TCPIP_CHECKSUM_FRAME(dmaconf->DropTCPIPChecksumErrorFrame)); - assert_param(IS_ETH_RECEIVE_STORE_FORWARD(dmaconf->ReceiveStoreForward)); - assert_param(IS_ETH_FLUSH_RECEIVE_FRAME(dmaconf->FlushReceivedFrame)); - assert_param(IS_ETH_TRANSMIT_STORE_FORWARD(dmaconf->TransmitStoreForward)); - assert_param(IS_ETH_TRANSMIT_THRESHOLD_CONTROL(dmaconf->TransmitThresholdControl)); - assert_param(IS_ETH_FORWARD_ERROR_FRAMES(dmaconf->ForwardErrorFrames)); - assert_param(IS_ETH_FORWARD_UNDERSIZED_GOOD_FRAMES(dmaconf->ForwardUndersizedGoodFrames)); - assert_param(IS_ETH_RECEIVE_THRESHOLD_CONTROL(dmaconf->ReceiveThresholdControl)); - assert_param(IS_ETH_SECOND_FRAME_OPERATE(dmaconf->SecondFrameOperate)); - assert_param(IS_ETH_ADDRESS_ALIGNED_BEATS(dmaconf->AddressAlignedBeats)); - assert_param(IS_ETH_FIXED_BURST(dmaconf->FixedBurst)); - assert_param(IS_ETH_RXDMA_BURST_LENGTH(dmaconf->RxDMABurstLength)); - assert_param(IS_ETH_TXDMA_BURST_LENGTH(dmaconf->TxDMABurstLength)); - assert_param(IS_ETH_ENHANCED_DESCRIPTOR_FORMAT(dmaconf->EnhancedDescriptorFormat)); - assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(dmaconf->DescriptorSkipLength)); - assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(dmaconf->DMAArbitration)); - - /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ - /* Get the ETHERNET DMAOMR value */ - tmpreg = heth->Instance->DMAOMR; - /* Clear xx bits */ - tmpreg &= ETH_DMAOMR_CLEAR_MASK; - - tmpreg |= (uint32_t)( - dmaconf->DropTCPIPChecksumErrorFrame | - dmaconf->ReceiveStoreForward | - dmaconf->FlushReceivedFrame | - dmaconf->TransmitStoreForward | - dmaconf->TransmitThresholdControl | - dmaconf->ForwardErrorFrames | - dmaconf->ForwardUndersizedGoodFrames | - dmaconf->ReceiveThresholdControl | - dmaconf->SecondFrameOperate); - - /* Write to ETHERNET DMAOMR */ - prvWriteDMAOMR( heth, tmpreg ); - - /*----------------------- ETHERNET DMABMR Configuration --------------------*/ - heth->Instance->DMABMR = (uint32_t)(dmaconf->AddressAlignedBeats | - dmaconf->FixedBurst | - dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - dmaconf->TxDMABurstLength | - dmaconf->EnhancedDescriptorFormat | - (dmaconf->DescriptorSkipLength << 2) | - dmaconf->DMAArbitration | - ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->DMABMR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->DMABMR = tmpreg; - - /* Set the ETH state to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group4 Peripheral State functions - * @brief Peripheral State functions - * - @verbatim - =============================================================================== - ##### Peripheral State functions ##### - =============================================================================== - [..] - This subsection permits to get in run-time the status of the peripheral - and the data flow. - (+) Get the ETH handle state: - HAL_ETH_GetState(); - - - @endverbatim - * @{ - */ - -/** - * @brief Return the ETH HAL state - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL state - */ -HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth) -{ - /* Return ETH state */ - return heth->State; -} - -/** - * @} - */ - -/** - * @} - */ - -/** @addtogroup ETH_Private_Functions - * @{ - */ - -/** - * @brief Configures Ethernet MAC and DMA with default parameters. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param err: Ethernet Init error - * @retval HAL status - */ -static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err) -{ - ETH_MACInitTypeDef macinit; - ETH_DMAInitTypeDef dmainit; - uint32_t tmpreg = 0; - - if (err != ETH_SUCCESS) /* Auto-negotiation failed */ - { - /* Set Ethernet duplex mode to Full-duplex */ - heth->Init.DuplexMode = ETH_MODE_FULLDUPLEX; - - /* Set Ethernet speed to 100M */ - heth->Init.Speed = ETH_SPEED_100M; - } - - /* Ethernet MAC default initialization **************************************/ - macinit.Watchdog = ETH_WATCHDOG_ENABLE; - macinit.Jabber = ETH_JABBER_ENABLE; - macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT; - macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE; - macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE; - macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE; - if(heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE; - } - else - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE; - } - macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE; - macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE; - macinit.BackOffLimit = ETH_BACKOFFLIMIT_10; - macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE; - macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE; - macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE; - macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL; - macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE; - macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL; - macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE; - macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT; - macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT; - macinit.HashTableHigh = 0x0; - macinit.HashTableLow = 0x0; - macinit.PauseTime = 0x0; - macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE; - macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4; - macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE; - macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE; - macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE; - macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT; - macinit.VLANTagIdentifier = 0x0; - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg &= ETH_MACCR_CLEAR_MASK; - /* Set the WD bit according to ETH Watchdog value */ - /* Set the JD: bit according to ETH Jabber value */ - /* Set the IFG bit according to ETH InterFrameGap value */ - /* Set the DCRS bit according to ETH CarrierSense value */ - /* Set the FES bit according to ETH Speed value */ - /* Set the DO bit according to ETH ReceiveOwn value */ - /* Set the LM bit according to ETH LoopbackMode value */ - /* Set the DM bit according to ETH Mode value */ - /* Set the IPCO bit according to ETH ChecksumOffload value */ - /* Set the DR bit according to ETH RetryTransmission value */ - /* Set the ACS bit according to ETH AutomaticPadCRCStrip value */ - /* Set the BL bit according to ETH BackOffLimit value */ - /* Set the DC bit according to ETH DeferralCheck value */ - tmpreg |= (uint32_t)(macinit.Watchdog | - macinit.Jabber | - macinit.InterFrameGap | - macinit.CarrierSense | - heth->Init.Speed | - macinit.ReceiveOwn | - macinit.LoopbackMode | - heth->Init.DuplexMode | - macinit.ChecksumOffload | - macinit.RetryTransmission | - macinit.AutomaticPadCRCStrip | - macinit.BackOffLimit | - macinit.DeferralCheck); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACFFR Configuration --------------------*/ - /* Set the RA bit according to ETH ReceiveAll value */ - /* Set the SAF and SAIF bits according to ETH SourceAddrFilter value */ - /* Set the PCF bit according to ETH PassControlFrames value */ - /* Set the DBF bit according to ETH BroadcastFramesReception value */ - /* Set the DAIF bit according to ETH DestinationAddrFilter value */ - /* Set the PR bit according to ETH PromiscuousMode value */ - /* Set the PM, HMC and HPF bits according to ETH MulticastFramesFilter value */ - /* Set the HUC and HPF bits according to ETH UnicastFramesFilter value */ - /* Write to ETHERNET MACFFR */ - heth->Instance->MACFFR = (uint32_t)(macinit.ReceiveAll | - macinit.SourceAddrFilter | - macinit.PassControlFrames | - macinit.BroadcastFramesReception | - macinit.DestinationAddrFilter | - macinit.PromiscuousMode | - macinit.MulticastFramesFilter | - macinit.UnicastFramesFilter); - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACFFR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACFFR = tmpreg; - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/ - /* Write to ETHERNET MACHTHR */ - heth->Instance->MACHTHR = (uint32_t)macinit.HashTableHigh; - - /* Write to ETHERNET MACHTLR */ - heth->Instance->MACHTLR = (uint32_t)macinit.HashTableLow; - /*----------------------- ETHERNET MACFCR Configuration -------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg = heth->Instance->MACFCR; - /* Clear xx bits */ - tmpreg &= ETH_MACFCR_CLEAR_MASK; - - /* Set the PT bit according to ETH PauseTime value */ - /* Set the DZPQ bit according to ETH ZeroQuantaPause value */ - /* Set the PLT bit according to ETH PauseLowThreshold value */ - /* Set the UP bit according to ETH UnicastPauseFrameDetect value */ - /* Set the RFE bit according to ETH ReceiveFlowControl value */ - /* Set the TFE bit according to ETH TransmitFlowControl value */ - tmpreg |= (uint32_t)((macinit.PauseTime << 16) | - macinit.ZeroQuantaPause | - macinit.PauseLowThreshold | - macinit.UnicastPauseFrameDetect | - macinit.ReceiveFlowControl | - macinit.TransmitFlowControl); - - /* Write to ETHERNET MACFCR */ - prvWriteMACFCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACVLANTR Configuration ----------------*/ - /* Set the ETV bit according to ETH VLANTagComparison value */ - /* Set the VL bit according to ETH VLANTagIdentifier value */ - heth->Instance->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | - macinit.VLANTagIdentifier); - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACVLANTR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACVLANTR = tmpreg; - - /* Ethernet DMA default initialization ************************************/ - dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE; - dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE; - dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE; - dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE; - dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES; - dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE; - dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE; - dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES; - dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE; - dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE; - dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE; - dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; - dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; - dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE; - dmainit.DescriptorSkipLength = 0x0; - dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1; - - /* Get the ETHERNET DMAOMR value */ - tmpreg = heth->Instance->DMAOMR; - /* Clear xx bits */ - tmpreg &= ETH_DMAOMR_CLEAR_MASK; - - /* Set the DT bit according to ETH DropTCPIPChecksumErrorFrame value */ - /* Set the RSF bit according to ETH ReceiveStoreForward value */ - /* Set the DFF bit according to ETH FlushReceivedFrame value */ - /* Set the TSF bit according to ETH TransmitStoreForward value */ - /* Set the TTC bit according to ETH TransmitThresholdControl value */ - /* Set the FEF bit according to ETH ForwardErrorFrames value */ - /* Set the FUF bit according to ETH ForwardUndersizedGoodFrames value */ - /* Set the RTC bit according to ETH ReceiveThresholdControl value */ - /* Set the OSF bit according to ETH SecondFrameOperate value */ - tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | - dmainit.ReceiveStoreForward | - dmainit.FlushReceivedFrame | - dmainit.TransmitStoreForward | - dmainit.TransmitThresholdControl | - dmainit.ForwardErrorFrames | - dmainit.ForwardUndersizedGoodFrames | - dmainit.ReceiveThresholdControl | - dmainit.SecondFrameOperate); - - /* Write to ETHERNET DMAOMR */ - prvWriteDMAOMR( heth, tmpreg ); - - /*----------------------- ETHERNET DMABMR Configuration ------------------*/ - /* Set the AAL bit according to ETH AddressAlignedBeats value */ - /* Set the FB bit according to ETH FixedBurst value */ - /* Set the RPBL and 4*PBL bits according to ETH RxDMABurstLength value */ - /* Set the PBL and 4*PBL bits according to ETH TxDMABurstLength value */ - /* Set the Enhanced DMA descriptors bit according to ETH EnhancedDescriptorFormat value*/ - /* Set the DSL bit according to ETH DesciptorSkipLength value */ - /* Set the PR and DA bits according to ETH DMAArbitration value */ - heth->Instance->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | - dmainit.FixedBurst | - dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - dmainit.TxDMABurstLength | - dmainit.EnhancedDescriptorFormat | - (dmainit.DescriptorSkipLength << 2) | - dmainit.DMAArbitration | - ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->DMABMR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->DMABMR = tmpreg; - - if(heth->Init.RxMode == ETH_RXINTERRUPT_MODE) - { - /* Enable the Ethernet Rx Interrupt */ - __HAL_ETH_DMA_ENABLE_IT(( heth ), ETH_DMA_IT_NIS | ETH_DMA_IT_R); - } - - /* Initialize MAC address in ethernet MAC */ - ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr); -} - -/** - * @brief Configures the selected MAC address. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param MacAddr: The MAC address to configure - * This parameter can be one of the following values: - * @arg ETH_MAC_Address0: MAC Address0 - * @arg ETH_MAC_Address1: MAC Address1 - * @arg ETH_MAC_Address2: MAC Address2 - * @arg ETH_MAC_Address3: MAC Address3 - * @param Addr: Pointer to MAC address buffer data (6 bytes) - * @retval HAL status - */ -static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr) -{ - uint32_t tmpreg; - - /* Check the parameters */ - assert_param( IS_ETH_MAC_ADDRESS0123( MacAddr ) ); - - /* Calculate the selected MAC address high register */ - tmpreg = 0x80000000ul | ( ( uint32_t )Addr[ 5 ] << 8) | (uint32_t)Addr[ 4 ]; - /* Load the selected MAC address high register */ - ( * ( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + MacAddr ) ) ) = tmpreg; - /* Calculate the selected MAC address low register */ - tmpreg = ( ( uint32_t )Addr[ 3 ] << 24 ) | ( ( uint32_t )Addr[ 2 ] << 16 ) | ( ( uint32_t )Addr[ 1 ] << 8 ) | Addr[ 0 ]; - - /* Load the selected MAC address low register */ - ( * ( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + MacAddr ) ) ) = tmpreg; -} - -/** - * @brief Enables the MAC transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = heth->Instance->MACCR | ETH_MACCR_TE; - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Disables the MAC transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = heth->Instance->MACCR & ~( ETH_MACCR_TE ); - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Enables the MAC reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth) -{ - __IO uint32_t tmpreg = heth->Instance->MACCR | ETH_MACCR_RE; - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Disables the MAC reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth) -{ - __IO uint32_t tmpreg = heth->Instance->MACCR & ~( ETH_MACCR_RE ); - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Enables the DMA transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth) -{ - /* Enable the DMA transmission */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_ST; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Disables the DMA transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth) -{ - /* Disable the DMA transmission */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR & ~( ETH_DMAOMR_ST ); - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Enables the DMA reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth) -{ - /* Enable the DMA reception */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_SR; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Disables the DMA reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth) -{ - /* Disable the DMA reception */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR & ~( ETH_DMAOMR_SR ); - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Clears the ETHERNET transmit FIFO. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth) -{ - /* Set the Flush Transmit FIFO bit */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_FTF; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @} - */ - -#endif /* STM32F7xx */ -#endif /* HAL_ETH_MODULE_ENABLED */ -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.h deleted file mode 100644 index 0c401936b..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32F7xx/stm32f7xx_hal_eth.h +++ /dev/null @@ -1,2214 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f7xx_hal_eth.h - * @author MCD Application Team - * @version V1.2.2 - * @date 14-April-2017 - * @brief Header file of ETH HAL module. - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2017 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F7xx_HAL_ETH_H -#define __STM32F7xx_HAL_ETH_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f7xx_hal_def.h" - -/** @addtogroup STM32F7xx_HAL_Driver - * @{ - */ - -/** @addtogroup ETH - * @{ - */ - -/** @addtogroup ETH_Private_Macros - * @{ - */ -#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x20) -#define IS_ETH_AUTONEGOTIATION(CMD) (((CMD) == ETH_AUTONEGOTIATION_ENABLE) || \ - ((CMD) == ETH_AUTONEGOTIATION_DISABLE)) -#define IS_ETH_SPEED(SPEED) (((SPEED) == ETH_SPEED_10M) || \ - ((SPEED) == ETH_SPEED_100M)) -#define IS_ETH_DUPLEX_MODE(MODE) (((MODE) == ETH_MODE_FULLDUPLEX) || \ - ((MODE) == ETH_MODE_HALFDUPLEX)) -#define IS_ETH_RX_MODE(MODE) (((MODE) == ETH_RXPOLLING_MODE) || \ - ((MODE) == ETH_RXINTERRUPT_MODE)) -#define IS_ETH_CHECKSUM_MODE(MODE) (((MODE) == ETH_CHECKSUM_BY_HARDWARE) || \ - ((MODE) == ETH_CHECKSUM_BY_SOFTWARE)) -#define IS_ETH_MEDIA_INTERFACE(MODE) (((MODE) == ETH_MEDIA_INTERFACE_MII) || \ - ((MODE) == ETH_MEDIA_INTERFACE_RMII)) -#define IS_ETH_WATCHDOG(CMD) (((CMD) == ETH_WATCHDOG_ENABLE) || \ - ((CMD) == ETH_WATCHDOG_DISABLE)) -#define IS_ETH_JABBER(CMD) (((CMD) == ETH_JABBER_ENABLE) || \ - ((CMD) == ETH_JABBER_DISABLE)) -#define IS_ETH_INTER_FRAME_GAP(GAP) (((GAP) == ETH_INTERFRAMEGAP_96BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_88BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_80BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_72BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_64BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_56BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_48BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_40BIT)) -#define IS_ETH_CARRIER_SENSE(CMD) (((CMD) == ETH_CARRIERSENCE_ENABLE) || \ - ((CMD) == ETH_CARRIERSENCE_DISABLE)) -#define IS_ETH_RECEIVE_OWN(CMD) (((CMD) == ETH_RECEIVEOWN_ENABLE) || \ - ((CMD) == ETH_RECEIVEOWN_DISABLE)) -#define IS_ETH_LOOPBACK_MODE(CMD) (((CMD) == ETH_LOOPBACKMODE_ENABLE) || \ - ((CMD) == ETH_LOOPBACKMODE_DISABLE)) -#define IS_ETH_CHECKSUM_OFFLOAD(CMD) (((CMD) == ETH_CHECKSUMOFFLAOD_ENABLE) || \ - ((CMD) == ETH_CHECKSUMOFFLAOD_DISABLE)) -#define IS_ETH_RETRY_TRANSMISSION(CMD) (((CMD) == ETH_RETRYTRANSMISSION_ENABLE) || \ - ((CMD) == ETH_RETRYTRANSMISSION_DISABLE)) -#define IS_ETH_AUTOMATIC_PADCRC_STRIP(CMD) (((CMD) == ETH_AUTOMATICPADCRCSTRIP_ENABLE) || \ - ((CMD) == ETH_AUTOMATICPADCRCSTRIP_DISABLE)) -#define IS_ETH_BACKOFF_LIMIT(LIMIT) (((LIMIT) == ETH_BACKOFFLIMIT_10) || \ - ((LIMIT) == ETH_BACKOFFLIMIT_8) || \ - ((LIMIT) == ETH_BACKOFFLIMIT_4) || \ - ((LIMIT) == ETH_BACKOFFLIMIT_1)) -#define IS_ETH_DEFERRAL_CHECK(CMD) (((CMD) == ETH_DEFFERRALCHECK_ENABLE) || \ - ((CMD) == ETH_DEFFERRALCHECK_DISABLE)) -#define IS_ETH_RECEIVE_ALL(CMD) (((CMD) == ETH_RECEIVEALL_ENABLE) || \ - ((CMD) == ETH_RECEIVEAll_DISABLE)) -#define IS_ETH_SOURCE_ADDR_FILTER(CMD) (((CMD) == ETH_SOURCEADDRFILTER_NORMAL_ENABLE) || \ - ((CMD) == ETH_SOURCEADDRFILTER_INVERSE_ENABLE) || \ - ((CMD) == ETH_SOURCEADDRFILTER_DISABLE)) -#define IS_ETH_CONTROL_FRAMES(PASS) (((PASS) == ETH_PASSCONTROLFRAMES_BLOCKALL) || \ - ((PASS) == ETH_PASSCONTROLFRAMES_FORWARDALL) || \ - ((PASS) == ETH_PASSCONTROLFRAMES_FORWARDPASSEDADDRFILTER)) -#define IS_ETH_BROADCAST_FRAMES_RECEPTION(CMD) (((CMD) == ETH_BROADCASTFRAMESRECEPTION_ENABLE) || \ - ((CMD) == ETH_BROADCASTFRAMESRECEPTION_DISABLE)) -#define IS_ETH_DESTINATION_ADDR_FILTER(FILTER) (((FILTER) == ETH_DESTINATIONADDRFILTER_NORMAL) || \ - ((FILTER) == ETH_DESTINATIONADDRFILTER_INVERSE)) -#define IS_ETH_PROMISCUOUS_MODE(CMD) (((CMD) == ETH_PROMISCUOUS_MODE_ENABLE) || \ - ((CMD) == ETH_PROMISCUOUS_MODE_DISABLE)) -#define IS_ETH_MULTICAST_FRAMES_FILTER(FILTER) (((FILTER) == ETH_MULTICASTFRAMESFILTER_PERFECTHASHTABLE) || \ - ((FILTER) == ETH_MULTICASTFRAMESFILTER_HASHTABLE) || \ - ((FILTER) == ETH_MULTICASTFRAMESFILTER_PERFECT) || \ - ((FILTER) == ETH_MULTICASTFRAMESFILTER_NONE)) -#define IS_ETH_UNICAST_FRAMES_FILTER(FILTER) (((FILTER) == ETH_UNICASTFRAMESFILTER_PERFECTHASHTABLE) || \ - ((FILTER) == ETH_UNICASTFRAMESFILTER_HASHTABLE) || \ - ((FILTER) == ETH_UNICASTFRAMESFILTER_PERFECT)) -#define IS_ETH_PAUSE_TIME(TIME) ((TIME) <= 0xFFFF) -#define IS_ETH_ZEROQUANTA_PAUSE(CMD) (((CMD) == ETH_ZEROQUANTAPAUSE_ENABLE) || \ - ((CMD) == ETH_ZEROQUANTAPAUSE_DISABLE)) -#define IS_ETH_PAUSE_LOW_THRESHOLD(THRESHOLD) (((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS4) || \ - ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS28) || \ - ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS144) || \ - ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS256)) -#define IS_ETH_UNICAST_PAUSE_FRAME_DETECT(CMD) (((CMD) == ETH_UNICASTPAUSEFRAMEDETECT_ENABLE) || \ - ((CMD) == ETH_UNICASTPAUSEFRAMEDETECT_DISABLE)) -#define IS_ETH_RECEIVE_FLOWCONTROL(CMD) (((CMD) == ETH_RECEIVEFLOWCONTROL_ENABLE) || \ - ((CMD) == ETH_RECEIVEFLOWCONTROL_DISABLE)) -#define IS_ETH_TRANSMIT_FLOWCONTROL(CMD) (((CMD) == ETH_TRANSMITFLOWCONTROL_ENABLE) || \ - ((CMD) == ETH_TRANSMITFLOWCONTROL_DISABLE)) -#define IS_ETH_VLAN_TAG_COMPARISON(COMPARISON) (((COMPARISON) == ETH_VLANTAGCOMPARISON_12BIT) || \ - ((COMPARISON) == ETH_VLANTAGCOMPARISON_16BIT)) -#define IS_ETH_VLAN_TAG_IDENTIFIER(IDENTIFIER) ((IDENTIFIER) <= 0xFFFF) -#define IS_ETH_MAC_ADDRESS0123(ADDRESS) (((ADDRESS) == ETH_MAC_ADDRESS0) || \ - ((ADDRESS) == ETH_MAC_ADDRESS1) || \ - ((ADDRESS) == ETH_MAC_ADDRESS2) || \ - ((ADDRESS) == ETH_MAC_ADDRESS3)) -#define IS_ETH_MAC_ADDRESS123(ADDRESS) (((ADDRESS) == ETH_MAC_ADDRESS1) || \ - ((ADDRESS) == ETH_MAC_ADDRESS2) || \ - ((ADDRESS) == ETH_MAC_ADDRESS3)) -#define IS_ETH_MAC_ADDRESS_FILTER(FILTER) (((FILTER) == ETH_MAC_ADDRESSFILTER_SA) || \ - ((FILTER) == ETH_MAC_ADDRESSFILTER_DA)) -#define IS_ETH_MAC_ADDRESS_MASK(MASK) (((MASK) == ETH_MAC_ADDRESSMASK_BYTE6) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE5) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE4) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE3) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE2) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE1)) -#define IS_ETH_DROP_TCPIP_CHECKSUM_FRAME(CMD) (((CMD) == ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE) || \ - ((CMD) == ETH_DROPTCPIPCHECKSUMERRORFRAME_DISABLE)) -#define IS_ETH_RECEIVE_STORE_FORWARD(CMD) (((CMD) == ETH_RECEIVESTOREFORWARD_ENABLE) || \ - ((CMD) == ETH_RECEIVESTOREFORWARD_DISABLE)) -#define IS_ETH_FLUSH_RECEIVE_FRAME(CMD) (((CMD) == ETH_FLUSHRECEIVEDFRAME_ENABLE) || \ - ((CMD) == ETH_FLUSHRECEIVEDFRAME_DISABLE)) -#define IS_ETH_TRANSMIT_STORE_FORWARD(CMD) (((CMD) == ETH_TRANSMITSTOREFORWARD_ENABLE) || \ - ((CMD) == ETH_TRANSMITSTOREFORWARD_DISABLE)) -#define IS_ETH_TRANSMIT_THRESHOLD_CONTROL(THRESHOLD) (((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_64BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_128BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_192BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_256BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_40BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_32BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_24BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_16BYTES)) -#define IS_ETH_FORWARD_ERROR_FRAMES(CMD) (((CMD) == ETH_FORWARDERRORFRAMES_ENABLE) || \ - ((CMD) == ETH_FORWARDERRORFRAMES_DISABLE)) -#define IS_ETH_FORWARD_UNDERSIZED_GOOD_FRAMES(CMD) (((CMD) == ETH_FORWARDUNDERSIZEDGOODFRAMES_ENABLE) || \ - ((CMD) == ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE)) -#define IS_ETH_RECEIVE_THRESHOLD_CONTROL(THRESHOLD) (((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES) || \ - ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_32BYTES) || \ - ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_96BYTES) || \ - ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_128BYTES)) -#define IS_ETH_SECOND_FRAME_OPERATE(CMD) (((CMD) == ETH_SECONDFRAMEOPERARTE_ENABLE) || \ - ((CMD) == ETH_SECONDFRAMEOPERARTE_DISABLE)) -#define IS_ETH_ADDRESS_ALIGNED_BEATS(CMD) (((CMD) == ETH_ADDRESSALIGNEDBEATS_ENABLE) || \ - ((CMD) == ETH_ADDRESSALIGNEDBEATS_DISABLE)) -#define IS_ETH_FIXED_BURST(CMD) (((CMD) == ETH_FIXEDBURST_ENABLE) || \ - ((CMD) == ETH_FIXEDBURST_DISABLE)) -#define IS_ETH_RXDMA_BURST_LENGTH(LENGTH) (((LENGTH) == ETH_RXDMABURSTLENGTH_1BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_2BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_8BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_16BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_32BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_4BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_8BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_16BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_32BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_64BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_128BEAT)) -#define IS_ETH_TXDMA_BURST_LENGTH(LENGTH) (((LENGTH) == ETH_TXDMABURSTLENGTH_1BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_2BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_8BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_16BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_32BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_4BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_8BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_16BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_32BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_64BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_128BEAT)) -#define IS_ETH_DMA_DESC_SKIP_LENGTH(LENGTH) ((LENGTH) <= 0x1F) -#define IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(RATIO) (((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1) || \ - ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_2_1) || \ - ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_3_1) || \ - ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_4_1) || \ - ((RATIO) == ETH_DMAARBITRATION_RXPRIORTX)) -#define IS_ETH_DMATXDESC_GET_FLAG(FLAG) (((FLAG) == ETH_DMATXDESC_OWN) || \ - ((FLAG) == ETH_DMATXDESC_IC) || \ - ((FLAG) == ETH_DMATXDESC_LS) || \ - ((FLAG) == ETH_DMATXDESC_FS) || \ - ((FLAG) == ETH_DMATXDESC_DC) || \ - ((FLAG) == ETH_DMATXDESC_DP) || \ - ((FLAG) == ETH_DMATXDESC_TTSE) || \ - ((FLAG) == ETH_DMATXDESC_TER) || \ - ((FLAG) == ETH_DMATXDESC_TCH) || \ - ((FLAG) == ETH_DMATXDESC_TTSS) || \ - ((FLAG) == ETH_DMATXDESC_IHE) || \ - ((FLAG) == ETH_DMATXDESC_ES) || \ - ((FLAG) == ETH_DMATXDESC_JT) || \ - ((FLAG) == ETH_DMATXDESC_FF) || \ - ((FLAG) == ETH_DMATXDESC_PCE) || \ - ((FLAG) == ETH_DMATXDESC_LCA) || \ - ((FLAG) == ETH_DMATXDESC_NC) || \ - ((FLAG) == ETH_DMATXDESC_LCO) || \ - ((FLAG) == ETH_DMATXDESC_EC) || \ - ((FLAG) == ETH_DMATXDESC_VF) || \ - ((FLAG) == ETH_DMATXDESC_CC) || \ - ((FLAG) == ETH_DMATXDESC_ED) || \ - ((FLAG) == ETH_DMATXDESC_UF) || \ - ((FLAG) == ETH_DMATXDESC_DB)) -#define IS_ETH_DMA_TXDESC_SEGMENT(SEGMENT) (((SEGMENT) == ETH_DMATXDESC_LASTSEGMENTS) || \ - ((SEGMENT) == ETH_DMATXDESC_FIRSTSEGMENT)) -#define IS_ETH_DMA_TXDESC_CHECKSUM(CHECKSUM) (((CHECKSUM) == ETH_DMATXDESC_CHECKSUMBYPASS) || \ - ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMIPV4HEADER) || \ - ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT) || \ - ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL)) -#define IS_ETH_DMATXDESC_BUFFER_SIZE(SIZE) ((SIZE) <= 0x1FFF) -#define IS_ETH_DMARXDESC_GET_FLAG(FLAG) (((FLAG) == ETH_DMARXDESC_OWN) || \ - ((FLAG) == ETH_DMARXDESC_AFM) || \ - ((FLAG) == ETH_DMARXDESC_ES) || \ - ((FLAG) == ETH_DMARXDESC_DE) || \ - ((FLAG) == ETH_DMARXDESC_SAF) || \ - ((FLAG) == ETH_DMARXDESC_LE) || \ - ((FLAG) == ETH_DMARXDESC_OE) || \ - ((FLAG) == ETH_DMARXDESC_VLAN) || \ - ((FLAG) == ETH_DMARXDESC_FS) || \ - ((FLAG) == ETH_DMARXDESC_LS) || \ - ((FLAG) == ETH_DMARXDESC_IPV4HCE) || \ - ((FLAG) == ETH_DMARXDESC_LC) || \ - ((FLAG) == ETH_DMARXDESC_FT) || \ - ((FLAG) == ETH_DMARXDESC_RWT) || \ - ((FLAG) == ETH_DMARXDESC_RE) || \ - ((FLAG) == ETH_DMARXDESC_DBE) || \ - ((FLAG) == ETH_DMARXDESC_CE) || \ - ((FLAG) == ETH_DMARXDESC_MAMPCE)) -#define IS_ETH_DMA_RXDESC_BUFFER(BUFFER) (((BUFFER) == ETH_DMARXDESC_BUFFER1) || \ - ((BUFFER) == ETH_DMARXDESC_BUFFER2)) -#define IS_ETH_PMT_GET_FLAG(FLAG) (((FLAG) == ETH_PMT_FLAG_WUFR) || \ - ((FLAG) == ETH_PMT_FLAG_MPR)) -#define IS_ETH_DMA_FLAG(FLAG) ((((FLAG) & (uint32_t)0xC7FE1800) == 0x00) && ((FLAG) != 0x00)) -#define IS_ETH_DMA_GET_FLAG(FLAG) (((FLAG) == ETH_DMA_FLAG_TST) || ((FLAG) == ETH_DMA_FLAG_PMT) || \ - ((FLAG) == ETH_DMA_FLAG_MMC) || ((FLAG) == ETH_DMA_FLAG_DATATRANSFERERROR) || \ - ((FLAG) == ETH_DMA_FLAG_READWRITEERROR) || ((FLAG) == ETH_DMA_FLAG_ACCESSERROR) || \ - ((FLAG) == ETH_DMA_FLAG_NIS) || ((FLAG) == ETH_DMA_FLAG_AIS) || \ - ((FLAG) == ETH_DMA_FLAG_ER) || ((FLAG) == ETH_DMA_FLAG_FBE) || \ - ((FLAG) == ETH_DMA_FLAG_ET) || ((FLAG) == ETH_DMA_FLAG_RWT) || \ - ((FLAG) == ETH_DMA_FLAG_RPS) || ((FLAG) == ETH_DMA_FLAG_RBU) || \ - ((FLAG) == ETH_DMA_FLAG_R) || ((FLAG) == ETH_DMA_FLAG_TU) || \ - ((FLAG) == ETH_DMA_FLAG_RO) || ((FLAG) == ETH_DMA_FLAG_TJT) || \ - ((FLAG) == ETH_DMA_FLAG_TBU) || ((FLAG) == ETH_DMA_FLAG_TPS) || \ - ((FLAG) == ETH_DMA_FLAG_T)) -#define IS_ETH_MAC_IT(IT) ((((IT) & (uint32_t)0xFFFFFDF1) == 0x00) && ((IT) != 0x00)) -#define IS_ETH_MAC_GET_IT(IT) (((IT) == ETH_MAC_IT_TST) || ((IT) == ETH_MAC_IT_MMCT) || \ - ((IT) == ETH_MAC_IT_MMCR) || ((IT) == ETH_MAC_IT_MMC) || \ - ((IT) == ETH_MAC_IT_PMT)) -#define IS_ETH_MAC_GET_FLAG(FLAG) (((FLAG) == ETH_MAC_FLAG_TST) || ((FLAG) == ETH_MAC_FLAG_MMCT) || \ - ((FLAG) == ETH_MAC_FLAG_MMCR) || ((FLAG) == ETH_MAC_FLAG_MMC) || \ - ((FLAG) == ETH_MAC_FLAG_PMT)) -#define IS_ETH_DMA_IT(IT) ((((IT) & (uint32_t)0xC7FE1800) == 0x00) && ((IT) != 0x00)) -#define IS_ETH_DMA_GET_IT(IT) (((IT) == ETH_DMA_IT_TST) || ((IT) == ETH_DMA_IT_PMT) || \ - ((IT) == ETH_DMA_IT_MMC) || ((IT) == ETH_DMA_IT_NIS) || \ - ((IT) == ETH_DMA_IT_AIS) || ((IT) == ETH_DMA_IT_ER) || \ - ((IT) == ETH_DMA_IT_FBE) || ((IT) == ETH_DMA_IT_ET) || \ - ((IT) == ETH_DMA_IT_RWT) || ((IT) == ETH_DMA_IT_RPS) || \ - ((IT) == ETH_DMA_IT_RBU) || ((IT) == ETH_DMA_IT_R) || \ - ((IT) == ETH_DMA_IT_TU) || ((IT) == ETH_DMA_IT_RO) || \ - ((IT) == ETH_DMA_IT_TJT) || ((IT) == ETH_DMA_IT_TBU) || \ - ((IT) == ETH_DMA_IT_TPS) || ((IT) == ETH_DMA_IT_T)) -#define IS_ETH_DMA_GET_OVERFLOW(OVERFLOW) (((OVERFLOW) == ETH_DMA_OVERFLOW_RXFIFOCOUNTER) || \ - ((OVERFLOW) == ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER)) -#define IS_ETH_MMC_IT(IT) (((((IT) & (uint32_t)0xFFDF3FFF) == 0x00) || (((IT) & (uint32_t)0xEFFDFF9F) == 0x00)) && \ - ((IT) != 0x00)) -#define IS_ETH_MMC_GET_IT(IT) (((IT) == ETH_MMC_IT_TGF) || ((IT) == ETH_MMC_IT_TGFMSC) || \ - ((IT) == ETH_MMC_IT_TGFSC) || ((IT) == ETH_MMC_IT_RGUF) || \ - ((IT) == ETH_MMC_IT_RFAE) || ((IT) == ETH_MMC_IT_RFCE)) -#define IS_ETH_ENHANCED_DESCRIPTOR_FORMAT(CMD) (((CMD) == ETH_DMAENHANCEDDESCRIPTOR_ENABLE) || \ - ((CMD) == ETH_DMAENHANCEDDESCRIPTOR_DISABLE)) - - -/** - * @} - */ - -/** @addtogroup ETH_Private_Defines - * @{ - */ -/* Delay to wait when writing to some Ethernet registers */ -#define ETH_REG_WRITE_DELAY ((uint32_t)0x00000001U) - -/* Ethernet Errors */ -#define ETH_SUCCESS ((uint32_t)0U) -#define ETH_ERROR ((uint32_t)1U) - -/* Ethernet DMA Tx descriptors Collision Count Shift */ -#define ETH_DMATXDESC_COLLISION_COUNTSHIFT ((uint32_t)3U) - -/* Ethernet DMA Tx descriptors Buffer2 Size Shift */ -#define ETH_DMATXDESC_BUFFER2_SIZESHIFT ((uint32_t)16U) - -/* Ethernet DMA Rx descriptors Frame Length Shift */ -#define ETH_DMARXDESC_FRAME_LENGTHSHIFT ((uint32_t)16U) - -/* Ethernet DMA Rx descriptors Buffer2 Size Shift */ -#define ETH_DMARXDESC_BUFFER2_SIZESHIFT ((uint32_t)16U) - -/* Ethernet DMA Rx descriptors Frame length Shift */ -#define ETH_DMARXDESC_FRAMELENGTHSHIFT ((uint32_t)16) - -/* Ethernet MAC address offsets */ -#define ETH_MAC_ADDR_HBASE (uint32_t)(ETH_MAC_BASE + (uint32_t)0x40U) /* Ethernet MAC address high offset */ -#define ETH_MAC_ADDR_LBASE (uint32_t)(ETH_MAC_BASE + (uint32_t)0x44U) /* Ethernet MAC address low offset */ - -/* Ethernet MACMIIAR register Mask */ -#define ETH_MACMIIAR_CR_MASK ((uint32_t)0xFFFFFFE3U) - -/* Ethernet MACCR register Mask */ -#define ETH_MACCR_CLEAR_MASK ((uint32_t)0xFF20810FU) - -/* Ethernet MACFCR register Mask */ -#define ETH_MACFCR_CLEAR_MASK ((uint32_t)0x0000FF41U) - -/* Ethernet DMAOMR register Mask */ -#define ETH_DMAOMR_CLEAR_MASK ((uint32_t)0xF8DE3F23U) - -/* Ethernet Remote Wake-up frame register length */ -#define ETH_WAKEUP_REGISTER_LENGTH 8U - -/* Ethernet Missed frames counter Shift */ -#define ETH_DMA_RX_OVERFLOW_MISSEDFRAMES_COUNTERSHIFT 17U - /** - * @} - */ - -/* Exported types ------------------------------------------------------------*/ -/** @defgroup ETH_Exported_Types ETH Exported Types - * @{ - */ - -/** - * @brief HAL State structures definition - */ -typedef enum -{ - HAL_ETH_STATE_RESET = 0x00U, /*!< Peripheral not yet Initialized or disabled */ - HAL_ETH_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */ - HAL_ETH_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */ - HAL_ETH_STATE_BUSY_TX = 0x12U, /*!< Data Transmission process is ongoing */ - HAL_ETH_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing */ - HAL_ETH_STATE_BUSY_TX_RX = 0x32U, /*!< Data Transmission and Reception process is ongoing */ - HAL_ETH_STATE_BUSY_WR = 0x42U, /*!< Write process is ongoing */ - HAL_ETH_STATE_BUSY_RD = 0x82U, /*!< Read process is ongoing */ - HAL_ETH_STATE_TIMEOUT = 0x03U, /*!< Timeout state */ - HAL_ETH_STATE_ERROR = 0x04U /*!< Reception process is ongoing */ -}HAL_ETH_StateTypeDef; - -/** - * @brief ETH Init Structure definition - */ - -typedef struct -{ - uint32_t AutoNegotiation; /*!< Selects or not the AutoNegotiation mode for the external PHY - The AutoNegotiation allows an automatic setting of the Speed (10/100Mbps) - and the mode (half/full-duplex). - This parameter can be a value of @ref ETH_AutoNegotiation */ - - uint32_t Speed; /*!< Sets the Ethernet speed: 10/100 Mbps. - This parameter can be a value of @ref ETH_Speed */ - - uint32_t DuplexMode; /*!< Selects the MAC duplex mode: Half-Duplex or Full-Duplex mode - This parameter can be a value of @ref ETH_Duplex_Mode */ - - uint16_t PhyAddress; /*!< Ethernet PHY address. - This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ - - uint8_t *MACAddr; /*!< MAC Address of used Hardware: must be pointer on an array of 6 bytes */ - - uint32_t RxMode; /*!< Selects the Ethernet Rx mode: Polling mode, Interrupt mode. - This parameter can be a value of @ref ETH_Rx_Mode */ - - uint32_t ChecksumMode; /*!< Selects if the checksum is check by hardware or by software. - This parameter can be a value of @ref ETH_Checksum_Mode */ - - uint32_t MediaInterface ; /*!< Selects the media-independent interface or the reduced media-independent interface. - This parameter can be a value of @ref ETH_Media_Interface */ - -} ETH_InitTypeDef; - - - /** - * @brief ETH MAC Configuration Structure definition - */ - -typedef struct -{ - uint32_t Watchdog; /*!< Selects or not the Watchdog timer - When enabled, the MAC allows no more then 2048 bytes to be received. - When disabled, the MAC can receive up to 16384 bytes. - This parameter can be a value of @ref ETH_Watchdog */ - - uint32_t Jabber; /*!< Selects or not Jabber timer - When enabled, the MAC allows no more then 2048 bytes to be sent. - When disabled, the MAC can send up to 16384 bytes. - This parameter can be a value of @ref ETH_Jabber */ - - uint32_t InterFrameGap; /*!< Selects the minimum IFG between frames during transmission. - This parameter can be a value of @ref ETH_Inter_Frame_Gap */ - - uint32_t CarrierSense; /*!< Selects or not the Carrier Sense. - This parameter can be a value of @ref ETH_Carrier_Sense */ - - uint32_t ReceiveOwn; /*!< Selects or not the ReceiveOwn, - ReceiveOwn allows the reception of frames when the TX_EN signal is asserted - in Half-Duplex mode. - This parameter can be a value of @ref ETH_Receive_Own */ - - uint32_t LoopbackMode; /*!< Selects or not the internal MAC MII Loopback mode. - This parameter can be a value of @ref ETH_Loop_Back_Mode */ - - uint32_t ChecksumOffload; /*!< Selects or not the IPv4 checksum checking for received frame payloads' TCP/UDP/ICMP headers. - This parameter can be a value of @ref ETH_Checksum_Offload */ - - uint32_t RetryTransmission; /*!< Selects or not the MAC attempt retries transmission, based on the settings of BL, - when a collision occurs (Half-Duplex mode). - This parameter can be a value of @ref ETH_Retry_Transmission */ - - uint32_t AutomaticPadCRCStrip; /*!< Selects or not the Automatic MAC Pad/CRC Stripping. - This parameter can be a value of @ref ETH_Automatic_Pad_CRC_Strip */ - - uint32_t BackOffLimit; /*!< Selects the BackOff limit value. - This parameter can be a value of @ref ETH_Back_Off_Limit */ - - uint32_t DeferralCheck; /*!< Selects or not the deferral check function (Half-Duplex mode). - This parameter can be a value of @ref ETH_Deferral_Check */ - - uint32_t ReceiveAll; /*!< Selects or not all frames reception by the MAC (No filtering). - This parameter can be a value of @ref ETH_Receive_All */ - - uint32_t SourceAddrFilter; /*!< Selects the Source Address Filter mode. - This parameter can be a value of @ref ETH_Source_Addr_Filter */ - - uint32_t PassControlFrames; /*!< Sets the forwarding mode of the control frames (including unicast and multicast PAUSE frames) - This parameter can be a value of @ref ETH_Pass_Control_Frames */ - - uint32_t BroadcastFramesReception; /*!< Selects or not the reception of Broadcast Frames. - This parameter can be a value of @ref ETH_Broadcast_Frames_Reception */ - - uint32_t DestinationAddrFilter; /*!< Sets the destination filter mode for both unicast and multicast frames. - This parameter can be a value of @ref ETH_Destination_Addr_Filter */ - - uint32_t PromiscuousMode; /*!< Selects or not the Promiscuous Mode - This parameter can be a value of @ref ETH_Promiscuous_Mode */ - - uint32_t MulticastFramesFilter; /*!< Selects the Multicast Frames filter mode: None/HashTableFilter/PerfectFilter/PerfectHashTableFilter. - This parameter can be a value of @ref ETH_Multicast_Frames_Filter */ - - uint32_t UnicastFramesFilter; /*!< Selects the Unicast Frames filter mode: HashTableFilter/PerfectFilter/PerfectHashTableFilter. - This parameter can be a value of @ref ETH_Unicast_Frames_Filter */ - - uint32_t HashTableHigh; /*!< This field holds the higher 32 bits of Hash table. - This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ - - uint32_t HashTableLow; /*!< This field holds the lower 32 bits of Hash table. - This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ - - uint32_t PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control frame. - This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFF */ - - uint32_t ZeroQuantaPause; /*!< Selects or not the automatic generation of Zero-Quanta Pause Control frames. - This parameter can be a value of @ref ETH_Zero_Quanta_Pause */ - - uint32_t PauseLowThreshold; /*!< This field configures the threshold of the PAUSE to be checked for - automatic retransmission of PAUSE Frame. - This parameter can be a value of @ref ETH_Pause_Low_Threshold */ - - uint32_t UnicastPauseFrameDetect; /*!< Selects or not the MAC detection of the Pause frames (with MAC Address0 - unicast address and unique multicast address). - This parameter can be a value of @ref ETH_Unicast_Pause_Frame_Detect */ - - uint32_t ReceiveFlowControl; /*!< Enables or disables the MAC to decode the received Pause frame and - disable its transmitter for a specified time (Pause Time) - This parameter can be a value of @ref ETH_Receive_Flow_Control */ - - uint32_t TransmitFlowControl; /*!< Enables or disables the MAC to transmit Pause frames (Full-Duplex mode) - or the MAC back-pressure operation (Half-Duplex mode) - This parameter can be a value of @ref ETH_Transmit_Flow_Control */ - - uint32_t VLANTagComparison; /*!< Selects the 12-bit VLAN identifier or the complete 16-bit VLAN tag for - comparison and filtering. - This parameter can be a value of @ref ETH_VLAN_Tag_Comparison */ - - uint32_t VLANTagIdentifier; /*!< Holds the VLAN tag identifier for receive frames */ - -} ETH_MACInitTypeDef; - - -/** - * @brief ETH DMA Configuration Structure definition - */ - -typedef struct -{ - uint32_t DropTCPIPChecksumErrorFrame; /*!< Selects or not the Dropping of TCP/IP Checksum Error Frames. - This parameter can be a value of @ref ETH_Drop_TCP_IP_Checksum_Error_Frame */ - - uint32_t ReceiveStoreForward; /*!< Enables or disables the Receive store and forward mode. - This parameter can be a value of @ref ETH_Receive_Store_Forward */ - - uint32_t FlushReceivedFrame; /*!< Enables or disables the flushing of received frames. - This parameter can be a value of @ref ETH_Flush_Received_Frame */ - - uint32_t TransmitStoreForward; /*!< Enables or disables Transmit store and forward mode. - This parameter can be a value of @ref ETH_Transmit_Store_Forward */ - - uint32_t TransmitThresholdControl; /*!< Selects or not the Transmit Threshold Control. - This parameter can be a value of @ref ETH_Transmit_Threshold_Control */ - - uint32_t ForwardErrorFrames; /*!< Selects or not the forward to the DMA of erroneous frames. - This parameter can be a value of @ref ETH_Forward_Error_Frames */ - - uint32_t ForwardUndersizedGoodFrames; /*!< Enables or disables the Rx FIFO to forward Undersized frames (frames with no Error - and length less than 64 bytes) including pad-bytes and CRC) - This parameter can be a value of @ref ETH_Forward_Undersized_Good_Frames */ - - uint32_t ReceiveThresholdControl; /*!< Selects the threshold level of the Receive FIFO. - This parameter can be a value of @ref ETH_Receive_Threshold_Control */ - - uint32_t SecondFrameOperate; /*!< Selects or not the Operate on second frame mode, which allows the DMA to process a second - frame of Transmit data even before obtaining the status for the first frame. - This parameter can be a value of @ref ETH_Second_Frame_Operate */ - - uint32_t AddressAlignedBeats; /*!< Enables or disables the Address Aligned Beats. - This parameter can be a value of @ref ETH_Address_Aligned_Beats */ - - uint32_t FixedBurst; /*!< Enables or disables the AHB Master interface fixed burst transfers. - This parameter can be a value of @ref ETH_Fixed_Burst */ - - uint32_t RxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Rx DMA transaction. - This parameter can be a value of @ref ETH_Rx_DMA_Burst_Length */ - - uint32_t TxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Tx DMA transaction. - This parameter can be a value of @ref ETH_Tx_DMA_Burst_Length */ - - uint32_t EnhancedDescriptorFormat; /*!< Enables the enhanced descriptor format. - This parameter can be a value of @ref ETH_DMA_Enhanced_descriptor_format */ - - uint32_t DescriptorSkipLength; /*!< Specifies the number of word to skip between two unchained descriptors (Ring mode) - This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ - - uint32_t DMAArbitration; /*!< Selects the DMA Tx/Rx arbitration. - This parameter can be a value of @ref ETH_DMA_Arbitration */ -} ETH_DMAInitTypeDef; - - -/** - * @brief ETH DMA Descriptors data structure definition - */ - -typedef struct -{ - __IO uint32_t Status; /*!< Status */ - - uint32_t ControlBufferSize; /*!< Control and Buffer1, Buffer2 lengths */ - - uint32_t Buffer1Addr; /*!< Buffer1 address pointer */ - - uint32_t Buffer2NextDescAddr; /*!< Buffer2 or next descriptor address pointer */ - - /*!< Enhanced Ethernet DMA PTP Descriptors */ - uint32_t ExtendedStatus; /*!< Extended status for PTP receive descriptor */ - - uint32_t Reserved1; /*!< Reserved */ - - uint32_t TimeStampLow; /*!< Time Stamp Low value for transmit and receive */ - - uint32_t TimeStampHigh; /*!< Time Stamp High value for transmit and receive */ - -} ETH_DMADescTypeDef; - - -/** - * @brief Received Frame Informations structure definition - */ -typedef struct -{ - ETH_DMADescTypeDef *FSRxDesc; /*!< First Segment Rx Desc */ - - ETH_DMADescTypeDef *LSRxDesc; /*!< Last Segment Rx Desc */ - - uint32_t SegCount; /*!< Segment count */ - - uint32_t length; /*!< Frame length */ - - uint32_t buffer; /*!< Frame buffer */ - -} ETH_DMARxFrameInfos; - - -/** - * @brief ETH Handle Structure definition - */ - -typedef struct -{ - ETH_TypeDef *Instance; /*!< Register base address */ - - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - - uint32_t LinkStatus; /*!< Ethernet link status */ - - ETH_DMADescTypeDef *RxDesc; /*!< Rx descriptor to Get */ - - ETH_DMADescTypeDef *TxDesc; /*!< Tx descriptor to Set */ - - ETH_DMARxFrameInfos RxFrameInfos; /*!< last Rx frame infos */ - - __IO HAL_ETH_StateTypeDef State; /*!< ETH communication state */ - - HAL_LockTypeDef Lock; /*!< ETH Lock */ - -} ETH_HandleTypeDef; - - /** - * @} - */ - -/* Exported constants --------------------------------------------------------*/ -/** @defgroup ETH_Exported_Constants ETH Exported Constants - * @{ - */ - -/** @defgroup ETH_Buffers_setting ETH Buffers setting - * @{ - */ -#define ETH_MAX_PACKET_SIZE ((uint32_t)1524U) /*!< ETH_HEADER + ETH_EXTRA + ETH_VLAN_TAG + ETH_MAX_ETH_PAYLOAD + ETH_CRC */ -#define ETH_HEADER ((uint32_t)14U) /*!< 6 byte Dest addr, 6 byte Src addr, 2 byte length/type */ -#define ETH_CRC ((uint32_t)4U) /*!< Ethernet CRC */ -#define ETH_EXTRA ((uint32_t)2U) /*!< Extra bytes in some cases */ -#define ETH_VLAN_TAG ((uint32_t)4U) /*!< optional 802.1q VLAN Tag */ -#define ETH_MIN_ETH_PAYLOAD ((uint32_t)46U) /*!< Minimum Ethernet payload size */ -#define ETH_MAX_ETH_PAYLOAD ((uint32_t)1500U) /*!< Maximum Ethernet payload size */ -#define ETH_JUMBO_FRAME_PAYLOAD ((uint32_t)9000U) /*!< Jumbo frame payload size */ - - /* Ethernet driver receive buffers are organized in a chained linked-list, when - an Ethernet packet is received, the Rx-DMA will transfer the packet from RxFIFO - to the driver receive buffers memory. - - Depending on the size of the received Ethernet packet and the size of - each Ethernet driver receive buffer, the received packet can take one or more - Ethernet driver receive buffer. - - In below are defined the size of one Ethernet driver receive buffer ETH_RX_BUF_SIZE - and the total count of the driver receive buffers ETH_RXBUFNB. - - The configured value for ETH_RX_BUF_SIZE and ETH_RXBUFNB are only provided as - example, they can be reconfigured in the application layer to fit the application - needs */ - -/* Here we configure each Ethernet driver receive buffer to fit the Max size Ethernet - packet */ -#ifndef ETH_RX_BUF_SIZE - #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE -#endif - -/* 5 Ethernet driver receive buffers are used (in a chained linked list)*/ -#ifndef ETH_RXBUFNB - #define ETH_RXBUFNB ((uint32_t)5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */ -#endif - - - /* Ethernet driver transmit buffers are organized in a chained linked-list, when - an Ethernet packet is transmitted, Tx-DMA will transfer the packet from the - driver transmit buffers memory to the TxFIFO. - - Depending on the size of the Ethernet packet to be transmitted and the size of - each Ethernet driver transmit buffer, the packet to be transmitted can take - one or more Ethernet driver transmit buffer. - - In below are defined the size of one Ethernet driver transmit buffer ETH_TX_BUF_SIZE - and the total count of the driver transmit buffers ETH_TXBUFNB. - - The configured value for ETH_TX_BUF_SIZE and ETH_TXBUFNB are only provided as - example, they can be reconfigured in the application layer to fit the application - needs */ - -/* Here we configure each Ethernet driver transmit buffer to fit the Max size Ethernet - packet */ -#ifndef ETH_TX_BUF_SIZE - #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE -#endif - -/* 5 Ethernet driver transmit buffers are used (in a chained linked list)*/ -#ifndef ETH_TXBUFNB - #define ETH_TXBUFNB ((uint32_t)5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */ -#endif - - /** - * @} - */ - -/** @defgroup ETH_DMA_TX_Descriptor ETH DMA TX Descriptor - * @{ - */ - -/* - DMA Tx Descriptor - ----------------------------------------------------------------------------------------------- - TDES0 | OWN(31) | CTRL[30:26] | Reserved[25:24] | CTRL[23:20] | Reserved[19:17] | Status[16:0] | - ----------------------------------------------------------------------------------------------- - TDES1 | Reserved[31:29] | Buffer2 ByteCount[28:16] | Reserved[15:13] | Buffer1 ByteCount[12:0] | - ----------------------------------------------------------------------------------------------- - TDES2 | Buffer1 Address [31:0] | - ----------------------------------------------------------------------------------------------- - TDES3 | Buffer2 Address [31:0] / Next Descriptor Address [31:0] | - ----------------------------------------------------------------------------------------------- -*/ - -/** - * @brief Bit definition of TDES0 register: DMA Tx descriptor status register - */ -#define ETH_DMATXDESC_OWN ((uint32_t)0x80000000U) /*!< OWN bit: descriptor is owned by DMA engine */ -#define ETH_DMATXDESC_IC ((uint32_t)0x40000000U) /*!< Interrupt on Completion */ -#define ETH_DMATXDESC_LS ((uint32_t)0x20000000U) /*!< Last Segment */ -#define ETH_DMATXDESC_FS ((uint32_t)0x10000000U) /*!< First Segment */ -#define ETH_DMATXDESC_DC ((uint32_t)0x08000000U) /*!< Disable CRC */ -#define ETH_DMATXDESC_DP ((uint32_t)0x04000000U) /*!< Disable Padding */ -#define ETH_DMATXDESC_TTSE ((uint32_t)0x02000000U) /*!< Transmit Time Stamp Enable */ -#define ETH_DMATXDESC_CIC ((uint32_t)0x00C00000U) /*!< Checksum Insertion Control: 4 cases */ -#define ETH_DMATXDESC_CIC_BYPASS ((uint32_t)0x00000000U) /*!< Do Nothing: Checksum Engine is bypassed */ -#define ETH_DMATXDESC_CIC_IPV4HEADER ((uint32_t)0x00400000U) /*!< IPV4 header Checksum Insertion */ -#define ETH_DMATXDESC_CIC_TCPUDPICMP_SEGMENT ((uint32_t)0x00800000U) /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */ -#define ETH_DMATXDESC_CIC_TCPUDPICMP_FULL ((uint32_t)0x00C00000U) /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */ -#define ETH_DMATXDESC_TER ((uint32_t)0x00200000U) /*!< Transmit End of Ring */ -#define ETH_DMATXDESC_TCH ((uint32_t)0x00100000U) /*!< Second Address Chained */ -#define ETH_DMATXDESC_TTSS ((uint32_t)0x00020000U) /*!< Tx Time Stamp Status */ -#define ETH_DMATXDESC_IHE ((uint32_t)0x00010000U) /*!< IP Header Error */ -#define ETH_DMATXDESC_ES ((uint32_t)0x00008000U) /*!< Error summary: OR of the following bits: UE || ED || EC || LCO || NC || LCA || FF || JT */ -#define ETH_DMATXDESC_JT ((uint32_t)0x00004000U) /*!< Jabber Timeout */ -#define ETH_DMATXDESC_FF ((uint32_t)0x00002000U) /*!< Frame Flushed: DMA/MTL flushed the frame due to SW flush */ -#define ETH_DMATXDESC_PCE ((uint32_t)0x00001000U) /*!< Payload Checksum Error */ -#define ETH_DMATXDESC_LCA ((uint32_t)0x00000800U) /*!< Loss of Carrier: carrier lost during transmission */ -#define ETH_DMATXDESC_NC ((uint32_t)0x00000400U) /*!< No Carrier: no carrier signal from the transceiver */ -#define ETH_DMATXDESC_LCO ((uint32_t)0x00000200U) /*!< Late Collision: transmission aborted due to collision */ -#define ETH_DMATXDESC_EC ((uint32_t)0x00000100U) /*!< Excessive Collision: transmission aborted after 16 collisions */ -#define ETH_DMATXDESC_VF ((uint32_t)0x00000080U) /*!< VLAN Frame */ -#define ETH_DMATXDESC_CC ((uint32_t)0x00000078U) /*!< Collision Count */ -#define ETH_DMATXDESC_ED ((uint32_t)0x00000004U) /*!< Excessive Deferral */ -#define ETH_DMATXDESC_UF ((uint32_t)0x00000002U) /*!< Underflow Error: late data arrival from the memory */ -#define ETH_DMATXDESC_DB ((uint32_t)0x00000001U) /*!< Deferred Bit */ - -/** - * @brief Bit definition of TDES1 register - */ -#define ETH_DMATXDESC_TBS2 ((uint32_t)0x1FFF0000U) /*!< Transmit Buffer2 Size */ -#define ETH_DMATXDESC_TBS1 ((uint32_t)0x00001FFFU) /*!< Transmit Buffer1 Size */ - -/** - * @brief Bit definition of TDES2 register - */ -#define ETH_DMATXDESC_B1AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer1 Address Pointer */ - -/** - * @brief Bit definition of TDES3 register - */ -#define ETH_DMATXDESC_B2AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer2 Address Pointer */ - - /*--------------------------------------------------------------------------------------------- - TDES6 | Transmit Time Stamp Low [31:0] | - ----------------------------------------------------------------------------------------------- - TDES7 | Transmit Time Stamp High [31:0] | - ----------------------------------------------------------------------------------------------*/ - -/* Bit definition of TDES6 register */ - #define ETH_DMAPTPTXDESC_TTSL ((uint32_t)0xFFFFFFFFU) /* Transmit Time Stamp Low */ - -/* Bit definition of TDES7 register */ - #define ETH_DMAPTPTXDESC_TTSH ((uint32_t)0xFFFFFFFFU) /* Transmit Time Stamp High */ - -/** - * @} - */ -/** @defgroup ETH_DMA_RX_Descriptor ETH DMA RX Descriptor - * @{ - */ - -/* - DMA Rx Descriptor - -------------------------------------------------------------------------------------------------------------------- - RDES0 | OWN(31) | Status [30:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES1 | CTRL(31) | Reserved[30:29] | Buffer2 ByteCount[28:16] | CTRL[15:14] | Reserved(13) | Buffer1 ByteCount[12:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES2 | Buffer1 Address [31:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES3 | Buffer2 Address [31:0] / Next Descriptor Address [31:0] | - --------------------------------------------------------------------------------------------------------------------- -*/ - -/** - * @brief Bit definition of RDES0 register: DMA Rx descriptor status register - */ -#define ETH_DMARXDESC_OWN ((uint32_t)0x80000000U) /*!< OWN bit: descriptor is owned by DMA engine */ -#define ETH_DMARXDESC_AFM ((uint32_t)0x40000000U) /*!< DA Filter Fail for the rx frame */ -#define ETH_DMARXDESC_FL ((uint32_t)0x3FFF0000U) /*!< Receive descriptor frame length */ -#define ETH_DMARXDESC_ES ((uint32_t)0x00008000U) /*!< Error summary: OR of the following bits: DE || OE || IPC || LC || RWT || RE || CE */ -#define ETH_DMARXDESC_DE ((uint32_t)0x00004000U) /*!< Descriptor error: no more descriptors for receive frame */ -#define ETH_DMARXDESC_SAF ((uint32_t)0x00002000U) /*!< SA Filter Fail for the received frame */ -#define ETH_DMARXDESC_LE ((uint32_t)0x00001000U) /*!< Frame size not matching with length field */ -#define ETH_DMARXDESC_OE ((uint32_t)0x00000800U) /*!< Overflow Error: Frame was damaged due to buffer overflow */ -#define ETH_DMARXDESC_VLAN ((uint32_t)0x00000400U) /*!< VLAN Tag: received frame is a VLAN frame */ -#define ETH_DMARXDESC_FS ((uint32_t)0x00000200U) /*!< First descriptor of the frame */ -#define ETH_DMARXDESC_LS ((uint32_t)0x00000100U) /*!< Last descriptor of the frame */ -#define ETH_DMARXDESC_IPV4HCE ((uint32_t)0x00000080U) /*!< IPC Checksum Error: Rx Ipv4 header checksum error */ -#define ETH_DMARXDESC_LC ((uint32_t)0x00000040U) /*!< Late collision occurred during reception */ -#define ETH_DMARXDESC_FT ((uint32_t)0x00000020U) /*!< Frame type - Ethernet, otherwise 802.3 */ -#define ETH_DMARXDESC_RWT ((uint32_t)0x00000010U) /*!< Receive Watchdog Timeout: watchdog timer expired during reception */ -#define ETH_DMARXDESC_RE ((uint32_t)0x00000008U) /*!< Receive error: error reported by MII interface */ -#define ETH_DMARXDESC_DBE ((uint32_t)0x00000004U) /*!< Dribble bit error: frame contains non int multiple of 8 bits */ -#define ETH_DMARXDESC_CE ((uint32_t)0x00000002U) /*!< CRC error */ -#define ETH_DMARXDESC_MAMPCE ((uint32_t)0x00000001U) /*!< Rx MAC Address/Payload Checksum Error: Rx MAC address matched/ Rx Payload Checksum Error */ - -/** - * @brief Bit definition of RDES1 register - */ -#define ETH_DMARXDESC_DIC ((uint32_t)0x80000000U) /*!< Disable Interrupt on Completion */ -#define ETH_DMARXDESC_RBS2 ((uint32_t)0x1FFF0000U) /*!< Receive Buffer2 Size */ -#define ETH_DMARXDESC_RER ((uint32_t)0x00008000U) /*!< Receive End of Ring */ -#define ETH_DMARXDESC_RCH ((uint32_t)0x00004000U) /*!< Second Address Chained */ -#define ETH_DMARXDESC_RBS1 ((uint32_t)0x00001FFFU) /*!< Receive Buffer1 Size */ - -/** - * @brief Bit definition of RDES2 register - */ -#define ETH_DMARXDESC_B1AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer1 Address Pointer */ - -/** - * @brief Bit definition of RDES3 register - */ -#define ETH_DMARXDESC_B2AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer2 Address Pointer */ - -/*--------------------------------------------------------------------------------------------------------------------- - RDES4 | Reserved[31:15] | Extended Status [14:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES5 | Reserved[31:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES6 | Receive Time Stamp Low [31:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES7 | Receive Time Stamp High [31:0] | - --------------------------------------------------------------------------------------------------------------------*/ - -/* Bit definition of RDES4 register */ -#define ETH_DMAPTPRXDESC_PTPV ((uint32_t)0x00002000U) /* PTP Version */ -#define ETH_DMAPTPRXDESC_PTPFT ((uint32_t)0x00001000U) /* PTP Frame Type */ -#define ETH_DMAPTPRXDESC_PTPMT ((uint32_t)0x00000F00U) /* PTP Message Type */ -#define ETH_DMAPTPRXDESC_PTPMT_SYNC ((uint32_t)0x00000100U) /* SYNC message (all clock types) */ -#define ETH_DMAPTPRXDESC_PTPMT_FOLLOWUP ((uint32_t)0x00000200U) /* FollowUp message (all clock types) */ -#define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ ((uint32_t)0x00000300U) /* DelayReq message (all clock types) */ -#define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP ((uint32_t)0x00000400U) /* DelayResp message (all clock types) */ -#define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE ((uint32_t)0x00000500U) /* PdelayReq message (peer-to-peer transparent clock) or Announce message (Ordinary or Boundary clock) */ -#define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESP_MANAG ((uint32_t)0x00000600U) /* PdelayResp message (peer-to-peer transparent clock) or Management message (Ordinary or Boundary clock) */ -#define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESPFOLLOWUP_SIGNAL ((uint32_t)0x00000700U) /* PdelayRespFollowUp message (peer-to-peer transparent clock) or Signaling message (Ordinary or Boundary clock) */ -#define ETH_DMAPTPRXDESC_IPV6PR ((uint32_t)0x00000080U) /* IPv6 Packet Received */ -#define ETH_DMAPTPRXDESC_IPV4PR ((uint32_t)0x00000040U) /* IPv4 Packet Received */ -#define ETH_DMAPTPRXDESC_IPCB ((uint32_t)0x00000020U) /* IP Checksum Bypassed */ -#define ETH_DMAPTPRXDESC_IPPE ((uint32_t)0x00000010U) /* IP Payload Error */ -#define ETH_DMAPTPRXDESC_IPHE ((uint32_t)0x00000008U) /* IP Header Error */ -#define ETH_DMAPTPRXDESC_IPPT ((uint32_t)0x00000007U) /* IP Payload Type */ -#define ETH_DMAPTPRXDESC_IPPT_UDP ((uint32_t)0x00000001U) /* UDP payload encapsulated in the IP datagram */ -#define ETH_DMAPTPRXDESC_IPPT_TCP ((uint32_t)0x00000002U) /* TCP payload encapsulated in the IP datagram */ -#define ETH_DMAPTPRXDESC_IPPT_ICMP ((uint32_t)0x00000003U) /* ICMP payload encapsulated in the IP datagram */ - -/* Bit definition of RDES6 register */ -#define ETH_DMAPTPRXDESC_RTSL ((uint32_t)0xFFFFFFFFU) /* Receive Time Stamp Low */ - -/* Bit definition of RDES7 register */ -#define ETH_DMAPTPRXDESC_RTSH ((uint32_t)0xFFFFFFFFU) /* Receive Time Stamp High */ -/** - * @} - */ - /** @defgroup ETH_AutoNegotiation ETH AutoNegotiation - * @{ - */ -#define ETH_AUTONEGOTIATION_ENABLE ((uint32_t)0x00000001U) -#define ETH_AUTONEGOTIATION_DISABLE ((uint32_t)0x00000000U) - -/** - * @} - */ -/** @defgroup ETH_Speed ETH Speed - * @{ - */ -#define ETH_SPEED_10M ((uint32_t)0x00000000U) -#define ETH_SPEED_100M ((uint32_t)0x00004000U) - -/** - * @} - */ -/** @defgroup ETH_Duplex_Mode ETH Duplex Mode - * @{ - */ -#define ETH_MODE_FULLDUPLEX ((uint32_t)0x00000800U) -#define ETH_MODE_HALFDUPLEX ((uint32_t)0x00000000U) -/** - * @} - */ -/** @defgroup ETH_Rx_Mode ETH Rx Mode - * @{ - */ -#define ETH_RXPOLLING_MODE ((uint32_t)0x00000000U) -#define ETH_RXINTERRUPT_MODE ((uint32_t)0x00000001U) -/** - * @} - */ - -/** @defgroup ETH_Checksum_Mode ETH Checksum Mode - * @{ - */ -#define ETH_CHECKSUM_BY_HARDWARE ((uint32_t)0x00000000U) -#define ETH_CHECKSUM_BY_SOFTWARE ((uint32_t)0x00000001U) -/** - * @} - */ - -/** @defgroup ETH_Media_Interface ETH Media Interface - * @{ - */ -#define ETH_MEDIA_INTERFACE_MII ((uint32_t)0x00000000U) -#define ETH_MEDIA_INTERFACE_RMII ((uint32_t)SYSCFG_PMC_MII_RMII_SEL) -/** - * @} - */ - -/** @defgroup ETH_Watchdog ETH Watchdog - * @{ - */ -#define ETH_WATCHDOG_ENABLE ((uint32_t)0x00000000U) -#define ETH_WATCHDOG_DISABLE ((uint32_t)0x00800000U) -/** - * @} - */ - -/** @defgroup ETH_Jabber ETH Jabber - * @{ - */ -#define ETH_JABBER_ENABLE ((uint32_t)0x00000000U) -#define ETH_JABBER_DISABLE ((uint32_t)0x00400000U) -/** - * @} - */ - -/** @defgroup ETH_Inter_Frame_Gap ETH Inter Frame Gap - * @{ - */ -#define ETH_INTERFRAMEGAP_96BIT ((uint32_t)0x00000000U) /*!< minimum IFG between frames during transmission is 96Bit */ -#define ETH_INTERFRAMEGAP_88BIT ((uint32_t)0x00020000U) /*!< minimum IFG between frames during transmission is 88Bit */ -#define ETH_INTERFRAMEGAP_80BIT ((uint32_t)0x00040000U) /*!< minimum IFG between frames during transmission is 80Bit */ -#define ETH_INTERFRAMEGAP_72BIT ((uint32_t)0x00060000U) /*!< minimum IFG between frames during transmission is 72Bit */ -#define ETH_INTERFRAMEGAP_64BIT ((uint32_t)0x00080000U) /*!< minimum IFG between frames during transmission is 64Bit */ -#define ETH_INTERFRAMEGAP_56BIT ((uint32_t)0x000A0000U) /*!< minimum IFG between frames during transmission is 56Bit */ -#define ETH_INTERFRAMEGAP_48BIT ((uint32_t)0x000C0000U) /*!< minimum IFG between frames during transmission is 48Bit */ -#define ETH_INTERFRAMEGAP_40BIT ((uint32_t)0x000E0000U) /*!< minimum IFG between frames during transmission is 40Bit */ -/** - * @} - */ - -/** @defgroup ETH_Carrier_Sense ETH Carrier Sense - * @{ - */ -#define ETH_CARRIERSENCE_ENABLE ((uint32_t)0x00000000U) -#define ETH_CARRIERSENCE_DISABLE ((uint32_t)0x00010000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Own ETH Receive Own - * @{ - */ -#define ETH_RECEIVEOWN_ENABLE ((uint32_t)0x00000000U) -#define ETH_RECEIVEOWN_DISABLE ((uint32_t)0x00002000U) -/** - * @} - */ - -/** @defgroup ETH_Loop_Back_Mode ETH Loop Back Mode - * @{ - */ -#define ETH_LOOPBACKMODE_ENABLE ((uint32_t)0x00001000U) -#define ETH_LOOPBACKMODE_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Checksum_Offload ETH Checksum Offload - * @{ - */ -#define ETH_CHECKSUMOFFLAOD_ENABLE ((uint32_t)0x00000400U) -#define ETH_CHECKSUMOFFLAOD_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Retry_Transmission ETH Retry Transmission - * @{ - */ -#define ETH_RETRYTRANSMISSION_ENABLE ((uint32_t)0x00000000U) -#define ETH_RETRYTRANSMISSION_DISABLE ((uint32_t)0x00000200U) -/** - * @} - */ - -/** @defgroup ETH_Automatic_Pad_CRC_Strip ETH Automatic Pad CRC Strip - * @{ - */ -#define ETH_AUTOMATICPADCRCSTRIP_ENABLE ((uint32_t)0x00000080U) -#define ETH_AUTOMATICPADCRCSTRIP_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Back_Off_Limit ETH Back Off Limit - * @{ - */ -#define ETH_BACKOFFLIMIT_10 ((uint32_t)0x00000000U) -#define ETH_BACKOFFLIMIT_8 ((uint32_t)0x00000020U) -#define ETH_BACKOFFLIMIT_4 ((uint32_t)0x00000040U) -#define ETH_BACKOFFLIMIT_1 ((uint32_t)0x00000060U) -/** - * @} - */ - -/** @defgroup ETH_Deferral_Check ETH Deferral Check - * @{ - */ -#define ETH_DEFFERRALCHECK_ENABLE ((uint32_t)0x00000010U) -#define ETH_DEFFERRALCHECK_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_All ETH Receive All - * @{ - */ -#define ETH_RECEIVEALL_ENABLE ((uint32_t)0x80000000U) -#define ETH_RECEIVEAll_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Source_Addr_Filter ETH Source Addr Filter - * @{ - */ -#define ETH_SOURCEADDRFILTER_NORMAL_ENABLE ((uint32_t)0x00000200U) -#define ETH_SOURCEADDRFILTER_INVERSE_ENABLE ((uint32_t)0x00000300U) -#define ETH_SOURCEADDRFILTER_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Pass_Control_Frames ETH Pass Control Frames - * @{ - */ -#define ETH_PASSCONTROLFRAMES_BLOCKALL ((uint32_t)0x00000040U) /*!< MAC filters all control frames from reaching the application */ -#define ETH_PASSCONTROLFRAMES_FORWARDALL ((uint32_t)0x00000080U) /*!< MAC forwards all control frames to application even if they fail the Address Filter */ -#define ETH_PASSCONTROLFRAMES_FORWARDPASSEDADDRFILTER ((uint32_t)0x000000C0U) /*!< MAC forwards control frames that pass the Address Filter. */ -/** - * @} - */ - -/** @defgroup ETH_Broadcast_Frames_Reception ETH Broadcast Frames Reception - * @{ - */ -#define ETH_BROADCASTFRAMESRECEPTION_ENABLE ((uint32_t)0x00000000U) -#define ETH_BROADCASTFRAMESRECEPTION_DISABLE ((uint32_t)0x00000020U) -/** - * @} - */ - -/** @defgroup ETH_Destination_Addr_Filter ETH Destination Addr Filter - * @{ - */ -#define ETH_DESTINATIONADDRFILTER_NORMAL ((uint32_t)0x00000000U) -#define ETH_DESTINATIONADDRFILTER_INVERSE ((uint32_t)0x00000008U) -/** - * @} - */ - -/** @defgroup ETH_Promiscuous_Mode ETH Promiscuous Mode - * @{ - */ -#define ETH_PROMISCUOUS_MODE_ENABLE ((uint32_t)0x00000001U) -#define ETH_PROMISCUOUS_MODE_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Multicast_Frames_Filter ETH Multicast Frames Filter - * @{ - */ -#define ETH_MULTICASTFRAMESFILTER_PERFECTHASHTABLE ((uint32_t)0x00000404U) -#define ETH_MULTICASTFRAMESFILTER_HASHTABLE ((uint32_t)0x00000004U) -#define ETH_MULTICASTFRAMESFILTER_PERFECT ((uint32_t)0x00000000U) -#define ETH_MULTICASTFRAMESFILTER_NONE ((uint32_t)0x00000010U) -/** - * @} - */ - -/** @defgroup ETH_Unicast_Frames_Filter ETH Unicast Frames Filter - * @{ - */ -#define ETH_UNICASTFRAMESFILTER_PERFECTHASHTABLE ((uint32_t)0x00000402U) -#define ETH_UNICASTFRAMESFILTER_HASHTABLE ((uint32_t)0x00000002U) -#define ETH_UNICASTFRAMESFILTER_PERFECT ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Zero_Quanta_Pause ETH Zero Quanta Pause - * @{ - */ -#define ETH_ZEROQUANTAPAUSE_ENABLE ((uint32_t)0x00000000U) -#define ETH_ZEROQUANTAPAUSE_DISABLE ((uint32_t)0x00000080U) -/** - * @} - */ - -/** @defgroup ETH_Pause_Low_Threshold ETH Pause Low Threshold - * @{ - */ -#define ETH_PAUSELOWTHRESHOLD_MINUS4 ((uint32_t)0x00000000U) /*!< Pause time minus 4 slot times */ -#define ETH_PAUSELOWTHRESHOLD_MINUS28 ((uint32_t)0x00000010U) /*!< Pause time minus 28 slot times */ -#define ETH_PAUSELOWTHRESHOLD_MINUS144 ((uint32_t)0x00000020U) /*!< Pause time minus 144 slot times */ -#define ETH_PAUSELOWTHRESHOLD_MINUS256 ((uint32_t)0x00000030U) /*!< Pause time minus 256 slot times */ -/** - * @} - */ - -/** @defgroup ETH_Unicast_Pause_Frame_Detect ETH Unicast Pause Frame Detect - * @{ - */ -#define ETH_UNICASTPAUSEFRAMEDETECT_ENABLE ((uint32_t)0x00000008U) -#define ETH_UNICASTPAUSEFRAMEDETECT_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Flow_Control ETH Receive Flow Control - * @{ - */ -#define ETH_RECEIVEFLOWCONTROL_ENABLE ((uint32_t)0x00000004U) -#define ETH_RECEIVEFLOWCONTROL_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Transmit_Flow_Control ETH Transmit Flow Control - * @{ - */ -#define ETH_TRANSMITFLOWCONTROL_ENABLE ((uint32_t)0x00000002U) -#define ETH_TRANSMITFLOWCONTROL_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_VLAN_Tag_Comparison ETH VLAN Tag Comparison - * @{ - */ -#define ETH_VLANTAGCOMPARISON_12BIT ((uint32_t)0x00010000U) -#define ETH_VLANTAGCOMPARISON_16BIT ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_MAC_addresses ETH MAC addresses - * @{ - */ -#define ETH_MAC_ADDRESS0 ((uint32_t)0x00000000U) -#define ETH_MAC_ADDRESS1 ((uint32_t)0x00000008U) -#define ETH_MAC_ADDRESS2 ((uint32_t)0x00000010U) -#define ETH_MAC_ADDRESS3 ((uint32_t)0x00000018U) -/** - * @} - */ - -/** @defgroup ETH_MAC_addresses_filter_SA_DA ETH MAC addresses filter SA DA - * @{ - */ -#define ETH_MAC_ADDRESSFILTER_SA ((uint32_t)0x00000000U) -#define ETH_MAC_ADDRESSFILTER_DA ((uint32_t)0x00000008U) -/** - * @} - */ - -/** @defgroup ETH_MAC_addresses_filter_Mask_bytes ETH MAC addresses filter Mask bytes - * @{ - */ -#define ETH_MAC_ADDRESSMASK_BYTE6 ((uint32_t)0x20000000U) /*!< Mask MAC Address high reg bits [15:8] */ -#define ETH_MAC_ADDRESSMASK_BYTE5 ((uint32_t)0x10000000U) /*!< Mask MAC Address high reg bits [7:0] */ -#define ETH_MAC_ADDRESSMASK_BYTE4 ((uint32_t)0x08000000U) /*!< Mask MAC Address low reg bits [31:24] */ -#define ETH_MAC_ADDRESSMASK_BYTE3 ((uint32_t)0x04000000U) /*!< Mask MAC Address low reg bits [23:16] */ -#define ETH_MAC_ADDRESSMASK_BYTE2 ((uint32_t)0x02000000U) /*!< Mask MAC Address low reg bits [15:8] */ -#define ETH_MAC_ADDRESSMASK_BYTE1 ((uint32_t)0x01000000U) /*!< Mask MAC Address low reg bits [70] */ -/** - * @} - */ - -/** @defgroup ETH_MAC_Debug_flags ETH MAC Debug flags - * @{ - */ -#define ETH_MAC_TXFIFO_FULL ((uint32_t)0x02000000) /* Tx FIFO full */ -#define ETH_MAC_TXFIFONOT_EMPTY ((uint32_t)0x01000000) /* Tx FIFO not empty */ -#define ETH_MAC_TXFIFO_WRITE_ACTIVE ((uint32_t)0x00400000) /* Tx FIFO write active */ -#define ETH_MAC_TXFIFO_IDLE ((uint32_t)0x00000000) /* Tx FIFO read status: Idle */ -#define ETH_MAC_TXFIFO_READ ((uint32_t)0x00100000) /* Tx FIFO read status: Read (transferring data to the MAC transmitter) */ -#define ETH_MAC_TXFIFO_WAITING ((uint32_t)0x00200000) /* Tx FIFO read status: Waiting for TxStatus from MAC transmitter */ -#define ETH_MAC_TXFIFO_WRITING ((uint32_t)0x00300000) /* Tx FIFO read status: Writing the received TxStatus or flushing the TxFIFO */ -#define ETH_MAC_TRANSMISSION_PAUSE ((uint32_t)0x00080000) /* MAC transmitter in pause */ -#define ETH_MAC_TRANSMITFRAMECONTROLLER_IDLE ((uint32_t)0x00000000) /* MAC transmit frame controller: Idle */ -#define ETH_MAC_TRANSMITFRAMECONTROLLER_WAITING ((uint32_t)0x00020000) /* MAC transmit frame controller: Waiting for Status of previous frame or IFG/backoff period to be over */ -#define ETH_MAC_TRANSMITFRAMECONTROLLER_GENRATING_PCF ((uint32_t)0x00040000) /* MAC transmit frame controller: Generating and transmitting a Pause control frame (in full duplex mode) */ -#define ETH_MAC_TRANSMITFRAMECONTROLLER_TRANSFERRING ((uint32_t)0x00060000) /* MAC transmit frame controller: Transferring input frame for transmission */ -#define ETH_MAC_MII_TRANSMIT_ACTIVE ((uint32_t)0x00010000) /* MAC MII transmit engine active */ -#define ETH_MAC_RXFIFO_EMPTY ((uint32_t)0x00000000) /* Rx FIFO fill level: empty */ -#define ETH_MAC_RXFIFO_BELOW_THRESHOLD ((uint32_t)0x00000100) /* Rx FIFO fill level: fill-level below flow-control de-activate threshold */ -#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD ((uint32_t)0x00000200) /* Rx FIFO fill level: fill-level above flow-control activate threshold */ -#define ETH_MAC_RXFIFO_FULL ((uint32_t)0x00000300) /* Rx FIFO fill level: full */ -#define ETH_MAC_READCONTROLLER_IDLE ((uint32_t)0x00000060) /* Rx FIFO read controller IDLE state */ -#define ETH_MAC_READCONTROLLER_READING_DATA ((uint32_t)0x00000060) /* Rx FIFO read controller Reading frame data */ -#define ETH_MAC_READCONTROLLER_READING_STATUS ((uint32_t)0x00000060) /* Rx FIFO read controller Reading frame status (or time-stamp) */ -#define ETH_MAC_READCONTROLLER_ FLUSHING ((uint32_t)0x00000060) /* Rx FIFO read controller Flushing the frame data and status */ -#define ETH_MAC_RXFIFO_WRITE_ACTIVE ((uint32_t)0x00000010) /* Rx FIFO write controller active */ -#define ETH_MAC_SMALL_FIFO_NOTACTIVE ((uint32_t)0x00000000) /* MAC small FIFO read / write controllers not active */ -#define ETH_MAC_SMALL_FIFO_READ_ACTIVE ((uint32_t)0x00000002) /* MAC small FIFO read controller active */ -#define ETH_MAC_SMALL_FIFO_WRITE_ACTIVE ((uint32_t)0x00000004) /* MAC small FIFO write controller active */ -#define ETH_MAC_SMALL_FIFO_RW_ACTIVE ((uint32_t)0x00000006) /* MAC small FIFO read / write controllers active */ -#define ETH_MAC_MII_RECEIVE_PROTOCOL_ACTIVE ((uint32_t)0x00000001) /* MAC MII receive protocol engine active */ -/** - * @} - */ - -/** @defgroup ETH_Drop_TCP_IP_Checksum_Error_Frame ETH Drop TCP IP Checksum Error Frame - * @{ - */ -#define ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE ((uint32_t)0x00000000U) -#define ETH_DROPTCPIPCHECKSUMERRORFRAME_DISABLE ((uint32_t)0x04000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Store_Forward ETH Receive Store Forward - * @{ - */ -#define ETH_RECEIVESTOREFORWARD_ENABLE ((uint32_t)0x02000000U) -#define ETH_RECEIVESTOREFORWARD_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Flush_Received_Frame ETH Flush Received Frame - * @{ - */ -#define ETH_FLUSHRECEIVEDFRAME_ENABLE ((uint32_t)0x00000000U) -#define ETH_FLUSHRECEIVEDFRAME_DISABLE ((uint32_t)0x01000000U) -/** - * @} - */ - -/** @defgroup ETH_Transmit_Store_Forward ETH Transmit Store Forward - * @{ - */ -#define ETH_TRANSMITSTOREFORWARD_ENABLE ((uint32_t)0x00200000U) -#define ETH_TRANSMITSTOREFORWARD_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Transmit_Threshold_Control ETH Transmit Threshold Control - * @{ - */ -#define ETH_TRANSMITTHRESHOLDCONTROL_64BYTES ((uint32_t)0x00000000U) /*!< threshold level of the MTL Transmit FIFO is 64 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_128BYTES ((uint32_t)0x00004000U) /*!< threshold level of the MTL Transmit FIFO is 128 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_192BYTES ((uint32_t)0x00008000U) /*!< threshold level of the MTL Transmit FIFO is 192 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_256BYTES ((uint32_t)0x0000C000U) /*!< threshold level of the MTL Transmit FIFO is 256 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_40BYTES ((uint32_t)0x00010000U) /*!< threshold level of the MTL Transmit FIFO is 40 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_32BYTES ((uint32_t)0x00014000U) /*!< threshold level of the MTL Transmit FIFO is 32 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_24BYTES ((uint32_t)0x00018000U) /*!< threshold level of the MTL Transmit FIFO is 24 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_16BYTES ((uint32_t)0x0001C000U) /*!< threshold level of the MTL Transmit FIFO is 16 Bytes */ -/** - * @} - */ - -/** @defgroup ETH_Forward_Error_Frames ETH Forward Error Frames - * @{ - */ -#define ETH_FORWARDERRORFRAMES_ENABLE ((uint32_t)0x00000080U) -#define ETH_FORWARDERRORFRAMES_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Forward_Undersized_Good_Frames ETH Forward Undersized Good Frames - * @{ - */ -#define ETH_FORWARDUNDERSIZEDGOODFRAMES_ENABLE ((uint32_t)0x00000040U) -#define ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Threshold_Control ETH Receive Threshold Control - * @{ - */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES ((uint32_t)0x00000000U) /*!< threshold level of the MTL Receive FIFO is 64 Bytes */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_32BYTES ((uint32_t)0x00000008U) /*!< threshold level of the MTL Receive FIFO is 32 Bytes */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_96BYTES ((uint32_t)0x00000010U) /*!< threshold level of the MTL Receive FIFO is 96 Bytes */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_128BYTES ((uint32_t)0x00000018U) /*!< threshold level of the MTL Receive FIFO is 128 Bytes */ -/** - * @} - */ - -/** @defgroup ETH_Second_Frame_Operate ETH Second Frame Operate - * @{ - */ -#define ETH_SECONDFRAMEOPERARTE_ENABLE ((uint32_t)0x00000004U) -#define ETH_SECONDFRAMEOPERARTE_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Address_Aligned_Beats ETH Address Aligned Beats - * @{ - */ -#define ETH_ADDRESSALIGNEDBEATS_ENABLE ((uint32_t)0x02000000U) -#define ETH_ADDRESSALIGNEDBEATS_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Fixed_Burst ETH Fixed Burst - * @{ - */ -#define ETH_FIXEDBURST_ENABLE ((uint32_t)0x00010000U) -#define ETH_FIXEDBURST_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Rx_DMA_Burst_Length ETH Rx DMA Burst Length - * @{ - */ -#define ETH_RXDMABURSTLENGTH_1BEAT ((uint32_t)0x00020000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 1 */ -#define ETH_RXDMABURSTLENGTH_2BEAT ((uint32_t)0x00040000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 2 */ -#define ETH_RXDMABURSTLENGTH_4BEAT ((uint32_t)0x00080000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */ -#define ETH_RXDMABURSTLENGTH_8BEAT ((uint32_t)0x00100000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */ -#define ETH_RXDMABURSTLENGTH_16BEAT ((uint32_t)0x00200000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */ -#define ETH_RXDMABURSTLENGTH_32BEAT ((uint32_t)0x00400000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_4BEAT ((uint32_t)0x01020000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_8BEAT ((uint32_t)0x01040000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_16BEAT ((uint32_t)0x01080000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_32BEAT ((uint32_t)0x01100000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_64BEAT ((uint32_t)0x01200000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 64 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_128BEAT ((uint32_t)0x01400000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 128 */ -/** - * @} - */ - -/** @defgroup ETH_Tx_DMA_Burst_Length ETH Tx DMA Burst Length - * @{ - */ -#define ETH_TXDMABURSTLENGTH_1BEAT ((uint32_t)0x00000100U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 1 */ -#define ETH_TXDMABURSTLENGTH_2BEAT ((uint32_t)0x00000200U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 2 */ -#define ETH_TXDMABURSTLENGTH_4BEAT ((uint32_t)0x00000400U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */ -#define ETH_TXDMABURSTLENGTH_8BEAT ((uint32_t)0x00000800U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */ -#define ETH_TXDMABURSTLENGTH_16BEAT ((uint32_t)0x00001000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */ -#define ETH_TXDMABURSTLENGTH_32BEAT ((uint32_t)0x00002000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_4BEAT ((uint32_t)0x01000100U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_8BEAT ((uint32_t)0x01000200U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_16BEAT ((uint32_t)0x01000400U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_32BEAT ((uint32_t)0x01000800U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_64BEAT ((uint32_t)0x01001000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 64 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_128BEAT ((uint32_t)0x01002000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 128 */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Enhanced_descriptor_format ETH DMA Enhanced descriptor format - * @{ - */ -#define ETH_DMAENHANCEDDESCRIPTOR_ENABLE ((uint32_t)0x00000080U) -#define ETH_DMAENHANCEDDESCRIPTOR_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_DMA_Arbitration ETH DMA Arbitration - * @{ - */ -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1 ((uint32_t)0x00000000U) -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_2_1 ((uint32_t)0x00004000U) -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_3_1 ((uint32_t)0x00008000U) -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_4_1 ((uint32_t)0x0000C000U) -#define ETH_DMAARBITRATION_RXPRIORTX ((uint32_t)0x00000002U) -/** - * @} - */ - -/** @defgroup ETH_DMA_Tx_descriptor_segment ETH DMA Tx descriptor segment - * @{ - */ -#define ETH_DMATXDESC_LASTSEGMENTS ((uint32_t)0x40000000U) /*!< Last Segment */ -#define ETH_DMATXDESC_FIRSTSEGMENT ((uint32_t)0x20000000U) /*!< First Segment */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Tx_descriptor_Checksum_Insertion_Control ETH DMA Tx descriptor Checksum Insertion Control - * @{ - */ -#define ETH_DMATXDESC_CHECKSUMBYPASS ((uint32_t)0x00000000U) /*!< Checksum engine bypass */ -#define ETH_DMATXDESC_CHECKSUMIPV4HEADER ((uint32_t)0x00400000U) /*!< IPv4 header checksum insertion */ -#define ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT ((uint32_t)0x00800000U) /*!< TCP/UDP/ICMP checksum insertion. Pseudo header checksum is assumed to be present */ -#define ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL ((uint32_t)0x00C00000U) /*!< TCP/UDP/ICMP checksum fully in hardware including pseudo header */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Rx_descriptor_buffers ETH DMA Rx descriptor buffers - * @{ - */ -#define ETH_DMARXDESC_BUFFER1 ((uint32_t)0x00000000U) /*!< DMA Rx Desc Buffer1 */ -#define ETH_DMARXDESC_BUFFER2 ((uint32_t)0x00000001U) /*!< DMA Rx Desc Buffer2 */ -/** - * @} - */ - -/** @defgroup ETH_PMT_Flags ETH PMT Flags - * @{ - */ -#define ETH_PMT_FLAG_WUFFRPR ((uint32_t)0x80000000U) /*!< Wake-Up Frame Filter Register Pointer Reset */ -#define ETH_PMT_FLAG_WUFR ((uint32_t)0x00000040U) /*!< Wake-Up Frame Received */ -#define ETH_PMT_FLAG_MPR ((uint32_t)0x00000020U) /*!< Magic Packet Received */ -/** - * @} - */ - -/** @defgroup ETH_MMC_Tx_Interrupts ETH MMC Tx Interrupts - * @{ - */ -#define ETH_MMC_IT_TGF ((uint32_t)0x00200000U) /*!< When Tx good frame counter reaches half the maximum value */ -#define ETH_MMC_IT_TGFMSC ((uint32_t)0x00008000U) /*!< When Tx good multi col counter reaches half the maximum value */ -#define ETH_MMC_IT_TGFSC ((uint32_t)0x00004000U) /*!< When Tx good single col counter reaches half the maximum value */ -/** - * @} - */ - -/** @defgroup ETH_MMC_Rx_Interrupts ETH MMC Rx Interrupts - * @{ - */ -#define ETH_MMC_IT_RGUF ((uint32_t)0x10020000U) /*!< When Rx good unicast frames counter reaches half the maximum value */ -#define ETH_MMC_IT_RFAE ((uint32_t)0x10000040U) /*!< When Rx alignment error counter reaches half the maximum value */ -#define ETH_MMC_IT_RFCE ((uint32_t)0x10000020U) /*!< When Rx crc error counter reaches half the maximum value */ -/** - * @} - */ - -/** @defgroup ETH_MAC_Flags ETH MAC Flags - * @{ - */ -#define ETH_MAC_FLAG_TST ((uint32_t)0x00000200U) /*!< Time stamp trigger flag (on MAC) */ -#define ETH_MAC_FLAG_MMCT ((uint32_t)0x00000040U) /*!< MMC transmit flag */ -#define ETH_MAC_FLAG_MMCR ((uint32_t)0x00000020U) /*!< MMC receive flag */ -#define ETH_MAC_FLAG_MMC ((uint32_t)0x00000010U) /*!< MMC flag (on MAC) */ -#define ETH_MAC_FLAG_PMT ((uint32_t)0x00000008U) /*!< PMT flag (on MAC) */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Flags ETH DMA Flags - * @{ - */ -#define ETH_DMA_FLAG_TST ((uint32_t)0x20000000U) /*!< Time-stamp trigger interrupt (on DMA) */ -#define ETH_DMA_FLAG_PMT ((uint32_t)0x10000000U) /*!< PMT interrupt (on DMA) */ -#define ETH_DMA_FLAG_MMC ((uint32_t)0x08000000U) /*!< MMC interrupt (on DMA) */ -#define ETH_DMA_FLAG_DATATRANSFERERROR ((uint32_t)0x00800000U) /*!< Error bits 0-Rx DMA, 1-Tx DMA */ -#define ETH_DMA_FLAG_READWRITEERROR ((uint32_t)0x01000000U) /*!< Error bits 0-write transfer, 1-read transfer */ -#define ETH_DMA_FLAG_ACCESSERROR ((uint32_t)0x02000000U) /*!< Error bits 0-data buffer, 1-desc. access */ -#define ETH_DMA_FLAG_NIS ((uint32_t)0x00010000U) /*!< Normal interrupt summary flag */ -#define ETH_DMA_FLAG_AIS ((uint32_t)0x00008000U) /*!< Abnormal interrupt summary flag */ -#define ETH_DMA_FLAG_ER ((uint32_t)0x00004000U) /*!< Early receive flag */ -#define ETH_DMA_FLAG_FBE ((uint32_t)0x00002000U) /*!< Fatal bus error flag */ -#define ETH_DMA_FLAG_ET ((uint32_t)0x00000400U) /*!< Early transmit flag */ -#define ETH_DMA_FLAG_RWT ((uint32_t)0x00000200U) /*!< Receive watchdog timeout flag */ -#define ETH_DMA_FLAG_RPS ((uint32_t)0x00000100U) /*!< Receive process stopped flag */ -#define ETH_DMA_FLAG_RBU ((uint32_t)0x00000080U) /*!< Receive buffer unavailable flag */ -#define ETH_DMA_FLAG_R ((uint32_t)0x00000040U) /*!< Receive flag */ -#define ETH_DMA_FLAG_TU ((uint32_t)0x00000020U) /*!< Underflow flag */ -#define ETH_DMA_FLAG_RO ((uint32_t)0x00000010U) /*!< Overflow flag */ -#define ETH_DMA_FLAG_TJT ((uint32_t)0x00000008U) /*!< Transmit jabber timeout flag */ -#define ETH_DMA_FLAG_TBU ((uint32_t)0x00000004U) /*!< Transmit buffer unavailable flag */ -#define ETH_DMA_FLAG_TPS ((uint32_t)0x00000002U) /*!< Transmit process stopped flag */ -#define ETH_DMA_FLAG_T ((uint32_t)0x00000001U) /*!< Transmit flag */ -/** - * @} - */ - -/** @defgroup ETH_MAC_Interrupts ETH MAC Interrupts - * @{ - */ -#define ETH_MAC_IT_TST ((uint32_t)0x00000200U) /*!< Time stamp trigger interrupt (on MAC) */ -#define ETH_MAC_IT_MMCT ((uint32_t)0x00000040U) /*!< MMC transmit interrupt */ -#define ETH_MAC_IT_MMCR ((uint32_t)0x00000020U) /*!< MMC receive interrupt */ -#define ETH_MAC_IT_MMC ((uint32_t)0x00000010U) /*!< MMC interrupt (on MAC) */ -#define ETH_MAC_IT_PMT ((uint32_t)0x00000008U) /*!< PMT interrupt (on MAC) */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Interrupts ETH DMA Interrupts - * @{ - */ -#define ETH_DMA_IT_TST ((uint32_t)0x20000000U) /*!< Time-stamp trigger interrupt (on DMA) */ -#define ETH_DMA_IT_PMT ((uint32_t)0x10000000U) /*!< PMT interrupt (on DMA) */ -#define ETH_DMA_IT_MMC ((uint32_t)0x08000000U) /*!< MMC interrupt (on DMA) */ -#define ETH_DMA_IT_NIS ((uint32_t)0x00010000U) /*!< Normal interrupt summary */ -#define ETH_DMA_IT_AIS ((uint32_t)0x00008000U) /*!< Abnormal interrupt summary */ -#define ETH_DMA_IT_ER ((uint32_t)0x00004000U) /*!< Early receive interrupt */ -#define ETH_DMA_IT_FBE ((uint32_t)0x00002000U) /*!< Fatal bus error interrupt */ -#define ETH_DMA_IT_ET ((uint32_t)0x00000400U) /*!< Early transmit interrupt */ -#define ETH_DMA_IT_RWT ((uint32_t)0x00000200U) /*!< Receive watchdog timeout interrupt */ -#define ETH_DMA_IT_RPS ((uint32_t)0x00000100U) /*!< Receive process stopped interrupt */ -#define ETH_DMA_IT_RBU ((uint32_t)0x00000080U) /*!< Receive buffer unavailable interrupt */ -#define ETH_DMA_IT_R ((uint32_t)0x00000040U) /*!< Receive interrupt */ -#define ETH_DMA_IT_TU ((uint32_t)0x00000020U) /*!< Underflow interrupt */ -#define ETH_DMA_IT_RO ((uint32_t)0x00000010U) /*!< Overflow interrupt */ -#define ETH_DMA_IT_TJT ((uint32_t)0x00000008U) /*!< Transmit jabber timeout interrupt */ -#define ETH_DMA_IT_TBU ((uint32_t)0x00000004U) /*!< Transmit buffer unavailable interrupt */ -#define ETH_DMA_IT_TPS ((uint32_t)0x00000002U) /*!< Transmit process stopped interrupt */ -#define ETH_DMA_IT_T ((uint32_t)0x00000001U) /*!< Transmit interrupt */ -/** - * @} - */ - -/** @defgroup ETH_DMA_transmit_process_state ETH DMA transmit process state - * @{ - */ -#define ETH_DMA_TRANSMITPROCESS_STOPPED ((uint32_t)0x00000000U) /*!< Stopped - Reset or Stop Tx Command issued */ -#define ETH_DMA_TRANSMITPROCESS_FETCHING ((uint32_t)0x00100000U) /*!< Running - fetching the Tx descriptor */ -#define ETH_DMA_TRANSMITPROCESS_WAITING ((uint32_t)0x00200000U) /*!< Running - waiting for status */ -#define ETH_DMA_TRANSMITPROCESS_READING ((uint32_t)0x00300000U) /*!< Running - reading the data from host memory */ -#define ETH_DMA_TRANSMITPROCESS_SUSPENDED ((uint32_t)0x00600000U) /*!< Suspended - Tx Descriptor unavailable */ -#define ETH_DMA_TRANSMITPROCESS_CLOSING ((uint32_t)0x00700000U) /*!< Running - closing Rx descriptor */ - -/** - * @} - */ - - -/** @defgroup ETH_DMA_receive_process_state ETH DMA receive process state - * @{ - */ -#define ETH_DMA_RECEIVEPROCESS_STOPPED ((uint32_t)0x00000000U) /*!< Stopped - Reset or Stop Rx Command issued */ -#define ETH_DMA_RECEIVEPROCESS_FETCHING ((uint32_t)0x00020000U) /*!< Running - fetching the Rx descriptor */ -#define ETH_DMA_RECEIVEPROCESS_WAITING ((uint32_t)0x00060000U) /*!< Running - waiting for packet */ -#define ETH_DMA_RECEIVEPROCESS_SUSPENDED ((uint32_t)0x00080000U) /*!< Suspended - Rx Descriptor unavailable */ -#define ETH_DMA_RECEIVEPROCESS_CLOSING ((uint32_t)0x000A0000U) /*!< Running - closing descriptor */ -#define ETH_DMA_RECEIVEPROCESS_QUEUING ((uint32_t)0x000E0000U) /*!< Running - queuing the receive frame into host memory */ - -/** - * @} - */ - -/** @defgroup ETH_DMA_overflow ETH DMA overflow - * @{ - */ -#define ETH_DMA_OVERFLOW_RXFIFOCOUNTER ((uint32_t)0x10000000U) /*!< Overflow bit for FIFO overflow counter */ -#define ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER ((uint32_t)0x00010000U) /*!< Overflow bit for missed frame counter */ -/** - * @} - */ - -/** @defgroup ETH_EXTI_LINE_WAKEUP ETH EXTI LINE WAKEUP - * @{ - */ -#define ETH_EXTI_LINE_WAKEUP ((uint32_t)0x00080000U) /*!< External interrupt line 19 Connected to the ETH EXTI Line */ - -/** - * @} - */ - -/** - * @} - */ - -/* Exported macro ------------------------------------------------------------*/ -/** @defgroup ETH_Exported_Macros ETH Exported Macros - * @brief macros to handle interrupts and specific clock configurations - * @{ - */ - -/** @brief Reset ETH handle state - * @param __HANDLE__: specifies the ETH handle. - * @retval None - */ -#define __HAL_ETH_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_ETH_STATE_RESET) - -/** - * @brief Checks whether the specified Ethernet DMA Tx Desc flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag of TDES0 to check. - * @retval the ETH_DMATxDescFlag (SET or RESET). - */ -#define __HAL_ETH_DMATXDESC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->TxDesc->Status & (__FLAG__) == (__FLAG__)) - -/** - * @brief Checks whether the specified Ethernet DMA Rx Desc flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag of RDES0 to check. - * @retval the ETH_DMATxDescFlag (SET or RESET). - */ -#define __HAL_ETH_DMARXDESC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->RxDesc->Status & (__FLAG__) == (__FLAG__)) - -/** - * @brief Enables the specified DMA Rx Desc receive interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMARXDESC_ENABLE_IT(__HANDLE__) ((__HANDLE__)->RxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARXDESC_DIC)) - -/** - * @brief Disables the specified DMA Rx Desc receive interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMARXDESC_DISABLE_IT(__HANDLE__) ((__HANDLE__)->RxDesc->ControlBufferSize |= ETH_DMARXDESC_DIC) - -/** - * @brief Set the specified DMA Rx Desc Own bit. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMARXDESC_SET_OWN_BIT(__HANDLE__) ((__HANDLE__)->RxDesc->Status |= ETH_DMARXDESC_OWN) - -/** - * @brief Returns the specified Ethernet DMA Tx Desc collision count. - * @param __HANDLE__: ETH Handle - * @retval The Transmit descriptor collision counter value. - */ -#define __HAL_ETH_DMATXDESC_GET_COLLISION_COUNT(__HANDLE__) (((__HANDLE__)->TxDesc->Status & ETH_DMATXDESC_CC) >> ETH_DMATXDESC_COLLISION_COUNTSHIFT) - -/** - * @brief Set the specified DMA Tx Desc Own bit. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_SET_OWN_BIT(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_OWN) - -/** - * @brief Enables the specified DMA Tx Desc Transmit interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_ENABLE_IT(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_IC) - -/** - * @brief Disables the specified DMA Tx Desc Transmit interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_DISABLE_IT(__HANDLE__) ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_IC) - -/** - * @brief Selects the specified Ethernet DMA Tx Desc Checksum Insertion. - * @param __HANDLE__: ETH Handle - * @param __CHECKSUM__: specifies is the DMA Tx desc checksum insertion. - * This parameter can be one of the following values: - * @arg ETH_DMATXDESC_CHECKSUMBYPASS : Checksum bypass - * @arg ETH_DMATXDESC_CHECKSUMIPV4HEADER : IPv4 header checksum - * @arg ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT : TCP/UDP/ICMP checksum. Pseudo header checksum is assumed to be present - * @arg ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL : TCP/UDP/ICMP checksum fully in hardware including pseudo header - * @retval None - */ -#define __HAL_ETH_DMATXDESC_CHECKSUM_INSERTION(__HANDLE__, __CHECKSUM__) ((__HANDLE__)->TxDesc->Status |= (__CHECKSUM__)) - -/** - * @brief Enables the DMA Tx Desc CRC. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_CRC_ENABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_DC) - -/** - * @brief Disables the DMA Tx Desc CRC. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_CRC_DISABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_DC) - -/** - * @brief Enables the DMA Tx Desc padding for frame shorter than 64 bytes. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_SHORT_FRAME_PADDING_ENABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_DP) - -/** - * @brief Disables the DMA Tx Desc padding for frame shorter than 64 bytes. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_SHORT_FRAME_PADDING_DISABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_DP) - -/** - * @brief Enables the specified Ethernet MAC interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet MAC interrupt sources to be - * enabled or disabled. - * This parameter can be any combination of the following values: - * @arg ETH_MAC_IT_TST : Time stamp trigger interrupt - * @arg ETH_MAC_IT_PMT : PMT interrupt - * @retval None - */ -#define __HAL_ETH_MAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MACIMR |= (__INTERRUPT__)) - -/** - * @brief Disables the specified Ethernet MAC interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet MAC interrupt sources to be - * enabled or disabled. - * This parameter can be any combination of the following values: - * @arg ETH_MAC_IT_TST : Time stamp trigger interrupt - * @arg ETH_MAC_IT_PMT : PMT interrupt - * @retval None - */ -#define __HAL_ETH_MAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MACIMR &= ~(__INTERRUPT__)) - -/** - * @brief Initiate a Pause Control Frame (Full-duplex only). - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_INITIATE_PAUSE_CONTROL_FRAME(__HANDLE__) ((__HANDLE__)->Instance->MACFCR |= ETH_MACFCR_FCBBPA) - -/** - * @brief Checks whether the Ethernet flow control busy bit is set or not. - * @param __HANDLE__: ETH Handle - * @retval The new state of flow control busy status bit (SET or RESET). - */ -#define __HAL_ETH_GET_FLOW_CONTROL_BUSY_STATUS(__HANDLE__) (((__HANDLE__)->Instance->MACFCR & ETH_MACFCR_FCBBPA) == ETH_MACFCR_FCBBPA) - -/** - * @brief Enables the MAC Back Pressure operation activation (Half-duplex only). - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_BACK_PRESSURE_ACTIVATION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACFCR |= ETH_MACFCR_FCBBPA) - -/** - * @brief Disables the MAC BackPressure operation activation (Half-duplex only). - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_BACK_PRESSURE_ACTIVATION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACFCR &= ~ETH_MACFCR_FCBBPA) - -/** - * @brief Checks whether the specified Ethernet MAC flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag to check. - * This parameter can be one of the following values: - * @arg ETH_MAC_FLAG_TST : Time stamp trigger flag - * @arg ETH_MAC_FLAG_MMCT : MMC transmit flag - * @arg ETH_MAC_FLAG_MMCR : MMC receive flag - * @arg ETH_MAC_FLAG_MMC : MMC flag - * @arg ETH_MAC_FLAG_PMT : PMT flag - * @retval The state of Ethernet MAC flag. - */ -#define __HAL_ETH_MAC_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->MACSR &( __FLAG__)) == ( __FLAG__)) - -/** - * @brief Enables the specified Ethernet DMA interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet DMA interrupt sources to be - * enabled @ref ETH_DMA_Interrupts - * @retval None - */ -#define __HAL_ETH_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMAIER |= (__INTERRUPT__)) - -/** - * @brief Disables the specified Ethernet DMA interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet DMA interrupt sources to be - * disabled. @ref ETH_DMA_Interrupts - * @retval None - */ -#define __HAL_ETH_DMA_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMAIER &= ~(__INTERRUPT__)) - -/** - * @brief Clears the Ethernet DMA IT pending bit. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the interrupt pending bit to clear. @ref ETH_DMA_Interrupts - * @retval None - */ -#define __HAL_ETH_DMA_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMASR =(__INTERRUPT__)) - -/** - * @brief Checks whether the specified Ethernet DMA flag is set or not. -* @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag to check. @ref ETH_DMA_Flags - * @retval The new state of ETH_DMA_FLAG (SET or RESET). - */ -#define __HAL_ETH_DMA_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->DMASR &( __FLAG__)) == ( __FLAG__)) - -/** - * @brief Checks whether the specified Ethernet DMA flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag to clear. @ref ETH_DMA_Flags - * @retval The new state of ETH_DMA_FLAG (SET or RESET). - */ -#define __HAL_ETH_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->DMASR = (__FLAG__)) - -/** - * @brief Checks whether the specified Ethernet DMA overflow flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __OVERFLOW__: specifies the DMA overflow flag to check. - * This parameter can be one of the following values: - * @arg ETH_DMA_OVERFLOW_RXFIFOCOUNTER : Overflow for FIFO Overflows Counter - * @arg ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER : Overflow for Buffer Unavailable Missed Frame Counter - * @retval The state of Ethernet DMA overflow Flag (SET or RESET). - */ -#define __HAL_ETH_GET_DMA_OVERFLOW_STATUS(__HANDLE__, __OVERFLOW__) (((__HANDLE__)->Instance->DMAMFBOCR & (__OVERFLOW__)) == (__OVERFLOW__)) - -/** - * @brief Set the DMA Receive status watchdog timer register value - * @param __HANDLE__: ETH Handle - * @param __VALUE__: DMA Receive status watchdog timer register value - * @retval None - */ -#define __HAL_ETH_SET_RECEIVE_WATCHDOG_TIMER(__HANDLE__, __VALUE__) ((__HANDLE__)->Instance->DMARSWTR = (__VALUE__)) - -/** - * @brief Enables any unicast packet filtered by the MAC address - * recognition to be a wake-up frame. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_GLOBAL_UNICAST_WAKEUP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_GU) - -/** - * @brief Disables any unicast packet filtered by the MAC address - * recognition to be a wake-up frame. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_GLOBAL_UNICAST_WAKEUP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_GU) - -/** - * @brief Enables the MAC Wake-Up Frame Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_WAKEUP_FRAME_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_WFE) - -/** - * @brief Disables the MAC Wake-Up Frame Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_WAKEUP_FRAME_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_WFE) - -/** - * @brief Enables the MAC Magic Packet Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MAGIC_PACKET_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_MPE) - -/** - * @brief Disables the MAC Magic Packet Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MAGIC_PACKET_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_WFE) - -/** - * @brief Enables the MAC Power Down. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_POWER_DOWN_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_PD) - -/** - * @brief Disables the MAC Power Down. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_POWER_DOWN_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_PD) - -/** - * @brief Checks whether the specified Ethernet PMT flag is set or not. - * @param __HANDLE__: ETH Handle. - * @param __FLAG__: specifies the flag to check. - * This parameter can be one of the following values: - * @arg ETH_PMT_FLAG_WUFFRPR : Wake-Up Frame Filter Register Pointer Reset - * @arg ETH_PMT_FLAG_WUFR : Wake-Up Frame Received - * @arg ETH_PMT_FLAG_MPR : Magic Packet Received - * @retval The new state of Ethernet PMT Flag (SET or RESET). - */ -#define __HAL_ETH_GET_PMT_FLAG_STATUS(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->MACPMTCSR &( __FLAG__)) == ( __FLAG__)) - -/** - * @brief Preset and Initialize the MMC counters to almost-full value: 0xFFFF_FFF0 (full - 16) - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_FULL_PRESET(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= (ETH_MMCCR_MCFHP | ETH_MMCCR_MCP)) - -/** - * @brief Preset and Initialize the MMC counters to almost-half value: 0x7FFF_FFF0 (half - 16) - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_HALF_PRESET(__HANDLE__) do{(__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_MCFHP;\ - (__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_MCP;} while (0) - -/** - * @brief Enables the MMC Counter Freeze. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_FREEZE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_MCF) - -/** - * @brief Disables the MMC Counter Freeze. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_FREEZE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_MCF) - -/** - * @brief Enables the MMC Reset On Read. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_RESET_ONREAD_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_ROR) - -/** - * @brief Disables the MMC Reset On Read. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_RESET_ONREAD_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_ROR) - -/** - * @brief Enables the MMC Counter Stop Rollover. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_COUNTER_ROLLOVER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_CSR) - -/** - * @brief Disables the MMC Counter Stop Rollover. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_COUNTER_ROLLOVER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_CSR) - -/** - * @brief Resets the MMC Counters. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTERS_RESET(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_CR) - -/** - * @brief Enables the specified Ethernet MMC Rx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_RGUF : When Rx good unicast frames counter reaches half the maximum value - * @arg ETH_MMC_IT_RFAE : When Rx alignment error counter reaches half the maximum value - * @arg ETH_MMC_IT_RFCE : When Rx crc error counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_RX_IT_ENABLE(__HANDLE__, __INTERRUPT__) (__HANDLE__)->Instance->MMCRIMR &= ~((__INTERRUPT__) & 0xEFFFFFFF) -/** - * @brief Disables the specified Ethernet MMC Rx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_RGUF : When Rx good unicast frames counter reaches half the maximum value - * @arg ETH_MMC_IT_RFAE : When Rx alignment error counter reaches half the maximum value - * @arg ETH_MMC_IT_RFCE : When Rx crc error counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_RX_IT_DISABLE(__HANDLE__, __INTERRUPT__) (__HANDLE__)->Instance->MMCRIMR |= ((__INTERRUPT__) & 0xEFFFFFFF) -/** - * @brief Enables the specified Ethernet MMC Tx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_TGF : When Tx good frame counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFMSC: When Tx good multi col counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFSC : When Tx good single col counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_TX_IT_ENABLE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MMCRIMR &= ~ (__INTERRUPT__)) - -/** - * @brief Disables the specified Ethernet MMC Tx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_TGF : When Tx good frame counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFMSC: When Tx good multi col counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFSC : When Tx good single col counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_TX_IT_DISABLE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MMCRIMR |= (__INTERRUPT__)) - -/** - * @brief Enables the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_IT() EXTI->IMR |= (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Disables the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_IT() EXTI->IMR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enable event on ETH External event line. - * @retval None. - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_EVENT() EXTI->EMR |= (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Disable event on ETH External event line - * @retval None. - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_EVENT() EXTI->EMR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Get flag of the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_GET_FLAG() EXTI->PR & (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Clear flag of the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG() EXTI->PR = (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enables rising edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_RISING_EDGE_TRIGGER() EXTI->RTSR |= ETH_EXTI_LINE_WAKEUP - -/** - * @brief Disables the rising edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_RISING_EDGE_TRIGGER() EXTI->RTSR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enables falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLING_EDGE_TRIGGER() EXTI->FTSR |= (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Disables falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_FALLING_EDGE_TRIGGER() EXTI->FTSR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enables rising/falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLINGRISING_TRIGGER() EXTI->RTSR |= ETH_EXTI_LINE_WAKEUP;\ - EXTI->FTSR |= ETH_EXTI_LINE_WAKEUP - -/** - * @brief Disables rising/falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_FALLINGRISING_TRIGGER() EXTI->RTSR &= ~(ETH_EXTI_LINE_WAKEUP);\ - EXTI->FTSR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Generate a Software interrupt on selected EXTI line. - * @retval None. - */ -#define __HAL_ETH_WAKEUP_EXTI_GENERATE_SWIT() EXTI->SWIER|= ETH_EXTI_LINE_WAKEUP - -/** - * @} - */ -/* Exported functions --------------------------------------------------------*/ - -/** @addtogroup ETH_Exported_Functions - * @{ - */ - -/* Initialization and de-initialization functions ****************************/ - -/** @addtogroup ETH_Exported_Functions_Group1 - * @{ - */ -HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth); -void HAL_ETH_MspInit(ETH_HandleTypeDef *heth); -void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount); -HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount); - -/** - * @} - */ -/* IO operation functions ****************************************************/ - -/** @addtogroup ETH_Exported_Functions_Group2 - * @{ - */ -HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength); -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth); -/* Communication with PHY functions*/ -HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue); -HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue); -/* Non-Blocking mode: Interrupt */ -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth); -void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth); -/* Callback in non blocking modes (Interrupt) */ -void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth); -void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth); -void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth); -/** - * @} - */ - -/* Peripheral Control functions **********************************************/ - -/** @addtogroup ETH_Exported_Functions_Group3 - * @{ - */ - -HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf); -HAL_StatusTypeDef HAL_ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_DMAInitTypeDef *dmaconf); -/** - * @} - */ - -/* Peripheral State functions ************************************************/ - -/** @addtogroup ETH_Exported_Functions_Group4 - * @{ - */ -HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth); -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F7xx_HAL_ETH_H */ - - - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/NetworkInterface.c index 6fad9216e..b9278c042 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/NetworkInterface.c @@ -1,1287 +1,1421 @@ -/* - * Some constants, hardware definitions and comments taken from ST's HAL driver - * library, COPYRIGHT(c) 2015 STMicroelectronics. - */ - -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_DNS.h" -#include "FreeRTOS_ARP.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" -#include "phyHandling.h" - -/* ST includes. */ -#if defined( STM32F7xx ) - #include "stm32f7xx_hal.h" -#elif defined( STM32F4xx ) - #include "stm32f4xx_hal.h" -#elif defined( STM32F2xx ) - #include "stm32f2xx_hal.h" -#elif !defined( _lint ) /* Lint does not like an #error */ - #error What part? -#endif - -#include "stm32fxx_hal_eth.h" - -/* Interrupt events to process. Currently only the Rx event is processed -although code for other events is included to allow for possible future -expansion. */ -#define EMAC_IF_RX_EVENT 1UL -#define EMAC_IF_TX_EVENT 2UL -#define EMAC_IF_ERR_EVENT 4UL -#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) - -#define ETH_DMA_ALL_INTS \ - ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_ER | \ - ETH_DMA_IT_FBE | ETH_DMA_IT_RWT | ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | \ - ETH_DMA_IT_TU | ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) - -#ifndef niEMAC_HANDLER_TASK_PRIORITY - #define niEMAC_HANDLER_TASK_PRIORITY configMAX_PRIORITIES - 1 -#endif - -#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff ) /* The bits in the two byte IP header field that make up the fragment offset value. */ - -#if( ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) || ( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 ) ) - #warning Consider enabling checksum offloading -#endif - -#ifndef niDESCRIPTOR_WAIT_TIME_MS - #define niDESCRIPTOR_WAIT_TIME_MS 250uL -#endif - -/* - * Most users will want a PHY that negotiates about - * the connection properties: speed, dmix and duplex. - * On some rare cases, you want to select what is being - * advertised, properties like MDIX and duplex. - */ - -#if !defined( ipconfigETHERNET_AN_ENABLE ) - /* Enable auto-negotiation */ - #define ipconfigETHERNET_AN_ENABLE 1 -#endif - -#if !defined( ipconfigETHERNET_AUTO_CROSS_ENABLE ) - #define ipconfigETHERNET_AUTO_CROSS_ENABLE 1 -#endif - -#if( ipconfigETHERNET_AN_ENABLE == 0 ) - /* - * The following three defines are only used in case there - * is no auto-negotiation. - */ - #if !defined( ipconfigETHERNET_CROSSED_LINK ) - #define ipconfigETHERNET_CROSSED_LINK 1 - #endif - - #if !defined( ipconfigETHERNET_USE_100MB ) - #define ipconfigETHERNET_USE_100MB 1 - #endif - - #if !defined( ipconfigETHERNET_USE_FULL_DUPLEX ) - #define ipconfigETHERNET_USE_FULL_DUPLEX 1 - #endif -#endif /* ipconfigETHERNET_AN_ENABLE == 0 */ - -/* Default the size of the stack used by the EMAC deferred handler task to twice -the size of the stack used by the idle task - but allow this to be overridden in -FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ -#ifndef configEMAC_TASK_STACK_SIZE - #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) -#endif - -/* Two choices must be made: RMII versus MII, -and the index of the PHY in use ( between 0 and 31 ). */ -#ifndef ipconfigUSE_RMII - #ifdef STM32F7xx - #define ipconfigUSE_RMII 1 - #else - #define ipconfigUSE_RMII 0 - #endif /* STM32F7xx */ -#endif /* ipconfigUSE_RMII */ - -#if( ipconfigUSE_RMII != 0 ) - #warning Using RMII, make sure if this is correct -#else - #warning Using MII, make sure if this is correct -#endif - -typedef enum -{ - eMACInit, /* Must initialise MAC. */ - eMACPass, /* Initialisation was successful. */ - eMACFailed, /* Initialisation failed. */ -} eMAC_INIT_STATUS_TYPE; - -static eMAC_INIT_STATUS_TYPE xMacInitStatus = eMACInit; - -/*-----------------------------------------------------------*/ - -/* - * A deferred interrupt handler task that processes - */ -static void prvEMACHandlerTask( void *pvParameters ); - -/* - * Force a negotiation with the Switch or Router and wait for LS. - */ -static void prvEthernetUpdateConfig( BaseType_t xForce ); - -/* - * See if there is a new packet and forward it to the IP-task. - */ -static BaseType_t prvNetworkInterfaceInput( void ); - -#if( ipconfigUSE_LLMNR != 0 ) - /* - * For LLMNR, an extra MAC-address must be configured to - * be able to receive the multicast messages. - */ - static void prvMACAddressConfig(ETH_HandleTypeDef *heth, uint32_t ulIndex, uint8_t *Addr); -#endif - -/* - * Check if a given packet should be accepted. - */ -static BaseType_t xMayAcceptPacket( uint8_t *pcBuffer ); - -/* - * Initialise the TX descriptors. - */ -static void prvDMATxDescListInit( void ); - -/* - * Initialise the RX descriptors. - */ -static void prvDMARxDescListInit( void ); - -/* After packets have been sent, the network -buffers will be released. */ -static void vClearTXBuffers( void ); - -/*-----------------------------------------------------------*/ - -/* Bit map of outstanding ETH interrupt events for processing. Currently only -the Rx interrupt is handled, although code is included for other events to -enable future expansion. */ -static volatile uint32_t ulISREvents; - -#if( ipconfigUSE_LLMNR == 1 ) - static const uint8_t xLLMNR_MACAddress[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; -#endif - -static EthernetPhy_t xPhyObject; - -/* Ethernet handle. */ -static ETH_HandleTypeDef xETH; - -/* xTXDescriptorSemaphore is a counting semaphore with -a maximum count of ETH_TXBUFNB, which is the number of -DMA TX descriptors. */ -static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; - -/* - * Note: it is adviced to define both - * - * #define ipconfigZERO_COPY_RX_DRIVER 1 - * #define ipconfigZERO_COPY_TX_DRIVER 1 - * - * The method using memcpy is slower and probaly uses more RAM memory. - * The possibility is left in the code just for comparison. - * - * It is adviced to define ETH_TXBUFNB at least 4. Note that no - * TX buffers are allocated in a zero-copy driver. - */ -/* MAC buffers: ---------------------------------------------------------*/ - -/* Put the DMA descriptors in '.first_data'. -This is important for STM32F7, which has an L1 data cache. -The first 64KB of the SRAM is not cached. */ - -/* Ethernet Rx MA Descriptor */ -__attribute__ ((aligned (32))) -__attribute__ ((section(".first_data"))) - ETH_DMADescTypeDef DMARxDscrTab[ ETH_RXBUFNB ]; - -#if( ipconfigZERO_COPY_RX_DRIVER == 0 ) - /* Ethernet Receive Buffer */ - __ALIGN_BEGIN uint8_t Rx_Buff[ ETH_RXBUFNB ][ ETH_RX_BUF_SIZE ] __ALIGN_END; -#endif - -/* Ethernet Tx DMA Descriptor */ -__attribute__ ((aligned (32))) -__attribute__ ((section(".first_data"))) - ETH_DMADescTypeDef DMATxDscrTab[ ETH_TXBUFNB ]; - -#if( ipconfigZERO_COPY_TX_DRIVER == 0 ) - /* Ethernet Transmit Buffer */ - __ALIGN_BEGIN uint8_t Tx_Buff[ ETH_TXBUFNB ][ ETH_TX_BUF_SIZE ] __ALIGN_END; -#endif - -/* DMATxDescToClear points to the next TX DMA descriptor -that must be cleared by vClearTXBuffers(). */ -static __IO ETH_DMADescTypeDef *DMATxDescToClear; - -/* Holds the handle of the task used as a deferred interrupt processor. The -handle is used so direct notifications can be sent to the task for all EMAC/DMA -related interrupts. */ -static TaskHandle_t xEMACTaskHandle = NULL; - -/* For local use only: describe the PHY's properties: */ -const PhyProperties_t xPHYProperties = -{ - #if( ipconfigETHERNET_AN_ENABLE != 0 ) - .ucSpeed = PHY_SPEED_AUTO, - .ucDuplex = PHY_DUPLEX_AUTO, - #else - #if( ipconfigETHERNET_USE_100MB != 0 ) - .ucSpeed = PHY_SPEED_100, - #else - .ucSpeed = PHY_SPEED_10, - #endif - - #if( ipconfigETHERNET_USE_FULL_DUPLEX != 0 ) - .ucDuplex = PHY_DUPLEX_FULL, - #else - .ucDuplex = PHY_DUPLEX_HALF, - #endif - #endif - - #if( ipconfigETHERNET_AN_ENABLE != 0 ) && ( ipconfigETHERNET_AUTO_CROSS_ENABLE != 0 ) - .ucMDI_X = PHY_MDIX_AUTO, - #elif( ipconfigETHERNET_CROSSED_LINK != 0 ) - .ucMDI_X = PHY_MDIX_CROSSED, - #else - .ucMDI_X = PHY_MDIX_DIRECT, - #endif -}; - -/*-----------------------------------------------------------*/ - -void HAL_ETH_RxCpltCallback( ETH_HandleTypeDef *heth ) -{ -BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - ( void ) heth; - - /* Ethernet RX-Complete callback function, elsewhere declared as weak. */ - ulISREvents |= EMAC_IF_RX_EVENT; - /* Wakeup the prvEMACHandlerTask. */ - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - } -} -/*-----------------------------------------------------------*/ - -void HAL_ETH_TxCpltCallback( ETH_HandleTypeDef *heth ) -{ -BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - ( void ) heth; - - /* This call-back is only useful in case packets are being sent - zero-copy. Once they're sent, the buffers will be released - by the function vClearTXBuffers(). */ - ulISREvents |= EMAC_IF_TX_EVENT; - /* Wakeup the prvEMACHandlerTask. */ - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - } -} -/*-----------------------------------------------------------*/ - -static void vClearTXBuffers() -{ -__IO ETH_DMADescTypeDef *txLastDescriptor = xETH.TxDesc; -size_t uxCount = ( ( UBaseType_t ) ETH_TXBUFNB ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - NetworkBufferDescriptor_t *pxNetworkBuffer; - uint8_t *ucPayLoad; -#endif - - /* This function is called after a TX-completion interrupt. - It will release each Network Buffer used in xNetworkInterfaceOutput(). - 'uxCount' represents the number of descriptors given to DMA for transmission. - After sending a packet, the DMA will clear the 'ETH_DMATXDESC_OWN' bit. */ - while( ( uxCount > 0 ) && ( ( DMATxDescToClear->Status & ETH_DMATXDESC_OWN ) == 0 ) ) - { - if( ( DMATxDescToClear == txLastDescriptor ) && ( uxCount != ETH_TXBUFNB ) ) - { - break; - } - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - ucPayLoad = ( uint8_t * )DMATxDescToClear->Buffer1Addr; - - if( ucPayLoad != NULL ) - { - pxNetworkBuffer = pxPacketBuffer_to_NetworkBuffer( ucPayLoad ); - if( pxNetworkBuffer != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ) ; - } - DMATxDescToClear->Buffer1Addr = ( uint32_t )0u; - } - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - DMATxDescToClear = ( ETH_DMADescTypeDef * )( DMATxDescToClear->Buffer2NextDescAddr ); - - uxCount--; - /* Tell the counting semaphore that one more TX descriptor is available. */ - xSemaphoreGive( xTXDescriptorSemaphore ); - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -HAL_StatusTypeDef hal_eth_init_status; -BaseType_t xResult; - - if( xMacInitStatus == eMACInit ) - { - xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ETH_TXBUFNB, ( UBaseType_t ) ETH_TXBUFNB ); - if( xTXDescriptorSemaphore == NULL ) - { - xMacInitStatus = eMACFailed; - } - else - { - /* Initialise ETH */ - - xETH.Instance = ETH; - xETH.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; - xETH.Init.Speed = ETH_SPEED_100M; - xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - /* Value of PhyAddress doesn't matter, will be probed for. */ - xETH.Init.PhyAddress = 0; - - xETH.Init.MACAddr = ( uint8_t * ) FreeRTOS_GetMACAddress(); - xETH.Init.RxMode = ETH_RXINTERRUPT_MODE; - - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - { - /* using the ETH_CHECKSUM_BY_HARDWARE option: - both the IP and the protocol checksums will be calculated - by the peripheral. */ - xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; - } - #else - { - xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_SOFTWARE; - } - #endif - - #if( ipconfigUSE_RMII != 0 ) - { - xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; - } - #else - { - xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_MII; - } - #endif /* ipconfigUSE_RMII */ - - hal_eth_init_status = HAL_ETH_Init( &xETH ); - - /* Only for inspection by debugger. */ - ( void ) hal_eth_init_status; - - /* Set the TxDesc and RxDesc pointers. */ - xETH.TxDesc = DMATxDscrTab; - xETH.RxDesc = DMARxDscrTab; - - /* Make sure that all unused fields are cleared. */ - memset( &DMATxDscrTab, '\0', sizeof( DMATxDscrTab ) ); - memset( &DMARxDscrTab, '\0', sizeof( DMARxDscrTab ) ); - - /* Initialize Tx Descriptors list: Chain Mode */ - DMATxDescToClear = DMATxDscrTab; - - /* Initialise TX-descriptors. */ - prvDMATxDescListInit(); - - /* Initialise RX-descriptors. */ - prvDMARxDescListInit(); - - #if( ipconfigUSE_LLMNR != 0 ) - { - /* Program the LLMNR address at index 1. */ - prvMACAddressConfig( &xETH, ETH_MAC_ADDRESS1, ( uint8_t *) xLLMNR_MACAddress ); - } - #endif - - /* Force a negotiation with the Switch or Router and wait for LS. */ - prvEthernetUpdateConfig( pdTRUE ); - - /* The deferred interrupt handler task is created at the highest - possible priority to ensure the interrupt handler can return directly - to it. The task's handle is stored in xEMACTaskHandle so interrupts can - notify the task when there is something to process. */ - if( xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, niEMAC_HANDLER_TASK_PRIORITY, &xEMACTaskHandle ) == pdPASS ) - { - /* The xTXDescriptorSemaphore and the task are created successfully. */ - xMacInitStatus = eMACPass; - } - else - { - xMacInitStatus = eMACFailed; - } - } - } /* if( xEMACTaskHandle == NULL ) */ - - if( xMacInitStatus != eMACPass ) - { - /* EMAC initialisation failed, return pdFAIL. */ - xResult = pdFAIL; - } - else - { - if( xPhyObject.ulLinkStatusMask != 0uL ) - { - xETH.Instance->DMAIER |= ETH_DMA_ALL_INTS; - xResult = pdPASS; - FreeRTOS_printf( ( "Link Status is high\n" ) ) ; - } - else - { - /* For now pdFAIL will be returned. But prvEMACHandlerTask() is running - and it will keep on checking the PHY and set 'ulLinkStatusMask' when necessary. */ - xResult = pdFAIL; - } - } - /* When returning non-zero, the stack will become active and - start DHCP (in configured) */ - return xResult; -} -/*-----------------------------------------------------------*/ - -static void prvDMATxDescListInit() -{ -ETH_DMADescTypeDef *pxDMADescriptor; -BaseType_t xIndex; - - /* Get the pointer on the first member of the descriptor list */ - pxDMADescriptor = DMATxDscrTab; - - /* Fill each DMA descriptor with the right values */ - for( xIndex = 0; xIndex < ETH_TXBUFNB; xIndex++, pxDMADescriptor++ ) - { - /* Set Second Address Chained bit */ - pxDMADescriptor->Status = ETH_DMATXDESC_TCH; - - #if( ipconfigZERO_COPY_TX_DRIVER == 0 ) - { - /* Set Buffer1 address pointer */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )( Tx_Buff[ xIndex ] ); - } - #endif - - if( xETH.Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE ) - { - /* Set the DMA Tx descriptors checksum insertion for TCP, UDP, and ICMP */ - pxDMADescriptor->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; - } - else - { - pxDMADescriptor->Status &= ~( ( uint32_t ) ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL ); - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if( xIndex < ETH_TXBUFNB - 1 ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMADescriptor + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMATxDscrTab; - } - } - - /* Set Transmit Descriptor List Address Register */ - xETH.Instance->DMATDLAR = ( uint32_t ) DMATxDscrTab; -} -/*-----------------------------------------------------------*/ - -static void prvDMARxDescListInit() -{ -ETH_DMADescTypeDef *pxDMADescriptor; -BaseType_t xIndex; - /* - * RX-descriptors. - */ - - /* Get the pointer on the first member of the descriptor list */ - pxDMADescriptor = DMARxDscrTab; - - /* Fill each DMA descriptor with the right values */ - for( xIndex = 0; xIndex < ETH_RXBUFNB; xIndex++, pxDMADescriptor++ ) - { - - /* Set Buffer1 size and Second Address Chained bit */ - pxDMADescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | (uint32_t)ETH_RX_BUF_SIZE; - - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Set Buffer1 address pointer */ - NetworkBufferDescriptor_t *pxBuffer; - - pxBuffer = pxGetNetworkBufferWithDescriptor( ETH_RX_BUF_SIZE, 100ul ); - /* If the assert below fails, make sure that there are at least 'ETH_RXBUFNB' - Network Buffers available during start-up ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) */ - configASSERT( pxBuffer != NULL ); - if( pxBuffer != NULL ) - { - pxDMADescriptor->Buffer1Addr = (uint32_t)pxBuffer->pucEthernetBuffer; - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - } - } - #else - { - /* Set Buffer1 address pointer */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )( Rx_Buff[ xIndex ] ); - /* Set Own bit of the Rx descriptor Status */ - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - } - #endif - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if( xIndex < ETH_RXBUFNB - 1 ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t )( pxDMADescriptor + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMARxDscrTab; - } - - } - /* Set Receive Descriptor List Address Register */ - xETH.Instance->DMARDLAR = ( uint32_t ) DMARxDscrTab; -} -/*-----------------------------------------------------------*/ - -static void prvMACAddressConfig(ETH_HandleTypeDef *heth, uint32_t ulIndex, uint8_t *Addr) -{ -uint32_t ulTempReg; - - ( void ) heth; - - /* Calculate the selected MAC address high register. */ - ulTempReg = 0x80000000ul | ( ( uint32_t ) Addr[ 5 ] << 8 ) | ( uint32_t ) Addr[ 4 ]; - - /* Load the selected MAC address high register. */ - ( *(__IO uint32_t *)( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + ulIndex ) ) ) = ulTempReg; - - /* Calculate the selected MAC address low register. */ - ulTempReg = ( ( uint32_t ) Addr[ 3 ] << 24 ) | ( ( uint32_t ) Addr[ 2 ] << 16 ) | ( ( uint32_t ) Addr[ 1 ] << 8 ) | Addr[ 0 ]; - - /* Load the selected MAC address low register */ - ( *(__IO uint32_t *) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + ulIndex ) ) ) = ulTempReg; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t bReleaseAfterSend ) -{ -BaseType_t xReturn = pdFAIL; -uint32_t ulTransmitSize = 0; -__IO ETH_DMADescTypeDef *pxDmaTxDesc; -/* Do not wait too long for a free TX DMA buffer. */ -const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50u ); - - /* Open a do {} while ( 0 ) loop to be able to call break. */ - do - { - if( xCheckLoopback( pxDescriptor, bReleaseAfterSend ) != 0 ) - { - /* The packet has been sent back to the IP-task. - The IP-task will further handle it. - Do not release the descriptor. */ - bReleaseAfterSend = pdFALSE; - break; - } - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - { - ProtocolPacket_t *pxPacket; - - /* If the peripheral must calculate the checksum, it wants - the protocol checksum to have a value of zero. */ - pxPacket = ( ProtocolPacket_t * ) ( pxDescriptor->pucEthernetBuffer ); - - if( pxPacket->xICMPPacket.xIPHeader.ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) - { - pxPacket->xICMPPacket.xICMPHeader.usChecksum = ( uint16_t )0u; - } - } - #endif /* ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM */ - if( xPhyObject.ulLinkStatusMask != 0 ) - { - if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) - { - /* Time-out waiting for a free TX descriptor. */ - break; - } - - /* This function does the actual transmission of the packet. The packet is - contained in 'pxDescriptor' that is passed to the function. */ - pxDmaTxDesc = xETH.TxDesc; - - /* Is this buffer available? */ - configASSERT ( ( pxDmaTxDesc->Status & ETH_DMATXDESC_OWN ) == 0 ); - - { - /* Is this buffer available? */ - /* Get bytes in current buffer. */ - ulTransmitSize = pxDescriptor->xDataLength; - - if( ulTransmitSize > ETH_TX_BUF_SIZE ) - { - ulTransmitSize = ETH_TX_BUF_SIZE; - } - - #if( ipconfigZERO_COPY_TX_DRIVER == 0 ) - { - /* Copy the bytes. */ - memcpy( ( void * ) pxDmaTxDesc->Buffer1Addr, pxDescriptor->pucEthernetBuffer, ulTransmitSize ); - } - #else - { - configASSERT( bReleaseAfterSend != 0 ); - - /* Move the buffer. */ - pxDmaTxDesc->Buffer1Addr = ( uint32_t )pxDescriptor->pucEthernetBuffer; - /* The Network Buffer has been passed to DMA, no need to release it. */ - bReleaseAfterSend = pdFALSE_UNSIGNED; - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - /* Ask to set the IPv4 checksum. - Also need an Interrupt on Completion so that 'vClearTXBuffers()' will be called.. */ - #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - { - pxDmaTxDesc->Status |= ETH_DMATXDESC_CIC_TCPUDPICMP_FULL | ETH_DMATXDESC_IC; - } - #else - { - pxDmaTxDesc->Status &= ~( ( uint32_t ) ETH_DMATXDESC_CIC ); - pxDmaTxDesc->Status |= ETH_DMATXDESC_IC; - } - #endif - - - /* Prepare transmit descriptors to give to DMA. */ - - /* Set LAST and FIRST segment */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; - /* Set frame size */ - pxDmaTxDesc->ControlBufferSize = ( ulTransmitSize & ETH_DMATXDESC_TBS1 ); - - #if( NETWORK_BUFFERS_CACHED != 0 ) - { - BaseType_t xlength = CACHE_LINE_SIZE * ( ( ulTransmitSize + NETWORK_BUFFER_HEADER_SIZE + CACHE_LINE_SIZE - 1 ) / CACHE_LINE_SIZE ); - uint32_t *pulBuffer = ( uint32_t )( pxDescriptor->pucEthernetBuffer - NETWORK_BUFFER_HEADER_SIZE ); - cache_clean_invalidate_by_addr( pulBuffer, xlength ); - } - #endif - - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_OWN; - - /* Point to next descriptor */ - xETH.TxDesc = ( ETH_DMADescTypeDef * ) ( xETH.TxDesc->Buffer2NextDescAddr ); - /* Ensure completion of memory access */ - __DSB(); - /* Resume DMA transmission*/ - xETH.Instance->DMATPDR = 0; - iptraceNETWORK_INTERFACE_TRANSMIT(); - xReturn = pdPASS; - } - } - else - { - /* The PHY has no Link Status, packet shall be dropped. */ - } - } while( 0 ); - /* The buffer has been sent so can be released. */ - if( bReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static BaseType_t xMayAcceptPacket( uint8_t *pcBuffer ) -{ -const ProtocolPacket_t *pxProtPacket = ( const ProtocolPacket_t * )pcBuffer; - - switch( pxProtPacket->xTCPPacket.xEthernetHeader.usFrameType ) - { - case ipARP_FRAME_TYPE: - /* Check it later. */ - return pdTRUE; - case ipIPv4_FRAME_TYPE: - /* Check it here. */ - break; - default: - /* Refuse the packet. */ - return pdFALSE; - } - - #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - { - const IPHeader_t *pxIPHeader = &(pxProtPacket->xTCPPacket.xIPHeader); - uint32_t ulDestinationIPAddress; - - /* Ensure that the incoming packet is not fragmented (only outgoing packets - * can be fragmented) as these are the only handled IP frames currently. */ - if( ( pxIPHeader->usFragmentOffset & FreeRTOS_ntohs( ipFRAGMENT_OFFSET_BIT_MASK ) ) != 0U ) - { - return pdFALSE; - } - /* HT: Might want to make the following configurable because - * most IP messages have a standard length of 20 bytes */ - - /* 0x45 means: IPv4 with an IP header of 5 x 4 = 20 bytes - * 0x47 means: IPv4 with an IP header of 7 x 4 = 28 bytes */ - if( pxIPHeader->ucVersionHeaderLength < 0x45 || pxIPHeader->ucVersionHeaderLength > 0x4F ) - { - return pdFALSE; - } - - ulDestinationIPAddress = pxIPHeader->ulDestinationIPAddress; - /* Is the packet for this node? */ - if( ( ulDestinationIPAddress != *ipLOCAL_IP_ADDRESS_POINTER ) && - /* Is it a broadcast address x.x.x.255 ? */ - ( ( FreeRTOS_ntohl( ulDestinationIPAddress ) & 0xff ) != 0xff ) && - #if( ipconfigUSE_LLMNR == 1 ) - ( ulDestinationIPAddress != ipLLMNR_IP_ADDR ) && - #endif - ( *ipLOCAL_IP_ADDRESS_POINTER != 0 ) ) { - FreeRTOS_printf( ( "Drop IP %lxip\n", FreeRTOS_ntohl( ulDestinationIPAddress ) ) ); - return pdFALSE; - } - - if( pxIPHeader->ucProtocol == ipPROTOCOL_UDP ) - { - uint16_t usSourcePort = FreeRTOS_ntohs( pxProtPacket->xUDPPacket.xUDPHeader.usSourcePort ); - uint16_t usDestinationPort = FreeRTOS_ntohs( pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort ); - - if( ( xPortHasUDPSocket( pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort ) == pdFALSE ) - #if ipconfigUSE_LLMNR == 1 - && ( usDestinationPort != ipLLMNR_PORT ) - && ( usSourcePort != ipLLMNR_PORT ) - #endif - #if ipconfigUSE_NBNS == 1 - && ( usDestinationPort != ipNBNS_PORT ) - && ( usSourcePort != ipNBNS_PORT ) - #endif - #if ipconfigUSE_DNS == 1 - && ( usSourcePort != ipDNS_PORT ) - #endif - ) { - /* Drop this packet, not for this device. */ - /* FreeRTOS_printf( ( "Drop: UDP port %d -> %d\n", usSourcePort, usDestinationPort ) ); */ - return pdFALSE; - } - } - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -static void prvPassEthMessages( NetworkBufferDescriptor_t *pxDescriptor ) -{ -IPStackEvent_t xRxEvent; - - xRxEvent.eEventType = eNetworkRxEvent; - xRxEvent.pvData = ( void * ) pxDescriptor; - - if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 1000 ) != pdPASS ) - { - /* The buffer could not be sent to the stack so must be released again. - This is a deferred handler taskr, not a real interrupt, so it is ok to - use the task level function here. */ - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - do - { - NetworkBufferDescriptor_t *pxNext = pxDescriptor->pxNextBuffer; - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - pxDescriptor = pxNext; - } while( pxDescriptor != NULL ); - } - #else - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ - iptraceETHERNET_RX_EVENT_LOST(); - FreeRTOS_printf( ( "prvPassEthMessages: Can not queue return packet!\n" ) ); - } - else - { - iptraceNETWORK_INTERFACE_RECEIVE(); - } -} - -static BaseType_t prvNetworkInterfaceInput( void ) -{ -NetworkBufferDescriptor_t *pxCurDescriptor; -NetworkBufferDescriptor_t *pxNewDescriptor = NULL; -#if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - NetworkBufferDescriptor_t *pxFirstDescriptor = NULL; - NetworkBufferDescriptor_t *pxLastDescriptor = NULL; -#endif -BaseType_t xReceivedLength = 0; -__IO ETH_DMADescTypeDef *pxDMARxDescriptor; -const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( niDESCRIPTOR_WAIT_TIME_MS ); -uint8_t *pucBuffer; - - pxDMARxDescriptor = xETH.RxDesc; - - while( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_OWN ) == 0u ) - { - BaseType_t xAccepted = pdTRUE; - /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ - xReceivedLength = ( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4; - - pucBuffer = (uint8_t *) pxDMARxDescriptor->Buffer1Addr; - - /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ - /* Chained Mode */ - /* Selects the next DMA Rx descriptor list for next buffer to read */ - xETH.RxDesc = ( ETH_DMADescTypeDef* )pxDMARxDescriptor->Buffer2NextDescAddr; - - /* In order to make the code easier and faster, only packets in a single buffer - will be accepted. This can be done by making the buffers large enough to - hold a complete Ethernet packet (1536 bytes). - Therefore, two sanity checks: */ - configASSERT( xReceivedLength <= ETH_RX_BUF_SIZE ); - - if( ( pxDMARxDescriptor->Status & ( ETH_DMARXDESC_CE | ETH_DMARXDESC_IPV4HCE | ETH_DMARXDESC_FT ) ) != ETH_DMARXDESC_FT ) - { - /* Not an Ethernet frame-type or a checmsum error. */ - xAccepted = pdFALSE; - } - else - { - /* See if this packet must be handled. */ - xAccepted = xMayAcceptPacket( pucBuffer ); - } - - if( xAccepted != pdFALSE ) - { - /* The packet wil be accepted, but check first if a new Network Buffer can - be obtained. If not, the packet will still be dropped. */ - pxNewDescriptor = pxGetNetworkBufferWithDescriptor( ETH_RX_BUF_SIZE, xDescriptorWaitTime ); - - if( pxNewDescriptor == NULL ) - { - /* A new descriptor can not be allocated now. This packet will be dropped. */ - xAccepted = pdFALSE; - } - } - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Find out which Network Buffer was originally passed to the descriptor. */ - pxCurDescriptor = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); - configASSERT( pxCurDescriptor != NULL ); - } - #else - { - /* In this mode, the two descriptors are the same. */ - pxCurDescriptor = pxNewDescriptor; - if( pxNewDescriptor != NULL ) - { - /* The packet is acepted and a new Network Buffer was created, - copy data to the Network Bufffer. */ - memcpy( pxNewDescriptor->pucEthernetBuffer, pucBuffer, xReceivedLength ); - } - } - #endif - - if( xAccepted != pdFALSE ) - { - pxCurDescriptor->xDataLength = xReceivedLength; - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - pxCurDescriptor->pxNextBuffer = NULL; - - if( pxFirstDescriptor == NULL ) - { - // Becomes the first message - pxFirstDescriptor = pxCurDescriptor; - } - else if( pxLastDescriptor != NULL ) - { - // Add to the tail - pxLastDescriptor->pxNextBuffer = pxCurDescriptor; - } - - pxLastDescriptor = pxCurDescriptor; - } - #else - { - prvPassEthMessages( pxCurDescriptor ); - } - #endif - } - - /* Release descriptors to DMA */ - #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Set Buffer1 address pointer */ - if( pxNewDescriptor != NULL ) - { - pxDMARxDescriptor->Buffer1Addr = (uint32_t)pxNewDescriptor->pucEthernetBuffer; - } - else - { - /* The packet was dropped and the same Network - Buffer will be used to receive a new packet. */ - } - } - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - - /* Set Buffer1 size and Second Address Chained bit */ - pxDMARxDescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | (uint32_t)ETH_RX_BUF_SIZE; - pxDMARxDescriptor->Status = ETH_DMARXDESC_OWN; - - /* Ensure completion of memory access */ - __DSB(); - /* When Rx Buffer unavailable flag is set clear it and resume - reception. */ - if( ( xETH.Instance->DMASR & ETH_DMASR_RBUS ) != 0 ) - { - /* Clear RBUS ETHERNET DMA flag. */ - xETH.Instance->DMASR = ETH_DMASR_RBUS; - - /* Resume DMA reception. */ - xETH.Instance->DMARPDR = 0; - } - pxDMARxDescriptor = xETH.RxDesc; - } - - #if( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - if( pxFirstDescriptor != NULL ) - { - prvPassEthMessages( pxFirstDescriptor ); - } - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ - - return ( xReceivedLength > 0 ); -} -/*-----------------------------------------------------------*/ - - -BaseType_t xSTM32_PhyRead( BaseType_t xAddress, BaseType_t xRegister, uint32_t *pulValue ) -{ -uint16_t usPrevAddress = xETH.Init.PhyAddress; -BaseType_t xResult; -HAL_StatusTypeDef xHALResult; - - xETH.Init.PhyAddress = xAddress; - xHALResult = HAL_ETH_ReadPHYRegister( &xETH, ( uint16_t )xRegister, pulValue ); - xETH.Init.PhyAddress = usPrevAddress; - - if( xHALResult == HAL_OK ) - { - xResult = 0; - } - else - { - xResult = -1; - } - return xResult; -} -/*-----------------------------------------------------------*/ - -BaseType_t xSTM32_PhyWrite( BaseType_t xAddress, BaseType_t xRegister, uint32_t ulValue ) -{ -uint16_t usPrevAddress = xETH.Init.PhyAddress; -BaseType_t xResult; -HAL_StatusTypeDef xHALResult; - - xETH.Init.PhyAddress = xAddress; - xHALResult = HAL_ETH_WritePHYRegister( &xETH, ( uint16_t )xRegister, ulValue ); - xETH.Init.PhyAddress = usPrevAddress; - - if( xHALResult == HAL_OK ) - { - xResult = 0; - } - else - { - xResult = -1; - } - return xResult; -} -/*-----------------------------------------------------------*/ - -void vMACBProbePhy( void ) -{ - vPhyInitialise( &xPhyObject, xSTM32_PhyRead, xSTM32_PhyWrite ); - xPhyDiscover( &xPhyObject ); - xPhyConfigure( &xPhyObject, &xPHYProperties ); -} -/*-----------------------------------------------------------*/ - -static void prvEthernetUpdateConfig( BaseType_t xForce ) -{ - FreeRTOS_printf( ( "prvEthernetUpdateConfig: LS mask %02lX Force %d\n", - xPhyObject.ulLinkStatusMask, - ( int )xForce ) ); - - if( ( xForce != pdFALSE ) || ( xPhyObject.ulLinkStatusMask != 0 ) ) - { - /* Restart the auto-negotiation. */ - if( xETH.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE ) - { - xPhyStartAutoNegotiation( &xPhyObject, xPhyGetMask( &xPhyObject ) ); - - /* Configure the MAC with the Duplex Mode fixed by the - auto-negotiation process. */ - if( xPhyObject.xPhyProperties.ucDuplex == PHY_DUPLEX_FULL ) - { - xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - } - else - { - xETH.Init.DuplexMode = ETH_MODE_HALFDUPLEX; - } - - /* Configure the MAC with the speed fixed by the - auto-negotiation process. */ - if( xPhyObject.xPhyProperties.ucSpeed == PHY_SPEED_10 ) - { - xETH.Init.Speed = ETH_SPEED_10M; - } - else - { - xETH.Init.Speed = ETH_SPEED_100M; - } - } - else /* AutoNegotiation Disable */ - { - /* Check parameters */ - assert_param( IS_ETH_SPEED( xETH.Init.Speed ) ); - assert_param( IS_ETH_DUPLEX_MODE( xETH.Init.DuplexMode ) ); - - if( xETH.Init.DuplexMode == ETH_MODE_FULLDUPLEX ) - { - xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_HALF; - } - else - { - xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_FULL; - } - - if( xETH.Init.Speed == ETH_SPEED_10M ) - { - xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_10; - } - else - { - xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_100; - } - - xPhyObject.xPhyPreferences.ucMDI_X = PHY_MDIX_AUTO; - - /* Use predefined (fixed) configuration. */ - xPhyFixedValue( &xPhyObject, xPhyGetMask( &xPhyObject ) ); - } - - /* ETHERNET MAC Re-Configuration */ - HAL_ETH_ConfigMAC( &xETH, (ETH_MACInitTypeDef *) NULL); - - /* Restart MAC interface */ - HAL_ETH_Start( &xETH); - } - else - { - /* Stop MAC interface */ - HAL_ETH_Stop( &xETH ); - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xGetPhyLinkStatus( void ) -{ -BaseType_t xReturn; - - if( xPhyObject.ulLinkStatusMask != 0 ) - { - xReturn = pdPASS; - } - else - { - xReturn = pdFAIL; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -/* Uncomment this in case BufferAllocation_1.c is used. */ - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ -static __attribute__ ((section(".first_data"))) uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * ETH_MAX_PACKET_SIZE ] __attribute__ ( ( aligned( 32 ) ) ); -uint8_t *ucRAMBuffer = ucNetworkPackets; -uint32_t ul; - - for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) - { - pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; - *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); - ucRAMBuffer += ETH_MAX_PACKET_SIZE; - } -} -/*-----------------------------------------------------------*/ - -static void prvEMACHandlerTask( void *pvParameters ) -{ -UBaseType_t uxLastMinBufferCount = 0; -#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) -UBaseType_t uxLastMinQueueSpace = 0; -#endif -UBaseType_t uxCurrentCount; -BaseType_t xResult; -const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - for( ;; ) - { - xResult = 0; - uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); - if( uxLastMinBufferCount != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); - } - - if( xTXDescriptorSemaphore != NULL ) - { - static UBaseType_t uxLowestSemCount = ( UBaseType_t ) ETH_TXBUFNB - 1; - - uxCurrentCount = uxSemaphoreGetCount( xTXDescriptorSemaphore ); - if( uxLowestSemCount > uxCurrentCount ) - { - uxLowestSemCount = uxCurrentCount; - FreeRTOS_printf( ( "TX DMA buffers: lowest %lu\n", uxLowestSemCount ) ); - } - - } - - #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - uxCurrentCount = uxGetMinimumIPQueueSpace(); - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - - if( ( ulISREvents & EMAC_IF_ALL_EVENT ) == 0 ) - { - /* No events to process now, wait for the next. */ - ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); - } - - if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) - { - ulISREvents &= ~EMAC_IF_RX_EVENT; - - xResult = prvNetworkInterfaceInput(); - } - - if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) - { - /* Code to release TX buffers if zero-copy is used. */ - ulISREvents &= ~EMAC_IF_TX_EVENT; - /* Check if DMA packets have been delivered. */ - vClearTXBuffers(); - } - - if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) - { - /* Future extension: logging about errors that occurred. */ - ulISREvents &= ~EMAC_IF_ERR_EVENT; - } - if( xPhyCheckLinkStatus( &xPhyObject, xResult ) != 0 ) - { - /* Something has changed to a Link Status, need re-check. */ - prvEthernetUpdateConfig( pdFALSE ); - } - } -} -/*-----------------------------------------------------------*/ - -void ETH_IRQHandler( void ) -{ - HAL_ETH_IRQHandler( &xETH ); -} - +/* + * Some constants, hardware definitions and comments taken from ST's HAL driver + * library, COPYRIGHT(c) 2015 STMicroelectronics. + */ + +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* Standard includes. */ +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_DNS.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +/* ST includes. */ +#include "stm32f4xx_hal.h" + +#ifndef BMSR_LINK_STATUS + #define BMSR_LINK_STATUS 0x0004UL +#endif + +#ifndef PHY_LS_HIGH_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not + receiving packets. */ + #define PHY_LS_HIGH_CHECK_TIME_MS 15000 +#endif + +#ifndef PHY_LS_LOW_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still low every second. */ + #define PHY_LS_LOW_CHECK_TIME_MS 1000 +#endif + +/* Interrupt events to process. Currently only the Rx event is processed +although code for other events is included to allow for possible future +expansion. */ +#define EMAC_IF_RX_EVENT 1UL +#define EMAC_IF_TX_EVENT 2UL +#define EMAC_IF_ERR_EVENT 4UL +#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) + +#define ETH_DMA_ALL_INTS \ + ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_ER | \ + ETH_DMA_IT_FBE | ETH_DMA_IT_RWT | ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | \ + ETH_DMA_IT_TU | ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) + +/* Naming and numbering of PHY registers. */ +#define PHY_REG_00_BMCR 0x00 /* Basic Mode Control Register */ +#define PHY_REG_01_BMSR 0x01 /* Basic Mode Status Register */ +#define PHY_REG_02_PHYSID1 0x02 /* PHYS ID 1 */ +#define PHY_REG_03_PHYSID2 0x03 /* PHYS ID 2 */ +#define PHY_REG_04_ADVERTISE 0x04 /* Advertisement control reg */ + +#define PHY_ID_LAN8720 0x0007c0f0 +#define PHY_ID_DP83848I 0x20005C90 + +#ifndef USE_STM324xG_EVAL + #define USE_STM324xG_EVAL 1 +#endif + +#if( USE_STM324xG_EVAL == 0 ) + #define EXPECTED_PHY_ID PHY_ID_LAN8720 + #define PHY_REG_1F_PHYSPCS 0x1F /* 31 RW PHY Special Control Status */ + /* Use 3 bits in register 31 */ + #define PHYSPCS_SPEED_MASK 0x0C + #define PHYSPCS_SPEED_10 0x04 + #define PHYSPCS_SPEED_100 0x08 + #define PHYSPCS_FULL_DUPLEX 0x10 +#else + #define EXPECTED_PHY_ID PHY_ID_DP83848I + + #define PHY_REG_10_PHY_SR 0x10 /* PHY status register Offset */ + #define PHY_REG_19_PHYCR 0x19 /* 25 RW PHY Control Register */ +#endif + +/* Some defines used internally here to indicate preferences about speed, MDIX +(wired direct or crossed), and duplex (half or full). */ +#define PHY_SPEED_10 1 +#define PHY_SPEED_100 2 +#define PHY_SPEED_AUTO (PHY_SPEED_10|PHY_SPEED_100) + +#define PHY_MDIX_DIRECT 1 +#define PHY_MDIX_CROSSED 2 +#define PHY_MDIX_AUTO (PHY_MDIX_CROSSED|PHY_MDIX_DIRECT) + +#define PHY_DUPLEX_HALF 1 +#define PHY_DUPLEX_FULL 2 +#define PHY_DUPLEX_AUTO (PHY_DUPLEX_FULL|PHY_DUPLEX_HALF) + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ + +/* + * Description of all capabilities that can be advertised to + * the peer (usually a switch or router). + */ +#define ADVERTISE_CSMA 0x0001 /* Only selector supported. */ +#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex. */ +#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex. */ +#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex. */ +#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex. */ + +#define ADVERTISE_ALL ( ADVERTISE_10HALF | ADVERTISE_10FULL | \ + ADVERTISE_100HALF | ADVERTISE_100FULL) + +/* + * Value for the 'PHY_REG_00_BMCR', the PHY's Basic Mode Control Register + */ +#define BMCR_FULLDPLX 0x0100 /* Full duplex. */ +#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart. */ +#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation. */ +#define BMCR_SPEED100 0x2000 /* Select 100Mbps. */ +#define BMCR_RESET 0x8000 /* Reset the PHY. */ + +#define PHYCR_MDIX_EN 0x8000 /* Enable Auto MDIX. */ +#define PHYCR_MDIX_FORCE 0x4000 /* Force MDIX crossed. */ + +#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff ) /* The bits in the two byte IP header field that make up the fragment offset value. */ + +/* + * Most users will want a PHY that negotiates about + * the connection properties: speed, dmix and duplex. + * On some rare cases, you want to select what is being + * advertised, properties like MDIX and duplex. + */ + +#if !defined( ipconfigETHERNET_AN_ENABLE ) + /* Enable auto-negotiation */ + #define ipconfigETHERNET_AN_ENABLE 1 +#endif + +#if !defined( ipconfigETHERNET_AUTO_CROSS_ENABLE ) + #define ipconfigETHERNET_AUTO_CROSS_ENABLE 1 +#endif + +#if( ipconfigETHERNET_AN_ENABLE == 0 ) + /* + * The following three defines are only used in case there + * is no auto-negotiation. + */ + #if !defined( ipconfigETHERNET_CROSSED_LINK ) + #define ipconfigETHERNET_CROSSED_LINK 1 + #endif + + #if !defined( ipconfigETHERNET_USE_100MB ) + #define ipconfigETHERNET_USE_100MB 1 + #endif + + #if !defined( ipconfigETHERNET_USE_FULL_DUPLEX ) + #define ipconfigETHERNET_USE_FULL_DUPLEX 1 + #endif +#endif /* ipconfigETHERNET_AN_ENABLE == 0 */ + +/* Default the size of the stack used by the EMAC deferred handler task to twice +the size of the stack used by the idle task - but allow this to be overridden in +FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ +#ifndef configEMAC_TASK_STACK_SIZE + #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) +#endif + +/*-----------------------------------------------------------*/ + +/* + * A deferred interrupt handler task that processes + */ +static void prvEMACHandlerTask( void *pvParameters ); + +/* + * Force a negotiation with the Switch or Router and wait for LS. + */ +static void prvEthernetUpdateConfig( BaseType_t xForce ); + +/* + * See if there is a new packet and forward it to the IP-task. + */ +static BaseType_t prvNetworkInterfaceInput( void ); + +#if( ipconfigUSE_LLMNR != 0 ) + /* + * For LLMNR, an extra MAC-address must be configured to + * be able to receive the multicast messages. + */ + static void prvMACAddressConfig(ETH_HandleTypeDef *heth, uint32_t ulIndex, uint8_t *Addr); +#endif + +/* + * Check if a given packet should be accepted. + */ +static BaseType_t xMayAcceptPacket( uint8_t *pcBuffer ); + +/* + * Initialise the TX descriptors. + */ +static void prvDMATxDescListInit( void ); + +/* + * Initialise the RX descriptors. + */ +static void prvDMARxDescListInit( void ); + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + /* After packets have been sent, the network + buffers will be released. */ + static void vClearTXBuffers( void ); +#endif /* ipconfigZERO_COPY_TX_DRIVER */ + +/*-----------------------------------------------------------*/ + +typedef struct _PhyProperties_t +{ + uint8_t speed; + uint8_t mdix; + uint8_t duplex; + uint8_t spare; +} PhyProperties_t; + +/* Bit map of outstanding ETH interrupt events for processing. Currently only +the Rx interrupt is handled, although code is included for other events to +enable future expansion. */ +static volatile uint32_t ulISREvents; + +/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ +static uint32_t ulPHYLinkStatus = 0; + +#if( ipconfigUSE_LLMNR == 1 ) + static const uint8_t xLLMNR_MACAddress[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; +#endif + +/* Ethernet handle. */ +static ETH_HandleTypeDef xETH; + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + /* xTXDescriptorSemaphore is a counting semaphore with + a maximum count of ETH_TXBUFNB, which is the number of + DMA TX descriptors. */ + static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; +#endif /* ipconfigZERO_COPY_TX_DRIVER */ + +/* + * Note: it is adviced to define both + * + * #define ipconfigZERO_COPY_RX_DRIVER 1 + * #define ipconfigZERO_COPY_TX_DRIVER 1 + * + * The method using memcpy is slower and probaly uses more RAM memory. + * The possibility is left in the code just for comparison. + * + * It is adviced to define ETH_TXBUFNB at least 4. Note that no + * TX buffers are allocated in a zero-copy driver. + */ +/* MAC buffers: ---------------------------------------------------------*/ +__ALIGN_BEGIN ETH_DMADescTypeDef DMARxDscrTab[ ETH_RXBUFNB ] __ALIGN_END;/* Ethernet Rx MA Descriptor */ +#if( ipconfigZERO_COPY_RX_DRIVER == 0 ) + __ALIGN_BEGIN uint8_t Rx_Buff[ ETH_RXBUFNB ][ ETH_RX_BUF_SIZE ] __ALIGN_END; /* Ethernet Receive Buffer */ +#endif + +__ALIGN_BEGIN ETH_DMADescTypeDef DMATxDscrTab[ ETH_TXBUFNB ] __ALIGN_END;/* Ethernet Tx DMA Descriptor */ +#if( ipconfigZERO_COPY_TX_DRIVER == 0 ) + __ALIGN_BEGIN uint8_t Tx_Buff[ ETH_TXBUFNB ][ ETH_TX_BUF_SIZE ] __ALIGN_END; /* Ethernet Transmit Buffer */ +#endif + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + /* DMATxDescToClear points to the next TX DMA descriptor + that must be cleared by vClearTXBuffers(). */ + static __IO ETH_DMADescTypeDef *DMATxDescToClear; +#endif + +/* Value to be written into the 'Basic mode Control Register'. */ +static uint32_t ulBCRvalue; + +/* Value to be written into the 'Advertisement Control Register'. */ +static uint32_t ulACRValue; + +/* ucMACAddress as it appears in main.c */ +extern const uint8_t ucMACAddress[ 6 ]; + +/* Holds the handle of the task used as a deferred interrupt processor. The +handle is used so direct notifications can be sent to the task for all EMAC/DMA +related interrupts. */ +static TaskHandle_t xEMACTaskHandle = NULL; + +/* For local use only: describe the PHY's properties: */ +const PhyProperties_t xPHYProperties = +{ + #if( ipconfigETHERNET_AN_ENABLE != 0 ) + .speed = PHY_SPEED_AUTO, + .duplex = PHY_DUPLEX_AUTO, + #else + #if( ipconfigETHERNET_USE_100MB != 0 ) + .speed = PHY_SPEED_100, + #else + .speed = PHY_SPEED_10, + #endif + + #if( ipconfigETHERNET_USE_FULL_DUPLEX != 0 ) + .duplex = PHY_DUPLEX_FULL, + #else + .duplex = PHY_DUPLEX_HALF, + #endif + #endif + + #if( ipconfigETHERNET_AN_ENABLE != 0 ) && ( ipconfigETHERNET_AUTO_CROSS_ENABLE != 0 ) + .mdix = PHY_MDIX_AUTO, + #elif( ipconfigETHERNET_CROSSED_LINK != 0 ) + .mdix = PHY_MDIX_CROSSED, + #else + .mdix = PHY_MDIX_DIRECT, + #endif +}; + +/*-----------------------------------------------------------*/ + +void HAL_ETH_RxCpltCallback( ETH_HandleTypeDef *heth ) +{ +BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + /* Ethernet RX-Complete callback function, elsewhere declared as weak. */ + ulISREvents |= EMAC_IF_RX_EVENT; + /* Wakeup the prvEMACHandlerTask. */ + if( xEMACTaskHandle != NULL ) + { + vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); + } +} +/*-----------------------------------------------------------*/ + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + void HAL_ETH_TxCpltCallback( ETH_HandleTypeDef *heth ) + { + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + /* This call-back is only useful in case packets are being sent + zero-copy. Once they're sent, the buffers will be released + by the function vClearTXBuffers(). */ + ulISREvents |= EMAC_IF_TX_EVENT; + /* Wakeup the prvEMACHandlerTask. */ + if( xEMACTaskHandle != NULL ) + { + vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); + } + + } +#endif /* ipconfigZERO_COPY_TX_DRIVER */ + +/*-----------------------------------------------------------*/ + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + static void vClearTXBuffers() + { + __IO ETH_DMADescTypeDef *txLastDescriptor = xETH.TxDesc; + NetworkBufferDescriptor_t *pxNetworkBuffer; + uint8_t *ucPayLoad; + size_t uxCount = ( ( UBaseType_t ) ETH_TXBUFNB ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); + + /* This function is called after a TX-completion interrupt. + It will release each Network Buffer used in xNetworkInterfaceOutput(). + 'uxCount' represents the number of descriptors given to DMA for transmission. + After sending a packet, the DMA will clear the 'ETH_DMATXDESC_OWN' bit. */ + while( ( uxCount > 0 ) && ( ( DMATxDescToClear->Status & ETH_DMATXDESC_OWN ) == 0 ) ) + { + if( ( DMATxDescToClear == txLastDescriptor ) && ( uxCount != ETH_TXBUFNB ) ) + { + break; + } + + ucPayLoad = ( uint8_t * )DMATxDescToClear->Buffer1Addr; + + if( ucPayLoad != NULL ) + { + pxNetworkBuffer = pxPacketBuffer_to_NetworkBuffer( ucPayLoad ); + if( pxNetworkBuffer != NULL ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ) ; + } + DMATxDescToClear->Buffer1Addr = ( uint32_t )0u; + } + + DMATxDescToClear = ( ETH_DMADescTypeDef * )( DMATxDescToClear->Buffer2NextDescAddr ); + + uxCount--; + /* Tell the counting semaphore that one more TX descriptor is available. */ + xSemaphoreGive( xTXDescriptorSemaphore ); + } + } +#endif /* ipconfigZERO_COPY_TX_DRIVER */ +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +HAL_StatusTypeDef hal_eth_init_status; +BaseType_t xResult; + + if( xEMACTaskHandle == NULL ) + { + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + if( xTXDescriptorSemaphore == NULL ) + { + xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ETH_TXBUFNB, ( UBaseType_t ) ETH_TXBUFNB ); + configASSERT( xTXDescriptorSemaphore ); + } + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + /* Initialise ETH */ + + xETH.Instance = ETH; + xETH.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; + xETH.Init.Speed = ETH_SPEED_100M; + xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; + xETH.Init.PhyAddress = 1; + + xETH.Init.MACAddr = ( uint8_t *) ucMACAddress; + xETH.Init.RxMode = ETH_RXINTERRUPT_MODE; + + /* using the ETH_CHECKSUM_BY_HARDWARE option: + both the IP and the protocol checksums will be calculated + by the peripheral. */ + xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; + + xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_MII; + hal_eth_init_status = HAL_ETH_Init( &xETH ); + + /* Only for inspection by debugger. */ + ( void ) hal_eth_init_status; + + /* Set the TxDesc and RxDesc pointers. */ + xETH.TxDesc = DMATxDscrTab; + xETH.RxDesc = DMARxDscrTab; + + /* Make sure that all unused fields are cleared. */ + memset( &DMATxDscrTab, '\0', sizeof( DMATxDscrTab ) ); + memset( &DMARxDscrTab, '\0', sizeof( DMARxDscrTab ) ); + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* Initialize Tx Descriptors list: Chain Mode */ + DMATxDescToClear = DMATxDscrTab; + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + /* Initialise TX-descriptors. */ + prvDMATxDescListInit(); + + /* Initialise RX-descriptors. */ + prvDMARxDescListInit(); + + #if( ipconfigUSE_LLMNR != 0 ) + { + /* Program the LLMNR address at index 1. */ + prvMACAddressConfig( &xETH, ETH_MAC_ADDRESS1, ( uint8_t *) xLLMNR_MACAddress ); + } + #endif + + /* Force a negotiation with the Switch or Router and wait for LS. */ + prvEthernetUpdateConfig( pdTRUE ); + + /* The deferred interrupt handler task is created at the highest + possible priority to ensure the interrupt handler can return directly + to it. The task's handle is stored in xEMACTaskHandle so interrupts can + notify the task when there is something to process. */ + xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); + } /* if( xEMACTaskHandle == NULL ) */ + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xETH.Instance->DMAIER |= ETH_DMA_ALL_INTS; + xResult = pdPASS; + FreeRTOS_printf( ( "Link Status is high\n" ) ) ; + } + else + { + /* For now pdFAIL will be returned. But prvEMACHandlerTask() is running + and it will keep on checking the PHY and set ulPHYLinkStatus when necessary. */ + xResult = pdFAIL; + FreeRTOS_printf( ( "Link Status still low\n" ) ) ; + } + /* When returning non-zero, the stack will become active and + start DHCP (in configured) */ + return xResult; +} +/*-----------------------------------------------------------*/ + +static void prvDMATxDescListInit() +{ +ETH_DMADescTypeDef *pxDMADescriptor; +BaseType_t xIndex; + + /* Get the pointer on the first member of the descriptor list */ + pxDMADescriptor = DMATxDscrTab; + + /* Fill each DMA descriptor with the right values */ + for( xIndex = 0; xIndex < ETH_TXBUFNB; xIndex++, pxDMADescriptor++ ) + { + /* Set Second Address Chained bit */ + pxDMADescriptor->Status = ETH_DMATXDESC_TCH; + + #if( ipconfigZERO_COPY_TX_DRIVER == 0 ) + { + /* Set Buffer1 address pointer */ + pxDMADescriptor->Buffer1Addr = ( uint32_t )( Tx_Buff[ xIndex ] ); + } + #endif + + if( xETH.Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE ) + { + /* Set the DMA Tx descriptors checksum insertion for TCP, UDP, and ICMP */ + pxDMADescriptor->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; + } + + /* Initialize the next descriptor with the Next Descriptor Polling Enable */ + if( xIndex < ETH_TXBUFNB - 1 ) + { + /* Set next descriptor address register with next descriptor base address */ + pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMADescriptor + 1 ); + } + else + { + /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ + pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMATxDscrTab; + } + } + + /* Set Transmit Descriptor List Address Register */ + xETH.Instance->DMATDLAR = ( uint32_t ) DMATxDscrTab; +} +/*-----------------------------------------------------------*/ + +static void prvDMARxDescListInit() +{ +ETH_DMADescTypeDef *pxDMADescriptor; +BaseType_t xIndex; + /* + * RX-descriptors. + */ + + /* Get the pointer on the first member of the descriptor list */ + pxDMADescriptor = DMARxDscrTab; + + /* Fill each DMA descriptor with the right values */ + for( xIndex = 0; xIndex < ETH_RXBUFNB; xIndex++, pxDMADescriptor++ ) + { + + /* Set Buffer1 size and Second Address Chained bit */ + pxDMADescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | (uint32_t)ETH_RX_BUF_SIZE; + + #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + { + /* Set Buffer1 address pointer */ + NetworkBufferDescriptor_t *pxBuffer; + + pxBuffer = pxGetNetworkBufferWithDescriptor( ETH_RX_BUF_SIZE, 100ul ); + /* If the assert below fails, make sure that there are at least 'ETH_RXBUFNB' + Network Buffers available during start-up ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) */ + configASSERT( pxBuffer != NULL ); + if( pxBuffer != NULL ) + { + pxDMADescriptor->Buffer1Addr = (uint32_t)pxBuffer->pucEthernetBuffer; + pxDMADescriptor->Status = ETH_DMARXDESC_OWN; + } + } + #else + { + /* Set Buffer1 address pointer */ + pxDMADescriptor->Buffer1Addr = ( uint32_t )( Rx_Buff[ xIndex ] ); + /* Set Own bit of the Rx descriptor Status */ + pxDMADescriptor->Status = ETH_DMARXDESC_OWN; + } + #endif + + /* Initialize the next descriptor with the Next Descriptor Polling Enable */ + if( xIndex < ETH_RXBUFNB - 1 ) + { + /* Set next descriptor address register with next descriptor base address */ + pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t )( pxDMADescriptor + 1 ); + } + else + { + /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ + pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMARxDscrTab; + } + + } + /* Set Receive Descriptor List Address Register */ + xETH.Instance->DMARDLAR = ( uint32_t ) DMARxDscrTab; +} +/*-----------------------------------------------------------*/ + +static void prvMACAddressConfig(ETH_HandleTypeDef *heth, uint32_t ulIndex, uint8_t *Addr) +{ +uint32_t ulTempReg; + + /* Calculate the selected MAC address high register. */ + ulTempReg = 0x80000000ul | ( ( uint32_t ) Addr[ 5 ] << 8 ) | ( uint32_t ) Addr[ 4 ]; + + /* Load the selected MAC address high register. */ + ( *(__IO uint32_t *)( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + ulIndex ) ) ) = ulTempReg; + + /* Calculate the selected MAC address low register. */ + ulTempReg = ( ( uint32_t ) Addr[ 3 ] << 24 ) | ( ( uint32_t ) Addr[ 2 ] << 16 ) | ( ( uint32_t ) Addr[ 1 ] << 8 ) | Addr[ 0 ]; + + /* Load the selected MAC address low register */ + ( *(__IO uint32_t *) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + ulIndex ) ) ) = ulTempReg; +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, BaseType_t bReleaseAfterSend ) +{ +BaseType_t xReturn = pdFAIL; +uint32_t ulTransmitSize = 0; +__IO ETH_DMADescTypeDef *pxDmaTxDesc; +/* Do not wait too long for a free TX DMA buffer. */ +const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50u ); + + #if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) + { + ProtocolPacket_t *pxPacket; + + /* If the peripheral must calculate the checksum, it wants + the protocol checksum to have a value of zero. */ + pxPacket = ( ProtocolPacket_t * ) ( pxDescriptor->pucEthernetBuffer ); + + if( pxPacket->xICMPPacket.xIPHeader.ucProtocol == ipPROTOCOL_ICMP ) + { + pxPacket->xICMPPacket.xICMPHeader.usChecksum = ( uint16_t )0u; + } + } + #endif + + /* Open a do {} while ( 0 ) loop to be able to call break. */ + do + { + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + if( xTXDescriptorSemaphore == NULL ) + { + break; + } + if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) + { + /* Time-out waiting for a free TX descriptor. */ + break; + } + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + /* This function does the actual transmission of the packet. The packet is + contained in 'pxDescriptor' that is passed to the function. */ + pxDmaTxDesc = xETH.TxDesc; + + /* Is this buffer available? */ + if( ( pxDmaTxDesc->Status & ETH_DMATXDESC_OWN ) == 0 ) + { + /* Is this buffer available? */ + /* Get bytes in current buffer. */ + ulTransmitSize = pxDescriptor->xDataLength; + + if( ulTransmitSize > ETH_TX_BUF_SIZE ) + { + ulTransmitSize = ETH_TX_BUF_SIZE; + } + + #if( ipconfigZERO_COPY_TX_DRIVER == 0 ) + { + /* Copy the bytes. */ + memcpy( ( void * ) pxDmaTxDesc->Buffer1Addr, pxDescriptor->pucEthernetBuffer, ulTransmitSize ); + pxDmaTxDesc->Status |= ETH_DMATXDESC_CIC_TCPUDPICMP_FULL; + } + #else + { + /* Move the buffer. */ + pxDmaTxDesc->Buffer1Addr = ( uint32_t )pxDescriptor->pucEthernetBuffer; + /* Ask to set the IPv4 checksum. + Also need an Interrupt on Completion so that 'vClearTXBuffers()' will be called.. */ + pxDmaTxDesc->Status |= ETH_DMATXDESC_CIC_TCPUDPICMP_FULL | ETH_DMATXDESC_IC; + /* The Network Buffer has been passed to DMA, no need to release it. */ + bReleaseAfterSend = pdFALSE_UNSIGNED; + } + #endif /* ipconfigZERO_COPY_TX_DRIVER */ + + /* Prepare transmit descriptors to give to DMA. */ + + /* Set LAST and FIRST segment */ + pxDmaTxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; + /* Set frame size */ + pxDmaTxDesc->ControlBufferSize = ( ulTransmitSize & ETH_DMATXDESC_TBS1 ); + /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ + pxDmaTxDesc->Status |= ETH_DMATXDESC_OWN; + + /* Point to next descriptor */ + xETH.TxDesc = ( ETH_DMADescTypeDef * ) ( xETH.TxDesc->Buffer2NextDescAddr ); + + /* Resume DMA transmission*/ + xETH.Instance->DMATPDR = 0; + iptraceNETWORK_INTERFACE_TRANSMIT(); + xReturn = pdPASS; + } + } + else + { + /* The PHY has no Link Status, packet shall be dropped. */ + } + } while( 0 ); + /* The buffer has been sent so can be released. */ + if( bReleaseAfterSend != pdFALSE ) + { + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static BaseType_t xMayAcceptPacket( uint8_t *pcBuffer ) +{ +const ProtocolPacket_t *pxProtPacket = ( const ProtocolPacket_t * )pcBuffer; + + switch( pxProtPacket->xTCPPacket.xEthernetHeader.usFrameType ) + { + case ipARP_FRAME_TYPE: + /* Check it later. */ + return pdTRUE; + case ipIPv4_FRAME_TYPE: + /* Check it here. */ + break; + default: + /* Refuse the packet. */ + return pdFALSE; + } + + #if( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) + { + const IPHeader_t *pxIPHeader = &(pxProtPacket->xTCPPacket.xIPHeader); + uint32_t ulDestinationIPAddress; + + /* Ensure that the incoming packet is not fragmented (only outgoing packets + * can be fragmented) as these are the only handled IP frames currently. */ + if( ( pxIPHeader->usFragmentOffset & FreeRTOS_ntohs( ipFRAGMENT_OFFSET_BIT_MASK ) ) != 0U ) + { + return pdFALSE; + } + /* HT: Might want to make the following configurable because + * most IP messages have a standard length of 20 bytes */ + + /* 0x45 means: IPv4 with an IP header of 5 x 4 = 20 bytes + * 0x47 means: IPv4 with an IP header of 7 x 4 = 28 bytes */ + if( pxIPHeader->ucVersionHeaderLength < 0x45 || pxIPHeader->ucVersionHeaderLength > 0x4F ) + { + return pdFALSE; + } + + ulDestinationIPAddress = pxIPHeader->ulDestinationIPAddress; + /* Is the packet for this node? */ + if( ( ulDestinationIPAddress != *ipLOCAL_IP_ADDRESS_POINTER ) && + /* Is it a broadcast address x.x.x.255 ? */ + ( ( FreeRTOS_ntohl( ulDestinationIPAddress ) & 0xff ) != 0xff ) && + #if( ipconfigUSE_LLMNR == 1 ) + ( ulDestinationIPAddress != ipLLMNR_IP_ADDR ) && + #endif + ( *ipLOCAL_IP_ADDRESS_POINTER != 0 ) ) { + FreeRTOS_printf( ( "Drop IP %lxip\n", FreeRTOS_ntohl( ulDestinationIPAddress ) ) ); + return pdFALSE; + } + + if( pxIPHeader->ucProtocol == ipPROTOCOL_UDP ) + { + uint16_t port = pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort; + + if( ( xPortHasUDPSocket( port ) == pdFALSE ) + #if ipconfigUSE_LLMNR == 1 + && ( port != FreeRTOS_ntohs( ipLLMNR_PORT ) ) + #endif + #if ipconfigUSE_NBNS == 1 + && ( port != FreeRTOS_ntohs( ipNBNS_PORT ) ) + #endif + #if ipconfigUSE_DNS == 1 + && ( pxProtPacket->xUDPPacket.xUDPHeader.usSourcePort != FreeRTOS_ntohs( ipDNS_PORT ) ) + #endif + ) { + /* Drop this packet, not for this device. */ + return pdFALSE; + } + } + } + #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ + return pdTRUE; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvNetworkInterfaceInput( void ) +{ +NetworkBufferDescriptor_t *pxCurDescriptor; +NetworkBufferDescriptor_t *pxNewDescriptor = NULL; +BaseType_t xReceivedLength, xAccepted; +__IO ETH_DMADescTypeDef *pxDMARxDescriptor; +xIPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; +const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); +uint8_t *pucBuffer; + + pxDMARxDescriptor = xETH.RxDesc; + + if( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_OWN) == 0 ) + { + /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ + xReceivedLength = ( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4; + + pucBuffer = (uint8_t *) pxDMARxDescriptor->Buffer1Addr; + + /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ + /* Chained Mode */ + /* Selects the next DMA Rx descriptor list for next buffer to read */ + xETH.RxDesc = ( ETH_DMADescTypeDef* )pxDMARxDescriptor->Buffer2NextDescAddr; + } + else + { + xReceivedLength = 0; + } + + /* Obtain the size of the packet and put it into the "usReceivedLength" variable. */ + /* In order to make the code easier and faster, only packets in a single buffer + will be accepted. This can be done by making the buffers large enough to + hold a complete Ethernet packet (1536 bytes). */ + if( xReceivedLength > 0ul && xReceivedLength < ETH_RX_BUF_SIZE ) + { + if( ( pxDMARxDescriptor->Status & ( ETH_DMARXDESC_CE | ETH_DMARXDESC_IPV4HCE | ETH_DMARXDESC_FT ) ) != ETH_DMARXDESC_FT ) + { + /* Not an Ethernet frame-type or a checmsum error. */ + xAccepted = pdFALSE; + } + else + { + /* See if this packet must be handled. */ + xAccepted = xMayAcceptPacket( pucBuffer ); + } + + if( xAccepted != pdFALSE ) + { + /* The packet wil be accepted, but check first if a new Network Buffer can + be obtained. If not, the packet will still be dropped. */ + pxNewDescriptor = pxGetNetworkBufferWithDescriptor( ETH_RX_BUF_SIZE, xDescriptorWaitTime ); + + if( pxNewDescriptor == NULL ) + { + /* A new descriptor can not be allocated now. This packet will be dropped. */ + xAccepted = pdFALSE; + } + } + #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + { + /* Find out which Network Buffer was originally passed to the descriptor. */ + pxCurDescriptor = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); + configASSERT( pxCurDescriptor != NULL ); + } + #else + { + /* In this mode, the two descriptors are the same. */ + pxCurDescriptor = pxNewDescriptor; + if( pxNewDescriptor != NULL ) + { + /* The packet is acepted and a new Network Buffer was created, + copy data to the Network Bufffer. */ + memcpy( pxNewDescriptor->pucEthernetBuffer, pucBuffer, xReceivedLength ); + } + } + #endif + + if( xAccepted != pdFALSE ) + { + pxCurDescriptor->xDataLength = xReceivedLength; + xRxEvent.pvData = ( void * ) pxCurDescriptor; + + /* Pass the data to the TCP/IP task for processing. */ + if( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime ) == pdFALSE ) + { + /* Could not send the descriptor into the TCP/IP stack, it + must be released. */ + vReleaseNetworkBufferAndDescriptor( pxCurDescriptor ); + iptraceETHERNET_RX_EVENT_LOST(); + } + else + { + iptraceNETWORK_INTERFACE_RECEIVE(); + } + } + + /* Release descriptors to DMA */ + #if( ipconfigZERO_COPY_RX_DRIVER != 0 ) + { + /* Set Buffer1 address pointer */ + if( pxNewDescriptor != NULL ) + { + pxDMARxDescriptor->Buffer1Addr = (uint32_t)pxNewDescriptor->pucEthernetBuffer; + } + else + { + /* The packet was dropped and the same Network + Buffer will be used to receive a new packet. */ + } + } + #endif /* ipconfigZERO_COPY_RX_DRIVER */ + + /* Set Buffer1 size and Second Address Chained bit */ + pxDMARxDescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | (uint32_t)ETH_RX_BUF_SIZE; + pxDMARxDescriptor->Status = ETH_DMARXDESC_OWN; + + /* When Rx Buffer unavailable flag is set clear it and resume + reception. */ + if( ( xETH.Instance->DMASR & ETH_DMASR_RBUS ) != 0 ) + { + /* Clear RBUS ETHERNET DMA flag. */ + xETH.Instance->DMASR = ETH_DMASR_RBUS; + + /* Resume DMA reception. */ + xETH.Instance->DMARPDR = 0; + } + } + + return ( xReceivedLength > 0 ); +} +/*-----------------------------------------------------------*/ + +void vMACBProbePhy( void ) +{ +uint32_t ulConfig, ulAdvertise, ulLower, ulUpper, ulMACPhyID, ulValue; +TimeOut_t xPhyTime; +TickType_t xRemTime = 0; +#if( EXPECTED_PHY_ID == PHY_ID_DP83848I ) + uint32_t ulPhyControl; +#endif + + HAL_ETH_ReadPHYRegister(&xETH, PHY_REG_03_PHYSID2, &ulLower); + HAL_ETH_ReadPHYRegister(&xETH, PHY_REG_02_PHYSID1, &ulUpper); + + ulMACPhyID = ( ( ulUpper << 16 ) & 0xFFFF0000 ) | ( ulLower & 0xFFF0 ); + + /* The expected ID for the 'LAN8720' is 0x0007c0f0. */ + /* The expected ID for the 'DP83848I' is 0x20005C90. */ + + FreeRTOS_printf( ( "PHY ID %lX (%s)\n", ulMACPhyID, + ( ulMACPhyID == EXPECTED_PHY_ID ) ? "OK" : "Unknown" ) ); + + /* Remove compiler warning if FreeRTOS_printf() is not defined. */ + ( void ) ulMACPhyID; + + /* Set advertise register. */ + if( ( xPHYProperties.speed == PHY_SPEED_AUTO ) && ( xPHYProperties.duplex == PHY_DUPLEX_AUTO ) ) + { + ulAdvertise = ADVERTISE_CSMA | ADVERTISE_ALL; + /* Reset auto-negotiation capability. */ + } + else + { + ulAdvertise = ADVERTISE_CSMA; + + if( xPHYProperties.speed == PHY_SPEED_AUTO ) + { + if( xPHYProperties.duplex == PHY_DUPLEX_FULL ) + { + ulAdvertise |= ADVERTISE_10FULL | ADVERTISE_100FULL; + } + else + { + ulAdvertise |= ADVERTISE_10HALF | ADVERTISE_100HALF; + } + } + else if( xPHYProperties.duplex == PHY_DUPLEX_AUTO ) + { + if( xPHYProperties.speed == PHY_SPEED_10 ) + { + ulAdvertise |= ADVERTISE_10FULL | ADVERTISE_10HALF; + } + else + { + ulAdvertise |= ADVERTISE_100FULL | ADVERTISE_100HALF; + } + } + else if( xPHYProperties.speed == PHY_SPEED_100 ) + { + if( xPHYProperties.duplex == PHY_DUPLEX_FULL ) + { + ulAdvertise |= ADVERTISE_100FULL; + } + else + { + ulAdvertise |= ADVERTISE_100HALF; + } + } + else + { + if( xPHYProperties.duplex == PHY_DUPLEX_FULL ) + { + ulAdvertise |= ADVERTISE_10FULL; + } + else + { + ulAdvertise |= ADVERTISE_10HALF; + } + } + } + + /* Read Control register. */ + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_00_BMCR, &ulConfig ); + + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_00_BMCR, ulConfig | BMCR_RESET ); + xRemTime = ( TickType_t ) pdMS_TO_TICKS( 1000UL ); + vTaskSetTimeOutState( &xPhyTime ); + + for( ; ; ) + { + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_00_BMCR, &ulValue ); + if( ( ulValue & BMCR_RESET ) == 0 ) + { + FreeRTOS_printf( ( "BMCR_RESET ready\n" ) ); + break; + } + if( xTaskCheckForTimeOut( &xPhyTime, &xRemTime ) != pdFALSE ) + { + FreeRTOS_printf( ( "BMCR_RESET timed out\n" ) ); + break; + } + } + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_00_BMCR, ulConfig & ~BMCR_RESET ); + + vTaskDelay( pdMS_TO_TICKS( 50ul ) ); + + /* Write advertise register. */ + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_04_ADVERTISE, ulAdvertise ); + + /* + AN_EN AN1 AN0 Forced Mode + 0 0 0 10BASE-T, Half-Duplex + 0 0 1 10BASE-T, Full-Duplex + 0 1 0 100BASE-TX, Half-Duplex + 0 1 1 100BASE-TX, Full-Duplex + AN_EN AN1 AN0 Advertised Mode + 1 0 0 10BASE-T, Half/Full-Duplex + 1 0 1 100BASE-TX, Half/Full-Duplex + 1 1 0 10BASE-T Half-Duplex + 100BASE-TX, Half-Duplex + 1 1 1 10BASE-T, Half/Full-Duplex + 100BASE-TX, Half/Full-Duplex + */ + + /* Read Control register. */ + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_00_BMCR, &ulConfig ); + + ulConfig &= ~( BMCR_ANRESTART | BMCR_ANENABLE | BMCR_SPEED100 | BMCR_FULLDPLX ); + + /* HT 12/9/14: always set AN-restart and AN-enable, even though the choices + are limited. */ + ulConfig |= (BMCR_ANRESTART | BMCR_ANENABLE); + + if( xPHYProperties.speed == PHY_SPEED_100 ) + { + ulConfig |= BMCR_SPEED100; + } + else if( xPHYProperties.speed == PHY_SPEED_10 ) + { + ulConfig &= ~BMCR_SPEED100; + } + + if( xPHYProperties.duplex == PHY_DUPLEX_FULL ) + { + ulConfig |= BMCR_FULLDPLX; + } + else if( xPHYProperties.duplex == PHY_DUPLEX_HALF ) + { + ulConfig &= ~BMCR_FULLDPLX; + } + + #if( EXPECTED_PHY_ID == PHY_ID_LAN8720 ) + { + } + #elif( EXPECTED_PHY_ID == PHY_ID_DP83848I ) + { + /* Read PHY Control register. */ + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_19_PHYCR, &ulPhyControl ); + + /* Clear bits which might get set: */ + ulPhyControl &= ~( PHYCR_MDIX_EN|PHYCR_MDIX_FORCE ); + + if( xPHYProperties.mdix == PHY_MDIX_AUTO ) + { + ulPhyControl |= PHYCR_MDIX_EN; + } + else if( xPHYProperties.mdix == PHY_MDIX_CROSSED ) + { + /* Force direct link = Use crossed RJ45 cable. */ + ulPhyControl &= ~PHYCR_MDIX_FORCE; + } + else + { + /* Force crossed link = Use direct RJ45 cable. */ + ulPhyControl |= PHYCR_MDIX_FORCE; + } + /* update PHY Control Register. */ + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_19_PHYCR, ulPhyControl ); + } + #endif + FreeRTOS_printf( ( "+TCP: advertise: %lX config %lX\n", ulAdvertise, ulConfig ) ); + + /* Now the two values to global values for later use. */ + ulBCRvalue = ulConfig; + ulACRValue = ulAdvertise; +} +/*-----------------------------------------------------------*/ + +static void prvEthernetUpdateConfig( BaseType_t xForce ) +{ +__IO uint32_t ulTimeout = 0; +uint32_t ulRegValue = 0; + + FreeRTOS_printf( ( "prvEthernetUpdateConfig: LS %d Force %d\n", + ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 , + xForce ) ); + + if( ( xForce != pdFALSE ) || ( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ) + { + /* Restart the auto-negotiation. */ + if( xETH.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE ) + { + /* Enable Auto-Negotiation. */ + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_00_BMCR, ulBCRvalue | BMCR_ANRESTART ); + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_04_ADVERTISE, ulACRValue); + + /* Wait until the auto-negotiation will be completed */ + do + { + ulTimeout++; + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_01_BMSR, &ulRegValue ); + } while( ( ( ulRegValue & PHY_AUTONEGO_COMPLETE) == 0 ) && ( ulTimeout < PHY_READ_TO ) ); + + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_00_BMCR, ulBCRvalue & ~BMCR_ANRESTART ); + + if( ulTimeout < PHY_READ_TO ) + { + /* Reset Timeout counter. */ + ulTimeout = 0; + + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_01_BMSR, &ulRegValue); + if( ( ulRegValue & BMSR_LINK_STATUS ) != 0 ) + { + ulPHYLinkStatus |= BMSR_LINK_STATUS; + } + else + { + ulPHYLinkStatus &= ~( BMSR_LINK_STATUS ); + } + + #if( EXPECTED_PHY_ID == PHY_ID_LAN8720 ) + { + /* 31 RW PHY Special Control Status */ + uint32_t ulControlStatus; + + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_1F_PHYSPCS, &ulControlStatus); + ulRegValue = 0; + if( ( ulControlStatus & PHYSPCS_FULL_DUPLEX ) != 0 ) + { + ulRegValue |= PHY_DUPLEX_STATUS; + } + if( ( ulControlStatus & PHYSPCS_SPEED_MASK ) == PHYSPCS_SPEED_10 ) + { + ulRegValue |= PHY_SPEED_STATUS; + } + + } + #elif( EXPECTED_PHY_ID == PHY_ID_DP83848I ) + { + /* Read the result of the auto-negotiation. */ + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_10_PHY_SR, &ulRegValue); + } + #endif + FreeRTOS_printf( ( ">> Autonego ready: %08lx: %s duplex %u mbit %s status\n", + ulRegValue, + (ulRegValue & PHY_DUPLEX_STATUS) ? "full" : "half", + (ulRegValue & PHY_SPEED_STATUS) ? 10 : 100, + ((ulPHYLinkStatus |= BMSR_LINK_STATUS) != 0) ? "high" : "low" ) ); + + /* Configure the MAC with the Duplex Mode fixed by the + auto-negotiation process. */ + if( ( ulRegValue & PHY_DUPLEX_STATUS ) != ( uint32_t ) RESET ) + { + /* Set Ethernet duplex mode to Full-duplex following the + auto-negotiation. */ + xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; + } + else + { + /* Set Ethernet duplex mode to Half-duplex following the + auto-negotiation. */ + xETH.Init.DuplexMode = ETH_MODE_HALFDUPLEX; + } + + /* Configure the MAC with the speed fixed by the + auto-negotiation process. */ + if( ( ulRegValue & PHY_SPEED_STATUS) != 0 ) + { + /* Set Ethernet speed to 10M following the + auto-negotiation. */ + xETH.Init.Speed = ETH_SPEED_10M; + } + else + { + /* Set Ethernet speed to 100M following the + auto-negotiation. */ + xETH.Init.Speed = ETH_SPEED_100M; + } + } /* if( ulTimeout < PHY_READ_TO ) */ + } + else /* AutoNegotiation Disable */ + { + uint16_t usValue; + + /* Check parameters */ + assert_param( IS_ETH_SPEED( xETH.Init.Speed ) ); + assert_param( IS_ETH_DUPLEX_MODE( xETH.Init.DuplexMode ) ); + + /* Set MAC Speed and Duplex Mode to PHY */ + usValue = ( uint16_t ) ( xETH.Init.DuplexMode >> 3 ) | ( uint16_t ) ( xETH.Init.Speed >> 1 ); + HAL_ETH_WritePHYRegister( &xETH, PHY_REG_00_BMCR, usValue ); + } + + /* ETHERNET MAC Re-Configuration */ + HAL_ETH_ConfigMAC( &xETH, (ETH_MACInitTypeDef *) NULL); + + /* Restart MAC interface */ + HAL_ETH_Start( &xETH); + } + else + { + /* Stop MAC interface */ + HAL_ETH_Stop( &xETH ); + } +} +/*-----------------------------------------------------------*/ + +BaseType_t xGetPhyLinkStatus( void ) +{ +BaseType_t xReturn; + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xReturn = pdPASS; + } + else + { + xReturn = pdFAIL; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static void prvEMACHandlerTask( void *pvParameters ) +{ +TimeOut_t xPhyTime; +TickType_t xPhyRemTime; +UBaseType_t uxLastMinBufferCount = 0; +#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) +UBaseType_t uxLastMinQueueSpace = 0; +#endif +UBaseType_t uxCurrentCount; +BaseType_t xResult = 0; +uint32_t xStatus; +const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); + + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParameters; + + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + + for( ;; ) + { + uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); + if( uxLastMinBufferCount != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinBufferCount = uxCurrentCount; + FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", + uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); + } + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + if( xTXDescriptorSemaphore != NULL ) + { + static UBaseType_t uxLowestSemCount = ( UBaseType_t ) ETH_TXBUFNB - 1; + + uxCurrentCount = uxSemaphoreGetCount( xTXDescriptorSemaphore ); + if( uxLowestSemCount > uxCurrentCount ) + { + uxLowestSemCount = uxCurrentCount; + FreeRTOS_printf( ( "TX DMA buffers: lowest %lu\n", uxLowestSemCount ) ); + } + + } + #endif + #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + { + uxCurrentCount = uxGetMinimumIPQueueSpace(); + if( uxLastMinQueueSpace != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinQueueSpace = uxCurrentCount; + FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); + } + } + #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ + + if( ( ulISREvents & EMAC_IF_ALL_EVENT ) == 0 ) + { + /* No events to process now, wait for the next. */ + ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); + } + + if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) + { + ulISREvents &= ~EMAC_IF_RX_EVENT; + + xResult = prvNetworkInterfaceInput(); + if( xResult > 0 ) + { + while( prvNetworkInterfaceInput() > 0 ) + { + } + } + } + + if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) + { + /* Code to release TX buffers if zero-copy is used. */ + ulISREvents &= ~EMAC_IF_TX_EVENT; + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* Check if DMA packets have been delivered. */ + vClearTXBuffers(); + } + #endif + } + + if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) + { + /* Future extension: logging about errors that occurred. */ + ulISREvents &= ~EMAC_IF_ERR_EVENT; + } + + if( xResult > 0 ) + { + /* A packet was received. No need to check for the PHY status now, + but set a timer to check it later on. */ + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + xResult = 0; + } + else if( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) + { + HAL_ETH_ReadPHYRegister( &xETH, PHY_REG_01_BMSR, &xStatus ); + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != ( xStatus & BMSR_LINK_STATUS ) ) + { + ulPHYLinkStatus = xStatus; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ); + prvEthernetUpdateConfig( pdFALSE ); + } + + vTaskSetTimeOutState( &xPhyTime ); + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + } + else + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + } + } + } +} +/*-----------------------------------------------------------*/ + +void ETH_IRQHandler( void ) +{ + HAL_ETH_IRQHandler( &xETH ); +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/readme.txt b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/readme.txt deleted file mode 100644 index 51170c041..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/readme.txt +++ /dev/null @@ -1,60 +0,0 @@ -This is a FreeeRTOS+TCP driver that works for both STM32F4xx and STM32F7xx parts. - -The code of stm32fxx_hal_eth.c is based on both drivers as provided by ST. - -These modules should be included: - - NetworkInterface.c - stm32fxx_hal_eth.c - -It is assumed that one of these words are defined: - - STM32F7xx - STM32F407xx - STM32F417xx - STM32F427xx - STM32F437xx - STM32F429xx - STM32F439xx - -The driver has been tested on both Eval and Discovery boards with both STM32F4 and STM32F7. - -Recommened settings for STM32Fxx Network Interface: - -// Defined in FreeRTOSIPConfig.h - -#define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1 -#define ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM 1 -#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1 -#define ipconfigZERO_COPY_RX_DRIVER 1 -#define ipconfigZERO_COPY_TX_DRIVER 1 -#define ipconfigUSE_LINKED_RX_MESSAGES 1 - -// Defined in stm32f4xx_hal_conf.h -#define ETH_RXBUFNB 3 or 4 -#define ETH_TXBUFNB 2 or 3 -#define ETH_RX_BUF_SIZE ( ipconfigNETWORK_MTU + 36 ) -#define ETH_TX_BUF_SIZE ( ipconfigNETWORK_MTU + 36 ) - -The best size for 'ETH_RXBUFNB' and 'ETH_TXBUFNB' depends on the speed of the CPU. These macro's define the number of DMA buffers for reception and for transmission. -In general, if the CPU is very fast, you will need less buffers. You can obtain an estimate empirically. - -The optimal value of 'ETH_RX_BUF_SIZE' and 'ETH_TX_BUF_SIZE' depends on the actual value of 'ipconfigNETWORK_MTU'. -When MTU is 1500, MTU+36 becomes a well-aligned buffer of 1536 bytes ( 0x600 ). -When MTU is 1200, MTU+48 will make 1248 ( 0x4E0 ), which is also well aligned. - -Having well aligned buffers is important for CPU with memory cache. Often the caching system divides memory in blocks of 32 bytes. When two buffers share the same cache buffer, you are bound to see data errors. - -Without memory caching, let the size be at least a multiple of 8 ( for DMA ), and make it at least "ipconfigNETWORK_MTU + 14". - -The driver contains these files: - - stm32fxx_hal_eth.c - stm32f2xx_hal_eth.h - stm32f4xx_hal_eth.h - stm32f7xx_hal_eth.h - stm32fxx_hal_eth.h - -These files are copied from ST's HAL library. These work both for STM32F4 and STM32F7. -Please remove or rename these files from the HAL distribution that you are using. - diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f2xx_hal_eth.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f2xx_hal_eth.h deleted file mode 100644 index 93b9caff0..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f2xx_hal_eth.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * The Ethernet header files for STM32F2, STM32F4 and STM32F7 have been merged to - * a single module that works for both parts: "stm32fxx_hal_eth" - */ - -#include "stm32fxx_hal_eth.h" diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.c deleted file mode 100644 index 4388d1277..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.c +++ /dev/null @@ -1,1833 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f4xx_hal_eth.c - * @author MCD Application Team - * @version V1.3.2 - * @date 26-June-2015 - * @brief ETH HAL module driver. - * This file provides firmware functions to manage the following - * functionalities of the Ethernet (ETH) peripheral: - * + Initialization and de-initialization functions - * + IO operation functions - * + Peripheral Control functions - * + Peripheral State and Errors functions - * - @verbatim - ============================================================================== - ##### How to use this driver ##### - ============================================================================== - [..] - (#)Declare a ETH_HandleTypeDef handle structure, for example: - ETH_HandleTypeDef heth; - - (#)Fill parameters of Init structure in heth handle - - (#)Call HAL_ETH_Init() API to initialize the Ethernet peripheral (MAC, DMA, ...) - - (#)Initialize the ETH low level resources through the HAL_ETH_MspInit() API: - (##) Enable the Ethernet interface clock using - (+++) __HAL_RCC_ETHMAC_CLK_ENABLE(); - (+++) __HAL_RCC_ETHMACTX_CLK_ENABLE(); - (+++) __HAL_RCC_ETHMACRX_CLK_ENABLE(); - - (##) Initialize the related GPIO clocks - (##) Configure Ethernet pin-out - (##) Configure Ethernet NVIC interrupt (IT mode) - - (#)Initialize Ethernet DMA Descriptors in chain mode and point to allocated buffers: - (##) HAL_ETH_DMATxDescListInit(); for Transmission process - (##) HAL_ETH_DMARxDescListInit(); for Reception process - - (#)Enable MAC and DMA transmission and reception: - (##) HAL_ETH_Start(); - - (#)Prepare ETH DMA TX Descriptors and give the hand to ETH DMA to transfer - the frame to MAC TX FIFO: - (##) HAL_ETH_TransmitFrame(); - - (#)Poll for a received frame in ETH RX DMA Descriptors and get received - frame parameters - (##) HAL_ETH_GetReceivedFrame(); (should be called into an infinite loop) - - (#) Get a received frame when an ETH RX interrupt occurs: - (##) HAL_ETH_GetReceivedFrame_IT(); (called in IT mode only) - - (#) Communicate with external PHY device: - (##) Read a specific register from the PHY - HAL_ETH_ReadPHYRegister(); - (##) Write data to a specific RHY register: - HAL_ETH_WritePHYRegister(); - - (#) Configure the Ethernet MAC after ETH peripheral initialization - HAL_ETH_ConfigMAC(); all MAC parameters should be filled. - - (#) Configure the Ethernet DMA after ETH peripheral initialization - HAL_ETH_ConfigDMA(); all DMA parameters should be filled. - - -@- The PTP protocol and the DMA descriptors ring mode are not supported - in this driver - - @endverbatim - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2015 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f4xx_hal.h" - -int lUDPLoggingPrintf( const char *pcFormatString, ... ); - -/** @addtogroup STM32F4xx_HAL_Driver - * @{ - */ - -/** @defgroup ETH ETH - * @brief ETH HAL module driver - * @{ - */ - -#if !defined( ARRAY_SIZE ) - #define ARRAY_SIZE( x ) ( sizeof ( x ) / sizeof ( x )[ 0 ] ) -#endif - -#ifdef HAL_ETH_MODULE_ENABLED - -#if defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/** @defgroup ETH_Private_Constants ETH Private Constants - * @{ - */ -#define LINKED_STATE_TIMEOUT_VALUE ((uint32_t)2000) /* 2000 ms */ -#define AUTONEGO_COMPLETED_TIMEOUT_VALUE ((uint32_t)1000) /* 1000 ms */ - -/** - * @} - */ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -/* Private function prototypes -----------------------------------------------*/ -/** @defgroup ETH_Private_Functions ETH Private Functions - * @{ - */ -static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err); -static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr); -static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth); -static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth); -static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth); -static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth); -static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth); -static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth); -static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth); -static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth); -static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth); - -/** - * @} - */ -/* Private functions ---------------------------------------------------------*/ - -/** @defgroup ETH_Exported_Functions ETH Exported Functions - * @{ - */ - -/** @defgroup ETH_Exported_Functions_Group1 Initialization and de-initialization functions - * @brief Initialization and Configuration functions - * - @verbatim - =============================================================================== - ##### Initialization and de-initialization functions ##### - =============================================================================== - [..] This section provides functions allowing to: - (+) Initialize and configure the Ethernet peripheral - (+) De-initialize the Ethernet peripheral - - @endverbatim - * @{ - */ -extern void vMACBProbePhy ( void ); - -/** - * @brief Initializes the Ethernet MAC and DMA according to default - * parameters. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = 0; - uint32_t hclk = 60000000; - uint32_t err = ETH_SUCCESS; - - /* Check the ETH peripheral state */ - if( heth == NULL ) - { - return HAL_ERROR; - } - - /* Check parameters */ - assert_param(IS_ETH_AUTONEGOTIATION(heth->Init.AutoNegotiation)); - assert_param(IS_ETH_RX_MODE(heth->Init.RxMode)); - assert_param(IS_ETH_CHECKSUM_MODE(heth->Init.ChecksumMode)); - assert_param(IS_ETH_MEDIA_INTERFACE(heth->Init.MediaInterface)); - - if( heth->State == HAL_ETH_STATE_RESET ) - { - /* Init the low level hardware : GPIO, CLOCK, NVIC. */ - HAL_ETH_MspInit( heth ); - } - - /* Enable SYSCFG Clock */ - __HAL_RCC_SYSCFG_CLK_ENABLE(); - - /* Select MII or RMII Mode*/ - SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL); - SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface; - - /* Ethernet Software reset */ - /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ - /* After reset all the registers holds their respective reset values */ - /* Also enable EDFE: Enhanced descriptor format enable. */ - heth->Instance->DMABMR |= ETH_DMABMR_SR | ETH_DMABMR_EDE; - - /* Wait for software reset */ - while ((heth->Instance->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) - { - } - - /*-------------------------------- MAC Initialization ----------------------*/ - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - /* Clear CSR Clock Range CR[2:0] bits */ - tmpreg &= ETH_MACMIIAR_CR_MASK; - - /* Get hclk frequency value (168,000,000) */ - hclk = HAL_RCC_GetHCLKFreq(); - - /* Set CR bits depending on hclk value */ - if( ( hclk >= 20000000 ) && ( hclk < 35000000 ) ) - { - /* CSR Clock Range between 20-35 MHz */ - tmpreg |= (uint32_t) ETH_MACMIIAR_CR_Div16; - } - else if( ( hclk >= 35000000 ) && ( hclk < 60000000 ) ) - { - /* CSR Clock Range between 35-60 MHz */ - tmpreg |= ( uint32_t ) ETH_MACMIIAR_CR_Div26; - } - else if((hclk >= 60000000 ) && ( hclk < 100000000 ) ) - { - /* CSR Clock Range between 60-100 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; - } - else if((hclk >= 100000000 ) && ( hclk < 150000000)) - { - /* CSR Clock Range between 100-150 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; - } - else /* ((hclk >= 150000000 ) && ( hclk <= 168000000)) */ - { - /* CSR Clock Range between 150-168 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102; - } - - /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ - heth->Instance->MACMIIAR = (uint32_t)tmpreg; - - /* Initialise the MACB and set all PHY properties */ - vMACBProbePhy(); - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - - /* Set ETH HAL State to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief De-Initializes the ETH peripheral. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth) -{ - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* De-Init the low level hardware : GPIO, CLOCK, NVIC. */ - HAL_ETH_MspDeInit( heth ); - - /* Set ETH HAL state to Disabled */ - heth->State= HAL_ETH_STATE_RESET; - - /* Release Lock */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Initializes the DMA Tx descriptors in chain mode. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param DMATxDescTab: Pointer to the first Tx desc list - * @param TxBuff: Pointer to the first TxBuffer list - * @param TxBuffCount: Number of the used Tx desc in the list - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *pxDMATable, uint8_t *ucDataBuffer, uint32_t ulBufferCount) -{ - uint32_t i = 0; - ETH_DMADescTypeDef *pxDMADescriptor; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Set the TxDesc pointer with the first one of the pxDMATable list */ - heth->TxDesc = pxDMATable; - - /* Fill each DMA descriptor with the right values */ - for( i=0; i < ulBufferCount; i++ ) - { - /* Get the pointer on the ith member of the descriptor list */ - pxDMADescriptor = pxDMATable + i; - - /* Set Second Address Chained bit */ - pxDMADescriptor->Status = ETH_DMATXDESC_TCH; - - pxDMADescriptor->ControlBufferSize = 0; - - /* Set Buffer1 address pointer */ - if( ucDataBuffer != NULL ) - { - pxDMADescriptor->Buffer1Addr = ( uint32_t )( &ucDataBuffer[ i * ETH_TX_BUF_SIZE ] ); - } - else - { - /* Buffer space is not provided because it uses zero-copy transmissions. */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )0u; - } - - if (heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) - { - /* Set the DMA Tx descriptors checksum insertion for TCP, UDP, and ICMP */ - pxDMADescriptor->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if(i < ( ulBufferCount - 1 ) ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMATable + i + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) pxDMATable; - } - } - - /* Set Transmit Descriptor List Address Register */ - heth->Instance->DMATDLAR = ( uint32_t ) pxDMATable; - - /* Set ETH HAL State to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Initializes the DMA Rx descriptors in chain mode. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param DMARxDescTab: Pointer to the first Rx desc list - * @param RxBuff: Pointer to the first RxBuffer list - * @param RxBuffCount: Number of the used Rx desc in the list - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *pxDMATable, uint8_t *ucDataBuffer, uint32_t ulBufferCount) -{ - uint32_t i = 0; - ETH_DMADescTypeDef *pxDMADescriptor; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Set the RxDesc pointer with the first one of the pxDMATable list */ - heth->RxDesc = pxDMATable; - - /* Fill each DMA descriptor with the right values */ - for(i=0; i < ulBufferCount; i++) - { - /* Get the pointer on the ith member of the descriptor list */ - pxDMADescriptor = pxDMATable+i; - - /* Set Own bit of the Rx descriptor Status */ - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - - /* Set Buffer1 size and Second Address Chained bit */ - pxDMADescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE; - - /* Set Buffer1 address pointer */ - if( ucDataBuffer != NULL ) - { - pxDMADescriptor->Buffer1Addr = ( uint32_t )( &ucDataBuffer[ i * ETH_RX_BUF_SIZE ] ); - } - else - { - /* Buffer space is not provided because it uses zero-copy reception. */ - pxDMADescriptor->Buffer1Addr = ( uint32_t )0u; - } - - if( heth->Init.RxMode == ETH_RXINTERRUPT_MODE ) - { - /* Enable Ethernet DMA Rx Descriptor interrupt */ - pxDMADescriptor->ControlBufferSize &= ~ETH_DMARXDESC_DIC; - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if(i < (ulBufferCount-1)) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = (uint32_t)(pxDMATable+i+1); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) pxDMATable; - } - } - - /* Set Receive Descriptor List Address Register */ - heth->Instance->DMARDLAR = ( uint32_t ) pxDMATable; - - /* Set ETH HAL State to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Initializes the ETH MSP. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_MspInit could be implemented in the user file - */ -} - -/** - * @brief DeInitializes ETH MSP. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_MspDeInit could be implemented in the user file - */ -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group2 IO operation functions - * @brief Data transfers functions - * - @verbatim - ============================================================================== - ##### IO operation functions ##### - ============================================================================== - [..] This section provides functions allowing to: - (+) Transmit a frame - HAL_ETH_TransmitFrame(); - (+) Receive a frame - HAL_ETH_GetReceivedFrame(); - HAL_ETH_GetReceivedFrame_IT(); - (+) Read from an External PHY register - HAL_ETH_ReadPHYRegister(); - (+) Write to an External PHY register - HAL_ETH_WritePHYRegister(); - - @endverbatim - - * @{ - */ - -/** - * @brief Sends an Ethernet frame. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param FrameLength: Amount of data to be sent - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength) -{ - uint32_t bufcount = 0, size = 0, i = 0; - __IO ETH_DMADescTypeDef *pxDmaTxDesc = heth->TxDesc; - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - if( FrameLength == 0 ) - { - /* Set ETH HAL state to READY */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - return HAL_ERROR; - } - - /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ - if( ( pxDmaTxDesc->Status & ETH_DMATXDESC_OWN ) != ( uint32_t ) RESET ) - { - /* OWN bit set */ - heth->State = HAL_ETH_STATE_BUSY_TX; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - return HAL_ERROR; - } - - /* Get the number of needed Tx buffers for the current frame, rounding up. */ - bufcount = ( FrameLength + ETH_TX_BUF_SIZE - 1 ) / ETH_TX_BUF_SIZE; - - if (bufcount == 1) - { - /* Set LAST and FIRST segment */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; - /* Set frame size */ - pxDmaTxDesc->ControlBufferSize = ( FrameLength & ETH_DMATXDESC_TBS1 ); - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_OWN; - /* Point to next descriptor */ - heth->TxDesc = ( ETH_DMADescTypeDef * ) ( heth->TxDesc->Buffer2NextDescAddr ); - } - else - { - for( i = 0; i < bufcount; i++ ) - { - /* Clear FIRST and LAST segment bits */ - uint32_t ulStatus = heth->TxDesc->Status & ~( ETH_DMATXDESC_FS | ETH_DMATXDESC_LS ); - - if( i == 0 ) - { - /* Setting the first segment bit */ - heth->TxDesc->Status = ulStatus | ETH_DMATXDESC_FS; - } - - /* Program size */ - if (i < (bufcount-1)) - { - heth->TxDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATXDESC_TBS1); - } - else - { - /* Setting the last segment bit */ - heth->TxDesc->Status = ulStatus | ETH_DMATXDESC_LS; - size = FrameLength - (bufcount-1)*ETH_TX_BUF_SIZE; - heth->TxDesc->ControlBufferSize = (size & ETH_DMATXDESC_TBS1); - } - - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - heth->TxDesc->Status |= ETH_DMATXDESC_OWN; - /* point to next descriptor */ - heth->TxDesc = (ETH_DMADescTypeDef *)( heth->TxDesc->Buffer2NextDescAddr ); - } - } - - __DSB(); - - /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ - if( ( heth->Instance->DMASR & ETH_DMASR_TBUS ) != ( uint32_t )RESET ) - { - heth->Instance->DMACHTDR = ( uint32_t )pxDmaTxDesc; - - /* Clear TBUS ETHERNET DMA flag */ - heth->Instance->DMASR = ETH_DMASR_TBUS; - /* Resume DMA transmission*/ - heth->Instance->DMATPDR = 0; - } - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Checks for received frames. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT( ETH_HandleTypeDef *heth ) -{ - return HAL_ETH_GetReceivedFrame( heth ); -} - -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame( ETH_HandleTypeDef *heth ) -{ -uint32_t ulCounter = 0; -ETH_DMADescTypeDef *pxDescriptor = heth->RxDesc; -HAL_StatusTypeDef xResult = HAL_ERROR; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Check the ETH state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Scan descriptors owned by CPU */ - while( ( ( pxDescriptor->Status & ETH_DMARXDESC_OWN ) == 0ul ) && ( ulCounter < ETH_RXBUFNB ) ) - { - uint32_t ulStatus = pxDescriptor->Status; - - /* Just for security. */ - ulCounter++; - - if( ( ulStatus & ( ETH_DMARXDESC_FS | ETH_DMARXDESC_LS ) ) == ( uint32_t )ETH_DMARXDESC_FS ) - { - /* First segment in frame, but not the last. */ - heth->RxFrameInfos.FSRxDesc = pxDescriptor; - heth->RxFrameInfos.LSRxDesc = ( ETH_DMADescTypeDef *)NULL; - heth->RxFrameInfos.SegCount = 1; - /* Point to next descriptor. */ - pxDescriptor = (ETH_DMADescTypeDef*) (pxDescriptor->Buffer2NextDescAddr); - heth->RxDesc = pxDescriptor; - } - else if( ( ulStatus & ( ETH_DMARXDESC_LS | ETH_DMARXDESC_FS ) ) == 0ul ) - { - /* This is an intermediate segment, not first, not last. */ - /* Increment segment count. */ - heth->RxFrameInfos.SegCount++; - /* Move to the next descriptor. */ - pxDescriptor = ( ETH_DMADescTypeDef * ) ( pxDescriptor->Buffer2NextDescAddr ); - heth->RxDesc = pxDescriptor; - } - /* Must be a last segment */ - else - { - /* This is the last segment. */ - /* Check if last segment is first segment: one segment contains the frame */ - if( heth->RxFrameInfos.SegCount == 0 ) - { - /* Remember the first segment. */ - heth->RxFrameInfos.FSRxDesc = pxDescriptor; - } - - /* Increment segment count */ - heth->RxFrameInfos.SegCount++; - - /* Remember the last segment. */ - heth->RxFrameInfos.LSRxDesc = pxDescriptor; - - /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ - heth->RxFrameInfos.length = - ( ( ulStatus & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4; - - /* Get the address of the buffer start address */ - heth->RxFrameInfos.buffer = heth->RxFrameInfos.FSRxDesc->Buffer1Addr; - - /* Point to next descriptor */ - heth->RxDesc = ( ETH_DMADescTypeDef * ) pxDescriptor->Buffer2NextDescAddr; - - /* Return OK status: a packet was received. */ - xResult = HAL_OK; - break; - } - } - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return xResult; -} - -#if( STM32_ETHERNET_STATS != 0 ) - - volatile int rx_count, tx_count, int_count; - /** - * @brief This function handles ETH interrupt request. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ - volatile int int_counts[32]; - volatile int tx_status[8]; - volatile unsigned sr_history[32]; - volatile int sr_head; - #define STM32_STAT_INC( x ) do { ( x )++; } while( 0 ) - -#else - #define STM32_STAT_INC( x ) do { } while( 0 ) -#endif /* STM32_ETHERNET_STATS */ - -#define ETH_DMA_ALL_INTS \ - ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_AIS | ETH_DMA_IT_ER | \ - ETH_DMA_IT_FBE | ETH_DMA_IT_ET | ETH_DMA_IT_RWT | ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | \ - ETH_DMA_IT_TU | ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) - -//#define ETH_DMA_ALL_INTS ETH_DMA_IT_RBU | ETH_DMA_FLAG_T | ETH_DMA_FLAG_AIS - -#define INT_MASK ( ( uint32_t ) ~ ( ETH_DMA_IT_TBU ) ) -void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth) -{ - uint32_t dmasr; - - STM32_STAT_INC( int_count ); - - dmasr = heth->Instance->DMASR & ETH_DMA_ALL_INTS; - heth->Instance->DMASR = dmasr; - -#if( STM32_ETHERNET_STATS != 0 ) - if( sr_head < ARRAY_SIZE( sr_history ) ) - { - sr_history[ sr_head++ ] = dmasr; - } - - { - int i; - for (i = 0; i < 32; i++) { - if (dmasr & (1u << i)) { - int_counts[i]++; - } - } - tx_status[ ( dmasr >> 20 ) & 0x07 ]++; - } -#endif - - /* Frame received */ - if( ( dmasr & ( ETH_DMA_FLAG_R | ETH_DMA_IT_RBU ) ) != 0 ) - { - /* Receive complete callback */ - HAL_ETH_RxCpltCallback( heth ); - STM32_STAT_INC( rx_count ); - } - /* Frame transmitted */ - if( ( dmasr & ( ETH_DMA_FLAG_T ) ) != 0 ) - { - /* Transfer complete callback */ - HAL_ETH_TxCpltCallback( heth ); - STM32_STAT_INC( tx_count ); - } - - /* ETH DMA Error */ - if( ( dmasr & ( ETH_DMA_FLAG_AIS ) ) != 0 ) - { - /* Ethernet Error callback */ - HAL_ETH_ErrorCallback( heth ); - } -} - -/** - * @brief Tx Transfer completed callbacks. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ -} - -/** - * @brief Rx Transfer completed callbacks. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ -} - -/** - * @brief Ethernet transfer error callbacks - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ -} - -/** - * @brief Reads a PHY register - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. - * This parameter can be one of the following values: - * PHY_BCR: Transceiver Basic Control Register, - * PHY_BSR: Transceiver Basic Status Register. - * More PHY register could be read depending on the used PHY - * @param RegValue: PHY register value - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) -{ -uint32_t tmpreg = 0; -uint32_t tickstart = 0; -HAL_StatusTypeDef xResult; - - /* Check parameters */ - assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); - - /* Check the ETH peripheral state */ - if( heth->State == HAL_ETH_STATE_BUSY_RD ) - { - xResult = HAL_BUSY; - } - else - { - __HAL_LOCK( heth ); - - /* Set ETH HAL State to BUSY_RD */ - heth->State = HAL_ETH_STATE_BUSY_RD; - - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg &= ~ETH_MACMIIAR_CR_MASK; - - /* Prepare the MII address register value */ - tmpreg |= ( ( ( uint32_t )heth->Init.PhyAddress << 11) & ETH_MACMIIAR_PA ); /* Set the PHY device address */ - tmpreg |= ( ( ( uint32_t )PHYReg << 6 ) & ETH_MACMIIAR_MR ); /* Set the PHY register address */ - tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ - tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg; - - /* Get tick */ - tickstart = HAL_GetTick(); - - /* Check for the Busy flag */ - while( 1 ) - { - tmpreg = heth->Instance->MACMIIAR; - - if( ( tmpreg & ETH_MACMIIAR_MB ) == 0ul ) - { - /* Get MACMIIDR value */ - *RegValue = ( uint32_t ) heth->Instance->MACMIIDR; - xResult = HAL_OK; - break; - } - /* Check for the Timeout */ - if( ( HAL_GetTick( ) - tickstart ) > PHY_READ_TO ) - { - xResult = HAL_TIMEOUT; - break; - } - - } - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - } - - if( xResult != HAL_OK ) - { - lUDPLoggingPrintf( "ReadPHY: %d\n", xResult ); - } - /* Return function status */ - return xResult; -} - -/** - * @brief Writes to a PHY register. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. - * This parameter can be one of the following values: - * PHY_BCR: Transceiver Control Register. - * More PHY register could be written depending on the used PHY - * @param RegValue: the value to write - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue) -{ -uint32_t tmpreg = 0; -uint32_t tickstart = 0; -HAL_StatusTypeDef xResult; - - /* Check parameters */ - assert_param( IS_ETH_PHY_ADDRESS( heth->Init.PhyAddress ) ); - - /* Check the ETH peripheral state */ - if( heth->State == HAL_ETH_STATE_BUSY_WR ) - { - xResult = HAL_BUSY; - } - else - { - __HAL_LOCK( heth ); - - /* Set ETH HAL State to BUSY_WR */ - heth->State = HAL_ETH_STATE_BUSY_WR; - - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg &= ~ETH_MACMIIAR_CR_MASK; - - /* Prepare the MII register address value */ - tmpreg |= ( ( ( uint32_t ) heth->Init.PhyAddress << 11 ) & ETH_MACMIIAR_PA ); /* Set the PHY device address */ - tmpreg |= ( ( ( uint32_t ) PHYReg << 6 ) & ETH_MACMIIAR_MR ); /* Set the PHY register address */ - tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ - tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - - /* Give the value to the MII data register */ - heth->Instance->MACMIIDR = ( uint16_t ) RegValue; - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg; - - /* Get tick */ - tickstart = HAL_GetTick(); - - /* Check for the Busy flag */ - while( 1 ) - { - tmpreg = heth->Instance->MACMIIAR; - - if( ( tmpreg & ETH_MACMIIAR_MB ) == 0ul ) - { - xResult = HAL_OK; - break; - } - /* Check for the Timeout */ - if( ( HAL_GetTick( ) - tickstart ) > PHY_WRITE_TO ) - { - xResult = HAL_TIMEOUT; - break; - } - } - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - } - - if( xResult != HAL_OK ) - { - lUDPLoggingPrintf( "WritePHY: %d\n", xResult ); - } - /* Return function status */ - return xResult; -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group3 Peripheral Control functions - * @brief Peripheral Control functions - * -@verbatim - =============================================================================== - ##### Peripheral Control functions ##### - =============================================================================== - [..] This section provides functions allowing to: - (+) Enable MAC and DMA transmission and reception. - HAL_ETH_Start(); - (+) Disable MAC and DMA transmission and reception. - HAL_ETH_Stop(); - (+) Set the MAC configuration in runtime mode - HAL_ETH_ConfigMAC(); - (+) Set the DMA configuration in runtime mode - HAL_ETH_ConfigDMA(); - -@endverbatim - * @{ - */ - - /** - * @brief Enables Ethernet MAC and DMA reception/transmission - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Start( ETH_HandleTypeDef *heth ) -{ - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Enable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionEnable( heth ); - - /* Enable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionEnable( heth ); - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO( heth ); - - /* Start DMA transmission */ - ETH_DMATransmissionEnable( heth ); - - /* Start DMA reception */ - ETH_DMAReceptionEnable( heth ); - - /* Set the ETH state to READY*/ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Stop Ethernet MAC and DMA reception/transmission - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) -{ - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Stop DMA transmission */ - ETH_DMATransmissionDisable( heth ); - - /* Stop DMA reception */ - ETH_DMAReceptionDisable( heth ); - - /* Disable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionDisable( heth ); - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO( heth ); - - /* Disable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionDisable( heth ); - - /* Set the ETH state*/ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -static void prvWriteMACFCR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->MACFCR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->MACFCR; - - HAL_Delay( ETH_REG_WRITE_DELAY ); - - heth->Instance->MACFCR = ulValue; -} - -static void prvWriteDMAOMR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->DMAOMR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->DMAOMR; - - HAL_Delay( ETH_REG_WRITE_DELAY ); - - heth->Instance->DMAOMR = ulValue; -} - -static void prvWriteMACCR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->MACCR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->MACCR; - - HAL_Delay( ETH_REG_WRITE_DELAY ); - - heth->Instance->MACCR = ulValue; -} - -/** - * @brief Set ETH MAC Configuration. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param macconf: MAC Configuration structure - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf) -{ - uint32_t tmpreg = 0; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State= HAL_ETH_STATE_BUSY; - - assert_param(IS_ETH_SPEED(heth->Init.Speed)); - assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); - - if (macconf != NULL) - { - /* Check the parameters */ - assert_param(IS_ETH_WATCHDOG(macconf->Watchdog)); - assert_param(IS_ETH_JABBER(macconf->Jabber)); - assert_param(IS_ETH_INTER_FRAME_GAP(macconf->InterFrameGap)); - assert_param(IS_ETH_CARRIER_SENSE(macconf->CarrierSense)); - assert_param(IS_ETH_RECEIVE_OWN(macconf->ReceiveOwn)); - assert_param(IS_ETH_LOOPBACK_MODE(macconf->LoopbackMode)); - assert_param(IS_ETH_CHECKSUM_OFFLOAD(macconf->ChecksumOffload)); - assert_param(IS_ETH_RETRY_TRANSMISSION(macconf->RetryTransmission)); - assert_param(IS_ETH_AUTOMATIC_PADCRC_STRIP(macconf->AutomaticPadCRCStrip)); - assert_param(IS_ETH_BACKOFF_LIMIT(macconf->BackOffLimit)); - assert_param(IS_ETH_DEFERRAL_CHECK(macconf->DeferralCheck)); - assert_param(IS_ETH_RECEIVE_ALL(macconf->ReceiveAll)); - assert_param(IS_ETH_SOURCE_ADDR_FILTER(macconf->SourceAddrFilter)); - assert_param(IS_ETH_CONTROL_FRAMES(macconf->PassControlFrames)); - assert_param(IS_ETH_BROADCAST_FRAMES_RECEPTION(macconf->BroadcastFramesReception)); - assert_param(IS_ETH_DESTINATION_ADDR_FILTER(macconf->DestinationAddrFilter)); - assert_param(IS_ETH_PROMISCUOUS_MODE(macconf->PromiscuousMode)); - assert_param(IS_ETH_MULTICAST_FRAMES_FILTER(macconf->MulticastFramesFilter)); - assert_param(IS_ETH_UNICAST_FRAMES_FILTER(macconf->UnicastFramesFilter)); - assert_param(IS_ETH_PAUSE_TIME(macconf->PauseTime)); - assert_param(IS_ETH_ZEROQUANTA_PAUSE(macconf->ZeroQuantaPause)); - assert_param(IS_ETH_PAUSE_LOW_THRESHOLD(macconf->PauseLowThreshold)); - assert_param(IS_ETH_UNICAST_PAUSE_FRAME_DETECT(macconf->UnicastPauseFrameDetect)); - assert_param(IS_ETH_RECEIVE_FLOWCONTROL(macconf->ReceiveFlowControl)); - assert_param(IS_ETH_TRANSMIT_FLOWCONTROL(macconf->TransmitFlowControl)); - assert_param(IS_ETH_VLAN_TAG_COMPARISON(macconf->VLANTagComparison)); - assert_param(IS_ETH_VLAN_TAG_IDENTIFIER(macconf->VLANTagIdentifier)); - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg &= ETH_MACCR_CLEAR_MASK; - - tmpreg |= (uint32_t)( - macconf->Watchdog | - macconf->Jabber | - macconf->InterFrameGap | - macconf->CarrierSense | - heth->Init.Speed | - macconf->ReceiveOwn | - macconf->LoopbackMode | - heth->Init.DuplexMode | - macconf->ChecksumOffload | - macconf->RetryTransmission | - macconf->AutomaticPadCRCStrip | - macconf->BackOffLimit | - macconf->DeferralCheck); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACFFR Configuration --------------------*/ - /* Write to ETHERNET MACFFR */ - heth->Instance->MACFFR = (uint32_t)( - macconf->ReceiveAll | - macconf->SourceAddrFilter | - macconf->PassControlFrames | - macconf->BroadcastFramesReception | - macconf->DestinationAddrFilter | - macconf->PromiscuousMode | - macconf->MulticastFramesFilter | - macconf->UnicastFramesFilter); - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACFFR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACFFR = tmpreg; - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ - /* Write to ETHERNET MACHTHR */ - heth->Instance->MACHTHR = (uint32_t)macconf->HashTableHigh; - - /* Write to ETHERNET MACHTLR */ - heth->Instance->MACHTLR = (uint32_t)macconf->HashTableLow; - /*----------------------- ETHERNET MACFCR Configuration --------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg = heth->Instance->MACFCR; - /* Clear xx bits */ - tmpreg &= ETH_MACFCR_CLEAR_MASK; - - tmpreg |= (uint32_t)(( - macconf->PauseTime << 16) | - macconf->ZeroQuantaPause | - macconf->PauseLowThreshold | - macconf->UnicastPauseFrameDetect | - macconf->ReceiveFlowControl | - macconf->TransmitFlowControl); - - /* Write to ETHERNET MACFCR */ - prvWriteMACFCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ - heth->Instance->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | - macconf->VLANTagIdentifier); - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACVLANTR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACVLANTR = tmpreg; - } - else /* macconf == NULL : here we just configure Speed and Duplex mode */ - { - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - - /* Clear FES and DM bits */ - tmpreg &= ~((uint32_t)0x00004800); - - tmpreg |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - } - - /* Set the ETH state to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Sets ETH DMA Configuration. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param dmaconf: DMA Configuration structure - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_DMAInitTypeDef *dmaconf) -{ - uint32_t tmpreg = 0; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State= HAL_ETH_STATE_BUSY; - - /* Check parameters */ - assert_param(IS_ETH_DROP_TCPIP_CHECKSUM_FRAME(dmaconf->DropTCPIPChecksumErrorFrame)); - assert_param(IS_ETH_RECEIVE_STORE_FORWARD(dmaconf->ReceiveStoreForward)); - assert_param(IS_ETH_FLUSH_RECEIVE_FRAME(dmaconf->FlushReceivedFrame)); - assert_param(IS_ETH_TRANSMIT_STORE_FORWARD(dmaconf->TransmitStoreForward)); - assert_param(IS_ETH_TRANSMIT_THRESHOLD_CONTROL(dmaconf->TransmitThresholdControl)); - assert_param(IS_ETH_FORWARD_ERROR_FRAMES(dmaconf->ForwardErrorFrames)); - assert_param(IS_ETH_FORWARD_UNDERSIZED_GOOD_FRAMES(dmaconf->ForwardUndersizedGoodFrames)); - assert_param(IS_ETH_RECEIVE_THRESHOLD_CONTROL(dmaconf->ReceiveThresholdControl)); - assert_param(IS_ETH_SECOND_FRAME_OPERATE(dmaconf->SecondFrameOperate)); - assert_param(IS_ETH_ADDRESS_ALIGNED_BEATS(dmaconf->AddressAlignedBeats)); - assert_param(IS_ETH_FIXED_BURST(dmaconf->FixedBurst)); - assert_param(IS_ETH_RXDMA_BURST_LENGTH(dmaconf->RxDMABurstLength)); - assert_param(IS_ETH_TXDMA_BURST_LENGTH(dmaconf->TxDMABurstLength)); - assert_param(IS_ETH_ENHANCED_DESCRIPTOR_FORMAT(dmaconf->EnhancedDescriptorFormat)); - assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(dmaconf->DescriptorSkipLength)); - assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(dmaconf->DMAArbitration)); - - /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ - /* Get the ETHERNET DMAOMR value */ - tmpreg = heth->Instance->DMAOMR; - /* Clear xx bits */ - tmpreg &= ETH_DMAOMR_CLEAR_MASK; - - tmpreg |= (uint32_t)( - dmaconf->DropTCPIPChecksumErrorFrame | - dmaconf->ReceiveStoreForward | - dmaconf->FlushReceivedFrame | - dmaconf->TransmitStoreForward | - dmaconf->TransmitThresholdControl | - dmaconf->ForwardErrorFrames | - dmaconf->ForwardUndersizedGoodFrames | - dmaconf->ReceiveThresholdControl | - dmaconf->SecondFrameOperate); - - /* Write to ETHERNET DMAOMR */ - prvWriteDMAOMR( heth, tmpreg ); - - /*----------------------- ETHERNET DMABMR Configuration --------------------*/ - heth->Instance->DMABMR = (uint32_t)(dmaconf->AddressAlignedBeats | - dmaconf->FixedBurst | - dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - dmaconf->TxDMABurstLength | - dmaconf->EnhancedDescriptorFormat | - (dmaconf->DescriptorSkipLength << 2) | - dmaconf->DMAArbitration | - ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->DMABMR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->DMABMR = tmpreg; - - /* Set the ETH state to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group4 Peripheral State functions - * @brief Peripheral State functions - * - @verbatim - =============================================================================== - ##### Peripheral State functions ##### - =============================================================================== - [..] - This subsection permits to get in run-time the status of the peripheral - and the data flow. - (+) Get the ETH handle state: - HAL_ETH_GetState(); - - - @endverbatim - * @{ - */ - -/** - * @brief Return the ETH HAL state - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL state - */ -HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth) -{ - /* Return ETH state */ - return heth->State; -} - -/** - * @} - */ - -/** - * @} - */ - -/** @addtogroup ETH_Private_Functions - * @{ - */ - -/** - * @brief Configures Ethernet MAC and DMA with default parameters. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param err: Ethernet Init error - * @retval HAL status - */ -static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err) -{ - ETH_MACInitTypeDef macinit; - ETH_DMAInitTypeDef dmainit; - uint32_t tmpreg = 0; - - if (err != ETH_SUCCESS) /* Auto-negotiation failed */ - { - /* Set Ethernet duplex mode to Full-duplex */ - heth->Init.DuplexMode = ETH_MODE_FULLDUPLEX; - - /* Set Ethernet speed to 100M */ - heth->Init.Speed = ETH_SPEED_100M; - } - - /* Ethernet MAC default initialization **************************************/ - macinit.Watchdog = ETH_WATCHDOG_ENABLE; - macinit.Jabber = ETH_JABBER_ENABLE; - macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT; - macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE; - macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE; - macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE; - if(heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE; - } - else - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE; - } - macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE; - macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE; - macinit.BackOffLimit = ETH_BACKOFFLIMIT_10; - macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE; - macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE; - macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE; - macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL; - macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE; - macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL; - macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE; - macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT; - macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT; - macinit.HashTableHigh = 0x0; - macinit.HashTableLow = 0x0; - macinit.PauseTime = 0x0; - macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE; - macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4; - macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE; - macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE; - macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE; - macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT; - macinit.VLANTagIdentifier = 0x0; - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg &= ETH_MACCR_CLEAR_MASK; - /* Set the WD bit according to ETH Watchdog value */ - /* Set the JD: bit according to ETH Jabber value */ - /* Set the IFG bit according to ETH InterFrameGap value */ - /* Set the DCRS bit according to ETH CarrierSense value */ - /* Set the FES bit according to ETH Speed value */ - /* Set the DO bit according to ETH ReceiveOwn value */ - /* Set the LM bit according to ETH LoopbackMode value */ - /* Set the DM bit according to ETH Mode value */ - /* Set the IPCO bit according to ETH ChecksumOffload value */ - /* Set the DR bit according to ETH RetryTransmission value */ - /* Set the ACS bit according to ETH AutomaticPadCRCStrip value */ - /* Set the BL bit according to ETH BackOffLimit value */ - /* Set the DC bit according to ETH DeferralCheck value */ - tmpreg |= (uint32_t)(macinit.Watchdog | - macinit.Jabber | - macinit.InterFrameGap | - macinit.CarrierSense | - heth->Init.Speed | - macinit.ReceiveOwn | - macinit.LoopbackMode | - heth->Init.DuplexMode | - macinit.ChecksumOffload | - macinit.RetryTransmission | - macinit.AutomaticPadCRCStrip | - macinit.BackOffLimit | - macinit.DeferralCheck); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACFFR Configuration --------------------*/ - /* Set the RA bit according to ETH ReceiveAll value */ - /* Set the SAF and SAIF bits according to ETH SourceAddrFilter value */ - /* Set the PCF bit according to ETH PassControlFrames value */ - /* Set the DBF bit according to ETH BroadcastFramesReception value */ - /* Set the DAIF bit according to ETH DestinationAddrFilter value */ - /* Set the PR bit according to ETH PromiscuousMode value */ - /* Set the PM, HMC and HPF bits according to ETH MulticastFramesFilter value */ - /* Set the HUC and HPF bits according to ETH UnicastFramesFilter value */ - /* Write to ETHERNET MACFFR */ - heth->Instance->MACFFR = (uint32_t)(macinit.ReceiveAll | - macinit.SourceAddrFilter | - macinit.PassControlFrames | - macinit.BroadcastFramesReception | - macinit.DestinationAddrFilter | - macinit.PromiscuousMode | - macinit.MulticastFramesFilter | - macinit.UnicastFramesFilter); - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACFFR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACFFR = tmpreg; - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/ - /* Write to ETHERNET MACHTHR */ - heth->Instance->MACHTHR = (uint32_t)macinit.HashTableHigh; - - /* Write to ETHERNET MACHTLR */ - heth->Instance->MACHTLR = (uint32_t)macinit.HashTableLow; - /*----------------------- ETHERNET MACFCR Configuration -------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg = heth->Instance->MACFCR; - /* Clear xx bits */ - tmpreg &= ETH_MACFCR_CLEAR_MASK; - - /* Set the PT bit according to ETH PauseTime value */ - /* Set the DZPQ bit according to ETH ZeroQuantaPause value */ - /* Set the PLT bit according to ETH PauseLowThreshold value */ - /* Set the UP bit according to ETH UnicastPauseFrameDetect value */ - /* Set the RFE bit according to ETH ReceiveFlowControl value */ - /* Set the TFE bit according to ETH TransmitFlowControl value */ - tmpreg |= (uint32_t)((macinit.PauseTime << 16) | - macinit.ZeroQuantaPause | - macinit.PauseLowThreshold | - macinit.UnicastPauseFrameDetect | - macinit.ReceiveFlowControl | - macinit.TransmitFlowControl); - - /* Write to ETHERNET MACFCR */ - prvWriteMACFCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACVLANTR Configuration ----------------*/ - /* Set the ETV bit according to ETH VLANTagComparison value */ - /* Set the VL bit according to ETH VLANTagIdentifier value */ - heth->Instance->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | - macinit.VLANTagIdentifier); - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACVLANTR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->MACVLANTR = tmpreg; - - /* Ethernet DMA default initialization ************************************/ - dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE; - dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE; - dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE; - dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE; - dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES; - dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE; - dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE; - dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES; - dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE; - dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE; - dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE; - dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; - dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; - dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE; - dmainit.DescriptorSkipLength = 0x0; - dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1; - - /* Get the ETHERNET DMAOMR value */ - tmpreg = heth->Instance->DMAOMR; - /* Clear xx bits */ - tmpreg &= ETH_DMAOMR_CLEAR_MASK; - - /* Set the DT bit according to ETH DropTCPIPChecksumErrorFrame value */ - /* Set the RSF bit according to ETH ReceiveStoreForward value */ - /* Set the DFF bit according to ETH FlushReceivedFrame value */ - /* Set the TSF bit according to ETH TransmitStoreForward value */ - /* Set the TTC bit according to ETH TransmitThresholdControl value */ - /* Set the FEF bit according to ETH ForwardErrorFrames value */ - /* Set the FUF bit according to ETH ForwardUndersizedGoodFrames value */ - /* Set the RTC bit according to ETH ReceiveThresholdControl value */ - /* Set the OSF bit according to ETH SecondFrameOperate value */ - tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | - dmainit.ReceiveStoreForward | - dmainit.FlushReceivedFrame | - dmainit.TransmitStoreForward | - dmainit.TransmitThresholdControl | - dmainit.ForwardErrorFrames | - dmainit.ForwardUndersizedGoodFrames | - dmainit.ReceiveThresholdControl | - dmainit.SecondFrameOperate); - - /* Write to ETHERNET DMAOMR */ - prvWriteDMAOMR( heth, tmpreg ); - - /*----------------------- ETHERNET DMABMR Configuration ------------------*/ - /* Set the AAL bit according to ETH AddressAlignedBeats value */ - /* Set the FB bit according to ETH FixedBurst value */ - /* Set the RPBL and 4*PBL bits according to ETH RxDMABurstLength value */ - /* Set the PBL and 4*PBL bits according to ETH TxDMABurstLength value */ - /* Set the Enhanced DMA descriptors bit according to ETH EnhancedDescriptorFormat value*/ - /* Set the DSL bit according to ETH DesciptorSkipLength value */ - /* Set the PR and DA bits according to ETH DMAArbitration value */ - heth->Instance->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | - dmainit.FixedBurst | - dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - dmainit.TxDMABurstLength | - dmainit.EnhancedDescriptorFormat | - (dmainit.DescriptorSkipLength << 2) | - dmainit.DMAArbitration | - ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->DMABMR; - HAL_Delay(ETH_REG_WRITE_DELAY); - heth->Instance->DMABMR = tmpreg; - - if(heth->Init.RxMode == ETH_RXINTERRUPT_MODE) - { - /* Enable the Ethernet Rx Interrupt */ - __HAL_ETH_DMA_ENABLE_IT(( heth ), ETH_DMA_IT_NIS | ETH_DMA_IT_R); - } - - /* Initialize MAC address in ethernet MAC */ - ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr); -} - -/** - * @brief Configures the selected MAC address. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param MacAddr: The MAC address to configure - * This parameter can be one of the following values: - * @arg ETH_MAC_Address0: MAC Address0 - * @arg ETH_MAC_Address1: MAC Address1 - * @arg ETH_MAC_Address2: MAC Address2 - * @arg ETH_MAC_Address3: MAC Address3 - * @param Addr: Pointer to MAC address buffer data (6 bytes) - * @retval HAL status - */ -static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr) -{ - uint32_t tmpreg; - - /* Check the parameters */ - assert_param( IS_ETH_MAC_ADDRESS0123( MacAddr ) ); - - /* Calculate the selected MAC address high register */ - tmpreg = 0x80000000ul | ( ( uint32_t )Addr[ 5 ] << 8) | (uint32_t)Addr[ 4 ]; - /* Load the selected MAC address high register */ - ( * ( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + MacAddr ) ) ) = tmpreg; - /* Calculate the selected MAC address low register */ - tmpreg = ( ( uint32_t )Addr[ 3 ] << 24 ) | ( ( uint32_t )Addr[ 2 ] << 16 ) | ( ( uint32_t )Addr[ 1 ] << 8 ) | Addr[ 0 ]; - - /* Load the selected MAC address low register */ - ( * ( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + MacAddr ) ) ) = tmpreg; -} - -/** - * @brief Enables the MAC transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = heth->Instance->MACCR | ETH_MACCR_TE; - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Disables the MAC transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = heth->Instance->MACCR & ~( ETH_MACCR_TE ); - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Enables the MAC reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth) -{ - __IO uint32_t tmpreg = heth->Instance->MACCR | ETH_MACCR_RE; - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Disables the MAC reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth) -{ - __IO uint32_t tmpreg = heth->Instance->MACCR & ~( ETH_MACCR_RE ); - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Enables the DMA transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth) -{ - /* Enable the DMA transmission */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_ST; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Disables the DMA transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth) -{ - /* Disable the DMA transmission */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR & ~( ETH_DMAOMR_ST ); - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Enables the DMA reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth) -{ - /* Enable the DMA reception */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_SR; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Disables the DMA reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth) -{ - /* Disable the DMA reception */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR & ~( ETH_DMAOMR_SR ); - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Clears the ETHERNET transmit FIFO. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth) -{ - /* Set the Flush Transmit FIFO bit */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_FTF; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @} - */ - -#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ -#endif /* HAL_ETH_MODULE_ENABLED */ -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.h deleted file mode 100644 index 93b9caff0..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f4xx_hal_eth.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * The Ethernet header files for STM32F2, STM32F4 and STM32F7 have been merged to - * a single module that works for both parts: "stm32fxx_hal_eth" - */ - -#include "stm32fxx_hal_eth.h" diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f7xx_hal_eth.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f7xx_hal_eth.h deleted file mode 100644 index 93b9caff0..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32f7xx_hal_eth.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * The Ethernet header files for STM32F2, STM32F4 and STM32F7 have been merged to - * a single module that works for both parts: "stm32fxx_hal_eth" - */ - -#include "stm32fxx_hal_eth.h" diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c deleted file mode 100644 index dad16aaf8..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c +++ /dev/null @@ -1,1468 +0,0 @@ -/** - ****************************************************************************** - * @file stm32fxx_hal_eth.c - * @author MCD Application Team - * @version V1.3.2 - * @date 26-June-2015 - * @brief ETH HAL module driver. - * This file provides firmware functions to manage the following - * functionalities of the Ethernet (ETH) peripheral: - * + Initialization and de-initialization functions - * + IO operation functions - * + Peripheral Control functions - * + Peripheral State and Errors functions - * - @verbatim - ============================================================================== - ##### How to use this driver ##### - ============================================================================== - [..] - (#)Declare a ETH_HandleTypeDef handle structure, for example: - ETH_HandleTypeDef heth; - - (#)Fill parameters of Init structure in heth handle - - (#)Call HAL_ETH_Init() API to initialize the Ethernet peripheral (MAC, DMA, ...) - - (#)Initialize the ETH low level resources through the HAL_ETH_MspInit() API: - (##) Enable the Ethernet interface clock using - (+++) __HAL_RCC_ETHMAC_CLK_ENABLE(); - (+++) __HAL_RCC_ETHMACTX_CLK_ENABLE(); - (+++) __HAL_RCC_ETHMACRX_CLK_ENABLE(); - - (##) Initialize the related GPIO clocks - (##) Configure Ethernet pin-out - (##) Configure Ethernet NVIC interrupt (IT mode) - - (#)Initialize Ethernet DMA Descriptors in chain mode and point to allocated buffers: - (##) HAL_ETH_DMATxDescListInit(); for Transmission process - (##) HAL_ETH_DMARxDescListInit(); for Reception process - - (#)Enable MAC and DMA transmission and reception: - (##) HAL_ETH_Start(); - - (#)Prepare ETH DMA TX Descriptors and give the hand to ETH DMA to transfer - the frame to MAC TX FIFO: - (##) HAL_ETH_TransmitFrame(); - - (#)Poll for a received frame in ETH RX DMA Descriptors and get received - frame parameters - (##) HAL_ETH_GetReceivedFrame(); (should be called into an infinite loop) - - (#) Get a received frame when an ETH RX interrupt occurs: - (##) HAL_ETH_GetReceivedFrame_IT(); (called in IT mode only) - - (#) Communicate with external PHY device: - (##) Read a specific register from the PHY - HAL_ETH_ReadPHYRegister(); - (##) Write data to a specific RHY register: - HAL_ETH_WritePHYRegister(); - - (#) Configure the Ethernet MAC after ETH peripheral initialization - HAL_ETH_ConfigMAC(); all MAC parameters should be filled. - - (#) Configure the Ethernet DMA after ETH peripheral initialization - HAL_ETH_ConfigDMA(); all DMA parameters should be filled. - - -@- The PTP protocol and the DMA descriptors ring mode are not supported - in this driver - - @endverbatim - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2015 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ - -#if defined(STM32F7xx) - #include "stm32f7xx_hal.h" - #define stm_is_F7 1 -#elif defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - #include "stm32f4xx_hal.h" - #define stm_is_F4 1 -#elif defined(STM32F2xx) - #include "stm32f2xx_hal.h" - #define stm_is_F2 1 -#else - #error For what part should this be compiled? -#endif - -#include "stm32fxx_hal_eth.h" - -/** @addtogroup STM32F4xx_HAL_Driver - * @{ - */ - -/** @defgroup ETH ETH - * @brief ETH HAL module driver - * @{ - */ - -#if !defined( ARRAY_SIZE ) - #define ARRAY_SIZE( x ) ( sizeof ( x ) / sizeof ( x )[ 0 ] ) -#endif - -#ifdef HAL_ETH_MODULE_ENABLED - -#if( stm_is_F2 != 0 || stm_is_F4 != 0 || stm_is_F7 ) - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/** @defgroup ETH_Private_Constants ETH Private Constants - * @{ - */ - -/** - * @} - */ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -/* Private function prototypes -----------------------------------------------*/ -/** @defgroup ETH_Private_Functions ETH Private Functions - * @{ - */ -static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err); -static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr); -static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth); -static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth); -static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth); -static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth); -static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth); -static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth); -static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth); -static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth); -static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth); - -/** - * @} - */ -/* Private functions ---------------------------------------------------------*/ - -/** @defgroup ETH_Exported_Functions ETH Exported Functions - * @{ - */ - -/** @defgroup ETH_Exported_Functions_Group1 Initialization and de-initialization functions - * @brief Initialization and Configuration functions - * - @verbatim - =============================================================================== - ##### Initialization and de-initialization functions ##### - =============================================================================== - [..] This section provides functions allowing to: - (+) Initialize and configure the Ethernet peripheral - (+) De-initialize the Ethernet peripheral - - @endverbatim - * @{ - */ -extern void vMACBProbePhy ( void ); - -/** - * @brief Initializes the Ethernet MAC and DMA according to default - * parameters. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = 0uL; - uint32_t hclk = 60000000uL; - uint32_t err = ETH_SUCCESS; - - /* Check the ETH peripheral state */ - if( heth == NULL ) - { - return HAL_ERROR; - } - - /* Check parameters */ - assert_param(IS_ETH_AUTONEGOTIATION(heth->Init.AutoNegotiation)); - assert_param(IS_ETH_RX_MODE(heth->Init.RxMode)); - assert_param(IS_ETH_CHECKSUM_MODE(heth->Init.ChecksumMode)); - assert_param(IS_ETH_MEDIA_INTERFACE(heth->Init.MediaInterface)); - - if( heth->State == HAL_ETH_STATE_RESET ) - { - /* Init the low level hardware : GPIO, CLOCK, NVIC. */ - HAL_ETH_MspInit( heth ); - } - - /* Enable SYSCFG Clock */ - __HAL_RCC_SYSCFG_CLK_ENABLE(); - - /* Select MII or RMII Mode*/ - SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL); - SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface; - - /* Ethernet Software reset */ - /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ - /* After reset all the registers holds their respective reset values */ - /* Also enable EDFE: Enhanced descriptor format enable. */ - heth->Instance->DMABMR |= ETH_DMABMR_SR | ETH_DMABMR_EDE; - - /* Wait for software reset */ - while ((heth->Instance->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) - { - /* If your program hangs here, please check the value of 'ipconfigUSE_RMII'. */ - } - - /*-------------------------------- MAC Initialization ----------------------*/ - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - /* Clear CSR Clock Range CR[2:0] bits */ - tmpreg &= ETH_MACMIIAR_CR_MASK; - - /* Get hclk frequency value (e.g. 168,000,000) */ - hclk = HAL_RCC_GetHCLKFreq(); - - /* Set CR bits depending on hclk value */ - if(( hclk >= 20000000uL ) && ( hclk < 35000000uL ) ) - { - /* CSR Clock Range between 20-35 MHz */ - tmpreg |= ( uint32_t) ETH_MACMIIAR_CR_Div16; - } - else if( ( hclk >= 35000000uL ) && ( hclk < 60000000uL ) ) - { - /* CSR Clock Range between 35-60 MHz */ - tmpreg |= ( uint32_t ) ETH_MACMIIAR_CR_Div26; - } - else if( ( hclk >= 60000000uL ) && ( hclk < 100000000uL ) ) - { - /* CSR Clock Range between 60-100 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; - } - else if( ( hclk >= 100000000uL ) && ( hclk < 150000000uL ) ) - { - /* CSR Clock Range between 100-150 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; - } - else /* ( ( hclk >= 150000000uL ) && ( hclk <= 183000000uL ) ) */ - { - /* CSR Clock Range between 150-183 MHz */ - tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102; - } - - /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ - heth->Instance->MACMIIAR = (uint32_t)tmpreg; - - /* Initialise the MACB and set all PHY properties */ - vMACBProbePhy(); - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - - /* Set ETH HAL State to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief De-Initializes the ETH peripheral. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth) -{ - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* De-Init the low level hardware : GPIO, CLOCK, NVIC. */ - HAL_ETH_MspDeInit( heth ); - - /* Set ETH HAL state to Disabled */ - heth->State= HAL_ETH_STATE_RESET; - - /* Release Lock */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Initializes the ETH MSP. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_MspInit could be implemented in the user file - */ - ( void ) heth; -} - -/** - * @brief DeInitializes ETH MSP. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_MspDeInit could be implemented in the user file - */ - ( void ) heth; -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group2 IO operation functions - * @brief Data transfers functions - * - @verbatim - ============================================================================== - ##### IO operation functions ##### - ============================================================================== - [..] This section provides functions allowing to: - (+) Transmit a frame - HAL_ETH_TransmitFrame(); - (+) Receive a frame - HAL_ETH_GetReceivedFrame(); - HAL_ETH_GetReceivedFrame_IT(); - (+) Read from an External PHY register - HAL_ETH_ReadPHYRegister(); - (+) Write to an External PHY register - HAL_ETH_WritePHYRegister(); - - @endverbatim - - * @{ - */ - -#define ETH_DMA_ALL_INTS \ - ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_AIS | ETH_DMA_IT_ER | \ - ETH_DMA_IT_FBE | ETH_DMA_IT_ET | ETH_DMA_IT_RWT | ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | \ - ETH_DMA_IT_TU | ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) - -//#define ETH_DMA_ALL_INTS ETH_DMA_IT_RBU | ETH_DMA_FLAG_T | ETH_DMA_FLAG_AIS - -#define INT_MASK ( ( uint32_t ) ~ ( ETH_DMA_IT_TBU ) ) -void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth) -{ - uint32_t dmasr; - - dmasr = heth->Instance->DMASR & ETH_DMA_ALL_INTS; - heth->Instance->DMASR = dmasr; - - /* Frame received */ - if( ( dmasr & ( ETH_DMA_FLAG_R | ETH_DMA_IT_RBU ) ) != 0 ) - { - /* Receive complete callback */ - HAL_ETH_RxCpltCallback( heth ); - } - /* Frame transmitted */ - if( ( dmasr & ( ETH_DMA_FLAG_T ) ) != 0 ) - { - /* Transfer complete callback */ - HAL_ETH_TxCpltCallback( heth ); - } - - /* ETH DMA Error */ - if( ( dmasr & ( ETH_DMA_FLAG_AIS ) ) != 0 ) - { - /* Ethernet Error callback */ - HAL_ETH_ErrorCallback( heth ); - } -} - -/** - * @brief Tx Transfer completed callbacks. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ - ( void ) heth; -} - -/** - * @brief Rx Transfer completed callbacks. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ - ( void ) heth; -} - -/** - * @brief Ethernet transfer error callbacks - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -__weak void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth) -{ - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_ETH_TxCpltCallback could be implemented in the user file - */ - ( void ) heth; -} - -/** - * @brief Reads a PHY register - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. - * This parameter can be one of the following values: - * PHY_BCR: Transceiver Basic Control Register, - * PHY_BSR: Transceiver Basic Status Register. - * More PHY register could be read depending on the used PHY - * @param RegValue: PHY register value - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) -{ -uint32_t tmpreg = 0uL; -uint32_t tickstart = 0uL; -HAL_StatusTypeDef xResult; - - /* Check parameters */ - assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); - - /* Check the ETH peripheral state */ - if( heth->State == HAL_ETH_STATE_BUSY_RD ) - { - xResult = HAL_BUSY; - } - else - { - __HAL_LOCK( heth ); - - /* Set ETH HAL State to BUSY_RD */ - heth->State = HAL_ETH_STATE_BUSY_RD; - - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg &= ~ETH_MACMIIAR_CR_MASK; - - /* Prepare the MII address register value */ - tmpreg |= ( ( ( uint32_t )heth->Init.PhyAddress << 11) & ETH_MACMIIAR_PA ); /* Set the PHY device address */ - tmpreg |= ( ( ( uint32_t )PHYReg << 6 ) & ETH_MACMIIAR_MR ); /* Set the PHY register address */ - tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ - tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg; - - /* Get tick */ - tickstart = HAL_GetTick(); - - /* Check for the Busy flag */ - while( 1 ) - { - tmpreg = heth->Instance->MACMIIAR; - - if( ( tmpreg & ETH_MACMIIAR_MB ) == 0uL ) - { - /* Get MACMIIDR value */ - *RegValue = ( uint32_t ) heth->Instance->MACMIIDR; - xResult = HAL_OK; - break; - } - /* Check for the Timeout */ - if( ( HAL_GetTick( ) - tickstart ) > PHY_READ_TO ) - { - xResult = HAL_TIMEOUT; - break; - } - - } - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - } - - /* Return function status */ - return xResult; -} - -/** - * @brief Writes to a PHY register. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. - * This parameter can be one of the following values: - * PHY_BCR: Transceiver Control Register. - * More PHY register could be written depending on the used PHY - * @param RegValue: the value to write - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue) -{ -uint32_t tmpreg = 0; -uint32_t tickstart = 0; -HAL_StatusTypeDef xResult; - - /* Check parameters */ - assert_param( IS_ETH_PHY_ADDRESS( heth->Init.PhyAddress ) ); - - /* Check the ETH peripheral state */ - if( heth->State == HAL_ETH_STATE_BUSY_WR ) - { - xResult = HAL_BUSY; - } - else - { - __HAL_LOCK( heth ); - - /* Set ETH HAL State to BUSY_WR */ - heth->State = HAL_ETH_STATE_BUSY_WR; - - /* Get the ETHERNET MACMIIAR value */ - tmpreg = heth->Instance->MACMIIAR; - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg &= ~ETH_MACMIIAR_CR_MASK; - - /* Prepare the MII register address value */ - tmpreg |= ( ( ( uint32_t ) heth->Init.PhyAddress << 11 ) & ETH_MACMIIAR_PA ); /* Set the PHY device address */ - tmpreg |= ( ( ( uint32_t ) PHYReg << 6 ) & ETH_MACMIIAR_MR ); /* Set the PHY register address */ - tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ - tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - - /* Give the value to the MII data register */ - heth->Instance->MACMIIDR = ( uint16_t ) RegValue; - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg; - - /* Get tick */ - tickstart = HAL_GetTick(); - - /* Check for the Busy flag */ - while( 1 ) - { - tmpreg = heth->Instance->MACMIIAR; - - if( ( tmpreg & ETH_MACMIIAR_MB ) == 0ul ) - { - xResult = HAL_OK; - break; - } - /* Check for the Timeout */ - if( ( HAL_GetTick( ) - tickstart ) > PHY_WRITE_TO ) - { - xResult = HAL_TIMEOUT; - break; - } - } - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - } - - /* Return function status */ - return xResult; -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group3 Peripheral Control functions - * @brief Peripheral Control functions - * -@verbatim - =============================================================================== - ##### Peripheral Control functions ##### - =============================================================================== - [..] This section provides functions allowing to: - (+) Enable MAC and DMA transmission and reception. - HAL_ETH_Start(); - (+) Disable MAC and DMA transmission and reception. - HAL_ETH_Stop(); - (+) Set the MAC configuration in runtime mode - HAL_ETH_ConfigMAC(); - (+) Set the DMA configuration in runtime mode - HAL_ETH_ConfigDMA(); - -@endverbatim - * @{ - */ - - /** - * @brief Enables Ethernet MAC and DMA reception/transmission - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Start( ETH_HandleTypeDef *heth ) -{ - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Enable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionEnable( heth ); - - /* Enable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionEnable( heth ); - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO( heth ); - - /* Start DMA transmission */ - ETH_DMATransmissionEnable( heth ); - - /* Start DMA reception */ - ETH_DMAReceptionEnable( heth ); - - /* Set the ETH state to READY*/ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Stop Ethernet MAC and DMA reception/transmission - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) -{ - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - - /* Stop DMA transmission */ - ETH_DMATransmissionDisable( heth ); - - /* Stop DMA reception */ - ETH_DMAReceptionDisable( heth ); - - /* Disable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionDisable( heth ); - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO( heth ); - - /* Disable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionDisable( heth ); - - /* Set the ETH state*/ - heth->State = HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -static void vRegisterDelay() -{ -uint32_t uxCount; - /* - * Regarding the HAL delay functions, I noticed that HAL delay is being used to workaround the - * "Successive write operations to the same register might not be fully taken into account" errata. - * The workaround requires a delay of four TX_CLK/RX_CLK clock cycles. For a 10 Mbit connection, - * these clocks are running at 2.5 MHz, so this delay would be at most 1.6 microseconds. - * 180 Mhz = 288 loops - * 168 Mhz = 269 loops - * 100 Mhz = 160 loops - * 84 Mhz = 134 loops - */ - #define WAIT_TIME_NS 1600uL /* 1.6 microseconds */ - #define CPU_MAX_FREQ SystemCoreClock /* 84, 100, 168 or 180 MHz */ - uint32_t NOP_COUNT = ( WAIT_TIME_NS * ( CPU_MAX_FREQ / 1000uL ) ) / 1000000uL; - for( uxCount = NOP_COUNT; uxCount > 0uL; uxCount-- ) - { - __NOP(); - } -} - -static void prvWriteMACFCR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->MACFCR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->MACFCR; - - vRegisterDelay(); - - heth->Instance->MACFCR = ulValue; -} - -static void prvWriteDMAOMR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->DMAOMR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->DMAOMR; - - vRegisterDelay(); - - heth->Instance->DMAOMR = ulValue; -} - -static void prvWriteMACCR( ETH_HandleTypeDef *heth, uint32_t ulValue) -{ - /* Enable the MAC transmission */ - heth->Instance->MACCR = ulValue; - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles. - Read it back, wait a ms and */ - ( void ) heth->Instance->MACCR; - - vRegisterDelay(); - - heth->Instance->MACCR = ulValue; -} - -/** - * @brief Set ETH MAC Configuration. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param macconf: MAC Configuration structure - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf) -{ - uint32_t tmpreg = 0uL; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State= HAL_ETH_STATE_BUSY; - - assert_param(IS_ETH_SPEED(heth->Init.Speed)); - assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); - - if (macconf != NULL) - { - /* Check the parameters */ - assert_param(IS_ETH_WATCHDOG(macconf->Watchdog)); - assert_param(IS_ETH_JABBER(macconf->Jabber)); - assert_param(IS_ETH_INTER_FRAME_GAP(macconf->InterFrameGap)); - assert_param(IS_ETH_CARRIER_SENSE(macconf->CarrierSense)); - assert_param(IS_ETH_RECEIVE_OWN(macconf->ReceiveOwn)); - assert_param(IS_ETH_LOOPBACK_MODE(macconf->LoopbackMode)); - assert_param(IS_ETH_CHECKSUM_OFFLOAD(macconf->ChecksumOffload)); - assert_param(IS_ETH_RETRY_TRANSMISSION(macconf->RetryTransmission)); - assert_param(IS_ETH_AUTOMATIC_PADCRC_STRIP(macconf->AutomaticPadCRCStrip)); - assert_param(IS_ETH_BACKOFF_LIMIT(macconf->BackOffLimit)); - assert_param(IS_ETH_DEFERRAL_CHECK(macconf->DeferralCheck)); - assert_param(IS_ETH_RECEIVE_ALL(macconf->ReceiveAll)); - assert_param(IS_ETH_SOURCE_ADDR_FILTER(macconf->SourceAddrFilter)); - assert_param(IS_ETH_CONTROL_FRAMES(macconf->PassControlFrames)); - assert_param(IS_ETH_BROADCAST_FRAMES_RECEPTION(macconf->BroadcastFramesReception)); - assert_param(IS_ETH_DESTINATION_ADDR_FILTER(macconf->DestinationAddrFilter)); - assert_param(IS_ETH_PROMISCUOUS_MODE(macconf->PromiscuousMode)); - assert_param(IS_ETH_MULTICAST_FRAMES_FILTER(macconf->MulticastFramesFilter)); - assert_param(IS_ETH_UNICAST_FRAMES_FILTER(macconf->UnicastFramesFilter)); - assert_param(IS_ETH_PAUSE_TIME(macconf->PauseTime)); - assert_param(IS_ETH_ZEROQUANTA_PAUSE(macconf->ZeroQuantaPause)); - assert_param(IS_ETH_PAUSE_LOW_THRESHOLD(macconf->PauseLowThreshold)); - assert_param(IS_ETH_UNICAST_PAUSE_FRAME_DETECT(macconf->UnicastPauseFrameDetect)); - assert_param(IS_ETH_RECEIVE_FLOWCONTROL(macconf->ReceiveFlowControl)); - assert_param(IS_ETH_TRANSMIT_FLOWCONTROL(macconf->TransmitFlowControl)); - assert_param(IS_ETH_VLAN_TAG_COMPARISON(macconf->VLANTagComparison)); - assert_param(IS_ETH_VLAN_TAG_IDENTIFIER(macconf->VLANTagIdentifier)); - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg &= ETH_MACCR_CLEAR_MASK; - - tmpreg |= (uint32_t)( - macconf->Watchdog | - macconf->Jabber | - macconf->InterFrameGap | - macconf->CarrierSense | - heth->Init.Speed | - macconf->ReceiveOwn | - macconf->LoopbackMode | - heth->Init.DuplexMode | - macconf->ChecksumOffload | - macconf->RetryTransmission | - macconf->AutomaticPadCRCStrip | - macconf->BackOffLimit | - macconf->DeferralCheck); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACFFR Configuration --------------------*/ - /* Write to ETHERNET MACFFR */ - heth->Instance->MACFFR = (uint32_t)( - macconf->ReceiveAll | - macconf->SourceAddrFilter | - macconf->PassControlFrames | - macconf->BroadcastFramesReception | - macconf->DestinationAddrFilter | - macconf->PromiscuousMode | - macconf->MulticastFramesFilter | - macconf->UnicastFramesFilter); - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACFFR; - vRegisterDelay(); - heth->Instance->MACFFR = tmpreg; - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ - /* Write to ETHERNET MACHTHR */ - heth->Instance->MACHTHR = (uint32_t)macconf->HashTableHigh; - - /* Write to ETHERNET MACHTLR */ - heth->Instance->MACHTLR = (uint32_t)macconf->HashTableLow; - /*----------------------- ETHERNET MACFCR Configuration --------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg = heth->Instance->MACFCR; - /* Clear xx bits */ - tmpreg &= ETH_MACFCR_CLEAR_MASK; - - tmpreg |= (uint32_t)(( - macconf->PauseTime << 16) | - macconf->ZeroQuantaPause | - macconf->PauseLowThreshold | - macconf->UnicastPauseFrameDetect | - macconf->ReceiveFlowControl | - macconf->TransmitFlowControl); - - /* Write to ETHERNET MACFCR */ - prvWriteMACFCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ - heth->Instance->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | - macconf->VLANTagIdentifier); - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACVLANTR; - vRegisterDelay(); - heth->Instance->MACVLANTR = tmpreg; - } - else /* macconf == NULL : here we just configure Speed and Duplex mode */ - { - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - - /* Clear FES and DM bits */ - tmpreg &= ~( ( uint32_t ) 0x00004800uL ); - - tmpreg |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - } - - /* Set the ETH state to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @brief Sets ETH DMA Configuration. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param dmaconf: DMA Configuration structure - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_DMAInitTypeDef *dmaconf) -{ - uint32_t tmpreg = 0uL; - - /* Process Locked */ - __HAL_LOCK( heth ); - - /* Set the ETH peripheral state to BUSY */ - heth->State= HAL_ETH_STATE_BUSY; - - /* Check parameters */ - assert_param(IS_ETH_DROP_TCPIP_CHECKSUM_FRAME(dmaconf->DropTCPIPChecksumErrorFrame)); - assert_param(IS_ETH_RECEIVE_STORE_FORWARD(dmaconf->ReceiveStoreForward)); - assert_param(IS_ETH_FLUSH_RECEIVE_FRAME(dmaconf->FlushReceivedFrame)); - assert_param(IS_ETH_TRANSMIT_STORE_FORWARD(dmaconf->TransmitStoreForward)); - assert_param(IS_ETH_TRANSMIT_THRESHOLD_CONTROL(dmaconf->TransmitThresholdControl)); - assert_param(IS_ETH_FORWARD_ERROR_FRAMES(dmaconf->ForwardErrorFrames)); - assert_param(IS_ETH_FORWARD_UNDERSIZED_GOOD_FRAMES(dmaconf->ForwardUndersizedGoodFrames)); - assert_param(IS_ETH_RECEIVE_THRESHOLD_CONTROL(dmaconf->ReceiveThresholdControl)); - assert_param(IS_ETH_SECOND_FRAME_OPERATE(dmaconf->SecondFrameOperate)); - assert_param(IS_ETH_ADDRESS_ALIGNED_BEATS(dmaconf->AddressAlignedBeats)); - assert_param(IS_ETH_FIXED_BURST(dmaconf->FixedBurst)); - assert_param(IS_ETH_RXDMA_BURST_LENGTH(dmaconf->RxDMABurstLength)); - assert_param(IS_ETH_TXDMA_BURST_LENGTH(dmaconf->TxDMABurstLength)); - assert_param(IS_ETH_ENHANCED_DESCRIPTOR_FORMAT(dmaconf->EnhancedDescriptorFormat)); - assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(dmaconf->DescriptorSkipLength)); - assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(dmaconf->DMAArbitration)); - - /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ - /* Get the ETHERNET DMAOMR value */ - tmpreg = heth->Instance->DMAOMR; - /* Clear xx bits */ - tmpreg &= ETH_DMAOMR_CLEAR_MASK; - - tmpreg |= (uint32_t)( - dmaconf->DropTCPIPChecksumErrorFrame | - dmaconf->ReceiveStoreForward | - dmaconf->FlushReceivedFrame | - dmaconf->TransmitStoreForward | - dmaconf->TransmitThresholdControl | - dmaconf->ForwardErrorFrames | - dmaconf->ForwardUndersizedGoodFrames | - dmaconf->ReceiveThresholdControl | - dmaconf->SecondFrameOperate); - - /* Write to ETHERNET DMAOMR */ - prvWriteDMAOMR( heth, tmpreg ); - - /*----------------------- ETHERNET DMABMR Configuration --------------------*/ - heth->Instance->DMABMR = (uint32_t)(dmaconf->AddressAlignedBeats | - dmaconf->FixedBurst | - dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - dmaconf->TxDMABurstLength | - dmaconf->EnhancedDescriptorFormat | - (dmaconf->DescriptorSkipLength << 2) | - dmaconf->DMAArbitration | - ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->DMABMR; - vRegisterDelay(); - heth->Instance->DMABMR = tmpreg; - - /* Set the ETH state to Ready */ - heth->State= HAL_ETH_STATE_READY; - - /* Process Unlocked */ - __HAL_UNLOCK( heth ); - - /* Return function status */ - return HAL_OK; -} - -/** - * @} - */ - -/** @defgroup ETH_Exported_Functions_Group4 Peripheral State functions - * @brief Peripheral State functions - * - @verbatim - =============================================================================== - ##### Peripheral State functions ##### - =============================================================================== - [..] - This subsection permits to get in run-time the status of the peripheral - and the data flow. - (+) Get the ETH handle state: - HAL_ETH_GetState(); - - - @endverbatim - * @{ - */ - -/** - * @brief Return the ETH HAL state - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL state - */ -HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth) -{ - /* Return ETH state */ - return heth->State; -} - -/** - * @} - */ - -/** - * @} - */ - -/** @addtogroup ETH_Private_Functions - * @{ - */ - -/** - * @brief Configures Ethernet MAC and DMA with default parameters. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param err: Ethernet Init error - * @retval HAL status - */ -static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err) -{ - ETH_MACInitTypeDef macinit; - ETH_DMAInitTypeDef dmainit; - uint32_t tmpreg = 0uL; - - if (err != ETH_SUCCESS) /* Auto-negotiation failed */ - { - /* Set Ethernet duplex mode to Full-duplex */ - heth->Init.DuplexMode = ETH_MODE_FULLDUPLEX; - - /* Set Ethernet speed to 100M */ - heth->Init.Speed = ETH_SPEED_100M; - } - - /* Ethernet MAC default initialization **************************************/ - macinit.Watchdog = ETH_WATCHDOG_ENABLE; - macinit.Jabber = ETH_JABBER_ENABLE; - macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT; - macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE; - macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE; - macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE; - if(heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE; - } - else - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE; - } - macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE; - macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE; - macinit.BackOffLimit = ETH_BACKOFFLIMIT_10; - macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE; - macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE; - macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE; - macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL; - macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE; - macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL; - macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE; - macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT; - macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT; - macinit.HashTableHigh = 0x0uL; - macinit.HashTableLow = 0x0uL; - macinit.PauseTime = 0x0uL; - macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE; - macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4; - macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE; - macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE; - macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE; - macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT; - macinit.VLANTagIdentifier = 0x0uL; - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg = heth->Instance->MACCR; - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg &= ETH_MACCR_CLEAR_MASK; - /* Set the WD bit according to ETH Watchdog value */ - /* Set the JD: bit according to ETH Jabber value */ - /* Set the IFG bit according to ETH InterFrameGap value */ - /* Set the DCRS bit according to ETH CarrierSense value */ - /* Set the FES bit according to ETH Speed value */ - /* Set the DO bit according to ETH ReceiveOwn value */ - /* Set the LM bit according to ETH LoopbackMode value */ - /* Set the DM bit according to ETH Mode value */ - /* Set the IPCO bit according to ETH ChecksumOffload value */ - /* Set the DR bit according to ETH RetryTransmission value */ - /* Set the ACS bit according to ETH AutomaticPadCRCStrip value */ - /* Set the BL bit according to ETH BackOffLimit value */ - /* Set the DC bit according to ETH DeferralCheck value */ - tmpreg |= (uint32_t)(macinit.Watchdog | - macinit.Jabber | - macinit.InterFrameGap | - macinit.CarrierSense | - heth->Init.Speed | - macinit.ReceiveOwn | - macinit.LoopbackMode | - heth->Init.DuplexMode | - macinit.ChecksumOffload | - macinit.RetryTransmission | - macinit.AutomaticPadCRCStrip | - macinit.BackOffLimit | - macinit.DeferralCheck); - - /* Write to ETHERNET MACCR */ - prvWriteMACCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACFFR Configuration --------------------*/ - /* Set the RA bit according to ETH ReceiveAll value */ - /* Set the SAF and SAIF bits according to ETH SourceAddrFilter value */ - /* Set the PCF bit according to ETH PassControlFrames value */ - /* Set the DBF bit according to ETH BroadcastFramesReception value */ - /* Set the DAIF bit according to ETH DestinationAddrFilter value */ - /* Set the PR bit according to ETH PromiscuousMode value */ - /* Set the PM, HMC and HPF bits according to ETH MulticastFramesFilter value */ - /* Set the HUC and HPF bits according to ETH UnicastFramesFilter value */ - /* Write to ETHERNET MACFFR */ - heth->Instance->MACFFR = (uint32_t)(macinit.ReceiveAll | - macinit.SourceAddrFilter | - macinit.PassControlFrames | - macinit.BroadcastFramesReception | - macinit.DestinationAddrFilter | - macinit.PromiscuousMode | - macinit.MulticastFramesFilter | - macinit.UnicastFramesFilter); - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACFFR; - vRegisterDelay(); - heth->Instance->MACFFR = tmpreg; - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/ - /* Write to ETHERNET MACHTHR */ - heth->Instance->MACHTHR = (uint32_t)macinit.HashTableHigh; - - /* Write to ETHERNET MACHTLR */ - heth->Instance->MACHTLR = (uint32_t)macinit.HashTableLow; - /*----------------------- ETHERNET MACFCR Configuration -------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg = heth->Instance->MACFCR; - /* Clear xx bits */ - tmpreg &= ETH_MACFCR_CLEAR_MASK; - - /* Set the PT bit according to ETH PauseTime value */ - /* Set the DZPQ bit according to ETH ZeroQuantaPause value */ - /* Set the PLT bit according to ETH PauseLowThreshold value */ - /* Set the UP bit according to ETH UnicastPauseFrameDetect value */ - /* Set the RFE bit according to ETH ReceiveFlowControl value */ - /* Set the TFE bit according to ETH TransmitFlowControl value */ - tmpreg |= (uint32_t)((macinit.PauseTime << 16) | - macinit.ZeroQuantaPause | - macinit.PauseLowThreshold | - macinit.UnicastPauseFrameDetect | - macinit.ReceiveFlowControl | - macinit.TransmitFlowControl); - - /* Write to ETHERNET MACFCR */ - prvWriteMACFCR( heth, tmpreg ); - - /*----------------------- ETHERNET MACVLANTR Configuration ----------------*/ - /* Set the ETV bit according to ETH VLANTagComparison value */ - /* Set the VL bit according to ETH VLANTagIdentifier value */ - heth->Instance->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | - macinit.VLANTagIdentifier); - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->MACVLANTR; - vRegisterDelay(); - heth->Instance->MACVLANTR = tmpreg; - - /* Ethernet DMA default initialization ************************************/ - dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE; - dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE; - dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE; - dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE; - dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES; - dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE; - dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE; - dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES; - dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE; - dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE; - dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE; - dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; - dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; - dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE; - dmainit.DescriptorSkipLength = 0x0uL; - dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1; - - /* Get the ETHERNET DMAOMR value */ - tmpreg = heth->Instance->DMAOMR; - /* Clear xx bits */ - tmpreg &= ETH_DMAOMR_CLEAR_MASK; - - /* Set the DT bit according to ETH DropTCPIPChecksumErrorFrame value */ - /* Set the RSF bit according to ETH ReceiveStoreForward value */ - /* Set the DFF bit according to ETH FlushReceivedFrame value */ - /* Set the TSF bit according to ETH TransmitStoreForward value */ - /* Set the TTC bit according to ETH TransmitThresholdControl value */ - /* Set the FEF bit according to ETH ForwardErrorFrames value */ - /* Set the FUF bit according to ETH ForwardUndersizedGoodFrames value */ - /* Set the RTC bit according to ETH ReceiveThresholdControl value */ - /* Set the OSF bit according to ETH SecondFrameOperate value */ - tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | - dmainit.ReceiveStoreForward | - dmainit.FlushReceivedFrame | - dmainit.TransmitStoreForward | - dmainit.TransmitThresholdControl | - dmainit.ForwardErrorFrames | - dmainit.ForwardUndersizedGoodFrames | - dmainit.ReceiveThresholdControl | - dmainit.SecondFrameOperate); - - /* Write to ETHERNET DMAOMR */ - prvWriteDMAOMR( heth, tmpreg ); - - /*----------------------- ETHERNET DMABMR Configuration ------------------*/ - /* Set the AAL bit according to ETH AddressAlignedBeats value */ - /* Set the FB bit according to ETH FixedBurst value */ - /* Set the RPBL and 4*PBL bits according to ETH RxDMABurstLength value */ - /* Set the PBL and 4*PBL bits according to ETH TxDMABurstLength value */ - /* Set the Enhanced DMA descriptors bit according to ETH EnhancedDescriptorFormat value*/ - /* Set the DSL bit according to ETH DesciptorSkipLength value */ - /* Set the PR and DA bits according to ETH DMAArbitration value */ - heth->Instance->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | - dmainit.FixedBurst | - dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - dmainit.TxDMABurstLength | - dmainit.EnhancedDescriptorFormat | - (dmainit.DescriptorSkipLength << 2) | - dmainit.DMAArbitration | - ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg = heth->Instance->DMABMR; - vRegisterDelay(); - heth->Instance->DMABMR = tmpreg; - - if(heth->Init.RxMode == ETH_RXINTERRUPT_MODE) - { - /* Enable the Ethernet Rx Interrupt */ - __HAL_ETH_DMA_ENABLE_IT(( heth ), ETH_DMA_IT_NIS | ETH_DMA_IT_R); - } - - /* Initialize MAC address in ethernet MAC */ - ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr); -} - -/** - * @brief Configures the selected MAC address. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @param MacAddr: The MAC address to configure - * This parameter can be one of the following values: - * @arg ETH_MAC_Address0: MAC Address0 - * @arg ETH_MAC_Address1: MAC Address1 - * @arg ETH_MAC_Address2: MAC Address2 - * @arg ETH_MAC_Address3: MAC Address3 - * @param Addr: Pointer to MAC address buffer data (6 bytes) - * @retval HAL status - */ -static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr) -{ - uint32_t tmpreg; - - ( void ) heth; - - /* Check the parameters */ - assert_param( IS_ETH_MAC_ADDRESS0123( MacAddr ) ); - - /* Calculate the selected MAC address high register */ - /* Register ETH_MACA0HR: Bit 31 MO: Always 1. */ - tmpreg = 0x80000000uL | ( ( uint32_t )Addr[ 5 ] << 8) | (uint32_t)Addr[ 4 ]; - /* Load the selected MAC address high register */ - ( * ( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + MacAddr ) ) ) = tmpreg; - /* Calculate the selected MAC address low register */ - tmpreg = ( ( uint32_t )Addr[ 3 ] << 24 ) | ( ( uint32_t )Addr[ 2 ] << 16 ) | ( ( uint32_t )Addr[ 1 ] << 8 ) | Addr[ 0 ]; - - /* Load the selected MAC address low register */ - ( * ( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + MacAddr ) ) ) = tmpreg; -} - -/** - * @brief Enables the MAC transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = heth->Instance->MACCR | ETH_MACCR_TE; - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Disables the MAC transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth) -{ - uint32_t tmpreg = heth->Instance->MACCR & ~( ETH_MACCR_TE ); - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Enables the MAC reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth) -{ - __IO uint32_t tmpreg = heth->Instance->MACCR | ETH_MACCR_RE; - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Disables the MAC reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth) -{ - __IO uint32_t tmpreg = heth->Instance->MACCR & ~( ETH_MACCR_RE ); - - prvWriteMACCR( heth, tmpreg ); -} - -/** - * @brief Enables the DMA transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth) -{ - /* Enable the DMA transmission */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_ST; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Disables the DMA transmission. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth) -{ - /* Disable the DMA transmission */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR & ~( ETH_DMAOMR_ST ); - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Enables the DMA reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth) -{ - /* Enable the DMA reception */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_SR; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Disables the DMA reception. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth) -{ - /* Disable the DMA reception */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR & ~( ETH_DMAOMR_SR ); - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @brief Clears the ETHERNET transmit FIFO. - * @param heth: pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth) -{ - /* Set the Flush Transmit FIFO bit */ - __IO uint32_t tmpreg = heth->Instance->DMAOMR | ETH_DMAOMR_FTF; - - prvWriteDMAOMR( heth, tmpreg ); -} - -/** - * @} - */ -#endif /* stm_is_F2 != 0 || stm_is_F4 != 0 || stm_is_F7 */ - -#endif /* HAL_ETH_MODULE_ENABLED */ -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.h deleted file mode 100644 index f91122594..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.h +++ /dev/null @@ -1,2262 +0,0 @@ -/** - ****************************************************************************** - * @file stm32fxx_hal_eth.h - * @author MCD Application Team - * @version V1.2.2 - * @date 14-April-2017 - * @brief Header file of ETH HAL module. - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2017 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32Fxx_HAL_ETH_H -#define __STM32Fxx_HAL_ETH_H - -/* make sure that the original ETH headers files won't be included after this. */ -#define __STM32F2xx_HAL_ETH_H -#define __STM32F4xx_HAL_ETH_H -#define __STM32F7xx_HAL_ETH_H - -#if defined(STM32F7xx) - #include "stm32f7xx_hal_def.h" -#elif defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - #include "stm32f4xx_hal_def.h" -#elif defined(STM32F2xx) - #include "stm32f2xx_hal_def.h" -#endif - -#ifdef __cplusplus - extern "C" { -#endif - -/** @addtogroup STM32Fxx_HAL_Driver - * @{ - */ - -/** @addtogroup ETH - * @{ - */ - -/** @addtogroup ETH_Private_Macros - * @{ - */ -#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x20) -#define IS_ETH_AUTONEGOTIATION(CMD) (((CMD) == ETH_AUTONEGOTIATION_ENABLE) || \ - ((CMD) == ETH_AUTONEGOTIATION_DISABLE)) -#define IS_ETH_SPEED(SPEED) (((SPEED) == ETH_SPEED_10M) || \ - ((SPEED) == ETH_SPEED_100M)) -#define IS_ETH_DUPLEX_MODE(MODE) (((MODE) == ETH_MODE_FULLDUPLEX) || \ - ((MODE) == ETH_MODE_HALFDUPLEX)) -#define IS_ETH_DUPLEX_MODE(MODE) (((MODE) == ETH_MODE_FULLDUPLEX) || \ - ((MODE) == ETH_MODE_HALFDUPLEX)) -#define IS_ETH_RX_MODE(MODE) (((MODE) == ETH_RXPOLLING_MODE) || \ - ((MODE) == ETH_RXINTERRUPT_MODE)) -#define IS_ETH_RX_MODE(MODE) (((MODE) == ETH_RXPOLLING_MODE) || \ - ((MODE) == ETH_RXINTERRUPT_MODE)) -#define IS_ETH_RX_MODE(MODE) (((MODE) == ETH_RXPOLLING_MODE) || \ - ((MODE) == ETH_RXINTERRUPT_MODE)) -#define IS_ETH_CHECKSUM_MODE(MODE) (((MODE) == ETH_CHECKSUM_BY_HARDWARE) || \ - ((MODE) == ETH_CHECKSUM_BY_SOFTWARE)) -#define IS_ETH_MEDIA_INTERFACE(MODE) (((MODE) == ETH_MEDIA_INTERFACE_MII) || \ - ((MODE) == ETH_MEDIA_INTERFACE_RMII)) -#define IS_ETH_WATCHDOG(CMD) (((CMD) == ETH_WATCHDOG_ENABLE) || \ - ((CMD) == ETH_WATCHDOG_DISABLE)) -#define IS_ETH_JABBER(CMD) (((CMD) == ETH_JABBER_ENABLE) || \ - ((CMD) == ETH_JABBER_DISABLE)) -#define IS_ETH_INTER_FRAME_GAP(GAP) (((GAP) == ETH_INTERFRAMEGAP_96BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_88BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_80BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_72BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_64BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_56BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_48BIT) || \ - ((GAP) == ETH_INTERFRAMEGAP_40BIT)) -#define IS_ETH_CARRIER_SENSE(CMD) (((CMD) == ETH_CARRIERSENCE_ENABLE) || \ - ((CMD) == ETH_CARRIERSENCE_DISABLE)) -#define IS_ETH_RECEIVE_OWN(CMD) (((CMD) == ETH_RECEIVEOWN_ENABLE) || \ - ((CMD) == ETH_RECEIVEOWN_DISABLE)) -#define IS_ETH_LOOPBACK_MODE(CMD) (((CMD) == ETH_LOOPBACKMODE_ENABLE) || \ - ((CMD) == ETH_LOOPBACKMODE_DISABLE)) -#define IS_ETH_CHECKSUM_OFFLOAD(CMD) (((CMD) == ETH_CHECKSUMOFFLAOD_ENABLE) || \ - ((CMD) == ETH_CHECKSUMOFFLAOD_DISABLE)) -#define IS_ETH_RETRY_TRANSMISSION(CMD) (((CMD) == ETH_RETRYTRANSMISSION_ENABLE) || \ - ((CMD) == ETH_RETRYTRANSMISSION_DISABLE)) -#define IS_ETH_AUTOMATIC_PADCRC_STRIP(CMD) (((CMD) == ETH_AUTOMATICPADCRCSTRIP_ENABLE) || \ - ((CMD) == ETH_AUTOMATICPADCRCSTRIP_DISABLE)) -#define IS_ETH_BACKOFF_LIMIT(LIMIT) (((LIMIT) == ETH_BACKOFFLIMIT_10) || \ - ((LIMIT) == ETH_BACKOFFLIMIT_8) || \ - ((LIMIT) == ETH_BACKOFFLIMIT_4) || \ - ((LIMIT) == ETH_BACKOFFLIMIT_1)) -#define IS_ETH_DEFERRAL_CHECK(CMD) (((CMD) == ETH_DEFFERRALCHECK_ENABLE) || \ - ((CMD) == ETH_DEFFERRALCHECK_DISABLE)) -#define IS_ETH_RECEIVE_ALL(CMD) (((CMD) == ETH_RECEIVEALL_ENABLE) || \ - ((CMD) == ETH_RECEIVEAll_DISABLE)) -#define IS_ETH_SOURCE_ADDR_FILTER(CMD) (((CMD) == ETH_SOURCEADDRFILTER_NORMAL_ENABLE) || \ - ((CMD) == ETH_SOURCEADDRFILTER_INVERSE_ENABLE) || \ - ((CMD) == ETH_SOURCEADDRFILTER_DISABLE)) -#define IS_ETH_CONTROL_FRAMES(PASS) (((PASS) == ETH_PASSCONTROLFRAMES_BLOCKALL) || \ - ((PASS) == ETH_PASSCONTROLFRAMES_FORWARDALL) || \ - ((PASS) == ETH_PASSCONTROLFRAMES_FORWARDPASSEDADDRFILTER)) -#define IS_ETH_BROADCAST_FRAMES_RECEPTION(CMD) (((CMD) == ETH_BROADCASTFRAMESRECEPTION_ENABLE) || \ - ((CMD) == ETH_BROADCASTFRAMESRECEPTION_DISABLE)) -#define IS_ETH_DESTINATION_ADDR_FILTER(FILTER) (((FILTER) == ETH_DESTINATIONADDRFILTER_NORMAL) || \ - ((FILTER) == ETH_DESTINATIONADDRFILTER_INVERSE)) -#define IS_ETH_PROMISCUOUS_MODE(CMD) (((CMD) == ETH_PROMISCUOUS_MODE_ENABLE) || \ - ((CMD) == ETH_PROMISCUOUS_MODE_DISABLE)) -#define IS_ETH_MULTICAST_FRAMES_FILTER(FILTER) (((FILTER) == ETH_MULTICASTFRAMESFILTER_PERFECTHASHTABLE) || \ - ((FILTER) == ETH_MULTICASTFRAMESFILTER_HASHTABLE) || \ - ((FILTER) == ETH_MULTICASTFRAMESFILTER_PERFECT) || \ - ((FILTER) == ETH_MULTICASTFRAMESFILTER_NONE)) -#define IS_ETH_UNICAST_FRAMES_FILTER(FILTER) (((FILTER) == ETH_UNICASTFRAMESFILTER_PERFECTHASHTABLE) || \ - ((FILTER) == ETH_UNICASTFRAMESFILTER_HASHTABLE) || \ - ((FILTER) == ETH_UNICASTFRAMESFILTER_PERFECT)) -#define IS_ETH_PAUSE_TIME(TIME) ((TIME) <= 0xFFFF) -#define IS_ETH_ZEROQUANTA_PAUSE(CMD) (((CMD) == ETH_ZEROQUANTAPAUSE_ENABLE) || \ - ((CMD) == ETH_ZEROQUANTAPAUSE_DISABLE)) -#define IS_ETH_PAUSE_LOW_THRESHOLD(THRESHOLD) (((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS4) || \ - ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS28) || \ - ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS144) || \ - ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS256)) -#define IS_ETH_UNICAST_PAUSE_FRAME_DETECT(CMD) (((CMD) == ETH_UNICASTPAUSEFRAMEDETECT_ENABLE) || \ - ((CMD) == ETH_UNICASTPAUSEFRAMEDETECT_DISABLE)) -#define IS_ETH_RECEIVE_FLOWCONTROL(CMD) (((CMD) == ETH_RECEIVEFLOWCONTROL_ENABLE) || \ - ((CMD) == ETH_RECEIVEFLOWCONTROL_DISABLE)) -#define IS_ETH_TRANSMIT_FLOWCONTROL(CMD) (((CMD) == ETH_TRANSMITFLOWCONTROL_ENABLE) || \ - ((CMD) == ETH_TRANSMITFLOWCONTROL_DISABLE)) -#define IS_ETH_VLAN_TAG_COMPARISON(COMPARISON) (((COMPARISON) == ETH_VLANTAGCOMPARISON_12BIT) || \ - ((COMPARISON) == ETH_VLANTAGCOMPARISON_16BIT)) -#define IS_ETH_VLAN_TAG_IDENTIFIER(IDENTIFIER) ((IDENTIFIER) <= 0xFFFF) -#define IS_ETH_MAC_ADDRESS0123(ADDRESS) (((ADDRESS) == ETH_MAC_ADDRESS0) || \ - ((ADDRESS) == ETH_MAC_ADDRESS1) || \ - ((ADDRESS) == ETH_MAC_ADDRESS2) || \ - ((ADDRESS) == ETH_MAC_ADDRESS3)) -#define IS_ETH_MAC_ADDRESS123(ADDRESS) (((ADDRESS) == ETH_MAC_ADDRESS1) || \ - ((ADDRESS) == ETH_MAC_ADDRESS2) || \ - ((ADDRESS) == ETH_MAC_ADDRESS3)) -#define IS_ETH_MAC_ADDRESS_FILTER(FILTER) (((FILTER) == ETH_MAC_ADDRESSFILTER_SA) || \ - ((FILTER) == ETH_MAC_ADDRESSFILTER_DA)) -#define IS_ETH_MAC_ADDRESS_MASK(MASK) (((MASK) == ETH_MAC_ADDRESSMASK_BYTE6) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE5) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE4) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE3) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE2) || \ - ((MASK) == ETH_MAC_ADDRESSMASK_BYTE1)) -#define IS_ETH_DROP_TCPIP_CHECKSUM_FRAME(CMD) (((CMD) == ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE) || \ - ((CMD) == ETH_DROPTCPIPCHECKSUMERRORFRAME_DISABLE)) -#define IS_ETH_RECEIVE_STORE_FORWARD(CMD) (((CMD) == ETH_RECEIVESTOREFORWARD_ENABLE) || \ - ((CMD) == ETH_RECEIVESTOREFORWARD_DISABLE)) -#define IS_ETH_FLUSH_RECEIVE_FRAME(CMD) (((CMD) == ETH_FLUSHRECEIVEDFRAME_ENABLE) || \ - ((CMD) == ETH_FLUSHRECEIVEDFRAME_DISABLE)) -#define IS_ETH_TRANSMIT_STORE_FORWARD(CMD) (((CMD) == ETH_TRANSMITSTOREFORWARD_ENABLE) || \ - ((CMD) == ETH_TRANSMITSTOREFORWARD_DISABLE)) -#define IS_ETH_TRANSMIT_THRESHOLD_CONTROL(THRESHOLD) (((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_64BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_128BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_192BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_256BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_40BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_32BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_24BYTES) || \ - ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_16BYTES)) -#define IS_ETH_FORWARD_ERROR_FRAMES(CMD) (((CMD) == ETH_FORWARDERRORFRAMES_ENABLE) || \ - ((CMD) == ETH_FORWARDERRORFRAMES_DISABLE)) -#define IS_ETH_FORWARD_UNDERSIZED_GOOD_FRAMES(CMD) (((CMD) == ETH_FORWARDUNDERSIZEDGOODFRAMES_ENABLE) || \ - ((CMD) == ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE)) -#define IS_ETH_RECEIVE_THRESHOLD_CONTROL(THRESHOLD) (((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES) || \ - ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_32BYTES) || \ - ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_96BYTES) || \ - ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_128BYTES)) -#define IS_ETH_SECOND_FRAME_OPERATE(CMD) (((CMD) == ETH_SECONDFRAMEOPERARTE_ENABLE) || \ - ((CMD) == ETH_SECONDFRAMEOPERARTE_DISABLE)) -#define IS_ETH_ADDRESS_ALIGNED_BEATS(CMD) (((CMD) == ETH_ADDRESSALIGNEDBEATS_ENABLE) || \ - ((CMD) == ETH_ADDRESSALIGNEDBEATS_DISABLE)) -#define IS_ETH_FIXED_BURST(CMD) (((CMD) == ETH_FIXEDBURST_ENABLE) || \ - ((CMD) == ETH_FIXEDBURST_DISABLE)) -#define IS_ETH_RXDMA_BURST_LENGTH(LENGTH) (((LENGTH) == ETH_RXDMABURSTLENGTH_1BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_2BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_8BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_16BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_32BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_4BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_8BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_16BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_32BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_64BEAT) || \ - ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_128BEAT)) -#define IS_ETH_TXDMA_BURST_LENGTH(LENGTH) (((LENGTH) == ETH_TXDMABURSTLENGTH_1BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_2BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_8BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_16BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_32BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_4BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_8BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_16BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_32BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_64BEAT) || \ - ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_128BEAT)) -#define IS_ETH_DMA_DESC_SKIP_LENGTH(LENGTH) ((LENGTH) <= 0x1F) -#define IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(RATIO) (((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1) || \ - ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_2_1) || \ - ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_3_1) || \ - ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_4_1) || \ - ((RATIO) == ETH_DMAARBITRATION_RXPRIORTX)) -#define IS_ETH_DMATXDESC_GET_FLAG(FLAG) (((FLAG) == ETH_DMATXDESC_OWN) || \ - ((FLAG) == ETH_DMATXDESC_IC) || \ - ((FLAG) == ETH_DMATXDESC_LS) || \ - ((FLAG) == ETH_DMATXDESC_FS) || \ - ((FLAG) == ETH_DMATXDESC_DC) || \ - ((FLAG) == ETH_DMATXDESC_DP) || \ - ((FLAG) == ETH_DMATXDESC_TTSE) || \ - ((FLAG) == ETH_DMATXDESC_TER) || \ - ((FLAG) == ETH_DMATXDESC_TCH) || \ - ((FLAG) == ETH_DMATXDESC_TTSS) || \ - ((FLAG) == ETH_DMATXDESC_IHE) || \ - ((FLAG) == ETH_DMATXDESC_ES) || \ - ((FLAG) == ETH_DMATXDESC_JT) || \ - ((FLAG) == ETH_DMATXDESC_FF) || \ - ((FLAG) == ETH_DMATXDESC_PCE) || \ - ((FLAG) == ETH_DMATXDESC_LCA) || \ - ((FLAG) == ETH_DMATXDESC_NC) || \ - ((FLAG) == ETH_DMATXDESC_LCO) || \ - ((FLAG) == ETH_DMATXDESC_EC) || \ - ((FLAG) == ETH_DMATXDESC_VF) || \ - ((FLAG) == ETH_DMATXDESC_CC) || \ - ((FLAG) == ETH_DMATXDESC_ED) || \ - ((FLAG) == ETH_DMATXDESC_UF) || \ - ((FLAG) == ETH_DMATXDESC_DB)) -#define IS_ETH_DMA_TXDESC_SEGMENT(SEGMENT) (((SEGMENT) == ETH_DMATXDESC_LASTSEGMENTS) || \ - ((SEGMENT) == ETH_DMATXDESC_FIRSTSEGMENT)) -#define IS_ETH_DMA_TXDESC_CHECKSUM(CHECKSUM) (((CHECKSUM) == ETH_DMATXDESC_CHECKSUMBYPASS) || \ - ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMIPV4HEADER) || \ - ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT) || \ - ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL)) -#define IS_ETH_DMATXDESC_BUFFER_SIZE(SIZE) ((SIZE) <= 0x1FFF) -#define IS_ETH_DMARXDESC_GET_FLAG(FLAG) (((FLAG) == ETH_DMARXDESC_OWN) || \ - ((FLAG) == ETH_DMARXDESC_AFM) || \ - ((FLAG) == ETH_DMARXDESC_ES) || \ - ((FLAG) == ETH_DMARXDESC_DE) || \ - ((FLAG) == ETH_DMARXDESC_SAF) || \ - ((FLAG) == ETH_DMARXDESC_LE) || \ - ((FLAG) == ETH_DMARXDESC_OE) || \ - ((FLAG) == ETH_DMARXDESC_VLAN) || \ - ((FLAG) == ETH_DMARXDESC_FS) || \ - ((FLAG) == ETH_DMARXDESC_LS) || \ - ((FLAG) == ETH_DMARXDESC_IPV4HCE) || \ - ((FLAG) == ETH_DMARXDESC_LC) || \ - ((FLAG) == ETH_DMARXDESC_FT) || \ - ((FLAG) == ETH_DMARXDESC_RWT) || \ - ((FLAG) == ETH_DMARXDESC_RE) || \ - ((FLAG) == ETH_DMARXDESC_DBE) || \ - ((FLAG) == ETH_DMARXDESC_CE) || \ - ((FLAG) == ETH_DMARXDESC_MAMPCE)) -#define IS_ETH_DMA_RXDESC_BUFFER(BUFFER) (((BUFFER) == ETH_DMARXDESC_BUFFER1) || \ - ((BUFFER) == ETH_DMARXDESC_BUFFER2)) -#define IS_ETH_PMT_GET_FLAG(FLAG) (((FLAG) == ETH_PMT_FLAG_WUFR) || \ - ((FLAG) == ETH_PMT_FLAG_MPR)) -#define IS_ETH_DMA_FLAG(FLAG) ((((FLAG) & (uint32_t)0xC7FE1800) == 0x00) && ((FLAG) != 0x00)) -#define IS_ETH_DMA_GET_FLAG(FLAG) (((FLAG) == ETH_DMA_FLAG_TST) || ((FLAG) == ETH_DMA_FLAG_PMT) || \ - ((FLAG) == ETH_DMA_FLAG_MMC) || ((FLAG) == ETH_DMA_FLAG_DATATRANSFERERROR) || \ - ((FLAG) == ETH_DMA_FLAG_READWRITEERROR) || ((FLAG) == ETH_DMA_FLAG_ACCESSERROR) || \ - ((FLAG) == ETH_DMA_FLAG_NIS) || ((FLAG) == ETH_DMA_FLAG_AIS) || \ - ((FLAG) == ETH_DMA_FLAG_ER) || ((FLAG) == ETH_DMA_FLAG_FBE) || \ - ((FLAG) == ETH_DMA_FLAG_ET) || ((FLAG) == ETH_DMA_FLAG_RWT) || \ - ((FLAG) == ETH_DMA_FLAG_RPS) || ((FLAG) == ETH_DMA_FLAG_RBU) || \ - ((FLAG) == ETH_DMA_FLAG_R) || ((FLAG) == ETH_DMA_FLAG_TU) || \ - ((FLAG) == ETH_DMA_FLAG_RO) || ((FLAG) == ETH_DMA_FLAG_TJT) || \ - ((FLAG) == ETH_DMA_FLAG_TBU) || ((FLAG) == ETH_DMA_FLAG_TPS) || \ - ((FLAG) == ETH_DMA_FLAG_T)) -#define IS_ETH_MAC_IT(IT) ((((IT) & (uint32_t)0xFFFFFDF1) == 0x00) && ((IT) != 0x00)) -#define IS_ETH_MAC_GET_IT(IT) (((IT) == ETH_MAC_IT_TST) || ((IT) == ETH_MAC_IT_MMCT) || \ - ((IT) == ETH_MAC_IT_MMCR) || ((IT) == ETH_MAC_IT_MMC) || \ - ((IT) == ETH_MAC_IT_PMT)) -#define IS_ETH_MAC_GET_FLAG(FLAG) (((FLAG) == ETH_MAC_FLAG_TST) || ((FLAG) == ETH_MAC_FLAG_MMCT) || \ - ((FLAG) == ETH_MAC_FLAG_MMCR) || ((FLAG) == ETH_MAC_FLAG_MMC) || \ - ((FLAG) == ETH_MAC_FLAG_PMT)) -#define IS_ETH_DMA_IT(IT) ((((IT) & (uint32_t)0xC7FE1800) == 0x00) && ((IT) != 0x00)) -#define IS_ETH_DMA_GET_IT(IT) (((IT) == ETH_DMA_IT_TST) || ((IT) == ETH_DMA_IT_PMT) || \ - ((IT) == ETH_DMA_IT_MMC) || ((IT) == ETH_DMA_IT_NIS) || \ - ((IT) == ETH_DMA_IT_AIS) || ((IT) == ETH_DMA_IT_ER) || \ - ((IT) == ETH_DMA_IT_FBE) || ((IT) == ETH_DMA_IT_ET) || \ - ((IT) == ETH_DMA_IT_RWT) || ((IT) == ETH_DMA_IT_RPS) || \ - ((IT) == ETH_DMA_IT_RBU) || ((IT) == ETH_DMA_IT_R) || \ - ((IT) == ETH_DMA_IT_TU) || ((IT) == ETH_DMA_IT_RO) || \ - ((IT) == ETH_DMA_IT_TJT) || ((IT) == ETH_DMA_IT_TBU) || \ - ((IT) == ETH_DMA_IT_TPS) || ((IT) == ETH_DMA_IT_T)) -#define IS_ETH_DMA_GET_OVERFLOW(OVERFLOW) (((OVERFLOW) == ETH_DMA_OVERFLOW_RXFIFOCOUNTER) || \ - ((OVERFLOW) == ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER)) -#define IS_ETH_MMC_IT(IT) (((((IT) & (uint32_t)0xFFDF3FFF) == 0x00) || (((IT) & (uint32_t)0xEFFDFF9F) == 0x00)) && \ - ((IT) != 0x00)) -#define IS_ETH_MMC_GET_IT(IT) (((IT) == ETH_MMC_IT_TGF) || ((IT) == ETH_MMC_IT_TGFMSC) || \ - ((IT) == ETH_MMC_IT_TGFSC) || ((IT) == ETH_MMC_IT_RGUF) || \ - ((IT) == ETH_MMC_IT_RFAE) || ((IT) == ETH_MMC_IT_RFCE)) -#define IS_ETH_ENHANCED_DESCRIPTOR_FORMAT(CMD) (((CMD) == ETH_DMAENHANCEDDESCRIPTOR_ENABLE) || \ - ((CMD) == ETH_DMAENHANCEDDESCRIPTOR_DISABLE)) - - -/** - * @} - */ - -/** @addtogroup ETH_Private_Defines - * @{ - */ -/* Delay to wait when writing to some Ethernet registers */ -#define ETH_REG_WRITE_DELAY ((uint32_t)0x00000001U) - -/* Ethernet Errors */ -#define ETH_SUCCESS ((uint32_t)0U) -#define ETH_ERROR ((uint32_t)1U) - -/* Ethernet DMA Tx descriptors Collision Count Shift */ -#define ETH_DMATXDESC_COLLISION_COUNTSHIFT ((uint32_t)3U) - -/* Ethernet DMA Tx descriptors Buffer2 Size Shift */ -#define ETH_DMATXDESC_BUFFER2_SIZESHIFT ((uint32_t)16U) - -/* Ethernet DMA Rx descriptors Frame Length Shift */ -#define ETH_DMARXDESC_FRAME_LENGTHSHIFT ((uint32_t)16U) - -/* Ethernet DMA Rx descriptors Buffer2 Size Shift */ -#define ETH_DMARXDESC_BUFFER2_SIZESHIFT ((uint32_t)16U) - -/* Ethernet DMA Rx descriptors Frame length Shift */ -#define ETH_DMARXDESC_FRAMELENGTHSHIFT ((uint32_t)16U) - -/* Ethernet MAC address offsets */ -#define ETH_MAC_ADDR_HBASE (uint32_t)(ETH_MAC_BASE + (uint32_t)0x40U) /* Ethernet MAC address high offset */ -#define ETH_MAC_ADDR_LBASE (uint32_t)(ETH_MAC_BASE + (uint32_t)0x44U) /* Ethernet MAC address low offset */ - -/* Ethernet MACMIIAR register Mask */ -#define ETH_MACMIIAR_CR_MASK ((uint32_t)0xFFFFFFE3U) - -/* Ethernet MACCR register Mask */ -#define ETH_MACCR_CLEAR_MASK ((uint32_t)0xFF20810FU) - -/* Ethernet MACFCR register Mask */ -#define ETH_MACFCR_CLEAR_MASK ((uint32_t)0x0000FF41U) - -/* Ethernet DMAOMR register Mask */ -#define ETH_DMAOMR_CLEAR_MASK ((uint32_t)0xF8DE3F23U) - -/* Ethernet Remote Wake-up frame register length */ -#define ETH_WAKEUP_REGISTER_LENGTH 8U - -/* Ethernet Missed frames counter Shift */ -#define ETH_DMA_RX_OVERFLOW_MISSEDFRAMES_COUNTERSHIFT 17U - /** - * @} - */ - -#ifdef _lint - #ifdef __IO - #undef __IO - #endif - #define __IO - - #ifdef ETH_TypeDef - #undef ETH_TypeDef - #endif - #define ETH_TypeDef void - - #ifdef HAL_LockTypeDef - #undef HAL_LockTypeDef - #endif - #define HAL_LockTypeDef unsigned - - #ifdef ETH_RX_BUF_SIZE - #undef ETH_RX_BUF_SIZE - #endif - #define ETH_RX_BUF_SIZE 1536 - - #ifdef ETH_TX_BUF_SIZE - #undef ETH_TX_BUF_SIZE - #endif - #define ETH_TX_BUF_SIZE 1536 -#endif - -/* Exported types ------------------------------------------------------------*/ -/** @defgroup ETH_Exported_Types ETH Exported Types - * @{ - */ - -/** - * @brief HAL State structures definition - */ -typedef enum -{ - HAL_ETH_STATE_RESET = 0x00U, /*!< Peripheral not yet Initialized or disabled */ - HAL_ETH_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */ - HAL_ETH_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */ - HAL_ETH_STATE_BUSY_TX = 0x12U, /*!< Data Transmission process is ongoing */ - HAL_ETH_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing */ - HAL_ETH_STATE_BUSY_TX_RX = 0x32U, /*!< Data Transmission and Reception process is ongoing */ - HAL_ETH_STATE_BUSY_WR = 0x42U, /*!< Write process is ongoing */ - HAL_ETH_STATE_BUSY_RD = 0x82U, /*!< Read process is ongoing */ - HAL_ETH_STATE_TIMEOUT = 0x03U, /*!< Timeout state */ - HAL_ETH_STATE_ERROR = 0x04U /*!< Reception process is ongoing */ -}HAL_ETH_StateTypeDef; - -/** - * @brief ETH Init Structure definition - */ - -typedef struct -{ - uint32_t AutoNegotiation; /*!< Selects or not the AutoNegotiation mode for the external PHY - The AutoNegotiation allows an automatic setting of the Speed (10/100Mbps) - and the mode (half/full-duplex). - This parameter can be a value of @ref ETH_AutoNegotiation */ - - uint32_t Speed; /*!< Sets the Ethernet speed: 10/100 Mbps. - This parameter can be a value of @ref ETH_Speed */ - - uint32_t DuplexMode; /*!< Selects the MAC duplex mode: Half-Duplex or Full-Duplex mode - This parameter can be a value of @ref ETH_Duplex_Mode */ - - uint16_t PhyAddress; /*!< Ethernet PHY address. - This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ - - uint8_t *MACAddr; /*!< MAC Address of used Hardware: must be pointer on an array of 6 bytes */ - - uint32_t RxMode; /*!< Selects the Ethernet Rx mode: Polling mode, Interrupt mode. - This parameter can be a value of @ref ETH_Rx_Mode */ - - uint32_t ChecksumMode; /*!< Selects if the checksum is check by hardware or by software. - This parameter can be a value of @ref ETH_Checksum_Mode */ - - uint32_t MediaInterface ; /*!< Selects the media-independent interface or the reduced media-independent interface. - This parameter can be a value of @ref ETH_Media_Interface */ - -} ETH_InitTypeDef; - - - /** - * @brief ETH MAC Configuration Structure definition - */ - -typedef struct -{ - uint32_t Watchdog; /*!< Selects or not the Watchdog timer - When enabled, the MAC allows no more then 2048 bytes to be received. - When disabled, the MAC can receive up to 16384 bytes. - This parameter can be a value of @ref ETH_Watchdog */ - - uint32_t Jabber; /*!< Selects or not Jabber timer - When enabled, the MAC allows no more then 2048 bytes to be sent. - When disabled, the MAC can send up to 16384 bytes. - This parameter can be a value of @ref ETH_Jabber */ - - uint32_t InterFrameGap; /*!< Selects the minimum IFG between frames during transmission. - This parameter can be a value of @ref ETH_Inter_Frame_Gap */ - - uint32_t CarrierSense; /*!< Selects or not the Carrier Sense. - This parameter can be a value of @ref ETH_Carrier_Sense */ - - uint32_t ReceiveOwn; /*!< Selects or not the ReceiveOwn, - ReceiveOwn allows the reception of frames when the TX_EN signal is asserted - in Half-Duplex mode. - This parameter can be a value of @ref ETH_Receive_Own */ - - uint32_t LoopbackMode; /*!< Selects or not the internal MAC MII Loopback mode. - This parameter can be a value of @ref ETH_Loop_Back_Mode */ - - uint32_t ChecksumOffload; /*!< Selects or not the IPv4 checksum checking for received frame payloads' TCP/UDP/ICMP headers. - This parameter can be a value of @ref ETH_Checksum_Offload */ - - uint32_t RetryTransmission; /*!< Selects or not the MAC attempt retries transmission, based on the settings of BL, - when a collision occurs (Half-Duplex mode). - This parameter can be a value of @ref ETH_Retry_Transmission */ - - uint32_t AutomaticPadCRCStrip; /*!< Selects or not the Automatic MAC Pad/CRC Stripping. - This parameter can be a value of @ref ETH_Automatic_Pad_CRC_Strip */ - - uint32_t BackOffLimit; /*!< Selects the BackOff limit value. - This parameter can be a value of @ref ETH_Back_Off_Limit */ - - uint32_t DeferralCheck; /*!< Selects or not the deferral check function (Half-Duplex mode). - This parameter can be a value of @ref ETH_Deferral_Check */ - - uint32_t ReceiveAll; /*!< Selects or not all frames reception by the MAC (No filtering). - This parameter can be a value of @ref ETH_Receive_All */ - - uint32_t SourceAddrFilter; /*!< Selects the Source Address Filter mode. - This parameter can be a value of @ref ETH_Source_Addr_Filter */ - - uint32_t PassControlFrames; /*!< Sets the forwarding mode of the control frames (including unicast and multicast PAUSE frames) - This parameter can be a value of @ref ETH_Pass_Control_Frames */ - - uint32_t BroadcastFramesReception; /*!< Selects or not the reception of Broadcast Frames. - This parameter can be a value of @ref ETH_Broadcast_Frames_Reception */ - - uint32_t DestinationAddrFilter; /*!< Sets the destination filter mode for both unicast and multicast frames. - This parameter can be a value of @ref ETH_Destination_Addr_Filter */ - - uint32_t PromiscuousMode; /*!< Selects or not the Promiscuous Mode - This parameter can be a value of @ref ETH_Promiscuous_Mode */ - - uint32_t MulticastFramesFilter; /*!< Selects the Multicast Frames filter mode: None/HashTableFilter/PerfectFilter/PerfectHashTableFilter. - This parameter can be a value of @ref ETH_Multicast_Frames_Filter */ - - uint32_t UnicastFramesFilter; /*!< Selects the Unicast Frames filter mode: HashTableFilter/PerfectFilter/PerfectHashTableFilter. - This parameter can be a value of @ref ETH_Unicast_Frames_Filter */ - - uint32_t HashTableHigh; /*!< This field holds the higher 32 bits of Hash table. - This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ - - uint32_t HashTableLow; /*!< This field holds the lower 32 bits of Hash table. - This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ - - uint32_t PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control frame. - This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFF */ - - uint32_t ZeroQuantaPause; /*!< Selects or not the automatic generation of Zero-Quanta Pause Control frames. - This parameter can be a value of @ref ETH_Zero_Quanta_Pause */ - - uint32_t PauseLowThreshold; /*!< This field configures the threshold of the PAUSE to be checked for - automatic retransmission of PAUSE Frame. - This parameter can be a value of @ref ETH_Pause_Low_Threshold */ - - uint32_t UnicastPauseFrameDetect; /*!< Selects or not the MAC detection of the Pause frames (with MAC Address0 - unicast address and unique multicast address). - This parameter can be a value of @ref ETH_Unicast_Pause_Frame_Detect */ - - uint32_t ReceiveFlowControl; /*!< Enables or disables the MAC to decode the received Pause frame and - disable its transmitter for a specified time (Pause Time) - This parameter can be a value of @ref ETH_Receive_Flow_Control */ - - uint32_t TransmitFlowControl; /*!< Enables or disables the MAC to transmit Pause frames (Full-Duplex mode) - or the MAC back-pressure operation (Half-Duplex mode) - This parameter can be a value of @ref ETH_Transmit_Flow_Control */ - - uint32_t VLANTagComparison; /*!< Selects the 12-bit VLAN identifier or the complete 16-bit VLAN tag for - comparison and filtering. - This parameter can be a value of @ref ETH_VLAN_Tag_Comparison */ - - uint32_t VLANTagIdentifier; /*!< Holds the VLAN tag identifier for receive frames */ - -} ETH_MACInitTypeDef; - - -/** - * @brief ETH DMA Configuration Structure definition - */ - -typedef struct -{ - uint32_t DropTCPIPChecksumErrorFrame; /*!< Selects or not the Dropping of TCP/IP Checksum Error Frames. - This parameter can be a value of @ref ETH_Drop_TCP_IP_Checksum_Error_Frame */ - - uint32_t ReceiveStoreForward; /*!< Enables or disables the Receive store and forward mode. - This parameter can be a value of @ref ETH_Receive_Store_Forward */ - - uint32_t FlushReceivedFrame; /*!< Enables or disables the flushing of received frames. - This parameter can be a value of @ref ETH_Flush_Received_Frame */ - - uint32_t TransmitStoreForward; /*!< Enables or disables Transmit store and forward mode. - This parameter can be a value of @ref ETH_Transmit_Store_Forward */ - - uint32_t TransmitThresholdControl; /*!< Selects or not the Transmit Threshold Control. - This parameter can be a value of @ref ETH_Transmit_Threshold_Control */ - - uint32_t ForwardErrorFrames; /*!< Selects or not the forward to the DMA of erroneous frames. - This parameter can be a value of @ref ETH_Forward_Error_Frames */ - - uint32_t ForwardUndersizedGoodFrames; /*!< Enables or disables the Rx FIFO to forward Undersized frames (frames with no Error - and length less than 64 bytes) including pad-bytes and CRC) - This parameter can be a value of @ref ETH_Forward_Undersized_Good_Frames */ - - uint32_t ReceiveThresholdControl; /*!< Selects the threshold level of the Receive FIFO. - This parameter can be a value of @ref ETH_Receive_Threshold_Control */ - - uint32_t SecondFrameOperate; /*!< Selects or not the Operate on second frame mode, which allows the DMA to process a second - frame of Transmit data even before obtaining the status for the first frame. - This parameter can be a value of @ref ETH_Second_Frame_Operate */ - - uint32_t AddressAlignedBeats; /*!< Enables or disables the Address Aligned Beats. - This parameter can be a value of @ref ETH_Address_Aligned_Beats */ - - uint32_t FixedBurst; /*!< Enables or disables the AHB Master interface fixed burst transfers. - This parameter can be a value of @ref ETH_Fixed_Burst */ - - uint32_t RxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Rx DMA transaction. - This parameter can be a value of @ref ETH_Rx_DMA_Burst_Length */ - - uint32_t TxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Tx DMA transaction. - This parameter can be a value of @ref ETH_Tx_DMA_Burst_Length */ - - uint32_t EnhancedDescriptorFormat; /*!< Enables the enhanced descriptor format. - This parameter can be a value of @ref ETH_DMA_Enhanced_descriptor_format */ - - uint32_t DescriptorSkipLength; /*!< Specifies the number of word to skip between two unchained descriptors (Ring mode) - This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ - - uint32_t DMAArbitration; /*!< Selects the DMA Tx/Rx arbitration. - This parameter can be a value of @ref ETH_DMA_Arbitration */ -} ETH_DMAInitTypeDef; - - -/** - * @brief ETH DMA Descriptors data structure definition - */ - -typedef struct -{ - __IO uint32_t Status; /*!< Status */ - - uint32_t ControlBufferSize; /*!< Control and Buffer1, Buffer2 lengths */ - - uint32_t Buffer1Addr; /*!< Buffer1 address pointer */ - - uint32_t Buffer2NextDescAddr; /*!< Buffer2 or next descriptor address pointer */ - - /*!< Enhanced Ethernet DMA PTP Descriptors */ - uint32_t ExtendedStatus; /*!< Extended status for PTP receive descriptor */ - - uint32_t Reserved1; /*!< Reserved */ - - uint32_t TimeStampLow; /*!< Time Stamp Low value for transmit and receive */ - - uint32_t TimeStampHigh; /*!< Time Stamp High value for transmit and receive */ - -} ETH_DMADescTypeDef; - - -/** - * @brief Received Frame Informations structure definition - */ -typedef struct -{ - ETH_DMADescTypeDef *FSRxDesc; /*!< First Segment Rx Desc */ - - ETH_DMADescTypeDef *LSRxDesc; /*!< Last Segment Rx Desc */ - - uint32_t SegCount; /*!< Segment count */ - - uint32_t length; /*!< Frame length */ - - uint32_t buffer; /*!< Frame buffer */ - -} ETH_DMARxFrameInfos; - - -/** - * @brief ETH Handle Structure definition - */ - -typedef struct -{ - ETH_TypeDef *Instance; /*!< Register base address */ - - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - - uint32_t LinkStatus; /*!< Ethernet link status */ - - ETH_DMADescTypeDef *RxDesc; /*!< Rx descriptor to Get */ - - ETH_DMADescTypeDef *TxDesc; /*!< Tx descriptor to Set */ - - ETH_DMARxFrameInfos RxFrameInfos; /*!< last Rx frame infos */ - - __IO HAL_ETH_StateTypeDef State; /*!< ETH communication state */ - - HAL_LockTypeDef Lock; /*!< ETH Lock */ - -} ETH_HandleTypeDef; - - /** - * @} - */ - -/* Exported constants --------------------------------------------------------*/ -/** @defgroup ETH_Exported_Constants ETH Exported Constants - * @{ - */ - -/** @defgroup ETH_Buffers_setting ETH Buffers setting - * @{ - */ -#define ETH_MAX_PACKET_SIZE ((uint32_t)1536U) /*!< ETH_HEADER + ETH_EXTRA + ETH_VLAN_TAG + ETH_MAX_ETH_PAYLOAD + ETH_CRC */ -#define ETH_HEADER ((uint32_t)14U) /*!< 6 byte Dest addr, 6 byte Src addr, 2 byte length/type */ -#define ETH_CRC ((uint32_t)4U) /*!< Ethernet CRC */ -#define ETH_EXTRA ((uint32_t)2U) /*!< Extra bytes in some cases */ -#define ETH_VLAN_TAG ((uint32_t)4U) /*!< optional 802.1q VLAN Tag */ -#define ETH_MIN_ETH_PAYLOAD ((uint32_t)46U) /*!< Minimum Ethernet payload size */ -#define ETH_MAX_ETH_PAYLOAD ((uint32_t)1500U) /*!< Maximum Ethernet payload size */ -#define ETH_JUMBO_FRAME_PAYLOAD ((uint32_t)9000U) /*!< Jumbo frame payload size */ - - /* Ethernet driver receive buffers are organized in a chained linked-list, when - an Ethernet packet is received, the Rx-DMA will transfer the packet from RxFIFO - to the driver receive buffers memory. - - Depending on the size of the received Ethernet packet and the size of - each Ethernet driver receive buffer, the received packet can take one or more - Ethernet driver receive buffer. - - In below are defined the size of one Ethernet driver receive buffer ETH_RX_BUF_SIZE - and the total count of the driver receive buffers ETH_RXBUFNB. - - The configured value for ETH_RX_BUF_SIZE and ETH_RXBUFNB are only provided as - example, they can be reconfigured in the application layer to fit the application - needs */ - -/* Here we configure each Ethernet driver receive buffer to fit the Max size Ethernet - packet */ -#ifndef ETH_RX_BUF_SIZE - #error please define ETH_RX_BUF_SIZE - #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE -#endif - -/* 5 Ethernet driver receive buffers are used (in a chained linked list)*/ -#ifndef ETH_RXBUFNB - #define ETH_RXBUFNB ((uint32_t)5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */ -#endif - - - /* Ethernet driver transmit buffers are organized in a chained linked-list, when - an Ethernet packet is transmitted, Tx-DMA will transfer the packet from the - driver transmit buffers memory to the TxFIFO. - - Depending on the size of the Ethernet packet to be transmitted and the size of - each Ethernet driver transmit buffer, the packet to be transmitted can take - one or more Ethernet driver transmit buffer. - - In below are defined the size of one Ethernet driver transmit buffer ETH_TX_BUF_SIZE - and the total count of the driver transmit buffers ETH_TXBUFNB. - - The configured value for ETH_TX_BUF_SIZE and ETH_TXBUFNB are only provided as - example, they can be reconfigured in the application layer to fit the application - needs */ - -/* Here we configure each Ethernet driver transmit buffer to fit the Max size Ethernet - packet */ -#ifndef ETH_TX_BUF_SIZE - #error please define ETH_TX_BUF_SIZE - #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE -#endif - -/* 5 Ethernet driver transmit buffers are used (in a chained linked list)*/ -#ifndef ETH_TXBUFNB - #define ETH_TXBUFNB ((uint32_t)5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */ -#endif - - /** - * @} - */ - -/** @defgroup ETH_DMA_TX_Descriptor ETH DMA TX Descriptor - * @{ - */ - -/* - DMA Tx Descriptor - ----------------------------------------------------------------------------------------------- - TDES0 | OWN(31) | CTRL[30:26] | Reserved[25:24] | CTRL[23:20] | Reserved[19:17] | Status[16:0] | - ----------------------------------------------------------------------------------------------- - TDES1 | Reserved[31:29] | Buffer2 ByteCount[28:16] | Reserved[15:13] | Buffer1 ByteCount[12:0] | - ----------------------------------------------------------------------------------------------- - TDES2 | Buffer1 Address [31:0] | - ----------------------------------------------------------------------------------------------- - TDES3 | Buffer2 Address [31:0] / Next Descriptor Address [31:0] | - ----------------------------------------------------------------------------------------------- -*/ - -/** - * @brief Bit definition of TDES0 register: DMA Tx descriptor status register - */ -#define ETH_DMATXDESC_OWN ((uint32_t)0x80000000U) /*!< OWN bit: descriptor is owned by DMA engine */ -#define ETH_DMATXDESC_IC ((uint32_t)0x40000000U) /*!< Interrupt on Completion */ -#define ETH_DMATXDESC_LS ((uint32_t)0x20000000U) /*!< Last Segment */ -#define ETH_DMATXDESC_FS ((uint32_t)0x10000000U) /*!< First Segment */ -#define ETH_DMATXDESC_DC ((uint32_t)0x08000000U) /*!< Disable CRC */ -#define ETH_DMATXDESC_DP ((uint32_t)0x04000000U) /*!< Disable Padding */ -#define ETH_DMATXDESC_TTSE ((uint32_t)0x02000000U) /*!< Transmit Time Stamp Enable */ -#define ETH_DMATXDESC_CIC ((uint32_t)0x00C00000U) /*!< Checksum Insertion Control: 4 cases */ -#define ETH_DMATXDESC_CIC_BYPASS ((uint32_t)0x00000000U) /*!< Do Nothing: Checksum Engine is bypassed */ -#define ETH_DMATXDESC_CIC_IPV4HEADER ((uint32_t)0x00400000U) /*!< IPV4 header Checksum Insertion */ -#define ETH_DMATXDESC_CIC_TCPUDPICMP_SEGMENT ((uint32_t)0x00800000U) /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */ -#define ETH_DMATXDESC_CIC_TCPUDPICMP_FULL ((uint32_t)0x00C00000U) /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */ -#define ETH_DMATXDESC_TER ((uint32_t)0x00200000U) /*!< Transmit End of Ring */ -#define ETH_DMATXDESC_TCH ((uint32_t)0x00100000U) /*!< Second Address Chained */ -#define ETH_DMATXDESC_TTSS ((uint32_t)0x00020000U) /*!< Tx Time Stamp Status */ -#define ETH_DMATXDESC_IHE ((uint32_t)0x00010000U) /*!< IP Header Error */ -#define ETH_DMATXDESC_ES ((uint32_t)0x00008000U) /*!< Error summary: OR of the following bits: UE || ED || EC || LCO || NC || LCA || FF || JT */ -#define ETH_DMATXDESC_JT ((uint32_t)0x00004000U) /*!< Jabber Timeout */ -#define ETH_DMATXDESC_FF ((uint32_t)0x00002000U) /*!< Frame Flushed: DMA/MTL flushed the frame due to SW flush */ -#define ETH_DMATXDESC_PCE ((uint32_t)0x00001000U) /*!< Payload Checksum Error */ -#define ETH_DMATXDESC_LCA ((uint32_t)0x00000800U) /*!< Loss of Carrier: carrier lost during transmission */ -#define ETH_DMATXDESC_NC ((uint32_t)0x00000400U) /*!< No Carrier: no carrier signal from the transceiver */ -#define ETH_DMATXDESC_LCO ((uint32_t)0x00000200U) /*!< Late Collision: transmission aborted due to collision */ -#define ETH_DMATXDESC_EC ((uint32_t)0x00000100U) /*!< Excessive Collision: transmission aborted after 16 collisions */ -#define ETH_DMATXDESC_VF ((uint32_t)0x00000080U) /*!< VLAN Frame */ -#define ETH_DMATXDESC_CC ((uint32_t)0x00000078U) /*!< Collision Count */ -#define ETH_DMATXDESC_ED ((uint32_t)0x00000004U) /*!< Excessive Deferral */ -#define ETH_DMATXDESC_UF ((uint32_t)0x00000002U) /*!< Underflow Error: late data arrival from the memory */ -#define ETH_DMATXDESC_DB ((uint32_t)0x00000001U) /*!< Deferred Bit */ - -/** - * @brief Bit definition of TDES1 register - */ -#define ETH_DMATXDESC_TBS2 ((uint32_t)0x1FFF0000U) /*!< Transmit Buffer2 Size */ -#define ETH_DMATXDESC_TBS1 ((uint32_t)0x00001FFFU) /*!< Transmit Buffer1 Size */ - -/** - * @brief Bit definition of TDES2 register - */ -#define ETH_DMATXDESC_B1AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer1 Address Pointer */ - -/** - * @brief Bit definition of TDES3 register - */ -#define ETH_DMATXDESC_B2AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer2 Address Pointer */ - - /*--------------------------------------------------------------------------------------------- - TDES6 | Transmit Time Stamp Low [31:0] | - ----------------------------------------------------------------------------------------------- - TDES7 | Transmit Time Stamp High [31:0] | - ----------------------------------------------------------------------------------------------*/ - -/* Bit definition of TDES6 register */ - #define ETH_DMAPTPTXDESC_TTSL ((uint32_t)0xFFFFFFFFU) /* Transmit Time Stamp Low */ - -/* Bit definition of TDES7 register */ - #define ETH_DMAPTPTXDESC_TTSH ((uint32_t)0xFFFFFFFFU) /* Transmit Time Stamp High */ - -/** - * @} - */ -/** @defgroup ETH_DMA_RX_Descriptor ETH DMA RX Descriptor - * @{ - */ - -/* - DMA Rx Descriptor - -------------------------------------------------------------------------------------------------------------------- - RDES0 | OWN(31) | Status [30:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES1 | CTRL(31) | Reserved[30:29] | Buffer2 ByteCount[28:16] | CTRL[15:14] | Reserved(13) | Buffer1 ByteCount[12:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES2 | Buffer1 Address [31:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES3 | Buffer2 Address [31:0] / Next Descriptor Address [31:0] | - --------------------------------------------------------------------------------------------------------------------- -*/ - -/** - * @brief Bit definition of RDES0 register: DMA Rx descriptor status register - */ -#define ETH_DMARXDESC_OWN ((uint32_t)0x80000000U) /*!< OWN bit: descriptor is owned by DMA engine */ -#define ETH_DMARXDESC_AFM ((uint32_t)0x40000000U) /*!< DA Filter Fail for the rx frame */ -#define ETH_DMARXDESC_FL ((uint32_t)0x3FFF0000U) /*!< Receive descriptor frame length */ -#define ETH_DMARXDESC_ES ((uint32_t)0x00008000U) /*!< Error summary: OR of the following bits: DE || OE || IPC || LC || RWT || RE || CE */ -#define ETH_DMARXDESC_DE ((uint32_t)0x00004000U) /*!< Descriptor error: no more descriptors for receive frame */ -#define ETH_DMARXDESC_SAF ((uint32_t)0x00002000U) /*!< SA Filter Fail for the received frame */ -#define ETH_DMARXDESC_LE ((uint32_t)0x00001000U) /*!< Frame size not matching with length field */ -#define ETH_DMARXDESC_OE ((uint32_t)0x00000800U) /*!< Overflow Error: Frame was damaged due to buffer overflow */ -#define ETH_DMARXDESC_VLAN ((uint32_t)0x00000400U) /*!< VLAN Tag: received frame is a VLAN frame */ -#define ETH_DMARXDESC_FS ((uint32_t)0x00000200U) /*!< First descriptor of the frame */ -#define ETH_DMARXDESC_LS ((uint32_t)0x00000100U) /*!< Last descriptor of the frame */ -#define ETH_DMARXDESC_IPV4HCE ((uint32_t)0x00000080U) /*!< IPC Checksum Error: Rx Ipv4 header checksum error */ -#define ETH_DMARXDESC_LC ((uint32_t)0x00000040U) /*!< Late collision occurred during reception */ -#define ETH_DMARXDESC_FT ((uint32_t)0x00000020U) /*!< Frame type - Ethernet, otherwise 802.3 */ -#define ETH_DMARXDESC_RWT ((uint32_t)0x00000010U) /*!< Receive Watchdog Timeout: watchdog timer expired during reception */ -#define ETH_DMARXDESC_RE ((uint32_t)0x00000008U) /*!< Receive error: error reported by MII interface */ -#define ETH_DMARXDESC_DBE ((uint32_t)0x00000004U) /*!< Dribble bit error: frame contains non int multiple of 8 bits */ -#define ETH_DMARXDESC_CE ((uint32_t)0x00000002U) /*!< CRC error */ -#define ETH_DMARXDESC_MAMPCE ((uint32_t)0x00000001U) /*!< Rx MAC Address/Payload Checksum Error: Rx MAC address matched/ Rx Payload Checksum Error */ - -/** - * @brief Bit definition of RDES1 register - */ -#define ETH_DMARXDESC_DIC ((uint32_t)0x80000000U) /*!< Disable Interrupt on Completion */ -#define ETH_DMARXDESC_RBS2 ((uint32_t)0x1FFF0000U) /*!< Receive Buffer2 Size */ -#define ETH_DMARXDESC_RER ((uint32_t)0x00008000U) /*!< Receive End of Ring */ -#define ETH_DMARXDESC_RCH ((uint32_t)0x00004000U) /*!< Second Address Chained */ -#define ETH_DMARXDESC_RBS1 ((uint32_t)0x00001FFFU) /*!< Receive Buffer1 Size */ - -/** - * @brief Bit definition of RDES2 register - */ -#define ETH_DMARXDESC_B1AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer1 Address Pointer */ - -/** - * @brief Bit definition of RDES3 register - */ -#define ETH_DMARXDESC_B2AP ((uint32_t)0xFFFFFFFFU) /*!< Buffer2 Address Pointer */ - -/*--------------------------------------------------------------------------------------------------------------------- - RDES4 | Reserved[31:15] | Extended Status [14:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES5 | Reserved[31:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES6 | Receive Time Stamp Low [31:0] | - --------------------------------------------------------------------------------------------------------------------- - RDES7 | Receive Time Stamp High [31:0] | - --------------------------------------------------------------------------------------------------------------------*/ - -/* Bit definition of RDES4 register */ -#define ETH_DMAPTPRXDESC_PTPV ((uint32_t)0x00002000U) /* PTP Version */ -#define ETH_DMAPTPRXDESC_PTPFT ((uint32_t)0x00001000U) /* PTP Frame Type */ -#define ETH_DMAPTPRXDESC_PTPMT ((uint32_t)0x00000F00U) /* PTP Message Type */ - #define ETH_DMAPTPRXDESC_PTPMT_SYNC ((uint32_t)0x00000100U) /* SYNC message (all clock types) */ - #define ETH_DMAPTPRXDESC_PTPMT_FOLLOWUP ((uint32_t)0x00000200U) /* FollowUp message (all clock types) */ - #define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ ((uint32_t)0x00000300U) /* DelayReq message (all clock types) */ - #define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP ((uint32_t)0x00000400U) /* DelayResp message (all clock types) */ - #define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE ((uint32_t)0x00000500U) /* PdelayReq message (peer-to-peer transparent clock) or Announce message (Ordinary or Boundary clock) */ - #define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESP_MANAG ((uint32_t)0x00000600U) /* PdelayResp message (peer-to-peer transparent clock) or Management message (Ordinary or Boundary clock) */ - #define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESPFOLLOWUP_SIGNAL ((uint32_t)0x00000700U) /* PdelayRespFollowUp message (peer-to-peer transparent clock) or Signaling message (Ordinary or Boundary clock) */ -#define ETH_DMAPTPRXDESC_IPV6PR ((uint32_t)0x00000080U) /* IPv6 Packet Received */ -#define ETH_DMAPTPRXDESC_IPV4PR ((uint32_t)0x00000040U) /* IPv4 Packet Received */ -#define ETH_DMAPTPRXDESC_IPCB ((uint32_t)0x00000020U) /* IP Checksum Bypassed */ -#define ETH_DMAPTPRXDESC_IPPE ((uint32_t)0x00000010U) /* IP Payload Error */ -#define ETH_DMAPTPRXDESC_IPHE ((uint32_t)0x00000008U) /* IP Header Error */ -#define ETH_DMAPTPRXDESC_IPPT ((uint32_t)0x00000007U) /* IP Payload Type */ - #define ETH_DMAPTPRXDESC_IPPT_UDP ((uint32_t)0x00000001U) /* UDP payload encapsulated in the IP datagram */ - #define ETH_DMAPTPRXDESC_IPPT_TCP ((uint32_t)0x00000002U) /* TCP payload encapsulated in the IP datagram */ - #define ETH_DMAPTPRXDESC_IPPT_ICMP ((uint32_t)0x00000003U) /* ICMP payload encapsulated in the IP datagram */ - -/* Bit definition of RDES6 register */ -#define ETH_DMAPTPRXDESC_RTSL ((uint32_t)0xFFFFFFFFU) /* Receive Time Stamp Low */ - -/* Bit definition of RDES7 register */ -#define ETH_DMAPTPRXDESC_RTSH ((uint32_t)0xFFFFFFFFU) /* Receive Time Stamp High */ -/** - * @} - */ - /** @defgroup ETH_AutoNegotiation ETH AutoNegotiation - * @{ - */ -#define ETH_AUTONEGOTIATION_ENABLE ((uint32_t)0x00000001U) -#define ETH_AUTONEGOTIATION_DISABLE ((uint32_t)0x00000000U) - -/** - * @} - */ -/** @defgroup ETH_Speed ETH Speed - * @{ - */ -#define ETH_SPEED_10M ((uint32_t)0x00000000U) -#define ETH_SPEED_100M ((uint32_t)0x00004000U) - -/** - * @} - */ -/** @defgroup ETH_Duplex_Mode ETH Duplex Mode - * @{ - */ -#define ETH_MODE_FULLDUPLEX ((uint32_t)0x00000800U) -#define ETH_MODE_HALFDUPLEX ((uint32_t)0x00000000U) -/** - * @} - */ -/** @defgroup ETH_Rx_Mode ETH Rx Mode - * @{ - */ -#define ETH_RXPOLLING_MODE ((uint32_t)0x00000000U) -#define ETH_RXINTERRUPT_MODE ((uint32_t)0x00000001U) -/** - * @} - */ - -/** @defgroup ETH_Checksum_Mode ETH Checksum Mode - * @{ - */ -#define ETH_CHECKSUM_BY_HARDWARE ((uint32_t)0x00000000U) -#define ETH_CHECKSUM_BY_SOFTWARE ((uint32_t)0x00000001U) -/** - * @} - */ - -/** @defgroup ETH_Media_Interface ETH Media Interface - * @{ - */ -#define ETH_MEDIA_INTERFACE_MII ((uint32_t)0x00000000U) -#define ETH_MEDIA_INTERFACE_RMII ((uint32_t)SYSCFG_PMC_MII_RMII_SEL) -/** - * @} - */ - -/** @defgroup ETH_Watchdog ETH Watchdog - * @{ - */ -#define ETH_WATCHDOG_ENABLE ((uint32_t)0x00000000U) -#define ETH_WATCHDOG_DISABLE ((uint32_t)0x00800000U) -/** - * @} - */ - -/** @defgroup ETH_Jabber ETH Jabber - * @{ - */ -#define ETH_JABBER_ENABLE ((uint32_t)0x00000000U) -#define ETH_JABBER_DISABLE ((uint32_t)0x00400000U) -/** - * @} - */ - -/** @defgroup ETH_Inter_Frame_Gap ETH Inter Frame Gap - * @{ - */ -#define ETH_INTERFRAMEGAP_96BIT ((uint32_t)0x00000000U) /*!< minimum IFG between frames during transmission is 96Bit */ -#define ETH_INTERFRAMEGAP_88BIT ((uint32_t)0x00020000U) /*!< minimum IFG between frames during transmission is 88Bit */ -#define ETH_INTERFRAMEGAP_80BIT ((uint32_t)0x00040000U) /*!< minimum IFG between frames during transmission is 80Bit */ -#define ETH_INTERFRAMEGAP_72BIT ((uint32_t)0x00060000U) /*!< minimum IFG between frames during transmission is 72Bit */ -#define ETH_INTERFRAMEGAP_64BIT ((uint32_t)0x00080000U) /*!< minimum IFG between frames during transmission is 64Bit */ -#define ETH_INTERFRAMEGAP_56BIT ((uint32_t)0x000A0000U) /*!< minimum IFG between frames during transmission is 56Bit */ -#define ETH_INTERFRAMEGAP_48BIT ((uint32_t)0x000C0000U) /*!< minimum IFG between frames during transmission is 48Bit */ -#define ETH_INTERFRAMEGAP_40BIT ((uint32_t)0x000E0000U) /*!< minimum IFG between frames during transmission is 40Bit */ -/** - * @} - */ - -/** @defgroup ETH_Carrier_Sense ETH Carrier Sense - * @{ - */ -#define ETH_CARRIERSENCE_ENABLE ((uint32_t)0x00000000U) -#define ETH_CARRIERSENCE_DISABLE ((uint32_t)0x00010000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Own ETH Receive Own - * @{ - */ -#define ETH_RECEIVEOWN_ENABLE ((uint32_t)0x00000000U) -#define ETH_RECEIVEOWN_DISABLE ((uint32_t)0x00002000U) -/** - * @} - */ - -/** @defgroup ETH_Loop_Back_Mode ETH Loop Back Mode - * @{ - */ -#define ETH_LOOPBACKMODE_ENABLE ((uint32_t)0x00001000U) -#define ETH_LOOPBACKMODE_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Checksum_Offload ETH Checksum Offload - * @{ - */ -#define ETH_CHECKSUMOFFLAOD_ENABLE ((uint32_t)0x00000400U) -#define ETH_CHECKSUMOFFLAOD_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Retry_Transmission ETH Retry Transmission - * @{ - */ -#define ETH_RETRYTRANSMISSION_ENABLE ((uint32_t)0x00000000U) -#define ETH_RETRYTRANSMISSION_DISABLE ((uint32_t)0x00000200U) -/** - * @} - */ - -/** @defgroup ETH_Automatic_Pad_CRC_Strip ETH Automatic Pad CRC Strip - * @{ - */ -#define ETH_AUTOMATICPADCRCSTRIP_ENABLE ((uint32_t)0x00000080U) -#define ETH_AUTOMATICPADCRCSTRIP_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Back_Off_Limit ETH Back Off Limit - * @{ - */ -#define ETH_BACKOFFLIMIT_10 ((uint32_t)0x00000000U) -#define ETH_BACKOFFLIMIT_8 ((uint32_t)0x00000020U) -#define ETH_BACKOFFLIMIT_4 ((uint32_t)0x00000040U) -#define ETH_BACKOFFLIMIT_1 ((uint32_t)0x00000060U) -/** - * @} - */ - -/** @defgroup ETH_Deferral_Check ETH Deferral Check - * @{ - */ -#define ETH_DEFFERRALCHECK_ENABLE ((uint32_t)0x00000010U) -#define ETH_DEFFERRALCHECK_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_All ETH Receive All - * @{ - */ -#define ETH_RECEIVEALL_ENABLE ((uint32_t)0x80000000U) -#define ETH_RECEIVEAll_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Source_Addr_Filter ETH Source Addr Filter - * @{ - */ -#define ETH_SOURCEADDRFILTER_NORMAL_ENABLE ((uint32_t)0x00000200U) -#define ETH_SOURCEADDRFILTER_INVERSE_ENABLE ((uint32_t)0x00000300U) -#define ETH_SOURCEADDRFILTER_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Pass_Control_Frames ETH Pass Control Frames - * @{ - */ -#define ETH_PASSCONTROLFRAMES_BLOCKALL ((uint32_t)0x00000040U) /*!< MAC filters all control frames from reaching the application */ -#define ETH_PASSCONTROLFRAMES_FORWARDALL ((uint32_t)0x00000080U) /*!< MAC forwards all control frames to application even if they fail the Address Filter */ -#define ETH_PASSCONTROLFRAMES_FORWARDPASSEDADDRFILTER ((uint32_t)0x000000C0U) /*!< MAC forwards control frames that pass the Address Filter. */ -/** - * @} - */ - -/** @defgroup ETH_Broadcast_Frames_Reception ETH Broadcast Frames Reception - * @{ - */ -#define ETH_BROADCASTFRAMESRECEPTION_ENABLE ((uint32_t)0x00000000U) -#define ETH_BROADCASTFRAMESRECEPTION_DISABLE ((uint32_t)0x00000020U) -/** - * @} - */ - -/** @defgroup ETH_Destination_Addr_Filter ETH Destination Addr Filter - * @{ - */ -#define ETH_DESTINATIONADDRFILTER_NORMAL ((uint32_t)0x00000000U) -#define ETH_DESTINATIONADDRFILTER_INVERSE ((uint32_t)0x00000008U) -/** - * @} - */ - -/** @defgroup ETH_Promiscuous_Mode ETH Promiscuous Mode - * @{ - */ -#define ETH_PROMISCUOUS_MODE_ENABLE ((uint32_t)0x00000001U) -#define ETH_PROMISCUOUS_MODE_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Multicast_Frames_Filter ETH Multicast Frames Filter - * @{ - */ -#define ETH_MULTICASTFRAMESFILTER_PERFECTHASHTABLE ((uint32_t)0x00000404U) -#define ETH_MULTICASTFRAMESFILTER_HASHTABLE ((uint32_t)0x00000004U) -#define ETH_MULTICASTFRAMESFILTER_PERFECT ((uint32_t)0x00000000U) -#define ETH_MULTICASTFRAMESFILTER_NONE ((uint32_t)0x00000010U) -/** - * @} - */ - -/** @defgroup ETH_Unicast_Frames_Filter ETH Unicast Frames Filter - * @{ - */ -#define ETH_UNICASTFRAMESFILTER_PERFECTHASHTABLE ((uint32_t)0x00000402U) -#define ETH_UNICASTFRAMESFILTER_HASHTABLE ((uint32_t)0x00000002U) -#define ETH_UNICASTFRAMESFILTER_PERFECT ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Zero_Quanta_Pause ETH Zero Quanta Pause - * @{ - */ -#define ETH_ZEROQUANTAPAUSE_ENABLE ((uint32_t)0x00000000U) -#define ETH_ZEROQUANTAPAUSE_DISABLE ((uint32_t)0x00000080U) -/** - * @} - */ - -/** @defgroup ETH_Pause_Low_Threshold ETH Pause Low Threshold - * @{ - */ -#define ETH_PAUSELOWTHRESHOLD_MINUS4 ((uint32_t)0x00000000U) /*!< Pause time minus 4 slot times */ -#define ETH_PAUSELOWTHRESHOLD_MINUS28 ((uint32_t)0x00000010U) /*!< Pause time minus 28 slot times */ -#define ETH_PAUSELOWTHRESHOLD_MINUS144 ((uint32_t)0x00000020U) /*!< Pause time minus 144 slot times */ -#define ETH_PAUSELOWTHRESHOLD_MINUS256 ((uint32_t)0x00000030U) /*!< Pause time minus 256 slot times */ -/** - * @} - */ - -/** @defgroup ETH_Unicast_Pause_Frame_Detect ETH Unicast Pause Frame Detect - * @{ - */ -#define ETH_UNICASTPAUSEFRAMEDETECT_ENABLE ((uint32_t)0x00000008U) -#define ETH_UNICASTPAUSEFRAMEDETECT_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Flow_Control ETH Receive Flow Control - * @{ - */ -#define ETH_RECEIVEFLOWCONTROL_ENABLE ((uint32_t)0x00000004U) -#define ETH_RECEIVEFLOWCONTROL_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Transmit_Flow_Control ETH Transmit Flow Control - * @{ - */ -#define ETH_TRANSMITFLOWCONTROL_ENABLE ((uint32_t)0x00000002U) -#define ETH_TRANSMITFLOWCONTROL_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_VLAN_Tag_Comparison ETH VLAN Tag Comparison - * @{ - */ -#define ETH_VLANTAGCOMPARISON_12BIT ((uint32_t)0x00010000U) -#define ETH_VLANTAGCOMPARISON_16BIT ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_MAC_addresses ETH MAC addresses - * @{ - */ -#define ETH_MAC_ADDRESS0 ((uint32_t)0x00000000U) -#define ETH_MAC_ADDRESS1 ((uint32_t)0x00000008U) -#define ETH_MAC_ADDRESS2 ((uint32_t)0x00000010U) -#define ETH_MAC_ADDRESS3 ((uint32_t)0x00000018U) -/** - * @} - */ - -/** @defgroup ETH_MAC_addresses_filter_SA_DA ETH MAC addresses filter SA DA - * @{ - */ -#define ETH_MAC_ADDRESSFILTER_SA ((uint32_t)0x00000000U) -#define ETH_MAC_ADDRESSFILTER_DA ((uint32_t)0x00000008U) -/** - * @} - */ - -/** @defgroup ETH_MAC_addresses_filter_Mask_bytes ETH MAC addresses filter Mask bytes - * @{ - */ -#define ETH_MAC_ADDRESSMASK_BYTE6 ((uint32_t)0x20000000U) /*!< Mask MAC Address high reg bits [15:8] */ -#define ETH_MAC_ADDRESSMASK_BYTE5 ((uint32_t)0x10000000U) /*!< Mask MAC Address high reg bits [7:0] */ -#define ETH_MAC_ADDRESSMASK_BYTE4 ((uint32_t)0x08000000U) /*!< Mask MAC Address low reg bits [31:24] */ -#define ETH_MAC_ADDRESSMASK_BYTE3 ((uint32_t)0x04000000U) /*!< Mask MAC Address low reg bits [23:16] */ -#define ETH_MAC_ADDRESSMASK_BYTE2 ((uint32_t)0x02000000U) /*!< Mask MAC Address low reg bits [15:8] */ -#define ETH_MAC_ADDRESSMASK_BYTE1 ((uint32_t)0x01000000U) /*!< Mask MAC Address low reg bits [70] */ -/** - * @} - */ - -/** @defgroup ETH_MAC_Debug_flags ETH MAC Debug flags - * @{ - */ -#ifndef ETH_MAC_TXFIFO_FULL - #define ETH_MAC_TXFIFO_FULL ((uint32_t)0x02000000) /* Tx FIFO full */ - #define ETH_MAC_TXFIFONOT_EMPTY ((uint32_t)0x01000000) /* Tx FIFO not empty */ - #define ETH_MAC_TXFIFO_WRITE_ACTIVE ((uint32_t)0x00400000) /* Tx FIFO write active */ - #define ETH_MAC_TXFIFO_IDLE ((uint32_t)0x00000000) /* Tx FIFO read status: Idle */ - #define ETH_MAC_TXFIFO_READ ((uint32_t)0x00100000) /* Tx FIFO read status: Read (transferring data to the MAC transmitter) */ - #define ETH_MAC_TXFIFO_WAITING ((uint32_t)0x00200000) /* Tx FIFO read status: Waiting for TxStatus from MAC transmitter */ - #define ETH_MAC_TXFIFO_WRITING ((uint32_t)0x00300000) /* Tx FIFO read status: Writing the received TxStatus or flushing the TxFIFO */ - #define ETH_MAC_TRANSMISSION_PAUSE ((uint32_t)0x00080000) /* MAC transmitter in pause */ - #define ETH_MAC_TRANSMITFRAMECONTROLLER_IDLE ((uint32_t)0x00000000) /* MAC transmit frame controller: Idle */ - #define ETH_MAC_TRANSMITFRAMECONTROLLER_WAITING ((uint32_t)0x00020000) /* MAC transmit frame controller: Waiting for Status of previous frame or IFG/backoff period to be over */ - #define ETH_MAC_TRANSMITFRAMECONTROLLER_GENRATING_PCF ((uint32_t)0x00040000) /* MAC transmit frame controller: Generating and transmitting a Pause control frame (in full duplex mode) */ - #define ETH_MAC_TRANSMITFRAMECONTROLLER_TRANSFERRING ((uint32_t)0x00060000) /* MAC transmit frame controller: Transferring input frame for transmission */ - #define ETH_MAC_MII_TRANSMIT_ACTIVE ((uint32_t)0x00010000) /* MAC MII transmit engine active */ - #define ETH_MAC_RXFIFO_EMPTY ((uint32_t)0x00000000) /* Rx FIFO fill level: empty */ - #define ETH_MAC_RXFIFO_BELOW_THRESHOLD ((uint32_t)0x00000100) /* Rx FIFO fill level: fill-level below flow-control de-activate threshold */ - #define ETH_MAC_RXFIFO_ABOVE_THRESHOLD ((uint32_t)0x00000200) /* Rx FIFO fill level: fill-level above flow-control activate threshold */ - #define ETH_MAC_RXFIFO_FULL ((uint32_t)0x00000300) /* Rx FIFO fill level: full */ - #define ETH_MAC_READCONTROLLER_IDLE ((uint32_t)0x00000060) /* Rx FIFO read controller IDLE state */ - #define ETH_MAC_READCONTROLLER_READING_DATA ((uint32_t)0x00000060) /* Rx FIFO read controller Reading frame data */ - #define ETH_MAC_READCONTROLLER_READING_STATUS ((uint32_t)0x00000060) /* Rx FIFO read controller Reading frame status (or time-stamp) */ - #define ETH_MAC_READCONTROLLER_ FLUSHING ((uint32_t)0x00000060) /* Rx FIFO read controller Flushing the frame data and status */ - #define ETH_MAC_RXFIFO_WRITE_ACTIVE ((uint32_t)0x00000010) /* Rx FIFO write controller active */ - #define ETH_MAC_SMALL_FIFO_NOTACTIVE ((uint32_t)0x00000000) /* MAC small FIFO read / write controllers not active */ - #define ETH_MAC_SMALL_FIFO_READ_ACTIVE ((uint32_t)0x00000002) /* MAC small FIFO read controller active */ - #define ETH_MAC_SMALL_FIFO_WRITE_ACTIVE ((uint32_t)0x00000004) /* MAC small FIFO write controller active */ - #define ETH_MAC_SMALL_FIFO_RW_ACTIVE ((uint32_t)0x00000006) /* MAC small FIFO read / write controllers active */ - #define ETH_MAC_MII_RECEIVE_PROTOCOL_ACTIVE ((uint32_t)0x00000001) /* MAC MII receive protocol engine active */ -#else - /* stm32_hal_legacy.h has probably been included. That file defines 'ETH_MAC_TXFIFO_FULL' and all macro's here below. */ -#endif -/** - * @} - */ - -/** @defgroup ETH_Drop_TCP_IP_Checksum_Error_Frame ETH Drop TCP IP Checksum Error Frame - * @{ - */ -#define ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE ((uint32_t)0x00000000U) -#define ETH_DROPTCPIPCHECKSUMERRORFRAME_DISABLE ((uint32_t)0x04000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Store_Forward ETH Receive Store Forward - * @{ - */ -#define ETH_RECEIVESTOREFORWARD_ENABLE ((uint32_t)0x02000000U) -#define ETH_RECEIVESTOREFORWARD_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Flush_Received_Frame ETH Flush Received Frame - * @{ - */ -#define ETH_FLUSHRECEIVEDFRAME_ENABLE ((uint32_t)0x00000000U) -#define ETH_FLUSHRECEIVEDFRAME_DISABLE ((uint32_t)0x01000000U) -/** - * @} - */ - -/** @defgroup ETH_Transmit_Store_Forward ETH Transmit Store Forward - * @{ - */ -#define ETH_TRANSMITSTOREFORWARD_ENABLE ((uint32_t)0x00200000U) -#define ETH_TRANSMITSTOREFORWARD_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Transmit_Threshold_Control ETH Transmit Threshold Control - * @{ - */ -#define ETH_TRANSMITTHRESHOLDCONTROL_64BYTES ((uint32_t)0x00000000U) /*!< threshold level of the MTL Transmit FIFO is 64 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_128BYTES ((uint32_t)0x00004000U) /*!< threshold level of the MTL Transmit FIFO is 128 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_192BYTES ((uint32_t)0x00008000U) /*!< threshold level of the MTL Transmit FIFO is 192 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_256BYTES ((uint32_t)0x0000C000U) /*!< threshold level of the MTL Transmit FIFO is 256 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_40BYTES ((uint32_t)0x00010000U) /*!< threshold level of the MTL Transmit FIFO is 40 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_32BYTES ((uint32_t)0x00014000U) /*!< threshold level of the MTL Transmit FIFO is 32 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_24BYTES ((uint32_t)0x00018000U) /*!< threshold level of the MTL Transmit FIFO is 24 Bytes */ -#define ETH_TRANSMITTHRESHOLDCONTROL_16BYTES ((uint32_t)0x0001C000U) /*!< threshold level of the MTL Transmit FIFO is 16 Bytes */ -/** - * @} - */ - -/** @defgroup ETH_Forward_Error_Frames ETH Forward Error Frames - * @{ - */ -#define ETH_FORWARDERRORFRAMES_ENABLE ((uint32_t)0x00000080U) -#define ETH_FORWARDERRORFRAMES_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Forward_Undersized_Good_Frames ETH Forward Undersized Good Frames - * @{ - */ -#define ETH_FORWARDUNDERSIZEDGOODFRAMES_ENABLE ((uint32_t)0x00000040U) -#define ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Receive_Threshold_Control ETH Receive Threshold Control - * @{ - */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES ((uint32_t)0x00000000U) /*!< threshold level of the MTL Receive FIFO is 64 Bytes */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_32BYTES ((uint32_t)0x00000008U) /*!< threshold level of the MTL Receive FIFO is 32 Bytes */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_96BYTES ((uint32_t)0x00000010U) /*!< threshold level of the MTL Receive FIFO is 96 Bytes */ -#define ETH_RECEIVEDTHRESHOLDCONTROL_128BYTES ((uint32_t)0x00000018U) /*!< threshold level of the MTL Receive FIFO is 128 Bytes */ -/** - * @} - */ - -/** @defgroup ETH_Second_Frame_Operate ETH Second Frame Operate - * @{ - */ -#define ETH_SECONDFRAMEOPERARTE_ENABLE ((uint32_t)0x00000004U) -#define ETH_SECONDFRAMEOPERARTE_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Address_Aligned_Beats ETH Address Aligned Beats - * @{ - */ -#define ETH_ADDRESSALIGNEDBEATS_ENABLE ((uint32_t)0x02000000U) -#define ETH_ADDRESSALIGNEDBEATS_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Fixed_Burst ETH Fixed Burst - * @{ - */ -#define ETH_FIXEDBURST_ENABLE ((uint32_t)0x00010000U) -#define ETH_FIXEDBURST_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_Rx_DMA_Burst_Length ETH Rx DMA Burst Length - * @{ - */ -#define ETH_RXDMABURSTLENGTH_1BEAT ((uint32_t)0x00020000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 1 */ -#define ETH_RXDMABURSTLENGTH_2BEAT ((uint32_t)0x00040000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 2 */ -#define ETH_RXDMABURSTLENGTH_4BEAT ((uint32_t)0x00080000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */ -#define ETH_RXDMABURSTLENGTH_8BEAT ((uint32_t)0x00100000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */ -#define ETH_RXDMABURSTLENGTH_16BEAT ((uint32_t)0x00200000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */ -#define ETH_RXDMABURSTLENGTH_32BEAT ((uint32_t)0x00400000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_4BEAT ((uint32_t)0x01020000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_8BEAT ((uint32_t)0x01040000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_16BEAT ((uint32_t)0x01080000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_32BEAT ((uint32_t)0x01100000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_64BEAT ((uint32_t)0x01200000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 64 */ -#define ETH_RXDMABURSTLENGTH_4XPBL_128BEAT ((uint32_t)0x01400000U) /*!< maximum number of beats to be transferred in one RxDMA transaction is 128 */ -/** - * @} - */ - -/** @defgroup ETH_Tx_DMA_Burst_Length ETH Tx DMA Burst Length - * @{ - */ -#define ETH_TXDMABURSTLENGTH_1BEAT ((uint32_t)0x00000100U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 1 */ -#define ETH_TXDMABURSTLENGTH_2BEAT ((uint32_t)0x00000200U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 2 */ -#define ETH_TXDMABURSTLENGTH_4BEAT ((uint32_t)0x00000400U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */ -#define ETH_TXDMABURSTLENGTH_8BEAT ((uint32_t)0x00000800U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */ -#define ETH_TXDMABURSTLENGTH_16BEAT ((uint32_t)0x00001000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */ -#define ETH_TXDMABURSTLENGTH_32BEAT ((uint32_t)0x00002000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_4BEAT ((uint32_t)0x01000100U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_8BEAT ((uint32_t)0x01000200U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_16BEAT ((uint32_t)0x01000400U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_32BEAT ((uint32_t)0x01000800U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_64BEAT ((uint32_t)0x01001000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 64 */ -#define ETH_TXDMABURSTLENGTH_4XPBL_128BEAT ((uint32_t)0x01002000U) /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 128 */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Enhanced_descriptor_format ETH DMA Enhanced descriptor format - * @{ - */ -#define ETH_DMAENHANCEDDESCRIPTOR_ENABLE ((uint32_t)0x00000080U) -#define ETH_DMAENHANCEDDESCRIPTOR_DISABLE ((uint32_t)0x00000000U) -/** - * @} - */ - -/** @defgroup ETH_DMA_Arbitration ETH DMA Arbitration - * @{ - */ -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1 ((uint32_t)0x00000000U) -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_2_1 ((uint32_t)0x00004000U) -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_3_1 ((uint32_t)0x00008000U) -#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_4_1 ((uint32_t)0x0000C000U) -#define ETH_DMAARBITRATION_RXPRIORTX ((uint32_t)0x00000002U) -/** - * @} - */ - -/** @defgroup ETH_DMA_Tx_descriptor_segment ETH DMA Tx descriptor segment - * @{ - */ -#define ETH_DMATXDESC_LASTSEGMENTS ((uint32_t)0x40000000U) /*!< Last Segment */ -#define ETH_DMATXDESC_FIRSTSEGMENT ((uint32_t)0x20000000U) /*!< First Segment */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Tx_descriptor_Checksum_Insertion_Control ETH DMA Tx descriptor Checksum Insertion Control - * @{ - */ -#define ETH_DMATXDESC_CHECKSUMBYPASS ((uint32_t)0x00000000U) /*!< Checksum engine bypass */ -#define ETH_DMATXDESC_CHECKSUMIPV4HEADER ((uint32_t)0x00400000U) /*!< IPv4 header checksum insertion */ -#define ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT ((uint32_t)0x00800000U) /*!< TCP/UDP/ICMP checksum insertion. Pseudo header checksum is assumed to be present */ -#define ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL ((uint32_t)0x00C00000U) /*!< TCP/UDP/ICMP checksum fully in hardware including pseudo header */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Rx_descriptor_buffers ETH DMA Rx descriptor buffers - * @{ - */ -#define ETH_DMARXDESC_BUFFER1 ((uint32_t)0x00000000U) /*!< DMA Rx Desc Buffer1 */ -#define ETH_DMARXDESC_BUFFER2 ((uint32_t)0x00000001U) /*!< DMA Rx Desc Buffer2 */ -/** - * @} - */ - -/** @defgroup ETH_PMT_Flags ETH PMT Flags - * @{ - */ -#define ETH_PMT_FLAG_WUFFRPR ((uint32_t)0x80000000U) /*!< Wake-Up Frame Filter Register Pointer Reset */ -#define ETH_PMT_FLAG_WUFR ((uint32_t)0x00000040U) /*!< Wake-Up Frame Received */ -#define ETH_PMT_FLAG_MPR ((uint32_t)0x00000020U) /*!< Magic Packet Received */ -/** - * @} - */ - -/** @defgroup ETH_MMC_Tx_Interrupts ETH MMC Tx Interrupts - * @{ - */ -#define ETH_MMC_IT_TGF ((uint32_t)0x00200000U) /*!< When Tx good frame counter reaches half the maximum value */ -#define ETH_MMC_IT_TGFMSC ((uint32_t)0x00008000U) /*!< When Tx good multi col counter reaches half the maximum value */ -#define ETH_MMC_IT_TGFSC ((uint32_t)0x00004000U) /*!< When Tx good single col counter reaches half the maximum value */ -/** - * @} - */ - -/** @defgroup ETH_MMC_Rx_Interrupts ETH MMC Rx Interrupts - * @{ - */ -#define ETH_MMC_IT_RGUF ((uint32_t)0x10020000U) /*!< When Rx good unicast frames counter reaches half the maximum value */ -#define ETH_MMC_IT_RFAE ((uint32_t)0x10000040U) /*!< When Rx alignment error counter reaches half the maximum value */ -#define ETH_MMC_IT_RFCE ((uint32_t)0x10000020U) /*!< When Rx crc error counter reaches half the maximum value */ -/** - * @} - */ - -/** @defgroup ETH_MAC_Flags ETH MAC Flags - * @{ - */ -#define ETH_MAC_FLAG_TST ((uint32_t)0x00000200U) /*!< Time stamp trigger flag (on MAC) */ -#define ETH_MAC_FLAG_MMCT ((uint32_t)0x00000040U) /*!< MMC transmit flag */ -#define ETH_MAC_FLAG_MMCR ((uint32_t)0x00000020U) /*!< MMC receive flag */ -#define ETH_MAC_FLAG_MMC ((uint32_t)0x00000010U) /*!< MMC flag (on MAC) */ -#define ETH_MAC_FLAG_PMT ((uint32_t)0x00000008U) /*!< PMT flag (on MAC) */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Flags ETH DMA Flags - * @{ - */ -#define ETH_DMA_FLAG_TST ((uint32_t)0x20000000U) /*!< Time-stamp trigger interrupt (on DMA) */ -#define ETH_DMA_FLAG_PMT ((uint32_t)0x10000000U) /*!< PMT interrupt (on DMA) */ -#define ETH_DMA_FLAG_MMC ((uint32_t)0x08000000U) /*!< MMC interrupt (on DMA) */ -#define ETH_DMA_FLAG_DATATRANSFERERROR ((uint32_t)0x00800000U) /*!< Error bits 0-Rx DMA, 1-Tx DMA */ -#define ETH_DMA_FLAG_READWRITEERROR ((uint32_t)0x01000000U) /*!< Error bits 0-write transfer, 1-read transfer */ -#define ETH_DMA_FLAG_ACCESSERROR ((uint32_t)0x02000000U) /*!< Error bits 0-data buffer, 1-desc. access */ -#define ETH_DMA_FLAG_NIS ((uint32_t)0x00010000U) /*!< Normal interrupt summary flag */ -#define ETH_DMA_FLAG_AIS ((uint32_t)0x00008000U) /*!< Abnormal interrupt summary flag */ -#define ETH_DMA_FLAG_ER ((uint32_t)0x00004000U) /*!< Early receive flag */ -#define ETH_DMA_FLAG_FBE ((uint32_t)0x00002000U) /*!< Fatal bus error flag */ -#define ETH_DMA_FLAG_ET ((uint32_t)0x00000400U) /*!< Early transmit flag */ -#define ETH_DMA_FLAG_RWT ((uint32_t)0x00000200U) /*!< Receive watchdog timeout flag */ -#define ETH_DMA_FLAG_RPS ((uint32_t)0x00000100U) /*!< Receive process stopped flag */ -#define ETH_DMA_FLAG_RBU ((uint32_t)0x00000080U) /*!< Receive buffer unavailable flag */ -#define ETH_DMA_FLAG_R ((uint32_t)0x00000040U) /*!< Receive flag */ -#define ETH_DMA_FLAG_TU ((uint32_t)0x00000020U) /*!< Underflow flag */ -#define ETH_DMA_FLAG_RO ((uint32_t)0x00000010U) /*!< Overflow flag */ -#define ETH_DMA_FLAG_TJT ((uint32_t)0x00000008U) /*!< Transmit jabber timeout flag */ -#define ETH_DMA_FLAG_TBU ((uint32_t)0x00000004U) /*!< Transmit buffer unavailable flag */ -#define ETH_DMA_FLAG_TPS ((uint32_t)0x00000002U) /*!< Transmit process stopped flag */ -#define ETH_DMA_FLAG_T ((uint32_t)0x00000001U) /*!< Transmit flag */ -/** - * @} - */ - -/** @defgroup ETH_MAC_Interrupts ETH MAC Interrupts - * @{ - */ -#define ETH_MAC_IT_TST ((uint32_t)0x00000200U) /*!< Time stamp trigger interrupt (on MAC) */ -#define ETH_MAC_IT_MMCT ((uint32_t)0x00000040U) /*!< MMC transmit interrupt */ -#define ETH_MAC_IT_MMCR ((uint32_t)0x00000020U) /*!< MMC receive interrupt */ -#define ETH_MAC_IT_MMC ((uint32_t)0x00000010U) /*!< MMC interrupt (on MAC) */ -#define ETH_MAC_IT_PMT ((uint32_t)0x00000008U) /*!< PMT interrupt (on MAC) */ -/** - * @} - */ - -/** @defgroup ETH_DMA_Interrupts ETH DMA Interrupts - * @{ - */ -#define ETH_DMA_IT_TST ((uint32_t)0x20000000U) /*!< Time-stamp trigger interrupt (on DMA) */ -#define ETH_DMA_IT_PMT ((uint32_t)0x10000000U) /*!< PMT interrupt (on DMA) */ -#define ETH_DMA_IT_MMC ((uint32_t)0x08000000U) /*!< MMC interrupt (on DMA) */ -#define ETH_DMA_IT_NIS ((uint32_t)0x00010000U) /*!< Normal interrupt summary */ -#define ETH_DMA_IT_AIS ((uint32_t)0x00008000U) /*!< Abnormal interrupt summary */ -#define ETH_DMA_IT_ER ((uint32_t)0x00004000U) /*!< Early receive interrupt */ -#define ETH_DMA_IT_FBE ((uint32_t)0x00002000U) /*!< Fatal bus error interrupt */ -#define ETH_DMA_IT_ET ((uint32_t)0x00000400U) /*!< Early transmit interrupt */ -#define ETH_DMA_IT_RWT ((uint32_t)0x00000200U) /*!< Receive watchdog timeout interrupt */ -#define ETH_DMA_IT_RPS ((uint32_t)0x00000100U) /*!< Receive process stopped interrupt */ -#define ETH_DMA_IT_RBU ((uint32_t)0x00000080U) /*!< Receive buffer unavailable interrupt */ -#define ETH_DMA_IT_R ((uint32_t)0x00000040U) /*!< Receive interrupt */ -#define ETH_DMA_IT_TU ((uint32_t)0x00000020U) /*!< Underflow interrupt */ -#define ETH_DMA_IT_RO ((uint32_t)0x00000010U) /*!< Overflow interrupt */ -#define ETH_DMA_IT_TJT ((uint32_t)0x00000008U) /*!< Transmit jabber timeout interrupt */ -#define ETH_DMA_IT_TBU ((uint32_t)0x00000004U) /*!< Transmit buffer unavailable interrupt */ -#define ETH_DMA_IT_TPS ((uint32_t)0x00000002U) /*!< Transmit process stopped interrupt */ -#define ETH_DMA_IT_T ((uint32_t)0x00000001U) /*!< Transmit interrupt */ -/** - * @} - */ - -/** @defgroup ETH_DMA_transmit_process_state ETH DMA transmit process state - * @{ - */ -#define ETH_DMA_TRANSMITPROCESS_STOPPED ((uint32_t)0x00000000U) /*!< Stopped - Reset or Stop Tx Command issued */ -#define ETH_DMA_TRANSMITPROCESS_FETCHING ((uint32_t)0x00100000U) /*!< Running - fetching the Tx descriptor */ -#define ETH_DMA_TRANSMITPROCESS_WAITING ((uint32_t)0x00200000U) /*!< Running - waiting for status */ -#define ETH_DMA_TRANSMITPROCESS_READING ((uint32_t)0x00300000U) /*!< Running - reading the data from host memory */ -#define ETH_DMA_TRANSMITPROCESS_SUSPENDED ((uint32_t)0x00600000U) /*!< Suspended - Tx Descriptor unavailable */ -#define ETH_DMA_TRANSMITPROCESS_CLOSING ((uint32_t)0x00700000U) /*!< Running - closing Rx descriptor */ - -/** - * @} - */ - - -/** @defgroup ETH_DMA_receive_process_state ETH DMA receive process state - * @{ - */ -#define ETH_DMA_RECEIVEPROCESS_STOPPED ((uint32_t)0x00000000U) /*!< Stopped - Reset or Stop Rx Command issued */ -#define ETH_DMA_RECEIVEPROCESS_FETCHING ((uint32_t)0x00020000U) /*!< Running - fetching the Rx descriptor */ -#define ETH_DMA_RECEIVEPROCESS_WAITING ((uint32_t)0x00060000U) /*!< Running - waiting for packet */ -#define ETH_DMA_RECEIVEPROCESS_SUSPENDED ((uint32_t)0x00080000U) /*!< Suspended - Rx Descriptor unavailable */ -#define ETH_DMA_RECEIVEPROCESS_CLOSING ((uint32_t)0x000A0000U) /*!< Running - closing descriptor */ -#define ETH_DMA_RECEIVEPROCESS_QUEUING ((uint32_t)0x000E0000U) /*!< Running - queuing the receive frame into host memory */ - -/** - * @} - */ - -/** @defgroup ETH_DMA_overflow ETH DMA overflow - * @{ - */ -#define ETH_DMA_OVERFLOW_RXFIFOCOUNTER ((uint32_t)0x10000000U) /*!< Overflow bit for FIFO overflow counter */ -#define ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER ((uint32_t)0x00010000U) /*!< Overflow bit for missed frame counter */ -/** - * @} - */ - -/** @defgroup ETH_EXTI_LINE_WAKEUP ETH EXTI LINE WAKEUP - * @{ - */ -#define ETH_EXTI_LINE_WAKEUP ((uint32_t)0x00080000U) /*!< External interrupt line 19 Connected to the ETH EXTI Line */ - -/** - * @} - */ - -/** - * @} - */ - -/* Exported macro ------------------------------------------------------------*/ -/** @defgroup ETH_Exported_Macros ETH Exported Macros - * @brief macros to handle interrupts and specific clock configurations - * @{ - */ - -/** @brief Reset ETH handle state - * @param __HANDLE__: specifies the ETH handle. - * @retval None - */ -#define __HAL_ETH_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_ETH_STATE_RESET) - -/** - * @brief Checks whether the specified Ethernet DMA Tx Desc flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag of TDES0 to check. - * @retval the ETH_DMATxDescFlag (SET or RESET). - */ -#define __HAL_ETH_DMATXDESC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->TxDesc->Status & (__FLAG__) == (__FLAG__)) - -/** - * @brief Checks whether the specified Ethernet DMA Rx Desc flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag of RDES0 to check. - * @retval the ETH_DMATxDescFlag (SET or RESET). - */ -#define __HAL_ETH_DMARXDESC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->RxDesc->Status & (__FLAG__) == (__FLAG__)) - -/** - * @brief Enables the specified DMA Rx Desc receive interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMARXDESC_ENABLE_IT(__HANDLE__) ((__HANDLE__)->RxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARXDESC_DIC)) - -/** - * @brief Disables the specified DMA Rx Desc receive interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMARXDESC_DISABLE_IT(__HANDLE__) ((__HANDLE__)->RxDesc->ControlBufferSize |= ETH_DMARXDESC_DIC) - -/** - * @brief Set the specified DMA Rx Desc Own bit. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMARXDESC_SET_OWN_BIT(__HANDLE__) ((__HANDLE__)->RxDesc->Status |= ETH_DMARXDESC_OWN) - -/** - * @brief Returns the specified Ethernet DMA Tx Desc collision count. - * @param __HANDLE__: ETH Handle - * @retval The Transmit descriptor collision counter value. - */ -#define __HAL_ETH_DMATXDESC_GET_COLLISION_COUNT(__HANDLE__) (((__HANDLE__)->TxDesc->Status & ETH_DMATXDESC_CC) >> ETH_DMATXDESC_COLLISION_COUNTSHIFT) - -/** - * @brief Set the specified DMA Tx Desc Own bit. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_SET_OWN_BIT(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_OWN) - -/** - * @brief Enables the specified DMA Tx Desc Transmit interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_ENABLE_IT(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_IC) - -/** - * @brief Disables the specified DMA Tx Desc Transmit interrupt. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_DISABLE_IT(__HANDLE__) ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_IC) - -/** - * @brief Selects the specified Ethernet DMA Tx Desc Checksum Insertion. - * @param __HANDLE__: ETH Handle - * @param __CHECKSUM__: specifies is the DMA Tx desc checksum insertion. - * This parameter can be one of the following values: - * @arg ETH_DMATXDESC_CHECKSUMBYPASS : Checksum bypass - * @arg ETH_DMATXDESC_CHECKSUMIPV4HEADER : IPv4 header checksum - * @arg ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT : TCP/UDP/ICMP checksum. Pseudo header checksum is assumed to be present - * @arg ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL : TCP/UDP/ICMP checksum fully in hardware including pseudo header - * @retval None - */ -#define __HAL_ETH_DMATXDESC_CHECKSUM_INSERTION(__HANDLE__, __CHECKSUM__) ((__HANDLE__)->TxDesc->Status |= (__CHECKSUM__)) - -/** - * @brief Enables the DMA Tx Desc CRC. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_CRC_ENABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_DC) - -/** - * @brief Disables the DMA Tx Desc CRC. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_CRC_DISABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_DC) - -/** - * @brief Enables the DMA Tx Desc padding for frame shorter than 64 bytes. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_SHORT_FRAME_PADDING_ENABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_DP) - -/** - * @brief Disables the DMA Tx Desc padding for frame shorter than 64 bytes. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_DMATXDESC_SHORT_FRAME_PADDING_DISABLE(__HANDLE__) ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_DP) - -/** - * @brief Enables the specified Ethernet MAC interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet MAC interrupt sources to be - * enabled or disabled. - * This parameter can be any combination of the following values: - * @arg ETH_MAC_IT_TST : Time stamp trigger interrupt - * @arg ETH_MAC_IT_PMT : PMT interrupt - * @retval None - */ -#define __HAL_ETH_MAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MACIMR |= (__INTERRUPT__)) - -/** - * @brief Disables the specified Ethernet MAC interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet MAC interrupt sources to be - * enabled or disabled. - * This parameter can be any combination of the following values: - * @arg ETH_MAC_IT_TST : Time stamp trigger interrupt - * @arg ETH_MAC_IT_PMT : PMT interrupt - * @retval None - */ -#define __HAL_ETH_MAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MACIMR &= ~(__INTERRUPT__)) - -/** - * @brief Initiate a Pause Control Frame (Full-duplex only). - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_INITIATE_PAUSE_CONTROL_FRAME(__HANDLE__) ((__HANDLE__)->Instance->MACFCR |= ETH_MACFCR_FCBBPA) - -/** - * @brief Checks whether the Ethernet flow control busy bit is set or not. - * @param __HANDLE__: ETH Handle - * @retval The new state of flow control busy status bit (SET or RESET). - */ -#define __HAL_ETH_GET_FLOW_CONTROL_BUSY_STATUS(__HANDLE__) (((__HANDLE__)->Instance->MACFCR & ETH_MACFCR_FCBBPA) == ETH_MACFCR_FCBBPA) - -/** - * @brief Enables the MAC Back Pressure operation activation (Half-duplex only). - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_BACK_PRESSURE_ACTIVATION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACFCR |= ETH_MACFCR_FCBBPA) - -/** - * @brief Disables the MAC BackPressure operation activation (Half-duplex only). - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_BACK_PRESSURE_ACTIVATION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACFCR &= ~ETH_MACFCR_FCBBPA) - -/** - * @brief Checks whether the specified Ethernet MAC flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag to check. - * This parameter can be one of the following values: - * @arg ETH_MAC_FLAG_TST : Time stamp trigger flag - * @arg ETH_MAC_FLAG_MMCT : MMC transmit flag - * @arg ETH_MAC_FLAG_MMCR : MMC receive flag - * @arg ETH_MAC_FLAG_MMC : MMC flag - * @arg ETH_MAC_FLAG_PMT : PMT flag - * @retval The state of Ethernet MAC flag. - */ -#define __HAL_ETH_MAC_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->MACSR &( __FLAG__)) == ( __FLAG__)) - -/** - * @brief Enables the specified Ethernet DMA interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet DMA interrupt sources to be - * enabled @ref ETH_DMA_Interrupts - * @retval None - */ -#define __HAL_ETH_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMAIER |= (__INTERRUPT__)) - -/** - * @brief Disables the specified Ethernet DMA interrupts. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the Ethernet DMA interrupt sources to be - * disabled. @ref ETH_DMA_Interrupts - * @retval None - */ -#define __HAL_ETH_DMA_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMAIER &= ~(__INTERRUPT__)) - -/** - * @brief Clears the Ethernet DMA IT pending bit. - * @param __HANDLE__ : ETH Handle - * @param __INTERRUPT__: specifies the interrupt pending bit to clear. @ref ETH_DMA_Interrupts - * @retval None - */ -#define __HAL_ETH_DMA_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMASR =(__INTERRUPT__)) - -/** - * @brief Checks whether the specified Ethernet DMA flag is set or not. -* @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag to check. @ref ETH_DMA_Flags - * @retval The new state of ETH_DMA_FLAG (SET or RESET). - */ -#define __HAL_ETH_DMA_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->DMASR &( __FLAG__)) == ( __FLAG__)) - -/** - * @brief Checks whether the specified Ethernet DMA flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __FLAG__: specifies the flag to clear. @ref ETH_DMA_Flags - * @retval The new state of ETH_DMA_FLAG (SET or RESET). - */ -#define __HAL_ETH_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->DMASR = (__FLAG__)) - -/** - * @brief Checks whether the specified Ethernet DMA overflow flag is set or not. - * @param __HANDLE__: ETH Handle - * @param __OVERFLOW__: specifies the DMA overflow flag to check. - * This parameter can be one of the following values: - * @arg ETH_DMA_OVERFLOW_RXFIFOCOUNTER : Overflow for FIFO Overflows Counter - * @arg ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER : Overflow for Buffer Unavailable Missed Frame Counter - * @retval The state of Ethernet DMA overflow Flag (SET or RESET). - */ -#define __HAL_ETH_GET_DMA_OVERFLOW_STATUS(__HANDLE__, __OVERFLOW__) (((__HANDLE__)->Instance->DMAMFBOCR & (__OVERFLOW__)) == (__OVERFLOW__)) - -/** - * @brief Set the DMA Receive status watchdog timer register value - * @param __HANDLE__: ETH Handle - * @param __VALUE__: DMA Receive status watchdog timer register value - * @retval None - */ -#define __HAL_ETH_SET_RECEIVE_WATCHDOG_TIMER(__HANDLE__, __VALUE__) ((__HANDLE__)->Instance->DMARSWTR = (__VALUE__)) - -/** - * @brief Enables any unicast packet filtered by the MAC address - * recognition to be a wake-up frame. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_GLOBAL_UNICAST_WAKEUP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_GU) - -/** - * @brief Disables any unicast packet filtered by the MAC address - * recognition to be a wake-up frame. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_GLOBAL_UNICAST_WAKEUP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_GU) - -/** - * @brief Enables the MAC Wake-Up Frame Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_WAKEUP_FRAME_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_WFE) - -/** - * @brief Disables the MAC Wake-Up Frame Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_WAKEUP_FRAME_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_WFE) - -/** - * @brief Enables the MAC Magic Packet Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MAGIC_PACKET_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_MPE) - -/** - * @brief Disables the MAC Magic Packet Detection. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MAGIC_PACKET_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_WFE) - -/** - * @brief Enables the MAC Power Down. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_POWER_DOWN_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_PD) - -/** - * @brief Disables the MAC Power Down. - * @param __HANDLE__: ETH Handle - * @retval None - */ -#define __HAL_ETH_POWER_DOWN_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_PD) - -/** - * @brief Checks whether the specified Ethernet PMT flag is set or not. - * @param __HANDLE__: ETH Handle. - * @param __FLAG__: specifies the flag to check. - * This parameter can be one of the following values: - * @arg ETH_PMT_FLAG_WUFFRPR : Wake-Up Frame Filter Register Pointer Reset - * @arg ETH_PMT_FLAG_WUFR : Wake-Up Frame Received - * @arg ETH_PMT_FLAG_MPR : Magic Packet Received - * @retval The new state of Ethernet PMT Flag (SET or RESET). - */ -#define __HAL_ETH_GET_PMT_FLAG_STATUS(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->MACPMTCSR &( __FLAG__)) == ( __FLAG__)) - -/** - * @brief Preset and Initialize the MMC counters to almost-full value: 0xFFFF_FFF0 (full - 16) - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_FULL_PRESET(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= (ETH_MMCCR_MCFHP | ETH_MMCCR_MCP)) - -/** - * @brief Preset and Initialize the MMC counters to almost-half value: 0x7FFF_FFF0 (half - 16) - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_HALF_PRESET(__HANDLE__) do{(__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_MCFHP;\ - (__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_MCP;} while (0) - -/** - * @brief Enables the MMC Counter Freeze. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_FREEZE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_MCF) - -/** - * @brief Disables the MMC Counter Freeze. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTER_FREEZE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_MCF) - -/** - * @brief Enables the MMC Reset On Read. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_RESET_ONREAD_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_ROR) - -/** - * @brief Disables the MMC Reset On Read. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_RESET_ONREAD_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_ROR) - -/** - * @brief Enables the MMC Counter Stop Rollover. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_COUNTER_ROLLOVER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_CSR) - -/** - * @brief Disables the MMC Counter Stop Rollover. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_ETH_MMC_COUNTER_ROLLOVER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_CSR) - -/** - * @brief Resets the MMC Counters. - * @param __HANDLE__: ETH Handle. - * @retval None - */ -#define __HAL_ETH_MMC_COUNTERS_RESET(__HANDLE__) ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_CR) - -/** - * @brief Enables the specified Ethernet MMC Rx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_RGUF : When Rx good unicast frames counter reaches half the maximum value - * @arg ETH_MMC_IT_RFAE : When Rx alignment error counter reaches half the maximum value - * @arg ETH_MMC_IT_RFCE : When Rx crc error counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_RX_IT_ENABLE(__HANDLE__, __INTERRUPT__) (__HANDLE__)->Instance->MMCRIMR &= ~((__INTERRUPT__) & 0xEFFFFFFF) -/** - * @brief Disables the specified Ethernet MMC Rx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_RGUF : When Rx good unicast frames counter reaches half the maximum value - * @arg ETH_MMC_IT_RFAE : When Rx alignment error counter reaches half the maximum value - * @arg ETH_MMC_IT_RFCE : When Rx crc error counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_RX_IT_DISABLE(__HANDLE__, __INTERRUPT__) (__HANDLE__)->Instance->MMCRIMR |= ((__INTERRUPT__) & 0xEFFFFFFF) -/** - * @brief Enables the specified Ethernet MMC Tx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_TGF : When Tx good frame counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFMSC: When Tx good multi col counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFSC : When Tx good single col counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_TX_IT_ENABLE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MMCRIMR &= ~ (__INTERRUPT__)) - -/** - * @brief Disables the specified Ethernet MMC Tx interrupts. - * @param __HANDLE__: ETH Handle. - * @param __INTERRUPT__: specifies the Ethernet MMC interrupt sources to be enabled or disabled. - * This parameter can be one of the following values: - * @arg ETH_MMC_IT_TGF : When Tx good frame counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFMSC: When Tx good multi col counter reaches half the maximum value - * @arg ETH_MMC_IT_TGFSC : When Tx good single col counter reaches half the maximum value - * @retval None - */ -#define __HAL_ETH_MMC_TX_IT_DISABLE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MMCRIMR |= (__INTERRUPT__)) - -/** - * @brief Enables the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_IT() EXTI->IMR |= (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Disables the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_IT() EXTI->IMR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enable event on ETH External event line. - * @retval None. - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_EVENT() EXTI->EMR |= (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Disable event on ETH External event line - * @retval None. - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_EVENT() EXTI->EMR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Get flag of the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_GET_FLAG() EXTI->PR & (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Clear flag of the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG() EXTI->PR = (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enables rising edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_RISING_EDGE_TRIGGER() EXTI->RTSR |= ETH_EXTI_LINE_WAKEUP - -/** - * @brief Disables the rising edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_RISING_EDGE_TRIGGER() EXTI->RTSR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enables falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLING_EDGE_TRIGGER() EXTI->FTSR |= (ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Disables falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_FALLING_EDGE_TRIGGER() EXTI->FTSR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Enables rising/falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLINGRISING_TRIGGER() EXTI->RTSR |= ETH_EXTI_LINE_WAKEUP;\ - EXTI->FTSR |= ETH_EXTI_LINE_WAKEUP - -/** - * @brief Disables rising/falling edge trigger to the ETH External interrupt line. - * @retval None - */ -#define __HAL_ETH_WAKEUP_EXTI_DISABLE_FALLINGRISING_TRIGGER() EXTI->RTSR &= ~(ETH_EXTI_LINE_WAKEUP);\ - EXTI->FTSR &= ~(ETH_EXTI_LINE_WAKEUP) - -/** - * @brief Generate a Software interrupt on selected EXTI line. - * @retval None. - */ -#define __HAL_ETH_WAKEUP_EXTI_GENERATE_SWIT() EXTI->SWIER|= ETH_EXTI_LINE_WAKEUP - -/** - * @} - */ -/* Exported functions --------------------------------------------------------*/ - -/** @addtogroup ETH_Exported_Functions - * @{ - */ - -/* Initialization and de-initialization functions ****************************/ - -/** @addtogroup ETH_Exported_Functions_Group1 - * @{ - */ -HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth); -void HAL_ETH_MspInit(ETH_HandleTypeDef *heth); -void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount); -HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount); - -/** - * @} - */ -/* IO operation functions ****************************************************/ - -/** @addtogroup ETH_Exported_Functions_Group2 - * @{ - */ -HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength); -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth); -/* Communication with PHY functions*/ -HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue); -HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue); -/* Non-Blocking mode: Interrupt */ -HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth); -void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth); -/* Callback in non blocking modes (Interrupt) */ -void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth); -void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth); -void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth); -/** - * @} - */ - -/* Peripheral Control functions **********************************************/ - -/** @addtogroup ETH_Exported_Functions_Group3 - * @{ - */ - -HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth); -HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf); -HAL_StatusTypeDef HAL_ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_DMAInitTypeDef *dmaconf); -/** - * @} - */ - -/* Peripheral State functions ************************************************/ - -/** @addtogroup ETH_Exported_Functions_Group4 - * @{ - */ -HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth); -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -#ifdef __cplusplus -} -#endif - -#endif /* __STM32Fxx_HAL_ETH_H */ - - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/FaultInjection.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/FaultInjection.c index 502fbd661..8e64a40cc 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/FaultInjection.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/FaultInjection.c @@ -1,175 +1,175 @@ -#define xBUFFER_CACHE_SIZE 10 -#define xMAX_FAULT_INJECTION_RATE 15 -#define xMIN_FAULT_INJECTION_RATE 3 -#define xNUM_FAULT_TYPES 1 - -static NetworkBufferDescriptor_t *xNetworkBufferCache[ xBUFFER_CACHE_SIZE ] = { 0 }; - -#define xFAULT_LOG_SIZE 2048 -uint32_t ulInjectedFault[ xFAULT_LOG_SIZE ]; -uint32_t ulFaultLogIndex = 0; - -static BaseType_t prvCachePacket( NetworkBufferDescriptor_t *pxNetworkBufferIn ) -{ -BaseType_t x, xReturn = pdFALSE; - - for( x = 0; x < xBUFFER_CACHE_SIZE; x++ ) - { - if( xNetworkBufferCache[ x ] == NULL ) - { - xNetworkBufferCache[ x ] = pxNetworkBufferIn; - xReturn = pdTRUE; - break; - } - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static NetworkBufferDescriptor_t *prvGetCachedPacket( void ) -{ -BaseType_t x; -NetworkBufferDescriptor_t *pxReturn = NULL; - - for( x = ( xBUFFER_CACHE_SIZE - 1 ); x >= 0; x-- ) - { - if( xNetworkBufferCache[ x ] != NULL ) - { - pxReturn = xNetworkBufferCache[ x ]; - xNetworkBufferCache[ x ] = NULL; - break; - } - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ - -static NetworkBufferDescriptor_t *prvDuplicatePacket( NetworkBufferDescriptor_t * pxOriginalPacket, const uint8_t *pucPacketData ) -{ -NetworkBufferDescriptor_t *pxReturn; - - /* Obtain a new descriptor. */ - pxReturn = pxGetNetworkBufferWithDescriptor( pxOriginalPacket->xDataLength, 0 ); - - if( pxReturn != NULL ) - { - /* Copy in the packet data. */ - pxReturn->xDataLength = pxOriginalPacket->xDataLength; - memcpy( pxReturn->pucEthernetBuffer, pucPacketData, pxOriginalPacket->xDataLength ); - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ - -static NetworkBufferDescriptor_t *prvRxFaultInjection( NetworkBufferDescriptor_t *pxNetworkBufferIn, const uint8_t *pucPacketData ) -{ -static uint32_t ulCallCount = 0, ulNextFaultCallCount = 0; -NetworkBufferDescriptor_t *pxReturn = pxNetworkBufferIn; -IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; -uint32_t ulFault; - -return pxNetworkBufferIn; - - ulCallCount++; - - if( ulCallCount > ulNextFaultCallCount ) - { - xApplicationGetRandomNumber( &( ulNextFaultCallCount ) ); - ulNextFaultCallCount = ulNextFaultCallCount % xMAX_FAULT_INJECTION_RATE; - if( ulNextFaultCallCount < xMIN_FAULT_INJECTION_RATE ) - { - ulNextFaultCallCount = xMIN_FAULT_INJECTION_RATE; - } - - ulCallCount = 0; - - xApplicationGetRandomNumber( &( ulFault ) ); - ulFault = ulFault % xNUM_FAULT_TYPES; - - if( ulFaultLogIndex < xFAULT_LOG_SIZE ) - { - ulInjectedFault[ ulFaultLogIndex ] = ulFault; - ulFaultLogIndex++; - } - - switch( ulFault ) - { - case 0: - /* Just drop the packet. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); - pxReturn = NULL; - break; - - case 1: - /* Store the packet in the cache for later. */ - if( prvCachePacket( pxNetworkBufferIn ) == pdTRUE ) - { - /* The packet may get sent later, it is not being sent - now. */ - pxReturn = NULL; - } - break; - - case 2: - /* Send a cached packet. */ - pxReturn = prvGetCachedPacket(); - if( pxReturn != NULL ) - { - /* A cached packet was obtained so drop the original - packet. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); - } - else - { - /* Could not obtain a packet from the cache so just return - the packet that was passed in. */ - pxReturn = pxNetworkBufferIn; - } - break; - - case 4: - - /* Send a duplicate of the packet right away. */ - pxReturn = prvDuplicatePacket( pxNetworkBufferIn, pucPacketData ); - - /* Send the original packet to the stack. */ - xRxEvent.pvData = ( void * ) pxNetworkBufferIn; - if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); - } - break; - - case 5: - - /* Send both a cached packet and the current packet. */ - xRxEvent.pvData = ( void * ) prvGetCachedPacket(); - if( xRxEvent.pvData != NULL ) - { - if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); - } - } - break; - - case 6: - case 7: - case 8: - /* Store the packet in the cache for later. */ - if( prvCachePacket( pxNetworkBufferIn ) == pdTRUE ) - { - /* The packet may get sent later, it is not being sent - now. */ - pxReturn = NULL; - } - break; - } - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ +#define xBUFFER_CACHE_SIZE 10 +#define xMAX_FAULT_INJECTION_RATE 15 +#define xMIN_FAULT_INJECTION_RATE 3 +#define xNUM_FAULT_TYPES 1 + +static NetworkBufferDescriptor_t *xNetworkBufferCache[ xBUFFER_CACHE_SIZE ] = { 0 }; + +#define xFAULT_LOG_SIZE 2048 +uint32_t ulInjectedFault[ xFAULT_LOG_SIZE ]; +uint32_t ulFaultLogIndex = 0; + +static BaseType_t prvCachePacket( NetworkBufferDescriptor_t *pxNetworkBufferIn ) +{ +BaseType_t x, xReturn = pdFALSE; + + for( x = 0; x < xBUFFER_CACHE_SIZE; x++ ) + { + if( xNetworkBufferCache[ x ] == NULL ) + { + xNetworkBufferCache[ x ] = pxNetworkBufferIn; + xReturn = pdTRUE; + break; + } + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static NetworkBufferDescriptor_t *prvGetCachedPacket( void ) +{ +BaseType_t x; +NetworkBufferDescriptor_t *pxReturn = NULL; + + for( x = ( xBUFFER_CACHE_SIZE - 1 ); x >= 0; x-- ) + { + if( xNetworkBufferCache[ x ] != NULL ) + { + pxReturn = xNetworkBufferCache[ x ]; + xNetworkBufferCache[ x ] = NULL; + break; + } + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ + +static NetworkBufferDescriptor_t *prvDuplicatePacket( NetworkBufferDescriptor_t * pxOriginalPacket, const uint8_t *pucPacketData ) +{ +NetworkBufferDescriptor_t *pxReturn; + + /* Obtain a new descriptor. */ + pxReturn = pxGetNetworkBufferWithDescriptor( pxOriginalPacket->xDataLength, 0 ); + + if( pxReturn != NULL ) + { + /* Copy in the packet data. */ + pxReturn->xDataLength = pxOriginalPacket->xDataLength; + memcpy( pxReturn->pucEthernetBuffer, pucPacketData, pxOriginalPacket->xDataLength ); + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ + +static NetworkBufferDescriptor_t *prvRxFaultInjection( NetworkBufferDescriptor_t *pxNetworkBufferIn, const uint8_t *pucPacketData ) +{ +static uint32_t ulCallCount = 0, ulNextFaultCallCount = 0; +NetworkBufferDescriptor_t *pxReturn = pxNetworkBufferIn; +IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; +uint32_t ulFault; + +return pxNetworkBufferIn; + + ulCallCount++; + + if( ulCallCount > ulNextFaultCallCount ) + { + xApplicationGetRandomNumber( &( ulNextFaultCallCount ) ); + ulNextFaultCallCount = ulNextFaultCallCount % xMAX_FAULT_INJECTION_RATE; + if( ulNextFaultCallCount < xMIN_FAULT_INJECTION_RATE ) + { + ulNextFaultCallCount = xMIN_FAULT_INJECTION_RATE; + } + + ulCallCount = 0; + + xApplicationGetRandomNumber( &( ulFault ) ); + ulFault = ulFault % xNUM_FAULT_TYPES; + + if( ulFaultLogIndex < xFAULT_LOG_SIZE ) + { + ulInjectedFault[ ulFaultLogIndex ] = ulFault; + ulFaultLogIndex++; + } + + switch( ulFault ) + { + case 0: + /* Just drop the packet. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); + pxReturn = NULL; + break; + + case 1: + /* Store the packet in the cache for later. */ + if( prvCachePacket( pxNetworkBufferIn ) == pdTRUE ) + { + /* The packet may get sent later, it is not being sent + now. */ + pxReturn = NULL; + } + break; + + case 2: + /* Send a cached packet. */ + pxReturn = prvGetCachedPacket(); + if( pxReturn != NULL ) + { + /* A cached packet was obtained so drop the original + packet. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); + } + else + { + /* Could not obtain a packet from the cache so just return + the packet that was passed in. */ + pxReturn = pxNetworkBufferIn; + } + break; + + case 4: + + /* Send a duplicate of the packet right away. */ + pxReturn = prvDuplicatePacket( pxNetworkBufferIn, pucPacketData ); + + /* Send the original packet to the stack. */ + xRxEvent.pvData = ( void * ) pxNetworkBufferIn; + if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); + } + break; + + case 5: + + /* Send both a cached packet and the current packet. */ + xRxEvent.pvData = ( void * ) prvGetCachedPacket(); + if( xRxEvent.pvData != NULL ) + { + if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBufferIn ); + } + } + break; + + case 6: + case 7: + case 8: + /* Store the packet in the cache for later. */ + if( prvCachePacket( pxNetworkBufferIn ) == pdTRUE ) + { + /* The packet may get sent later, it is not being sent + now. */ + pxReturn = NULL; + } + break; + } + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/NetworkInterface.c index 474629e46..c4a12515b 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/WinPCap/NetworkInterface.c @@ -1,634 +1,634 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* WinPCap includes. */ -#define HAVE_REMOTE -#include "pcap.h" - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" - -/* Thread-safe circular buffers are being used to pass data to and from the PCAP -access functions. */ -#include "Win32-Extensions.h" -#include "FreeRTOS_Stream_Buffer.h" - -/* Sizes of the thread safe circular buffers used to pass data to and from the -WinPCAP Windows threads. */ -#define xSEND_BUFFER_SIZE 32768 -#define xRECV_BUFFER_SIZE 32768 - -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet -driver will filter incoming packets and only pass the stack those packets it -considers need processing. */ -#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#else - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#endif - -/* Used to insert test code only. */ -#define niDISRUPT_PACKETS 0 - -/*-----------------------------------------------------------*/ - -/* - * Windows threads that are outside of the control of the FreeRTOS simulator are - * used to interface with the WinPCAP libraries. - */ -DWORD WINAPI prvWinPcapRecvThread( void *pvParam ); -DWORD WINAPI prvWinPcapSendThread( void *pvParam ); - -/* - * Print out a numbered list of network interfaces that are available on the - * host computer. - */ -static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ); - -/* - * Open the network interface. The number of the interface to be opened is set - * by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. - */ -static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ); -static int prvOpenInterface( const char *pucName ); - -/* - * Configure the capture filter to allow blocking reads, and to filter out - * packets that are not of interest to this demo. - */ -static void prvConfigureCaptureBehaviour( void ); - -/* - * A function that simulates Ethernet interrupts by periodically polling the - * WinPCap interface for new data. - */ -static void prvInterruptSimulatorTask( void *pvParameters ); - -/* - * Create the buffers that are used to pass data between the FreeRTOS simulator - * and the Win32 threads that manage WinPCAP. - */ -static void prvCreateThreadSafeBuffers( void ); - -/* - * Utility function used to format print messages only. - */ -static const char *prvRemoveSpaces( char *pcBuffer, int aBuflen, const char *pcMessage ); - -/*-----------------------------------------------------------*/ - -/* Required by the WinPCap library. */ -static char cErrorBuffer[ PCAP_ERRBUF_SIZE ]; - -/* An event used to wake up the Win32 thread that sends data through the WinPCAP -library. */ -static void *pvSendEvent = NULL; - -/* _HT_ made the PCAP interface number configurable through the program's -parameters in order to test in different machines. */ -static BaseType_t xConfigNetworkInterfaceToUse = configNETWORK_INTERFACE_TO_USE; - -/* Handles to the Windows threads that handle the PCAP IO. */ -static HANDLE vWinPcapRecvThreadHandle = NULL; -static HANDLE vWinPcapSendThreadHandle = NULL;; - -/* The interface being used by WinPCap. */ -static pcap_t *pxOpenedInterfaceHandle = NULL; - -/* Circular buffers used by the PCAP Win32 threads. */ -static StreamBuffer_t *xSendBuffer = NULL; -static StreamBuffer_t *xRecvBuffer = NULL; - -/* The MAC address initially set to the constants defined in FreeRTOSConfig.h. */ -extern uint8_t ucMACAddress[ 6 ]; - -/* Logs the number of WinPCAP send failures, for viewing in the debugger only. */ -static volatile uint32_t ulWinPCAPSendFailures = 0; - -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -BaseType_t xReturn = pdFALSE; -pcap_if_t *pxAllNetworkInterfaces; - - /* Query the computer the simulation is being executed on to find the - network interfaces it has installed. */ - pxAllNetworkInterfaces = prvPrintAvailableNetworkInterfaces(); - - /* Open the network interface. The number of the interface to be opened is - set by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. - Calling this function will set the pxOpenedInterfaceHandle variable. If, - after calling this function, pxOpenedInterfaceHandle is equal to NULL, then - the interface could not be opened. */ - if( pxAllNetworkInterfaces != NULL ) - { - prvOpenSelectedNetworkInterface( pxAllNetworkInterfaces ); - } - - if( pxOpenedInterfaceHandle != NULL ) - { - xReturn = pdPASS; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static void prvCreateThreadSafeBuffers( void ) -{ - /* The buffer used to pass data to be transmitted from a FreeRTOS task to - the Win32 thread that sends via the WinPCAP library. */ - if( xSendBuffer == NULL) - { - xSendBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xSendBuffer ) - sizeof( xSendBuffer->ucArray ) + xSEND_BUFFER_SIZE + 1 ); - configASSERT( xSendBuffer ); - memset( xSendBuffer, '\0', sizeof( *xSendBuffer ) - sizeof( xSendBuffer->ucArray ) ); - xSendBuffer->LENGTH = xSEND_BUFFER_SIZE + 1; - } - - /* The buffer used to pass received data from the Win32 thread that receives - via the WinPCAP library to the FreeRTOS task. */ - if( xRecvBuffer == NULL) - { - xRecvBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xRecvBuffer ) - sizeof( xRecvBuffer->ucArray ) + xRECV_BUFFER_SIZE + 1 ); - configASSERT( xRecvBuffer ); - memset( xRecvBuffer, '\0', sizeof( *xRecvBuffer ) - sizeof( xRecvBuffer->ucArray ) ); - xRecvBuffer->LENGTH = xRECV_BUFFER_SIZE + 1; - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t bReleaseAfterSend ) -{ -size_t xSpace; - - iptraceNETWORK_INTERFACE_TRANSMIT(); - configASSERT( xIsCallingFromIPTask() == pdTRUE ); - - /* Both the length of the data being sent and the actual data being sent - are placed in the thread safe buffer used to pass data between the FreeRTOS - tasks and the Win32 thread that sends data via the WinPCAP library. Drop - the packet if there is insufficient space in the buffer to hold both. */ - xSpace = uxStreamBufferGetSpace( xSendBuffer ); - - if( ( pxNetworkBuffer->xDataLength <= ( ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ) ) && - ( xSpace >= ( pxNetworkBuffer->xDataLength + sizeof( pxNetworkBuffer->xDataLength ) ) ) ) - { - /* First write in the length of the data, then write in the data - itself. */ - uxStreamBufferAdd( xSendBuffer, 0, ( const uint8_t * ) &( pxNetworkBuffer->xDataLength ), sizeof( pxNetworkBuffer->xDataLength ) ); - uxStreamBufferAdd( xSendBuffer, 0, ( const uint8_t * ) pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength ); - } - else - { - FreeRTOS_debug_printf( ( "xNetworkInterfaceOutput: send buffers full to store %lu\n", pxNetworkBuffer->xDataLength ) ); - } - - /* Kick the Tx task in either case in case it doesn't know the buffer is - full. */ - SetEvent( pvSendEvent ); - - /* The buffer has been sent so can be released. */ - if( bReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - - return pdPASS; -} -/*-----------------------------------------------------------*/ - -static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ) -{ -pcap_if_t * pxAllNetworkInterfaces = NULL, *xInterface; -int32_t lInterfaceNumber = 1; -char cBuffer[ 512 ]; -static BaseType_t xInvalidInterfaceDetected = pdFALSE; - - if( xInvalidInterfaceDetected == pdFALSE ) - { - if( pcap_findalldevs_ex( PCAP_SRC_IF_STRING, NULL, &pxAllNetworkInterfaces, cErrorBuffer ) == -1 ) - { - printf( "Could not obtain a list of network interfaces\n%s\n", cErrorBuffer ); - pxAllNetworkInterfaces = NULL; - } - else - { - printf( "\r\n\r\nThe following network interfaces are available:\r\n\r\n" ); - } - - if( pxAllNetworkInterfaces != NULL ) - { - /* Print out the list of network interfaces. The first in the list - is interface '1', not interface '0'. */ - for( xInterface = pxAllNetworkInterfaces; xInterface != NULL; xInterface = xInterface->next ) - { - /* The descriptions of the devices can be full of spaces, clean them - a little. printf() can only be used here because the network is not - up yet - so no other network tasks will be running. */ - printf( "Interface %d - %s\n", lInterfaceNumber, prvRemoveSpaces( cBuffer, sizeof( cBuffer ), xInterface->name ) ); - printf( " (%s)\n", prvRemoveSpaces(cBuffer, sizeof( cBuffer ), xInterface->description ? xInterface->description : "No description" ) ); - printf( "\n" ); - lInterfaceNumber++; - } - } - - if( lInterfaceNumber == 1 ) - { - /* The interface number was never incremented, so the above for() loop - did not execute meaning no interfaces were found. */ - printf( " \nNo network interfaces were found.\n" ); - pxAllNetworkInterfaces = NULL; - } - - printf( "\r\nThe interface that will be opened is set by " ); - printf( "\"configNETWORK_INTERFACE_TO_USE\", which\r\nshould be defined in FreeRTOSConfig.h\r\n" ); - - if( ( xConfigNetworkInterfaceToUse < 1L ) || ( xConfigNetworkInterfaceToUse >= lInterfaceNumber ) ) - { - printf( "\r\nERROR: configNETWORK_INTERFACE_TO_USE is set to %d, which is an invalid value.\r\n", xConfigNetworkInterfaceToUse ); - printf( "Please set configNETWORK_INTERFACE_TO_USE to one of the interface numbers listed above,\r\n" ); - printf( "then re-compile and re-start the application. Only Ethernet (as opposed to WiFi)\r\n" ); - printf( "interfaces are supported.\r\n\r\nHALTING\r\n\r\n\r\n" ); - xInvalidInterfaceDetected = pdTRUE; - - if( pxAllNetworkInterfaces != NULL ) - { - /* Free the device list, as no devices are going to be opened. */ - pcap_freealldevs( pxAllNetworkInterfaces ); - pxAllNetworkInterfaces = NULL; - } - } - else - { - printf( "Attempting to open interface number %d.\n", xConfigNetworkInterfaceToUse ); - } - } - - return pxAllNetworkInterfaces; -} -/*-----------------------------------------------------------*/ - -static int prvOpenInterface( const char *pucName ) -{ -static char pucInterfaceName[ 256 ]; - - if( pucName != NULL ) - { - strncpy( pucInterfaceName, pucName, sizeof( pucInterfaceName ) ); - } - - pxOpenedInterfaceHandle = pcap_open( pucInterfaceName, /* The name of the selected interface. */ - ipTOTAL_ETHERNET_FRAME_SIZE, /* The size of the packet to capture. */ - PCAP_OPENFLAG_PROMISCUOUS, /* Open in promiscuous mode as the MAC and - IP address is going to be "simulated", and - not be the real MAC and IP address. This allows - traffic to the simulated IP address to be routed - to uIP, and traffic to the real IP address to be - routed to the Windows TCP/IP stack. */ - 100, - NULL, /* No authentication is required as this is - not a remote capture session. */ - cErrorBuffer - ); - - if ( pxOpenedInterfaceHandle == NULL ) - { - printf( "\n%s is not supported by WinPcap and cannot be opened\n", pucInterfaceName ); - return 1; - } - else - { - /* Configure the capture filter to allow blocking reads, and to filter - out packets that are not of interest to this demo. */ - prvConfigureCaptureBehaviour(); - } - return 0; -} -/*-----------------------------------------------------------*/ - -static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ) -{ -pcap_if_t *pxInterface; -int32_t x; - - /* Walk the list of devices until the selected device is located. */ - pxInterface = pxAllNetworkInterfaces; - for( x = 0L; x < ( xConfigNetworkInterfaceToUse - 1L ); x++ ) - { - pxInterface = pxInterface->next; - } - - /* Open the selected interface. */ - if( prvOpenInterface( pxInterface->name ) == 0 ) - { - printf( "Successfully opened interface number %d.\n", x + 1 ); - } - else - { - printf( "Failed to open interface number %d.\n", x + 1 ); - } - - /* The device list is no longer required. */ - pcap_freealldevs( pxAllNetworkInterfaces ); -} -/*-----------------------------------------------------------*/ - -static void prvConfigureCaptureBehaviour( void ) -{ -struct bpf_program xFilterCode; -uint32_t ulNetMask; - - /* Set up a filter so only the packets of interest are passed to the IP - stack. cErrorBuffer is used for convenience to create the string. Don't - confuse this with an error message. */ - sprintf( cErrorBuffer, "broadcast or multicast or ether host %x:%x:%x:%x:%x:%x", - ucMACAddress[0], ucMACAddress[1], ucMACAddress[2], ucMACAddress[3], ucMACAddress[4], ucMACAddress[5] ); - - ulNetMask = ( configNET_MASK3 << 24UL ) | ( configNET_MASK2 << 16UL ) | ( configNET_MASK1 << 8L ) | configNET_MASK0; - - if( pcap_compile( pxOpenedInterfaceHandle, &xFilterCode, cErrorBuffer, 1, ulNetMask ) < 0 ) - { - printf( "\nThe packet filter string is invalid\n" ); - } - else - { - if( pcap_setfilter( pxOpenedInterfaceHandle, &xFilterCode ) < 0 ) - { - printf( "\nAn error occurred setting the packet filter.\n" ); - } - /* When pcap_compile() succeeds, it allocates memory for the memory pointed to by the bpf_program struct - parameter.pcap_freecode() will free that memory. */ - pcap_freecode( &xFilterCode ); - } - - /* Create the buffers used to pass packets between the FreeRTOS simulator - and the Win32 threads that are handling WinPCAP. */ - prvCreateThreadSafeBuffers(); - - if( pvSendEvent == NULL ) - { - /* Create event used to signal the Win32 WinPCAP Tx thread. */ - pvSendEvent = CreateEvent( NULL, FALSE, TRUE, NULL ); - - /* Create the Win32 thread that handles WinPCAP Rx. */ - vWinPcapRecvThreadHandle = CreateThread( - NULL, /* Pointer to thread security attributes. */ - 0, /* Initial thread stack size, in bytes. */ - prvWinPcapRecvThread, /* Pointer to thread function. */ - NULL, /* Argument for new thread. */ - 0, /* Creation flags. */ - NULL ); - - /* Use the cores that are not used by the FreeRTOS tasks. */ - SetThreadAffinityMask( vWinPcapRecvThreadHandle, ~0x01u ); - - /* Create the Win32 thread that handlers WinPCAP Tx. */ - vWinPcapSendThreadHandle = CreateThread( - NULL, /* Pointer to thread security attributes. */ - 0, /* initial thread stack size, in bytes. */ - prvWinPcapSendThread, /* Pointer to thread function. */ - NULL, /* Argument for new thread. */ - 0, /* Creation flags. */ - NULL ); - - /* Use the cores that are not used by the FreeRTOS tasks. */ - SetThreadAffinityMask( vWinPcapSendThreadHandle, ~0x01u ); - - /* Create a task that simulates an interrupt in a real system. This will - block waiting for packets, then send a message to the IP task when data - is available. */ - xTaskCreate( prvInterruptSimulatorTask, "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, configMAC_ISR_SIMULATOR_PRIORITY, NULL ); - } -} -/*-----------------------------------------------------------*/ - -/* WinPCAP function. */ -void pcap_callback( u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data ) -{ - (void)user; - - /* THIS IS CALLED FROM A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS - OR TO PRINT OUT MESSAGES HERE. */ - - /* Pass data to the FreeRTOS simulator on a thread safe circular buffer. */ - if( ( pkt_header->caplen <= ( ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ) ) && - ( uxStreamBufferGetSpace( xRecvBuffer ) >= ( ( ( size_t ) pkt_header->caplen ) + sizeof( *pkt_header ) ) ) ) - { - uxStreamBufferAdd( xRecvBuffer, 0, ( const uint8_t* ) pkt_header, sizeof( *pkt_header ) ); - uxStreamBufferAdd( xRecvBuffer, 0, ( const uint8_t* ) pkt_data, ( size_t ) pkt_header->caplen ); - } -} -/*-----------------------------------------------------------*/ - -DWORD WINAPI prvWinPcapRecvThread ( void *pvParam ) -{ - ( void ) pvParam; - - /* THIS IS A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS OR TO PRINT - OUT MESSAGES HERE. */ - - for( ;; ) - { - pcap_dispatch( pxOpenedInterfaceHandle, 1, pcap_callback, ( u_char * ) "mydata" ); - } -} -/*-----------------------------------------------------------*/ - -DWORD WINAPI prvWinPcapSendThread( void *pvParam ) -{ -size_t xLength; -uint8_t ucBuffer[ ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ]; -static char cErrorMessage[ 1024 ]; -const DWORD xMaxMSToWait = 1000; - - /* THIS IS A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS OR TO PRINT - OUT MESSAGES HERE. */ - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParam; - - for( ;; ) - { - /* Wait until notified of something to send. */ - WaitForSingleObject( pvSendEvent, xMaxMSToWait ); - - /* Is there more than the length value stored in the circular buffer - used to pass data from the FreeRTOS simulator into this Win32 thread? */ - while( uxStreamBufferGetSize( xSendBuffer ) > sizeof( xLength ) ) - { - uxStreamBufferGet( xSendBuffer, 0, ( uint8_t * ) &xLength, sizeof( xLength ), pdFALSE ); - uxStreamBufferGet( xSendBuffer, 0, ( uint8_t* ) ucBuffer, xLength, pdFALSE ); - if( pcap_sendpacket( pxOpenedInterfaceHandle, ucBuffer, xLength ) != 0 ) - { - ulWinPCAPSendFailures++; - } - } - } -} -/*-----------------------------------------------------------*/ - -static void prvInterruptSimulatorTask( void *pvParameters ) -{ -struct pcap_pkthdr xHeader; -static struct pcap_pkthdr *pxHeader; -const uint8_t *pucPacketData; -uint8_t ucRecvBuffer[ ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ]; -NetworkBufferDescriptor_t *pxNetworkBuffer; -IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; -eFrameProcessingResult_t eResult; - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - for( ;; ) - { - /* Does the circular buffer used to pass data from the Win32 thread that - handles WinPCAP Rx into the FreeRTOS simulator contain another packet? */ - if( uxStreamBufferGetSize( xRecvBuffer ) > sizeof( xHeader ) ) - { - /* Get the next packet. */ - uxStreamBufferGet( xRecvBuffer, 0, (uint8_t*)&xHeader, sizeof( xHeader ), pdFALSE ); - uxStreamBufferGet( xRecvBuffer, 0, (uint8_t*)ucRecvBuffer, ( size_t ) xHeader.len, pdFALSE ); - pucPacketData = ucRecvBuffer; - pxHeader = &xHeader; - - iptraceNETWORK_INTERFACE_RECEIVE(); - - /* Check for minimal size. */ - if( pxHeader->len >= sizeof( EthernetHeader_t ) ) - { - eResult = ipCONSIDER_FRAME_FOR_PROCESSING( pucPacketData ); - } - else - { - eResult = eReleaseBuffer; - } - - if( eResult == eProcessBuffer ) - { - /* Will the data fit into the frame buffer? */ - if( pxHeader->len <= ipTOTAL_ETHERNET_FRAME_SIZE ) - { - /* Obtain a buffer into which the data can be placed. This - is only an interrupt simulator, not a real interrupt, so it - is ok to call the task level function here, but note that - some buffer implementations cannot be called from a real - interrupt. */ - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( pxHeader->len, 0 ); - - if( pxNetworkBuffer != NULL ) - { - memcpy( pxNetworkBuffer->pucEthernetBuffer, pucPacketData, pxHeader->len ); - pxNetworkBuffer->xDataLength = ( size_t ) pxHeader->len; - - #if( niDISRUPT_PACKETS == 1 ) - { - pxNetworkBuffer = vRxFaultInjection( pxNetworkBuffer, pucPacketData ); - } - #endif /* niDISRUPT_PACKETS */ - - if( pxNetworkBuffer != NULL ) - { - xRxEvent.pvData = ( void * ) pxNetworkBuffer; - - /* Data was received and stored. Send a message to - the IP task to let it know. */ - if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) - { - /* The buffer could not be sent to the stack so - must be released again. This is only an - interrupt simulator, not a real interrupt, so it - is ok to use the task level function here, but - note no all buffer implementations will allow - this function to be executed from a real - interrupt. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - iptraceETHERNET_RX_EVENT_LOST(); - } - } - else - { - /* The packet was already released or stored inside - vRxFaultInjection(). Don't release it here. */ - } - } - else - { - iptraceETHERNET_RX_EVENT_LOST(); - } - } - else - { - /* Log that a packet was dropped because it would have - overflowed the buffer, but there may be more buffers to - process. */ - } - } - } - else - { - /* There is no real way of simulating an interrupt. Make sure - other tasks can run. */ - vTaskDelay( configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ); - } - } -} -/*-----------------------------------------------------------*/ - -static const char *prvRemoveSpaces( char *pcBuffer, int aBuflen, const char *pcMessage ) -{ - char *pcTarget = pcBuffer; - - /* Utility function used to formap messages being printed only. */ - while( ( *pcMessage != 0 ) && ( pcTarget < ( pcBuffer + aBuflen - 1 ) ) ) - { - *( pcTarget++ ) = *pcMessage; - - if( isspace( *pcMessage ) != pdFALSE ) - { - while( isspace( *pcMessage ) != pdFALSE ) - { - pcMessage++; - } - } - else - { - pcMessage++; - } - } - - *pcTarget = '\0'; - - return pcBuffer; -} +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* WinPCap includes. */ +#define HAVE_REMOTE +#include "pcap.h" + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" + +/* Thread-safe circular buffers are being used to pass data to and from the PCAP +access functions. */ +#include "Win32-Extensions.h" +#include "FreeRTOS_Stream_Buffer.h" + +/* Sizes of the thread safe circular buffers used to pass data to and from the +WinPCAP Windows threads. */ +#define xSEND_BUFFER_SIZE 32768 +#define xRECV_BUFFER_SIZE 32768 + +/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet +driver will filter incoming packets and only pass the stack those packets it +considers need processing. */ +#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +#else + #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +#endif + +/* Used to insert test code only. */ +#define niDISRUPT_PACKETS 0 + +/*-----------------------------------------------------------*/ + +/* + * Windows threads that are outside of the control of the FreeRTOS simulator are + * used to interface with the WinPCAP libraries. + */ +DWORD WINAPI prvWinPcapRecvThread( void *pvParam ); +DWORD WINAPI prvWinPcapSendThread( void *pvParam ); + +/* + * Print out a numbered list of network interfaces that are available on the + * host computer. + */ +static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ); + +/* + * Open the network interface. The number of the interface to be opened is set + * by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. + */ +static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ); +static int prvOpenInterface( const char *pucName ); + +/* + * Configure the capture filter to allow blocking reads, and to filter out + * packets that are not of interest to this demo. + */ +static void prvConfigureCaptureBehaviour( void ); + +/* + * A function that simulates Ethernet interrupts by periodically polling the + * WinPCap interface for new data. + */ +static void prvInterruptSimulatorTask( void *pvParameters ); + +/* + * Create the buffers that are used to pass data between the FreeRTOS simulator + * and the Win32 threads that manage WinPCAP. + */ +static void prvCreateThreadSafeBuffers( void ); + +/* + * Utility function used to format print messages only. + */ +static const char *prvRemoveSpaces( char *pcBuffer, int aBuflen, const char *pcMessage ); + +/*-----------------------------------------------------------*/ + +/* Required by the WinPCap library. */ +static char cErrorBuffer[ PCAP_ERRBUF_SIZE ]; + +/* An event used to wake up the Win32 thread that sends data through the WinPCAP +library. */ +static void *pvSendEvent = NULL; + +/* _HT_ made the PCAP interface number configurable through the program's +parameters in order to test in different machines. */ +static BaseType_t xConfigNetworkInterfaceToUse = configNETWORK_INTERFACE_TO_USE; + +/* Handles to the Windows threads that handle the PCAP IO. */ +static HANDLE vWinPcapRecvThreadHandle = NULL; +static HANDLE vWinPcapSendThreadHandle = NULL;; + +/* The interface being used by WinPCap. */ +static pcap_t *pxOpenedInterfaceHandle = NULL; + +/* Circular buffers used by the PCAP Win32 threads. */ +static StreamBuffer_t *xSendBuffer = NULL; +static StreamBuffer_t *xRecvBuffer = NULL; + +/* The MAC address initially set to the constants defined in FreeRTOSConfig.h. */ +extern uint8_t ucMACAddress[ 6 ]; + +/* Logs the number of WinPCAP send failures, for viewing in the debugger only. */ +static volatile uint32_t ulWinPCAPSendFailures = 0; + +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +BaseType_t xReturn = pdFALSE; +pcap_if_t *pxAllNetworkInterfaces; + + /* Query the computer the simulation is being executed on to find the + network interfaces it has installed. */ + pxAllNetworkInterfaces = prvPrintAvailableNetworkInterfaces(); + + /* Open the network interface. The number of the interface to be opened is + set by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h. + Calling this function will set the pxOpenedInterfaceHandle variable. If, + after calling this function, pxOpenedInterfaceHandle is equal to NULL, then + the interface could not be opened. */ + if( pxAllNetworkInterfaces != NULL ) + { + prvOpenSelectedNetworkInterface( pxAllNetworkInterfaces ); + } + + if( pxOpenedInterfaceHandle != NULL ) + { + xReturn = pdPASS; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static void prvCreateThreadSafeBuffers( void ) +{ + /* The buffer used to pass data to be transmitted from a FreeRTOS task to + the Win32 thread that sends via the WinPCAP library. */ + if( xSendBuffer == NULL) + { + xSendBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xSendBuffer ) - sizeof( xSendBuffer->ucArray ) + xSEND_BUFFER_SIZE + 1 ); + configASSERT( xSendBuffer ); + memset( xSendBuffer, '\0', sizeof( *xSendBuffer ) - sizeof( xSendBuffer->ucArray ) ); + xSendBuffer->LENGTH = xSEND_BUFFER_SIZE + 1; + } + + /* The buffer used to pass received data from the Win32 thread that receives + via the WinPCAP library to the FreeRTOS task. */ + if( xRecvBuffer == NULL) + { + xRecvBuffer = ( StreamBuffer_t * ) malloc( sizeof( *xRecvBuffer ) - sizeof( xRecvBuffer->ucArray ) + xRECV_BUFFER_SIZE + 1 ); + configASSERT( xRecvBuffer ); + memset( xRecvBuffer, '\0', sizeof( *xRecvBuffer ) - sizeof( xRecvBuffer->ucArray ) ); + xRecvBuffer->LENGTH = xRECV_BUFFER_SIZE + 1; + } +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t bReleaseAfterSend ) +{ +size_t xSpace; + + iptraceNETWORK_INTERFACE_TRANSMIT(); + configASSERT( xIsCallingFromIPTask() == pdTRUE ); + + /* Both the length of the data being sent and the actual data being sent + are placed in the thread safe buffer used to pass data between the FreeRTOS + tasks and the Win32 thread that sends data via the WinPCAP library. Drop + the packet if there is insufficient space in the buffer to hold both. */ + xSpace = uxStreamBufferGetSpace( xSendBuffer ); + + if( ( pxNetworkBuffer->xDataLength <= ( ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ) ) && + ( xSpace >= ( pxNetworkBuffer->xDataLength + sizeof( pxNetworkBuffer->xDataLength ) ) ) ) + { + /* First write in the length of the data, then write in the data + itself. */ + uxStreamBufferAdd( xSendBuffer, 0, ( const uint8_t * ) &( pxNetworkBuffer->xDataLength ), sizeof( pxNetworkBuffer->xDataLength ) ); + uxStreamBufferAdd( xSendBuffer, 0, ( const uint8_t * ) pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength ); + } + else + { + FreeRTOS_debug_printf( ( "xNetworkInterfaceOutput: send buffers full to store %lu\n", pxNetworkBuffer->xDataLength ) ); + } + + /* Kick the Tx task in either case in case it doesn't know the buffer is + full. */ + SetEvent( pvSendEvent ); + + /* The buffer has been sent so can be released. */ + if( bReleaseAfterSend != pdFALSE ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + + return pdPASS; +} +/*-----------------------------------------------------------*/ + +static pcap_if_t * prvPrintAvailableNetworkInterfaces( void ) +{ +pcap_if_t * pxAllNetworkInterfaces = NULL, *xInterface; +int32_t lInterfaceNumber = 1; +char cBuffer[ 512 ]; +static BaseType_t xInvalidInterfaceDetected = pdFALSE; + + if( xInvalidInterfaceDetected == pdFALSE ) + { + if( pcap_findalldevs_ex( PCAP_SRC_IF_STRING, NULL, &pxAllNetworkInterfaces, cErrorBuffer ) == -1 ) + { + printf( "Could not obtain a list of network interfaces\n%s\n", cErrorBuffer ); + pxAllNetworkInterfaces = NULL; + } + else + { + printf( "\r\n\r\nThe following network interfaces are available:\r\n\r\n" ); + } + + if( pxAllNetworkInterfaces != NULL ) + { + /* Print out the list of network interfaces. The first in the list + is interface '1', not interface '0'. */ + for( xInterface = pxAllNetworkInterfaces; xInterface != NULL; xInterface = xInterface->next ) + { + /* The descriptions of the devices can be full of spaces, clean them + a little. printf() can only be used here because the network is not + up yet - so no other network tasks will be running. */ + printf( "Interface %d - %s\n", lInterfaceNumber, prvRemoveSpaces( cBuffer, sizeof( cBuffer ), xInterface->name ) ); + printf( " (%s)\n", prvRemoveSpaces(cBuffer, sizeof( cBuffer ), xInterface->description ? xInterface->description : "No description" ) ); + printf( "\n" ); + lInterfaceNumber++; + } + } + + if( lInterfaceNumber == 1 ) + { + /* The interface number was never incremented, so the above for() loop + did not execute meaning no interfaces were found. */ + printf( " \nNo network interfaces were found.\n" ); + pxAllNetworkInterfaces = NULL; + } + + printf( "\r\nThe interface that will be opened is set by " ); + printf( "\"configNETWORK_INTERFACE_TO_USE\", which\r\nshould be defined in FreeRTOSConfig.h\r\n" ); + + if( ( xConfigNetworkInterfaceToUse < 1L ) || ( xConfigNetworkInterfaceToUse >= lInterfaceNumber ) ) + { + printf( "\r\nERROR: configNETWORK_INTERFACE_TO_USE is set to %d, which is an invalid value.\r\n", xConfigNetworkInterfaceToUse ); + printf( "Please set configNETWORK_INTERFACE_TO_USE to one of the interface numbers listed above,\r\n" ); + printf( "then re-compile and re-start the application. Only Ethernet (as opposed to WiFi)\r\n" ); + printf( "interfaces are supported.\r\n\r\nHALTING\r\n\r\n\r\n" ); + xInvalidInterfaceDetected = pdTRUE; + + if( pxAllNetworkInterfaces != NULL ) + { + /* Free the device list, as no devices are going to be opened. */ + pcap_freealldevs( pxAllNetworkInterfaces ); + pxAllNetworkInterfaces = NULL; + } + } + else + { + printf( "Attempting to open interface number %d.\n", xConfigNetworkInterfaceToUse ); + } + } + + return pxAllNetworkInterfaces; +} +/*-----------------------------------------------------------*/ + +static int prvOpenInterface( const char *pucName ) +{ +static char pucInterfaceName[ 256 ]; + + if( pucName != NULL ) + { + strncpy( pucInterfaceName, pucName, sizeof( pucInterfaceName ) ); + } + + pxOpenedInterfaceHandle = pcap_open( pucInterfaceName, /* The name of the selected interface. */ + ipTOTAL_ETHERNET_FRAME_SIZE, /* The size of the packet to capture. */ + PCAP_OPENFLAG_PROMISCUOUS, /* Open in promiscuous mode as the MAC and + IP address is going to be "simulated", and + not be the real MAC and IP address. This allows + traffic to the simulated IP address to be routed + to uIP, and traffic to the real IP address to be + routed to the Windows TCP/IP stack. */ + 100, + NULL, /* No authentication is required as this is + not a remote capture session. */ + cErrorBuffer + ); + + if ( pxOpenedInterfaceHandle == NULL ) + { + printf( "\n%s is not supported by WinPcap and cannot be opened\n", pucInterfaceName ); + return 1; + } + else + { + /* Configure the capture filter to allow blocking reads, and to filter + out packets that are not of interest to this demo. */ + prvConfigureCaptureBehaviour(); + } + return 0; +} +/*-----------------------------------------------------------*/ + +static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces ) +{ +pcap_if_t *pxInterface; +int32_t x; + + /* Walk the list of devices until the selected device is located. */ + pxInterface = pxAllNetworkInterfaces; + for( x = 0L; x < ( xConfigNetworkInterfaceToUse - 1L ); x++ ) + { + pxInterface = pxInterface->next; + } + + /* Open the selected interface. */ + if( prvOpenInterface( pxInterface->name ) == 0 ) + { + printf( "Successfully opened interface number %d.\n", x + 1 ); + } + else + { + printf( "Failed to open interface number %d.\n", x + 1 ); + } + + /* The device list is no longer required. */ + pcap_freealldevs( pxAllNetworkInterfaces ); +} +/*-----------------------------------------------------------*/ + +static void prvConfigureCaptureBehaviour( void ) +{ +struct bpf_program xFilterCode; +uint32_t ulNetMask; + + /* Set up a filter so only the packets of interest are passed to the IP + stack. cErrorBuffer is used for convenience to create the string. Don't + confuse this with an error message. */ + sprintf( cErrorBuffer, "broadcast or multicast or ether host %x:%x:%x:%x:%x:%x", + ucMACAddress[0], ucMACAddress[1], ucMACAddress[2], ucMACAddress[3], ucMACAddress[4], ucMACAddress[5] ); + + ulNetMask = ( configNET_MASK3 << 24UL ) | ( configNET_MASK2 << 16UL ) | ( configNET_MASK1 << 8L ) | configNET_MASK0; + + if( pcap_compile( pxOpenedInterfaceHandle, &xFilterCode, cErrorBuffer, 1, ulNetMask ) < 0 ) + { + printf( "\nThe packet filter string is invalid\n" ); + } + else + { + if( pcap_setfilter( pxOpenedInterfaceHandle, &xFilterCode ) < 0 ) + { + printf( "\nAn error occurred setting the packet filter.\n" ); + } + /* When pcap_compile() succeeds, it allocates memory for the memory pointed to by the bpf_program struct + parameter.pcap_freecode() will free that memory. */ + pcap_freecode( &xFilterCode ); + } + + /* Create the buffers used to pass packets between the FreeRTOS simulator + and the Win32 threads that are handling WinPCAP. */ + prvCreateThreadSafeBuffers(); + + if( pvSendEvent == NULL ) + { + /* Create event used to signal the Win32 WinPCAP Tx thread. */ + pvSendEvent = CreateEvent( NULL, FALSE, TRUE, NULL ); + + /* Create the Win32 thread that handles WinPCAP Rx. */ + vWinPcapRecvThreadHandle = CreateThread( + NULL, /* Pointer to thread security attributes. */ + 0, /* Initial thread stack size, in bytes. */ + prvWinPcapRecvThread, /* Pointer to thread function. */ + NULL, /* Argument for new thread. */ + 0, /* Creation flags. */ + NULL ); + + /* Use the cores that are not used by the FreeRTOS tasks. */ + SetThreadAffinityMask( vWinPcapRecvThreadHandle, ~0x01u ); + + /* Create the Win32 thread that handlers WinPCAP Tx. */ + vWinPcapSendThreadHandle = CreateThread( + NULL, /* Pointer to thread security attributes. */ + 0, /* initial thread stack size, in bytes. */ + prvWinPcapSendThread, /* Pointer to thread function. */ + NULL, /* Argument for new thread. */ + 0, /* Creation flags. */ + NULL ); + + /* Use the cores that are not used by the FreeRTOS tasks. */ + SetThreadAffinityMask( vWinPcapSendThreadHandle, ~0x01u ); + + /* Create a task that simulates an interrupt in a real system. This will + block waiting for packets, then send a message to the IP task when data + is available. */ + xTaskCreate( prvInterruptSimulatorTask, "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, configMAC_ISR_SIMULATOR_PRIORITY, NULL ); + } +} +/*-----------------------------------------------------------*/ + +/* WinPCAP function. */ +void pcap_callback( u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data ) +{ + (void)user; + + /* THIS IS CALLED FROM A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS + OR TO PRINT OUT MESSAGES HERE. */ + + /* Pass data to the FreeRTOS simulator on a thread safe circular buffer. */ + if( ( pkt_header->caplen <= ( ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ) ) && + ( uxStreamBufferGetSpace( xRecvBuffer ) >= ( ( ( size_t ) pkt_header->caplen ) + sizeof( *pkt_header ) ) ) ) + { + uxStreamBufferAdd( xRecvBuffer, 0, ( const uint8_t* ) pkt_header, sizeof( *pkt_header ) ); + uxStreamBufferAdd( xRecvBuffer, 0, ( const uint8_t* ) pkt_data, ( size_t ) pkt_header->caplen ); + } +} +/*-----------------------------------------------------------*/ + +DWORD WINAPI prvWinPcapRecvThread ( void *pvParam ) +{ + ( void ) pvParam; + + /* THIS IS A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS OR TO PRINT + OUT MESSAGES HERE. */ + + for( ;; ) + { + pcap_dispatch( pxOpenedInterfaceHandle, 1, pcap_callback, ( u_char * ) "mydata" ); + } +} +/*-----------------------------------------------------------*/ + +DWORD WINAPI prvWinPcapSendThread( void *pvParam ) +{ +size_t xLength; +uint8_t ucBuffer[ ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ]; +static char cErrorMessage[ 1024 ]; +const DWORD xMaxMSToWait = 1000; + + /* THIS IS A WINDOWS THREAD - DO NOT ATTEMPT ANY FREERTOS CALLS OR TO PRINT + OUT MESSAGES HERE. */ + + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParam; + + for( ;; ) + { + /* Wait until notified of something to send. */ + WaitForSingleObject( pvSendEvent, xMaxMSToWait ); + + /* Is there more than the length value stored in the circular buffer + used to pass data from the FreeRTOS simulator into this Win32 thread? */ + while( uxStreamBufferGetSize( xSendBuffer ) > sizeof( xLength ) ) + { + uxStreamBufferGet( xSendBuffer, 0, ( uint8_t * ) &xLength, sizeof( xLength ), pdFALSE ); + uxStreamBufferGet( xSendBuffer, 0, ( uint8_t* ) ucBuffer, xLength, pdFALSE ); + if( pcap_sendpacket( pxOpenedInterfaceHandle, ucBuffer, xLength ) != 0 ) + { + ulWinPCAPSendFailures++; + } + } + } +} +/*-----------------------------------------------------------*/ + +static void prvInterruptSimulatorTask( void *pvParameters ) +{ +struct pcap_pkthdr xHeader; +static struct pcap_pkthdr *pxHeader; +const uint8_t *pucPacketData; +uint8_t ucRecvBuffer[ ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER ]; +NetworkBufferDescriptor_t *pxNetworkBuffer; +IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; +eFrameProcessingResult_t eResult; + + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParameters; + + for( ;; ) + { + /* Does the circular buffer used to pass data from the Win32 thread that + handles WinPCAP Rx into the FreeRTOS simulator contain another packet? */ + if( uxStreamBufferGetSize( xRecvBuffer ) > sizeof( xHeader ) ) + { + /* Get the next packet. */ + uxStreamBufferGet( xRecvBuffer, 0, (uint8_t*)&xHeader, sizeof( xHeader ), pdFALSE ); + uxStreamBufferGet( xRecvBuffer, 0, (uint8_t*)ucRecvBuffer, ( size_t ) xHeader.len, pdFALSE ); + pucPacketData = ucRecvBuffer; + pxHeader = &xHeader; + + iptraceNETWORK_INTERFACE_RECEIVE(); + + /* Check for minimal size. */ + if( pxHeader->len >= sizeof( EthernetHeader_t ) ) + { + eResult = ipCONSIDER_FRAME_FOR_PROCESSING( pucPacketData ); + } + else + { + eResult = eReleaseBuffer; + } + + if( eResult == eProcessBuffer ) + { + /* Will the data fit into the frame buffer? */ + if( pxHeader->len <= ipTOTAL_ETHERNET_FRAME_SIZE ) + { + /* Obtain a buffer into which the data can be placed. This + is only an interrupt simulator, not a real interrupt, so it + is ok to call the task level function here, but note that + some buffer implementations cannot be called from a real + interrupt. */ + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( pxHeader->len, 0 ); + + if( pxNetworkBuffer != NULL ) + { + memcpy( pxNetworkBuffer->pucEthernetBuffer, pucPacketData, pxHeader->len ); + pxNetworkBuffer->xDataLength = ( size_t ) pxHeader->len; + + #if( niDISRUPT_PACKETS == 1 ) + { + pxNetworkBuffer = vRxFaultInjection( pxNetworkBuffer, pucPacketData ); + } + #endif /* niDISRUPT_PACKETS */ + + if( pxNetworkBuffer != NULL ) + { + xRxEvent.pvData = ( void * ) pxNetworkBuffer; + + /* Data was received and stored. Send a message to + the IP task to let it know. */ + if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 0 ) == pdFAIL ) + { + /* The buffer could not be sent to the stack so + must be released again. This is only an + interrupt simulator, not a real interrupt, so it + is ok to use the task level function here, but + note no all buffer implementations will allow + this function to be executed from a real + interrupt. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + iptraceETHERNET_RX_EVENT_LOST(); + } + } + else + { + /* The packet was already released or stored inside + vRxFaultInjection(). Don't release it here. */ + } + } + else + { + iptraceETHERNET_RX_EVENT_LOST(); + } + } + else + { + /* Log that a packet was dropped because it would have + overflowed the buffer, but there may be more buffers to + process. */ + } + } + } + else + { + /* There is no real way of simulating an interrupt. Make sure + other tasks can run. */ + vTaskDelay( configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ); + } + } +} +/*-----------------------------------------------------------*/ + +static const char *prvRemoveSpaces( char *pcBuffer, int aBuflen, const char *pcMessage ) +{ + char *pcTarget = pcBuffer; + + /* Utility function used to formap messages being printed only. */ + while( ( *pcMessage != 0 ) && ( pcTarget < ( pcBuffer + aBuflen - 1 ) ) ) + { + *( pcTarget++ ) = *pcMessage; + + if( isspace( *pcMessage ) != pdFALSE ) + { + while( isspace( *pcMessage ) != pdFALSE ) + { + pcMessage++; + } + } + else + { + pcMessage++; + } + } + + *pcTarget = '\0'; + + return pcBuffer; +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/NetworkInterface.c index 1c11976cb..c8f965395 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/NetworkInterface.c @@ -1,398 +1,398 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -/* Xilinx library files. */ -#include -#include "Zynq/x_topology.h" -#include "Zynq/x_emacpsif.h" -#include "Zynq/x_emacpsif_hw.h" - -/* Provided memory configured as uncached. */ -#include "uncached_memory.h" - -#ifndef BMSR_LINK_STATUS - #define BMSR_LINK_STATUS 0x0004UL -#endif - -#ifndef PHY_LS_HIGH_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not - receiving packets. */ - #define PHY_LS_HIGH_CHECK_TIME_MS 15000 -#endif - -#ifndef PHY_LS_LOW_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still low every second. */ - #define PHY_LS_LOW_CHECK_TIME_MS 1000 -#endif - -/* The size of each buffer when BufferAllocation_1 is used: -http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html */ -#define niBUFFER_1_PACKET_SIZE 1536 - -/* Naming and numbering of PHY registers. */ -#define PHY_REG_01_BMSR 0x01 /* Basic mode status register */ - -#ifndef iptraceEMAC_TASK_STARTING - #define iptraceEMAC_TASK_STARTING() do { } while( 0 ) -#endif - -/* Default the size of the stack used by the EMAC deferred handler task to twice -the size of the stack used by the idle task - but allow this to be overridden in -FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ -#ifndef configEMAC_TASK_STACK_SIZE - #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) -#endif - -/*-----------------------------------------------------------*/ - -/* - * Look for the link to be up every few milliseconds until either xMaxTime time - * has passed or a link is found. - */ -static BaseType_t prvGMACWaitLS( TickType_t xMaxTime ); - -/* - * A deferred interrupt handler for all MAC/DMA interrupt sources. - */ -static void prvEMACHandlerTask( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -/* EMAC data/descriptions. */ -static xemacpsif_s xEMACpsif; -struct xtopology_t xXTopology = -{ - .emac_baseaddr = XPAR_PS7_ETHERNET_0_BASEADDR, - .emac_type = xemac_type_emacps, - .intc_baseaddr = 0x0, - .intc_emac_intr = 0x0, - .scugic_baseaddr = XPAR_PS7_SCUGIC_0_BASEADDR, - .scugic_emac_intr = 0x36, -}; - -XEmacPs_Config mac_config = -{ - .DeviceId = XPAR_PS7_ETHERNET_0_DEVICE_ID, /**< Unique ID of device */ - .BaseAddress = XPAR_PS7_ETHERNET_0_BASEADDR /**< Physical base address of IPIF registers */ -}; - -extern int phy_detected; - -/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ -static uint32_t ulPHYLinkStatus = 0; - -#if( ipconfigUSE_LLMNR == 1 ) - static const uint8_t xLLMNR_MACAddress[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; -#endif - -/* ucMACAddress as it appears in main.c */ -extern const uint8_t ucMACAddress[ 6 ]; - -/* Holds the handle of the task used as a deferred interrupt processor. The -handle is used so direct notifications can be sent to the task for all EMAC/DMA -related interrupts. */ -TaskHandle_t xEMACTaskHandle = NULL; - -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -uint32_t ulLinkSpeed, ulDMAReg; -BaseType_t xStatus, xLinkStatus; -XEmacPs *pxEMAC_PS; -const TickType_t xWaitLinkDelay = pdMS_TO_TICKS( 7000UL ), xWaitRelinkDelay = pdMS_TO_TICKS( 1000UL ); - - /* Guard against the init function being called more than once. */ - if( xEMACTaskHandle == NULL ) - { - pxEMAC_PS = &( xEMACpsif.emacps ); - memset( &xEMACpsif, '\0', sizeof( xEMACpsif ) ); - - xStatus = XEmacPs_CfgInitialize( pxEMAC_PS, &mac_config, mac_config.BaseAddress); - if( xStatus != XST_SUCCESS ) - { - FreeRTOS_printf( ( "xEMACInit: EmacPs Configuration Failed....\n" ) ); - } - - /* Initialize the mac and set the MAC address. */ - XEmacPs_SetMacAddress( pxEMAC_PS, ( void * ) ucMACAddress, 1 ); - - #if( ipconfigUSE_LLMNR == 1 ) - { - /* Also add LLMNR multicast MAC address. */ - XEmacPs_SetMacAddress( pxEMAC_PS, ( void * )xLLMNR_MACAddress, 2 ); - } - #endif /* ipconfigUSE_LLMNR == 1 */ - - XEmacPs_SetMdioDivisor( pxEMAC_PS, MDC_DIV_224 ); - ulLinkSpeed = Phy_Setup( pxEMAC_PS ); - XEmacPs_SetOperatingSpeed( pxEMAC_PS, ulLinkSpeed); - - /* Setting the operating speed of the MAC needs a delay. */ - vTaskDelay( pdMS_TO_TICKS( 25UL ) ); - - ulDMAReg = XEmacPs_ReadReg( pxEMAC_PS->Config.BaseAddress, XEMACPS_DMACR_OFFSET); - - /* DISC_WHEN_NO_AHB: when set, the GEM DMA will automatically discard receive - packets from the receiver packet buffer memory when no AHB resource is available. */ - XEmacPs_WriteReg( pxEMAC_PS->Config.BaseAddress, XEMACPS_DMACR_OFFSET, - ulDMAReg | XEMACPS_DMACR_DISC_WHEN_NO_AHB_MASK); - - setup_isr( &xEMACpsif ); - init_dma( &xEMACpsif ); - start_emacps( &xEMACpsif ); - - prvGMACWaitLS( xWaitLinkDelay ); - - /* The deferred interrupt handler task is created at the highest - possible priority to ensure the interrupt handler can return directly - to it. The task's handle is stored in xEMACTaskHandle so interrupts can - notify the task when there is something to process. */ - xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); - } - else - { - /* Initialisation was already performed, just wait for the link. */ - prvGMACWaitLS( xWaitRelinkDelay ); - } - - /* Only return pdTRUE when the Link Status of the PHY is high, otherwise the - DHCP process and all other communication will fail. */ - xLinkStatus = xGetPhyLinkStatus(); - - return ( xLinkStatus != pdFALSE ); -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxBuffer, BaseType_t bReleaseAfterSend ) -{ - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - iptraceNETWORK_INTERFACE_TRANSMIT(); - emacps_send_message( &xEMACpsif, pxBuffer, bReleaseAfterSend ); - } - else if( bReleaseAfterSend != pdFALSE ) - { - /* No link. */ - vReleaseNetworkBufferAndDescriptor( pxBuffer ); - } - - return pdTRUE; -} -/*-----------------------------------------------------------*/ - -static inline unsigned long ulReadMDIO( unsigned ulRegister ) -{ -uint16_t usValue; - - XEmacPs_PhyRead( &( xEMACpsif.emacps ), phy_detected, ulRegister, &usValue ); - return usValue; -} -/*-----------------------------------------------------------*/ - -static BaseType_t prvGMACWaitLS( TickType_t xMaxTime ) -{ -TickType_t xStartTime, xEndTime; -const TickType_t xShortDelay = pdMS_TO_TICKS( 20UL ); -BaseType_t xReturn; - - xStartTime = xTaskGetTickCount(); - - for( ;; ) - { - xEndTime = xTaskGetTickCount(); - - if( xEndTime - xStartTime > xMaxTime ) - { - xReturn = pdFALSE; - break; - } - ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); - - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - xReturn = pdTRUE; - break; - } - - vTaskDelay( xShortDelay ); - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ -static uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] __attribute__ ( ( aligned( 32 ) ) ); -uint8_t *ucRAMBuffer = ucNetworkPackets; -uint32_t ul; - - for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) - { - pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; - *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); - ucRAMBuffer += niBUFFER_1_PACKET_SIZE; - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xGetPhyLinkStatus( void ) -{ -BaseType_t xReturn; - - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) == 0 ) - { - xReturn = pdFALSE; - } - else - { - xReturn = pdTRUE; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static void prvEMACHandlerTask( void *pvParameters ) -{ -TimeOut_t xPhyTime; -TickType_t xPhyRemTime; -UBaseType_t uxLastMinBufferCount = 0; -UBaseType_t uxCurrentCount; -BaseType_t xResult = 0; -uint32_t xStatus; -const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - /* A possibility to set some additional task properties like calling - portTASK_USES_FLOATING_POINT() */ - iptraceEMAC_TASK_STARTING(); - - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - - for( ;; ) - { - uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); - if( uxLastMinBufferCount != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); - } - - #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - static UBaseType_t uxLastMinQueueSpace = 0; - - uxCurrentCount = uxGetMinimumIPQueueSpace(); - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - - if( ( xEMACpsif.isr_events & EMAC_IF_ALL_EVENT ) == 0 ) - { - /* No events to process now, wait for the next. */ - ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); - } - - if( ( xEMACpsif.isr_events & EMAC_IF_RX_EVENT ) != 0 ) - { - xEMACpsif.isr_events &= ~EMAC_IF_RX_EVENT; - xResult = emacps_check_rx( &xEMACpsif ); - } - - if( ( xEMACpsif.isr_events & EMAC_IF_TX_EVENT ) != 0 ) - { - xEMACpsif.isr_events &= ~EMAC_IF_TX_EVENT; - emacps_check_tx( &xEMACpsif ); - } - - if( ( xEMACpsif.isr_events & EMAC_IF_ERR_EVENT ) != 0 ) - { - xEMACpsif.isr_events &= ~EMAC_IF_ERR_EVENT; - emacps_check_errors( &xEMACpsif ); - } - - if( xResult > 0 ) - { - /* A packet was received. No need to check for the PHY status now, - but set a timer to check it later on. */ - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - xResult = 0; - } - else if( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) - { - xStatus = ulReadMDIO( PHY_REG_01_BMSR ); - - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != ( xStatus & BMSR_LINK_STATUS ) ) - { - ulPHYLinkStatus = xStatus; - FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ); - } - - vTaskSetTimeOutState( &xPhyTime ); - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - } - else - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - } - } - } -} -/*-----------------------------------------------------------*/ +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* Standard includes. */ +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +/* Xilinx library files. */ +#include +#include "Zynq/x_topology.h" +#include "Zynq/x_emacpsif.h" +#include "Zynq/x_emacpsif_hw.h" + +/* Provided memory configured as uncached. */ +#include "uncached_memory.h" + +#ifndef BMSR_LINK_STATUS + #define BMSR_LINK_STATUS 0x0004UL +#endif + +#ifndef PHY_LS_HIGH_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not + receiving packets. */ + #define PHY_LS_HIGH_CHECK_TIME_MS 15000 +#endif + +#ifndef PHY_LS_LOW_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still low every second. */ + #define PHY_LS_LOW_CHECK_TIME_MS 1000 +#endif + +/* The size of each buffer when BufferAllocation_1 is used: +http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html */ +#define niBUFFER_1_PACKET_SIZE 1536 + +/* Naming and numbering of PHY registers. */ +#define PHY_REG_01_BMSR 0x01 /* Basic mode status register */ + +#ifndef iptraceEMAC_TASK_STARTING + #define iptraceEMAC_TASK_STARTING() do { } while( 0 ) +#endif + +/* Default the size of the stack used by the EMAC deferred handler task to twice +the size of the stack used by the idle task - but allow this to be overridden in +FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ +#ifndef configEMAC_TASK_STACK_SIZE + #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) +#endif + +/*-----------------------------------------------------------*/ + +/* + * Look for the link to be up every few milliseconds until either xMaxTime time + * has passed or a link is found. + */ +static BaseType_t prvGMACWaitLS( TickType_t xMaxTime ); + +/* + * A deferred interrupt handler for all MAC/DMA interrupt sources. + */ +static void prvEMACHandlerTask( void *pvParameters ); + +/*-----------------------------------------------------------*/ + +/* EMAC data/descriptions. */ +static xemacpsif_s xEMACpsif; +struct xtopology_t xXTopology = +{ + .emac_baseaddr = XPAR_PS7_ETHERNET_0_BASEADDR, + .emac_type = xemac_type_emacps, + .intc_baseaddr = 0x0, + .intc_emac_intr = 0x0, + .scugic_baseaddr = XPAR_PS7_SCUGIC_0_BASEADDR, + .scugic_emac_intr = 0x36, +}; + +XEmacPs_Config mac_config = +{ + .DeviceId = XPAR_PS7_ETHERNET_0_DEVICE_ID, /**< Unique ID of device */ + .BaseAddress = XPAR_PS7_ETHERNET_0_BASEADDR /**< Physical base address of IPIF registers */ +}; + +extern int phy_detected; + +/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ +static uint32_t ulPHYLinkStatus = 0; + +#if( ipconfigUSE_LLMNR == 1 ) + static const uint8_t xLLMNR_MACAddress[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; +#endif + +/* ucMACAddress as it appears in main.c */ +extern const uint8_t ucMACAddress[ 6 ]; + +/* Holds the handle of the task used as a deferred interrupt processor. The +handle is used so direct notifications can be sent to the task for all EMAC/DMA +related interrupts. */ +TaskHandle_t xEMACTaskHandle = NULL; + +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +uint32_t ulLinkSpeed, ulDMAReg; +BaseType_t xStatus, xLinkStatus; +XEmacPs *pxEMAC_PS; +const TickType_t xWaitLinkDelay = pdMS_TO_TICKS( 7000UL ), xWaitRelinkDelay = pdMS_TO_TICKS( 1000UL ); + + /* Guard against the init function being called more than once. */ + if( xEMACTaskHandle == NULL ) + { + pxEMAC_PS = &( xEMACpsif.emacps ); + memset( &xEMACpsif, '\0', sizeof( xEMACpsif ) ); + + xStatus = XEmacPs_CfgInitialize( pxEMAC_PS, &mac_config, mac_config.BaseAddress); + if( xStatus != XST_SUCCESS ) + { + FreeRTOS_printf( ( "xEMACInit: EmacPs Configuration Failed....\n" ) ); + } + + /* Initialize the mac and set the MAC address. */ + XEmacPs_SetMacAddress( pxEMAC_PS, ( void * ) ucMACAddress, 1 ); + + #if( ipconfigUSE_LLMNR == 1 ) + { + /* Also add LLMNR multicast MAC address. */ + XEmacPs_SetMacAddress( pxEMAC_PS, ( void * )xLLMNR_MACAddress, 2 ); + } + #endif /* ipconfigUSE_LLMNR == 1 */ + + XEmacPs_SetMdioDivisor( pxEMAC_PS, MDC_DIV_224 ); + ulLinkSpeed = Phy_Setup( pxEMAC_PS ); + XEmacPs_SetOperatingSpeed( pxEMAC_PS, ulLinkSpeed); + + /* Setting the operating speed of the MAC needs a delay. */ + vTaskDelay( pdMS_TO_TICKS( 25UL ) ); + + ulDMAReg = XEmacPs_ReadReg( pxEMAC_PS->Config.BaseAddress, XEMACPS_DMACR_OFFSET); + + /* DISC_WHEN_NO_AHB: when set, the GEM DMA will automatically discard receive + packets from the receiver packet buffer memory when no AHB resource is available. */ + XEmacPs_WriteReg( pxEMAC_PS->Config.BaseAddress, XEMACPS_DMACR_OFFSET, + ulDMAReg | XEMACPS_DMACR_DISC_WHEN_NO_AHB_MASK); + + setup_isr( &xEMACpsif ); + init_dma( &xEMACpsif ); + start_emacps( &xEMACpsif ); + + prvGMACWaitLS( xWaitLinkDelay ); + + /* The deferred interrupt handler task is created at the highest + possible priority to ensure the interrupt handler can return directly + to it. The task's handle is stored in xEMACTaskHandle so interrupts can + notify the task when there is something to process. */ + xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); + } + else + { + /* Initialisation was already performed, just wait for the link. */ + prvGMACWaitLS( xWaitRelinkDelay ); + } + + /* Only return pdTRUE when the Link Status of the PHY is high, otherwise the + DHCP process and all other communication will fail. */ + xLinkStatus = xGetPhyLinkStatus(); + + return ( xLinkStatus != pdFALSE ); +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxBuffer, BaseType_t bReleaseAfterSend ) +{ + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + iptraceNETWORK_INTERFACE_TRANSMIT(); + emacps_send_message( &xEMACpsif, pxBuffer, bReleaseAfterSend ); + } + else if( bReleaseAfterSend != pdFALSE ) + { + /* No link. */ + vReleaseNetworkBufferAndDescriptor( pxBuffer ); + } + + return pdTRUE; +} +/*-----------------------------------------------------------*/ + +static inline unsigned long ulReadMDIO( unsigned ulRegister ) +{ +uint16_t usValue; + + XEmacPs_PhyRead( &( xEMACpsif.emacps ), phy_detected, ulRegister, &usValue ); + return usValue; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvGMACWaitLS( TickType_t xMaxTime ) +{ +TickType_t xStartTime, xEndTime; +const TickType_t xShortDelay = pdMS_TO_TICKS( 20UL ); +BaseType_t xReturn; + + xStartTime = xTaskGetTickCount(); + + for( ;; ) + { + xEndTime = xTaskGetTickCount(); + + if( xEndTime - xStartTime > xMaxTime ) + { + xReturn = pdFALSE; + break; + } + ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xReturn = pdTRUE; + break; + } + + vTaskDelay( xShortDelay ); + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +{ +static uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * niBUFFER_1_PACKET_SIZE ] __attribute__ ( ( aligned( 32 ) ) ); +uint8_t *ucRAMBuffer = ucNetworkPackets; +uint32_t ul; + + for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) + { + pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; + *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); + ucRAMBuffer += niBUFFER_1_PACKET_SIZE; + } +} +/*-----------------------------------------------------------*/ + +BaseType_t xGetPhyLinkStatus( void ) +{ +BaseType_t xReturn; + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) == 0 ) + { + xReturn = pdFALSE; + } + else + { + xReturn = pdTRUE; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static void prvEMACHandlerTask( void *pvParameters ) +{ +TimeOut_t xPhyTime; +TickType_t xPhyRemTime; +UBaseType_t uxLastMinBufferCount = 0; +UBaseType_t uxCurrentCount; +BaseType_t xResult = 0; +uint32_t xStatus; +const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); + + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParameters; + + /* A possibility to set some additional task properties like calling + portTASK_USES_FLOATING_POINT() */ + iptraceEMAC_TASK_STARTING(); + + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + + for( ;; ) + { + uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); + if( uxLastMinBufferCount != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinBufferCount = uxCurrentCount; + FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", + uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); + } + + #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + { + static UBaseType_t uxLastMinQueueSpace = 0; + + uxCurrentCount = uxGetMinimumIPQueueSpace(); + if( uxLastMinQueueSpace != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinQueueSpace = uxCurrentCount; + FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); + } + } + #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ + + if( ( xEMACpsif.isr_events & EMAC_IF_ALL_EVENT ) == 0 ) + { + /* No events to process now, wait for the next. */ + ulTaskNotifyTake( pdFALSE, ulMaxBlockTime ); + } + + if( ( xEMACpsif.isr_events & EMAC_IF_RX_EVENT ) != 0 ) + { + xEMACpsif.isr_events &= ~EMAC_IF_RX_EVENT; + xResult = emacps_check_rx( &xEMACpsif ); + } + + if( ( xEMACpsif.isr_events & EMAC_IF_TX_EVENT ) != 0 ) + { + xEMACpsif.isr_events &= ~EMAC_IF_TX_EVENT; + emacps_check_tx( &xEMACpsif ); + } + + if( ( xEMACpsif.isr_events & EMAC_IF_ERR_EVENT ) != 0 ) + { + xEMACpsif.isr_events &= ~EMAC_IF_ERR_EVENT; + emacps_check_errors( &xEMACpsif ); + } + + if( xResult > 0 ) + { + /* A packet was received. No need to check for the PHY status now, + but set a timer to check it later on. */ + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + xResult = 0; + } + else if( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) + { + xStatus = ulReadMDIO( PHY_REG_01_BMSR ); + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != ( xStatus & BMSR_LINK_STATUS ) ) + { + ulPHYLinkStatus = xStatus; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ); + } + + vTaskSetTimeOutState( &xPhyTime ); + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + } + else + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + } + } + } +} +/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/README.txt b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/README.txt index 74b241dcf..f9e54bb2f 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/README.txt +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/README.txt @@ -1,25 +1,25 @@ - - -NetworkInterface for Xilinx' Zynq - -Please include the following source files: - - $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/NetworkInterface.c - $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/x_emacpsif_dma.c - $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c - $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/x_emacpsif_hw.c - -And include the following source files from the Xilinx library: - - $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps.c - $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_control.c - $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_g.c - $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_intr.c - - E.g. ps7_cortexa9_0/libsrc/emacps_v2_0/src/xemacps_intr.c - -The following source files are NOT used for the FreeRTOS+TCP interface: - - $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_bdring.c - $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_hw.c - $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_sinit.c + + +NetworkInterface for Xilinx' Zynq + +Please include the following source files: + + $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/NetworkInterface.c + $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/x_emacpsif_dma.c + $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c + $(PLUS_TCP_PATH)/portable/NetworkInterface/Zynq/x_emacpsif_hw.c + +And include the following source files from the Xilinx library: + + $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps.c + $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_control.c + $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_g.c + $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_intr.c + + E.g. ps7_cortexa9_0/libsrc/emacps_v2_0/src/xemacps_intr.c + +The following source files are NOT used for the FreeRTOS+TCP interface: + + $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_bdring.c + $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_hw.c + $(CPU_PATH)/$(PROCESSOR)/libsrc/emacps_v2_0/src/xemacps_sinit.c diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.c deleted file mode 100644 index b43e50ec2..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * uncached_memory.c - * - * This module will declare 1 MB of memory and switch off the caching for it. - * - * pucGetUncachedMemory( ulSize ) returns a trunc of this memory with a length - * rounded up to a multiple of 4 KB - * - * ucIsCachedMemory( pucBuffer ) returns non-zero if a given pointer is NOT - * within the range of the 1 MB non-cached memory. - * - */ - -/* - * After "_end", 1 MB of uncached memory will be allocated for DMA transfers. - * Both the DMA descriptors as well as all EMAC TX-buffers will be allocated in - * uncached memory. - */ - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" - -#include "Zynq/x_emacpsif.h" -#include "Zynq/x_topology.h" -#include "xstatus.h" - -#include "xparameters.h" -#include "xparameters_ps.h" -#include "xil_exception.h" -#include "xil_mmu.h" - -#include "uncached_memory.h" - -#define UNCACHED_MEMORY_SIZE 0x100000ul - -#define DDR_MEMORY_END (XPAR_PS7_DDR_0_S_AXI_HIGHADDR+1) - -static void vInitialiseUncachedMemory( void ); - -static uint8_t *pucHeadOfMemory; -static uint32_t ulMemorySize; -static uint8_t *pucStartOfMemory = NULL; - -uint8_t ucIsCachedMemory( const uint8_t *pucBuffer ) -{ -uint8_t ucReturn; - - if( ( pucStartOfMemory != NULL ) && - ( pucBuffer >= pucStartOfMemory ) && - ( pucBuffer < ( pucStartOfMemory + UNCACHED_MEMORY_SIZE ) ) ) - { - ucReturn = pdFALSE; - } - else - { - ucReturn = pdTRUE; - } - - return ucReturn; -} - -uint8_t *pucGetUncachedMemory( uint32_t ulSize ) -{ -uint8_t *pucReturn; - - if( pucStartOfMemory == NULL ) - { - vInitialiseUncachedMemory( ); - } - if( ( pucStartOfMemory == NULL ) || ( ulSize > ulMemorySize ) ) - { - pucReturn = NULL; - } - else - { - uint32_t ulSkipSize; - - pucReturn = pucHeadOfMemory; - ulSkipSize = ( ulSize + 0x1000ul ) & ~0xffful; - pucHeadOfMemory += ulSkipSize; - ulMemorySize -= ulSkipSize; - } - - return pucReturn; -} - -extern u8 _end; - -static void vInitialiseUncachedMemory( ) -{ - /* At the end of program's space... */ - pucStartOfMemory = (uint8_t *) &_end; - /* - * Align the start address to 1 MB boundary. - */ - pucStartOfMemory = (uint8_t *)( ( ( uint32_t )pucStartOfMemory + UNCACHED_MEMORY_SIZE ) & ( ~( UNCACHED_MEMORY_SIZE - 1 ) ) ); - - if( ( ( u32 )pucStartOfMemory ) + UNCACHED_MEMORY_SIZE > DDR_MEMORY_END ) - { -// vLoggingPrintf("vInitialiseUncachedMemory: Can not allocate uncached memory\n" ); - } - else - { - /* - * Some objects want to be stored in uncached memory. Hence the 1 MB - * address range that starts after "_end" is made uncached - * by setting appropriate attributes in the translation table. - */ - /* FIXME claudio rossi. Modified to prevent data abort exception (misaligned access) - * when application is compiled with -O1 or more optimization flag. - */ -/* Xil_SetTlbAttributes( ( uint32_t )pucStartOfMemory, 0xc02 ); // addr, attr */ - Xil_SetTlbAttributes( ( uint32_t )pucStartOfMemory, 0x1c02 ); // addr, attr - - /* For experiments in the SDIO driver, make the remaining uncached memory public */ - pucHeadOfMemory = pucStartOfMemory; - ulMemorySize = UNCACHED_MEMORY_SIZE; - memset( pucStartOfMemory, '\0', UNCACHED_MEMORY_SIZE ); - } -} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.h deleted file mode 100644 index 5a8e5f37f..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * uncached_memory.h - * - * This module will declare 1 MB of memory and switch off the caching for it. - * - * pucGetUncachedMemory( ulSize ) returns a trunc of this memory with a length - * rounded up to a multiple of 4 KB - * - * ucIsCachedMemory( pucBuffer ) returns non-zero if a given pointer is NOT - * within the range of the 1 MB non-cached memory. - * - */ - -#ifndef UNCACHEMEMORY_H - -#define UNCACHEMEMORY_H - -uint8_t *pucGetUncachedMemory( uint32_t ulSize ); - -uint8_t ucIsCachedMemory( const uint8_t *pucBuffer ); - -#endif /* UNCACHEMEMORY_H */ - diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif.h index 823dee0d3..2f1b0df20 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif.h @@ -1,144 +1,144 @@ -/* - * Copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. - * - * Xilinx, Inc. - * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A - * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS - * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR - * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION - * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE - * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. - * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO - * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO - * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE - * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __NETIF_XEMACPSIF_H__ -#define __NETIF_XEMACPSIF_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include "xstatus.h" -#include "sleep.h" -#include "xparameters.h" -#include "xparameters_ps.h" /* defines XPAR values */ -#include "xil_types.h" -#include "xil_assert.h" -#include "xil_io.h" -#include "xil_exception.h" -#include "xpseudo_asm.h" -#include "xil_cache.h" -#include "xil_printf.h" -#include "xuartps.h" -#include "xscugic.h" -#include "xemacps.h" /* defines XEmacPs API */ - -//#include "netif/xpqueue.h" -//#include "xlwipconfig.h" - -void xemacpsif_setmac(uint32_t index, uint8_t *addr); -uint8_t* xemacpsif_getmac(uint32_t index); -//int xemacpsif_init(struct netif *netif); -//int xemacpsif_input(struct netif *netif); -#ifdef NOTNOW_BHILL -unsigned get_IEEE_phy_speed(XLlTemac *xlltemacp); -#endif - -/* xaxiemacif_hw.c */ -void xemacps_error_handler(XEmacPs * Temac); - -struct xBD_TYPE { - uint32_t address; - uint32_t flags; -}; - -/* - * Missing declaration in 'src/xemacps_hw.h' : - * When set, the GEM DMA will automatically - * discard receive packets from the receiver packet - * buffer memory when no AHB resource is - * available. - * When low, then received packets will remain to be - * stored in the SRAM based packet buffer until - * AHB buffer resource next becomes available. - */ -#define XEMACPS_DMACR_DISC_WHEN_NO_AHB_MASK 0x01000000 - -#define EMAC_IF_RX_EVENT 1 -#define EMAC_IF_TX_EVENT 2 -#define EMAC_IF_ERR_EVENT 4 -#define EMAC_IF_ALL_EVENT 7 - -/* structure within each netif, encapsulating all information required for - * using a particular temac instance - */ -typedef struct { - XEmacPs emacps; - - /* pointers to memory holding buffer descriptors (used only with SDMA) */ - struct xBD_TYPE *rxSegments; - struct xBD_TYPE *txSegments; - - unsigned char *tx_space; - unsigned uTxUnitSize; - - char *remain_mem; - unsigned remain_siz; - - volatile int rxHead, rxTail; - volatile int txHead, txTail; - - volatile int txBusy; - - volatile uint32_t isr_events; - - unsigned int last_rx_frms_cntr; - -} xemacpsif_s; - -//extern xemacpsif_s xemacpsif; - -int is_tx_space_available(xemacpsif_s *emac); - -/* xaxiemacif_dma.c */ - -struct xNETWORK_BUFFER; - -int emacps_check_rx( xemacpsif_s *xemacpsif ); -void emacps_check_tx( xemacpsif_s *xemacpsif ); -int emacps_check_errors( xemacpsif_s *xemacps ); -void emacps_set_rx_buffers( xemacpsif_s *xemacpsif, u32 ulCount ); - -extern XStatus emacps_send_message(xemacpsif_s *xemacpsif, struct xNETWORK_BUFFER *pxBuffer, int iReleaseAfterSend ); -extern unsigned Phy_Setup( XEmacPs *xemacpsp ); -extern void setup_isr( xemacpsif_s *xemacpsif ); -extern XStatus init_dma( xemacpsif_s *xemacpsif ); -extern void start_emacps( xemacpsif_s *xemacpsif ); - -void EmacEnableIntr(void); -void EmacDisableIntr(void); - -XStatus init_axi_dma(xemacpsif_s *xemacpsif); -void process_sent_bds( xemacpsif_s *xemacpsif ); - -void emacps_send_handler(void *arg); -void emacps_recv_handler(void *arg); -void emacps_error_handler(void *arg,u8 Direction, u32 ErrorWord); -void HandleTxErrors(xemacpsif_s *xemacpsif); -XEmacPs_Config *xemacps_lookup_config(unsigned mac_base); - -void clean_dma_txdescs(xemacpsif_s *xemacpsif); -void resetrx_on_no_rxdata(xemacpsif_s *xemacpsif); - -#ifdef __cplusplus -} -#endif - -#endif /* __NETIF_XAXIEMACIF_H__ */ +/* + * Copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. + * + * Xilinx, Inc. + * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A + * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS + * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR + * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION + * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE + * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. + * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO + * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO + * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE + * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __NETIF_XEMACPSIF_H__ +#define __NETIF_XEMACPSIF_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include "xstatus.h" +#include "sleep.h" +#include "xparameters.h" +#include "xparameters_ps.h" /* defines XPAR values */ +#include "xil_types.h" +#include "xil_assert.h" +#include "xil_io.h" +#include "xil_exception.h" +#include "xpseudo_asm.h" +#include "xil_cache.h" +#include "xil_printf.h" +#include "xuartps.h" +#include "xscugic.h" +#include "xemacps.h" /* defines XEmacPs API */ + +//#include "netif/xpqueue.h" +//#include "xlwipconfig.h" + +void xemacpsif_setmac(uint32_t index, uint8_t *addr); +uint8_t* xemacpsif_getmac(uint32_t index); +//int xemacpsif_init(struct netif *netif); +//int xemacpsif_input(struct netif *netif); +#ifdef NOTNOW_BHILL +unsigned get_IEEE_phy_speed(XLlTemac *xlltemacp); +#endif + +/* xaxiemacif_hw.c */ +void xemacps_error_handler(XEmacPs * Temac); + +struct xBD_TYPE { + uint32_t address; + uint32_t flags; +}; + +/* + * Missing declaration in 'src/xemacps_hw.h' : + * When set, the GEM DMA will automatically + * discard receive packets from the receiver packet + * buffer memory when no AHB resource is + * available. + * When low, then received packets will remain to be + * stored in the SRAM based packet buffer until + * AHB buffer resource next becomes available. + */ +#define XEMACPS_DMACR_DISC_WHEN_NO_AHB_MASK 0x01000000 + +#define EMAC_IF_RX_EVENT 1 +#define EMAC_IF_TX_EVENT 2 +#define EMAC_IF_ERR_EVENT 4 +#define EMAC_IF_ALL_EVENT 7 + +/* structure within each netif, encapsulating all information required for + * using a particular temac instance + */ +typedef struct { + XEmacPs emacps; + + /* pointers to memory holding buffer descriptors (used only with SDMA) */ + struct xBD_TYPE *rxSegments; + struct xBD_TYPE *txSegments; + + unsigned char *tx_space; + unsigned uTxUnitSize; + + char *remain_mem; + unsigned remain_siz; + + volatile int rxHead, rxTail; + volatile int txHead, txTail; + + volatile int txBusy; + + volatile uint32_t isr_events; + + unsigned int last_rx_frms_cntr; + +} xemacpsif_s; + +//extern xemacpsif_s xemacpsif; + +int is_tx_space_available(xemacpsif_s *emac); + +/* xaxiemacif_dma.c */ + +struct xNETWORK_BUFFER; + +int emacps_check_rx( xemacpsif_s *xemacpsif ); +void emacps_check_tx( xemacpsif_s *xemacpsif ); +int emacps_check_errors( xemacpsif_s *xemacps ); +void emacps_set_rx_buffers( xemacpsif_s *xemacpsif, u32 ulCount ); + +extern XStatus emacps_send_message(xemacpsif_s *xemacpsif, struct xNETWORK_BUFFER *pxBuffer, int iReleaseAfterSend ); +extern unsigned Phy_Setup( XEmacPs *xemacpsp ); +extern void setup_isr( xemacpsif_s *xemacpsif ); +extern XStatus init_dma( xemacpsif_s *xemacpsif ); +extern void start_emacps( xemacpsif_s *xemacpsif ); + +void EmacEnableIntr(void); +void EmacDisableIntr(void); + +XStatus init_axi_dma(xemacpsif_s *xemacpsif); +void process_sent_bds( xemacpsif_s *xemacpsif ); + +void emacps_send_handler(void *arg); +void emacps_recv_handler(void *arg); +void emacps_error_handler(void *arg,u8 Direction, u32 ErrorWord); +void HandleTxErrors(xemacpsif_s *xemacpsif); +XEmacPs_Config *xemacps_lookup_config(unsigned mac_base); + +void clean_dma_txdescs(xemacpsif_s *xemacpsif); +void resetrx_on_no_rxdata(xemacpsif_s *xemacpsif); + +#ifdef __cplusplus +} +#endif + +#endif /* __NETIF_XAXIEMACIF_H__ */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_dma.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_dma.c index fc09d2183..13a62852d 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_dma.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_dma.c @@ -1,626 +1,626 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -#include "Zynq/x_emacpsif.h" -#include "Zynq/x_topology.h" -#include "xstatus.h" - -#include "xparameters.h" -#include "xparameters_ps.h" -#include "xil_exception.h" -#include "xil_mmu.h" - -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" - -#include "uncached_memory.h" - -/* Two defines used to set or clear the EMAC interrupt */ -#define INTC_BASE_ADDR XPAR_SCUGIC_CPU_BASEADDR -#define INTC_DIST_BASE_ADDR XPAR_SCUGIC_DIST_BASEADDR - - - -#if( ipconfigPACKET_FILLER_SIZE != 2 ) - #error Please define ipconfigPACKET_FILLER_SIZE as the value '2' -#endif -#define TX_OFFSET ipconfigPACKET_FILLER_SIZE - -#define RX_BUFFER_ALIGNMENT 14 - -/* Defined in NetworkInterface.c */ -extern TaskHandle_t xEMACTaskHandle; - -/* - pxDMA_tx_buffers: these are character arrays, each one is big enough to hold 1 MTU. - The actual TX buffers are located in uncached RAM. -*/ -static unsigned char *pxDMA_tx_buffers[ ipconfigNIC_N_TX_DESC ] = { NULL }; - -/* - pxDMA_rx_buffers: these are pointers to 'NetworkBufferDescriptor_t'. - Once a message has been received by the EMAC, the descriptor can be passed - immediately to the IP-task. -*/ -static NetworkBufferDescriptor_t *pxDMA_rx_buffers[ ipconfigNIC_N_RX_DESC ] = { NULL }; - -/* - The FreeRTOS+TCP port is using a fixed 'topology', which is declared in - ./portable/NetworkInterface/Zynq/NetworkInterface.c -*/ -extern struct xtopology_t xXTopology; - -static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; - -/* - The FreeRTOS+TCP port does not make use of "src/xemacps_bdring.c". - In stead 'struct xemacpsif_s' has a "head" and a "tail" index. - "head" is the next index to be written, used. - "tail" is the next index to be read, freed. -*/ - -int is_tx_space_available( xemacpsif_s *xemacpsif ) -{ -size_t uxCount; - - if( xTXDescriptorSemaphore != NULL ) - { - uxCount = ( ( UBaseType_t ) ipconfigNIC_N_TX_DESC ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); - } - else - { - uxCount = ( UBaseType_t ) 0u; - } - - return uxCount; -} - -void emacps_check_tx( xemacpsif_s *xemacpsif ) -{ -int tail = xemacpsif->txTail; -int head = xemacpsif->txHead; -size_t uxCount = ( ( UBaseType_t ) ipconfigNIC_N_TX_DESC ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); - - /* uxCount is the number of TX descriptors that are in use by the DMA. */ - /* When done, "TXBUF_USED" will be set. */ - - while( ( uxCount > 0 ) && ( ( xemacpsif->txSegments[ tail ].flags & XEMACPS_TXBUF_USED_MASK ) != 0 ) ) - { - if( ( tail == head ) && ( uxCount != ipconfigNIC_N_TX_DESC ) ) - { - break; - } -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) -#warning ipconfigZERO_COPY_TX_DRIVER is defined - { - void *pvBuffer = pxDMA_tx_buffers[ tail ]; - NetworkBufferDescriptor_t *pxBuffer; - - if( pvBuffer != NULL ) - { - pxDMA_tx_buffers[ tail ] = NULL; - pxBuffer = pxPacketBuffer_to_NetworkBuffer( pvBuffer ); - if( pxBuffer != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxBuffer ); - } - else - { - FreeRTOS_printf( ( "emacps_check_tx: Can not find network buffer\n" ) ); - } - } - } -#endif - /* Clear all but the "used" and "wrap" bits. */ - if( tail < ipconfigNIC_N_TX_DESC - 1 ) - { - xemacpsif->txSegments[ tail ].flags = XEMACPS_TXBUF_USED_MASK; - } - else - { - xemacpsif->txSegments[ tail ].flags = XEMACPS_TXBUF_USED_MASK | XEMACPS_TXBUF_WRAP_MASK; - } - uxCount--; - /* Tell the counting semaphore that one more TX descriptor is available. */ - xSemaphoreGive( xTXDescriptorSemaphore ); - if( ++tail == ipconfigNIC_N_TX_DESC ) - { - tail = 0; - } - xemacpsif->txTail = tail; - } - - return; -} - -void emacps_send_handler(void *arg) -{ -xemacpsif_s *xemacpsif; -BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - xemacpsif = (xemacpsif_s *)(arg); - - /* In this port for FreeRTOS+TCP, the EMAC interrupts will only set a bit in - "isr_events". The task in NetworkInterface will wake-up and do the necessary work. - */ - xemacpsif->isr_events |= EMAC_IF_TX_EVENT; - xemacpsif->txBusy = pdFALSE; - - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); - } - - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); -} - -static BaseType_t xValidLength( BaseType_t xLength ) -{ -BaseType_t xReturn; - - if( ( xLength >= ( BaseType_t ) sizeof( struct xARP_PACKET ) ) && ( ( ( uint32_t ) xLength ) <= ipTOTAL_ETHERNET_FRAME_SIZE ) ) - { - xReturn = pdTRUE; - } - else - { - xReturn = pdFALSE; - } - - return xReturn; -} - -XStatus emacps_send_message(xemacpsif_s *xemacpsif, NetworkBufferDescriptor_t *pxBuffer, int iReleaseAfterSend ) -{ -int head = xemacpsif->txHead; -int iHasSent = 0; -uint32_t ulBaseAddress = xemacpsif->emacps.Config.BaseAddress; -TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 5000u ); - - #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - /* This driver wants to own all network buffers which are to be transmitted. */ - configASSERT( iReleaseAfterSend != pdFALSE ); - } - #endif - - /* Open a do {} while ( 0 ) loop to be able to call break. */ - do - { - uint32_t ulFlags = 0; - - if( xValidLength( pxBuffer->xDataLength ) != pdTRUE ) - { - break; - } - - if( xTXDescriptorSemaphore == NULL ) - { - break; - } - - if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) - { - FreeRTOS_printf( ( "emacps_send_message: Time-out waiting for TX buffer\n" ) ); - break; - } - -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - /* Pass the pointer (and its ownership) directly to DMA. */ - pxDMA_tx_buffers[ head ] = pxBuffer->pucEthernetBuffer; - if( ucIsCachedMemory( pxBuffer->pucEthernetBuffer ) != 0 ) - { - Xil_DCacheFlushRange( ( unsigned )pxBuffer->pucEthernetBuffer, pxBuffer->xDataLength ); - } - /* Buffer has been transferred, do not release it. */ - iReleaseAfterSend = pdFALSE; -#else - if( pxDMA_tx_buffers[ head ] == NULL ) - { - FreeRTOS_printf( ( "emacps_send_message: pxDMA_tx_buffers[ %d ] == NULL\n", head ) ); - break; - } - /* Copy the message to unbuffered space in RAM. */ - memcpy( pxDMA_tx_buffers[ head ], pxBuffer->pucEthernetBuffer, pxBuffer->xDataLength ); -#endif - /* Packets will be sent one-by-one, so for each packet - the TXBUF_LAST bit will be set. */ - ulFlags |= XEMACPS_TXBUF_LAST_MASK; - ulFlags |= ( pxBuffer->xDataLength & XEMACPS_TXBUF_LEN_MASK ); - if( head == ( ipconfigNIC_N_TX_DESC - 1 ) ) - { - ulFlags |= XEMACPS_TXBUF_WRAP_MASK; - } - - /* Copy the address of the buffer and set the flags. */ - xemacpsif->txSegments[ head ].address = ( uint32_t )pxDMA_tx_buffers[ head ]; - xemacpsif->txSegments[ head ].flags = ulFlags; - - iHasSent = pdTRUE; - if( ++head == ipconfigNIC_N_TX_DESC ) - { - head = 0; - } - /* Update the TX-head index. These variable are declared volatile so they will be - accessed as little as possible. */ - xemacpsif->txHead = head; - } while( pdFALSE ); - - if( iReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxBuffer ); - pxBuffer = NULL; - } - - /* Data Synchronization Barrier */ - dsb(); - - if( iHasSent != pdFALSE ) - { - /* Make STARTTX high */ - uint32_t ulValue = XEmacPs_ReadReg( ulBaseAddress, XEMACPS_NWCTRL_OFFSET); - /* Start transmit */ - xemacpsif->txBusy = pdTRUE; - XEmacPs_WriteReg( ulBaseAddress, XEMACPS_NWCTRL_OFFSET, ( ulValue | XEMACPS_NWCTRL_STARTTX_MASK ) ); - } - dsb(); - - return 0; -} - -void emacps_recv_handler(void *arg) -{ - xemacpsif_s *xemacpsif; - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - xemacpsif = (xemacpsif_s *)(arg); - xemacpsif->isr_events |= EMAC_IF_RX_EVENT; - - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); - } - - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); -} - -static NetworkBufferDescriptor_t *ethMsg = NULL; -static NetworkBufferDescriptor_t *ethLast = NULL; - -static void passEthMessages( void ) -{ -IPStackEvent_t xRxEvent; - - xRxEvent.eEventType = eNetworkRxEvent; - xRxEvent.pvData = ( void * ) ethMsg; - - if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 1000 ) != pdPASS ) - { - /* The buffer could not be sent to the stack so must be released again. - This is a deferred handler taskr, not a real interrupt, so it is ok to - use the task level function here. */ - do - { - NetworkBufferDescriptor_t *xNext = ethMsg->pxNextBuffer; - vReleaseNetworkBufferAndDescriptor( ethMsg ); - ethMsg = xNext; - } while( ethMsg != NULL ); - - iptraceETHERNET_RX_EVENT_LOST(); - FreeRTOS_printf( ( "passEthMessages: Can not queue return packet!\n" ) ); - } - - ethMsg = ethLast = NULL; -} - -int emacps_check_rx( xemacpsif_s *xemacpsif ) -{ -NetworkBufferDescriptor_t *pxBuffer, *pxNewBuffer; -int rx_bytes; -volatile int msgCount = 0; -int head = xemacpsif->rxHead; - - /* There seems to be an issue (SI# 692601), see comments below. */ - resetrx_on_no_rxdata(xemacpsif); - - /* This FreeRTOS+TCP driver shall be compiled with the option - "ipconfigUSE_LINKED_RX_MESSAGES" enabled. It allows the driver to send a - chain of RX messages within one message to the IP-task. */ - for( ;; ) - { - if( ( ( xemacpsif->rxSegments[ head ].address & XEMACPS_RXBUF_NEW_MASK ) == 0 ) || - ( pxDMA_rx_buffers[ head ] == NULL ) ) - { - break; - } - - pxNewBuffer = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT, ( TickType_t ) 0 ); - if( pxNewBuffer == NULL ) - { - /* A packet has been received, but there is no replacement for this Network Buffer. - The packet will be dropped, and it Network Buffer will stay in place. */ - FreeRTOS_printf( ("emacps_check_rx: unable to allocate a Netwrok Buffer\n" ) ); - pxNewBuffer = ( NetworkBufferDescriptor_t * )pxDMA_rx_buffers[ head ]; - } - else - { - pxBuffer = ( NetworkBufferDescriptor_t * )pxDMA_rx_buffers[ head ]; - - /* Just avoiding to use or refer to the same buffer again */ - pxDMA_rx_buffers[ head ] = pxNewBuffer; - - /* - * Adjust the buffer size to the actual number of bytes received. - */ - rx_bytes = xemacpsif->rxSegments[ head ].flags & XEMACPS_RXBUF_LEN_MASK; - - pxBuffer->xDataLength = rx_bytes; - - if( ucIsCachedMemory( pxBuffer->pucEthernetBuffer ) != 0 ) - { - Xil_DCacheInvalidateRange( ( ( uint32_t )pxBuffer->pucEthernetBuffer ) - ipconfigPACKET_FILLER_SIZE, (unsigned)rx_bytes ); - } - - /* store it in the receive queue, where it'll be processed by a - different handler. */ - iptraceNETWORK_INTERFACE_RECEIVE(); - pxBuffer->pxNextBuffer = NULL; - - if( ethMsg == NULL ) - { - // Becomes the first message - ethMsg = pxBuffer; - } - else if( ethLast != NULL ) - { - // Add to the tail - ethLast->pxNextBuffer = pxBuffer; - } - - ethLast = pxBuffer; - msgCount++; - } - { - if( ucIsCachedMemory( pxNewBuffer->pucEthernetBuffer ) != 0 ) - { - Xil_DCacheInvalidateRange( ( ( uint32_t )pxNewBuffer->pucEthernetBuffer ) - ipconfigPACKET_FILLER_SIZE, (unsigned)ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT); - } - { - uint32_t addr = ( ( uint32_t )pxNewBuffer->pucEthernetBuffer ) & XEMACPS_RXBUF_ADD_MASK; - if( head == ( ipconfigNIC_N_RX_DESC - 1 ) ) - { - addr |= XEMACPS_RXBUF_WRAP_MASK; - } - /* Clearing 'XEMACPS_RXBUF_NEW_MASK' 0x00000001 *< Used bit.. */ - xemacpsif->rxSegments[ head ].address = addr; - xemacpsif->rxSegments[ head ].flags = 0; - } - } - - if( ++head == ipconfigNIC_N_RX_DESC ) - { - head = 0; - } - xemacpsif->rxHead = head; - } - - if( ethMsg != NULL ) - { - passEthMessages( ); - } - - return msgCount; -} - -void clean_dma_txdescs(xemacpsif_s *xemacpsif) -{ -int index; -unsigned char *ucTxBuffer; - - /* Clear all TX descriptors and assign uncached memory to each descriptor. - "tx_space" points to the first available TX buffer. */ - ucTxBuffer = xemacpsif->tx_space; - - for( index = 0; index < ipconfigNIC_N_TX_DESC; index++ ) - { - xemacpsif->txSegments[ index ].address = ( uint32_t )ucTxBuffer; - xemacpsif->txSegments[ index ].flags = XEMACPS_TXBUF_USED_MASK; -#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) - pxDMA_tx_buffers[ index ] = ( void* )NULL; -#else - pxDMA_tx_buffers[ index ] = ( void* )( ucTxBuffer + TX_OFFSET ); -#endif - ucTxBuffer += xemacpsif->uTxUnitSize; - } - xemacpsif->txSegments[ ipconfigNIC_N_TX_DESC - 1 ].flags = - XEMACPS_TXBUF_USED_MASK | XEMACPS_TXBUF_WRAP_MASK; -} - -XStatus init_dma(xemacpsif_s *xemacpsif) -{ - NetworkBufferDescriptor_t *pxBuffer; - - int iIndex; - UBaseType_t xRxSize; - UBaseType_t xTxSize; - struct xtopology_t *xtopologyp = &xXTopology; - - xRxSize = ipconfigNIC_N_RX_DESC * sizeof( xemacpsif->rxSegments[ 0 ] ); - - xTxSize = ipconfigNIC_N_TX_DESC * sizeof( xemacpsif->txSegments[ 0 ] ); - - /* Also round-up to 4KB */ - xemacpsif->uTxUnitSize = ( ipTOTAL_ETHERNET_FRAME_SIZE + 0x1000ul ) & ~0xffful; - /* - * We allocate 65536 bytes for RX BDs which can accommodate a - * maximum of 8192 BDs which is much more than any application - * will ever need. - */ - xemacpsif->rxSegments = ( struct xBD_TYPE * )( pucGetUncachedMemory ( xRxSize ) ); - xemacpsif->txSegments = ( struct xBD_TYPE * )( pucGetUncachedMemory ( xTxSize ) ); - xemacpsif->tx_space = ( unsigned char * )( pucGetUncachedMemory ( ipconfigNIC_N_TX_DESC * xemacpsif->uTxUnitSize ) ); - - /* These variables will be used in XEmacPs_Start (see src/xemacps.c). */ - xemacpsif->emacps.RxBdRing.BaseBdAddr = ( uint32_t ) xemacpsif->rxSegments; - xemacpsif->emacps.TxBdRing.BaseBdAddr = ( uint32_t ) xemacpsif->txSegments; - - if( xTXDescriptorSemaphore == NULL ) - { - xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ipconfigNIC_N_TX_DESC, ( UBaseType_t ) ipconfigNIC_N_TX_DESC ); - configASSERT( xTXDescriptorSemaphore ); - } - /* - * Allocate RX descriptors, 1 RxBD at a time. - */ - for( iIndex = 0; iIndex < ipconfigNIC_N_RX_DESC; iIndex++ ) - { - pxBuffer = pxDMA_rx_buffers[ iIndex ]; - if( pxBuffer == NULL ) - { - pxBuffer = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT, ( TickType_t ) 0 ); - if( pxBuffer == NULL ) - { - FreeRTOS_printf( ("Unable to allocate a network buffer in recv_handler\n" ) ); - return -1; - } - } - - xemacpsif->rxSegments[ iIndex ].flags = 0; - xemacpsif->rxSegments[ iIndex ].address = ( ( uint32_t )pxBuffer->pucEthernetBuffer ) & XEMACPS_RXBUF_ADD_MASK; - - pxDMA_rx_buffers[ iIndex ] = pxBuffer; - /* Make sure this memory is not in cache for now. */ - if( ucIsCachedMemory( pxBuffer->pucEthernetBuffer ) != 0 ) - { - Xil_DCacheInvalidateRange( ( ( uint32_t )pxBuffer->pucEthernetBuffer ) - ipconfigPACKET_FILLER_SIZE, - (unsigned)ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT); - } - } - - xemacpsif->rxSegments[ ipconfigNIC_N_RX_DESC - 1 ].address |= XEMACPS_RXBUF_WRAP_MASK; - - memset( xemacpsif->tx_space, '\0', ipconfigNIC_N_TX_DESC * xemacpsif->uTxUnitSize ); - - clean_dma_txdescs( xemacpsif ); - - { - uint32_t value; - value = XEmacPs_ReadReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_DMACR_OFFSET ); - - // 1xxxx: Attempt to use INCR16 AHB bursts - value = ( value & ~( XEMACPS_DMACR_BLENGTH_MASK ) ) | XEMACPS_DMACR_INCR16_AHB_BURST; -#if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - value |= XEMACPS_DMACR_TCPCKSUM_MASK; -#else -#warning Are you sure the EMAC should not calculate outgoing checksums? - value &= ~XEMACPS_DMACR_TCPCKSUM_MASK; -#endif - XEmacPs_WriteReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_DMACR_OFFSET, value ); - } - { - uint32_t value; - value = XEmacPs_ReadReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCFG_OFFSET ); - - /* Network buffers are 32-bit aligned + 2 bytes (because ipconfigPACKET_FILLER_SIZE = 2 ). - Now tell the EMAC that received messages should be stored at "address + 2". */ - value = ( value & ~XEMACPS_NWCFG_RXOFFS_MASK ) | 0x8000; - -#if( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM != 0 ) - value |= XEMACPS_NWCFG_RXCHKSUMEN_MASK; -#else -#warning Are you sure the EMAC should not calculate incoming checksums? - value &= ~XEMACPS_NWCFG_RXCHKSUMEN_MASK; -#endif - XEmacPs_WriteReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCFG_OFFSET, value ); - } - - /* - * Connect the device driver handler that will be called when an - * interrupt for the device occurs, the handler defined above performs - * the specific interrupt processing for the device. - */ - XScuGic_RegisterHandler(INTC_BASE_ADDR, xtopologyp->scugic_emac_intr, - (Xil_ExceptionHandler)XEmacPs_IntrHandler, - (void *)&xemacpsif->emacps); - /* - * Enable the interrupt for emacps. - */ - EmacEnableIntr( ); - - return 0; -} - -/* - * resetrx_on_no_rxdata(): - * - * It is called at regular intervals through the API xemacpsif_resetrx_on_no_rxdata - * called by the user. - * The EmacPs has a HW bug (SI# 692601) on the Rx path for heavy Rx traffic. - * Under heavy Rx traffic because of the HW bug there are times when the Rx path - * becomes unresponsive. The workaround for it is to check for the Rx path for - * traffic (by reading the stats registers regularly). If the stats register - * does not increment for sometime (proving no Rx traffic), the function resets - * the Rx data path. - * - */ - -void resetrx_on_no_rxdata(xemacpsif_s *xemacpsif) -{ - unsigned long regctrl; - unsigned long tempcntr; - - tempcntr = XEmacPs_ReadReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_RXCNT_OFFSET ); - if ( ( tempcntr == 0 ) && ( xemacpsif->last_rx_frms_cntr == 0 ) ) - { - regctrl = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, - XEMACPS_NWCTRL_OFFSET); - regctrl &= (~XEMACPS_NWCTRL_RXEN_MASK); - XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, - XEMACPS_NWCTRL_OFFSET, regctrl); - regctrl = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCTRL_OFFSET); - regctrl |= (XEMACPS_NWCTRL_RXEN_MASK); - XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCTRL_OFFSET, regctrl); - } - xemacpsif->last_rx_frms_cntr = tempcntr; -} - -void EmacDisableIntr(void) -{ - XScuGic_DisableIntr(INTC_DIST_BASE_ADDR, xXTopology.scugic_emac_intr); -} - -void EmacEnableIntr(void) -{ - XScuGic_EnableIntr(INTC_DIST_BASE_ADDR, xXTopology.scugic_emac_intr); -} - +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +#include "Zynq/x_emacpsif.h" +#include "Zynq/x_topology.h" +#include "xstatus.h" + +#include "xparameters.h" +#include "xparameters_ps.h" +#include "xil_exception.h" +#include "xil_mmu.h" + +#include "FreeRTOS.h" +#include "task.h" +#include "timers.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" + +#include "uncached_memory.h" + +/* Two defines used to set or clear the EMAC interrupt */ +#define INTC_BASE_ADDR XPAR_SCUGIC_CPU_BASEADDR +#define INTC_DIST_BASE_ADDR XPAR_SCUGIC_DIST_BASEADDR + + + +#if( ipconfigPACKET_FILLER_SIZE != 2 ) + #error Please define ipconfigPACKET_FILLER_SIZE as the value '2' +#endif +#define TX_OFFSET ipconfigPACKET_FILLER_SIZE + +#define RX_BUFFER_ALIGNMENT 14 + +/* Defined in NetworkInterface.c */ +extern TaskHandle_t xEMACTaskHandle; + +/* + pxDMA_tx_buffers: these are character arrays, each one is big enough to hold 1 MTU. + The actual TX buffers are located in uncached RAM. +*/ +static unsigned char *pxDMA_tx_buffers[ ipconfigNIC_N_TX_DESC ] = { NULL }; + +/* + pxDMA_rx_buffers: these are pointers to 'NetworkBufferDescriptor_t'. + Once a message has been received by the EMAC, the descriptor can be passed + immediately to the IP-task. +*/ +static NetworkBufferDescriptor_t *pxDMA_rx_buffers[ ipconfigNIC_N_RX_DESC ] = { NULL }; + +/* + The FreeRTOS+TCP port is using a fixed 'topology', which is declared in + ./portable/NetworkInterface/Zynq/NetworkInterface.c +*/ +extern struct xtopology_t xXTopology; + +static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; + +/* + The FreeRTOS+TCP port does not make use of "src/xemacps_bdring.c". + In stead 'struct xemacpsif_s' has a "head" and a "tail" index. + "head" is the next index to be written, used. + "tail" is the next index to be read, freed. +*/ + +int is_tx_space_available( xemacpsif_s *xemacpsif ) +{ +size_t uxCount; + + if( xTXDescriptorSemaphore != NULL ) + { + uxCount = ( ( UBaseType_t ) ipconfigNIC_N_TX_DESC ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); + } + else + { + uxCount = ( UBaseType_t ) 0u; + } + + return uxCount; +} + +void emacps_check_tx( xemacpsif_s *xemacpsif ) +{ +int tail = xemacpsif->txTail; +int head = xemacpsif->txHead; +size_t uxCount = ( ( UBaseType_t ) ipconfigNIC_N_TX_DESC ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); + + /* uxCount is the number of TX descriptors that are in use by the DMA. */ + /* When done, "TXBUF_USED" will be set. */ + + while( ( uxCount > 0 ) && ( ( xemacpsif->txSegments[ tail ].flags & XEMACPS_TXBUF_USED_MASK ) != 0 ) ) + { + if( ( tail == head ) && ( uxCount != ipconfigNIC_N_TX_DESC ) ) + { + break; + } +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) +#warning ipconfigZERO_COPY_TX_DRIVER is defined + { + void *pvBuffer = pxDMA_tx_buffers[ tail ]; + NetworkBufferDescriptor_t *pxBuffer; + + if( pvBuffer != NULL ) + { + pxDMA_tx_buffers[ tail ] = NULL; + pxBuffer = pxPacketBuffer_to_NetworkBuffer( pvBuffer ); + if( pxBuffer != NULL ) + { + vReleaseNetworkBufferAndDescriptor( pxBuffer ); + } + else + { + FreeRTOS_printf( ( "emacps_check_tx: Can not find network buffer\n" ) ); + } + } + } +#endif + /* Clear all but the "used" and "wrap" bits. */ + if( tail < ipconfigNIC_N_TX_DESC - 1 ) + { + xemacpsif->txSegments[ tail ].flags = XEMACPS_TXBUF_USED_MASK; + } + else + { + xemacpsif->txSegments[ tail ].flags = XEMACPS_TXBUF_USED_MASK | XEMACPS_TXBUF_WRAP_MASK; + } + uxCount--; + /* Tell the counting semaphore that one more TX descriptor is available. */ + xSemaphoreGive( xTXDescriptorSemaphore ); + if( ++tail == ipconfigNIC_N_TX_DESC ) + { + tail = 0; + } + xemacpsif->txTail = tail; + } + + return; +} + +void emacps_send_handler(void *arg) +{ +xemacpsif_s *xemacpsif; +BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + xemacpsif = (xemacpsif_s *)(arg); + + /* In this port for FreeRTOS+TCP, the EMAC interrupts will only set a bit in + "isr_events". The task in NetworkInterface will wake-up and do the necessary work. + */ + xemacpsif->isr_events |= EMAC_IF_TX_EVENT; + xemacpsif->txBusy = pdFALSE; + + if( xEMACTaskHandle != NULL ) + { + vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); + } + + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); +} + +static BaseType_t xValidLength( BaseType_t xLength ) +{ +BaseType_t xReturn; + + if( ( xLength >= ( BaseType_t ) sizeof( struct xARP_PACKET ) ) && ( ( ( uint32_t ) xLength ) <= ipTOTAL_ETHERNET_FRAME_SIZE ) ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + + return xReturn; +} + +XStatus emacps_send_message(xemacpsif_s *xemacpsif, NetworkBufferDescriptor_t *pxBuffer, int iReleaseAfterSend ) +{ +int head = xemacpsif->txHead; +int iHasSent = 0; +uint32_t ulBaseAddress = xemacpsif->emacps.Config.BaseAddress; +TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 5000u ); + + #if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + { + /* This driver wants to own all network buffers which are to be transmitted. */ + configASSERT( iReleaseAfterSend != pdFALSE ); + } + #endif + + /* Open a do {} while ( 0 ) loop to be able to call break. */ + do + { + uint32_t ulFlags = 0; + + if( xValidLength( pxBuffer->xDataLength ) != pdTRUE ) + { + break; + } + + if( xTXDescriptorSemaphore == NULL ) + { + break; + } + + if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) + { + FreeRTOS_printf( ( "emacps_send_message: Time-out waiting for TX buffer\n" ) ); + break; + } + +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + /* Pass the pointer (and its ownership) directly to DMA. */ + pxDMA_tx_buffers[ head ] = pxBuffer->pucEthernetBuffer; + if( ucIsCachedMemory( pxBuffer->pucEthernetBuffer ) != 0 ) + { + Xil_DCacheFlushRange( ( unsigned )pxBuffer->pucEthernetBuffer, pxBuffer->xDataLength ); + } + /* Buffer has been transferred, do not release it. */ + iReleaseAfterSend = pdFALSE; +#else + if( pxDMA_tx_buffers[ head ] == NULL ) + { + FreeRTOS_printf( ( "emacps_send_message: pxDMA_tx_buffers[ %d ] == NULL\n", head ) ); + break; + } + /* Copy the message to unbuffered space in RAM. */ + memcpy( pxDMA_tx_buffers[ head ], pxBuffer->pucEthernetBuffer, pxBuffer->xDataLength ); +#endif + /* Packets will be sent one-by-one, so for each packet + the TXBUF_LAST bit will be set. */ + ulFlags |= XEMACPS_TXBUF_LAST_MASK; + ulFlags |= ( pxBuffer->xDataLength & XEMACPS_TXBUF_LEN_MASK ); + if( head == ( ipconfigNIC_N_TX_DESC - 1 ) ) + { + ulFlags |= XEMACPS_TXBUF_WRAP_MASK; + } + + /* Copy the address of the buffer and set the flags. */ + xemacpsif->txSegments[ head ].address = ( uint32_t )pxDMA_tx_buffers[ head ]; + xemacpsif->txSegments[ head ].flags = ulFlags; + + iHasSent = pdTRUE; + if( ++head == ipconfigNIC_N_TX_DESC ) + { + head = 0; + } + /* Update the TX-head index. These variable are declared volatile so they will be + accessed as little as possible. */ + xemacpsif->txHead = head; + } while( pdFALSE ); + + if( iReleaseAfterSend != pdFALSE ) + { + vReleaseNetworkBufferAndDescriptor( pxBuffer ); + pxBuffer = NULL; + } + + /* Data Synchronization Barrier */ + dsb(); + + if( iHasSent != pdFALSE ) + { + /* Make STARTTX high */ + uint32_t ulValue = XEmacPs_ReadReg( ulBaseAddress, XEMACPS_NWCTRL_OFFSET); + /* Start transmit */ + xemacpsif->txBusy = pdTRUE; + XEmacPs_WriteReg( ulBaseAddress, XEMACPS_NWCTRL_OFFSET, ( ulValue | XEMACPS_NWCTRL_STARTTX_MASK ) ); + } + dsb(); + + return 0; +} + +void emacps_recv_handler(void *arg) +{ + xemacpsif_s *xemacpsif; + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + xemacpsif = (xemacpsif_s *)(arg); + xemacpsif->isr_events |= EMAC_IF_RX_EVENT; + + if( xEMACTaskHandle != NULL ) + { + vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); + } + + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); +} + +static NetworkBufferDescriptor_t *ethMsg = NULL; +static NetworkBufferDescriptor_t *ethLast = NULL; + +static void passEthMessages( void ) +{ +IPStackEvent_t xRxEvent; + + xRxEvent.eEventType = eNetworkRxEvent; + xRxEvent.pvData = ( void * ) ethMsg; + + if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 1000 ) != pdPASS ) + { + /* The buffer could not be sent to the stack so must be released again. + This is a deferred handler taskr, not a real interrupt, so it is ok to + use the task level function here. */ + do + { + NetworkBufferDescriptor_t *xNext = ethMsg->pxNextBuffer; + vReleaseNetworkBufferAndDescriptor( ethMsg ); + ethMsg = xNext; + } while( ethMsg != NULL ); + + iptraceETHERNET_RX_EVENT_LOST(); + FreeRTOS_printf( ( "passEthMessages: Can not queue return packet!\n" ) ); + } + + ethMsg = ethLast = NULL; +} + +int emacps_check_rx( xemacpsif_s *xemacpsif ) +{ +NetworkBufferDescriptor_t *pxBuffer, *pxNewBuffer; +int rx_bytes; +volatile int msgCount = 0; +int head = xemacpsif->rxHead; + + /* There seems to be an issue (SI# 692601), see comments below. */ + resetrx_on_no_rxdata(xemacpsif); + + /* This FreeRTOS+TCP driver shall be compiled with the option + "ipconfigUSE_LINKED_RX_MESSAGES" enabled. It allows the driver to send a + chain of RX messages within one message to the IP-task. */ + for( ;; ) + { + if( ( ( xemacpsif->rxSegments[ head ].address & XEMACPS_RXBUF_NEW_MASK ) == 0 ) || + ( pxDMA_rx_buffers[ head ] == NULL ) ) + { + break; + } + + pxNewBuffer = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT, ( TickType_t ) 0 ); + if( pxNewBuffer == NULL ) + { + /* A packet has been received, but there is no replacement for this Network Buffer. + The packet will be dropped, and it Network Buffer will stay in place. */ + FreeRTOS_printf( ("emacps_check_rx: unable to allocate a Netwrok Buffer\n" ) ); + pxNewBuffer = ( NetworkBufferDescriptor_t * )pxDMA_rx_buffers[ head ]; + } + else + { + pxBuffer = ( NetworkBufferDescriptor_t * )pxDMA_rx_buffers[ head ]; + + /* Just avoiding to use or refer to the same buffer again */ + pxDMA_rx_buffers[ head ] = pxNewBuffer; + + /* + * Adjust the buffer size to the actual number of bytes received. + */ + rx_bytes = xemacpsif->rxSegments[ head ].flags & XEMACPS_RXBUF_LEN_MASK; + + pxBuffer->xDataLength = rx_bytes; + + if( ucIsCachedMemory( pxBuffer->pucEthernetBuffer ) != 0 ) + { + Xil_DCacheInvalidateRange( ( ( uint32_t )pxBuffer->pucEthernetBuffer ) - ipconfigPACKET_FILLER_SIZE, (unsigned)rx_bytes ); + } + + /* store it in the receive queue, where it'll be processed by a + different handler. */ + iptraceNETWORK_INTERFACE_RECEIVE(); + pxBuffer->pxNextBuffer = NULL; + + if( ethMsg == NULL ) + { + // Becomes the first message + ethMsg = pxBuffer; + } + else if( ethLast != NULL ) + { + // Add to the tail + ethLast->pxNextBuffer = pxBuffer; + } + + ethLast = pxBuffer; + msgCount++; + } + { + if( ucIsCachedMemory( pxNewBuffer->pucEthernetBuffer ) != 0 ) + { + Xil_DCacheInvalidateRange( ( ( uint32_t )pxNewBuffer->pucEthernetBuffer ) - ipconfigPACKET_FILLER_SIZE, (unsigned)ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT); + } + { + uint32_t addr = ( ( uint32_t )pxNewBuffer->pucEthernetBuffer ) & XEMACPS_RXBUF_ADD_MASK; + if( head == ( ipconfigNIC_N_RX_DESC - 1 ) ) + { + addr |= XEMACPS_RXBUF_WRAP_MASK; + } + /* Clearing 'XEMACPS_RXBUF_NEW_MASK' 0x00000001 *< Used bit.. */ + xemacpsif->rxSegments[ head ].address = addr; + xemacpsif->rxSegments[ head ].flags = 0; + } + } + + if( ++head == ipconfigNIC_N_RX_DESC ) + { + head = 0; + } + xemacpsif->rxHead = head; + } + + if( ethMsg != NULL ) + { + passEthMessages( ); + } + + return msgCount; +} + +void clean_dma_txdescs(xemacpsif_s *xemacpsif) +{ +int index; +unsigned char *ucTxBuffer; + + /* Clear all TX descriptors and assign uncached memory to each descriptor. + "tx_space" points to the first available TX buffer. */ + ucTxBuffer = xemacpsif->tx_space; + + for( index = 0; index < ipconfigNIC_N_TX_DESC; index++ ) + { + xemacpsif->txSegments[ index ].address = ( uint32_t )ucTxBuffer; + xemacpsif->txSegments[ index ].flags = XEMACPS_TXBUF_USED_MASK; +#if( ipconfigZERO_COPY_TX_DRIVER != 0 ) + pxDMA_tx_buffers[ index ] = ( void* )NULL; +#else + pxDMA_tx_buffers[ index ] = ( void* )( ucTxBuffer + TX_OFFSET ); +#endif + ucTxBuffer += xemacpsif->uTxUnitSize; + } + xemacpsif->txSegments[ ipconfigNIC_N_TX_DESC - 1 ].flags = + XEMACPS_TXBUF_USED_MASK | XEMACPS_TXBUF_WRAP_MASK; +} + +XStatus init_dma(xemacpsif_s *xemacpsif) +{ + NetworkBufferDescriptor_t *pxBuffer; + + int iIndex; + UBaseType_t xRxSize; + UBaseType_t xTxSize; + struct xtopology_t *xtopologyp = &xXTopology; + + xRxSize = ipconfigNIC_N_RX_DESC * sizeof( xemacpsif->rxSegments[ 0 ] ); + + xTxSize = ipconfigNIC_N_TX_DESC * sizeof( xemacpsif->txSegments[ 0 ] ); + + /* Also round-up to 4KB */ + xemacpsif->uTxUnitSize = ( ipTOTAL_ETHERNET_FRAME_SIZE + 0x1000ul ) & ~0xffful; + /* + * We allocate 65536 bytes for RX BDs which can accommodate a + * maximum of 8192 BDs which is much more than any application + * will ever need. + */ + xemacpsif->rxSegments = ( struct xBD_TYPE * )( pucGetUncachedMemory ( xRxSize ) ); + xemacpsif->txSegments = ( struct xBD_TYPE * )( pucGetUncachedMemory ( xTxSize ) ); + xemacpsif->tx_space = ( unsigned char * )( pucGetUncachedMemory ( ipconfigNIC_N_TX_DESC * xemacpsif->uTxUnitSize ) ); + + /* These variables will be used in XEmacPs_Start (see src/xemacps.c). */ + xemacpsif->emacps.RxBdRing.BaseBdAddr = ( uint32_t ) xemacpsif->rxSegments; + xemacpsif->emacps.TxBdRing.BaseBdAddr = ( uint32_t ) xemacpsif->txSegments; + + if( xTXDescriptorSemaphore == NULL ) + { + xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ipconfigNIC_N_TX_DESC, ( UBaseType_t ) ipconfigNIC_N_TX_DESC ); + configASSERT( xTXDescriptorSemaphore ); + } + /* + * Allocate RX descriptors, 1 RxBD at a time. + */ + for( iIndex = 0; iIndex < ipconfigNIC_N_RX_DESC; iIndex++ ) + { + pxBuffer = pxDMA_rx_buffers[ iIndex ]; + if( pxBuffer == NULL ) + { + pxBuffer = pxGetNetworkBufferWithDescriptor( ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT, ( TickType_t ) 0 ); + if( pxBuffer == NULL ) + { + FreeRTOS_printf( ("Unable to allocate a network buffer in recv_handler\n" ) ); + return -1; + } + } + + xemacpsif->rxSegments[ iIndex ].flags = 0; + xemacpsif->rxSegments[ iIndex ].address = ( ( uint32_t )pxBuffer->pucEthernetBuffer ) & XEMACPS_RXBUF_ADD_MASK; + + pxDMA_rx_buffers[ iIndex ] = pxBuffer; + /* Make sure this memory is not in cache for now. */ + if( ucIsCachedMemory( pxBuffer->pucEthernetBuffer ) != 0 ) + { + Xil_DCacheInvalidateRange( ( ( uint32_t )pxBuffer->pucEthernetBuffer ) - ipconfigPACKET_FILLER_SIZE, + (unsigned)ipTOTAL_ETHERNET_FRAME_SIZE + RX_BUFFER_ALIGNMENT); + } + } + + xemacpsif->rxSegments[ ipconfigNIC_N_RX_DESC - 1 ].address |= XEMACPS_RXBUF_WRAP_MASK; + + memset( xemacpsif->tx_space, '\0', ipconfigNIC_N_TX_DESC * xemacpsif->uTxUnitSize ); + + clean_dma_txdescs( xemacpsif ); + + { + uint32_t value; + value = XEmacPs_ReadReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_DMACR_OFFSET ); + + // 1xxxx: Attempt to use INCR16 AHB bursts + value = ( value & ~( XEMACPS_DMACR_BLENGTH_MASK ) ) | XEMACPS_DMACR_INCR16_AHB_BURST; +#if( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) + value |= XEMACPS_DMACR_TCPCKSUM_MASK; +#else +#warning Are you sure the EMAC should not calculate outgoing checksums? + value &= ~XEMACPS_DMACR_TCPCKSUM_MASK; +#endif + XEmacPs_WriteReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_DMACR_OFFSET, value ); + } + { + uint32_t value; + value = XEmacPs_ReadReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCFG_OFFSET ); + + /* Network buffers are 32-bit aligned + 2 bytes (because ipconfigPACKET_FILLER_SIZE = 2 ). + Now tell the EMAC that received messages should be stored at "address + 2". */ + value = ( value & ~XEMACPS_NWCFG_RXOFFS_MASK ) | 0x8000; + +#if( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM != 0 ) + value |= XEMACPS_NWCFG_RXCHKSUMEN_MASK; +#else +#warning Are you sure the EMAC should not calculate incoming checksums? + value &= ~XEMACPS_NWCFG_RXCHKSUMEN_MASK; +#endif + XEmacPs_WriteReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCFG_OFFSET, value ); + } + + /* + * Connect the device driver handler that will be called when an + * interrupt for the device occurs, the handler defined above performs + * the specific interrupt processing for the device. + */ + XScuGic_RegisterHandler(INTC_BASE_ADDR, xtopologyp->scugic_emac_intr, + (Xil_ExceptionHandler)XEmacPs_IntrHandler, + (void *)&xemacpsif->emacps); + /* + * Enable the interrupt for emacps. + */ + EmacEnableIntr( ); + + return 0; +} + +/* + * resetrx_on_no_rxdata(): + * + * It is called at regular intervals through the API xemacpsif_resetrx_on_no_rxdata + * called by the user. + * The EmacPs has a HW bug (SI# 692601) on the Rx path for heavy Rx traffic. + * Under heavy Rx traffic because of the HW bug there are times when the Rx path + * becomes unresponsive. The workaround for it is to check for the Rx path for + * traffic (by reading the stats registers regularly). If the stats register + * does not increment for sometime (proving no Rx traffic), the function resets + * the Rx data path. + * + */ + +void resetrx_on_no_rxdata(xemacpsif_s *xemacpsif) +{ + unsigned long regctrl; + unsigned long tempcntr; + + tempcntr = XEmacPs_ReadReg( xemacpsif->emacps.Config.BaseAddress, XEMACPS_RXCNT_OFFSET ); + if ( ( tempcntr == 0 ) && ( xemacpsif->last_rx_frms_cntr == 0 ) ) + { + regctrl = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, + XEMACPS_NWCTRL_OFFSET); + regctrl &= (~XEMACPS_NWCTRL_RXEN_MASK); + XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, + XEMACPS_NWCTRL_OFFSET, regctrl); + regctrl = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCTRL_OFFSET); + regctrl |= (XEMACPS_NWCTRL_RXEN_MASK); + XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, XEMACPS_NWCTRL_OFFSET, regctrl); + } + xemacpsif->last_rx_frms_cntr = tempcntr; +} + +void EmacDisableIntr(void) +{ + XScuGic_DisableIntr(INTC_DIST_BASE_ADDR, xXTopology.scugic_emac_intr); +} + +void EmacEnableIntr(void) +{ + XScuGic_EnableIntr(INTC_DIST_BASE_ADDR, xXTopology.scugic_emac_intr); +} + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.c index e9443cda8..be00f4f9c 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.c @@ -1,243 +1,243 @@ -/* - * Copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. - * - * Xilinx, Inc. - * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A - * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS - * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR - * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION - * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE - * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. - * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO - * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO - * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE - * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. - * - */ - - -/* Standard includes. */ -#include -#include -#include - -#include "Zynq/x_emacpsif.h" - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" - -///* FreeRTOS+TCP includes. */ -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" - -extern TaskHandle_t xEMACTaskHandle; - -/*** IMPORTANT: Define PEEP in xemacpsif.h and sys_arch_raw.c - *** to run it on a PEEP board - ***/ - -unsigned int link_speed = 100; - -void setup_isr( xemacpsif_s *xemacpsif ) -{ - /* - * Setup callbacks - */ - XEmacPs_SetHandler(&xemacpsif->emacps, XEMACPS_HANDLER_DMASEND, - (void *) emacps_send_handler, - (void *) xemacpsif); - - XEmacPs_SetHandler(&xemacpsif->emacps, XEMACPS_HANDLER_DMARECV, - (void *) emacps_recv_handler, - (void *) xemacpsif); - - XEmacPs_SetHandler(&xemacpsif->emacps, XEMACPS_HANDLER_ERROR, - (void *) emacps_error_handler, - (void *) xemacpsif); -} - -void start_emacps (xemacpsif_s *xemacps) -{ - /* start the temac */ - XEmacPs_Start(&xemacps->emacps); -} - -extern struct xtopology_t xXTopology; - -volatile int error_msg_count = 0; -volatile const char *last_err_msg = ""; - -struct xERROR_MSG { - void *arg; - u8 Direction; - u32 ErrorWord; -}; - -static struct xERROR_MSG xErrorList[ 8 ]; -static BaseType_t xErrorHead, xErrorTail; - -void emacps_error_handler(void *arg, u8 Direction, u32 ErrorWord) -{ - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - xemacpsif_s *xemacpsif; - BaseType_t xNextHead = xErrorHead; - - xemacpsif = (xemacpsif_s *)(arg); - - if( ( Direction != XEMACPS_SEND ) || (ErrorWord != XEMACPS_TXSR_USEDREAD_MASK ) ) - { - if( ++xNextHead == ( sizeof( xErrorList ) / sizeof( xErrorList[ 0 ] ) ) ) - xNextHead = 0; - if( xNextHead != xErrorTail ) - { - - xErrorList[ xErrorHead ].arg = arg; - xErrorList[ xErrorHead ].Direction = Direction; - xErrorList[ xErrorHead ].ErrorWord = ErrorWord; - - xErrorHead = xNextHead; - - xemacpsif = (xemacpsif_s *)(arg); - xemacpsif->isr_events |= EMAC_IF_ERR_EVENT; - } - - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); - } - - } - - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); -} - -static void emacps_handle_error(void *arg, u8 Direction, u32 ErrorWord); - -int emacps_check_errors( xemacpsif_s *xemacps ) -{ -int xResult; - - ( void ) xemacps; - - if( xErrorHead == xErrorTail ) - { - xResult = 0; - } - else - { - xResult = 1; - emacps_handle_error( - xErrorList[ xErrorTail ].arg, - xErrorList[ xErrorTail ].Direction, - xErrorList[ xErrorTail ].ErrorWord ); - } - - return xResult; -} - -BaseType_t xNetworkInterfaceInitialise( void ); - -static void emacps_handle_error(void *arg, u8 Direction, u32 ErrorWord) -{ - xemacpsif_s *xemacpsif; - struct xtopology_t *xtopologyp; - XEmacPs *xemacps; - - xemacpsif = (xemacpsif_s *)(arg); - - xtopologyp = &xXTopology; - - xemacps = &xemacpsif->emacps; - - /* Do not appear to be used. */ - ( void ) xemacps; - ( void ) xtopologyp; - - last_err_msg = NULL; - - if( ErrorWord != 0 ) - { - switch (Direction) { - case XEMACPS_RECV: - if( ( ErrorWord & XEMACPS_RXSR_HRESPNOK_MASK ) != 0 ) - { - last_err_msg = "Receive DMA error"; - xNetworkInterfaceInitialise( ); - } - if( ( ErrorWord & XEMACPS_RXSR_RXOVR_MASK ) != 0 ) - { - last_err_msg = "Receive over run"; - emacps_recv_handler(arg); - } - if( ( ErrorWord & XEMACPS_RXSR_BUFFNA_MASK ) != 0 ) - { - last_err_msg = "Receive buffer not available"; - emacps_recv_handler(arg); - } - break; - case XEMACPS_SEND: - if( ( ErrorWord & XEMACPS_TXSR_HRESPNOK_MASK ) != 0 ) - { - last_err_msg = "Transmit DMA error"; - xNetworkInterfaceInitialise( ); - } - if( ( ErrorWord & XEMACPS_TXSR_URUN_MASK ) != 0 ) - { - last_err_msg = "Transmit under run"; - HandleTxErrors( xemacpsif ); - } - if( ( ErrorWord & XEMACPS_TXSR_BUFEXH_MASK ) != 0 ) - { - last_err_msg = "Transmit buffer exhausted"; - HandleTxErrors( xemacpsif ); - } - if( ( ErrorWord & XEMACPS_TXSR_RXOVR_MASK ) != 0 ) - { - last_err_msg = "Transmit retry excessed limits"; - HandleTxErrors( xemacpsif ); - } - if( ( ErrorWord & XEMACPS_TXSR_FRAMERX_MASK ) != 0 ) - { - last_err_msg = "Transmit collision"; - emacps_check_tx( xemacpsif ); - } - break; - } - } - // Break on this statement and inspect error_msg if you like - if( last_err_msg != NULL ) - { - error_msg_count++; - FreeRTOS_printf( ( "emacps_handle_error: %s\n", last_err_msg ) ); - } -} - -extern XEmacPs_Config mac_config; - -void HandleTxErrors(xemacpsif_s *xemacpsif) -{ - u32 netctrlreg; - - //taskENTER_CRITICAL() - { - netctrlreg = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, - XEMACPS_NWCTRL_OFFSET); - netctrlreg = netctrlreg & (~XEMACPS_NWCTRL_TXEN_MASK); - XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, - XEMACPS_NWCTRL_OFFSET, netctrlreg); - - clean_dma_txdescs( xemacpsif ); - netctrlreg = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, - XEMACPS_NWCTRL_OFFSET); - netctrlreg = netctrlreg | (XEMACPS_NWCTRL_TXEN_MASK); - XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, - XEMACPS_NWCTRL_OFFSET, netctrlreg); - } - //taskEXIT_CRITICAL( ); -} +/* + * Copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. + * + * Xilinx, Inc. + * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A + * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS + * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR + * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION + * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE + * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. + * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO + * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO + * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE + * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. + * + */ + + +/* Standard includes. */ +#include +#include +#include + +#include "Zynq/x_emacpsif.h" + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" + +///* FreeRTOS+TCP includes. */ +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" + +extern TaskHandle_t xEMACTaskHandle; + +/*** IMPORTANT: Define PEEP in xemacpsif.h and sys_arch_raw.c + *** to run it on a PEEP board + ***/ + +unsigned int link_speed = 100; + +void setup_isr( xemacpsif_s *xemacpsif ) +{ + /* + * Setup callbacks + */ + XEmacPs_SetHandler(&xemacpsif->emacps, XEMACPS_HANDLER_DMASEND, + (void *) emacps_send_handler, + (void *) xemacpsif); + + XEmacPs_SetHandler(&xemacpsif->emacps, XEMACPS_HANDLER_DMARECV, + (void *) emacps_recv_handler, + (void *) xemacpsif); + + XEmacPs_SetHandler(&xemacpsif->emacps, XEMACPS_HANDLER_ERROR, + (void *) emacps_error_handler, + (void *) xemacpsif); +} + +void start_emacps (xemacpsif_s *xemacps) +{ + /* start the temac */ + XEmacPs_Start(&xemacps->emacps); +} + +extern struct xtopology_t xXTopology; + +volatile int error_msg_count = 0; +volatile const char *last_err_msg = ""; + +struct xERROR_MSG { + void *arg; + u8 Direction; + u32 ErrorWord; +}; + +static struct xERROR_MSG xErrorList[ 8 ]; +static BaseType_t xErrorHead, xErrorTail; + +void emacps_error_handler(void *arg, u8 Direction, u32 ErrorWord) +{ + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + xemacpsif_s *xemacpsif; + BaseType_t xNextHead = xErrorHead; + + xemacpsif = (xemacpsif_s *)(arg); + + if( ( Direction != XEMACPS_SEND ) || (ErrorWord != XEMACPS_TXSR_USEDREAD_MASK ) ) + { + if( ++xNextHead == ( sizeof( xErrorList ) / sizeof( xErrorList[ 0 ] ) ) ) + xNextHead = 0; + if( xNextHead != xErrorTail ) + { + + xErrorList[ xErrorHead ].arg = arg; + xErrorList[ xErrorHead ].Direction = Direction; + xErrorList[ xErrorHead ].ErrorWord = ErrorWord; + + xErrorHead = xNextHead; + + xemacpsif = (xemacpsif_s *)(arg); + xemacpsif->isr_events |= EMAC_IF_ERR_EVENT; + } + + if( xEMACTaskHandle != NULL ) + { + vTaskNotifyGiveFromISR( xEMACTaskHandle, &xHigherPriorityTaskWoken ); + } + + } + + portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); +} + +static void emacps_handle_error(void *arg, u8 Direction, u32 ErrorWord); + +int emacps_check_errors( xemacpsif_s *xemacps ) +{ +int xResult; + + ( void ) xemacps; + + if( xErrorHead == xErrorTail ) + { + xResult = 0; + } + else + { + xResult = 1; + emacps_handle_error( + xErrorList[ xErrorTail ].arg, + xErrorList[ xErrorTail ].Direction, + xErrorList[ xErrorTail ].ErrorWord ); + } + + return xResult; +} + +BaseType_t xNetworkInterfaceInitialise( void ); + +static void emacps_handle_error(void *arg, u8 Direction, u32 ErrorWord) +{ + xemacpsif_s *xemacpsif; + struct xtopology_t *xtopologyp; + XEmacPs *xemacps; + + xemacpsif = (xemacpsif_s *)(arg); + + xtopologyp = &xXTopology; + + xemacps = &xemacpsif->emacps; + + /* Do not appear to be used. */ + ( void ) xemacps; + ( void ) xtopologyp; + + last_err_msg = NULL; + + if( ErrorWord != 0 ) + { + switch (Direction) { + case XEMACPS_RECV: + if( ( ErrorWord & XEMACPS_RXSR_HRESPNOK_MASK ) != 0 ) + { + last_err_msg = "Receive DMA error"; + xNetworkInterfaceInitialise( ); + } + if( ( ErrorWord & XEMACPS_RXSR_RXOVR_MASK ) != 0 ) + { + last_err_msg = "Receive over run"; + emacps_recv_handler(arg); + } + if( ( ErrorWord & XEMACPS_RXSR_BUFFNA_MASK ) != 0 ) + { + last_err_msg = "Receive buffer not available"; + emacps_recv_handler(arg); + } + break; + case XEMACPS_SEND: + if( ( ErrorWord & XEMACPS_TXSR_HRESPNOK_MASK ) != 0 ) + { + last_err_msg = "Transmit DMA error"; + xNetworkInterfaceInitialise( ); + } + if( ( ErrorWord & XEMACPS_TXSR_URUN_MASK ) != 0 ) + { + last_err_msg = "Transmit under run"; + HandleTxErrors( xemacpsif ); + } + if( ( ErrorWord & XEMACPS_TXSR_BUFEXH_MASK ) != 0 ) + { + last_err_msg = "Transmit buffer exhausted"; + HandleTxErrors( xemacpsif ); + } + if( ( ErrorWord & XEMACPS_TXSR_RXOVR_MASK ) != 0 ) + { + last_err_msg = "Transmit retry excessed limits"; + HandleTxErrors( xemacpsif ); + } + if( ( ErrorWord & XEMACPS_TXSR_FRAMERX_MASK ) != 0 ) + { + last_err_msg = "Transmit collision"; + emacps_check_tx( xemacpsif ); + } + break; + } + } + // Break on this statement and inspect error_msg if you like + if( last_err_msg != NULL ) + { + error_msg_count++; + FreeRTOS_printf( ( "emacps_handle_error: %s\n", last_err_msg ) ); + } +} + +extern XEmacPs_Config mac_config; + +void HandleTxErrors(xemacpsif_s *xemacpsif) +{ + u32 netctrlreg; + + //taskENTER_CRITICAL() + { + netctrlreg = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, + XEMACPS_NWCTRL_OFFSET); + netctrlreg = netctrlreg & (~XEMACPS_NWCTRL_TXEN_MASK); + XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, + XEMACPS_NWCTRL_OFFSET, netctrlreg); + + clean_dma_txdescs( xemacpsif ); + netctrlreg = XEmacPs_ReadReg(xemacpsif->emacps.Config.BaseAddress, + XEMACPS_NWCTRL_OFFSET); + netctrlreg = netctrlreg | (XEMACPS_NWCTRL_TXEN_MASK); + XEmacPs_WriteReg(xemacpsif->emacps.Config.BaseAddress, + XEMACPS_NWCTRL_OFFSET, netctrlreg); + } + //taskEXIT_CRITICAL( ); +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.h index f3c424a4b..7b0e4fd36 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.h @@ -1,39 +1,39 @@ -/* - * Copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. - * - * Xilinx, Inc. - * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A - * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS - * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR - * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION - * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE - * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. - * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO - * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO - * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE - * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __XEMACPSIF_HW_H_ -#define __XEMACPSIF_HW_H_ - -#include "Zynq/x_emacpsif.h" -//#include "lwip/netif.h" - -#ifdef __cplusplus -extern "C" { -#endif - -XEmacPs_Config * lookup_config(unsigned mac_base); - -//void init_emacps(xemacpsif_s *xemacpsif, struct netif *netif); - -int emacps_check_errors( xemacpsif_s *xemacps ); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. + * + * Xilinx, Inc. + * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A + * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS + * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR + * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION + * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE + * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. + * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO + * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO + * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE + * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __XEMACPSIF_HW_H_ +#define __XEMACPSIF_HW_H_ + +#include "Zynq/x_emacpsif.h" +//#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +XEmacPs_Config * lookup_config(unsigned mac_base); + +//void init_emacps(xemacpsif_s *xemacpsif, struct netif *netif); + +int emacps_check_errors( xemacpsif_s *xemacps ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c index 12b8c60c8..742ff8b96 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c @@ -1,585 +1,585 @@ -/* - * Copyright (c) 2007-2008, Advanced Micro Devices, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Advanced Micro Devices, Inc. nor the names - * of its contributors may be used to endorse or promote products - * derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Some portions copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. - * - * Xilinx, Inc. - * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A - * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS - * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR - * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION - * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE - * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. - * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO - * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO - * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE - * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -/* Standard includes. */ -#include -#include -#include - -#include "Zynq/x_emacpsif.h" -//#include "lwipopts.h" -#include "xparameters_ps.h" -#include "xparameters.h" - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -///* FreeRTOS+TCP includes. */ -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" - -int phy_detected = 0; - -/*** IMPORTANT: Define PEEP in xemacpsif.h and sys_arch_raw.c - *** to run it on a PEEP board - ***/ - -/* Advertisement control register. */ -#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ -#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ -#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ -#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ - -#define ADVERTISE_100_AND_10 (ADVERTISE_10FULL | ADVERTISE_100FULL | \ - ADVERTISE_10HALF | ADVERTISE_100HALF) -#define ADVERTISE_100 (ADVERTISE_100FULL | ADVERTISE_100HALF) -#define ADVERTISE_10 (ADVERTISE_10FULL | ADVERTISE_10HALF) - -#define ADVERTISE_1000 0x0300 - - -//#define PHY_REG_00_BMCR 0x00 // Basic mode control register -//#define PHY_REG_01_BMSR 0x01 // Basic mode status register -//#define PHY_REG_02_PHYSID1 0x02 // PHYS ID 1 -//#define PHY_REG_03_PHYSID2 0x03 // PHYS ID 2 -//#define PHY_REG_04_ADVERTISE 0x04 // Advertisement control reg - -#define IEEE_CONTROL_REG_OFFSET 0 -#define IEEE_STATUS_REG_OFFSET 1 -#define IEEE_AUTONEGO_ADVERTISE_REG 4 -#define IEEE_PARTNER_ABILITIES_1_REG_OFFSET 5 -#define IEEE_1000_ADVERTISE_REG_OFFSET 9 -#define IEEE_PARTNER_ABILITIES_3_REG_OFFSET 10 -#define IEEE_COPPER_SPECIFIC_CONTROL_REG 16 -#define IEEE_SPECIFIC_STATUS_REG 17 -#define IEEE_COPPER_SPECIFIC_STATUS_REG_2 19 -#define IEEE_CONTROL_REG_MAC 21 -#define IEEE_PAGE_ADDRESS_REGISTER 22 - - -#define IEEE_CTRL_1GBPS_LINKSPEED_MASK 0x2040 -#define IEEE_CTRL_LINKSPEED_MASK 0x0040 -#define IEEE_CTRL_LINKSPEED_1000M 0x0040 -#define IEEE_CTRL_LINKSPEED_100M 0x2000 -#define IEEE_CTRL_LINKSPEED_10M 0x0000 -#define IEEE_CTRL_RESET_MASK 0x8000 -#define IEEE_CTRL_AUTONEGOTIATE_ENABLE 0x1000 -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 -#define IEEE_CTRL_RESET 0x9140 -#define IEEE_CTRL_ISOLATE_DISABLE 0xFBFF -#endif -#define IEEE_STAT_AUTONEGOTIATE_CAPABLE 0x0008 -#define IEEE_STAT_AUTONEGOTIATE_COMPLETE 0x0020 -#define IEEE_STAT_AUTONEGOTIATE_RESTART 0x0200 -#define IEEE_STAT_1GBPS_EXTENSIONS 0x0100 -#define IEEE_AN1_ABILITY_MASK 0x1FE0 -#define IEEE_AN3_ABILITY_MASK_1GBPS 0x0C00 -#define IEEE_AN1_ABILITY_MASK_100MBPS 0x0380 -#define IEEE_AN1_ABILITY_MASK_10MBPS 0x0060 -#define IEEE_RGMII_TXRX_CLOCK_DELAYED_MASK 0x0030 - -#define IEEE_ASYMMETRIC_PAUSE_MASK 0x0800 -#define IEEE_PAUSE_MASK 0x0400 -#define IEEE_AUTONEG_ERROR_MASK 0x8000 - -#define PHY_DETECT_REG 1 -#define PHY_DETECT_MASK 0x1808 - -#define XEMACPS_GMII2RGMII_SPEED1000_FD 0x140 -#define XEMACPS_GMII2RGMII_SPEED100_FD 0x2100 -#define XEMACPS_GMII2RGMII_SPEED10_FD 0x100 -#define XEMACPS_GMII2RGMII_REG_NUM 0x10 - -/* Frequency setting */ -#define SLCR_LOCK_ADDR (XPS_SYS_CTRL_BASEADDR + 0x4) -#define SLCR_UNLOCK_ADDR (XPS_SYS_CTRL_BASEADDR + 0x8) -#define SLCR_GEM0_CLK_CTRL_ADDR (XPS_SYS_CTRL_BASEADDR + 0x140) -#define SLCR_GEM1_CLK_CTRL_ADDR (XPS_SYS_CTRL_BASEADDR + 0x144) -#ifdef PEEP -#define SLCR_GEM_10M_CLK_CTRL_VALUE 0x00103031 -#define SLCR_GEM_100M_CLK_CTRL_VALUE 0x00103001 -#define SLCR_GEM_1G_CLK_CTRL_VALUE 0x00103011 -#endif -#define SLCR_LOCK_KEY_VALUE 0x767B -#define SLCR_UNLOCK_KEY_VALUE 0xDF0D -#define SLCR_ADDR_GEM_RST_CTRL (XPS_SYS_CTRL_BASEADDR + 0x214) -#define EMACPS_SLCR_DIV_MASK 0xFC0FC0FF - -#define EMAC0_BASE_ADDRESS 0xE000B000 -#define EMAC1_BASE_ADDRESS 0xE000C000 - -static int detect_phy(XEmacPs *xemacpsp) -{ - u16 phy_reg; - u32 phy_addr; - - for (phy_addr = 31; phy_addr > 0; phy_addr--) { - XEmacPs_PhyRead(xemacpsp, phy_addr, PHY_DETECT_REG, - &phy_reg); - - if ((phy_reg != 0xFFFF) && - ((phy_reg & PHY_DETECT_MASK) == PHY_DETECT_MASK)) { - /* Found a valid PHY address */ - FreeRTOS_printf( ("XEmacPs detect_phy: PHY detected at address %d.\r\n", - phy_addr)); - FreeRTOS_printf( ("XEmacPs detect_phy: PHY detected.\n" ) ); - phy_detected = phy_addr; - return phy_addr; - } - } - - FreeRTOS_printf( ("XEmacPs detect_phy: No PHY detected. Assuming a PHY at address 0\n" ) ); - - /* default to zero */ - return 0; -} - -#ifdef PEEP -unsigned get_IEEE_phy_speed(XEmacPs *xemacpsp) -{ - - u16 control; - u16 status; - u16 partner_capabilities; - u16 partner_capabilities_1000; - u16 phylinkspeed; - u32 phy_addr = detect_phy(xemacpsp); - - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, - ADVERTISE_1000); - /* Advertise PHY speed of 100 and 10 Mbps */ - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, - ADVERTISE_100_AND_10); - - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, - &control); - control |= (IEEE_CTRL_AUTONEGOTIATE_ENABLE | - IEEE_STAT_AUTONEGOTIATE_RESTART); - - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, control); - - /* Read PHY control and status registers is successful. */ - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, &status); - - if ((control & IEEE_CTRL_AUTONEGOTIATE_ENABLE) && (status & - IEEE_STAT_AUTONEGOTIATE_CAPABLE)) { - - while ( !(status & IEEE_STAT_AUTONEGOTIATE_COMPLETE) ) { - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, - &status); - } - - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_PARTNER_ABILITIES_1_REG_OFFSET, - &partner_capabilities); - - if (status & IEEE_STAT_1GBPS_EXTENSIONS) { - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_PARTNER_ABILITIES_3_REG_OFFSET, - &partner_capabilities_1000); - if (partner_capabilities_1000 & IEEE_AN3_ABILITY_MASK_1GBPS) - return 1000; - } - - if (partner_capabilities & IEEE_AN1_ABILITY_MASK_100MBPS) - return 100; - if (partner_capabilities & IEEE_AN1_ABILITY_MASK_10MBPS) - return 10; - - xil_printf("%s: unknown PHY link speed, setting TEMAC speed to be 10 Mbps\r\n", - __FUNCTION__); - return 10; - - } else { - - /* Update TEMAC speed accordingly */ - if (status & IEEE_STAT_1GBPS_EXTENSIONS) { - /* Get commanded link speed */ - phylinkspeed = control & IEEE_CTRL_1GBPS_LINKSPEED_MASK; - - switch (phylinkspeed) { - case (IEEE_CTRL_LINKSPEED_1000M): - return 1000; - case (IEEE_CTRL_LINKSPEED_100M): - return 100; - case (IEEE_CTRL_LINKSPEED_10M): - return 10; - default: - xil_printf("%s: unknown PHY link speed (%d), setting TEMAC speed to be 10 Mbps\r\n", - __FUNCTION__, phylinkspeed); - return 10; - } - - } else { - - return (control & IEEE_CTRL_LINKSPEED_MASK) ? 100 : 10; - - } - } -} - -#else /* Zynq */ -unsigned get_IEEE_phy_speed(XEmacPs *xemacpsp) -{ - u16 temp; - u16 control; - u16 status; - u16 partner_capabilities; -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 - u32 phy_addr = XPAR_PCSPMA_SGMII_PHYADDR; -#else - u32 phy_addr = detect_phy(xemacpsp); -#endif - xil_printf("Start PHY autonegotiation \r\n"); - -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 -#else - XEmacPs_PhyWrite(xemacpsp,phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 2); - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, &control); - control |= IEEE_RGMII_TXRX_CLOCK_DELAYED_MASK; - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, control); - - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 0); - - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, &control); - control |= IEEE_ASYMMETRIC_PAUSE_MASK; - control |= IEEE_PAUSE_MASK; - control |= ADVERTISE_100; - control |= ADVERTISE_10; - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, control); - - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, - &control); - control |= ADVERTISE_1000; - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, - control); - - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 0); - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_COPPER_SPECIFIC_CONTROL_REG, - &control); - control |= (7 << 12); /* max number of gigabit attempts */ - control |= (1 << 11); /* enable downshift */ - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_COPPER_SPECIFIC_CONTROL_REG, - control); -#endif - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); - control |= IEEE_CTRL_AUTONEGOTIATE_ENABLE; - control |= IEEE_STAT_AUTONEGOTIATE_RESTART; -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 - control &= IEEE_CTRL_ISOLATE_DISABLE; -#endif - - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, control); - - -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 -#else - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); - control |= IEEE_CTRL_RESET_MASK; - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, control); - - while (1) { - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); - if (control & IEEE_CTRL_RESET_MASK) - continue; - else - break; - } -#endif - xil_printf("Waiting for PHY to complete autonegotiation.\r\n"); - - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, &status); - while ( !(status & IEEE_STAT_AUTONEGOTIATE_COMPLETE) ) { - sleep(1); -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 -#else - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_COPPER_SPECIFIC_STATUS_REG_2, - &temp); - if (temp & IEEE_AUTONEG_ERROR_MASK) { - xil_printf("Auto negotiation error \r\n"); - } -#endif - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, - &status); - } - - xil_printf("autonegotiation complete \r\n"); - -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 -#else - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_SPECIFIC_STATUS_REG, &partner_capabilities); -#endif - -#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 - xil_printf("Waiting for Link to be up; Polling for SGMII core Reg \r\n"); - XEmacPs_PhyRead(xemacpsp, phy_addr, 5, &temp); - while(!(temp & 0x8000)) { - XEmacPs_PhyRead(xemacpsp, phy_addr, 5, &temp); - } - if((temp & 0x0C00) == 0x0800) { - XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); - return 1000; - } - else if((temp & 0x0C00) == 0x0400) { - XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); - return 100; - } - else if((temp & 0x0C00) == 0x0000) { - XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); - return 10; - } else { - xil_printf("get_IEEE_phy_speed(): Invalid speed bit value, Deafulting to Speed = 10 Mbps\r\n"); - XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); - XEmacPs_PhyWrite(xemacpsp, phy_addr, 0, 0x0100); - return 10; - } -#else - if ( ((partner_capabilities >> 14) & 3) == 2)/* 1000Mbps */ - return 1000; - else if ( ((partner_capabilities >> 14) & 3) == 1)/* 100Mbps */ - return 100; - else /* 10Mbps */ - return 10; -#endif -} -#endif - -unsigned configure_IEEE_phy_speed(XEmacPs *xemacpsp, unsigned speed) -{ - u16 control; - u32 phy_addr = detect_phy(xemacpsp); - - XEmacPs_PhyWrite(xemacpsp,phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 2); - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, &control); - control |= IEEE_RGMII_TXRX_CLOCK_DELAYED_MASK; - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, control); - - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 0); - - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, &control); - control |= IEEE_ASYMMETRIC_PAUSE_MASK; - control |= IEEE_PAUSE_MASK; - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, control); - - XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); - control &= ~IEEE_CTRL_LINKSPEED_1000M; - control &= ~IEEE_CTRL_LINKSPEED_100M; - control &= ~IEEE_CTRL_LINKSPEED_10M; - - if (speed == 1000) { - control |= IEEE_CTRL_LINKSPEED_1000M; - } - - else if (speed == 100) { - control |= IEEE_CTRL_LINKSPEED_100M; - /* Dont advertise PHY speed of 1000 Mbps */ - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, 0); - /* Dont advertise PHY speed of 10 Mbps */ - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, - ADVERTISE_100); - } - - else if (speed == 10) { - control |= IEEE_CTRL_LINKSPEED_10M; - /* Dont advertise PHY speed of 1000 Mbps */ - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, - 0); - /* Dont advertise PHY speed of 100 Mbps */ - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, - ADVERTISE_10); - } - - XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, - control | IEEE_CTRL_RESET_MASK); - { - volatile int wait; - for (wait=0; wait < 100000; wait++); - } - return 0; -} - -static void SetUpSLCRDivisors(int mac_baseaddr, int speed) -{ - volatile u32 slcrBaseAddress; -#ifndef PEEP - u32 SlcrDiv0; - u32 SlcrDiv1=0; - u32 SlcrTxClkCntrl; -#endif - - *(volatile unsigned int *)(SLCR_UNLOCK_ADDR) = SLCR_UNLOCK_KEY_VALUE; - - if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { - slcrBaseAddress = SLCR_GEM0_CLK_CTRL_ADDR; - } else { - slcrBaseAddress = SLCR_GEM1_CLK_CTRL_ADDR; - } -#ifdef PEEP - if (speed == 1000) { - *(volatile unsigned int *)(slcrBaseAddress) = - SLCR_GEM_1G_CLK_CTRL_VALUE; - } else if (speed == 100) { - *(volatile unsigned int *)(slcrBaseAddress) = - SLCR_GEM_100M_CLK_CTRL_VALUE; - } else { - *(volatile unsigned int *)(slcrBaseAddress) = - SLCR_GEM_10M_CLK_CTRL_VALUE; - } -#else - if (speed == 1000) { - if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { -#ifdef XPAR_PS7_ETHERNET_0_ENET_SLCR_1000MBPS_DIV0 - SlcrDiv0 = XPAR_PS7_ETHERNET_0_ENET_SLCR_1000MBPS_DIV0; - SlcrDiv1 = XPAR_PS7_ETHERNET_0_ENET_SLCR_1000MBPS_DIV1; -#endif - } else { -#ifdef XPAR_PS7_ETHERNET_1_ENET_SLCR_1000MBPS_DIV0 - SlcrDiv0 = XPAR_PS7_ETHERNET_1_ENET_SLCR_1000MBPS_DIV0; - SlcrDiv1 = XPAR_PS7_ETHERNET_1_ENET_SLCR_1000MBPS_DIV1; -#endif - } - } else if (speed == 100) { - if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { -#ifdef XPAR_PS7_ETHERNET_0_ENET_SLCR_100MBPS_DIV0 - SlcrDiv0 = XPAR_PS7_ETHERNET_0_ENET_SLCR_100MBPS_DIV0; - SlcrDiv1 = XPAR_PS7_ETHERNET_0_ENET_SLCR_100MBPS_DIV1; -#endif - } else { -#ifdef XPAR_PS7_ETHERNET_1_ENET_SLCR_100MBPS_DIV0 - SlcrDiv0 = XPAR_PS7_ETHERNET_1_ENET_SLCR_100MBPS_DIV0; - SlcrDiv1 = XPAR_PS7_ETHERNET_1_ENET_SLCR_100MBPS_DIV1; -#endif - } - } else { - if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { -#ifdef XPAR_PS7_ETHERNET_0_ENET_SLCR_10MBPS_DIV0 - SlcrDiv0 = XPAR_PS7_ETHERNET_0_ENET_SLCR_10MBPS_DIV0; - SlcrDiv1 = XPAR_PS7_ETHERNET_0_ENET_SLCR_10MBPS_DIV1; -#endif - } else { -#ifdef XPAR_PS7_ETHERNET_1_ENET_SLCR_10MBPS_DIV0 - SlcrDiv0 = XPAR_PS7_ETHERNET_1_ENET_SLCR_10MBPS_DIV0; - SlcrDiv1 = XPAR_PS7_ETHERNET_1_ENET_SLCR_10MBPS_DIV1; -#endif - } - } - SlcrTxClkCntrl = *(volatile unsigned int *)(slcrBaseAddress); - SlcrTxClkCntrl &= EMACPS_SLCR_DIV_MASK; - SlcrTxClkCntrl |= (SlcrDiv1 << 20); - SlcrTxClkCntrl |= (SlcrDiv0 << 8); - *(volatile unsigned int *)(slcrBaseAddress) = SlcrTxClkCntrl; -#endif - *(volatile unsigned int *)(SLCR_LOCK_ADDR) = SLCR_LOCK_KEY_VALUE; - return; -} - - -unsigned link_speed; -unsigned Phy_Setup (XEmacPs *xemacpsp) -{ - unsigned long conv_present = 0; - unsigned long convspeeddupsetting = 0; - unsigned long convphyaddr = 0; - -#ifdef XPAR_GMII2RGMIICON_0N_ETH0_ADDR - convphyaddr = XPAR_GMII2RGMIICON_0N_ETH0_ADDR; - conv_present = 1; -#else -#ifdef XPAR_GMII2RGMIICON_0N_ETH1_ADDR - convphyaddr = XPAR_GMII2RGMIICON_0N_ETH1_ADDR; - conv_present = 1; -#endif -#endif - -#ifdef ipconfigNIC_LINKSPEED_AUTODETECT - link_speed = get_IEEE_phy_speed(xemacpsp); - if (link_speed == 1000) { - SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,1000); - convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED1000_FD; - } else if (link_speed == 100) { - SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,100); - convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED100_FD; - } else { - SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,10); - convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED10_FD; - } -#elif defined(ipconfigNIC_LINKSPEED1000) - SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,1000); - link_speed = 1000; - configure_IEEE_phy_speed(xemacpsp, link_speed); - convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED1000_FD; - sleep(1); -#elif defined(ipconfigNIC_LINKSPEED100) - SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,100); - link_speed = 100; - configure_IEEE_phy_speed(xemacpsp, link_speed); - convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED100_FD; - sleep(1); -#elif defined(ipconfigNIC_LINKSPEED10) - SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,10); - link_speed = 10; - configure_IEEE_phy_speed(xemacpsp, link_speed); - convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED10_FD; - sleep(1); -#endif - if (conv_present) { - XEmacPs_PhyWrite(xemacpsp, convphyaddr, - XEMACPS_GMII2RGMII_REG_NUM, convspeeddupsetting); - } - - xil_printf("link speed: %d\r\n", link_speed); - return link_speed; -} - +/* + * Copyright (c) 2007-2008, Advanced Micro Devices, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Advanced Micro Devices, Inc. nor the names + * of its contributors may be used to endorse or promote products + * derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Some portions copyright (c) 2010-2013 Xilinx, Inc. All rights reserved. + * + * Xilinx, Inc. + * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A + * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS + * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR + * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION + * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE + * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. + * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO + * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO + * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE + * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +/* Standard includes. */ +#include +#include +#include + +#include "Zynq/x_emacpsif.h" +//#include "lwipopts.h" +#include "xparameters_ps.h" +#include "xparameters.h" + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +///* FreeRTOS+TCP includes. */ +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" + +int phy_detected = 0; + +/*** IMPORTANT: Define PEEP in xemacpsif.h and sys_arch_raw.c + *** to run it on a PEEP board + ***/ + +/* Advertisement control register. */ +#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ +#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ +#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ +#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ + +#define ADVERTISE_100_AND_10 (ADVERTISE_10FULL | ADVERTISE_100FULL | \ + ADVERTISE_10HALF | ADVERTISE_100HALF) +#define ADVERTISE_100 (ADVERTISE_100FULL | ADVERTISE_100HALF) +#define ADVERTISE_10 (ADVERTISE_10FULL | ADVERTISE_10HALF) + +#define ADVERTISE_1000 0x0300 + + +//#define PHY_REG_00_BMCR 0x00 // Basic mode control register +//#define PHY_REG_01_BMSR 0x01 // Basic mode status register +//#define PHY_REG_02_PHYSID1 0x02 // PHYS ID 1 +//#define PHY_REG_03_PHYSID2 0x03 // PHYS ID 2 +//#define PHY_REG_04_ADVERTISE 0x04 // Advertisement control reg + +#define IEEE_CONTROL_REG_OFFSET 0 +#define IEEE_STATUS_REG_OFFSET 1 +#define IEEE_AUTONEGO_ADVERTISE_REG 4 +#define IEEE_PARTNER_ABILITIES_1_REG_OFFSET 5 +#define IEEE_1000_ADVERTISE_REG_OFFSET 9 +#define IEEE_PARTNER_ABILITIES_3_REG_OFFSET 10 +#define IEEE_COPPER_SPECIFIC_CONTROL_REG 16 +#define IEEE_SPECIFIC_STATUS_REG 17 +#define IEEE_COPPER_SPECIFIC_STATUS_REG_2 19 +#define IEEE_CONTROL_REG_MAC 21 +#define IEEE_PAGE_ADDRESS_REGISTER 22 + + +#define IEEE_CTRL_1GBPS_LINKSPEED_MASK 0x2040 +#define IEEE_CTRL_LINKSPEED_MASK 0x0040 +#define IEEE_CTRL_LINKSPEED_1000M 0x0040 +#define IEEE_CTRL_LINKSPEED_100M 0x2000 +#define IEEE_CTRL_LINKSPEED_10M 0x0000 +#define IEEE_CTRL_RESET_MASK 0x8000 +#define IEEE_CTRL_AUTONEGOTIATE_ENABLE 0x1000 +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 +#define IEEE_CTRL_RESET 0x9140 +#define IEEE_CTRL_ISOLATE_DISABLE 0xFBFF +#endif +#define IEEE_STAT_AUTONEGOTIATE_CAPABLE 0x0008 +#define IEEE_STAT_AUTONEGOTIATE_COMPLETE 0x0020 +#define IEEE_STAT_AUTONEGOTIATE_RESTART 0x0200 +#define IEEE_STAT_1GBPS_EXTENSIONS 0x0100 +#define IEEE_AN1_ABILITY_MASK 0x1FE0 +#define IEEE_AN3_ABILITY_MASK_1GBPS 0x0C00 +#define IEEE_AN1_ABILITY_MASK_100MBPS 0x0380 +#define IEEE_AN1_ABILITY_MASK_10MBPS 0x0060 +#define IEEE_RGMII_TXRX_CLOCK_DELAYED_MASK 0x0030 + +#define IEEE_ASYMMETRIC_PAUSE_MASK 0x0800 +#define IEEE_PAUSE_MASK 0x0400 +#define IEEE_AUTONEG_ERROR_MASK 0x8000 + +#define PHY_DETECT_REG 1 +#define PHY_DETECT_MASK 0x1808 + +#define XEMACPS_GMII2RGMII_SPEED1000_FD 0x140 +#define XEMACPS_GMII2RGMII_SPEED100_FD 0x2100 +#define XEMACPS_GMII2RGMII_SPEED10_FD 0x100 +#define XEMACPS_GMII2RGMII_REG_NUM 0x10 + +/* Frequency setting */ +#define SLCR_LOCK_ADDR (XPS_SYS_CTRL_BASEADDR + 0x4) +#define SLCR_UNLOCK_ADDR (XPS_SYS_CTRL_BASEADDR + 0x8) +#define SLCR_GEM0_CLK_CTRL_ADDR (XPS_SYS_CTRL_BASEADDR + 0x140) +#define SLCR_GEM1_CLK_CTRL_ADDR (XPS_SYS_CTRL_BASEADDR + 0x144) +#ifdef PEEP +#define SLCR_GEM_10M_CLK_CTRL_VALUE 0x00103031 +#define SLCR_GEM_100M_CLK_CTRL_VALUE 0x00103001 +#define SLCR_GEM_1G_CLK_CTRL_VALUE 0x00103011 +#endif +#define SLCR_LOCK_KEY_VALUE 0x767B +#define SLCR_UNLOCK_KEY_VALUE 0xDF0D +#define SLCR_ADDR_GEM_RST_CTRL (XPS_SYS_CTRL_BASEADDR + 0x214) +#define EMACPS_SLCR_DIV_MASK 0xFC0FC0FF + +#define EMAC0_BASE_ADDRESS 0xE000B000 +#define EMAC1_BASE_ADDRESS 0xE000C000 + +static int detect_phy(XEmacPs *xemacpsp) +{ + u16 phy_reg; + u32 phy_addr; + + for (phy_addr = 31; phy_addr > 0; phy_addr--) { + XEmacPs_PhyRead(xemacpsp, phy_addr, PHY_DETECT_REG, + &phy_reg); + + if ((phy_reg != 0xFFFF) && + ((phy_reg & PHY_DETECT_MASK) == PHY_DETECT_MASK)) { + /* Found a valid PHY address */ + FreeRTOS_printf( ("XEmacPs detect_phy: PHY detected at address %d.\r\n", + phy_addr)); + FreeRTOS_printf( ("XEmacPs detect_phy: PHY detected.\n" ) ); + phy_detected = phy_addr; + return phy_addr; + } + } + + FreeRTOS_printf( ("XEmacPs detect_phy: No PHY detected. Assuming a PHY at address 0\n" ) ); + + /* default to zero */ + return 0; +} + +#ifdef PEEP +unsigned get_IEEE_phy_speed(XEmacPs *xemacpsp) +{ + + u16 control; + u16 status; + u16 partner_capabilities; + u16 partner_capabilities_1000; + u16 phylinkspeed; + u32 phy_addr = detect_phy(xemacpsp); + + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, + ADVERTISE_1000); + /* Advertise PHY speed of 100 and 10 Mbps */ + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, + ADVERTISE_100_AND_10); + + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, + &control); + control |= (IEEE_CTRL_AUTONEGOTIATE_ENABLE | + IEEE_STAT_AUTONEGOTIATE_RESTART); + + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, control); + + /* Read PHY control and status registers is successful. */ + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, &status); + + if ((control & IEEE_CTRL_AUTONEGOTIATE_ENABLE) && (status & + IEEE_STAT_AUTONEGOTIATE_CAPABLE)) { + + while ( !(status & IEEE_STAT_AUTONEGOTIATE_COMPLETE) ) { + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, + &status); + } + + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_PARTNER_ABILITIES_1_REG_OFFSET, + &partner_capabilities); + + if (status & IEEE_STAT_1GBPS_EXTENSIONS) { + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_PARTNER_ABILITIES_3_REG_OFFSET, + &partner_capabilities_1000); + if (partner_capabilities_1000 & IEEE_AN3_ABILITY_MASK_1GBPS) + return 1000; + } + + if (partner_capabilities & IEEE_AN1_ABILITY_MASK_100MBPS) + return 100; + if (partner_capabilities & IEEE_AN1_ABILITY_MASK_10MBPS) + return 10; + + xil_printf("%s: unknown PHY link speed, setting TEMAC speed to be 10 Mbps\r\n", + __FUNCTION__); + return 10; + + } else { + + /* Update TEMAC speed accordingly */ + if (status & IEEE_STAT_1GBPS_EXTENSIONS) { + /* Get commanded link speed */ + phylinkspeed = control & IEEE_CTRL_1GBPS_LINKSPEED_MASK; + + switch (phylinkspeed) { + case (IEEE_CTRL_LINKSPEED_1000M): + return 1000; + case (IEEE_CTRL_LINKSPEED_100M): + return 100; + case (IEEE_CTRL_LINKSPEED_10M): + return 10; + default: + xil_printf("%s: unknown PHY link speed (%d), setting TEMAC speed to be 10 Mbps\r\n", + __FUNCTION__, phylinkspeed); + return 10; + } + + } else { + + return (control & IEEE_CTRL_LINKSPEED_MASK) ? 100 : 10; + + } + } +} + +#else /* Zynq */ +unsigned get_IEEE_phy_speed(XEmacPs *xemacpsp) +{ + u16 temp; + u16 control; + u16 status; + u16 partner_capabilities; +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 + u32 phy_addr = XPAR_PCSPMA_SGMII_PHYADDR; +#else + u32 phy_addr = detect_phy(xemacpsp); +#endif + xil_printf("Start PHY autonegotiation \r\n"); + +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 +#else + XEmacPs_PhyWrite(xemacpsp,phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 2); + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, &control); + control |= IEEE_RGMII_TXRX_CLOCK_DELAYED_MASK; + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, control); + + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 0); + + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, &control); + control |= IEEE_ASYMMETRIC_PAUSE_MASK; + control |= IEEE_PAUSE_MASK; + control |= ADVERTISE_100; + control |= ADVERTISE_10; + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, control); + + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, + &control); + control |= ADVERTISE_1000; + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, + control); + + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 0); + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_COPPER_SPECIFIC_CONTROL_REG, + &control); + control |= (7 << 12); /* max number of gigabit attempts */ + control |= (1 << 11); /* enable downshift */ + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_COPPER_SPECIFIC_CONTROL_REG, + control); +#endif + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); + control |= IEEE_CTRL_AUTONEGOTIATE_ENABLE; + control |= IEEE_STAT_AUTONEGOTIATE_RESTART; +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 + control &= IEEE_CTRL_ISOLATE_DISABLE; +#endif + + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, control); + + +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 +#else + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); + control |= IEEE_CTRL_RESET_MASK; + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, control); + + while (1) { + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); + if (control & IEEE_CTRL_RESET_MASK) + continue; + else + break; + } +#endif + xil_printf("Waiting for PHY to complete autonegotiation.\r\n"); + + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, &status); + while ( !(status & IEEE_STAT_AUTONEGOTIATE_COMPLETE) ) { + sleep(1); +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 +#else + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_COPPER_SPECIFIC_STATUS_REG_2, + &temp); + if (temp & IEEE_AUTONEG_ERROR_MASK) { + xil_printf("Auto negotiation error \r\n"); + } +#endif + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_STATUS_REG_OFFSET, + &status); + } + + xil_printf("autonegotiation complete \r\n"); + +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 +#else + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_SPECIFIC_STATUS_REG, &partner_capabilities); +#endif + +#if XPAR_GIGE_PCS_PMA_CORE_PRESENT == 1 + xil_printf("Waiting for Link to be up; Polling for SGMII core Reg \r\n"); + XEmacPs_PhyRead(xemacpsp, phy_addr, 5, &temp); + while(!(temp & 0x8000)) { + XEmacPs_PhyRead(xemacpsp, phy_addr, 5, &temp); + } + if((temp & 0x0C00) == 0x0800) { + XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); + return 1000; + } + else if((temp & 0x0C00) == 0x0400) { + XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); + return 100; + } + else if((temp & 0x0C00) == 0x0000) { + XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); + return 10; + } else { + xil_printf("get_IEEE_phy_speed(): Invalid speed bit value, Deafulting to Speed = 10 Mbps\r\n"); + XEmacPs_PhyRead(xemacpsp, phy_addr, 0, &temp); + XEmacPs_PhyWrite(xemacpsp, phy_addr, 0, 0x0100); + return 10; + } +#else + if ( ((partner_capabilities >> 14) & 3) == 2)/* 1000Mbps */ + return 1000; + else if ( ((partner_capabilities >> 14) & 3) == 1)/* 100Mbps */ + return 100; + else /* 10Mbps */ + return 10; +#endif +} +#endif + +unsigned configure_IEEE_phy_speed(XEmacPs *xemacpsp, unsigned speed) +{ + u16 control; + u32 phy_addr = detect_phy(xemacpsp); + + XEmacPs_PhyWrite(xemacpsp,phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 2); + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, &control); + control |= IEEE_RGMII_TXRX_CLOCK_DELAYED_MASK; + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_MAC, control); + + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_PAGE_ADDRESS_REGISTER, 0); + + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, &control); + control |= IEEE_ASYMMETRIC_PAUSE_MASK; + control |= IEEE_PAUSE_MASK; + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, control); + + XEmacPs_PhyRead(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, &control); + control &= ~IEEE_CTRL_LINKSPEED_1000M; + control &= ~IEEE_CTRL_LINKSPEED_100M; + control &= ~IEEE_CTRL_LINKSPEED_10M; + + if (speed == 1000) { + control |= IEEE_CTRL_LINKSPEED_1000M; + } + + else if (speed == 100) { + control |= IEEE_CTRL_LINKSPEED_100M; + /* Dont advertise PHY speed of 1000 Mbps */ + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, 0); + /* Dont advertise PHY speed of 10 Mbps */ + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, + ADVERTISE_100); + } + + else if (speed == 10) { + control |= IEEE_CTRL_LINKSPEED_10M; + /* Dont advertise PHY speed of 1000 Mbps */ + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_1000_ADVERTISE_REG_OFFSET, + 0); + /* Dont advertise PHY speed of 100 Mbps */ + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_AUTONEGO_ADVERTISE_REG, + ADVERTISE_10); + } + + XEmacPs_PhyWrite(xemacpsp, phy_addr, IEEE_CONTROL_REG_OFFSET, + control | IEEE_CTRL_RESET_MASK); + { + volatile int wait; + for (wait=0; wait < 100000; wait++); + } + return 0; +} + +static void SetUpSLCRDivisors(int mac_baseaddr, int speed) +{ + volatile u32 slcrBaseAddress; +#ifndef PEEP + u32 SlcrDiv0; + u32 SlcrDiv1=0; + u32 SlcrTxClkCntrl; +#endif + + *(volatile unsigned int *)(SLCR_UNLOCK_ADDR) = SLCR_UNLOCK_KEY_VALUE; + + if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { + slcrBaseAddress = SLCR_GEM0_CLK_CTRL_ADDR; + } else { + slcrBaseAddress = SLCR_GEM1_CLK_CTRL_ADDR; + } +#ifdef PEEP + if (speed == 1000) { + *(volatile unsigned int *)(slcrBaseAddress) = + SLCR_GEM_1G_CLK_CTRL_VALUE; + } else if (speed == 100) { + *(volatile unsigned int *)(slcrBaseAddress) = + SLCR_GEM_100M_CLK_CTRL_VALUE; + } else { + *(volatile unsigned int *)(slcrBaseAddress) = + SLCR_GEM_10M_CLK_CTRL_VALUE; + } +#else + if (speed == 1000) { + if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { +#ifdef XPAR_PS7_ETHERNET_0_ENET_SLCR_1000MBPS_DIV0 + SlcrDiv0 = XPAR_PS7_ETHERNET_0_ENET_SLCR_1000MBPS_DIV0; + SlcrDiv1 = XPAR_PS7_ETHERNET_0_ENET_SLCR_1000MBPS_DIV1; +#endif + } else { +#ifdef XPAR_PS7_ETHERNET_1_ENET_SLCR_1000MBPS_DIV0 + SlcrDiv0 = XPAR_PS7_ETHERNET_1_ENET_SLCR_1000MBPS_DIV0; + SlcrDiv1 = XPAR_PS7_ETHERNET_1_ENET_SLCR_1000MBPS_DIV1; +#endif + } + } else if (speed == 100) { + if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { +#ifdef XPAR_PS7_ETHERNET_0_ENET_SLCR_100MBPS_DIV0 + SlcrDiv0 = XPAR_PS7_ETHERNET_0_ENET_SLCR_100MBPS_DIV0; + SlcrDiv1 = XPAR_PS7_ETHERNET_0_ENET_SLCR_100MBPS_DIV1; +#endif + } else { +#ifdef XPAR_PS7_ETHERNET_1_ENET_SLCR_100MBPS_DIV0 + SlcrDiv0 = XPAR_PS7_ETHERNET_1_ENET_SLCR_100MBPS_DIV0; + SlcrDiv1 = XPAR_PS7_ETHERNET_1_ENET_SLCR_100MBPS_DIV1; +#endif + } + } else { + if ((unsigned long)mac_baseaddr == EMAC0_BASE_ADDRESS) { +#ifdef XPAR_PS7_ETHERNET_0_ENET_SLCR_10MBPS_DIV0 + SlcrDiv0 = XPAR_PS7_ETHERNET_0_ENET_SLCR_10MBPS_DIV0; + SlcrDiv1 = XPAR_PS7_ETHERNET_0_ENET_SLCR_10MBPS_DIV1; +#endif + } else { +#ifdef XPAR_PS7_ETHERNET_1_ENET_SLCR_10MBPS_DIV0 + SlcrDiv0 = XPAR_PS7_ETHERNET_1_ENET_SLCR_10MBPS_DIV0; + SlcrDiv1 = XPAR_PS7_ETHERNET_1_ENET_SLCR_10MBPS_DIV1; +#endif + } + } + SlcrTxClkCntrl = *(volatile unsigned int *)(slcrBaseAddress); + SlcrTxClkCntrl &= EMACPS_SLCR_DIV_MASK; + SlcrTxClkCntrl |= (SlcrDiv1 << 20); + SlcrTxClkCntrl |= (SlcrDiv0 << 8); + *(volatile unsigned int *)(slcrBaseAddress) = SlcrTxClkCntrl; +#endif + *(volatile unsigned int *)(SLCR_LOCK_ADDR) = SLCR_LOCK_KEY_VALUE; + return; +} + + +unsigned link_speed; +unsigned Phy_Setup (XEmacPs *xemacpsp) +{ + unsigned long conv_present = 0; + unsigned long convspeeddupsetting = 0; + unsigned long convphyaddr = 0; + +#ifdef XPAR_GMII2RGMIICON_0N_ETH0_ADDR + convphyaddr = XPAR_GMII2RGMIICON_0N_ETH0_ADDR; + conv_present = 1; +#else +#ifdef XPAR_GMII2RGMIICON_0N_ETH1_ADDR + convphyaddr = XPAR_GMII2RGMIICON_0N_ETH1_ADDR; + conv_present = 1; +#endif +#endif + +#ifdef ipconfigNIC_LINKSPEED_AUTODETECT + link_speed = get_IEEE_phy_speed(xemacpsp); + if (link_speed == 1000) { + SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,1000); + convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED1000_FD; + } else if (link_speed == 100) { + SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,100); + convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED100_FD; + } else { + SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,10); + convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED10_FD; + } +#elif defined(ipconfigNIC_LINKSPEED1000) + SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,1000); + link_speed = 1000; + configure_IEEE_phy_speed(xemacpsp, link_speed); + convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED1000_FD; + sleep(1); +#elif defined(ipconfigNIC_LINKSPEED100) + SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,100); + link_speed = 100; + configure_IEEE_phy_speed(xemacpsp, link_speed); + convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED100_FD; + sleep(1); +#elif defined(ipconfigNIC_LINKSPEED10) + SetUpSLCRDivisors(xemacpsp->Config.BaseAddress,10); + link_speed = 10; + configure_IEEE_phy_speed(xemacpsp, link_speed); + convspeeddupsetting = XEMACPS_GMII2RGMII_SPEED10_FD; + sleep(1); +#endif + if (conv_present) { + XEmacPs_PhyWrite(xemacpsp, convphyaddr, + XEMACPS_GMII2RGMII_REG_NUM, convspeeddupsetting); + } + + xil_printf("link speed: %d\r\n", link_speed); + return link_speed; +} + diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_topology.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_topology.h index bb5178346..1d8fede15 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_topology.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_topology.h @@ -1,46 +1,46 @@ -/* - * Copyright (c) 2007-2013 Xilinx, Inc. All rights reserved. - * - * Xilinx, Inc. - * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A - * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS - * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR - * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION - * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE - * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. - * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO - * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO - * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE - * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __XTOPOLOGY_H_ -#define __XTOPOLOGY_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -enum xemac_types { xemac_type_unknown = -1, xemac_type_xps_emaclite, xemac_type_xps_ll_temac, xemac_type_axi_ethernet, xemac_type_emacps }; - -struct xtopology_t { - unsigned emac_baseaddr; - enum xemac_types emac_type; - unsigned intc_baseaddr; - unsigned intc_emac_intr; /* valid only for xemac_type_xps_emaclite */ - unsigned scugic_baseaddr; /* valid only for Zynq */ - unsigned scugic_emac_intr; /* valid only for GEM */ -}; - -extern int x_topology_n_emacs; -extern struct xtopology_t x_topology[]; - -int x_topology_find_index(unsigned base); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright (c) 2007-2013 Xilinx, Inc. All rights reserved. + * + * Xilinx, Inc. + * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A + * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS + * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR + * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION + * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE + * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. + * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO + * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO + * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE + * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __XTOPOLOGY_H_ +#define __XTOPOLOGY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum xemac_types { xemac_type_unknown = -1, xemac_type_xps_emaclite, xemac_type_xps_ll_temac, xemac_type_axi_ethernet, xemac_type_emacps }; + +struct xtopology_t { + unsigned emac_baseaddr; + enum xemac_types emac_type; + unsigned intc_baseaddr; + unsigned intc_emac_intr; /* valid only for xemac_type_xps_emaclite */ + unsigned scugic_baseaddr; /* valid only for Zynq */ + unsigned scugic_emac_intr; /* valid only for GEM */ +}; + +extern int x_topology_n_emacs; +extern struct xtopology_t x_topology[]; + +int x_topology_find_index(unsigned base); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/board_family/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/board_family/NetworkInterface.c index aa0a646b4..4692c12c4 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/board_family/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/board_family/NetworkInterface.c @@ -1,63 +1,63 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "list.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" - -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet -driver will filter incoming packets and only pass the stack those packets it -considers need processing. */ -#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) -#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#else -#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#endif - -BaseType_t xNetworkInterfaceInitialise( void ) -{ - /* FIX ME. */ - return pdFALSE; -} - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend ) -{ - /* FIX ME. */ - return pdFALSE; -} - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ - /* FIX ME. */ -} - -BaseType_t xGetPhyLinkStatus( void ) -{ - /* FIX ME. */ - return pdFALSE; +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "list.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" + +/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet +driver will filter incoming packets and only pass the stack those packets it +considers need processing. */ +#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) +#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +#else +#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +#endif + +BaseType_t xNetworkInterfaceInitialise( void ) +{ + /* FIX ME. */ + return pdFALSE; +} + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend ) +{ + /* FIX ME. */ + return pdFALSE; +} + +void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +{ + /* FIX ME. */ +} + +BaseType_t xGetPhyLinkStatus( void ) +{ + /* FIX ME. */ + return pdFALSE; } \ No newline at end of file diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/esp32/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/esp32/NetworkInterface.c index 0b34edf7b..96503f457 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/esp32/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/esp32/NetworkInterface.c @@ -1,193 +1,135 @@ -// Copyright 2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/* Standard includes. */ -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_DNS.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -#include "esp_log.h" -#include "esp_wifi.h" -#include "esp_wifi_internal.h" -#include "tcpip_adapter.h" - -enum if_state_t { - INTERFACE_DOWN = 0, - INTERFACE_UP, -}; - -static const char *TAG = "NetInterface"; -volatile static uint32_t xInterfaceState = INTERFACE_DOWN; - -#if ( ipconfigHAS_PRINTF != 0 ) - static void prvMonitorResources(); -#endif - -BaseType_t xNetworkInterfaceInitialise( void ) -{ - static BaseType_t xMACAdrInitialized = pdFALSE; - uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ]; - - if (xInterfaceState == INTERFACE_UP) { - if (xMACAdrInitialized == pdFALSE) { - esp_wifi_get_mac(ESP_IF_WIFI_STA, ucMACAddress); - FreeRTOS_UpdateMACAddress(ucMACAddress); - xMACAdrInitialized = pdTRUE; - } - return pdTRUE; - } - return pdFALSE; -} - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t *const pxNetworkBuffer, BaseType_t xReleaseAfterSend ) -{ - if (pxNetworkBuffer == NULL || pxNetworkBuffer->pucEthernetBuffer == NULL || pxNetworkBuffer->xDataLength == 0) { - ESP_LOGE(TAG, "Invalid params"); - return pdFALSE; - } - - esp_err_t ret; - if (xInterfaceState == INTERFACE_DOWN) { - ESP_LOGD(TAG, "Interface down"); - ret = ESP_FAIL; - } else { - ret = esp_wifi_internal_tx(ESP_IF_WIFI_STA, pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to tx buffer %p, len %d, err %d", pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength, ret); - } - } - -#if ( ipconfigHAS_PRINTF != 0 ) - prvMonitorResources(); -#endif - if (xReleaseAfterSend == pdTRUE) { - vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); - } - - return ret == ESP_OK ? pdTRUE : pdFALSE; -} - -void vNetworkNotifyIFDown() -{ - IPStackEvent_t xRxEvent = { eNetworkDownEvent, NULL }; - if (xInterfaceState != INTERFACE_DOWN) { - xInterfaceState = INTERFACE_DOWN; - xSendEventStructToIPTask( &xRxEvent, 0 ); - } -} - -void vNetworkNotifyIFUp() -{ - xInterfaceState = INTERFACE_UP; -} - -esp_err_t wlanif_input(void *netif, void *buffer, uint16_t len, void *eb) -{ - NetworkBufferDescriptor_t *pxNetworkBuffer; - IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; - const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); - -#if ( ipconfigHAS_PRINTF != 0 ) - prvMonitorResources(); -#endif - - if( eConsiderFrameForProcessing( buffer ) != eProcessBuffer ) { - ESP_LOGD(TAG, "Dropping packet"); - esp_wifi_internal_free_rx_buffer(eb); - return ESP_OK; - } - - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor(len, xDescriptorWaitTime); - if (pxNetworkBuffer != NULL) { - - /* Set the packet size, in case a larger buffer was returned. */ - pxNetworkBuffer->xDataLength = len; - - /* Copy the packet data. */ - memcpy(pxNetworkBuffer->pucEthernetBuffer, buffer, len); - xRxEvent.pvData = (void *) pxNetworkBuffer; - - if ( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime) == pdFAIL ) { - ESP_LOGE(TAG, "Failed to enqueue packet to network stack %p, len %d", buffer, len); - vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); - return ESP_FAIL; - } - esp_wifi_internal_free_rx_buffer(eb); - return ESP_OK; - } else { - ESP_LOGE(TAG, "Failed to get buffer descriptor"); - return ESP_FAIL; - } -} - -#if ( ipconfigHAS_PRINTF != 0 ) - static void prvMonitorResources() - { - static UBaseType_t uxLastMinBufferCount = 0u; - static UBaseType_t uxCurrentBufferCount = 0u; - static size_t uxMinLastSize = 0uL; - size_t uxMinSize; - - uxCurrentBufferCount = uxGetMinimumFreeNetworkBuffers(); - - if( uxLastMinBufferCount != uxCurrentBufferCount ) - { - /* The logging produced below may be helpful - * while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentBufferCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentBufferCount ) ); - } - - uxMinSize = xPortGetMinimumEverFreeHeapSize(); - - if( uxMinLastSize != uxMinSize ) - { - uxMinLastSize = uxMinSize; - FreeRTOS_printf( ( "Heap: current %lu lowest %lu\n", xPortGetFreeHeapSize(), uxMinSize ) ); - } - - #if ( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - static UBaseType_t uxLastMinQueueSpace = 0; - UBaseType_t uxCurrentCount = 0u; - - uxCurrentCount = uxGetMinimumIPQueueSpace(); - - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - * while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - } -#endif /* ( ipconfigHAS_PRINTF != 0 ) */ -/*-----------------------------------------------------------*/ +// Copyright 2018 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* Standard includes. */ +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_DNS.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +#include "esp_log.h" +#include "esp_wifi.h" +#include "esp_wifi_internal.h" +#include "tcpip_adapter.h" + +enum if_state_t { + INTERFACE_DOWN = 0, + INTERFACE_UP, +}; + +static const char *TAG = "NetInterface"; +volatile static uint32_t xInterfaceState = INTERFACE_DOWN; + +BaseType_t xNetworkInterfaceInitialise( void ) +{ + static BaseType_t xMACAdrInitialized = pdFALSE; + uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ]; + + if (xInterfaceState == INTERFACE_UP) { + if (xMACAdrInitialized == pdFALSE) { + esp_wifi_get_mac(ESP_IF_WIFI_STA, ucMACAddress); + FreeRTOS_UpdateMACAddress(ucMACAddress); + xMACAdrInitialized = pdTRUE; + } + return pdTRUE; + } + return pdFALSE; +} + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t *const pxNetworkBuffer, BaseType_t xReleaseAfterSend ) +{ + if (pxNetworkBuffer == NULL || pxNetworkBuffer->pucEthernetBuffer == NULL || pxNetworkBuffer->xDataLength == 0) { + ESP_LOGE(TAG, "Invalid params"); + return pdFALSE; + } + + esp_err_t ret; + if (xInterfaceState == INTERFACE_DOWN) { + ESP_LOGD(TAG, "Interface down"); + ret = ESP_FAIL; + } else { + ret = esp_wifi_internal_tx(ESP_IF_WIFI_STA, pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "Failed to tx buffer %p, len %d, err %d", pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength, ret); + } + } + + if (xReleaseAfterSend == pdTRUE) { + vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); + } + + return ret == ESP_OK ? pdTRUE : pdFALSE; +} + +void vNetworkNotifyIFDown() +{ + IPStackEvent_t xRxEvent = { eNetworkDownEvent, NULL }; + if (xInterfaceState != INTERFACE_DOWN) { + xInterfaceState = INTERFACE_DOWN; + xSendEventStructToIPTask( &xRxEvent, 0 ); + } +} + +void vNetworkNotifyIFUp() +{ + xInterfaceState = INTERFACE_UP; +} + +esp_err_t wlanif_input(void *netif, void *buffer, uint16_t len, void *eb) +{ + NetworkBufferDescriptor_t *pxNetworkBuffer; + IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; + const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); + + if( eConsiderFrameForProcessing( buffer ) != eProcessBuffer ) { + ESP_LOGD(TAG, "Dropping packet"); + esp_wifi_internal_free_rx_buffer(eb); + return ESP_OK; + } + + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor(len, xDescriptorWaitTime); + if (pxNetworkBuffer != NULL) { + + /* Set the packet size, in case a larger buffer was returned. */ + pxNetworkBuffer->xDataLength = len; + + /* Copy the packet data. */ + memcpy(pxNetworkBuffer->pucEthernetBuffer, buffer, len); + xRxEvent.pvData = (void *) pxNetworkBuffer; + + if ( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime) == pdFAIL ) { + ESP_LOGE(TAG, "Failed to enqueue packet to network stack %p, len %d", buffer, len); + vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); + return ESP_FAIL; + } + esp_wifi_internal_free_rx_buffer(eb); + return ESP_OK; + } else { + ESP_LOGE(TAG, "Failed to get buffer descriptor"); + return ESP_FAIL; + } +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/include/phyHandling.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/include/phyHandling.h deleted file mode 100644 index 9e8a11387..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/include/phyHandling.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Handling of Ethernet PHY's - * PHY's communicate with an EMAC either through - * a Media-Independent Interface (MII), or a Reduced Media-Independent Interface (RMII). - * The EMAC can poll for PHY ports on 32 different addresses. Each of the PHY ports - * shall be treated independently. - * - */ - -#ifndef PHYHANDLING_H - -#define PHYHANDLING_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifndef ipconfigPHY_MAX_PORTS - /* There can be at most 32 PHY ports, but in most cases there are 4 or less. */ - #define ipconfigPHY_MAX_PORTS 4 -#endif - -/* A generic user-provided function that reads from the PHY-port at 'xAddress'( 0-based ). A 16-bit value shall be stored in - '*pulValue'. xRegister is the register number ( 0 .. 31 ). In fact all PHY registers are 16-bit. - Return non-zero in case the action failed. */ -typedef BaseType_t ( *xApplicationPhyReadHook_t )( BaseType_t xAddress, BaseType_t xRegister, uint32_t *pulValue ); - -/* A generic user-provided function that writes 'ulValue' to the - PHY-port at 'xAddress' ( 0-based ). xRegister is the register number ( 0 .. 31 ). - Return non-zero in case the action failed. */ -typedef BaseType_t ( *xApplicationPhyWriteHook_t )( BaseType_t xAddress, BaseType_t xRegister, uint32_t ulValue ); - -typedef struct xPhyProperties -{ - uint8_t ucSpeed; - uint8_t ucMDI_X; /* MDI-X : Medium Dependent Interface - Crossover */ - uint8_t ucDuplex; - uint8_t ucSpare; -} PhyProperties_t; - -typedef struct xEthernetPhy -{ - xApplicationPhyReadHook_t fnPhyRead; - xApplicationPhyWriteHook_t fnPhyWrite; - uint32_t ulPhyIDs[ ipconfigPHY_MAX_PORTS ]; - uint8_t ucPhyIndexes[ ipconfigPHY_MAX_PORTS ]; - TimeOut_t xLinkStatusTimer; - TickType_t xLinkStatusRemaining; - BaseType_t xPortCount; - uint32_t ulBCRValue; - uint32_t ulACRValue; - uint32_t ulLinkStatusMask; - PhyProperties_t xPhyPreferences; - PhyProperties_t xPhyProperties; -} EthernetPhy_t; - -/* Some defines used internally here to indicate preferences about speed, MDIX -(wired direct or crossed), and duplex (half or full). */ - -/* Values for PhyProperties_t::ucSpeed : */ -#define PHY_SPEED_10 1 -#define PHY_SPEED_100 2 -#define PHY_SPEED_AUTO 3 - -/* Values for PhyProperties_t::ucMDI_X : */ -#define PHY_MDIX_DIRECT 1 -#define PHY_MDIX_CROSSED 2 -#define PHY_MDIX_AUTO 3 - -/* Values for PhyProperties_t::ucDuplex : */ -#define PHY_DUPLEX_HALF 1 -#define PHY_DUPLEX_FULL 2 -#define PHY_DUPLEX_AUTO 3 - -/* ID's of supported PHY's : */ -#define PHY_ID_LAN8742A 0x0007c130 -#define PHY_ID_LAN8720 0x0007c0f0 - -#define PHY_ID_KSZ8041 0x000010A1 -#define PHY_ID_KSZ8051 0x000010A1 -#define PHY_ID_KSZ8081 0x000010A1 - -#define PHY_ID_KSZ8863 0x00221430 -#define PHY_ID_KSZ8081MNXIA 0x00221560 - -#define PHY_ID_DP83848I 0x20005C90 - - -/* Initialise the struct and assign a PHY-read and -write function. */ -void vPhyInitialise( EthernetPhy_t *pxPhyObject, xApplicationPhyReadHook_t fnPhyRead, xApplicationPhyWriteHook_t fnPhyWrite ); - -/* Discover all PHY's connected by polling 32 indexes ( zero-based ) */ -BaseType_t xPhyDiscover( EthernetPhy_t *pxPhyObject ); - -/* Send a reset command to the connected PHY ports and send configuration. */ -BaseType_t xPhyConfigure( EthernetPhy_t *pxPhyObject, const PhyProperties_t *pxPhyProperties ); - -/* Give a command to start auto negotiation on a set of PHY port's. */ -BaseType_t xPhyStartAutoNegotiation( EthernetPhy_t *pxPhyObject, uint32_t ulPhyMask ); - -/* Do not use auto negotiation but use predefined values from 'pxPhyObject->xPhyPreferences'. */ -BaseType_t xPhyFixedValue( EthernetPhy_t *pxPhyObject, uint32_t ulPhyMask ); - -/* Check the current Link Status. -'xHadReception' : make this true if a packet has been received since the -last call to this function. */ -BaseType_t xPhyCheckLinkStatus( EthernetPhy_t *pxPhyObject, BaseType_t xHadReception ); - -/* Get the bitmask of a given 'EthernetPhy_t'. */ -#define xPhyGetMask( pxPhyObject ) \ - ( ( ( ( uint32_t ) 1u ) << ( pxPhyObject )->xPortCount ) - 1u ) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/NetworkInterface.c index 544e5ba09..e4ae1168f 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/NetworkInterface.c @@ -1,1272 +1,1272 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* Standard includes. */ -#include -#include -#include -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -#include "sam4e_xplained_pro.h" -#include "hr_gettime.h" -#include "conf_eth.h" -#include "ksz8851snl.h" -#include "ksz8851snl_reg.h" - -/* Some files from the Atmel Software Framework */ -#include -#include -#include - -/* - Sending a packet: - - 1) Called by UP-task, add buffer to the TX-list: - xNetworkInterfaceOutput() - tx_buffers[ us_tx_head ] = pxNetworkBuffer; - tx_busy[ us_tx_head ] = pdTRUE; - us_tx_head++; - - 2) Called by EMAC-Task: start SPI transfer - ksz8851snl_update() - if( ul_spi_pdc_status == SPI_PDC_IDLE ) - { - if( ( tx_busy[ us_tx_tail ] != pdFALSE ) && - ( us_pending_frame == 0 ) && - ( ul_had_intn_interrupt == 0 ) ) - { - // disable all interrupts. - ksz8851_reg_write( REG_INT_MASK, 0 ); - Bring KSZ8851SNL_CSN_GPIO low - ksz8851_fifo_write( pxNetworkBuffer->pucEthernetBuffer, xLength, xLength ); - ul_spi_pdc_status = SPI_PDC_TX_START; - tx_cur_buffer = pxNetworkBuffer; - } - } - 3) Wait for SPI RXBUFF interrupt - SPI_Handler() - if( ul_spi_pdc_status == SPI_PDC_TX_START ) - { - if( SPI_Status & SPI_SR_RXBUFF ) - { - ul_spi_pdc_status = SPI_PDC_TX_COMPLETE; - } - } - - 4) Called by EMAC-Task: finish SPI transfer - ksz8851snl_update() - if( ul_spi_pdc_status == SPI_PDC_TX_COMPLETE ) - { - ul_spi_pdc_status = SPI_PDC_IDLE; - Bring KSZ8851SNL_CSN_GPIO high - // TX step12: disable TXQ write access. - ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); - // TX step12.1: enqueue frame in TXQ. - ksz8851_reg_setbits( REG_TXQ_CMD, TXQ_ENQUEUE ); - - // RX step13: enable INT_RX flag. - ksz8851_reg_write( REG_INT_MASK, INT_RX ); - - // Buffer sent, free the corresponding buffer and mark descriptor as owned by software. - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - - tx_buffers[ us_tx_tail ] = NULL; - tx_busy[ us_tx_tail ] = pdFALSE; - us_tx_tail++ - } - - Receiving a packet: - - 1) Wait for a INTN interrupt - INTN_Handler() - ul_had_intn_interrupt = 1 - vTaskNotifyGiveFromISR(); // Wake up the EMAC task - - 2) Called by EMAC-Task: check for new fragments and start SPI transfer - ksz8851snl_update() - if( ul_spi_pdc_status == SPI_PDC_IDLE ) - { - if( ( ul_had_intn_interrupt != 0 ) || ( us_pending_frame > 0 ) ) - { - if( us_pending_frame == 0 ) - { - us_pending_frame = ksz8851_reg_read(REG_RX_FRAME_CNT_THRES) >> 8; - if( us_pending_frame == 0 ) - { - break; - } - } - // RX step2: disable all interrupts. - ksz8851_reg_write( REG_INT_MASK, 0 ); - Check if there is a valid packet: REG_RX_FHR_STATUS - Read the length of the next fragment: REG_RX_FHR_BYTE_CNT - ul_spi_pdc_status = SPI_PDC_RX_START; - gpio_set_pin_low(KSZ8851SNL_CSN_GPIO); - // Start SPI data transfer - ksz8851_fifo_read( pxNetworkBuffer->pucEthernetBuffer, xReadLength ); - } - } - - 3) Wait for SPI RXBUFF interrupt - SPI_Handler() - if( ul_spi_pdc_status == SPI_PDC_RX_START: - { - if( ( ulCurrentSPIStatus & SPI_SR_RXBUFF ) != 0 ) - { - // Transfer complete, disable SPI RXBUFF interrupt. - spi_disable_interrupt( KSZ8851SNL_SPI, SPI_IDR_RXBUFF ); - - ul_spi_pdc_status = SPI_PDC_RX_COMPLETE; - } - } - } - - 4) Finish SPI transfer - ksz8851snl_update() - if( ul_spi_pdc_status == SPI_PDC_RX_COMPLETE ) - { - ul_spi_pdc_status = SPI_PDC_IDLE; - Bring KSZ8851SNL_CSN_GPIO high - // RX step21: end RXQ read access. - ksz8851_reg_clrbits(REG_RXQ_CMD, RXQ_START); - // RX step22-23: update frame count to be read. - us_pending_frame-- - // RX step24: enable INT_RX flag if transfer complete. - if( us_pending_frame == 0 ) - { - // Allow more RX interrupts. - ksz8851_reg_write( REG_INT_MASK, INT_RX ); - } - - // Mark descriptor ready to be read. - rx_ready[ rxHead ] = pdTRUE; - rxHead++ - } -*/ - -#define PHY_REG_00_BMCR 0x00 // Basic mode control register -#define PHY_REG_01_BMSR 0x01 // Basic mode status register -#define PHY_REG_02_PHYSID1 0x02 // PHYS ID 1 -#define PHY_REG_03_PHYSID2 0x03 // PHYS ID 2 -#define PHY_REG_04_ADVERTISE 0x04 // Advertisement control reg -#define PHY_REG_05_LPA 0x05 // Link partner ability reg -#define PHY_REG_06_ANER 0x06 // 6 RW Auto-Negotiation Expansion Register -#define PHY_REG_07_ANNPTR 0x07 // 7 RW Auto-Negotiation Next Page TX -#define PHY_REG_08_RESERVED0 0x08 // 0x08..0x0Fh 8-15 RW RESERVED - -#define BMSR_LINK_STATUS 0x0004 //!< Link status - -#ifndef PHY_LS_HIGH_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not - receiving packets. */ - #define PHY_LS_HIGH_CHECK_TIME_MS 15000 -#endif - -#ifndef PHY_LS_LOW_CHECK_TIME_MS - /* Check if the LinkSStatus in the PHY is still low every second. */ - #define PHY_LS_LOW_CHECK_TIME_MS 1000 -#endif - -/* Interrupt events to process. Currently only the Rx event is processed -although code for other events is included to allow for possible future -expansion. */ -#define EMAC_IF_RX_EVENT 1UL -#define EMAC_IF_TX_EVENT 2UL -#define EMAC_IF_ERR_EVENT 4UL -#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) - -#define ETHERNET_CONF_PHY_ADDR BOARD_GMAC_PHY_ADDR - -#ifdef ipconfigHAS_TX_CRC_OFFLOADING - #undef ipconfigHAS_TX_CRC_OFFLOADING -#endif -/* Override this define because the KSZ8851 is programmed to set all outgoing CRC's */ -#define ipconfigHAS_TX_CRC_OFFLOADING 1 - -#ifndef EMAC_MAX_BLOCK_TIME_MS - #define EMAC_MAX_BLOCK_TIME_MS 100ul -#endif - -/* Default the size of the stack used by the EMAC deferred handler task to 4x -the size of the stack used by the idle task - but allow this to be overridden in -FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ -#ifndef configEMAC_TASK_STACK_SIZE - #define configEMAC_TASK_STACK_SIZE ( 6 * configMINIMAL_STACK_SIZE ) -#endif - -#define SPI_PDC_IDLE 0 -#define SPI_PDC_RX_START 1 -#define SPI_PDC_TX_ERROR 2 -#define SPI_PDC_RX_COMPLETE 3 -#define SPI_PDC_TX_START 4 -#define SPI_PDC_RX_ERROR 5 -#define SPI_PDC_TX_COMPLETE 6 - -/** - * ksz8851snl driver structure. - */ -typedef struct { - /** Set to 1 when owner is software (ready to read), 0 for Micrel. */ - uint32_t rx_ready[MICREL_RX_BUFFERS]; - /** Set to 1 when owner is Micrel, 0 for software. */ - uint32_t tx_busy[MICREL_TX_BUFFERS]; - /** RX NetworkBufferDescriptor_t pointer list */ - NetworkBufferDescriptor_t *rx_buffers[MICREL_RX_BUFFERS]; - /** TX NetworkBufferDescriptor_t pointer list */ - NetworkBufferDescriptor_t *tx_buffers[MICREL_TX_BUFFERS]; - NetworkBufferDescriptor_t *tx_cur_buffer; - - /** Circular buffer head pointer for packet received. */ - uint32_t us_rx_head; - /** Circular buffer tail pointer for packet to be read. */ - uint32_t us_rx_tail; - /** Circular buffer head pointer by upper layer (buffer to be sent). */ - uint32_t us_tx_head; - /** Circular buffer tail pointer incremented by handlers (buffer sent). */ - uint32_t us_tx_tail; - - uint32_t ul_total_tx; - uint32_t ul_total_rx; - uint32_t tx_space; - - /** Still experimental: hash table to allow certain multicast addresses. */ - uint16_t pusHashTable[ 4 ]; - - /* ul_spi_pdc_status has "SPI_PDC_xxx" values. */ - volatile uint32_t ul_spi_pdc_status; - - /* ul_had_intn_interrupt becomes true within the INTN interrupt. */ - volatile uint32_t ul_had_intn_interrupt; - - uint16_t us_pending_frame; -} xKSZ8851_Device_t; - -/* SPI PDC register base. -Declared in ASF\sam\components\ksz8851snl\ksz8851snl.c */ -extern Pdc *g_p_spi_pdc; - -/* Temporary buffer for PDC reception. -declared in ASF\sam\components\ksz8851snl\ksz8851snl.c */ -extern uint8_t tmpbuf[1536]; - -COMPILER_ALIGNED(8) -static xKSZ8851_Device_t xMicrelDevice; - -static TaskHandle_t xTransmitHandle; - -/*-----------------------------------------------------------*/ - -/* - * Wait a fixed time for the link status to indicate the network is up. - */ -static BaseType_t xGMACWaitLS( TickType_t xMaxTime ); - -/* - * A deferred interrupt handler task that processes GMAC interrupts. - */ -static void prvEMACHandlerTask( void *pvParameters ); - -/* - * Try to obtain an Rx packet from the hardware. - */ -static uint32_t prvEMACRxPoll( void ); - -static inline unsigned long ulReadMDIO( unsigned uAddress ); - -static void ksz8851snl_low_level_init( void ); - -static NetworkBufferDescriptor_t *ksz8851snl_low_level_input( void ); - -/*-----------------------------------------------------------*/ - -/* Bit map of outstanding ETH interrupt events for processing. Currently only -the Rx interrupt is handled, although code is included for other events to -enable future expansion. */ -static volatile uint32_t ulISREvents; - -/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ -static uint32_t ulPHYLinkStatus = 0; -static volatile BaseType_t xGMACSwitchRequired; - -static void ksz8851snl_update( void ); - -static void ksz8851snl_rx_init( void ); - -static void ksz8851snl_tx_init( void ); - -/* Holds the handle of the task used as a deferred interrupt processor. The -handle is used so direct notifications can be sent to the task for all EMAC/DMA -related interrupts. */ -TaskHandle_t xEMACTaskHandle = NULL; - - -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceInitialise( void ) -{ -const TickType_t x5_Seconds = 5000UL; - - if( xEMACTaskHandle == NULL ) - { - ksz8851snl_low_level_init(); - - /* Wait at most 5 seconds for a Link Status in the PHY. */ - xGMACWaitLS( pdMS_TO_TICKS( x5_Seconds ) ); - - /* The handler task is created at the highest possible priority to - ensure the interrupt handler can return directly to it. */ - xTaskCreate( prvEMACHandlerTask, "KSZ8851", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); - configASSERT( xEMACTaskHandle ); - } - - /* When returning non-zero, the stack will become active and - start DHCP (in configured) */ - ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); - - return ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0; -} -/*-----------------------------------------------------------*/ - -BaseType_t xGetPhyLinkStatus( void ) -{ -BaseType_t xResult; - - /* This function returns true if the Link Status in the PHY is high. */ - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - xResult = pdTRUE; - } - else - { - xResult = pdFALSE; - } - - return xResult; -} -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t bReleaseAfterSend ) -{ -BaseType_t xResult = pdFALSE; -int txHead = xMicrelDevice.us_tx_head; - - /* Make sure the next descriptor is free. */ - if( xMicrelDevice.tx_busy[ txHead ] != pdFALSE ) - { - /* All TX buffers busy. */ - } - else if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) == 0 ) - { - /* Output: LS low. */ - } - else - { - /* Pass the packet. */ - xMicrelDevice.tx_buffers[ txHead ] = pxNetworkBuffer; - /* The descriptor is now owned by Micrel. */ - xMicrelDevice.tx_busy[ txHead ] = pdTRUE; - - /* Move the head pointer. */ - if( ++txHead == MICREL_TX_BUFFERS ) - { - txHead = 0; - } - xMicrelDevice.us_tx_head = txHead; - if( xEMACTaskHandle != NULL ) - { - xTaskNotifyGive( xEMACTaskHandle ); - } - - #if( ipconfigZERO_COPY_TX_DRIVER != 1 ) - #warning Please ipconfigZERO_COPY_TX_DRIVER as 1 - #endif - configASSERT( bReleaseAfterSend != pdFALSE ); - xResult = pdTRUE; - } - if( ( xResult == pdFALSE ) && ( bReleaseAfterSend != pdFALSE ) ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - return xResult; -} -/*-----------------------------------------------------------*/ - -/* This Micrel has numbered it's PHY registers in a different way. -Translate the register index. */ -static int ks8851_phy_reg( int reg ) -{ - switch (reg) { - case PHY_REG_00_BMCR: - return REG_PHY_CNTL; // P1MBCR; - case PHY_REG_01_BMSR: - return REG_PHY_STATUS; - case PHY_REG_02_PHYSID1: - return REG_PHY_ID_LOW; - case PHY_REG_03_PHYSID2: - return REG_PHY_ID_HIGH; - case PHY_REG_04_ADVERTISE: - return REG_PHY_AUTO_NEGOTIATION; - case PHY_REG_05_LPA: - return REG_PHY_REMOTE_CAPABILITY; - } - - return 0x0; -} -/*-----------------------------------------------------------*/ - -static inline unsigned long ulReadMDIO( unsigned uAddress ) -{ -uint16_t usPHYStatus; -int ks8851_reg = ks8851_phy_reg( uAddress ); - - if( ks8851_reg != 0 ) - { - usPHYStatus = ksz8851_reg_read( ks8851_reg ); - } - else - { - /* Other addresses not yet implemented. */ - usPHYStatus = 0; - } - return usPHYStatus; -} -/*-----------------------------------------------------------*/ - -static BaseType_t xGMACWaitLS( TickType_t xMaxTime ) -{ -TickType_t xStartTime = xTaskGetTickCount(); -TickType_t xEndTime; -BaseType_t xReturn; -const TickType_t xShortTime = pdMS_TO_TICKS( 100UL ); -const uint32_t ulHz_Per_MHz = 1000000UL; - - for( ;; ) - { - xEndTime = xTaskGetTickCount(); - - if( ( xEndTime - xStartTime ) > xMaxTime ) - { - /* Wated more than xMaxTime, return. */ - xReturn = pdFALSE; - break; - } - - /* Check the link status again. */ - ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); - - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - /* Link is up - return. */ - xReturn = pdTRUE; - break; - } - - /* Link is down - wait in the Blocked state for a short while (to allow - other tasks to execute) before checking again. */ - vTaskDelay( xShortTime ); - } - - FreeRTOS_printf( ( "xGMACWaitLS: %ld freq %lu Mz\n", - xReturn, - sysclk_get_cpu_hz() / ulHz_Per_MHz ) ); - - return xReturn; -} -/*-----------------------------------------------------------*/ - -static void vPioSetPinHigh(uint32_t ul_pin) -{ - Pio *p_pio = (Pio *)((uint32_t)PIOA + (PIO_DELTA * (ul_pin >> 5))); - // Value to be driven on the I/O line: 1. - p_pio->PIO_SODR = 1 << (ul_pin & 0x1F); -} - -/** - * \brief Handler for SPI interrupt. - */ -void SPI_Handler(void) -{ -BaseType_t xDoWakeup = pdFALSE; -BaseType_t xKSZTaskWoken = pdFALSE; -uint32_t ulCurrentSPIStatus; -uint32_t ulEnabledSPIStatus; - - ulCurrentSPIStatus = spi_read_status( KSZ8851SNL_SPI ); - ulEnabledSPIStatus = spi_read_interrupt_mask( KSZ8851SNL_SPI ); - ulCurrentSPIStatus &= ulEnabledSPIStatus; - spi_disable_interrupt( KSZ8851SNL_SPI, ulCurrentSPIStatus ); - - - switch( xMicrelDevice.ul_spi_pdc_status ) - { - case SPI_PDC_RX_START: - { - if( ( ulCurrentSPIStatus & SPI_SR_OVRES ) != 0 ) - { - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_RX_ERROR; - xDoWakeup = pdTRUE; - } - else - { - if( ( ulCurrentSPIStatus & SPI_SR_RXBUFF ) != 0 ) - { - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_RX_COMPLETE; - xDoWakeup = pdTRUE; - } - } - } - break; - - case SPI_PDC_TX_START: - { - /* Middle of TX. */ - if( ( ulCurrentSPIStatus & SPI_SR_OVRES ) != 0 ) - { - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_TX_ERROR; - xDoWakeup = pdTRUE; - } - else - { - if( ( ulCurrentSPIStatus & SPI_SR_ENDRX ) != 0 ) - { - /* Enable RX complete interrupt. */ - spi_enable_interrupt( KSZ8851SNL_SPI, SPI_IER_RXBUFF ); - } - /* End of TX. */ - if( ( ulCurrentSPIStatus & SPI_END_OF_TX ) != 0 ) - { - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_TX_COMPLETE; - xDoWakeup = pdTRUE; - } - } - } - break; - } /* switch( xMicrelDevice.ul_spi_pdc_status ) */ - - if( xDoWakeup != pdFALSE ) - { - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, ( BaseType_t * ) &xKSZTaskWoken ); - } - } - else - { - } - portEND_SWITCHING_ISR( xKSZTaskWoken ); -} -/*-----------------------------------------------------------*/ - -static void INTN_Handler(uint32_t id, uint32_t mask) -{ -BaseType_t xKSZTaskWoken = pdFALSE; - - if( ( id == INTN_ID ) && - ( mask == INTN_PIN_MSK ) ) - { - /* Clear the PIO interrupt flags. */ - pio_get_interrupt_status( INTN_PIO ); - - /* Set the INTN flag. */ - xMicrelDevice.ul_had_intn_interrupt++; - if( xEMACTaskHandle != NULL ) - { - vTaskNotifyGiveFromISR( xEMACTaskHandle, &( xKSZTaskWoken ) ); - } - } - portEND_SWITCHING_ISR( xKSZTaskWoken ); -} -/*-----------------------------------------------------------*/ - -/** - * \brief Populate the RX descriptor ring buffers with pbufs. - * - * \param p_ksz8851snl_dev Pointer to driver data structure. - */ -static void ksz8851snl_rx_populate_queue( void ) -{ - uint32_t ul_index = 0; - NetworkBufferDescriptor_t *pxNetworkBuffer; - - /* Set up the RX descriptors */ - for (ul_index = 0; ul_index < MICREL_RX_BUFFERS; ul_index++) { - if( xMicrelDevice.rx_buffers[ ul_index ] == NULL ) - { - /* Allocate a new NetworkBufferDescriptor_t with the maximum size. */ - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( ipconfigNETWORK_MTU + 36, 100 ); - if( pxNetworkBuffer == NULL ) - { - FreeRTOS_printf( ( "ksz8851snl_rx_populate_queue: NetworkBufferDescriptor_t allocation failure\n" ) ); - configASSERT( 1 == 2 ); - } - - /* Make sure lwIP is well configured so one NetworkBufferDescriptor_t can contain the maximum packet size. */ - //LWIP_ASSERT("ksz8851snl_rx_populate_queue: NetworkBufferDescriptor_t size too small!", pbuf_clen(pxNetworkBuffer) <= 1); - - /* Save NetworkBufferDescriptor_t pointer to be sent to lwIP upper layer. */ - xMicrelDevice.rx_buffers[ ul_index ] = pxNetworkBuffer; - /* Pass it to Micrel for reception. */ - xMicrelDevice.rx_ready[ ul_index ] = pdFALSE; - } - } -} - -unsigned tx_space, wait_tx_space, tx_status, fhr_status; -unsigned rx_debug = 0; -/** - * \brief Update Micrel state machine and perform required actions. - * - * \param netif the lwIP network interface structure for this ethernetif. - */ -static void ksz8851snl_update() -{ - uint16_t txmir = 0; - -/* Check for free PDC. */ - switch( xMicrelDevice.ul_spi_pdc_status ) - { - case SPI_PDC_TX_ERROR: - { - uint32_t ulValue; - // /* TX step11: end TX transfer. */ - gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - - vTaskDelay( 2 ); gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); - vTaskDelay( 1 ); gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - vTaskDelay( 1 ); - - /* Disable asynchronous transfer mode. */ - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; - - /* TX step12: disable TXQ write access. */ - ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); - - ulValue = ksz8851snl_reset_tx(); - - xMicrelDevice.tx_space = ksz8851_reg_read( REG_TX_MEM_INFO ) & TX_MEM_AVAILABLE_MASK; - - FreeRTOS_printf( ("SPI_PDC_TX_ERROR %02X\n", ulValue ) ); - } - break; - - case SPI_PDC_RX_ERROR: - { - uint32_t ulValue; - /* TX step11: end TX transfer. */ - gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - - vTaskDelay( 2 ); gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); - vTaskDelay( 1 ); gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - vTaskDelay( 1 ); - - /* Disable asynchronous transfer mode. */ - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; - - /* TX step12: disable TXQ write access. */ - ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); - - //ulValue = ksz8851snl_reset_rx(); - ulValue = ksz8851snl_reinit(); - - xGMACWaitLS( pdMS_TO_TICKS( 5000UL ) ); - - FreeRTOS_printf( ("SPI_PDC_RX_ERROR %02X\n", ulValue ) ); - } - break; - } - switch( xMicrelDevice.ul_spi_pdc_status ) - { - case SPI_PDC_IDLE: - { - int txTail = xMicrelDevice.us_tx_tail; - - /* - * ========================== Handle RX ========================== - */ - if( ( xMicrelDevice.ul_had_intn_interrupt != 0 ) || ( xMicrelDevice.us_pending_frame > 0 ) ) - { - int rxHead = xMicrelDevice.us_rx_head; - NetworkBufferDescriptor_t *pxNetworkBuffer; -#warning try - xMicrelDevice.ul_had_intn_interrupt = 0; - - if( xMicrelDevice.us_pending_frame == 0 ) - { - uint16_t int_status; - /* RX step1: read interrupt status for INT_RX flag. */ - int_status = ksz8851_reg_read( REG_INT_STATUS ); - - - /* RX step2: disable all interrupts. */ - ksz8851_reg_write( REG_INT_MASK, 0 ); - - /* RX step3: clear INT_RX flag. */ - ksz8851_reg_setbits( REG_INT_STATUS, INT_RX ); - - /* RX step4-5: check for received frames. */ - xMicrelDevice.us_pending_frame = ksz8851_reg_read(REG_RX_FRAME_CNT_THRES) >> 8; - if( xMicrelDevice.us_pending_frame == 0 ) - { - /* RX step24: enable INT_RX flag. */ - ksz8851_reg_write(REG_INT_MASK, INT_RX); - return; - } - } -#warning try - xMicrelDevice.ul_had_intn_interrupt = 0; - - /* Now xMicrelDevice.us_pending_frame != 0 */ - - /* Don't break Micrel state machine, wait for a free descriptor first! */ - if( xMicrelDevice.rx_ready[ rxHead ] != pdFALSE ) - { - FreeRTOS_printf( ( "ksz8851snl_update: out of free descriptor! [tail=%u head=%u]\n", - xMicrelDevice.us_rx_tail, rxHead ) ); - return; - } - pxNetworkBuffer = xMicrelDevice.rx_buffers[ rxHead ]; - - if( pxNetworkBuffer == NULL ) - { - ksz8851snl_rx_populate_queue(); - FreeRTOS_printf( ( "ksz8851snl_update: no buffer set [head=%u]\n", rxHead ) ); - return; - } - - /* RX step6: get RX packet status. */ - fhr_status = ksz8851_reg_read( REG_RX_FHR_STATUS ); - if( ( ( fhr_status & RX_VALID ) == 0 ) || ( ( fhr_status & RX_ERRORS ) != 0 ) ) - { - ksz8851_reg_setbits(REG_RXQ_CMD, RXQ_CMD_FREE_PACKET); - FreeRTOS_printf( ( "ksz8851snl_update: RX packet error!\n" ) ); - - /* RX step4-5: check for received frames. */ - xMicrelDevice.us_pending_frame = ksz8851_reg_read(REG_RX_FRAME_CNT_THRES) >> 8; - if( xMicrelDevice.us_pending_frame == 0 ) - { - /* RX step24: enable INT_RX flag. */ - ksz8851_reg_write(REG_INT_MASK, INT_RX); - } - ulISREvents |= EMAC_IF_ERR_EVENT; - } - else - { - size_t xLength; - /* RX step7: read frame length. */ - xLength = ksz8851_reg_read(REG_RX_FHR_BYTE_CNT) & RX_BYTE_CNT_MASK; - - /* RX step8: Drop packet if len is invalid or no descriptor available. */ - if( xLength == 0 ) - { - ksz8851_reg_setbits( REG_RXQ_CMD, RXQ_CMD_FREE_PACKET ); - FreeRTOS_printf( ( "ksz8851snl_update: RX bad len!\n" ) ); - ulISREvents |= EMAC_IF_ERR_EVENT; - } - else - { - size_t xReadLength = xLength; - - xMicrelDevice.ul_total_rx++; - /* RX step9: reset RX frame pointer. */ - ksz8851_reg_clrbits(REG_RX_ADDR_PTR, ADDR_PTR_MASK); - - /* RX step10: start RXQ read access. */ - ksz8851_reg_setbits(REG_RXQ_CMD, RXQ_START); - /* RX step11-17: start asynchronous FIFO read operation. */ - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_RX_START; - gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); - if( ( xReadLength & ( sizeof( size_t ) - 1 ) ) != 0 ) - { - xReadLength = ( xReadLength | ( sizeof( size_t ) - 1 ) ) + 1; - } - - /* Pass the buffer minus 2 bytes, see ksz8851snl.c: RXQ_TWOBYTE_OFFSET. */ - ksz8851_fifo_read( pxNetworkBuffer->pucEthernetBuffer - 2, xReadLength ); - /* Remove CRC and update buffer length. */ - xLength -= 4; - pxNetworkBuffer->xDataLength = xLength; - /* Wait for SPI interrupt to set status 'SPI_PDC_RX_COMPLETE'. */ - } - } - break; - } /* ul_had_intn_interrupt || us_pending_frame */ - /* - * ========================== Handle TX ========================== - */ - - /* Fetch next packet to be sent. */ - if( ( xMicrelDevice.tx_busy[ txTail ] != pdFALSE ) && - ( xMicrelDevice.us_pending_frame == 0 ) && - ( xMicrelDevice.ul_had_intn_interrupt == 0 ) ) - { - NetworkBufferDescriptor_t *pxNetworkBuffer = xMicrelDevice.tx_buffers[ txTail ]; - size_t xLength = pxNetworkBuffer->xDataLength; - int iIndex = xLength; - - xLength = 4 * ( ( xLength + 3 ) / 4 ); - while( iIndex < ( int ) xLength ) - { - pxNetworkBuffer->pucEthernetBuffer[ iIndex ] = '\0'; - iIndex++; - } - pxNetworkBuffer->xDataLength = xLength; - - /* TX step1: check if TXQ memory size is available for transmit. */ - txmir = ksz8851_reg_read( REG_TX_MEM_INFO ); - txmir = txmir & TX_MEM_AVAILABLE_MASK; - - if( txmir < ( xLength + 8 ) ) - { - if( wait_tx_space == pdFALSE ) - { - tx_status = ksz8851_reg_read( REG_TX_STATUS ); - fhr_status = ksz8851_reg_read( REG_RX_FHR_STATUS ); - wait_tx_space = pdTRUE; - } - //return; - rx_debug = 1; - tx_space = txmir; - } - else - { - tx_space = txmir; - - /* TX step2: disable all interrupts. */ - ksz8851_reg_write( REG_INT_MASK, 0 ); - - xMicrelDevice.tx_space -= xLength; - - /* TX step3: enable TXQ write access. */ - ksz8851_reg_setbits( REG_RXQ_CMD, RXQ_START ); - /* TX step4-8: perform FIFO write operation. */ - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_TX_START; - xMicrelDevice.tx_cur_buffer = pxNetworkBuffer; - /* Bring SPI SS low. */ - gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); - xMicrelDevice.ul_total_tx++; - - ksz8851_fifo_write( pxNetworkBuffer->pucEthernetBuffer, xLength, xLength ); - } - } - } - break; /* SPI_PDC_IDLE */ - - case SPI_PDC_RX_COMPLETE: - { - int rxHead = xMicrelDevice.us_rx_head; - /* RX step18-19: pad with dummy data to keep dword alignment. */ - /* Packet lengths will be rounded up to a multiple of "sizeof size_t". */ -// xLength = xMicrelDevice.rx_buffers[ rxHead ]->xDataLength & 3; -// if( xLength != 0 ) -// { -// ksz8851_fifo_dummy( 4 - xLength ); -// } - - /* RX step20: end RX transfer. */ - gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - - /* Disable asynchronous transfer mode. */ - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; - - /* RX step21: end RXQ read access. */ - ksz8851_reg_clrbits(REG_RXQ_CMD, RXQ_START); - - /* RX step22-23: update frame count to be read. */ - xMicrelDevice.us_pending_frame -= 1; - - /* RX step24: enable INT_RX flag if transfer complete. */ - if( xMicrelDevice.us_pending_frame == 0 ) - { - ksz8851_reg_write(REG_INT_MASK, INT_RX); - } - - /* Mark descriptor ready to be read. */ - xMicrelDevice.rx_ready[ rxHead ] = pdTRUE; - if( ++rxHead == MICREL_RX_BUFFERS ) - { - rxHead = 0; - } - xMicrelDevice.us_rx_head = rxHead; - if( rx_debug != 0 ) - { - uint32_t txmir; - rx_debug = 0; - txmir = ksz8851_reg_read( REG_TX_MEM_INFO ); - txmir = txmir & TX_MEM_AVAILABLE_MASK; - } - /* Tell prvEMACHandlerTask that RX packets are available. */ - ulISREvents |= EMAC_IF_RX_EVENT; - } /* case SPI_PDC_RX_COMPLETE */ - break; - - case SPI_PDC_TX_COMPLETE: - { - int txTail = xMicrelDevice.us_tx_tail; - NetworkBufferDescriptor_t *pxNetworkBuffer = xMicrelDevice.tx_buffers[ txTail ]; - - size_t xLength; - /* TX step9-10: pad with dummy data to keep dword alignment. */ - /* Not necessary: length is already a multiple of 4. */ - xLength = pxNetworkBuffer->xDataLength & 3; - if( xLength != 0 ) - { -// ksz8851_fifo_dummy( 4 - xLength ); - } - -// /* TX step11: end TX transfer. */ - gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - - /* Disable asynchronous transfer mode. */ - xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; - - /* TX step12: disable TXQ write access. */ - ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); - - xMicrelDevice.tx_space = ksz8851_reg_read( REG_TX_MEM_INFO ) & TX_MEM_AVAILABLE_MASK; - - /* TX step12.1: enqueue frame in TXQ. */ - ksz8851_reg_setbits( REG_TXQ_CMD, TXQ_ENQUEUE ); - - /* RX step13: enable INT_RX flag. */ -// ksz8851_reg_write( REG_INT_MASK, INT_RX ); - /* Buffer sent, free the corresponding buffer and mark descriptor as owned by software. */ - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - - xMicrelDevice.tx_buffers[ txTail ] = NULL; - xMicrelDevice.tx_busy[ txTail ] = pdFALSE; - if( ++txTail == MICREL_TX_BUFFERS ) - { - txTail = 0; - } - - xMicrelDevice.us_tx_tail = txTail; - /* Experiment. */ - //xMicrelDevice.ul_had_intn_interrupt = 1; - if( xTransmitHandle != NULL ) - { - xTaskNotifyGive( xTransmitHandle ); - } -#warning moved downward - /* RX step13: enable INT_RX flag. */ - ksz8851_reg_write( REG_INT_MASK, INT_RX ); - /* Prevent the EMAC task from sleeping a single time. */ - ulISREvents |= EMAC_IF_TX_EVENT; - } /* case SPI_PDC_TX_COMPLETE */ - break; - } /* switch( xMicrelDevice.ul_spi_pdc_status ) */ -} - -/** - * \brief Set up the RX descriptor ring buffers. - * - * This function sets up the descriptor list used for RX packets. - * - */ -static void ksz8851snl_rx_init() -{ - uint32_t ul_index = 0; - - /* Init pointer index. */ - xMicrelDevice.us_rx_head = 0; - xMicrelDevice.us_rx_tail = 0; - - /* Set up the RX descriptors. */ - for (ul_index = 0; ul_index < MICREL_RX_BUFFERS; ul_index++) { - xMicrelDevice.rx_buffers[ul_index] = NULL; - xMicrelDevice.rx_ready[ul_index] = pdFALSE; - } - - /* Build RX buffer and descriptors. */ - ksz8851snl_rx_populate_queue(); -} - -/** - * \brief Set up the TX descriptor ring buffers. - * - * This function sets up the descriptor list used for TX packets. - * - */ -static void ksz8851snl_tx_init() -{ - uint32_t ul_index = 0; - - /* Init TX index pointer. */ - xMicrelDevice.us_tx_head = 0; - xMicrelDevice.us_tx_tail = 0; - - /* Set up the TX descriptors */ - for( ul_index = 0; ul_index < MICREL_TX_BUFFERS; ul_index++ ) - { - xMicrelDevice.tx_busy[ul_index] = pdFALSE; - } - xMicrelDevice.tx_space = 6144; -} - -/** - * \brief Initialize ksz8851snl ethernet controller. - * - * \note Called from ethernetif_init(). - * - * \param netif the lwIP network interface structure for this ethernetif. - */ -static void ksz8851snl_low_level_init( void ) -{ - ksz8851snl_rx_init(); - ksz8851snl_tx_init(); - - /* Enable NVIC interrupts. */ - NVIC_SetPriority(SPI_IRQn, INT_PRIORITY_SPI); - NVIC_EnableIRQ(SPI_IRQn); - - /* Initialize SPI link. */ - if( ksz8851snl_init() < 0 ) - { - FreeRTOS_printf( ( "ksz8851snl_low_level_init: failed to initialize the Micrel driver!\n" ) ); - configASSERT(0 == 1); - } - memset( xMicrelDevice.pusHashTable, 255, sizeof( xMicrelDevice.pusHashTable ) ); - ksz8851_reg_write( REG_MAC_HASH_0, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 0 ] ) ); - ksz8851_reg_write( REG_MAC_HASH_2, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 1 ] ) ); - ksz8851_reg_write( REG_MAC_HASH_4, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 2 ] ) ); - ksz8851_reg_write( REG_MAC_HASH_6, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 3 ] ) ); - - /* Initialize interrupt line INTN. */ - configure_intn( INTN_Handler ); -} - -/** - * \brief Use pre-allocated pbuf as DMA source and return the incoming packet. - * - * \param netif the lwIP network interface structure for this ethernetif. - * - * \return a pbuf filled with the received packet (including MAC header). - * 0 on memory error. - */ -static NetworkBufferDescriptor_t *ksz8851snl_low_level_input( void ) -{ -NetworkBufferDescriptor_t *pxNetworkBuffer = NULL; -int rxTail = xMicrelDevice.us_rx_tail; - - /* Check that descriptor is owned by software (ie packet received). */ - if( xMicrelDevice.rx_ready[ rxTail ] != pdFALSE ) - { - - /* Fetch pre-allocated buffer */ - pxNetworkBuffer = xMicrelDevice.rx_buffers[ rxTail ]; - - /* Remove this pbuf from its descriptor. */ - xMicrelDevice.rx_buffers[ rxTail ] = NULL; - - /* Clears rx_ready and sets rx_buffers. */ - ksz8851snl_rx_populate_queue(); - - if( ++rxTail == MICREL_RX_BUFFERS ) - { - rxTail = 0; - } - xMicrelDevice.us_rx_tail = rxTail; - } - - return pxNetworkBuffer; -} -/*-----------------------------------------------------------*/ - -static uint32_t prvEMACRxPoll( void ) -{ -NetworkBufferDescriptor_t *pxNetworkBuffer; -IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; -uint32_t ulReturnValue = 0; - - for( ;; ) - { - /* Only for logging. */ - int rxTail = xMicrelDevice.us_rx_tail; - EthernetHeader_t *pxEthernetHeader; - - pxNetworkBuffer = ksz8851snl_low_level_input(); - - if( pxNetworkBuffer == NULL ) - { - break; - } - pxEthernetHeader = ( EthernetHeader_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); - - if( ( pxEthernetHeader->usFrameType != ipIPv4_FRAME_TYPE ) && - ( pxEthernetHeader->usFrameType != ipARP_FRAME_TYPE ) ) - { - FreeRTOS_printf( ( "Frame type %02X received\n", pxEthernetHeader->usFrameType ) ); - } - ulReturnValue++; - - xRxEvent.pvData = ( void * )pxNetworkBuffer; - /* Send the descriptor to the IP task for processing. */ - if( xSendEventStructToIPTask( &xRxEvent, 100UL ) != pdTRUE ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - iptraceETHERNET_RX_EVENT_LOST(); - FreeRTOS_printf( ( "prvEMACRxPoll: Can not queue return packet!\n" ) ); - } - } - - return ulReturnValue; -} -/*-----------------------------------------------------------*/ - -static void prvEMACHandlerTask( void *pvParameters ) -{ -TimeOut_t xPhyTime; -TickType_t xPhyRemTime; -TickType_t xLoggingTime; -UBaseType_t uxLastMinBufferCount = 0; -UBaseType_t uxCurrentCount; -BaseType_t xResult = 0; -uint32_t xStatus; -const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( EMAC_MAX_BLOCK_TIME_MS ); -#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - UBaseType_t uxLastMinQueueSpace = 0; -#endif - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - configASSERT( xEMACTaskHandle ); - - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - xLoggingTime = xTaskGetTickCount(); - - for( ;; ) - { - uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); - if( uxLastMinBufferCount != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinBufferCount = uxCurrentCount; - FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", - uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); - } - - #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) - { - uxCurrentCount = uxGetMinimumIPQueueSpace(); - if( uxLastMinQueueSpace != uxCurrentCount ) - { - /* The logging produced below may be helpful - while tuning +TCP: see how many buffers are in use. */ - uxLastMinQueueSpace = uxCurrentCount; - FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); - } - } - #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ - - /* Run the state-machine of the ksz8851 driver. */ - ksz8851snl_update(); - - if( ( ulISREvents & EMAC_IF_ALL_EVENT ) == 0 ) - { - /* No events to process now, wait for the next. */ - ulTaskNotifyTake( pdTRUE, ulMaxBlockTime ); - } - - if( ( xTaskGetTickCount() - xLoggingTime ) > 10000 ) - { - xLoggingTime += 10000; - FreeRTOS_printf( ( "Now Tx/Rx %7d /%7d\n", - xMicrelDevice.ul_total_tx, xMicrelDevice.ul_total_rx ) ); - } - - if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) - { - ulISREvents &= ~EMAC_IF_RX_EVENT; - - /* Wait for the EMAC interrupt to indicate that another packet has been - received. */ - xResult = prvEMACRxPoll(); - } - - if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) - { - /* Future extension: code to release TX buffers if zero-copy is used. */ - ulISREvents &= ~EMAC_IF_TX_EVENT; - } - - if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) - { - /* Future extension: logging about errors that occurred. */ - ulISREvents &= ~EMAC_IF_ERR_EVENT; - } - - if( xResult > 0 ) - { - /* As long as packets are being received, assume that - the Link Status is high. */ - ulPHYLinkStatus |= BMSR_LINK_STATUS; - /* A packet was received. No need to check for the PHY status now, - but set a timer to check it later on. */ - vTaskSetTimeOutState( &xPhyTime ); - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - xResult = 0; - } - else if( ( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) && - ( xMicrelDevice.ul_spi_pdc_status == SPI_PDC_IDLE ) ) - { - /* Check the link status again. */ - xStatus = ulReadMDIO( PHY_REG_01_BMSR ); - - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != ( xStatus & BMSR_LINK_STATUS ) ) - { - ulPHYLinkStatus = xStatus; - FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ); - } - - vTaskSetTimeOutState( &xPhyTime ); - if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); - } - else - { - xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); - } - } - } -} -/*-----------------------------------------------------------*/ +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* Standard includes. */ +#include +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +#include "sam4e_xplained_pro.h" +#include "hr_gettime.h" +#include "conf_eth.h" +#include "ksz8851snl.h" +#include "ksz8851snl_reg.h" + +/* Some files from the Atmel Software Framework */ +#include +#include +#include + +/* + Sending a packet: + + 1) Called by UP-task, add buffer to the TX-list: + xNetworkInterfaceOutput() + tx_buffers[ us_tx_head ] = pxNetworkBuffer; + tx_busy[ us_tx_head ] = pdTRUE; + us_tx_head++; + + 2) Called by EMAC-Task: start SPI transfer + ksz8851snl_update() + if( ul_spi_pdc_status == SPI_PDC_IDLE ) + { + if( ( tx_busy[ us_tx_tail ] != pdFALSE ) && + ( us_pending_frame == 0 ) && + ( ul_had_intn_interrupt == 0 ) ) + { + // disable all interrupts. + ksz8851_reg_write( REG_INT_MASK, 0 ); + Bring KSZ8851SNL_CSN_GPIO low + ksz8851_fifo_write( pxNetworkBuffer->pucEthernetBuffer, xLength, xLength ); + ul_spi_pdc_status = SPI_PDC_TX_START; + tx_cur_buffer = pxNetworkBuffer; + } + } + 3) Wait for SPI RXBUFF interrupt + SPI_Handler() + if( ul_spi_pdc_status == SPI_PDC_TX_START ) + { + if( SPI_Status & SPI_SR_RXBUFF ) + { + ul_spi_pdc_status = SPI_PDC_TX_COMPLETE; + } + } + + 4) Called by EMAC-Task: finish SPI transfer + ksz8851snl_update() + if( ul_spi_pdc_status == SPI_PDC_TX_COMPLETE ) + { + ul_spi_pdc_status = SPI_PDC_IDLE; + Bring KSZ8851SNL_CSN_GPIO high + // TX step12: disable TXQ write access. + ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); + // TX step12.1: enqueue frame in TXQ. + ksz8851_reg_setbits( REG_TXQ_CMD, TXQ_ENQUEUE ); + + // RX step13: enable INT_RX flag. + ksz8851_reg_write( REG_INT_MASK, INT_RX ); + + // Buffer sent, free the corresponding buffer and mark descriptor as owned by software. + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + + tx_buffers[ us_tx_tail ] = NULL; + tx_busy[ us_tx_tail ] = pdFALSE; + us_tx_tail++ + } + + Receiving a packet: + + 1) Wait for a INTN interrupt + INTN_Handler() + ul_had_intn_interrupt = 1 + vTaskNotifyGiveFromISR(); // Wake up the EMAC task + + 2) Called by EMAC-Task: check for new fragments and start SPI transfer + ksz8851snl_update() + if( ul_spi_pdc_status == SPI_PDC_IDLE ) + { + if( ( ul_had_intn_interrupt != 0 ) || ( us_pending_frame > 0 ) ) + { + if( us_pending_frame == 0 ) + { + us_pending_frame = ksz8851_reg_read(REG_RX_FRAME_CNT_THRES) >> 8; + if( us_pending_frame == 0 ) + { + break; + } + } + // RX step2: disable all interrupts. + ksz8851_reg_write( REG_INT_MASK, 0 ); + Check if there is a valid packet: REG_RX_FHR_STATUS + Read the length of the next fragment: REG_RX_FHR_BYTE_CNT + ul_spi_pdc_status = SPI_PDC_RX_START; + gpio_set_pin_low(KSZ8851SNL_CSN_GPIO); + // Start SPI data transfer + ksz8851_fifo_read( pxNetworkBuffer->pucEthernetBuffer, xReadLength ); + } + } + + 3) Wait for SPI RXBUFF interrupt + SPI_Handler() + if( ul_spi_pdc_status == SPI_PDC_RX_START: + { + if( ( ulCurrentSPIStatus & SPI_SR_RXBUFF ) != 0 ) + { + // Transfer complete, disable SPI RXBUFF interrupt. + spi_disable_interrupt( KSZ8851SNL_SPI, SPI_IDR_RXBUFF ); + + ul_spi_pdc_status = SPI_PDC_RX_COMPLETE; + } + } + } + + 4) Finish SPI transfer + ksz8851snl_update() + if( ul_spi_pdc_status == SPI_PDC_RX_COMPLETE ) + { + ul_spi_pdc_status = SPI_PDC_IDLE; + Bring KSZ8851SNL_CSN_GPIO high + // RX step21: end RXQ read access. + ksz8851_reg_clrbits(REG_RXQ_CMD, RXQ_START); + // RX step22-23: update frame count to be read. + us_pending_frame-- + // RX step24: enable INT_RX flag if transfer complete. + if( us_pending_frame == 0 ) + { + // Allow more RX interrupts. + ksz8851_reg_write( REG_INT_MASK, INT_RX ); + } + + // Mark descriptor ready to be read. + rx_ready[ rxHead ] = pdTRUE; + rxHead++ + } +*/ + +#define PHY_REG_00_BMCR 0x00 // Basic mode control register +#define PHY_REG_01_BMSR 0x01 // Basic mode status register +#define PHY_REG_02_PHYSID1 0x02 // PHYS ID 1 +#define PHY_REG_03_PHYSID2 0x03 // PHYS ID 2 +#define PHY_REG_04_ADVERTISE 0x04 // Advertisement control reg +#define PHY_REG_05_LPA 0x05 // Link partner ability reg +#define PHY_REG_06_ANER 0x06 // 6 RW Auto-Negotiation Expansion Register +#define PHY_REG_07_ANNPTR 0x07 // 7 RW Auto-Negotiation Next Page TX +#define PHY_REG_08_RESERVED0 0x08 // 0x08..0x0Fh 8-15 RW RESERVED + +#define BMSR_LINK_STATUS 0x0004 //!< Link status + +#ifndef PHY_LS_HIGH_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still high after 15 seconds of not + receiving packets. */ + #define PHY_LS_HIGH_CHECK_TIME_MS 15000 +#endif + +#ifndef PHY_LS_LOW_CHECK_TIME_MS + /* Check if the LinkSStatus in the PHY is still low every second. */ + #define PHY_LS_LOW_CHECK_TIME_MS 1000 +#endif + +/* Interrupt events to process. Currently only the Rx event is processed +although code for other events is included to allow for possible future +expansion. */ +#define EMAC_IF_RX_EVENT 1UL +#define EMAC_IF_TX_EVENT 2UL +#define EMAC_IF_ERR_EVENT 4UL +#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) + +#define ETHERNET_CONF_PHY_ADDR BOARD_GMAC_PHY_ADDR + +#ifdef ipconfigHAS_TX_CRC_OFFLOADING + #undef ipconfigHAS_TX_CRC_OFFLOADING +#endif +/* Override this define because the KSZ8851 is programmed to set all outgoing CRC's */ +#define ipconfigHAS_TX_CRC_OFFLOADING 1 + +#ifndef EMAC_MAX_BLOCK_TIME_MS + #define EMAC_MAX_BLOCK_TIME_MS 100ul +#endif + +/* Default the size of the stack used by the EMAC deferred handler task to 4x +the size of the stack used by the idle task - but allow this to be overridden in +FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ +#ifndef configEMAC_TASK_STACK_SIZE + #define configEMAC_TASK_STACK_SIZE ( 6 * configMINIMAL_STACK_SIZE ) +#endif + +#define SPI_PDC_IDLE 0 +#define SPI_PDC_RX_START 1 +#define SPI_PDC_TX_ERROR 2 +#define SPI_PDC_RX_COMPLETE 3 +#define SPI_PDC_TX_START 4 +#define SPI_PDC_RX_ERROR 5 +#define SPI_PDC_TX_COMPLETE 6 + +/** + * ksz8851snl driver structure. + */ +typedef struct { + /** Set to 1 when owner is software (ready to read), 0 for Micrel. */ + uint32_t rx_ready[MICREL_RX_BUFFERS]; + /** Set to 1 when owner is Micrel, 0 for software. */ + uint32_t tx_busy[MICREL_TX_BUFFERS]; + /** RX NetworkBufferDescriptor_t pointer list */ + NetworkBufferDescriptor_t *rx_buffers[MICREL_RX_BUFFERS]; + /** TX NetworkBufferDescriptor_t pointer list */ + NetworkBufferDescriptor_t *tx_buffers[MICREL_TX_BUFFERS]; + NetworkBufferDescriptor_t *tx_cur_buffer; + + /** Circular buffer head pointer for packet received. */ + uint32_t us_rx_head; + /** Circular buffer tail pointer for packet to be read. */ + uint32_t us_rx_tail; + /** Circular buffer head pointer by upper layer (buffer to be sent). */ + uint32_t us_tx_head; + /** Circular buffer tail pointer incremented by handlers (buffer sent). */ + uint32_t us_tx_tail; + + uint32_t ul_total_tx; + uint32_t ul_total_rx; + uint32_t tx_space; + + /** Still experimental: hash table to allow certain multicast addresses. */ + uint16_t pusHashTable[ 4 ]; + + /* ul_spi_pdc_status has "SPI_PDC_xxx" values. */ + volatile uint32_t ul_spi_pdc_status; + + /* ul_had_intn_interrupt becomes true within the INTN interrupt. */ + volatile uint32_t ul_had_intn_interrupt; + + uint16_t us_pending_frame; +} xKSZ8851_Device_t; + +/* SPI PDC register base. +Declared in ASF\sam\components\ksz8851snl\ksz8851snl.c */ +extern Pdc *g_p_spi_pdc; + +/* Temporary buffer for PDC reception. +declared in ASF\sam\components\ksz8851snl\ksz8851snl.c */ +extern uint8_t tmpbuf[1536]; + +COMPILER_ALIGNED(8) +static xKSZ8851_Device_t xMicrelDevice; + +static TaskHandle_t xTransmitHandle; + +/*-----------------------------------------------------------*/ + +/* + * Wait a fixed time for the link status to indicate the network is up. + */ +static BaseType_t xGMACWaitLS( TickType_t xMaxTime ); + +/* + * A deferred interrupt handler task that processes GMAC interrupts. + */ +static void prvEMACHandlerTask( void *pvParameters ); + +/* + * Try to obtain an Rx packet from the hardware. + */ +static uint32_t prvEMACRxPoll( void ); + +static inline unsigned long ulReadMDIO( unsigned uAddress ); + +static void ksz8851snl_low_level_init( void ); + +static NetworkBufferDescriptor_t *ksz8851snl_low_level_input( void ); + +/*-----------------------------------------------------------*/ + +/* Bit map of outstanding ETH interrupt events for processing. Currently only +the Rx interrupt is handled, although code is included for other events to +enable future expansion. */ +static volatile uint32_t ulISREvents; + +/* A copy of PHY register 1: 'PHY_REG_01_BMSR' */ +static uint32_t ulPHYLinkStatus = 0; +static volatile BaseType_t xGMACSwitchRequired; + +static void ksz8851snl_update( void ); + +static void ksz8851snl_rx_init( void ); + +static void ksz8851snl_tx_init( void ); + +/* Holds the handle of the task used as a deferred interrupt processor. The +handle is used so direct notifications can be sent to the task for all EMAC/DMA +related interrupts. */ +TaskHandle_t xEMACTaskHandle = NULL; + + +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceInitialise( void ) +{ +const TickType_t x5_Seconds = 5000UL; + + if( xEMACTaskHandle == NULL ) + { + ksz8851snl_low_level_init(); + + /* Wait at most 5 seconds for a Link Status in the PHY. */ + xGMACWaitLS( pdMS_TO_TICKS( x5_Seconds ) ); + + /* The handler task is created at the highest possible priority to + ensure the interrupt handler can return directly to it. */ + xTaskCreate( prvEMACHandlerTask, "KSZ8851", configEMAC_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, &xEMACTaskHandle ); + configASSERT( xEMACTaskHandle ); + } + + /* When returning non-zero, the stack will become active and + start DHCP (in configured) */ + ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); + + return ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0; +} +/*-----------------------------------------------------------*/ + +BaseType_t xGetPhyLinkStatus( void ) +{ +BaseType_t xResult; + + /* This function returns true if the Link Status in the PHY is high. */ + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xResult = pdTRUE; + } + else + { + xResult = pdFALSE; + } + + return xResult; +} +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t bReleaseAfterSend ) +{ +BaseType_t xResult = pdFALSE; +int txHead = xMicrelDevice.us_tx_head; + + /* Make sure the next descriptor is free. */ + if( xMicrelDevice.tx_busy[ txHead ] != pdFALSE ) + { + /* All TX buffers busy. */ + } + else if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) == 0 ) + { + /* Output: LS low. */ + } + else + { + /* Pass the packet. */ + xMicrelDevice.tx_buffers[ txHead ] = pxNetworkBuffer; + /* The descriptor is now owned by Micrel. */ + xMicrelDevice.tx_busy[ txHead ] = pdTRUE; + + /* Move the head pointer. */ + if( ++txHead == MICREL_TX_BUFFERS ) + { + txHead = 0; + } + xMicrelDevice.us_tx_head = txHead; + if( xEMACTaskHandle != NULL ) + { + xTaskNotifyGive( xEMACTaskHandle ); + } + + #if( ipconfigZERO_COPY_TX_DRIVER != 1 ) + #warning Please ipconfigZERO_COPY_TX_DRIVER as 1 + #endif + configASSERT( bReleaseAfterSend != pdFALSE ); + xResult = pdTRUE; + } + if( ( xResult == pdFALSE ) && ( bReleaseAfterSend != pdFALSE ) ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + return xResult; +} +/*-----------------------------------------------------------*/ + +/* This Micrel has numbered it's PHY registers in a different way. +Translate the register index. */ +static int ks8851_phy_reg( int reg ) +{ + switch (reg) { + case PHY_REG_00_BMCR: + return REG_PHY_CNTL; // P1MBCR; + case PHY_REG_01_BMSR: + return REG_PHY_STATUS; + case PHY_REG_02_PHYSID1: + return REG_PHY_ID_LOW; + case PHY_REG_03_PHYSID2: + return REG_PHY_ID_HIGH; + case PHY_REG_04_ADVERTISE: + return REG_PHY_AUTO_NEGOTIATION; + case PHY_REG_05_LPA: + return REG_PHY_REMOTE_CAPABILITY; + } + + return 0x0; +} +/*-----------------------------------------------------------*/ + +static inline unsigned long ulReadMDIO( unsigned uAddress ) +{ +uint16_t usPHYStatus; +int ks8851_reg = ks8851_phy_reg( uAddress ); + + if( ks8851_reg != 0 ) + { + usPHYStatus = ksz8851_reg_read( ks8851_reg ); + } + else + { + /* Other addresses not yet implemented. */ + usPHYStatus = 0; + } + return usPHYStatus; +} +/*-----------------------------------------------------------*/ + +static BaseType_t xGMACWaitLS( TickType_t xMaxTime ) +{ +TickType_t xStartTime = xTaskGetTickCount(); +TickType_t xEndTime; +BaseType_t xReturn; +const TickType_t xShortTime = pdMS_TO_TICKS( 100UL ); +const uint32_t ulHz_Per_MHz = 1000000UL; + + for( ;; ) + { + xEndTime = xTaskGetTickCount(); + + if( ( xEndTime - xStartTime ) > xMaxTime ) + { + /* Wated more than xMaxTime, return. */ + xReturn = pdFALSE; + break; + } + + /* Check the link status again. */ + ulPHYLinkStatus = ulReadMDIO( PHY_REG_01_BMSR ); + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + /* Link is up - return. */ + xReturn = pdTRUE; + break; + } + + /* Link is down - wait in the Blocked state for a short while (to allow + other tasks to execute) before checking again. */ + vTaskDelay( xShortTime ); + } + + FreeRTOS_printf( ( "xGMACWaitLS: %ld freq %lu Mz\n", + xReturn, + sysclk_get_cpu_hz() / ulHz_Per_MHz ) ); + + return xReturn; +} +/*-----------------------------------------------------------*/ + +static void vPioSetPinHigh(uint32_t ul_pin) +{ + Pio *p_pio = (Pio *)((uint32_t)PIOA + (PIO_DELTA * (ul_pin >> 5))); + // Value to be driven on the I/O line: 1. + p_pio->PIO_SODR = 1 << (ul_pin & 0x1F); +} + +/** + * \brief Handler for SPI interrupt. + */ +void SPI_Handler(void) +{ +BaseType_t xDoWakeup = pdFALSE; +BaseType_t xKSZTaskWoken = pdFALSE; +uint32_t ulCurrentSPIStatus; +uint32_t ulEnabledSPIStatus; + + ulCurrentSPIStatus = spi_read_status( KSZ8851SNL_SPI ); + ulEnabledSPIStatus = spi_read_interrupt_mask( KSZ8851SNL_SPI ); + ulCurrentSPIStatus &= ulEnabledSPIStatus; + spi_disable_interrupt( KSZ8851SNL_SPI, ulCurrentSPIStatus ); + + + switch( xMicrelDevice.ul_spi_pdc_status ) + { + case SPI_PDC_RX_START: + { + if( ( ulCurrentSPIStatus & SPI_SR_OVRES ) != 0 ) + { + pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_RX_ERROR; + xDoWakeup = pdTRUE; + } + else + { + if( ( ulCurrentSPIStatus & SPI_SR_RXBUFF ) != 0 ) + { + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_RX_COMPLETE; + xDoWakeup = pdTRUE; + } + } + } + break; + + case SPI_PDC_TX_START: + { + /* Middle of TX. */ + if( ( ulCurrentSPIStatus & SPI_SR_OVRES ) != 0 ) + { + pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_TX_ERROR; + xDoWakeup = pdTRUE; + } + else + { + if( ( ulCurrentSPIStatus & SPI_SR_ENDRX ) != 0 ) + { + /* Enable RX complete interrupt. */ + spi_enable_interrupt( KSZ8851SNL_SPI, SPI_IER_RXBUFF ); + } + /* End of TX. */ + if( ( ulCurrentSPIStatus & SPI_END_OF_TX ) != 0 ) + { + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_TX_COMPLETE; + xDoWakeup = pdTRUE; + } + } + } + break; + } /* switch( xMicrelDevice.ul_spi_pdc_status ) */ + + if( xDoWakeup != pdFALSE ) + { + if( xEMACTaskHandle != NULL ) + { + vTaskNotifyGiveFromISR( xEMACTaskHandle, ( BaseType_t * ) &xKSZTaskWoken ); + } + } + else + { + } + portEND_SWITCHING_ISR( xKSZTaskWoken ); +} +/*-----------------------------------------------------------*/ + +static void INTN_Handler(uint32_t id, uint32_t mask) +{ +BaseType_t xKSZTaskWoken = pdFALSE; + + if( ( id == INTN_ID ) && + ( mask == INTN_PIN_MSK ) ) + { + /* Clear the PIO interrupt flags. */ + pio_get_interrupt_status( INTN_PIO ); + + /* Set the INTN flag. */ + xMicrelDevice.ul_had_intn_interrupt++; + if( xEMACTaskHandle != NULL ) + { + vTaskNotifyGiveFromISR( xEMACTaskHandle, &( xKSZTaskWoken ) ); + } + } + portEND_SWITCHING_ISR( xKSZTaskWoken ); +} +/*-----------------------------------------------------------*/ + +/** + * \brief Populate the RX descriptor ring buffers with pbufs. + * + * \param p_ksz8851snl_dev Pointer to driver data structure. + */ +static void ksz8851snl_rx_populate_queue( void ) +{ + uint32_t ul_index = 0; + NetworkBufferDescriptor_t *pxNetworkBuffer; + + /* Set up the RX descriptors */ + for (ul_index = 0; ul_index < MICREL_RX_BUFFERS; ul_index++) { + if( xMicrelDevice.rx_buffers[ ul_index ] == NULL ) + { + /* Allocate a new NetworkBufferDescriptor_t with the maximum size. */ + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( ipconfigNETWORK_MTU + 36, 100 ); + if( pxNetworkBuffer == NULL ) + { + FreeRTOS_printf( ( "ksz8851snl_rx_populate_queue: NetworkBufferDescriptor_t allocation failure\n" ) ); + configASSERT( 1 == 2 ); + } + + /* Make sure lwIP is well configured so one NetworkBufferDescriptor_t can contain the maximum packet size. */ + //LWIP_ASSERT("ksz8851snl_rx_populate_queue: NetworkBufferDescriptor_t size too small!", pbuf_clen(pxNetworkBuffer) <= 1); + + /* Save NetworkBufferDescriptor_t pointer to be sent to lwIP upper layer. */ + xMicrelDevice.rx_buffers[ ul_index ] = pxNetworkBuffer; + /* Pass it to Micrel for reception. */ + xMicrelDevice.rx_ready[ ul_index ] = pdFALSE; + } + } +} + +unsigned tx_space, wait_tx_space, tx_status, fhr_status; +unsigned rx_debug = 0; +/** + * \brief Update Micrel state machine and perform required actions. + * + * \param netif the lwIP network interface structure for this ethernetif. + */ +static void ksz8851snl_update() +{ + uint16_t txmir = 0; + +/* Check for free PDC. */ + switch( xMicrelDevice.ul_spi_pdc_status ) + { + case SPI_PDC_TX_ERROR: + { + uint32_t ulValue; + // /* TX step11: end TX transfer. */ + gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); + + vTaskDelay( 2 ); gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); + vTaskDelay( 1 ); gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); + vTaskDelay( 1 ); + + /* Disable asynchronous transfer mode. */ + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; + + /* TX step12: disable TXQ write access. */ + ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); + + ulValue = ksz8851snl_reset_tx(); + + xMicrelDevice.tx_space = ksz8851_reg_read( REG_TX_MEM_INFO ) & TX_MEM_AVAILABLE_MASK; + + FreeRTOS_printf( ("SPI_PDC_TX_ERROR %02X\n", ulValue ) ); + } + break; + + case SPI_PDC_RX_ERROR: + { + uint32_t ulValue; + /* TX step11: end TX transfer. */ + gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); + + vTaskDelay( 2 ); gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); + vTaskDelay( 1 ); gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); + vTaskDelay( 1 ); + + /* Disable asynchronous transfer mode. */ + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; + + /* TX step12: disable TXQ write access. */ + ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); + + //ulValue = ksz8851snl_reset_rx(); + ulValue = ksz8851snl_reinit(); + + xGMACWaitLS( pdMS_TO_TICKS( 5000UL ) ); + + FreeRTOS_printf( ("SPI_PDC_RX_ERROR %02X\n", ulValue ) ); + } + break; + } + switch( xMicrelDevice.ul_spi_pdc_status ) + { + case SPI_PDC_IDLE: + { + int txTail = xMicrelDevice.us_tx_tail; + + /* + * ========================== Handle RX ========================== + */ + if( ( xMicrelDevice.ul_had_intn_interrupt != 0 ) || ( xMicrelDevice.us_pending_frame > 0 ) ) + { + int rxHead = xMicrelDevice.us_rx_head; + NetworkBufferDescriptor_t *pxNetworkBuffer; +#warning try + xMicrelDevice.ul_had_intn_interrupt = 0; + + if( xMicrelDevice.us_pending_frame == 0 ) + { + uint16_t int_status; + /* RX step1: read interrupt status for INT_RX flag. */ + int_status = ksz8851_reg_read( REG_INT_STATUS ); + + + /* RX step2: disable all interrupts. */ + ksz8851_reg_write( REG_INT_MASK, 0 ); + + /* RX step3: clear INT_RX flag. */ + ksz8851_reg_setbits( REG_INT_STATUS, INT_RX ); + + /* RX step4-5: check for received frames. */ + xMicrelDevice.us_pending_frame = ksz8851_reg_read(REG_RX_FRAME_CNT_THRES) >> 8; + if( xMicrelDevice.us_pending_frame == 0 ) + { + /* RX step24: enable INT_RX flag. */ + ksz8851_reg_write(REG_INT_MASK, INT_RX); + return; + } + } +#warning try + xMicrelDevice.ul_had_intn_interrupt = 0; + + /* Now xMicrelDevice.us_pending_frame != 0 */ + + /* Don't break Micrel state machine, wait for a free descriptor first! */ + if( xMicrelDevice.rx_ready[ rxHead ] != pdFALSE ) + { + FreeRTOS_printf( ( "ksz8851snl_update: out of free descriptor! [tail=%u head=%u]\n", + xMicrelDevice.us_rx_tail, rxHead ) ); + return; + } + pxNetworkBuffer = xMicrelDevice.rx_buffers[ rxHead ]; + + if( pxNetworkBuffer == NULL ) + { + ksz8851snl_rx_populate_queue(); + FreeRTOS_printf( ( "ksz8851snl_update: no buffer set [head=%u]\n", rxHead ) ); + return; + } + + /* RX step6: get RX packet status. */ + fhr_status = ksz8851_reg_read( REG_RX_FHR_STATUS ); + if( ( ( fhr_status & RX_VALID ) == 0 ) || ( ( fhr_status & RX_ERRORS ) != 0 ) ) + { + ksz8851_reg_setbits(REG_RXQ_CMD, RXQ_CMD_FREE_PACKET); + FreeRTOS_printf( ( "ksz8851snl_update: RX packet error!\n" ) ); + + /* RX step4-5: check for received frames. */ + xMicrelDevice.us_pending_frame = ksz8851_reg_read(REG_RX_FRAME_CNT_THRES) >> 8; + if( xMicrelDevice.us_pending_frame == 0 ) + { + /* RX step24: enable INT_RX flag. */ + ksz8851_reg_write(REG_INT_MASK, INT_RX); + } + ulISREvents |= EMAC_IF_ERR_EVENT; + } + else + { + size_t xLength; + /* RX step7: read frame length. */ + xLength = ksz8851_reg_read(REG_RX_FHR_BYTE_CNT) & RX_BYTE_CNT_MASK; + + /* RX step8: Drop packet if len is invalid or no descriptor available. */ + if( xLength == 0 ) + { + ksz8851_reg_setbits( REG_RXQ_CMD, RXQ_CMD_FREE_PACKET ); + FreeRTOS_printf( ( "ksz8851snl_update: RX bad len!\n" ) ); + ulISREvents |= EMAC_IF_ERR_EVENT; + } + else + { + size_t xReadLength = xLength; + + xMicrelDevice.ul_total_rx++; + /* RX step9: reset RX frame pointer. */ + ksz8851_reg_clrbits(REG_RX_ADDR_PTR, ADDR_PTR_MASK); + + /* RX step10: start RXQ read access. */ + ksz8851_reg_setbits(REG_RXQ_CMD, RXQ_START); + /* RX step11-17: start asynchronous FIFO read operation. */ + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_RX_START; + gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); + if( ( xReadLength & ( sizeof( size_t ) - 1 ) ) != 0 ) + { + xReadLength = ( xReadLength | ( sizeof( size_t ) - 1 ) ) + 1; + } + + /* Pass the buffer minus 2 bytes, see ksz8851snl.c: RXQ_TWOBYTE_OFFSET. */ + ksz8851_fifo_read( pxNetworkBuffer->pucEthernetBuffer - 2, xReadLength ); + /* Remove CRC and update buffer length. */ + xLength -= 4; + pxNetworkBuffer->xDataLength = xLength; + /* Wait for SPI interrupt to set status 'SPI_PDC_RX_COMPLETE'. */ + } + } + break; + } /* ul_had_intn_interrupt || us_pending_frame */ + /* + * ========================== Handle TX ========================== + */ + + /* Fetch next packet to be sent. */ + if( ( xMicrelDevice.tx_busy[ txTail ] != pdFALSE ) && + ( xMicrelDevice.us_pending_frame == 0 ) && + ( xMicrelDevice.ul_had_intn_interrupt == 0 ) ) + { + NetworkBufferDescriptor_t *pxNetworkBuffer = xMicrelDevice.tx_buffers[ txTail ]; + size_t xLength = pxNetworkBuffer->xDataLength; + int iIndex = xLength; + + xLength = 4 * ( ( xLength + 3 ) / 4 ); + while( iIndex < ( int ) xLength ) + { + pxNetworkBuffer->pucEthernetBuffer[ iIndex ] = '\0'; + iIndex++; + } + pxNetworkBuffer->xDataLength = xLength; + + /* TX step1: check if TXQ memory size is available for transmit. */ + txmir = ksz8851_reg_read( REG_TX_MEM_INFO ); + txmir = txmir & TX_MEM_AVAILABLE_MASK; + + if( txmir < ( xLength + 8 ) ) + { + if( wait_tx_space == pdFALSE ) + { + tx_status = ksz8851_reg_read( REG_TX_STATUS ); + fhr_status = ksz8851_reg_read( REG_RX_FHR_STATUS ); + wait_tx_space = pdTRUE; + } + //return; + rx_debug = 1; + tx_space = txmir; + } + else + { + tx_space = txmir; + + /* TX step2: disable all interrupts. */ + ksz8851_reg_write( REG_INT_MASK, 0 ); + + xMicrelDevice.tx_space -= xLength; + + /* TX step3: enable TXQ write access. */ + ksz8851_reg_setbits( REG_RXQ_CMD, RXQ_START ); + /* TX step4-8: perform FIFO write operation. */ + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_TX_START; + xMicrelDevice.tx_cur_buffer = pxNetworkBuffer; + /* Bring SPI SS low. */ + gpio_set_pin_low( KSZ8851SNL_CSN_GPIO ); + xMicrelDevice.ul_total_tx++; + + ksz8851_fifo_write( pxNetworkBuffer->pucEthernetBuffer, xLength, xLength ); + } + } + } + break; /* SPI_PDC_IDLE */ + + case SPI_PDC_RX_COMPLETE: + { + int rxHead = xMicrelDevice.us_rx_head; + /* RX step18-19: pad with dummy data to keep dword alignment. */ + /* Packet lengths will be rounded up to a multiple of "sizeof size_t". */ +// xLength = xMicrelDevice.rx_buffers[ rxHead ]->xDataLength & 3; +// if( xLength != 0 ) +// { +// ksz8851_fifo_dummy( 4 - xLength ); +// } + + /* RX step20: end RX transfer. */ + gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); + + /* Disable asynchronous transfer mode. */ + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; + + /* RX step21: end RXQ read access. */ + ksz8851_reg_clrbits(REG_RXQ_CMD, RXQ_START); + + /* RX step22-23: update frame count to be read. */ + xMicrelDevice.us_pending_frame -= 1; + + /* RX step24: enable INT_RX flag if transfer complete. */ + if( xMicrelDevice.us_pending_frame == 0 ) + { + ksz8851_reg_write(REG_INT_MASK, INT_RX); + } + + /* Mark descriptor ready to be read. */ + xMicrelDevice.rx_ready[ rxHead ] = pdTRUE; + if( ++rxHead == MICREL_RX_BUFFERS ) + { + rxHead = 0; + } + xMicrelDevice.us_rx_head = rxHead; + if( rx_debug != 0 ) + { + uint32_t txmir; + rx_debug = 0; + txmir = ksz8851_reg_read( REG_TX_MEM_INFO ); + txmir = txmir & TX_MEM_AVAILABLE_MASK; + } + /* Tell prvEMACHandlerTask that RX packets are available. */ + ulISREvents |= EMAC_IF_RX_EVENT; + } /* case SPI_PDC_RX_COMPLETE */ + break; + + case SPI_PDC_TX_COMPLETE: + { + int txTail = xMicrelDevice.us_tx_tail; + NetworkBufferDescriptor_t *pxNetworkBuffer = xMicrelDevice.tx_buffers[ txTail ]; + + size_t xLength; + /* TX step9-10: pad with dummy data to keep dword alignment. */ + /* Not necessary: length is already a multiple of 4. */ + xLength = pxNetworkBuffer->xDataLength & 3; + if( xLength != 0 ) + { +// ksz8851_fifo_dummy( 4 - xLength ); + } + +// /* TX step11: end TX transfer. */ + gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); + + /* Disable asynchronous transfer mode. */ + xMicrelDevice.ul_spi_pdc_status = SPI_PDC_IDLE; + + /* TX step12: disable TXQ write access. */ + ksz8851_reg_clrbits( REG_RXQ_CMD, RXQ_START ); + + xMicrelDevice.tx_space = ksz8851_reg_read( REG_TX_MEM_INFO ) & TX_MEM_AVAILABLE_MASK; + + /* TX step12.1: enqueue frame in TXQ. */ + ksz8851_reg_setbits( REG_TXQ_CMD, TXQ_ENQUEUE ); + + /* RX step13: enable INT_RX flag. */ +// ksz8851_reg_write( REG_INT_MASK, INT_RX ); + /* Buffer sent, free the corresponding buffer and mark descriptor as owned by software. */ + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + + xMicrelDevice.tx_buffers[ txTail ] = NULL; + xMicrelDevice.tx_busy[ txTail ] = pdFALSE; + if( ++txTail == MICREL_TX_BUFFERS ) + { + txTail = 0; + } + + xMicrelDevice.us_tx_tail = txTail; + /* Experiment. */ + //xMicrelDevice.ul_had_intn_interrupt = 1; + if( xTransmitHandle != NULL ) + { + xTaskNotifyGive( xTransmitHandle ); + } +#warning moved downward + /* RX step13: enable INT_RX flag. */ + ksz8851_reg_write( REG_INT_MASK, INT_RX ); + /* Prevent the EMAC task from sleeping a single time. */ + ulISREvents |= EMAC_IF_TX_EVENT; + } /* case SPI_PDC_TX_COMPLETE */ + break; + } /* switch( xMicrelDevice.ul_spi_pdc_status ) */ +} + +/** + * \brief Set up the RX descriptor ring buffers. + * + * This function sets up the descriptor list used for RX packets. + * + */ +static void ksz8851snl_rx_init() +{ + uint32_t ul_index = 0; + + /* Init pointer index. */ + xMicrelDevice.us_rx_head = 0; + xMicrelDevice.us_rx_tail = 0; + + /* Set up the RX descriptors. */ + for (ul_index = 0; ul_index < MICREL_RX_BUFFERS; ul_index++) { + xMicrelDevice.rx_buffers[ul_index] = NULL; + xMicrelDevice.rx_ready[ul_index] = pdFALSE; + } + + /* Build RX buffer and descriptors. */ + ksz8851snl_rx_populate_queue(); +} + +/** + * \brief Set up the TX descriptor ring buffers. + * + * This function sets up the descriptor list used for TX packets. + * + */ +static void ksz8851snl_tx_init() +{ + uint32_t ul_index = 0; + + /* Init TX index pointer. */ + xMicrelDevice.us_tx_head = 0; + xMicrelDevice.us_tx_tail = 0; + + /* Set up the TX descriptors */ + for( ul_index = 0; ul_index < MICREL_TX_BUFFERS; ul_index++ ) + { + xMicrelDevice.tx_busy[ul_index] = pdFALSE; + } + xMicrelDevice.tx_space = 6144; +} + +/** + * \brief Initialize ksz8851snl ethernet controller. + * + * \note Called from ethernetif_init(). + * + * \param netif the lwIP network interface structure for this ethernetif. + */ +static void ksz8851snl_low_level_init( void ) +{ + ksz8851snl_rx_init(); + ksz8851snl_tx_init(); + + /* Enable NVIC interrupts. */ + NVIC_SetPriority(SPI_IRQn, INT_PRIORITY_SPI); + NVIC_EnableIRQ(SPI_IRQn); + + /* Initialize SPI link. */ + if( ksz8851snl_init() < 0 ) + { + FreeRTOS_printf( ( "ksz8851snl_low_level_init: failed to initialize the Micrel driver!\n" ) ); + configASSERT(0 == 1); + } + memset( xMicrelDevice.pusHashTable, 255, sizeof( xMicrelDevice.pusHashTable ) ); + ksz8851_reg_write( REG_MAC_HASH_0, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 0 ] ) ); + ksz8851_reg_write( REG_MAC_HASH_2, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 1 ] ) ); + ksz8851_reg_write( REG_MAC_HASH_4, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 2 ] ) ); + ksz8851_reg_write( REG_MAC_HASH_6, FreeRTOS_htons( xMicrelDevice.pusHashTable[ 3 ] ) ); + + /* Initialize interrupt line INTN. */ + configure_intn( INTN_Handler ); +} + +/** + * \brief Use pre-allocated pbuf as DMA source and return the incoming packet. + * + * \param netif the lwIP network interface structure for this ethernetif. + * + * \return a pbuf filled with the received packet (including MAC header). + * 0 on memory error. + */ +static NetworkBufferDescriptor_t *ksz8851snl_low_level_input( void ) +{ +NetworkBufferDescriptor_t *pxNetworkBuffer = NULL; +int rxTail = xMicrelDevice.us_rx_tail; + + /* Check that descriptor is owned by software (ie packet received). */ + if( xMicrelDevice.rx_ready[ rxTail ] != pdFALSE ) + { + + /* Fetch pre-allocated buffer */ + pxNetworkBuffer = xMicrelDevice.rx_buffers[ rxTail ]; + + /* Remove this pbuf from its descriptor. */ + xMicrelDevice.rx_buffers[ rxTail ] = NULL; + + /* Clears rx_ready and sets rx_buffers. */ + ksz8851snl_rx_populate_queue(); + + if( ++rxTail == MICREL_RX_BUFFERS ) + { + rxTail = 0; + } + xMicrelDevice.us_rx_tail = rxTail; + } + + return pxNetworkBuffer; +} +/*-----------------------------------------------------------*/ + +static uint32_t prvEMACRxPoll( void ) +{ +NetworkBufferDescriptor_t *pxNetworkBuffer; +IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; +uint32_t ulReturnValue = 0; + + for( ;; ) + { + /* Only for logging. */ + int rxTail = xMicrelDevice.us_rx_tail; + EthernetHeader_t *pxEthernetHeader; + + pxNetworkBuffer = ksz8851snl_low_level_input(); + + if( pxNetworkBuffer == NULL ) + { + break; + } + pxEthernetHeader = ( EthernetHeader_t * ) ( pxNetworkBuffer->pucEthernetBuffer ); + + if( ( pxEthernetHeader->usFrameType != ipIPv4_FRAME_TYPE ) && + ( pxEthernetHeader->usFrameType != ipARP_FRAME_TYPE ) ) + { + FreeRTOS_printf( ( "Frame type %02X received\n", pxEthernetHeader->usFrameType ) ); + } + ulReturnValue++; + + xRxEvent.pvData = ( void * )pxNetworkBuffer; + /* Send the descriptor to the IP task for processing. */ + if( xSendEventStructToIPTask( &xRxEvent, 100UL ) != pdTRUE ) + { + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + iptraceETHERNET_RX_EVENT_LOST(); + FreeRTOS_printf( ( "prvEMACRxPoll: Can not queue return packet!\n" ) ); + } + } + + return ulReturnValue; +} +/*-----------------------------------------------------------*/ + +static void prvEMACHandlerTask( void *pvParameters ) +{ +TimeOut_t xPhyTime; +TickType_t xPhyRemTime; +TickType_t xLoggingTime; +UBaseType_t uxLastMinBufferCount = 0; +UBaseType_t uxCurrentCount; +BaseType_t xResult = 0; +uint32_t xStatus; +const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( EMAC_MAX_BLOCK_TIME_MS ); +#if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + UBaseType_t uxLastMinQueueSpace = 0; +#endif + + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParameters; + + configASSERT( xEMACTaskHandle ); + + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + xLoggingTime = xTaskGetTickCount(); + + for( ;; ) + { + uxCurrentCount = uxGetMinimumFreeNetworkBuffers(); + if( uxLastMinBufferCount != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinBufferCount = uxCurrentCount; + FreeRTOS_printf( ( "Network buffers: %lu lowest %lu\n", + uxGetNumberOfFreeNetworkBuffers(), uxCurrentCount ) ); + } + + #if( ipconfigCHECK_IP_QUEUE_SPACE != 0 ) + { + uxCurrentCount = uxGetMinimumIPQueueSpace(); + if( uxLastMinQueueSpace != uxCurrentCount ) + { + /* The logging produced below may be helpful + while tuning +TCP: see how many buffers are in use. */ + uxLastMinQueueSpace = uxCurrentCount; + FreeRTOS_printf( ( "Queue space: lowest %lu\n", uxCurrentCount ) ); + } + } + #endif /* ipconfigCHECK_IP_QUEUE_SPACE */ + + /* Run the state-machine of the ksz8851 driver. */ + ksz8851snl_update(); + + if( ( ulISREvents & EMAC_IF_ALL_EVENT ) == 0 ) + { + /* No events to process now, wait for the next. */ + ulTaskNotifyTake( pdTRUE, ulMaxBlockTime ); + } + + if( ( xTaskGetTickCount() - xLoggingTime ) > 10000 ) + { + xLoggingTime += 10000; + FreeRTOS_printf( ( "Now Tx/Rx %7d /%7d\n", + xMicrelDevice.ul_total_tx, xMicrelDevice.ul_total_rx ) ); + } + + if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) + { + ulISREvents &= ~EMAC_IF_RX_EVENT; + + /* Wait for the EMAC interrupt to indicate that another packet has been + received. */ + xResult = prvEMACRxPoll(); + } + + if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) + { + /* Future extension: code to release TX buffers if zero-copy is used. */ + ulISREvents &= ~EMAC_IF_TX_EVENT; + } + + if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) + { + /* Future extension: logging about errors that occurred. */ + ulISREvents &= ~EMAC_IF_ERR_EVENT; + } + + if( xResult > 0 ) + { + /* As long as packets are being received, assume that + the Link Status is high. */ + ulPHYLinkStatus |= BMSR_LINK_STATUS; + /* A packet was received. No need to check for the PHY status now, + but set a timer to check it later on. */ + vTaskSetTimeOutState( &xPhyTime ); + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + xResult = 0; + } + else if( ( xTaskCheckForTimeOut( &xPhyTime, &xPhyRemTime ) != pdFALSE ) && + ( xMicrelDevice.ul_spi_pdc_status == SPI_PDC_IDLE ) ) + { + /* Check the link status again. */ + xStatus = ulReadMDIO( PHY_REG_01_BMSR ); + + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != ( xStatus & BMSR_LINK_STATUS ) ) + { + ulPHYLinkStatus = xStatus; + FreeRTOS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) ); + } + + vTaskSetTimeOutState( &xPhyTime ); + if( ( ulPHYLinkStatus & BMSR_LINK_STATUS ) != 0 ) + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_HIGH_CHECK_TIME_MS ); + } + else + { + xPhyRemTime = pdMS_TO_TICKS( PHY_LS_LOW_CHECK_TIME_MS ); + } + } + } +} +/*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.c deleted file mode 100644 index 1579863fe..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.c +++ /dev/null @@ -1,610 +0,0 @@ -/** - * - * \file - * - * \brief KS8851SNL driver for SAM. - * - * Copyright (c) 2013-2015 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/* - * Support and FAQ: visit Atmel Support - */ - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" - -#include "spi_master.h" -#include "ksz8851snl.h" -#include "ksz8851snl_reg.h" -#include "delay.h" -#include "pio.h" -#include "pio_handler.h" -#include "pdc.h" -#include "conf_eth.h" - -/* Clock polarity. */ -#define SPI_CLK_POLARITY 0 - -/* Clock phase. */ -#define SPI_CLK_PHASE 1 - -/* SPI PDC register base. */ -Pdc *g_p_spi_pdc = 0; - -int lUDPLoggingPrintf( const char *pcFormatString, ... ); - -/* Temporary buffer for PDC reception. */ -uint8_t tmpbuf[1536] __attribute__ ((aligned (16))); - -union { - uint64_t ul[2]; - uint8_t uc[16]; -} cmdBuf, respBuf; - -void dbg_add_line( const char *pcFormat, ... ); - -static void spi_clear_ovres( void ); - -/** - * \brief Read register content, set bitmask and write back to register. - * - * \param reg the register address to modify. - * \param bits_to_set bitmask to apply. - */ -void ksz8851_reg_setbits(uint16_t reg, uint16_t bits_to_set) -{ - uint16_t temp; - - temp = ksz8851_reg_read(reg); - temp |= bits_to_set; - ksz8851_reg_write(reg, temp); -} - -/** - * \brief Read register content, clear bitmask and write back to register. - * - * \param reg the register address to modify. - * \param bits_to_set bitmask to apply. - */ -void ksz8851_reg_clrbits(uint16_t reg, uint16_t bits_to_clr) -{ - uint16_t temp; - - temp = ksz8851_reg_read(reg); - temp &= ~(uint32_t) bits_to_clr; - ksz8851_reg_write(reg, temp); -} - -/** - * \brief Configure the INTN interrupt. - */ -void configure_intn(void (*p_handler) (uint32_t, uint32_t)) -{ -// gpio_configure_pin(KSZ8851SNL_INTN_GPIO, PIO_INPUT); -// pio_set_input(PIOA, PIO_PA11_IDX, PIO_PULLUP); - - /* Configure PIO clock. */ - pmc_enable_periph_clk(INTN_ID); - - /* Adjust PIO debounce filter parameters, uses 10 Hz filter. */ - pio_set_debounce_filter(INTN_PIO, INTN_PIN_MSK, 10); - - /* Initialize PIO interrupt handlers, see PIO definition in board.h. */ - pio_handler_set(INTN_PIO, INTN_ID, INTN_PIN_MSK, - INTN_ATTR, p_handler); - - /* Enable NVIC interrupts. */ - NVIC_SetPriority(INTN_IRQn, INT_PRIORITY_PIO); - NVIC_EnableIRQ((IRQn_Type)INTN_ID); - - /* Enable PIO interrupts. */ - pio_enable_interrupt(INTN_PIO, INTN_PIN_MSK); -} - -/** - * \brief Read a register value. - * - * \param reg the register address to modify. - * - * \return the register value. - */ -uint16_t ksz8851_reg_read(uint16_t reg) -{ -pdc_packet_t g_pdc_spi_tx_packet; -pdc_packet_t g_pdc_spi_rx_packet; -uint16_t cmd = 0; -uint16_t res = 0; -int iTryCount = 3; - - while( iTryCount-- > 0 ) - { - uint32_t ulStatus; - - spi_clear_ovres(); - /* Move register address to cmd bits 9-2, make 32-bit address. */ - cmd = (reg << 2) & REG_ADDR_MASK; - - /* Last 2 bits still under "don't care bits" handled with byte enable. */ - /* Select byte enable for command. */ - if (reg & 2) { - /* Odd word address writes bytes 2 and 3 */ - cmd |= (0xc << 10); - } else { - /* Even word address write bytes 0 and 1 */ - cmd |= (0x3 << 10); - } - - /* Add command read code. */ - cmd |= CMD_READ; - cmdBuf.uc[0] = cmd >> 8; - cmdBuf.uc[1] = cmd & 0xff; - cmdBuf.uc[2] = CONFIG_SPI_MASTER_DUMMY; - cmdBuf.uc[3] = CONFIG_SPI_MASTER_DUMMY; - - /* Prepare PDC transfer. */ - g_pdc_spi_tx_packet.ul_addr = (uint32_t) cmdBuf.uc; - g_pdc_spi_tx_packet.ul_size = 4; - g_pdc_spi_rx_packet.ul_addr = (uint32_t) tmpbuf; - g_pdc_spi_rx_packet.ul_size = 4; - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - pdc_tx_init(g_p_spi_pdc, &g_pdc_spi_tx_packet, NULL); - pdc_rx_init(g_p_spi_pdc, &g_pdc_spi_rx_packet, NULL); - gpio_set_pin_low(KSZ8851SNL_CSN_GPIO); - - spi_disable_interrupt( KSZ8851SNL_SPI, ~0ul ); - pdc_enable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); - for( ;; ) - { - ulStatus = spi_read_status( KSZ8851SNL_SPI ); - if( ( ulStatus & ( SPI_SR_OVRES | SPI_SR_ENDRX ) ) != 0 ) - { - break; - } - } - gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - if( ( ulStatus & SPI_SR_OVRES ) == 0 ) - { - break; - } - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - lUDPLoggingPrintf( "ksz8851_reg_read: SPI_SR_OVRES\n" ); - } - - res = (tmpbuf[3] << 8) | tmpbuf[2]; - return res; -} - -/** - * \brief Write a register value. - * - * \param reg the register address to modify. - * \param wrdata the new register value. - */ -void ksz8851_reg_write(uint16_t reg, uint16_t wrdata) -{ -pdc_packet_t g_pdc_spi_tx_packet; -pdc_packet_t g_pdc_spi_rx_packet; -uint16_t cmd = 0; -int iTryCount = 3; - - while( iTryCount-- > 0 ) - { - uint32_t ulStatus; - - - spi_clear_ovres(); - /* Move register address to cmd bits 9-2, make 32-bit address. */ - cmd = (reg << 2) & REG_ADDR_MASK; - - /* Last 2 bits still under "don't care bits" handled with byte enable. */ - /* Select byte enable for command. */ - if (reg & 2) { - /* Odd word address writes bytes 2 and 3 */ - cmd |= (0xc << 10); - } else { - /* Even word address write bytes 0 and 1 */ - cmd |= (0x3 << 10); - } - - /* Add command write code. */ - cmd |= CMD_WRITE; - cmdBuf.uc[0] = cmd >> 8; - cmdBuf.uc[1] = cmd & 0xff; - cmdBuf.uc[2] = wrdata & 0xff; - cmdBuf.uc[3] = wrdata >> 8; - - /* Prepare PDC transfer. */ - g_pdc_spi_tx_packet.ul_addr = (uint32_t) cmdBuf.uc; - g_pdc_spi_tx_packet.ul_size = 4; - g_pdc_spi_rx_packet.ul_addr = (uint32_t) tmpbuf; - g_pdc_spi_rx_packet.ul_size = 4; - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - pdc_tx_init(g_p_spi_pdc, &g_pdc_spi_tx_packet, NULL); - pdc_rx_init(g_p_spi_pdc, &g_pdc_spi_rx_packet, NULL); - gpio_set_pin_low(KSZ8851SNL_CSN_GPIO); - - spi_disable_interrupt( KSZ8851SNL_SPI, ~0ul ); - - pdc_enable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); - for( ;; ) - { - ulStatus = spi_read_status( KSZ8851SNL_SPI ); - if( ( ulStatus & ( SPI_SR_OVRES | SPI_SR_ENDRX ) ) != 0 ) - { - break; - } - } - gpio_set_pin_high( KSZ8851SNL_CSN_GPIO ); - if( ( ulStatus & SPI_SR_OVRES ) == 0 ) - { - break; - } - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - lUDPLoggingPrintf( "ksz8851_reg_write: SPI_SR_OVRES\n" ); - } -} - -static void spi_clear_ovres( void ) -{ -volatile uint32_t rc; - rc = KSZ8851SNL_SPI->SPI_RDR; - - spi_read_status( KSZ8851SNL_SPI ); -} - -/** - * \brief Read internal fifo buffer. - * - * \param buf the buffer to store the data from the fifo buffer. - * \param len the amount of data to read. - */ -void ksz8851_fifo_read(uint8_t *buf, uint32_t len) -{ - pdc_packet_t g_pdc_spi_tx_packet; - pdc_packet_t g_pdc_spi_rx_packet; - pdc_packet_t g_pdc_spi_tx_npacket; - pdc_packet_t g_pdc_spi_rx_npacket; - - memset( cmdBuf.uc, '\0', sizeof cmdBuf ); - cmdBuf.uc[0] = FIFO_READ; - spi_clear_ovres(); - - /* Prepare PDC transfer. */ - g_pdc_spi_tx_packet.ul_addr = (uint32_t) cmdBuf.uc; - g_pdc_spi_tx_packet.ul_size = 9; - g_pdc_spi_rx_packet.ul_addr = (uint32_t) respBuf.uc; - g_pdc_spi_rx_packet.ul_size = 9; - - g_pdc_spi_tx_npacket.ul_addr = (uint32_t) buf; - g_pdc_spi_tx_npacket.ul_size = len; - g_pdc_spi_rx_npacket.ul_addr = (uint32_t) buf; - g_pdc_spi_rx_npacket.ul_size = len; - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - pdc_tx_init(g_p_spi_pdc, &g_pdc_spi_tx_packet, &g_pdc_spi_tx_npacket); - pdc_rx_init(g_p_spi_pdc, &g_pdc_spi_rx_packet, &g_pdc_spi_rx_npacket); - -spi_enable_interrupt(KSZ8851SNL_SPI, SPI_IER_RXBUFF | SPI_IER_OVRES); - - pdc_enable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); -} - -/** - * \brief Write internal fifo buffer. - * - * \param buf the buffer to send to the fifo buffer. - * \param ulActualLength the total amount of data to write. - * \param ulFIFOLength the size of the first pbuf to write from the pbuf chain. - */ -void ksz8851_fifo_write(uint8_t *buf, uint32_t ulActualLength, uint32_t ulFIFOLength) -{ - static uint8_t frameID = 0; - - pdc_packet_t g_pdc_spi_tx_packet; - pdc_packet_t g_pdc_spi_rx_packet; - pdc_packet_t g_pdc_spi_tx_npacket; - pdc_packet_t g_pdc_spi_rx_npacket; - - /* Prepare control word and byte count. */ - cmdBuf.uc[0] = FIFO_WRITE; - cmdBuf.uc[1] = frameID++ & 0x3f; - cmdBuf.uc[2] = 0; - cmdBuf.uc[3] = ulActualLength & 0xff; - cmdBuf.uc[4] = ulActualLength >> 8; - - spi_clear_ovres(); - - /* Prepare PDC transfer. */ - g_pdc_spi_tx_packet.ul_addr = (uint32_t) cmdBuf.uc; - g_pdc_spi_tx_packet.ul_size = 5; - - g_pdc_spi_rx_packet.ul_addr = (uint32_t) respBuf.uc; - g_pdc_spi_rx_packet.ul_size = 5; - - g_pdc_spi_tx_npacket.ul_addr = (uint32_t) buf; - g_pdc_spi_tx_npacket.ul_size = ulFIFOLength; - - g_pdc_spi_rx_npacket.ul_addr = (uint32_t) tmpbuf; - g_pdc_spi_rx_npacket.ul_size = ulFIFOLength; - - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - pdc_tx_init(g_p_spi_pdc, &g_pdc_spi_tx_packet, &g_pdc_spi_tx_npacket); - #if( TX_USES_RECV == 1 ) - pdc_rx_init(g_p_spi_pdc, &g_pdc_spi_rx_packet, &g_pdc_spi_rx_npacket); - spi_enable_interrupt(KSZ8851SNL_SPI, SPI_IER_ENDRX | SPI_IER_OVRES); - pdc_enable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); - #else - spi_enable_interrupt(KSZ8851SNL_SPI, SPI_SR_TXBUFE | SPI_IER_OVRES); - pdc_enable_transfer(g_p_spi_pdc, PERIPH_PTCR_TXTEN); - #endif -} - -/** - * \brief Write dummy data to the internal fifo buffer. - * - * \param len the amount of dummy data to write. - */ -void ksz8851_fifo_dummy(uint32_t len) -{ - pdc_packet_t g_pdc_spi_tx_packet; - pdc_packet_t g_pdc_spi_rx_packet; - - /* Prepare PDC transfer. */ - g_pdc_spi_tx_packet.ul_addr = (uint32_t) tmpbuf; - g_pdc_spi_tx_packet.ul_size = len; - g_pdc_spi_rx_packet.ul_addr = (uint32_t) tmpbuf; - g_pdc_spi_rx_packet.ul_size = len; - pdc_disable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); - pdc_tx_init(g_p_spi_pdc, &g_pdc_spi_tx_packet, NULL); - pdc_rx_init(g_p_spi_pdc, &g_pdc_spi_rx_packet, NULL); - pdc_enable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); - - while (!(spi_read_status(KSZ8851SNL_SPI) & SPI_SR_ENDRX)) - ; -} - -void ksz8851snl_set_registers(void) -{ - /* Init step2-4: write QMU MAC address (low, middle then high). */ - ksz8851_reg_write(REG_MAC_ADDR_0, (ETHERNET_CONF_ETHADDR4 << 8) | ETHERNET_CONF_ETHADDR5); - ksz8851_reg_write(REG_MAC_ADDR_2, (ETHERNET_CONF_ETHADDR2 << 8) | ETHERNET_CONF_ETHADDR3); - ksz8851_reg_write(REG_MAC_ADDR_4, (ETHERNET_CONF_ETHADDR0 << 8) | ETHERNET_CONF_ETHADDR1); - - /* Init step5: enable QMU Transmit Frame Data Pointer Auto Increment. */ - ksz8851_reg_write(REG_TX_ADDR_PTR, ADDR_PTR_AUTO_INC); - - /* Init step6: configure QMU transmit control register. */ - ksz8851_reg_write(REG_TX_CTRL, - TX_CTRL_ICMP_CHECKSUM | - TX_CTRL_UDP_CHECKSUM | - TX_CTRL_TCP_CHECKSUM | - TX_CTRL_IP_CHECKSUM | - TX_CTRL_FLOW_ENABLE | - TX_CTRL_PAD_ENABLE | - TX_CTRL_CRC_ENABLE - ); - - /* Init step7: enable QMU Receive Frame Data Pointer Auto Increment. */ - ksz8851_reg_write(REG_RX_ADDR_PTR, ADDR_PTR_AUTO_INC); - - /* Init step8: configure QMU Receive Frame Threshold for one frame. */ - ksz8851_reg_write(REG_RX_FRAME_CNT_THRES, 1); - - /* Init step9: configure QMU receive control register1. */ - ksz8851_reg_write(REG_RX_CTRL1, - RX_CTRL_UDP_CHECKSUM | - RX_CTRL_TCP_CHECKSUM | - RX_CTRL_IP_CHECKSUM | - RX_CTRL_MAC_FILTER | - RX_CTRL_FLOW_ENABLE | - RX_CTRL_BROADCAST | - RX_CTRL_ALL_MULTICAST| - RX_CTRL_UNICAST); -// ksz8851_reg_write(REG_RX_CTRL1, -// RX_CTRL_UDP_CHECKSUM | -// RX_CTRL_TCP_CHECKSUM | -// RX_CTRL_IP_CHECKSUM | -// RX_CTRL_FLOW_ENABLE | -// RX_CTRL_PROMISCUOUS); - - ksz8851_reg_write(REG_RX_CTRL2, - RX_CTRL_IPV6_UDP_NOCHECKSUM | - RX_CTRL_UDP_LITE_CHECKSUM | - RX_CTRL_ICMP_CHECKSUM | - RX_CTRL_BURST_LEN_FRAME); - - -//#define RXQ_TWOBYTE_OFFSET (0x0200) /* Enable adding 2-byte before frame header for IP aligned with DWORD */ -#warning Remember to try the above option to get a 2-byte offset - - /* Init step11: configure QMU receive queue: trigger INT and auto-dequeue frame. */ - ksz8851_reg_write( REG_RXQ_CMD, RXQ_CMD_CNTL | RXQ_TWOBYTE_OFFSET ); - - /* Init step12: adjust SPI data output delay. */ - ksz8851_reg_write(REG_BUS_CLOCK_CTRL, BUS_CLOCK_166 | BUS_CLOCK_DIVIDEDBY_1); - - /* Init step13: restart auto-negotiation. */ - ksz8851_reg_setbits(REG_PORT_CTRL, PORT_AUTO_NEG_RESTART); - - /* Init step13.1: force link in half duplex if auto-negotiation failed. */ - if ((ksz8851_reg_read(REG_PORT_CTRL) & PORT_AUTO_NEG_RESTART) != PORT_AUTO_NEG_RESTART) - { - ksz8851_reg_clrbits(REG_PORT_CTRL, PORT_FORCE_FULL_DUPLEX); - } - - /* Init step14: clear interrupt status. */ - ksz8851_reg_write(REG_INT_STATUS, 0xFFFF); - - /* Init step15: set interrupt mask. */ - ksz8851_reg_write(REG_INT_MASK, INT_RX); - - /* Init step16: enable QMU Transmit. */ - ksz8851_reg_setbits(REG_TX_CTRL, TX_CTRL_ENABLE); - - /* Init step17: enable QMU Receive. */ - ksz8851_reg_setbits(REG_RX_CTRL1, RX_CTRL_ENABLE); -} -/** - * \brief KSZ8851SNL initialization function. - * - * \return 0 on success, 1 on communication error. - */ -uint32_t ksz8851snl_init(void) -{ -uint32_t count = 10; -uint16_t dev_id = 0; -uint8_t id_ok = 0; - - /* Configure the SPI peripheral. */ - spi_enable_clock(KSZ8851SNL_SPI); - spi_disable(KSZ8851SNL_SPI); - spi_reset(KSZ8851SNL_SPI); - spi_set_master_mode(KSZ8851SNL_SPI); - spi_disable_mode_fault_detect(KSZ8851SNL_SPI); - spi_set_peripheral_chip_select_value(KSZ8851SNL_SPI, ~(uint32_t)(1UL << KSZ8851SNL_CS_PIN)); -spi_set_fixed_peripheral_select(KSZ8851SNL_SPI); -//spi_disable_peripheral_select_decode(KSZ8851SNL_SPI); - - spi_set_clock_polarity(KSZ8851SNL_SPI, KSZ8851SNL_CS_PIN, SPI_CLK_POLARITY); - spi_set_clock_phase(KSZ8851SNL_SPI, KSZ8851SNL_CS_PIN, SPI_CLK_PHASE); - spi_set_bits_per_transfer(KSZ8851SNL_SPI, KSZ8851SNL_CS_PIN, - SPI_CSR_BITS_8_BIT); - spi_set_baudrate_div(KSZ8851SNL_SPI, KSZ8851SNL_CS_PIN, (sysclk_get_cpu_hz() / KSZ8851SNL_CLOCK_SPEED)); -// spi_set_transfer_delay(KSZ8851SNL_SPI, KSZ8851SNL_CS_PIN, CONFIG_SPI_MASTER_DELAY_BS, -// CONFIG_SPI_MASTER_DELAY_BCT); - - - spi_set_transfer_delay(KSZ8851SNL_SPI, KSZ8851SNL_CS_PIN, 0, 0); - - spi_enable(KSZ8851SNL_SPI); - - /* Get pointer to UART PDC register base. */ - g_p_spi_pdc = spi_get_pdc_base(KSZ8851SNL_SPI); - pdc_enable_transfer(g_p_spi_pdc, PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); - - /* Control RSTN and CSN pin from the driver. */ - gpio_configure_pin(KSZ8851SNL_CSN_GPIO, KSZ8851SNL_CSN_FLAGS); - gpio_set_pin_high(KSZ8851SNL_CSN_GPIO); - gpio_configure_pin(KSZ8851SNL_RSTN_GPIO, KSZ8851SNL_RSTN_FLAGS); - - /* Reset the Micrel in a proper state. */ - while( count-- ) - { - /* Perform hardware reset with respect to the reset timing from the datasheet. */ - gpio_set_pin_low(KSZ8851SNL_RSTN_GPIO); - vTaskDelay(2); - gpio_set_pin_high(KSZ8851SNL_RSTN_GPIO); - vTaskDelay(2); - - /* Init step1: read chip ID. */ - dev_id = ksz8851_reg_read(REG_CHIP_ID); - if( ( dev_id & 0xFFF0 ) == CHIP_ID_8851_16 ) - { - id_ok = 1; - break; - } - } - if( id_ok != 0 ) - { - ksz8851snl_set_registers(); - } - - return id_ok ? 1 : -1; -} - -uint32_t ksz8851snl_reinit(void) -{ -uint32_t count = 10; -uint16_t dev_id = 0; -uint8_t id_ok = 0; - /* Reset the Micrel in a proper state. */ - while( count-- ) - { - /* Perform hardware reset with respect to the reset timing from the datasheet. */ - gpio_set_pin_low(KSZ8851SNL_RSTN_GPIO); - vTaskDelay(2); - gpio_set_pin_high(KSZ8851SNL_RSTN_GPIO); - vTaskDelay(2); - - /* Init step1: read chip ID. */ - dev_id = ksz8851_reg_read(REG_CHIP_ID); - if( ( dev_id & 0xFFF0 ) == CHIP_ID_8851_16 ) - { - id_ok = 1; - break; - } - } - if( id_ok != 0 ) - { - ksz8851snl_set_registers(); - } - - return id_ok ? 1 : -1; -} - -uint32_t ksz8851snl_reset_rx( void ) -{ -uint16_t usValue; - - usValue = ksz8851_reg_read(REG_RX_CTRL1); - - usValue &= ~( ( uint16_t ) RX_CTRL_ENABLE | RX_CTRL_FLUSH_QUEUE ); - - ksz8851_reg_write( REG_RX_CTRL1, usValue ); vTaskDelay( 2 ); - ksz8851_reg_write( REG_RX_CTRL1, usValue | RX_CTRL_FLUSH_QUEUE ); vTaskDelay( 1 ); - ksz8851_reg_write( REG_RX_CTRL1, usValue ); vTaskDelay( 1 ); - ksz8851_reg_write( REG_RX_CTRL1, usValue | RX_CTRL_ENABLE ); vTaskDelay( 1 ); - - return ( uint32_t )usValue; -} - -uint32_t ksz8851snl_reset_tx( void ) -{ -uint16_t usValue; - - usValue = ksz8851_reg_read( REG_TX_CTRL ); - - usValue &= ~( ( uint16_t ) TX_CTRL_ENABLE | TX_CTRL_FLUSH_QUEUE ); - - ksz8851_reg_write( REG_TX_CTRL, usValue ); vTaskDelay( 2 ); - ksz8851_reg_write( REG_TX_CTRL, usValue | TX_CTRL_FLUSH_QUEUE ); vTaskDelay( 1 ); - ksz8851_reg_write( REG_TX_CTRL, usValue ); vTaskDelay( 1 ); - ksz8851_reg_write( REG_TX_CTRL, usValue | TX_CTRL_ENABLE ); vTaskDelay( 1 ); - - return ( uint32_t )usValue; -} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.h deleted file mode 100644 index 7952dc241..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * \file - * - * \brief KS8851SNL driver for SAM. - * - * Copyright (c) 2013-2015 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/* - * Support and FAQ: visit Atmel Support - */ - -#ifndef KSZ8851SNL_H_INCLUDED -#define KSZ8851SNL_H_INCLUDED - -#include "gpio.h" - -void configure_intn(void (*p_handler) (uint32_t, uint32_t)); -void ksz8851_reg_setbits(uint16_t reg, uint16_t bits_to_set); -void ksz8851_reg_clrbits(uint16_t reg, uint16_t bits_to_clr); -void ksz8851_fifo_read(uint8_t *buf, uint32_t len); -void ksz8851_fifo_write(uint8_t *buf, uint32_t ulActualLength, uint32_t ulFIFOLength); -void ksz8851_fifo_dummy(uint32_t len); -void ksz8851_reg_write(uint16_t reg, uint16_t wrdata); -uint16_t ksz8851_reg_read(uint16_t reg); -uint32_t ksz8851snl_init(void); -uint32_t ksz8851snl_reinit(void); - -uint32_t ksz8851snl_reset_rx( void ); -uint32_t ksz8851snl_reset_tx( void ); - -#endif /* KSZ8851SNL_H_INCLUDED */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl_reg.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl_reg.h deleted file mode 100644 index 3102fcc42..000000000 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/ksz8851snl/ksz8851snl_reg.h +++ /dev/null @@ -1,473 +0,0 @@ -/** - * - * \file - * - * \brief KS8851SNL registers definitions. - * - * Copyright (c) 2013-2015 Atmel Corporation. All rights reserved. - * - * \asf_license_start - * - * \page License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name of Atmel may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 4. This software may only be redistributed and used in connection with an - * Atmel microcontroller product. - * - * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE - * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * \asf_license_stop - * - */ -/* - * Support and FAQ: visit Atmel Support - */ - -#ifndef KSZ8851SNL_REG_H_INCLUDED -#define KSZ8851SNL_REG_H_INCLUDED - -#define REG_ADDR_MASK (0x3F0) /* Register address mask */ -#define OPCODE_MASK (3 << 14) -#define CMD_READ (0 << 14) -#define CMD_WRITE (1 << 14) -#define FIFO_READ (0x80) -#define FIFO_WRITE (0xC0) - -/* - * MAC Registers - * (Offset 0x00 - 0x25) - */ -#define REG_BUS_ERROR_STATUS (0x06) /* BESR */ -#define BUS_ERROR_IBEC (0x8000) -#define BUS_ERROR_IBECV_MASK (0x7800) /* Default IPSec clock at 166Mhz */ - -#define REG_CHIP_CFG_STATUS (0x08) /* CCFG */ -#define LITTLE_ENDIAN_BUS_MODE (0x0400) /* Bus in little endian mode */ -#define EEPROM_PRESENCE (0x0200) /* External EEPROM is used */ -#define SPI_BUS_MODE (0x0100) /* In SPI bus mode */ -#define DATA_BUS_8BIT (0x0080) /* In 8-bit bus mode operation */ -#define DATA_BUS_16BIT (0x0040) /* In 16-bit bus mode operation */ -#define DATA_BUS_32BIT (0x0020) /* In 32-bit bus mode operation */ -#define MULTIPLEX_MODE (0x0010) /* Data and address bus are shared */ -#define CHIP_PACKAGE_128PIN (0x0008) /* 128-pin package */ -#define CHIP_PACKAGE_80PIN (0x0004) /* 80-pin package */ -#define CHIP_PACKAGE_48PIN (0x0002) /* 48-pin package */ -#define CHIP_PACKAGE_32PIN (0x0001) /* 32-pin package for SPI host interface only */ - -#define REG_MAC_ADDR_0 (0x10) /* MARL */ -#define REG_MAC_ADDR_1 (0x11) /* MARL */ -#define REG_MAC_ADDR_2 (0x12) /* MARM */ -#define REG_MAC_ADDR_3 (0x13) /* MARM */ -#define REG_MAC_ADDR_4 (0x14) /* MARH */ -#define REG_MAC_ADDR_5 (0x15) /* MARH */ - -#define REG_BUS_CLOCK_CTRL (0x20) /* OBCR */ -#define BUS_CLOCK_166 (0x0004) /* 166 MHz on-chip bus clock (defaul is 125MHz) */ -#define BUS_CLOCK_DIVIDEDBY_5 (0x0003) /* Bus clock devided by 5 */ -#define BUS_CLOCK_DIVIDEDBY_3 (0x0002) /* Bus clock devided by 3 */ -#define BUS_CLOCK_DIVIDEDBY_2 (0x0001) /* Bus clock devided by 2 */ -#define BUS_CLOCK_DIVIDEDBY_1 (0x0000) /* Bus clock devided by 1 */ -#define BUS_CLOCK_DIVIDED_MASK (0x0003) /* Bus clock devider mask */ - -#define BUS_SPEED_166_MHZ (0x0004) /* Set bus speed to 166 MHz */ -#define BUS_SPEED_125_MHZ (0x0000) /* Set bus speed to 125 MHz */ -#define BUS_SPEED_83_MHZ (0x0005) /* Set bus speed to 83 MHz (166/2)*/ -#define BUS_SPEED_62_5_MHZ (0x0001) /* Set bus speed to 62.5 MHz (125/2) */ -#define BUS_SPEED_53_3_MHZ (0x0006) /* Set bus speed to 53.3 MHz (166/3) */ -#define BUS_SPEED_41_7_MHZ (0x0002) /* Set bus speed to 41.67 MHz (125/3) */ -#define BUS_SPEED_33_2_MHZ (0x0007) /* Set bus speed to 33.2 MHz (166/5) */ -#define BUS_SPEED_25_MHZ (0x0003) /* Set bus speed to 25 MHz (125/5) */ - -#define REG_EEPROM_CTRL (0x22) /* EEPCR */ -#define EEPROM_ACCESS_ENABLE (0x0010) /* Enable software to access EEPROM through bit 3 to bit 0 */ -#define EEPROM_DATA_IN (0x0008) /* Data receive from EEPROM (EEDI pin) */ -#define EEPROM_DATA_OUT (0x0004) /* Data transmit to EEPROM (EEDO pin) */ -#define EEPROM_SERIAL_CLOCK (0x0002) /* Serial clock (EESK pin) */ -#define EEPROM_CHIP_SELECT (0x0001) /* EEPROM chip select (EECS pin) */ - -#define REG_MEM_BIST_INFO (0x24) /* MBIR */ -#define TX_MEM_TEST_FINISHED (0x1000) /* TX memeory BIST test finish */ -#define TX_MEM_TEST_FAILED (0x0800) /* TX memory BIST test fail */ -#define TX_MEM_TEST_FAILED_COUNT (0x0700) /* TX memory BIST test fail count */ -#define RX_MEM_TEST_FINISHED (0x0010) /* RX memory BIST test finish */ -#define RX_MEM_TEST_FAILED (0x0008) /* RX memory BIST test fail */ -#define RX_MEM_TEST_FAILED_COUNT (0x0003) /* RX memory BIST test fail count */ - -#define REG_RESET_CTRL (0x26) /* GRR */ -#define QMU_SOFTWARE_RESET (0x0002) /* QMU soft reset (clear TxQ, RxQ) */ -#define GLOBAL_SOFTWARE_RESET (0x0001) /* Global soft reset (PHY, MAC, QMU) */ - -/* - * Wake On Lan Control Registers - * (Offset 0x2A - 0x6B) - */ -#define REG_WOL_CTRL (0x2A) /* WFCR */ -#define WOL_MAGIC_ENABLE (0x0080) /* Enable the magic packet pattern detection */ -#define WOL_FRAME3_ENABLE (0x0008) /* Enable the wake up frame 3 pattern detection */ -#define WOL_FRAME2_ENABLE (0x0004) /* Enable the wake up frame 2 pattern detection */ -#define WOL_FRAME1_ENABLE (0x0002) /* Enable the wake up frame 1 pattern detection */ -#define WOL_FRAME0_ENABLE (0x0001) /* Enable the wake up frame 0 pattern detection */ - -#define REG_WOL_FRAME0_CRC0 (0x30) /* WF0CRC0 */ -#define REG_WOL_FRAME0_CRC1 (0x32) /* WF0CRC1 */ -#define REG_WOL_FRAME0_BYTE_MASK0 (0x34) /* WF0BM0 */ -#define REG_WOL_FRAME0_BYTE_MASK1 (0x36) /* WF0BM1 */ -#define REG_WOL_FRAME0_BYTE_MASK2 (0x38) /* WF0BM2 */ -#define REG_WOL_FRAME0_BYTE_MASK3 (0x3A) /* WF0BM3 */ - -#define REG_WOL_FRAME1_CRC0 (0x40) /* WF1CRC0 */ -#define REG_WOL_FRAME1_CRC1 (0x42) /* WF1CRC1 */ -#define REG_WOL_FRAME1_BYTE_MASK0 (0x44) /* WF1BM0 */ -#define REG_WOL_FRAME1_BYTE_MASK1 (0x46) /* WF1BM1 */ -#define REG_WOL_FRAME1_BYTE_MASK2 (0x48) /* WF1BM2 */ -#define REG_WOL_FRAME1_BYTE_MASK3 (0x4A) /* WF1BM3 */ - -#define REG_WOL_FRAME2_CRC0 (0x50) /* WF2CRC0 */ -#define REG_WOL_FRAME2_CRC1 (0x52) /* WF2CRC1 */ -#define REG_WOL_FRAME2_BYTE_MASK0 (0x54) /* WF2BM0 */ -#define REG_WOL_FRAME2_BYTE_MASK1 (0x56) /* WF2BM1 */ -#define REG_WOL_FRAME2_BYTE_MASK2 (0x58) /* WF2BM2 */ -#define REG_WOL_FRAME2_BYTE_MASK3 (0x5A) /* WF2BM3 */ - -#define REG_WOL_FRAME3_CRC0 (0x60) /* WF3CRC0 */ -#define REG_WOL_FRAME3_CRC1 (0x62) /* WF3CRC1 */ -#define REG_WOL_FRAME3_BYTE_MASK0 (0x64) /* WF3BM0 */ -#define REG_WOL_FRAME3_BYTE_MASK1 (0x66) /* WF3BM1 */ -#define REG_WOL_FRAME3_BYTE_MASK2 (0x68) /* WF3BM2 */ -#define REG_WOL_FRAME3_BYTE_MASK3 (0x6A) /* WF3BM3 */ - -/* - * Transmit/Receive Control Registers - * (Offset 0x70 - 0x9F) - */ - -/* Transmit Frame Header */ -#define REG_QDR_DUMMY (0x00) /* Dummy address to access QMU RxQ, TxQ */ -#define TX_CTRL_INTERRUPT_ON (0x8000) /* Transmit Interrupt on Completion */ - -#define REG_TX_CTRL (0x70) /* TXCR */ -#define TX_CTRL_ICMP_CHECKSUM (0x0100) /* Enable ICMP frame checksum generation */ -#define TX_CTRL_UDP_CHECKSUM (0x0080) /* Enable UDP frame checksum generation */ -#define TX_CTRL_TCP_CHECKSUM (0x0040) /* Enable TCP frame checksum generation */ -#define TX_CTRL_IP_CHECKSUM (0x0020) /* Enable IP frame checksum generation */ -#define TX_CTRL_FLUSH_QUEUE (0x0010) /* Clear transmit queue, reset tx frame pointer */ -#define TX_CTRL_FLOW_ENABLE (0x0008) /* Enable transmit flow control */ -#define TX_CTRL_PAD_ENABLE (0x0004) /* Eanble adding a padding to a packet shorter than 64 bytes */ -#define TX_CTRL_CRC_ENABLE (0x0002) /* Enable adding a CRC to the end of transmit frame */ -#define TX_CTRL_ENABLE (0x0001) /* Enable tranmsit */ - -#define REG_TX_STATUS (0x72) /* TXSR */ -#define TX_STAT_LATE_COL (0x2000) /* Tranmsit late collision occurs */ -#define TX_STAT_MAX_COL (0x1000) /* Tranmsit maximum collision is reached */ -#define TX_FRAME_ID_MASK (0x003F) /* Transmit frame ID mask */ -#define TX_STAT_ERRORS ( TX_STAT_MAX_COL | TX_STAT_LATE_COL ) - -#define REG_RX_CTRL1 (0x74) /* RXCR1 */ -#define RX_CTRL_FLUSH_QUEUE (0x8000) /* Clear receive queue, reset rx frame pointer */ -#define RX_CTRL_UDP_CHECKSUM (0x4000) /* Enable UDP frame checksum verification */ -#define RX_CTRL_TCP_CHECKSUM (0x2000) /* Enable TCP frame checksum verification */ -#define RX_CTRL_IP_CHECKSUM (0x1000) /* Enable IP frame checksum verification */ -#define RX_CTRL_MAC_FILTER (0x0800) /* Receive with address that pass MAC address filtering */ -#define RX_CTRL_FLOW_ENABLE (0x0400) /* Enable receive flow control */ -#define RX_CTRL_BAD_PACKET (0x0200) /* Eanble receive CRC error frames */ -#define RX_CTRL_MULTICAST (0x0100) /* Receive multicast frames that pass the CRC hash filtering */ -#define RX_CTRL_BROADCAST (0x0080) /* Receive all the broadcast frames */ -#define RX_CTRL_ALL_MULTICAST (0x0040) /* Receive all the multicast frames (including broadcast frames) */ -#define RX_CTRL_UNICAST (0x0020) /* Receive unicast frames that match the device MAC address */ -#define RX_CTRL_PROMISCUOUS (0x0010) /* Receive all incoming frames, regardless of frame's DA */ -#define RX_CTRL_STRIP_CRC (0x0008) /* Enable strip CRC on the received frames */ -#define RX_CTRL_INVERSE_FILTER (0x0002) /* Receive with address check in inverse filtering mode */ -#define RX_CTRL_ENABLE (0x0001) /* Enable receive */ - -/* Address filtering scheme mask */ -#define RX_CTRL_FILTER_MASK ( RX_CTRL_INVERSE_FILTER | RX_CTRL_PROMISCUOUS | RX_CTRL_MULTICAST | RX_CTRL_MAC_FILTER ) - -#define REG_RX_CTRL2 (0x76) /* RXCR2 */ -#define RX_CTRL_IPV6_UDP_NOCHECKSUM (0x0010) /* No checksum generation and verification if IPv6 UDP is fragment */ -#define RX_CTRL_IPV6_UDP_CHECKSUM (0x0008) /* Receive pass IPv6 UDP frame with UDP checksum is zero */ -#define RX_CTRL_UDP_LITE_CHECKSUM (0x0004) /* Enable UDP Lite frame checksum generation and verification */ -#define RX_CTRL_ICMP_CHECKSUM (0x0002) /* Enable ICMP frame checksum verification */ -#define RX_CTRL_BLOCK_MAC (0x0001) /* Receive drop frame if the SA is same as device MAC address */ -#define RX_CTRL_BURST_LEN_MASK (0x00e0) /* SRDBL SPI Receive Data Burst Length */ -#define RX_CTRL_BURST_LEN_4 (0x0000) -#define RX_CTRL_BURST_LEN_8 (0x0020) -#define RX_CTRL_BURST_LEN_16 (0x0040) -#define RX_CTRL_BURST_LEN_32 (0x0060) -#define RX_CTRL_BURST_LEN_FRAME (0x0080) - -#define REG_TX_MEM_INFO (0x78) /* TXMIR */ -#define TX_MEM_AVAILABLE_MASK (0x1FFF) /* The amount of memory available in TXQ */ - -#define REG_RX_FHR_STATUS (0x7C) /* RXFHSR */ -#define RX_VALID (0x8000) /* Frame in the receive packet memory is valid */ -#define RX_ICMP_ERROR (0x2000) /* ICMP checksum field doesn't match */ -#define RX_IP_ERROR (0x1000) /* IP checksum field doesn't match */ -#define RX_TCP_ERROR (0x0800) /* TCP checksum field doesn't match */ -#define RX_UDP_ERROR (0x0400) /* UDP checksum field doesn't match */ -#define RX_BROADCAST (0x0080) /* Received frame is a broadcast frame */ -#define RX_MULTICAST (0x0040) /* Received frame is a multicast frame */ -#define RX_UNICAST (0x0020) /* Received frame is a unicast frame */ -#define RX_PHY_ERROR (0x0010) /* Received frame has runt error */ -#define RX_FRAME_ETHER (0x0008) /* Received frame is an Ethernet-type frame */ -#define RX_TOO_LONG (0x0004) /* Received frame length exceeds max size 0f 2048 bytes */ -#define RX_RUNT_ERROR (0x0002) /* Received frame was demaged by a collision */ -#define RX_BAD_CRC (0x0001) /* Received frame has a CRC error */ -#define RX_ERRORS ( RX_BAD_CRC | RX_TOO_LONG | RX_RUNT_ERROR | RX_PHY_ERROR | \ - RX_ICMP_ERROR | RX_IP_ERROR | RX_TCP_ERROR | RX_UDP_ERROR ) - -#define REG_RX_FHR_BYTE_CNT (0x7E) /* RXFHBCR */ -#define RX_BYTE_CNT_MASK (0x0FFF) /* Received frame byte size mask */ - -#define REG_TXQ_CMD (0x80) /* TXQCR */ -#define TXQ_AUTO_ENQUEUE (0x0004) /* Enable enqueue tx frames from tx buffer automatically */ -#define TXQ_MEM_AVAILABLE_INT (0x0002) /* Enable generate interrupt when tx memory is available */ -#define TXQ_ENQUEUE (0x0001) /* Enable enqueue tx frames one frame at a time */ - -#define REG_RXQ_CMD (0x82) /* RXQCR */ -#define RXQ_STAT_TIME_INT (0x1000) /* RX interrupt is occured by timer duration */ -#define RXQ_STAT_BYTE_CNT_INT (0x0800) /* RX interrupt is occured by byte count threshold */ -#define RXQ_STAT_FRAME_CNT_INT (0x0400) /* RX interrupt is occured by frame count threshold */ -#define RXQ_TWOBYTE_OFFSET (0x0200) /* Enable adding 2-byte before frame header for IP aligned with DWORD */ -#define RXQ_TIME_INT (0x0080) /* Enable RX interrupt by timer duration */ -#define RXQ_BYTE_CNT_INT (0x0040) /* Enable RX interrupt by byte count threshold */ -#define RXQ_FRAME_CNT_INT (0x0020) /* Enable RX interrupt by frame count threshold */ -#define RXQ_AUTO_DEQUEUE (0x0010) /* Enable release rx frames from rx buffer automatically */ -#define RXQ_START (0x0008) /* Start QMU transfer operation */ -#define RXQ_CMD_FREE_PACKET (0x0001) /* Manual dequeue (release the current frame from RxQ) */ - -#define RXQ_CMD_CNTL (RXQ_FRAME_CNT_INT|RXQ_AUTO_DEQUEUE) - -#define REG_TX_ADDR_PTR (0x84) /* TXFDPR */ -#define REG_RX_ADDR_PTR (0x86) /* RXFDPR */ -#define ADDR_PTR_AUTO_INC (0x4000) /* Enable Frame data pointer increments automatically */ -#define ADDR_PTR_MASK (0x03ff) /* Address pointer mask */ - -#define REG_RX_TIME_THRES (0x8C) /* RXDTTR */ -#define RX_TIME_THRESHOLD_MASK (0xFFFF) /* Set receive timer duration threshold */ - -#define REG_RX_BYTE_CNT_THRES (0x8E) /* RXDBCTR */ -#define RX_BYTE_THRESHOLD_MASK (0xFFFF) /* Set receive byte count threshold */ - -#define REG_INT_MASK (0x90) /* IER */ -#define INT_PHY (0x8000) /* Enable link change interrupt */ -#define INT_TX (0x4000) /* Enable transmit done interrupt */ -#define INT_RX (0x2000) /* Enable receive interrupt */ -#define INT_RX_OVERRUN (0x0800) /* Enable receive overrun interrupt */ -#define INT_TX_STOPPED (0x0200) /* Enable transmit process stopped interrupt */ -#define INT_RX_STOPPED (0x0100) /* Enable receive process stopped interrupt */ -#define INT_TX_SPACE (0x0040) /* Enable transmit space available interrupt */ -#define INT_RX_WOL_FRAME (0x0020) /* Enable WOL on receive wake-up frame detect interrupt */ -#define INT_RX_WOL_MAGIC (0x0010) /* Enable WOL on receive magic packet detect interrupt */ -#define INT_RX_WOL_LINKUP (0x0008) /* Enable WOL on link up detect interrupt */ -#define INT_RX_WOL_ENERGY (0x0004) /* Enable WOL on energy detect interrupt */ -#define INT_RX_SPI_ERROR (0x0002) /* Enable receive SPI bus error interrupt */ -#define INT_RX_WOL_DELAY_ENERGY (0x0001) /* Enable WOL on delay energy detect interrupt */ -#define INT_MASK ( INT_RX | INT_TX | INT_PHY ) - -#define REG_INT_STATUS (0x92) /* ISR */ - -#define REG_RX_FRAME_CNT_THRES (0x9C) /* RXFCTFC */ -#define RX_FRAME_CNT_MASK (0xFF00) /* Received frame count mask */ -#define RX_FRAME_THRESHOLD_MASK (0x00FF) /* Set receive frame count threshold mask */ - -#define REG_TX_TOTAL_FRAME_SIZE (0x9E) /* TXNTFSR */ -#define TX_TOTAL_FRAME_SIZE_MASK (0xFFFF) /* Set next total tx frame size mask */ - -/* - * MAC Address Hash Table Control Registers - * (Offset 0xA0 - 0xA7) - */ -#define REG_MAC_HASH_0 (0xA0) /* MAHTR0 */ -#define REG_MAC_HASH_1 (0xA1) - -#define REG_MAC_HASH_2 (0xA2) /* MAHTR1 */ -#define REG_MAC_HASH_3 (0xA3) - -#define REG_MAC_HASH_4 (0xA4) /* MAHTR2 */ -#define REG_MAC_HASH_5 (0xA5) - -#define REG_MAC_HASH_6 (0xA6) /* MAHTR3 */ -#define REG_MAC_HASH_7 (0xA7) - -/* - * QMU Receive Queue Watermark Control Registers - * (Offset 0xB0 - 0xB5) - */ -#define REG_RX_LOW_WATERMARK (0xB0) /* FCLWR */ -#define RX_LOW_WATERMARK_MASK (0x0FFF) /* Set QMU RxQ low watermark mask */ - -#define REG_RX_HIGH_WATERMARK (0xB2) /* FCHWR */ -#define RX_HIGH_WATERMARK_MASK (0x0FFF) /* Set QMU RxQ high watermark mask */ - -#define REG_RX_OVERRUN_WATERMARK (0xB4) /* FCOWR */ -#define RX_OVERRUN_WATERMARK_MASK (0x0FFF) /* Set QMU RxQ overrun watermark mask */ - -/* - * Global Control Registers - * (Offset 0xC0 - 0xD3) - */ -#define REG_CHIP_ID (0xC0) /* CIDER */ -#define CHIP_ID_MASK (0xFFF0) /* Family ID and chip ID mask */ -#define REVISION_MASK (0x000E) /* Chip revision mask */ -#define CHIP_ID_SHIFT (4) -#define REVISION_SHIFT (1) -#define CHIP_ID_8851_16 (0x8870) /* KS8851-16/32MQL chip ID */ - -#define REG_LED_CTRL (0xC6) /* CGCR */ -#define LED_CTRL_SEL1 (0x8000) /* Select LED3/LED2/LED1/LED0 indication */ -#define LED_CTRL_SEL0 (0x0200) /* Select LED3/LED2/LED1/LED0 indication */ - -#define REG_IND_IACR (0xC8) /* IACR */ -#define TABLE_READ (0x1000) /* Indirect read */ -#define TABLE_MIB (0x0C00) /* Select MIB counter table */ -#define TABLE_ENTRY_MASK (0x001F) /* Set table entry to access */ - -#define REG_IND_DATA_LOW (0xD0) /* IADLR */ -#define REG_IND_DATA_HIGH (0xD2) /* IADHR */ - -/* - * Power Management Control Registers - * (Offset 0xD4 - 0xD7) - */ -#define REG_POWER_CNTL (0xD4) /* PMECR */ -#define PME_DELAY_ENABLE (0x4000) /* Enable the PME output pin assertion delay */ -#define PME_ACTIVE_HIGHT (0x1000) /* PME output pin is active high */ -#define PME_FROM_WKFRAME (0x0800) /* PME asserted when wake-up frame is detected */ -#define PME_FROM_MAGIC (0x0400) /* PME asserted when magic packet is detected */ -#define PME_FROM_LINKUP (0x0200) /* PME asserted when link up is detected */ -#define PME_FROM_ENERGY (0x0100) /* PME asserted when energy is detected */ -#define PME_EVENT_MASK (0x0F00) /* PME asserted event mask */ -#define WAKEUP_AUTO_ENABLE (0x0080) /* Enable auto wake-up in energy mode */ -#define WAKEUP_NORMAL_AUTO_ENABLE (0x0040) /* Enable auto goto normal mode from energy detecion mode */ -#define WAKEUP_FROM_WKFRAME (0x0020) /* Wake-up from wake-up frame event detected */ -#define WAKEUP_FROM_MAGIC (0x0010) /* Wake-up from magic packet event detected */ -#define WAKEUP_FROM_LINKUP (0x0008) /* Wake-up from link up event detected */ -#define WAKEUP_FROM_ENERGY (0x0004) /* Wake-up from energy event detected */ -#define WAKEUP_EVENT_MASK (0x003C) /* Wake-up event mask */ -#define POWER_STATE_D1 (0x0003) /* Power saving mode */ -#define POWER_STATE_D3 (0x0002) /* Power down mode */ -#define POWER_STATE_D2 (0x0001) /* Power detection mode */ -#define POWER_STATE_D0 (0x0000) /* Normal operation mode (default) */ -#define POWER_STATE_MASK (0x0003) /* Power management mode mask */ - -#define REG_WAKEUP_TIME (0xD6) /* GSWUTR */ -#define WAKEUP_TIME (0xFF00) /* Min time (sec) wake-uo after detected energy */ -#define GOSLEEP_TIME (0x00FF) /* Min time (sec) before goto sleep when in energy mode */ - -/* - * PHY Control Registers - * (Offset 0xD8 - 0xF9) - */ -#define REG_PHY_RESET (0xD8) /* PHYRR */ -#define PHY_RESET (0x0001) /* Reset PHY */ - -#define REG_PHY_CNTL (0xE4) /* P1MBCR */ -#define PHY_SPEED_100MBIT (0x2000) /* Force PHY 100Mbps */ -#define PHY_AUTO_NEG_ENABLE (0x1000) /* Enable PHY auto-negotiation */ -#define PHY_POWER_DOWN (0x0800) /* Set PHY power-down */ -#define PHY_AUTO_NEG_RESTART (0x0200) /* Restart PHY auto-negotiation */ -#define PHY_FULL_DUPLEX (0x0100) /* Force PHY in full duplex mode */ -#define PHY_HP_MDIX (0x0020) /* Set PHY in HP auto MDI-X mode */ -#define PHY_FORCE_MDIX (0x0010) /* Force MDI-X */ -#define PHY_AUTO_MDIX_DISABLE (0x0008) /* Disable auto MDI-X */ -#define PHY_TRANSMIT_DISABLE (0x0002) /* Disable PHY transmit */ -#define PHY_LED_DISABLE (0x0001) /* Disable PHY LED */ - -#define REG_PHY_STATUS (0xE6) /* P1MBSR */ -#define PHY_100BT4_CAPABLE (0x8000) /* 100 BASE-T4 capable */ -#define PHY_100BTX_FD_CAPABLE (0x4000) /* 100BASE-TX full duplex capable */ -#define PHY_100BTX_CAPABLE (0x2000) /* 100BASE-TX half duplex capable */ -#define PHY_10BT_FD_CAPABLE (0x1000) /* 10BASE-TX full duplex capable */ -#define PHY_10BT_CAPABLE (0x0800) /* 10BASE-TX half duplex capable */ -#define PHY_AUTO_NEG_ACKNOWLEDGE (0x0020) /* Auto-negotiation complete */ -#define PHY_AUTO_NEG_CAPABLE (0x0008) /* Auto-negotiation capable */ -#define PHY_LINK_UP (0x0004) /* PHY link is up */ -#define PHY_EXTENDED_CAPABILITY (0x0001) /* PHY extended register capable */ - -#define REG_PHY_ID_LOW (0xE8) /* PHY1ILR */ -#define REG_PHY_ID_HIGH (0xEA) /* PHY1IHR */ - -#define REG_PHY_AUTO_NEGOTIATION (0xEC) /* P1ANAR */ -#define PHY_AUTO_NEG_SYM_PAUSE (0x0400) /* Advertise pause capability */ -#define PHY_AUTO_NEG_100BTX_FD (0x0100) /* Advertise 100 full-duplex capability */ -#define PHY_AUTO_NEG_100BTX (0x0080) /* Advertise 100 half-duplex capability */ -#define PHY_AUTO_NEG_10BT_FD (0x0040) /* Advertise 10 full-duplex capability */ -#define PHY_AUTO_NEG_10BT (0x0020) /* Advertise 10 half-duplex capability */ -#define PHY_AUTO_NEG_SELECTOR (0x001F) /* Selector field mask */ -#define PHY_AUTO_NEG_802_3 (0x0001) /* 802.3 */ - -#define REG_PHY_REMOTE_CAPABILITY (0xEE) /* P1ANLPR */ -#define PHY_REMOTE_SYM_PAUSE (0x0400) /* Link partner pause capability */ -#define PHY_REMOTE_100BTX_FD (0x0100) /* Link partner 100 full-duplex capability */ -#define PHY_REMOTE_100BTX (0x0080) /* Link partner 100 half-duplex capability */ -#define PHY_REMOTE_10BT_FD (0x0040) /* Link partner 10 full-duplex capability */ -#define PHY_REMOTE_10BT (0x0020) /* Link partner 10 half-duplex capability */ - -#define REG_PORT_LINK_MD (0xF4) /* P1SCLMD */ -#define PORT_CABLE_10M_SHORT (0x8000) /* Cable length is less than 10m short */ -#define PORT_CABLE_STAT_FAILED (0x6000) /* Cable diagnostic test fail */ -#define PORT_CABLE_STAT_SHORT (0x4000) /* Short condition detected in the cable */ -#define PORT_CABLE_STAT_OPEN (0x2000) /* Open condition detected in the cable */ -#define PORT_CABLE_STAT_NORMAL (0x0000) /* Normal condition */ -#define PORT_CABLE_DIAG_RESULT (0x6000) /* Cable diagnostic test result mask */ -#define PORT_START_CABLE_DIAG (0x1000) /* Enable cable diagnostic test */ -#define PORT_FORCE_LINK (0x0800) /* Enable force link pass */ -#define PORT_POWER_SAVING (0x0400) /* Disable power saving */ -#define PORT_REMOTE_LOOPBACK (0x0200) /* Enable remote loopback at PHY */ -#define PORT_CABLE_FAULT_COUNTER (0x01FF) /* Cable length distance to the fault */ - -#define REG_PORT_CTRL (0xF6) /* P1CR */ -#define PORT_LED_OFF (0x8000) /* Turn off all the port LEDs (LED3/LED2/LED1/LED0) */ -#define PORT_TX_DISABLE (0x4000) /* Disable port transmit */ -#define PORT_AUTO_NEG_RESTART (0x2000) /* Restart auto-negotiation */ -#define PORT_POWER_DOWN (0x0800) /* Set port power-down */ -#define PORT_AUTO_MDIX_DISABLE (0x0400) /* Disable auto MDI-X */ -#define PORT_FORCE_MDIX (0x0200) /* Force MDI-X */ -#define PORT_AUTO_NEG_ENABLE (0x0080) /* Enable auto-negotiation */ -#define PORT_FORCE_100_MBIT (0x0040) /* Force PHY 100Mbps */ -#define PORT_FORCE_FULL_DUPLEX (0x0020) /* Force PHY in full duplex mode */ -#define PORT_AUTO_NEG_SYM_PAUSE (0x0010) /* Advertise pause capability */ -#define PORT_AUTO_NEG_100BTX_FD (0x0008) /* Advertise 100 full-duplex capability */ -#define PORT_AUTO_NEG_100BTX (0x0004) /* Advertise 100 half-duplex capability */ -#define PORT_AUTO_NEG_10BT_FD (0x0002) /* Advertise 10 full-duplex capability */ -#define PORT_AUTO_NEG_10BT (0x0001) /* Advertise 10 half-duplex capability */ - -#define REG_PORT_STATUS (0xF8) /* P1SR */ -#define PORT_HP_MDIX (0x8000) /* Set PHY in HP auto MDI-X mode */ -#define PORT_REVERSED_POLARITY (0x2000) /* Polarity is reversed */ -#define PORT_RX_FLOW_CTRL (0x1000) /* Reeive flow control feature is active */ -#define PORT_TX_FLOW_CTRL (0x0800) /* Transmit flow control feature is active */ -#define PORT_STAT_SPEED_100MBIT (0x0400) /* Link is 100Mbps */ -#define PORT_STAT_FULL_DUPLEX (0x0200) /* Link is full duplex mode */ -#define PORT_MDIX_STATUS (0x0080) /* Is MDI */ -#define PORT_AUTO_NEG_COMPLETE (0x0040) /* Auto-negotiation complete */ -#define PORT_STATUS_LINK_GOOD (0x0020) /* PHY link is up */ -#define PORT_REMOTE_SYM_PAUSE (0x0010) /* Link partner pause capability */ -#define PORT_REMOTE_100BTX_FD (0x0008) /* Link partner 100 full-duplex capability */ -#define PORT_REMOTE_100BTX (0x0004) /* Link partner 100 half-duplex capability */ -#define PORT_REMOTE_10BT_FD (0x0002) /* Link partner 10 full-duplex capability */ -#define PORT_REMOTE_10BT (0x0001) /* Link partner 10 half-duplex capability */ - -#endif /* KSZ8851SNL_REG_H_INCLUDED */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/mw300_rd/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/mw300_rd/NetworkInterface.c index 87161fd39..df5bd7cfe 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/mw300_rd/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/mw300_rd/NetworkInterface.c @@ -1,217 +1,217 @@ -/* -FreeRTOS+TCP V2.0.11 -Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - http://aws.amazon.com/freertos - http://www.FreeRTOS.org -*/ - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "list.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_Sockets.h" -#include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_DNS.h" -#include "NetworkBufferManagement.h" -#include "NetworkInterface.h" - -#include "wifi-decl.h" -#include "wmerrno.h" -#include "wifi.h" - -#include - -#define net_e(...) \ - wmlog_e("freertos_tcp", ##__VA_ARGS__) -#define net_w(...) \ - wmlog_w("freertos_tcp", ##__VA_ARGS__) -#define net_d(...) \ - wmlog("freertos_tcp", ##__VA_ARGS__) - -#if 0 //this is lwip structure. -#define MAX_INTERFACES_SUPPORTED 3 -static struct netif *netif_arr[MAX_INTERFACES_SUPPORTED]; -#endif - -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet -driver will filter incoming packets and only pass the stack those packets it -considers need processing. */ -#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) -#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#else -#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#endif - -#define IP_ADDR_ANY ((ip_addr_t *)&ip_addr_any) -#define IP_ADDR_BROADCAST ((ip_addr_t *)&ip_addr_broadcast) - -/** 255.255.255.255 */ -#define IPADDR_NONE ((u32_t)0xffffffffUL) -/** 127.0.0.1 */ -#define IPADDR_LOOPBACK ((u32_t)0x7f000001UL) -/** 0.0.0.0 */ -#define IPADDR_ANY ((u32_t)0x00000000UL) -/** 255.255.255.255 */ -#define IPADDR_BROADCAST ((u32_t)0xffffffffUL) - -/** 255.255.255.255 */ -#define INADDR_NONE IPADDR_NONE -/** 127.0.0.1 */ -#define INADDR_LOOPBACK IPADDR_LOOPBACK -/** 0.0.0.0 */ -#define INADDR_ANY IPADDR_ANY -/** 255.255.255.255 */ -#define INADDR_BROADCAST IPADDR_BROADCAST - -enum if_state_t { - INTERFACE_DOWN = 0, - INTERFACE_UP, -}; -struct ip_addr { - u32_t addr; -}; - -#define MLAN_BSS_TYPE_STA 0 - -extern uint8_t outbuf[2048]; -extern bool mlan_is_amsdu(const t_u8 *rcvdata); -extern t_u8 *mlan_get_payload(const t_u8 *rcvdata, t_u16 *payload_len, int *interface); -extern int wrapper_wlan_handle_amsdu_rx_packet(const t_u8 *rcvdata, const t_u16 datalen); -extern int wrapper_wlan_handle_rx_packet(const t_u16 datalen, const t_u8 *rcvdata, NetworkBufferDescriptor_t *pxNetworkBuffer); -static volatile uint32_t xInterfaceState = INTERFACE_DOWN; - -static int process_data_packet(const t_u8 *databuf, const t_u16 datalen) -{ - int interface = BSS_TYPE_STA; - t_u8 *payload = NULL; - t_u16 payload_len = 0; - const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); - - NetworkBufferDescriptor_t *pxNetworkBuffer; - IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; - - payload = (t_u8 *)mlan_get_payload(databuf, &payload_len, &interface); - - if( eConsiderFrameForProcessing( payload ) != eProcessBuffer ) { - net_d("Dropping packet\r\n"); - return WM_SUCCESS; - } - - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor(/*payload_len*/datalen, xDescriptorWaitTime); - - if (pxNetworkBuffer != NULL) { - /* Set the packet size, in case a larger buffer was returned. */ - pxNetworkBuffer->xDataLength = payload_len; - - /* Copy the packet data. */ - memcpy(pxNetworkBuffer->pucEthernetBuffer, payload, payload_len); - - xRxEvent.pvData = (void *) pxNetworkBuffer; - if ( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime) == pdFAIL ) { - wmprintf("Failed to enqueue packet to network stack %p, len %d", payload, payload_len); - vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); - return WM_FAIL; - } - } - return WM_SUCCESS; -} - -/* Callback function called from the wifi module */ -void handle_data_packet(const t_u8 interface, const t_u8 *rcvdata, - const t_u16 datalen) -{ - if (interface == BSS_TYPE_STA) - process_data_packet(rcvdata, datalen); -} - -BaseType_t xNetworkInterfaceInitialise( void ) -{ - uint8_t ret; - mac_addr_t mac_addr; - - ret = wifi_get_device_mac_addr(&mac_addr); - if (ret != WM_SUCCESS) { - net_d("Failed to get mac address"); - } - - FreeRTOS_UpdateMACAddress(mac_addr.mac); - - return ( xInterfaceState == INTERFACE_UP && ret == WM_SUCCESS ) ? pdTRUE : pdFALSE; -} - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ - /* FIX ME. */ -} - -BaseType_t xGetPhyLinkStatus( void ) -{ - /* FIX ME. */ - return pdFALSE; -} -void vNetworkNotifyIFDown() -{ - IPStackEvent_t xRxEvent = { eNetworkDownEvent, NULL }; - xInterfaceState = INTERFACE_DOWN; - if( xSendEventStructToIPTask( &xRxEvent, 0 ) != pdPASS ) { - /* Could not send the message, so it is still pending. */ - net_e("Could not send network down event"); - } - else { - /* Message was sent so it is not pending. */ - net_d("Sent network down event"); - } -} - -void vNetworkNotifyIFUp() -{ - xInterfaceState = INTERFACE_UP; -} - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t *const pxNetworkBuffer, BaseType_t xReleaseAfterSend ) -{ - uint8_t pkt_len; - - if (pxNetworkBuffer == NULL || - pxNetworkBuffer->pucEthernetBuffer == NULL || - pxNetworkBuffer->xDataLength == 0) { - net_d("Incorrect params"); - return pdFALSE; - } - memset(outbuf, 0x00, sizeof(outbuf)); - pkt_len = 22 + 4; /* sizeof(TxPD) + INTF_HEADER_LEN */ - memcpy((u8_t *) outbuf + pkt_len, (u8_t *) pxNetworkBuffer->pucEthernetBuffer, - pxNetworkBuffer->xDataLength); - int ret = wifi_low_level_output(BSS_TYPE_STA, outbuf + pkt_len, pxNetworkBuffer->xDataLength); - if (ret != WM_SUCCESS) { - net_e("Failed output %p, length %d, error %d \r\n", pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength, ret); - } - - if (xReleaseAfterSend != pdFALSE) { - vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); - } - - return ret == WM_SUCCESS ? pdTRUE : pdFALSE; -} +/* +FreeRTOS+TCP V2.0.11 +Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + http://aws.amazon.com/freertos + http://www.FreeRTOS.org +*/ + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "list.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_Sockets.h" +#include "FreeRTOS_IP_Private.h" +#include "FreeRTOS_DNS.h" +#include "NetworkBufferManagement.h" +#include "NetworkInterface.h" + +#include "wifi-decl.h" +#include "wmerrno.h" +#include "wifi.h" + +#include + +#define net_e(...) \ + wmlog_e("freertos_tcp", ##__VA_ARGS__) +#define net_w(...) \ + wmlog_w("freertos_tcp", ##__VA_ARGS__) +#define net_d(...) \ + wmlog("freertos_tcp", ##__VA_ARGS__) + +#if 0 //this is lwip structure. +#define MAX_INTERFACES_SUPPORTED 3 +static struct netif *netif_arr[MAX_INTERFACES_SUPPORTED]; +#endif + +/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet +driver will filter incoming packets and only pass the stack those packets it +considers need processing. */ +#if( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) +#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +#else +#define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +#endif + +#define IP_ADDR_ANY ((ip_addr_t *)&ip_addr_any) +#define IP_ADDR_BROADCAST ((ip_addr_t *)&ip_addr_broadcast) + +/** 255.255.255.255 */ +#define IPADDR_NONE ((u32_t)0xffffffffUL) +/** 127.0.0.1 */ +#define IPADDR_LOOPBACK ((u32_t)0x7f000001UL) +/** 0.0.0.0 */ +#define IPADDR_ANY ((u32_t)0x00000000UL) +/** 255.255.255.255 */ +#define IPADDR_BROADCAST ((u32_t)0xffffffffUL) + +/** 255.255.255.255 */ +#define INADDR_NONE IPADDR_NONE +/** 127.0.0.1 */ +#define INADDR_LOOPBACK IPADDR_LOOPBACK +/** 0.0.0.0 */ +#define INADDR_ANY IPADDR_ANY +/** 255.255.255.255 */ +#define INADDR_BROADCAST IPADDR_BROADCAST + +enum if_state_t { + INTERFACE_DOWN = 0, + INTERFACE_UP, +}; +struct ip_addr { + u32_t addr; +}; + +#define MLAN_BSS_TYPE_STA 0 + +extern uint8_t outbuf[2048]; +extern bool mlan_is_amsdu(const t_u8 *rcvdata); +extern t_u8 *mlan_get_payload(const t_u8 *rcvdata, t_u16 *payload_len, int *interface); +extern int wrapper_wlan_handle_amsdu_rx_packet(const t_u8 *rcvdata, const t_u16 datalen); +extern int wrapper_wlan_handle_rx_packet(const t_u16 datalen, const t_u8 *rcvdata, NetworkBufferDescriptor_t *pxNetworkBuffer); +static volatile uint32_t xInterfaceState = INTERFACE_DOWN; + +static int process_data_packet(const t_u8 *databuf, const t_u16 datalen) +{ + int interface = BSS_TYPE_STA; + t_u8 *payload = NULL; + t_u16 payload_len = 0; + const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( 250 ); + + NetworkBufferDescriptor_t *pxNetworkBuffer; + IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; + + payload = (t_u8 *)mlan_get_payload(databuf, &payload_len, &interface); + + if( eConsiderFrameForProcessing( payload ) != eProcessBuffer ) { + net_d("Dropping packet\r\n"); + return WM_SUCCESS; + } + + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor(/*payload_len*/datalen, xDescriptorWaitTime); + + if (pxNetworkBuffer != NULL) { + /* Set the packet size, in case a larger buffer was returned. */ + pxNetworkBuffer->xDataLength = payload_len; + + /* Copy the packet data. */ + memcpy(pxNetworkBuffer->pucEthernetBuffer, payload, payload_len); + + xRxEvent.pvData = (void *) pxNetworkBuffer; + if ( xSendEventStructToIPTask( &xRxEvent, xDescriptorWaitTime) == pdFAIL ) { + wmprintf("Failed to enqueue packet to network stack %p, len %d", payload, payload_len); + vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); + return WM_FAIL; + } + } + return WM_SUCCESS; +} + +/* Callback function called from the wifi module */ +void handle_data_packet(const t_u8 interface, const t_u8 *rcvdata, + const t_u16 datalen) +{ + if (interface == BSS_TYPE_STA) + process_data_packet(rcvdata, datalen); +} + +BaseType_t xNetworkInterfaceInitialise( void ) +{ + uint8_t ret; + mac_addr_t mac_addr; + + ret = wifi_get_device_mac_addr(&mac_addr); + if (ret != WM_SUCCESS) { + net_d("Failed to get mac address"); + } + + FreeRTOS_UpdateMACAddress(mac_addr.mac); + + return ( xInterfaceState == INTERFACE_UP && ret == WM_SUCCESS ) ? pdTRUE : pdFALSE; +} + +void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +{ + /* FIX ME. */ +} + +BaseType_t xGetPhyLinkStatus( void ) +{ + /* FIX ME. */ + return pdFALSE; +} +void vNetworkNotifyIFDown() +{ + IPStackEvent_t xRxEvent = { eNetworkDownEvent, NULL }; + xInterfaceState = INTERFACE_DOWN; + if( xSendEventStructToIPTask( &xRxEvent, 0 ) != pdPASS ) { + /* Could not send the message, so it is still pending. */ + net_e("Could not send network down event"); + } + else { + /* Message was sent so it is not pending. */ + net_d("Sent network down event"); + } +} + +void vNetworkNotifyIFUp() +{ + xInterfaceState = INTERFACE_UP; +} + +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t *const pxNetworkBuffer, BaseType_t xReleaseAfterSend ) +{ + uint8_t pkt_len; + + if (pxNetworkBuffer == NULL || + pxNetworkBuffer->pucEthernetBuffer == NULL || + pxNetworkBuffer->xDataLength == 0) { + net_d("Incorrect params"); + return pdFALSE; + } + memset(outbuf, 0x00, sizeof(outbuf)); + pkt_len = 22 + 4; /* sizeof(TxPD) + INTF_HEADER_LEN */ + memcpy((u8_t *) outbuf + pkt_len, (u8_t *) pxNetworkBuffer->pucEthernetBuffer, + pxNetworkBuffer->xDataLength); + int ret = wifi_low_level_output(BSS_TYPE_STA, outbuf + pkt_len, pxNetworkBuffer->xDataLength); + if (ret != WM_SUCCESS) { + net_e("Failed output %p, length %d, error %d \r\n", pxNetworkBuffer->pucEthernetBuffer, pxNetworkBuffer->xDataLength, ret); + } + + if (xReleaseAfterSend != pdFALSE) { + vReleaseNetworkBufferAndDescriptor(pxNetworkBuffer); + } + + return ret == WM_SUCCESS ? pdTRUE : pdFALSE; +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/BufferAllocation_2.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/BufferAllocation_2.c index 531e878ea..f00ae1fe8 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/BufferAllocation_2.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/BufferAllocation_2.c @@ -1,620 +1,620 @@ -/* - * FreeRTOS+TCP Labs Build 160919 (C) 2016 Real Time Engineers ltd. - * Authors include Hein Tibosch and Richard Barry - * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+TCP IS STILL IN THE LAB (mainly because the FTP and HTTP *** - *** demos have a dependency on FreeRTOS+FAT, which is only in the Labs *** - *** download): *** - *** *** - *** FreeRTOS+TCP is functional and has been used in commercial products *** - *** for some time. Be aware however that we are still refining its *** - *** design, the source code does not yet quite conform to the strict *** - *** coding and style standards mandated by Real Time Engineers ltd., and *** - *** the documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * - * FreeRTOS+TCP can be used under two different free open source licenses. The - * license that applies is dependent on the processor on which FreeRTOS+TCP is - * executed, as follows: - * - * If FreeRTOS+TCP is executed on one of the processors listed under the Special - * License Arrangements heading of the FreeRTOS+TCP license information web - * page, then it can be used under the terms of the FreeRTOS Open Source - * License. If FreeRTOS+TCP is used on any other processor, then it can be used - * under the terms of the GNU General Public License V2. Links to the relevant - * licenses follow: - * - * The FreeRTOS+TCP License Information Page: http://www.FreeRTOS.org/tcp_license - * The FreeRTOS Open Source License: http://www.FreeRTOS.org/license - * The GNU General Public License Version 2: http://www.FreeRTOS.org/gpl-2.0.txt - * - * FreeRTOS+TCP is distributed in the hope that it will be useful. You cannot - * use FreeRTOS+TCP unless you agree that you use the software 'as is'. - * FreeRTOS+TCP is provided WITHOUT ANY WARRANTY; without even the implied - * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they - * implied, expressed, or statutory. - * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs - * - */ - -/****************************************************************************** -* -* See the following web page for essential buffer allocation scheme usage and -* configuration details: -* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html -* -******************************************************************************/ - -/* THIS FILE SHOULD NOT BE USED IF THE PROJECT INCLUDES A MEMORY ALLOCATOR - * THAT WILL FRAGMENT THE HEAP MEMORY. For example, heap_2 must not be used, - * heap_4 can be used. */ - -/* Standard includes. */ -#include - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* FreeRTOS+TCP includes. */ -#include "FreeRTOS_IP.h" -#include "FreeRTOS_UDP_IP.h" -#include "FreeRTOS_IP_Private.h" -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" - -#include "tcpip/tcpip.h" -#include "tcpip/src/tcpip_private.h" - -#include "NetworkConfig.h" - -/* The obtained network buffer must be large enough to hold a packet that might - * replace the packet that was requested to be sent. */ -#if ipconfigUSE_TCP == 1 - #define baMINIMAL_BUFFER_SIZE sizeof( TCPPacket_t ) -#else - #define baMINIMAL_BUFFER_SIZE sizeof( ARPPacket_t ) -#endif /* ipconfigUSE_TCP == 1 */ - -/*_RB_ This is too complex not to have an explanation. */ -#if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) - #define ASSERT_CONCAT_( a, b ) a ## b - #define ASSERT_CONCAT( a, b ) ASSERT_CONCAT_( a, b ) - #define STATIC_ASSERT( e ) \ - ; enum { ASSERT_CONCAT( assert_line_, __LINE__ ) = 1 / ( !!( e ) ) } - - STATIC_ASSERT( ipconfigETHERNET_MINIMUM_PACKET_BYTES <= baMINIMAL_BUFFER_SIZE ); -#endif - -/* A list of free (available) NetworkBufferDescriptor_t structures. */ -static List_t xFreeBuffersList; - -/* Some statistics about the use of buffers. */ -static size_t uxMinimumFreeNetworkBuffers; - -/* Declares the pool of NetworkBufferDescriptor_t structures that are available - * to the system. All the network buffers referenced from xFreeBuffersList exist - * in this array. The array is not accessed directly except during initialisation, - * when the xFreeBuffersList is filled (as all the buffers are free when the system - * is booted). */ -static NetworkBufferDescriptor_t xNetworkBufferDescriptors[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ]; - -/* This constant is defined as false to let FreeRTOS_TCP_IP.c know that the - * network buffers have a variable size: resizing may be necessary */ -const BaseType_t xBufferAllocFixedSize = pdFALSE; - -/* The semaphore used to obtain network buffers. */ -static SemaphoreHandle_t xNetworkBufferSemaphore = NULL; - -/*-----------------------------------------------------------*/ - -#ifdef PIC32_USE_ETHERNET - - /* PIC32 specific stuff */ - /* */ - - /* MAC packet acknowledgment, once MAC is done with it */ - static bool PIC32_MacPacketAcknowledge( TCPIP_MAC_PACKET * pPkt, - const void * param ); - - /* allocates a MAC packet that holds a data buffer that can be used by both: */ - /* - the FreeRTOSIP (NetworkBufferDescriptor_t->pucEthernetBuffer) */ - /* - the Harmony MAC driver: TCPIP_MAC_PACKET->pDSeg->segLoad */ - /* from the beginning of the buffer: */ - /* - 4 bytes pointer to the network descriptor (FreeRTOS) */ - /* - 4 bytes pointer to the MAC packet (pic32_NetworkInterface.c) */ - /* - 2 bytes offset from the MAC packet (Harmony MAC driver: segLoadOffset) */ - /* */ - /* NOTE: segLoadLen should NOT include: */ - /* - the TCPIP_MAC_FRAME_OFFSET (== ipBUFFER_PADDING which should be == 10!) */ - /* - the sizeof(TCPIP_MAC_ETHERNET_HEADER) */ - /* These are added by the MAC packet allocation! */ - /* */ - static uint8_t * PIC32_PktAlloc( uint16_t pktLen, - uint16_t segLoadLen, - TCPIP_MAC_PACKET_ACK_FUNC ackF, - TCPIP_MAC_PACKET ** pPtrPkt ) - { - uint8_t * pBuff = 0; - - /* allocate standard packet */ - TCPIP_MAC_PACKET * pPkt = TCPIP_PKT_PacketAlloc( pktLen, segLoadLen, 0 ); - - /* set the MAC packet pointer in the packet */ - if( pPkt != 0 ) - { - pBuff = pPkt->pDSeg->segLoad; - TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pBuff - PIC32_BUFFER_PKT_PTR_OSSET ); - configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); - *ppkt = pPkt; /* store the packet it comes from */ - pPkt->ackFunc = ackF; - pPkt->ackParam = 0; - } - - if( pPtrPkt != 0 ) - { - *pPtrPkt = pPkt; - } - - return pBuff; - } - - - - /* standard PIC32 MAC allocation function for a MAC packet */ - /* this packet saves room for the FreeRTOS network descriptor */ - /* at the beginning of the data buffer */ - /* see NetworkBufferAllocate */ - /* Note: flags parameter is ignored since that's used in the Harmony stack only */ - TCPIP_MAC_PACKET * PIC32_MacPacketAllocate( uint16_t pktLen, - uint16_t segLoadLen, - TCPIP_MAC_PACKET_FLAGS flags ) - { - TCPIP_MAC_PACKET * pPkt; - - PIC32_PktAlloc( pktLen, segLoadLen, 0, &pPkt ); - - return pPkt; - } - - /* standard PIC32 MAC packet acknowledgment */ - /* function called once MAC is done with it */ - static bool PIC32_MacPacketAcknowledge( TCPIP_MAC_PACKET * pPkt, - const void * param ) - { - configASSERT( ( pPkt != 0 ) ); - - TCPIP_PKT_PacketFree( pPkt ); - - return false; - } - - /* associates the current MAC packet with a network descriptor */ - /* mainly for RX packet */ - void PIC32_MacAssociate( TCPIP_MAC_PACKET * pRxPkt, - NetworkBufferDescriptor_t * pxBufferDescriptor, - size_t pktLength ) - { - uint8_t * pPktBuff = pRxPkt->pDSeg->segLoad; - - pxBufferDescriptor->pucEthernetBuffer = pPktBuff; - pxBufferDescriptor->xDataLength = pktLength; - - /* make sure this is a properly allocated packet */ - TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pPktBuff - PIC32_BUFFER_PKT_PTR_OSSET ); - configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); - - if( *ppkt != pRxPkt ) - { - configASSERT( false ); - } - - /* set the proper descriptor info */ - NetworkBufferDescriptor_t ** ppDcpt = ( NetworkBufferDescriptor_t ** ) ( pPktBuff - ipBUFFER_PADDING ); - configASSERT( ( ( uint32_t ) ppDcpt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); - *ppDcpt = pxBufferDescriptor; - } - - /* debug functionality */ - void PIC32_MacPacketOrphan( TCPIP_MAC_PACKET * pPkt ) - { - TCPIP_PKT_PacketFree( pPkt ); - configASSERT( false ); - } - - /* FreeRTOS allocation functions */ - - /* allocates a buffer that can be used by both: */ - /* - the FreeRTOSIP (NetworkBufferDescriptor_t->pucEthernetBuffer) */ - /* - the Harmony MAC driver: TCPIP_MAC_PACKET */ - /* See PIC32_PktAlloc for details */ - /* */ - /* NOTE: reqLength should NOT include the ipBUFFER_PADDING (which should be == 10!) */ - /* or the sizeof(TCPIP_MAC_ETHERNET_HEADER) */ - /* These are added by the MAC packet allocation! */ - /* */ - uint8_t * NetworkBufferAllocate( size_t reqLength ) - { - return PIC32_PktAlloc( sizeof( TCPIP_MAC_PACKET ), reqLength, PIC32_MacPacketAcknowledge, 0 ); - } - - /* deallocates a network buffer previously allocated */ - /* with NetworkBufferAllocate */ - void NetworkBufferFree( uint8_t * pNetworkBuffer ) - { - if( pNetworkBuffer != 0 ) - { - TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pNetworkBuffer - PIC32_BUFFER_PKT_PTR_OSSET ); - configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); - TCPIP_MAC_PACKET * pPkt = *ppkt; - configASSERT( ( pPkt != 0 ) ); - - if( pPkt->ackFunc != 0 ) - { - ( *pPkt->ackFunc )( pPkt, pPkt->ackParam ); - } - else - { /* ??? */ - PIC32_MacPacketOrphan( pPkt ); - } - } - } - -#endif /* #ifdef PIC32_USE_ETHERNET */ - -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkBuffersInitialise( void ) -{ - BaseType_t xReturn, x; - - /* Only initialise the buffers and their associated kernel objects if they - * have not been initialised before. */ - if( xNetworkBufferSemaphore == NULL ) - { - xNetworkBufferSemaphore = xSemaphoreCreateCounting( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ); - configASSERT( xNetworkBufferSemaphore ); - - if( xNetworkBufferSemaphore != NULL ) - { - #if ( configQUEUE_REGISTRY_SIZE > 0 ) - { - vQueueAddToRegistry( xNetworkBufferSemaphore, "NetBufSem" ); - } - #endif /* configQUEUE_REGISTRY_SIZE */ - - /* If the trace recorder code is included name the semaphore for viewing - * in FreeRTOS+Trace. */ - #if ( ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 ) - { - extern QueueHandle_t xNetworkEventQueue; - vTraceSetQueueName( xNetworkEventQueue, "IPStackEvent" ); - vTraceSetQueueName( xNetworkBufferSemaphore, "NetworkBufferCount" ); - } - #endif /* ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 */ - - vListInitialise( &xFreeBuffersList ); - - /* Initialise all the network buffers. No storage is allocated to - * the buffers yet. */ - for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ ) - { - /* Initialise and set the owner of the buffer list items. */ - xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL; - vListInitialiseItem( &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); - listSET_LIST_ITEM_OWNER( &( xNetworkBufferDescriptors[ x ].xBufferListItem ), &xNetworkBufferDescriptors[ x ] ); - - /* Currently, all buffers are available for use. */ - vListInsert( &xFreeBuffersList, &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); - } - - uxMinimumFreeNetworkBuffers = ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; - } - } - - if( xNetworkBufferSemaphore == NULL ) - { - xReturn = pdFAIL; - } - else - { - xReturn = pdPASS; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -uint8_t * pucGetNetworkBuffer( size_t * pxRequestedSizeBytes ) -{ - uint8_t * pucEthernetBuffer; - size_t xSize = *pxRequestedSizeBytes; - - if( xSize < baMINIMAL_BUFFER_SIZE ) - { - /* Buffers must be at least large enough to hold a TCP-packet with - * headers, or an ARP packet, in case TCP is not included. */ - xSize = baMINIMAL_BUFFER_SIZE; - } - - /* Round up xSize to the nearest multiple of N bytes, - * where N equals 'sizeof( size_t )'. */ - if( ( xSize & ( sizeof( size_t ) - 1u ) ) != 0u ) - { - xSize = ( xSize | ( sizeof( size_t ) - 1u ) ) + 1u; - } - - *pxRequestedSizeBytes = xSize; - - /* Allocate a buffer large enough to store the requested Ethernet frame size - * and a pointer to a network buffer structure (hence the addition of - * ipBUFFER_PADDING bytes). */ - - #ifdef PIC32_USE_ETHERNET - pucEthernetBuffer = NetworkBufferAllocate( xSize - sizeof( TCPIP_MAC_ETHERNET_HEADER ) ); - #else - pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xSize + ipBUFFER_PADDING ); - #endif /* #ifdef PIC32_USE_ETHERNET */ - - configASSERT( pucEthernetBuffer ); - - if( pucEthernetBuffer != NULL ) - { - /* Enough space is left at the start of the buffer to place a pointer to - * the network buffer structure that references this Ethernet buffer. - * Return a pointer to the start of the Ethernet buffer itself. */ - #ifndef PIC32_USE_ETHERNET - pucEthernetBuffer += ipBUFFER_PADDING; - #endif /* #ifndef PIC32_USE_ETHERNET */ - } - - return pucEthernetBuffer; -} -/*-----------------------------------------------------------*/ - -void vReleaseNetworkBuffer( uint8_t * pucEthernetBuffer ) -{ - /* There is space before the Ethernet buffer in which a pointer to the - * network buffer that references this Ethernet buffer is stored. Remove the - * space before freeing the buffer. */ - #ifdef PIC32_USE_ETHERNET - NetworkBufferFree( pucEthernetBuffer ); - #else - if( pucEthernetBuffer != NULL ) - { - pucEthernetBuffer -= ipBUFFER_PADDING; - vPortFree( ( void * ) pucEthernetBuffer ); - } - #endif /* #ifdef PIC32_USE_ETHERNET */ -} -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t * pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, - TickType_t xBlockTimeTicks ) -{ - NetworkBufferDescriptor_t * pxReturn = NULL; - size_t uxCount; - - if( ( xRequestedSizeBytes != 0u ) && ( xRequestedSizeBytes < ( size_t ) baMINIMAL_BUFFER_SIZE ) ) - { - /* ARP packets can replace application packets, so the storage must be - * at least large enough to hold an ARP. */ - xRequestedSizeBytes = baMINIMAL_BUFFER_SIZE; - } - - #ifdef PIC32_USE_ETHERNET - if( xRequestedSizeBytes != 0u ) - { - #endif /* #ifdef PIC32_USE_ETHERNET */ - xRequestedSizeBytes += 2u; - - if( ( xRequestedSizeBytes & ( sizeof( size_t ) - 1u ) ) != 0u ) - { - xRequestedSizeBytes = ( xRequestedSizeBytes | ( sizeof( size_t ) - 1u ) ) + 1u; - } - #ifdef PIC32_USE_ETHERNET - } - #endif /* #ifdef PIC32_USE_ETHERNET */ - - /* If there is a semaphore available, there is a network buffer available. */ - if( xSemaphoreTake( xNetworkBufferSemaphore, xBlockTimeTicks ) == pdPASS ) - { - /* Protect the structure as it is accessed from tasks and interrupts. */ - taskENTER_CRITICAL(); - { - pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); - uxListRemove( &( pxReturn->xBufferListItem ) ); - } - taskEXIT_CRITICAL(); - - /* Reading UBaseType_t, no critical section needed. */ - uxCount = listCURRENT_LIST_LENGTH( &xFreeBuffersList ); - - if( uxMinimumFreeNetworkBuffers > uxCount ) - { - uxMinimumFreeNetworkBuffers = uxCount; - } - - /* Allocate storage of exactly the requested size to the buffer. */ - configASSERT( pxReturn->pucEthernetBuffer == NULL ); - - if( xRequestedSizeBytes > 0 ) - { - /* Extra space is obtained so a pointer to the network buffer can - * be stored at the beginning of the buffer. */ - - #ifdef PIC32_USE_ETHERNET - pxReturn->pucEthernetBuffer = NetworkBufferAllocate( xRequestedSizeBytes - sizeof( TCPIP_MAC_ETHERNET_HEADER ) ); - #else - pxReturn->pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xRequestedSizeBytes + ipBUFFER_PADDING ); - #endif /* #ifdef PIC32_USE_ETHERNET */ - - if( pxReturn->pucEthernetBuffer == NULL ) - { - /* The attempt to allocate storage for the buffer payload failed, - * so the network buffer structure cannot be used and must be - * released. */ - vReleaseNetworkBufferAndDescriptor( pxReturn ); - pxReturn = NULL; - } - else - { - /* Store a pointer to the network buffer structure in the - * buffer storage area, then move the buffer pointer on past the - * stored pointer so the pointer value is not overwritten by the - * application when the buffer is used. */ - #ifdef PIC32_USE_ETHERNET - *( ( NetworkBufferDescriptor_t ** ) ( pxReturn->pucEthernetBuffer - ipBUFFER_PADDING ) ) = pxReturn; - #else - *( ( NetworkBufferDescriptor_t ** ) ( pxReturn->pucEthernetBuffer ) ) = pxReturn; - pxReturn->pucEthernetBuffer += ipBUFFER_PADDING; - #endif /* #ifdef PIC32_USE_ETHERNET */ - - /* Store the actual size of the allocated buffer, which may be - * greater than the original requested size. */ - pxReturn->xDataLength = xRequestedSizeBytes; - - #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - /* make sure the buffer is not linked */ - pxReturn->pxNextBuffer = NULL; - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ - } - } - else - { - /* A descriptor is being returned without an associated buffer being - * allocated. */ - } - } - - if( pxReturn == NULL ) - { - iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER(); - } - else - { - iptraceNETWORK_BUFFER_OBTAINED( pxReturn ); - } - - return pxReturn; -} -/*-----------------------------------------------------------*/ - -void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ) -{ - BaseType_t xListItemAlreadyInFreeList; - - /* Ensure the buffer is returned to the list of free buffers before the - * counting semaphore is 'given' to say a buffer is available. Release the - * storage allocated to the buffer payload. THIS FILE SHOULD NOT BE USED - * IF THE PROJECT INCLUDES A MEMORY ALLOCATOR THAT WILL FRAGMENT THE HEAP - * MEMORY. For example, heap_2 must not be used, heap_4 can be used. */ - vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); - pxNetworkBuffer->pucEthernetBuffer = NULL; - - taskENTER_CRITICAL(); - { - xListItemAlreadyInFreeList = listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); - - if( xListItemAlreadyInFreeList == pdFALSE ) - { - vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); - } - } - taskEXIT_CRITICAL(); - - /* - * Update the network state machine, unless the program fails to release its 'xNetworkBufferSemaphore'. - * The program should only try to release its semaphore if 'xListItemAlreadyInFreeList' is false. - */ - if( xListItemAlreadyInFreeList == pdFALSE ) - { - if ( xSemaphoreGive( xNetworkBufferSemaphore ) == pdTRUE ) - { - iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); - } - } - else - { - iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); - } -} -/*-----------------------------------------------------------*/ - -/* - * Returns the number of free network buffers - */ -UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) -{ - return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); -} -/*-----------------------------------------------------------*/ - -UBaseType_t uxGetMinimumFreeNetworkBuffers( void ) -{ - return uxMinimumFreeNetworkBuffers; -} -/*-----------------------------------------------------------*/ - -NetworkBufferDescriptor_t * pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, - size_t xNewSizeBytes ) -{ - size_t xOriginalLength; - uint8_t * pucBuffer; - - #ifdef PIC32_USE_ETHERNET - xOriginalLength = pxNetworkBuffer->xDataLength; - #else - xOriginalLength = pxNetworkBuffer->xDataLength + ipBUFFER_PADDING; - xNewSizeBytes = xNewSizeBytes + ipBUFFER_PADDING; - #endif /* #ifdef PIC32_USE_ETHERNET */ - - pucBuffer = pucGetNetworkBuffer( &( xNewSizeBytes ) ); - - if( pucBuffer == NULL ) - { - /* In case the allocation fails, return NULL. */ - pxNetworkBuffer = NULL; - } - else - { - pxNetworkBuffer->xDataLength = xNewSizeBytes; - if( xNewSizeBytes > xOriginalLength ) - { - xNewSizeBytes = xOriginalLength; - } - - #ifdef PIC32_USE_ETHERNET - memcpy( pucBuffer, pxNetworkBuffer->pucEthernetBuffer, xNewSizeBytes ); - *( ( NetworkBufferDescriptor_t ** ) ( pucBuffer - ipBUFFER_PADDING ) ) = pxNetworkBuffer; - #else - memcpy( pucBuffer - ipBUFFER_PADDING, pxNetworkBuffer->pucEthernetBuffer - ipBUFFER_PADDING, xNewSizeBytes ); - #endif /* #ifdef PIC32_USE_ETHERNET */ - - vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); - pxNetworkBuffer->pucEthernetBuffer = pucBuffer; - } - - return pxNetworkBuffer; -} +/* + * FreeRTOS+TCP Labs Build 160919 (C) 2016 Real Time Engineers ltd. + * Authors include Hein Tibosch and Richard Barry + * + ******************************************************************************* + ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** + *** *** + *** *** + *** FREERTOS+TCP IS STILL IN THE LAB (mainly because the FTP and HTTP *** + *** demos have a dependency on FreeRTOS+FAT, which is only in the Labs *** + *** download): *** + *** *** + *** FreeRTOS+TCP is functional and has been used in commercial products *** + *** for some time. Be aware however that we are still refining its *** + *** design, the source code does not yet quite conform to the strict *** + *** coding and style standards mandated by Real Time Engineers ltd., and *** + *** the documentation and testing is not necessarily complete. *** + *** *** + *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** + *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** + *** the sole discretion of Real Time Engineers Ltd., be offered versions *** + *** under a license other than that described below. *** + *** *** + *** *** + ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** + ******************************************************************************* + * + * FreeRTOS+TCP can be used under two different free open source licenses. The + * license that applies is dependent on the processor on which FreeRTOS+TCP is + * executed, as follows: + * + * If FreeRTOS+TCP is executed on one of the processors listed under the Special + * License Arrangements heading of the FreeRTOS+TCP license information web + * page, then it can be used under the terms of the FreeRTOS Open Source + * License. If FreeRTOS+TCP is used on any other processor, then it can be used + * under the terms of the GNU General Public License V2. Links to the relevant + * licenses follow: + * + * The FreeRTOS+TCP License Information Page: http://www.FreeRTOS.org/tcp_license + * The FreeRTOS Open Source License: http://www.FreeRTOS.org/license + * The GNU General Public License Version 2: http://www.FreeRTOS.org/gpl-2.0.txt + * + * FreeRTOS+TCP is distributed in the hope that it will be useful. You cannot + * use FreeRTOS+TCP unless you agree that you use the software 'as is'. + * FreeRTOS+TCP is provided WITHOUT ANY WARRANTY; without even the implied + * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they + * implied, expressed, or statutory. + * + * 1 tab == 4 spaces! + * + * http://www.FreeRTOS.org + * http://www.FreeRTOS.org/plus + * http://www.FreeRTOS.org/labs + * + */ + +/****************************************************************************** +* +* See the following web page for essential buffer allocation scheme usage and +* configuration details: +* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Buffer_Management.html +* +******************************************************************************/ + +/* THIS FILE SHOULD NOT BE USED IF THE PROJECT INCLUDES A MEMORY ALLOCATOR + * THAT WILL FRAGMENT THE HEAP MEMORY. For example, heap_2 must not be used, + * heap_4 can be used. */ + +/* Standard includes. */ +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" + +/* FreeRTOS+TCP includes. */ +#include "FreeRTOS_IP.h" +#include "FreeRTOS_UDP_IP.h" +#include "FreeRTOS_IP_Private.h" +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" + +#include "tcpip/tcpip.h" +#include "tcpip/src/tcpip_private.h" + +#include "NetworkConfig.h" + +/* The obtained network buffer must be large enough to hold a packet that might + * replace the packet that was requested to be sent. */ +#if ipconfigUSE_TCP == 1 + #define baMINIMAL_BUFFER_SIZE sizeof( TCPPacket_t ) +#else + #define baMINIMAL_BUFFER_SIZE sizeof( ARPPacket_t ) +#endif /* ipconfigUSE_TCP == 1 */ + +/*_RB_ This is too complex not to have an explanation. */ +#if defined( ipconfigETHERNET_MINIMUM_PACKET_BYTES ) + #define ASSERT_CONCAT_( a, b ) a ## b + #define ASSERT_CONCAT( a, b ) ASSERT_CONCAT_( a, b ) + #define STATIC_ASSERT( e ) \ + ; enum { ASSERT_CONCAT( assert_line_, __LINE__ ) = 1 / ( !!( e ) ) } + + STATIC_ASSERT( ipconfigETHERNET_MINIMUM_PACKET_BYTES <= baMINIMAL_BUFFER_SIZE ); +#endif + +/* A list of free (available) NetworkBufferDescriptor_t structures. */ +static List_t xFreeBuffersList; + +/* Some statistics about the use of buffers. */ +static size_t uxMinimumFreeNetworkBuffers; + +/* Declares the pool of NetworkBufferDescriptor_t structures that are available + * to the system. All the network buffers referenced from xFreeBuffersList exist + * in this array. The array is not accessed directly except during initialisation, + * when the xFreeBuffersList is filled (as all the buffers are free when the system + * is booted). */ +static NetworkBufferDescriptor_t xNetworkBufferDescriptors[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ]; + +/* This constant is defined as false to let FreeRTOS_TCP_IP.c know that the + * network buffers have a variable size: resizing may be necessary */ +const BaseType_t xBufferAllocFixedSize = pdFALSE; + +/* The semaphore used to obtain network buffers. */ +static SemaphoreHandle_t xNetworkBufferSemaphore = NULL; + +/*-----------------------------------------------------------*/ + +#ifdef PIC32_USE_ETHERNET + + /* PIC32 specific stuff */ + /* */ + + /* MAC packet acknowledgment, once MAC is done with it */ + static bool PIC32_MacPacketAcknowledge( TCPIP_MAC_PACKET * pPkt, + const void * param ); + + /* allocates a MAC packet that holds a data buffer that can be used by both: */ + /* - the FreeRTOSIP (NetworkBufferDescriptor_t->pucEthernetBuffer) */ + /* - the Harmony MAC driver: TCPIP_MAC_PACKET->pDSeg->segLoad */ + /* from the beginning of the buffer: */ + /* - 4 bytes pointer to the network descriptor (FreeRTOS) */ + /* - 4 bytes pointer to the MAC packet (pic32_NetworkInterface.c) */ + /* - 2 bytes offset from the MAC packet (Harmony MAC driver: segLoadOffset) */ + /* */ + /* NOTE: segLoadLen should NOT include: */ + /* - the TCPIP_MAC_FRAME_OFFSET (== ipBUFFER_PADDING which should be == 10!) */ + /* - the sizeof(TCPIP_MAC_ETHERNET_HEADER) */ + /* These are added by the MAC packet allocation! */ + /* */ + static uint8_t * PIC32_PktAlloc( uint16_t pktLen, + uint16_t segLoadLen, + TCPIP_MAC_PACKET_ACK_FUNC ackF, + TCPIP_MAC_PACKET ** pPtrPkt ) + { + uint8_t * pBuff = 0; + + /* allocate standard packet */ + TCPIP_MAC_PACKET * pPkt = TCPIP_PKT_PacketAlloc( pktLen, segLoadLen, 0 ); + + /* set the MAC packet pointer in the packet */ + if( pPkt != 0 ) + { + pBuff = pPkt->pDSeg->segLoad; + TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pBuff - PIC32_BUFFER_PKT_PTR_OSSET ); + configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); + *ppkt = pPkt; /* store the packet it comes from */ + pPkt->ackFunc = ackF; + pPkt->ackParam = 0; + } + + if( pPtrPkt != 0 ) + { + *pPtrPkt = pPkt; + } + + return pBuff; + } + + + + /* standard PIC32 MAC allocation function for a MAC packet */ + /* this packet saves room for the FreeRTOS network descriptor */ + /* at the beginning of the data buffer */ + /* see NetworkBufferAllocate */ + /* Note: flags parameter is ignored since that's used in the Harmony stack only */ + TCPIP_MAC_PACKET * PIC32_MacPacketAllocate( uint16_t pktLen, + uint16_t segLoadLen, + TCPIP_MAC_PACKET_FLAGS flags ) + { + TCPIP_MAC_PACKET * pPkt; + + PIC32_PktAlloc( pktLen, segLoadLen, 0, &pPkt ); + + return pPkt; + } + + /* standard PIC32 MAC packet acknowledgment */ + /* function called once MAC is done with it */ + static bool PIC32_MacPacketAcknowledge( TCPIP_MAC_PACKET * pPkt, + const void * param ) + { + configASSERT( ( pPkt != 0 ) ); + + TCPIP_PKT_PacketFree( pPkt ); + + return false; + } + + /* associates the current MAC packet with a network descriptor */ + /* mainly for RX packet */ + void PIC32_MacAssociate( TCPIP_MAC_PACKET * pRxPkt, + NetworkBufferDescriptor_t * pxBufferDescriptor, + size_t pktLength ) + { + uint8_t * pPktBuff = pRxPkt->pDSeg->segLoad; + + pxBufferDescriptor->pucEthernetBuffer = pPktBuff; + pxBufferDescriptor->xDataLength = pktLength; + + /* make sure this is a properly allocated packet */ + TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pPktBuff - PIC32_BUFFER_PKT_PTR_OSSET ); + configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); + + if( *ppkt != pRxPkt ) + { + configASSERT( false ); + } + + /* set the proper descriptor info */ + NetworkBufferDescriptor_t ** ppDcpt = ( NetworkBufferDescriptor_t ** ) ( pPktBuff - ipBUFFER_PADDING ); + configASSERT( ( ( uint32_t ) ppDcpt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); + *ppDcpt = pxBufferDescriptor; + } + + /* debug functionality */ + void PIC32_MacPacketOrphan( TCPIP_MAC_PACKET * pPkt ) + { + TCPIP_PKT_PacketFree( pPkt ); + configASSERT( false ); + } + + /* FreeRTOS allocation functions */ + + /* allocates a buffer that can be used by both: */ + /* - the FreeRTOSIP (NetworkBufferDescriptor_t->pucEthernetBuffer) */ + /* - the Harmony MAC driver: TCPIP_MAC_PACKET */ + /* See PIC32_PktAlloc for details */ + /* */ + /* NOTE: reqLength should NOT include the ipBUFFER_PADDING (which should be == 10!) */ + /* or the sizeof(TCPIP_MAC_ETHERNET_HEADER) */ + /* These are added by the MAC packet allocation! */ + /* */ + uint8_t * NetworkBufferAllocate( size_t reqLength ) + { + return PIC32_PktAlloc( sizeof( TCPIP_MAC_PACKET ), reqLength, PIC32_MacPacketAcknowledge, 0 ); + } + + /* deallocates a network buffer previously allocated */ + /* with NetworkBufferAllocate */ + void NetworkBufferFree( uint8_t * pNetworkBuffer ) + { + if( pNetworkBuffer != 0 ) + { + TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pNetworkBuffer - PIC32_BUFFER_PKT_PTR_OSSET ); + configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); + TCPIP_MAC_PACKET * pPkt = *ppkt; + configASSERT( ( pPkt != 0 ) ); + + if( pPkt->ackFunc != 0 ) + { + ( *pPkt->ackFunc )( pPkt, pPkt->ackParam ); + } + else + { /* ??? */ + PIC32_MacPacketOrphan( pPkt ); + } + } + } + +#endif /* #ifdef PIC32_USE_ETHERNET */ + +/*-----------------------------------------------------------*/ + +BaseType_t xNetworkBuffersInitialise( void ) +{ + BaseType_t xReturn, x; + + /* Only initialise the buffers and their associated kernel objects if they + * have not been initialised before. */ + if( xNetworkBufferSemaphore == NULL ) + { + xNetworkBufferSemaphore = xSemaphoreCreateCounting( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ); + configASSERT( xNetworkBufferSemaphore ); + + if( xNetworkBufferSemaphore != NULL ) + { + #if ( configQUEUE_REGISTRY_SIZE > 0 ) + { + vQueueAddToRegistry( xNetworkBufferSemaphore, "NetBufSem" ); + } + #endif /* configQUEUE_REGISTRY_SIZE */ + + /* If the trace recorder code is included name the semaphore for viewing + * in FreeRTOS+Trace. */ + #if ( ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 ) + { + extern QueueHandle_t xNetworkEventQueue; + vTraceSetQueueName( xNetworkEventQueue, "IPStackEvent" ); + vTraceSetQueueName( xNetworkBufferSemaphore, "NetworkBufferCount" ); + } + #endif /* ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 */ + + vListInitialise( &xFreeBuffersList ); + + /* Initialise all the network buffers. No storage is allocated to + * the buffers yet. */ + for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ ) + { + /* Initialise and set the owner of the buffer list items. */ + xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL; + vListInitialiseItem( &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); + listSET_LIST_ITEM_OWNER( &( xNetworkBufferDescriptors[ x ].xBufferListItem ), &xNetworkBufferDescriptors[ x ] ); + + /* Currently, all buffers are available for use. */ + vListInsert( &xFreeBuffersList, &( xNetworkBufferDescriptors[ x ].xBufferListItem ) ); + } + + uxMinimumFreeNetworkBuffers = ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; + } + } + + if( xNetworkBufferSemaphore == NULL ) + { + xReturn = pdFAIL; + } + else + { + xReturn = pdPASS; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +uint8_t * pucGetNetworkBuffer( size_t * pxRequestedSizeBytes ) +{ + uint8_t * pucEthernetBuffer; + size_t xSize = *pxRequestedSizeBytes; + + if( xSize < baMINIMAL_BUFFER_SIZE ) + { + /* Buffers must be at least large enough to hold a TCP-packet with + * headers, or an ARP packet, in case TCP is not included. */ + xSize = baMINIMAL_BUFFER_SIZE; + } + + /* Round up xSize to the nearest multiple of N bytes, + * where N equals 'sizeof( size_t )'. */ + if( ( xSize & ( sizeof( size_t ) - 1u ) ) != 0u ) + { + xSize = ( xSize | ( sizeof( size_t ) - 1u ) ) + 1u; + } + + *pxRequestedSizeBytes = xSize; + + /* Allocate a buffer large enough to store the requested Ethernet frame size + * and a pointer to a network buffer structure (hence the addition of + * ipBUFFER_PADDING bytes). */ + + #ifdef PIC32_USE_ETHERNET + pucEthernetBuffer = NetworkBufferAllocate( xSize - sizeof( TCPIP_MAC_ETHERNET_HEADER ) ); + #else + pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xSize + ipBUFFER_PADDING ); + #endif /* #ifdef PIC32_USE_ETHERNET */ + + configASSERT( pucEthernetBuffer ); + + if( pucEthernetBuffer != NULL ) + { + /* Enough space is left at the start of the buffer to place a pointer to + * the network buffer structure that references this Ethernet buffer. + * Return a pointer to the start of the Ethernet buffer itself. */ + #ifndef PIC32_USE_ETHERNET + pucEthernetBuffer += ipBUFFER_PADDING; + #endif /* #ifndef PIC32_USE_ETHERNET */ + } + + return pucEthernetBuffer; +} +/*-----------------------------------------------------------*/ + +void vReleaseNetworkBuffer( uint8_t * pucEthernetBuffer ) +{ + /* There is space before the Ethernet buffer in which a pointer to the + * network buffer that references this Ethernet buffer is stored. Remove the + * space before freeing the buffer. */ + #ifdef PIC32_USE_ETHERNET + NetworkBufferFree( pucEthernetBuffer ); + #else + if( pucEthernetBuffer != NULL ) + { + pucEthernetBuffer -= ipBUFFER_PADDING; + vPortFree( ( void * ) pucEthernetBuffer ); + } + #endif /* #ifdef PIC32_USE_ETHERNET */ +} +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t * pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, + TickType_t xBlockTimeTicks ) +{ + NetworkBufferDescriptor_t * pxReturn = NULL; + size_t uxCount; + + if( ( xRequestedSizeBytes != 0u ) && ( xRequestedSizeBytes < ( size_t ) baMINIMAL_BUFFER_SIZE ) ) + { + /* ARP packets can replace application packets, so the storage must be + * at least large enough to hold an ARP. */ + xRequestedSizeBytes = baMINIMAL_BUFFER_SIZE; + } + + #ifdef PIC32_USE_ETHERNET + if( xRequestedSizeBytes != 0u ) + { + #endif /* #ifdef PIC32_USE_ETHERNET */ + xRequestedSizeBytes += 2u; + + if( ( xRequestedSizeBytes & ( sizeof( size_t ) - 1u ) ) != 0u ) + { + xRequestedSizeBytes = ( xRequestedSizeBytes | ( sizeof( size_t ) - 1u ) ) + 1u; + } + #ifdef PIC32_USE_ETHERNET + } + #endif /* #ifdef PIC32_USE_ETHERNET */ + + /* If there is a semaphore available, there is a network buffer available. */ + if( xSemaphoreTake( xNetworkBufferSemaphore, xBlockTimeTicks ) == pdPASS ) + { + /* Protect the structure as it is accessed from tasks and interrupts. */ + taskENTER_CRITICAL(); + { + pxReturn = ( NetworkBufferDescriptor_t * ) listGET_OWNER_OF_HEAD_ENTRY( &xFreeBuffersList ); + uxListRemove( &( pxReturn->xBufferListItem ) ); + } + taskEXIT_CRITICAL(); + + /* Reading UBaseType_t, no critical section needed. */ + uxCount = listCURRENT_LIST_LENGTH( &xFreeBuffersList ); + + if( uxMinimumFreeNetworkBuffers > uxCount ) + { + uxMinimumFreeNetworkBuffers = uxCount; + } + + /* Allocate storage of exactly the requested size to the buffer. */ + configASSERT( pxReturn->pucEthernetBuffer == NULL ); + + if( xRequestedSizeBytes > 0 ) + { + /* Extra space is obtained so a pointer to the network buffer can + * be stored at the beginning of the buffer. */ + + #ifdef PIC32_USE_ETHERNET + pxReturn->pucEthernetBuffer = NetworkBufferAllocate( xRequestedSizeBytes - sizeof( TCPIP_MAC_ETHERNET_HEADER ) ); + #else + pxReturn->pucEthernetBuffer = ( uint8_t * ) pvPortMalloc( xRequestedSizeBytes + ipBUFFER_PADDING ); + #endif /* #ifdef PIC32_USE_ETHERNET */ + + if( pxReturn->pucEthernetBuffer == NULL ) + { + /* The attempt to allocate storage for the buffer payload failed, + * so the network buffer structure cannot be used and must be + * released. */ + vReleaseNetworkBufferAndDescriptor( pxReturn ); + pxReturn = NULL; + } + else + { + /* Store a pointer to the network buffer structure in the + * buffer storage area, then move the buffer pointer on past the + * stored pointer so the pointer value is not overwritten by the + * application when the buffer is used. */ + #ifdef PIC32_USE_ETHERNET + *( ( NetworkBufferDescriptor_t ** ) ( pxReturn->pucEthernetBuffer - ipBUFFER_PADDING ) ) = pxReturn; + #else + *( ( NetworkBufferDescriptor_t ** ) ( pxReturn->pucEthernetBuffer ) ) = pxReturn; + pxReturn->pucEthernetBuffer += ipBUFFER_PADDING; + #endif /* #ifdef PIC32_USE_ETHERNET */ + + /* Store the actual size of the allocated buffer, which may be + * greater than the original requested size. */ + pxReturn->xDataLength = xRequestedSizeBytes; + + #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) + { + /* make sure the buffer is not linked */ + pxReturn->pxNextBuffer = NULL; + } + #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ + } + } + else + { + /* A descriptor is being returned without an associated buffer being + * allocated. */ + } + } + + if( pxReturn == NULL ) + { + iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER(); + } + else + { + iptraceNETWORK_BUFFER_OBTAINED( pxReturn ); + } + + return pxReturn; +} +/*-----------------------------------------------------------*/ + +void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer ) +{ + BaseType_t xListItemAlreadyInFreeList; + + /* Ensure the buffer is returned to the list of free buffers before the + * counting semaphore is 'given' to say a buffer is available. Release the + * storage allocated to the buffer payload. THIS FILE SHOULD NOT BE USED + * IF THE PROJECT INCLUDES A MEMORY ALLOCATOR THAT WILL FRAGMENT THE HEAP + * MEMORY. For example, heap_2 must not be used, heap_4 can be used. */ + vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); + pxNetworkBuffer->pucEthernetBuffer = NULL; + + taskENTER_CRITICAL(); + { + xListItemAlreadyInFreeList = listIS_CONTAINED_WITHIN( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); + + if( xListItemAlreadyInFreeList == pdFALSE ) + { + vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) ); + } + } + taskEXIT_CRITICAL(); + + /* + * Update the network state machine, unless the program fails to release its 'xNetworkBufferSemaphore'. + * The program should only try to release its semaphore if 'xListItemAlreadyInFreeList' is false. + */ + if( xListItemAlreadyInFreeList == pdFALSE ) + { + if ( xSemaphoreGive( xNetworkBufferSemaphore ) == pdTRUE ) + { + iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); + } + } + else + { + iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer ); + } +} +/*-----------------------------------------------------------*/ + +/* + * Returns the number of free network buffers + */ +UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) +{ + return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); +} +/*-----------------------------------------------------------*/ + +UBaseType_t uxGetMinimumFreeNetworkBuffers( void ) +{ + return uxMinimumFreeNetworkBuffers; +} +/*-----------------------------------------------------------*/ + +NetworkBufferDescriptor_t * pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer, + size_t xNewSizeBytes ) +{ + size_t xOriginalLength; + uint8_t * pucBuffer; + + #ifdef PIC32_USE_ETHERNET + xOriginalLength = pxNetworkBuffer->xDataLength; + #else + xOriginalLength = pxNetworkBuffer->xDataLength + ipBUFFER_PADDING; + xNewSizeBytes = xNewSizeBytes + ipBUFFER_PADDING; + #endif /* #ifdef PIC32_USE_ETHERNET */ + + pucBuffer = pucGetNetworkBuffer( &( xNewSizeBytes ) ); + + if( pucBuffer == NULL ) + { + /* In case the allocation fails, return NULL. */ + pxNetworkBuffer = NULL; + } + else + { + pxNetworkBuffer->xDataLength = xNewSizeBytes; + if( xNewSizeBytes > xOriginalLength ) + { + xNewSizeBytes = xOriginalLength; + } + + #ifdef PIC32_USE_ETHERNET + memcpy( pucBuffer, pxNetworkBuffer->pucEthernetBuffer, xNewSizeBytes ); + *( ( NetworkBufferDescriptor_t ** ) ( pucBuffer - ipBUFFER_PADDING ) ) = pxNetworkBuffer; + #else + memcpy( pucBuffer - ipBUFFER_PADDING, pxNetworkBuffer->pucEthernetBuffer - ipBUFFER_PADDING, xNewSizeBytes ); + #endif /* #ifdef PIC32_USE_ETHERNET */ + + vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer ); + pxNetworkBuffer->pucEthernetBuffer = pucBuffer; + } + + return pxNetworkBuffer; +} diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_eth.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_eth.c index 1b7584c44..5fe4438bd 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_eth.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_eth.c @@ -1,889 +1,889 @@ -/******************************************************************************* -* Network Interface file -* -* Summary: -* Network Interface file for FreeRTOS-Plus-TCP stack -* -* Description: -* - Interfaces PIC32 to the FreeRTOS TCP/IP stack -*******************************************************************************/ - -/******************************************************************************* -* File Name: pic32_NetworkInterface.c -* Copyright 2017 Microchip Technology Incorporated and its subsidiaries. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy of -* this software and associated documentation files (the "Software"), to deal in -* the Software without restriction, including without limitation the rights to -* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -* of the Software, and to permit persons to whom the Software is furnished to do -* so, subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE -*******************************************************************************/ -#include - -#include "FreeRTOS.h" -#include "semphr.h" -#include "event_groups.h" -#include "FreeRTOS_IP.h" -#include "FreeRTOS_IP_Private.h" - -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" - - -#include "NetworkInterface.h" -#include "NetworkConfig.h" - -#include "peripheral/eth/plib_eth.h" - -#include "system_config.h" -#include "system/console/sys_console.h" -#include "system/debug/sys_debug.h" -#include "system/command/sys_command.h" - -#include "driver/ethmac/drv_ethmac.h" -#include "driver/miim/drv_miim.h" - -#include "tcpip/tcpip.h" -#include "tcpip/src/tcpip_private.h" -#include "tcpip/src/link_list.h" - -#ifdef PIC32_USE_ETHERNET - - /* local definitions and data */ - - /* debug messages */ - #if ( PIC32_MAC_DEBUG_MESSAGES != 0 ) - #define PIC32_MAC_DbgPrint( format, ... ) SYS_CONSOLE_PRINT( format, ## __VA_ARGS__ ) - #else - #define PIC32_MAC_DbgPrint( format, ... ) - #endif /* (PIC32_MAC_DEBUG_MESSAGES != 0) */ - - typedef enum - { - PIC32_MAC_EVENT_INIT_NONE = 0x000, /* no event/invalid */ - - PIC32_MAC_EVENT_INIT_DONE = 0x001, /* initialization done event */ - PIC32_MAC_EVENT_TIMEOUT = 0x002, /* periodic timeout event */ - PIC32_MAC_EVENT_IF_PENDING = 0x004, /* an interface event signal: RX, TX, errors. etc. */ - } PIC32_MAC_EVENT_TYPE; - - typedef enum - { - eMACInit, /* Must initialise MAC. */ - eMACPass, /* Initialisation was successful. */ - eMACFailed, /* Initialisation failed. */ - } eMAC_INIT_STATUS_TYPE; - - static TCPIP_STACK_HEAP_HANDLE macHeapHandle; - - static const TCPIP_MAC_OBJECT * macObject; /* the one and only MAC object; */ - - static SYS_MODULE_OBJ macObjHandle; /* the MAC object instance, obtained at initialization */ - static TCPIP_MAC_HANDLE macCliHandle; /* client handle */ - static volatile SYS_STATUS macObjStatus; /* current MAC status */ - - static TaskHandle_t macTaskHandle; - - static TimerHandle_t macTmrHandle; - - static bool macLinkStatus; /* true if link is ON */ - - static eMAC_INIT_STATUS_TYPE xMacInitStatus = eMACInit; - - /* local prototypes */ - static bool StartInitMac( void ); - static void StartInitCleanup( void ); - - static void SetMacCtrl( TCPIP_MAC_MODULE_CTRL * pMacCtrl ); - - static bool MacSyncFunction( void * synchHandle, - TCPIP_MAC_SYNCH_REQUEST req ); - - /* the PIC32 MAC task function */ - static void MacHandlerTask( void * params ); - - /* MAC interrupt event function */ - static void MAC_EventFunction( TCPIP_MAC_EVENT event, - const void * eventParam ); - - /* timer callback for link maintenance, etc; */ - static void MacTmrCallback( TimerHandle_t xTimer ); - - /* MAC RX packets functions */ - static void MacRxPackets( void ); - static void MacProcessRxPacket( TCPIP_MAC_PACKET * pRxPkt ); - - - /* memory allocation mapping to FreeRTOS */ - static void * _malloc( size_t nBytes ) - { - return pvPortMalloc( nBytes ); - } - - /*-----------------------------------------------------------*/ - - static void * _calloc( size_t nElems, - size_t elemSize ) - { - size_t nBytes = nElems * elemSize; - - void * ptr = pvPortMalloc( nBytes ); - - if( ptr != 0 ) - { - memset( ptr, 0, nBytes ); - } - - return ptr; - } - - /*-----------------------------------------------------------*/ - - static void _free( void * pBuff ) - { - vPortFree( pBuff ); - } - - /* extern references */ - /* */ - /* use the configuration data from the system_init.c */ - extern const TCPIP_NETWORK_CONFIG TCPIP_HOSTS_CONFIGURATION[]; - - /* BufferAllocation_2.c:: packet allocation function */ - extern TCPIP_MAC_PACKET * PIC32_MacPacketAllocate( uint16_t pktLen, - uint16_t segLoadLen, - TCPIP_MAC_PACKET_FLAGS flags ); - - extern void PIC32_MacAssociate( TCPIP_MAC_PACKET * pRxPkt, - NetworkBufferDescriptor_t * pxBufferDescriptor, - size_t pktLength ); - extern void PIC32_MacPacketOrphan( TCPIP_MAC_PACKET * pPkt ); - - /* cannot use the system_init.c::tcpipHeapConfig because FreeRTOS does not have a calloc function! */ - /* we build it here! */ - - /* make sure we're running with external heap! Redirect to FreeRTOS. */ - #if !defined( TCPIP_STACK_USE_EXTERNAL_HEAP ) || defined( TCPIP_STACK_USE_INTERNAL_HEAP ) || defined( TCPIP_STACK_USE_INTERNAL_HEAP_POOL ) - #error "TCPIP_STACK_USE_EXTERNAL_HEAP should be defined for this project!" - #endif - - static const TCPIP_STACK_HEAP_EXTERNAL_CONFIG tcpipHeapConfig = - { - .heapType = TCPIP_STACK_HEAP_TYPE_EXTERNAL_HEAP, - .heapFlags = TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED | TCPIP_STACK_HEAP_FLAG_NO_MTHREAD_SYNC, - .heapUsage = TCPIP_STACK_HEAP_USE_DEFAULT, - .malloc_fnc = _malloc, - .calloc_fnc = _calloc, - .free_fnc = _free, - }; - - #if ( PIC32_MAC_DEBUG_COMMANDS != 0 ) - static int _Command_MacInfo( SYS_CMD_DEVICE_NODE * pCmdIO, - int argc, - char ** argv ); - static int _Command_NetInfo( SYS_CMD_DEVICE_NODE * pCmdIO, - int argc, - char ** argv ); - static int _Command_Version( SYS_CMD_DEVICE_NODE * pCmdIO, - int argc, - char ** argv ); - - static const SYS_CMD_DESCRIPTOR macCmdTbl[] = - { - { "macinfo", _Command_MacInfo, ": Check MAC statistics" }, - { "netinfo", _Command_NetInfo, ": Net info" }, - { "version", _Command_Version, ": Version info" }, - }; - #endif /* (PIC32_MAC_DEBUG_COMMANDS != 0) */ - - - /* FreeRTOS implementation functions */ - BaseType_t xNetworkInterfaceInitialise( void ) - { - BaseType_t xResult; - - if( xMacInitStatus == eMACInit ) - { - /* This is the first time this function is called. */ - if( StartInitMac() != false ) - { - /* Indicate that the MAC initialisation succeeded. */ - xMacInitStatus = eMACPass; - } - else - { - xMacInitStatus = eMACFailed; - } - } - - if( xMacInitStatus == eMACPass ) - { - xResult = xGetPhyLinkStatus(); - } - else - { - xResult = pdFAIL; - } - - PIC32_MAC_DbgPrint( "xNetworkInterfaceInitialise: %d %d\r\n", ( int ) xMacInitStatus, ( int ) xResult ); - - return xResult; - } - - - /*-----------------------------------------------------------*/ - - BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, - BaseType_t xReleaseAfterSend ) - { - TCPIP_MAC_RES macRes; - TCPIP_MAC_PACKET * pTxPkt; - - BaseType_t retRes = pdFALSE; - - - if( ( pxDescriptor != 0 ) && ( pxDescriptor->pucEthernetBuffer != 0 ) && ( pxDescriptor->xDataLength != 0 ) ) - { - TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pxDescriptor->pucEthernetBuffer - PIC32_BUFFER_PKT_PTR_OSSET ); - configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); - pTxPkt = *ppkt; - configASSERT( pTxPkt != 0 ); - - /* prepare the packet for transmission */ - /* set the correct data length: */ - configASSERT( pTxPkt->pDSeg->segSize >= pTxPkt->pDSeg->segLen ); - pTxPkt->pDSeg->segLen = pxDescriptor->xDataLength; - pTxPkt->next = 0; /* unlink it */ - macRes = ( macObject->TCPIP_MAC_PacketTx )( macCliHandle, pTxPkt ); - - if( macRes >= 0 ) - { - retRes = pdTRUE; - pxDescriptor->pucEthernetBuffer = 0; /* it will be released by the MAC driver once it's transmitted */ - iptraceNETWORK_INTERFACE_TRANSMIT(); - } - - /* else same error occurred; this normally should not happen! But the buffer is left in there so it shold be freed! */ - - /* The buffer has been sent so can be released. */ - if( xReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - } - - return retRes; - } - - - /************************************* Section: helper functions ************************************************** */ - /* */ - - void PIC32_GetMACAddress( uint8_t macAdd[ 6 ] ) - { - #if defined( __PIC32MZ__ ) || defined( __PIC32MX__ ) - PLIB_ETH_MACGetAddress( ETH_ID_0, macAdd ); - #else - #error "MAC Address: not supported architecture!" - #endif - } - - - /*-----------------------------------------------------------*/ - - const void * const PIC32_GetMacConfigData( void ) - { - #if defined( __PIC32MZ__ ) || defined( __PIC32MX__ ) - extern const TCPIP_MODULE_MAC_PIC32INT_CONFIG tcpipMACPIC32INTInitData; - - return &tcpipMACPIC32INTInitData; - #else - #error "MAC Address: not supported architecture!" - #endif - } - - /************************************* Section: worker code ************************************************** */ - /* */ - - - static bool StartInitMac( void ) - { - TCPIP_MAC_MODULE_CTRL macCtrl; - SYS_MODULE_INIT moduleInit; - EventBits_t evBits; - - - /* perform some initialization of all variables so that we can cleanup what failed */ - /* if something failed, the routine will be called again and again by FreeRTOS! */ - macHeapHandle = 0; - macObjHandle = 0; - macCliHandle = 0; - macTmrHandle = 0; - macTaskHandle = 0; - macObject = TCPIP_HOSTS_CONFIGURATION[ 0 ].pMacObject; /* the MAC object we use */ - macObjStatus = SYS_STATUS_UNINITIALIZED; - macLinkStatus = false; - - int netUpFail = 0; - - while( true ) - { - /* start the allocator */ - macHeapHandle = TCPIP_HEAP_Create( ( const TCPIP_STACK_HEAP_CONFIG * ) &tcpipHeapConfig, 0 ); - - if( macHeapHandle == 0 ) - { - netUpFail = 1; - break; - } - - if( TCPIP_PKT_Initialize( macHeapHandle, 0, 0 ) == false ) - { - netUpFail = 2; - break; - } - - moduleInit.sys.powerState = SYS_MODULE_POWER_RUN_FULL; - - /* Initialize the MAC. MAC address is defined to 0x000000000000 in - * FreeRTOSConfig.h and therefore it will be initialized to the - * factory programmed MAC address. */ - SetMacCtrl( &macCtrl ); - /* Set the mac address in the FreeRTOS+TCP stack. */ - FreeRTOS_UpdateMACAddress( macCtrl.ifPhyAddress.v ); - - TCPIP_MAC_INIT macInit = - { - .moduleInit = { moduleInit.value }, - .macControl = &macCtrl, - .moduleData = PIC32_GetMacConfigData(), - }; - - macObjHandle = ( macObject->TCPIP_MAC_Initialize )( TCPIP_MODULE_MAC_PIC32INT, &macInit.moduleInit ); - - if( macObjHandle == SYS_MODULE_OBJ_INVALID ) - { - macObjHandle = 0; - netUpFail = 4; - break; - } - - /* open the MAC */ - macCliHandle = ( macObject->TCPIP_MAC_Open )( TCPIP_MODULE_MAC_PIC32INT, DRV_IO_INTENT_READWRITE ); - - if( macCliHandle == DRV_HANDLE_INVALID ) - { - macCliHandle = 0; - netUpFail = 5; - break; - } - - if( !( macObject->TCPIP_MAC_EventMaskSet )( macCliHandle, ( TCPIP_MAC_EV_RX_DONE | TCPIP_MAC_EV_TX_DONE | TCPIP_MAC_EV_RXTX_ERRORS ), true ) ) - { - netUpFail = 6; - break; - } - - /* completed the MAC initialization */ - /* continue the initialization */ - macTmrHandle = xTimerCreate( PIC32_MAC_TIMER_NAME, PIC32_MAC_TIMER_PERIOD, pdTRUE, 0, MacTmrCallback ); - - if( ( macTmrHandle == 0 ) || ( xTimerStart( macTmrHandle, 0 ) != pdPASS ) ) - { - netUpFail = 8; - break; - } - - /* spawn the PIC32 MAC task function */ - /* and wait for its event signal */ - macObjStatus = SYS_STATUS_BUSY; - - if( xTaskCreate( MacHandlerTask, PIC32_MAC_TASK_NAME, PIC32_MAC_TASK_STACK_SIZE, xTaskGetCurrentTaskHandle(), PIC32_MAC_TASK_PRI, &macTaskHandle ) != pdPASS ) - { /* failed */ - netUpFail = 9; - break; - } - - xTaskNotifyWait( PIC32_MAC_EVENT_INIT_DONE, PIC32_MAC_EVENT_INIT_DONE, &evBits, PIC32_MAC_INIT_TIMEOUT ); - - if( ( evBits & PIC32_MAC_EVENT_INIT_DONE ) == 0 ) - { /* timed out */ - netUpFail = 10; - break; - } - - if( macObjStatus != SYS_STATUS_READY ) - { /* failed somehow ??? */ - netUpFail = 11; - break; - } - - netUpFail = 0; - break; - } - - if( netUpFail == 0 ) - { - PIC32_MAC_DbgPrint( " MAC Init success!\r\n" ); - - #if ( PIC32_MAC_DEBUG_COMMANDS != 0 ) - /* create command group */ - if( !SYS_CMD_ADDGRP( macCmdTbl, sizeof( macCmdTbl ) / sizeof( *macCmdTbl ), "mac", ": mac commands" ) ) - { - PIC32_MAC_DbgPrint( "Failed to create MAC Commands\r\n" ); - } - #endif /* (PIC32_MAC_DEBUG_COMMANDS != 0) */ - - return true; - } - else - { - StartInitCleanup(); - PIC32_MAC_DbgPrint( "MAC Init failed: %d!\r\n", netUpFail ); - - return false; - } - } - - /*-----------------------------------------------------------*/ - - static void StartInitCleanup( void ) - { - if( macHeapHandle != 0 ) - { - TCPIP_HEAP_Delete( macHeapHandle ); - macHeapHandle = 0; - } - - if( macObjHandle != 0 ) - { - ( macObject->TCPIP_MAC_Deinitialize )( macObjHandle ); - macObjHandle = 0; - } - - if( macTmrHandle != 0 ) - { - xTimerDelete( macTmrHandle, portMAX_DELAY ); - macTmrHandle = 0; - } - - if( macTaskHandle != 0 ) - { - vTaskDelete( macTaskHandle ); - macTaskHandle = 0; - } - } - - /*-----------------------------------------------------------*/ - - static void SetMacCtrl( TCPIP_MAC_MODULE_CTRL * pMacCtrl ) - { - TCPIP_MAC_ADDR macAdd; - uint8_t unsetMACAddr[ 6 ] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* not set MAC address */ - - pMacCtrl->nIfs = 1; - - pMacCtrl->mallocF = TCPIP_HEAP_MallocOutline; - pMacCtrl->callocF = TCPIP_HEAP_CallocOutline; - pMacCtrl->freeF = TCPIP_HEAP_FreeOutline; - pMacCtrl->memH = macHeapHandle; - - - pMacCtrl->pktAllocF = PIC32_MacPacketAllocate; - pMacCtrl->pktFreeF = ( TCPIP_MAC_PKT_FreeF ) _TCPIP_PKT_FREE_FNC; - pMacCtrl->pktAckF = ( TCPIP_MAC_PKT_AckF ) _TCPIP_PKT_ACK_FNC; - - pMacCtrl->synchF = MacSyncFunction; - - pMacCtrl->eventF = MAC_EventFunction; - pMacCtrl->eventParam = 0; - - pMacCtrl->moduleId = TCPIP_MODULE_MAC_PIC32INT; - pMacCtrl->netIx = 0; - pMacCtrl->macAction = TCPIP_MAC_ACTION_INIT; - pMacCtrl->powerMode = TCPIP_MAC_POWER_FULL; - - macAdd.v[ 0 ] = configMAC_ADDR0; - macAdd.v[ 1 ] = configMAC_ADDR1; - macAdd.v[ 2 ] = configMAC_ADDR2; - macAdd.v[ 3 ] = configMAC_ADDR3; - macAdd.v[ 4 ] = configMAC_ADDR4; - macAdd.v[ 5 ] = configMAC_ADDR5; - - if( memcmp( macAdd.v, unsetMACAddr, sizeof( unsetMACAddr ) ) == 0 ) - { /* if unspecified we use the factory pre-programmed address */ - PIC32_GetMACAddress( pMacCtrl->ifPhyAddress.v ); - } - else - { /* use the config suggested one */ - memcpy( pMacCtrl->ifPhyAddress.v, macAdd.v, sizeof( macAdd ) ); - } - } - - /*-----------------------------------------------------------*/ - - static bool MacSyncFunction( void * synchHandle, - TCPIP_MAC_SYNCH_REQUEST req ) - { - switch( req ) - { - case TCPIP_MAC_SYNCH_REQUEST_OBJ_CREATE: - vSemaphoreCreateBinary( *( SemaphoreHandle_t * ) synchHandle ); - - return ( *( SemaphoreHandle_t * ) synchHandle == NULL ) ? false : true; - - case TCPIP_MAC_SYNCH_REQUEST_OBJ_DELETE: - vSemaphoreDelete( *( SemaphoreHandle_t * ) synchHandle ); - *( SemaphoreHandle_t * ) synchHandle = NULL; - - return true; - - case TCPIP_MAC_SYNCH_REQUEST_OBJ_LOCK: - - return ( xSemaphoreTake( *( SemaphoreHandle_t * ) synchHandle, portMAX_DELAY ) == pdTRUE ) ? true : false; - - case TCPIP_MAC_SYNCH_REQUEST_OBJ_UNLOCK: - - return ( xSemaphoreGive( *( SemaphoreHandle_t * ) synchHandle ) == pdTRUE ) ? true : false; - - case TCPIP_MAC_SYNCH_REQUEST_CRIT_ENTER: - vTaskSuspendAll(); - - return true; - - case TCPIP_MAC_SYNCH_REQUEST_CRIT_LEAVE: - xTaskResumeAll(); - - return true; - - default: - - return false; - } - } - - - /*-----------------------------------------------------------*/ - - static void MacHandlerTask( void * params ) - { - EventBits_t evBits; - - /* perform the MAC initialization */ - while( macObjStatus == SYS_STATUS_BUSY ) - { - /* process the underlying MAC module tasks */ - ( macObject->TCPIP_MAC_Tasks )( macObjHandle ); - - SYS_STATUS macStatus = ( macObject->TCPIP_MAC_Status )( macObjHandle ); - - if( macStatus == SYS_STATUS_BUSY ) - { /* still pending */ - vTaskDelay( PIC32_MAC_TASK_INIT_PENDING_DELAY ); - } - else - { /* completed ...somehow */ - macObjStatus = macStatus; - - xTaskNotify( ( TaskHandle_t ) params, PIC32_MAC_EVENT_INIT_DONE, eSetBits ); - - if( macStatus != SYS_STATUS_READY ) - { /* failed miserably */ - vTaskDelete( 0 ); - } - - /* done, up and running */ - } - } - - while( true ) - { - xTaskNotifyWait( PIC32_MAC_EVENT_TIMEOUT | PIC32_MAC_EVENT_IF_PENDING, PIC32_MAC_EVENT_TIMEOUT | PIC32_MAC_EVENT_IF_PENDING, &evBits, portMAX_DELAY ); - - if( ( evBits & PIC32_MAC_EVENT_TIMEOUT ) != 0 ) - { /* timeout occurred... */ - ( macObject->TCPIP_MAC_Tasks )( macObjHandle ); - bool linkCurr = ( macObject->TCPIP_MAC_LinkCheck )( macCliHandle ); /* check link status */ - - if( macLinkStatus != linkCurr ) - { /* link status changed; some event could ve fired here if needed */ - PIC32_MAC_DbgPrint( " MAC link: %s!\r\n", linkCurr ? "ON" : "OFF" ); - macLinkStatus = linkCurr; - } - } - - if( ( evBits & PIC32_MAC_EVENT_IF_PENDING ) != 0 ) - { /* IF events signal */ - TCPIP_MAC_EVENT activeEvents = ( macObject->TCPIP_MAC_EventPendingGet )( macCliHandle ); - - if( activeEvents != TCPIP_MAC_EV_NONE ) - { - /* acknowledge the events */ - ( macObject->TCPIP_MAC_EventAcknowledge )( macCliHandle, activeEvents ); - - /* check for RX */ - if( ( activeEvents & ( TCPIP_MAC_EV_RX_DONE | TCPIP_MAC_EV_RX_OVFLOW | TCPIP_MAC_EV_RX_BUFNA ) ) != 0 ) - { /* RX packets available */ - MacRxPackets(); - } - - /* call the driver process function; */ - /* PIC32 driver requests it through TCPIP_MAC_ParametersGet() which is bypassed here! */ - ( macObject->TCPIP_MAC_Process )( macCliHandle ); - } - } - - /* do what you have to do and then wait for another event... */ - } - } - - /*-----------------------------------------------------------*/ - - static void MacTmrCallback( TimerHandle_t xTimer ) - { - xTaskNotify( macTaskHandle, PIC32_MAC_EVENT_TIMEOUT, eSetBits ); - } - - /* MAC interrupt event function */ - /* MAC signals an event, probably from within ISR */ - /* we care just for RX related events */ - static void MAC_EventFunction( TCPIP_MAC_EVENT event, - const void * eventParam ) - { - BaseType_t xHigherPriorityTaskWoken; - - if( ( event & ( TCPIP_MAC_EV_RX_DONE | TCPIP_MAC_EV_TX_DONE | TCPIP_MAC_EV_RXTX_ERRORS ) ) != 0 ) - { - xHigherPriorityTaskWoken = pdFALSE; - xTaskNotifyFromISR( macTaskHandle, PIC32_MAC_EVENT_IF_PENDING, eSetBits, &xHigherPriorityTaskWoken ); - - if( xHigherPriorityTaskWoken ) - { - portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); - } - } - } - - /*-----------------------------------------------------------*/ - - BaseType_t xGetPhyLinkStatus( void ) - { - return macLinkStatus == true ? pdPASS : pdFAIL; - } - - - /* receive packets from the MAC driver */ - static void MacRxPackets( void ) - { - TCPIP_MAC_PACKET * pRxPkt; - - /* get all the new MAC packets */ - while( ( pRxPkt = ( macObject->TCPIP_MAC_PacketRx )( macCliHandle, 0, 0 ) ) != 0 ) - { - MacProcessRxPacket( pRxPkt ); - } - } - - /*-----------------------------------------------------------*/ - - static void MacProcessRxPacket( TCPIP_MAC_PACKET * pRxPkt ) - { - bool pktSuccess, pktLost; - size_t pktLength; - TCPIP_MAC_DATA_SEGMENT * pSeg; - uint8_t * pPktBuff; - NetworkBufferDescriptor_t * pxBufferDescriptor; - IPStackEvent_t xRxEvent; - - pxBufferDescriptor = 0; - pktSuccess = pktLost = false; - - while( true ) - { - pktLength = 0; - int nSegs = 0; - pSeg = pRxPkt->pDSeg; - pPktBuff = pSeg->segLoad; - - /* calculate the packet size */ - do - { - pktLength += pSeg->segLen; - pSeg = pSeg->next; - nSegs++; - } while( pSeg != 0 ); - - if( nSegs > 1 ) - { /* no support in FreeRTOS for multi segment packets! */ - break; - } - - /* sizeof(TCPIP_MAC_ETHERNET_HEADER) is subtracted by the driver */ - /* but FreeRTOS needs the whole frame! */ - pktLength += sizeof( TCPIP_MAC_ETHERNET_HEADER ); - - if( eConsiderFrameForProcessing( pPktBuff ) != eProcessBuffer ) - { - break; - } - - /* get the network descriptor (no data buffer) to hold this packet */ - pxBufferDescriptor = pxGetNetworkBufferWithDescriptor( 0, 0 ); - - if( pxBufferDescriptor == 0 ) - { - pktLost = true; - break; - } - - PIC32_MacAssociate( pRxPkt, pxBufferDescriptor, pktLength ); - - xRxEvent.eEventType = eNetworkRxEvent; - xRxEvent.pvData = ( void * ) pxBufferDescriptor; - - /* Send the data to the TCP/IP stack */ - if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) - { /* failed */ - pktLost = true; - } - else - { /* success */ - pktSuccess = true; - iptraceNETWORK_INTERFACE_RECEIVE(); - } - - break; - } - - if( !pktSuccess ) - { /* smth went wrong; nothing sent to the */ - if( pxBufferDescriptor != 0 ) - { - pxBufferDescriptor->pucEthernetBuffer = 0; - vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); - } - - if( pktLost ) - { - iptraceETHERNET_RX_EVENT_LOST(); - } - - /* acknowledge the packet to the MAC driver */ - if( pRxPkt->ackFunc ) - { - ( *pRxPkt->ackFunc )( pRxPkt, pRxPkt->ackParam ); - } - else - { - PIC32_MacPacketOrphan( pRxPkt ); - } - } - } - - #if ( PIC32_MAC_DEBUG_COMMANDS != 0 ) - /* */ - static int _Command_MacInfo( SYS_CMD_DEVICE_NODE * pCmdIO, - int argc, - char ** argv ) - { - TCPIP_MAC_RES macRes; - TCPIP_MAC_RX_STATISTICS rxStatistics; - TCPIP_MAC_TX_STATISTICS txStatistics; - TCPIP_MAC_STATISTICS_REG_ENTRY regEntries[ 8 ]; - TCPIP_MAC_STATISTICS_REG_ENTRY * pRegEntry; - int jx, hwEntries; - char entryName[ sizeof( pRegEntry->registerName ) + 1 ]; - - const void * cmdIoParam = pCmdIO->cmdIoParam; - - if( argc != 1 ) - { - ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "Usage: macinfo \r\n" ); - ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "Ex: macinfo \r\n" ); - - return false; - } - - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "Interface: %s driver statistics\r\n", macObject->macName ); - macRes = ( macObject->TCPIP_MAC_StatisticsGet )( macCliHandle, &rxStatistics, &txStatistics ); - - if( macRes == TCPIP_MAC_RES_OK ) - { - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "\tnRxOkPackets: %d, nRxPendBuffers: %d, nRxSchedBuffers: %d, ", - rxStatistics.nRxOkPackets, rxStatistics.nRxPendBuffers, rxStatistics.nRxSchedBuffers ); - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "nRxErrorPackets: %d, nRxFragmentErrors: %d\r\n", rxStatistics.nRxErrorPackets, rxStatistics.nRxFragmentErrors ); - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "\tnTxOkPackets: %d, nTxPendBuffers: %d, nTxErrorPackets: %d, nTxQueueFull: %d\r\n", - txStatistics.nTxOkPackets, txStatistics.nTxPendBuffers, txStatistics.nTxErrorPackets, txStatistics.nTxQueueFull ); - } - else - { - ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "\tnot supported\r\n" ); - } - - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "Interface: %s hardware statistics\r\n", macObject->macName ); - macRes = ( macObject->TCPIP_MAC_RegisterStatisticsGet )( macCliHandle, regEntries, sizeof( regEntries ) / sizeof( *regEntries ), &hwEntries ); - - if( macRes == TCPIP_MAC_RES_OK ) - { - entryName[ sizeof( entryName ) - 1 ] = 0; - - for( jx = 0, pRegEntry = regEntries; jx < hwEntries && jx < sizeof( regEntries ) / sizeof( *regEntries ); jx++, pRegEntry++ ) - { - strncpy( entryName, pRegEntry->registerName, sizeof( entryName ) - 1 ); - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "\t%s: 0x%8x\r\n", entryName, pRegEntry->registerValue ); - } - } - else - { - ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "\tnot supported\r\n" ); - } - - return true; - } - - /*-----------------------------------------------------------*/ - - static int _Command_NetInfo( SYS_CMD_DEVICE_NODE * pCmdIO, - int argc, - char ** argv ) - { - const void * cmdIoParam = pCmdIO->cmdIoParam; - - union - { - uint32_t ul; - uint8_t b[ 4 ]; - } - sUl; - - sUl.ul = FreeRTOS_GetIPAddress(); - - bool linkUp = FreeRTOS_IsNetworkUp() == pdTRUE; - - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "IP address: %d.%d.%d.%d\r\n", sUl.b[ 0 ], sUl.b[ 1 ], sUl.b[ 2 ], sUl.b[ 3 ] ); - ( *pCmdIO->pCmdApi->print )( cmdIoParam, "Link is: %s\r\n", linkUp ? "Up" : "Down" ); - - return true; - } - -#include "aws_application_version.h" - -static int _Command_Version(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv) -{ - configPRINTF( ( "App version - maj: %d, min: %d, build: %d\r\n", xAppFirmwareVersion.u.x.ucMajor, xAppFirmwareVersion.u.x.ucMinor, xAppFirmwareVersion.u.x.usBuild) ); - return 0; -} - - #endif /* (PIC32_MAC_DEBUG_COMMANDS != 0) */ -#endif /* #ifdef PIC32_USE_ETHERNET */ +/******************************************************************************* +* Network Interface file +* +* Summary: +* Network Interface file for FreeRTOS-Plus-TCP stack +* +* Description: +* - Interfaces PIC32 to the FreeRTOS TCP/IP stack +*******************************************************************************/ + +/******************************************************************************* +* File Name: pic32_NetworkInterface.c +* Copyright 2017 Microchip Technology Incorporated and its subsidiaries. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of +* this software and associated documentation files (the "Software"), to deal in +* the Software without restriction, including without limitation the rights to +* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +* of the Software, and to permit persons to whom the Software is furnished to do +* so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE +*******************************************************************************/ +#include + +#include "FreeRTOS.h" +#include "semphr.h" +#include "event_groups.h" +#include "FreeRTOS_IP.h" +#include "FreeRTOS_IP_Private.h" + +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" + + +#include "NetworkInterface.h" +#include "NetworkConfig.h" + +#include "peripheral/eth/plib_eth.h" + +#include "system_config.h" +#include "system/console/sys_console.h" +#include "system/debug/sys_debug.h" +#include "system/command/sys_command.h" + +#include "driver/ethmac/drv_ethmac.h" +#include "driver/miim/drv_miim.h" + +#include "tcpip/tcpip.h" +#include "tcpip/src/tcpip_private.h" +#include "tcpip/src/link_list.h" + +#ifdef PIC32_USE_ETHERNET + + /* local definitions and data */ + + /* debug messages */ + #if ( PIC32_MAC_DEBUG_MESSAGES != 0 ) + #define PIC32_MAC_DbgPrint( format, ... ) SYS_CONSOLE_PRINT( format, ## __VA_ARGS__ ) + #else + #define PIC32_MAC_DbgPrint( format, ... ) + #endif /* (PIC32_MAC_DEBUG_MESSAGES != 0) */ + + typedef enum + { + PIC32_MAC_EVENT_INIT_NONE = 0x000, /* no event/invalid */ + + PIC32_MAC_EVENT_INIT_DONE = 0x001, /* initialization done event */ + PIC32_MAC_EVENT_TIMEOUT = 0x002, /* periodic timeout event */ + PIC32_MAC_EVENT_IF_PENDING = 0x004, /* an interface event signal: RX, TX, errors. etc. */ + } PIC32_MAC_EVENT_TYPE; + + typedef enum + { + eMACInit, /* Must initialise MAC. */ + eMACPass, /* Initialisation was successful. */ + eMACFailed, /* Initialisation failed. */ + } eMAC_INIT_STATUS_TYPE; + + static TCPIP_STACK_HEAP_HANDLE macHeapHandle; + + static const TCPIP_MAC_OBJECT * macObject; /* the one and only MAC object; */ + + static SYS_MODULE_OBJ macObjHandle; /* the MAC object instance, obtained at initialization */ + static TCPIP_MAC_HANDLE macCliHandle; /* client handle */ + static volatile SYS_STATUS macObjStatus; /* current MAC status */ + + static TaskHandle_t macTaskHandle; + + static TimerHandle_t macTmrHandle; + + static bool macLinkStatus; /* true if link is ON */ + + static eMAC_INIT_STATUS_TYPE xMacInitStatus = eMACInit; + + /* local prototypes */ + static bool StartInitMac( void ); + static void StartInitCleanup( void ); + + static void SetMacCtrl( TCPIP_MAC_MODULE_CTRL * pMacCtrl ); + + static bool MacSyncFunction( void * synchHandle, + TCPIP_MAC_SYNCH_REQUEST req ); + + /* the PIC32 MAC task function */ + static void MacHandlerTask( void * params ); + + /* MAC interrupt event function */ + static void MAC_EventFunction( TCPIP_MAC_EVENT event, + const void * eventParam ); + + /* timer callback for link maintenance, etc; */ + static void MacTmrCallback( TimerHandle_t xTimer ); + + /* MAC RX packets functions */ + static void MacRxPackets( void ); + static void MacProcessRxPacket( TCPIP_MAC_PACKET * pRxPkt ); + + + /* memory allocation mapping to FreeRTOS */ + static void * _malloc( size_t nBytes ) + { + return pvPortMalloc( nBytes ); + } + + /*-----------------------------------------------------------*/ + + static void * _calloc( size_t nElems, + size_t elemSize ) + { + size_t nBytes = nElems * elemSize; + + void * ptr = pvPortMalloc( nBytes ); + + if( ptr != 0 ) + { + memset( ptr, 0, nBytes ); + } + + return ptr; + } + + /*-----------------------------------------------------------*/ + + static void _free( void * pBuff ) + { + vPortFree( pBuff ); + } + + /* extern references */ + /* */ + /* use the configuration data from the system_init.c */ + extern const TCPIP_NETWORK_CONFIG TCPIP_HOSTS_CONFIGURATION[]; + + /* BufferAllocation_2.c:: packet allocation function */ + extern TCPIP_MAC_PACKET * PIC32_MacPacketAllocate( uint16_t pktLen, + uint16_t segLoadLen, + TCPIP_MAC_PACKET_FLAGS flags ); + + extern void PIC32_MacAssociate( TCPIP_MAC_PACKET * pRxPkt, + NetworkBufferDescriptor_t * pxBufferDescriptor, + size_t pktLength ); + extern void PIC32_MacPacketOrphan( TCPIP_MAC_PACKET * pPkt ); + + /* cannot use the system_init.c::tcpipHeapConfig because FreeRTOS does not have a calloc function! */ + /* we build it here! */ + + /* make sure we're running with external heap! Redirect to FreeRTOS. */ + #if !defined( TCPIP_STACK_USE_EXTERNAL_HEAP ) || defined( TCPIP_STACK_USE_INTERNAL_HEAP ) || defined( TCPIP_STACK_USE_INTERNAL_HEAP_POOL ) + #error "TCPIP_STACK_USE_EXTERNAL_HEAP should be defined for this project!" + #endif + + static const TCPIP_STACK_HEAP_EXTERNAL_CONFIG tcpipHeapConfig = + { + .heapType = TCPIP_STACK_HEAP_TYPE_EXTERNAL_HEAP, + .heapFlags = TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED | TCPIP_STACK_HEAP_FLAG_NO_MTHREAD_SYNC, + .heapUsage = TCPIP_STACK_HEAP_USE_DEFAULT, + .malloc_fnc = _malloc, + .calloc_fnc = _calloc, + .free_fnc = _free, + }; + + #if ( PIC32_MAC_DEBUG_COMMANDS != 0 ) + static int _Command_MacInfo( SYS_CMD_DEVICE_NODE * pCmdIO, + int argc, + char ** argv ); + static int _Command_NetInfo( SYS_CMD_DEVICE_NODE * pCmdIO, + int argc, + char ** argv ); + static int _Command_Version( SYS_CMD_DEVICE_NODE * pCmdIO, + int argc, + char ** argv ); + + static const SYS_CMD_DESCRIPTOR macCmdTbl[] = + { + { "macinfo", _Command_MacInfo, ": Check MAC statistics" }, + { "netinfo", _Command_NetInfo, ": Net info" }, + { "version", _Command_Version, ": Version info" }, + }; + #endif /* (PIC32_MAC_DEBUG_COMMANDS != 0) */ + + + /* FreeRTOS implementation functions */ + BaseType_t xNetworkInterfaceInitialise( void ) + { + BaseType_t xResult; + + if( xMacInitStatus == eMACInit ) + { + /* This is the first time this function is called. */ + if( StartInitMac() != false ) + { + /* Indicate that the MAC initialisation succeeded. */ + xMacInitStatus = eMACPass; + } + else + { + xMacInitStatus = eMACFailed; + } + } + + if( xMacInitStatus == eMACPass ) + { + xResult = xGetPhyLinkStatus(); + } + else + { + xResult = pdFAIL; + } + + PIC32_MAC_DbgPrint( "xNetworkInterfaceInitialise: %d %d\r\n", ( int ) xMacInitStatus, ( int ) xResult ); + + return xResult; + } + + + /*-----------------------------------------------------------*/ + + BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, + BaseType_t xReleaseAfterSend ) + { + TCPIP_MAC_RES macRes; + TCPIP_MAC_PACKET * pTxPkt; + + BaseType_t retRes = pdFALSE; + + + if( ( pxDescriptor != 0 ) && ( pxDescriptor->pucEthernetBuffer != 0 ) && ( pxDescriptor->xDataLength != 0 ) ) + { + TCPIP_MAC_PACKET ** ppkt = ( TCPIP_MAC_PACKET ** ) ( pxDescriptor->pucEthernetBuffer - PIC32_BUFFER_PKT_PTR_OSSET ); + configASSERT( ( ( uint32_t ) ppkt & ( sizeof( uint32_t ) - 1 ) ) == 0 ); + pTxPkt = *ppkt; + configASSERT( pTxPkt != 0 ); + + /* prepare the packet for transmission */ + /* set the correct data length: */ + configASSERT( pTxPkt->pDSeg->segSize >= pTxPkt->pDSeg->segLen ); + pTxPkt->pDSeg->segLen = pxDescriptor->xDataLength; + pTxPkt->next = 0; /* unlink it */ + macRes = ( macObject->TCPIP_MAC_PacketTx )( macCliHandle, pTxPkt ); + + if( macRes >= 0 ) + { + retRes = pdTRUE; + pxDescriptor->pucEthernetBuffer = 0; /* it will be released by the MAC driver once it's transmitted */ + iptraceNETWORK_INTERFACE_TRANSMIT(); + } + + /* else same error occurred; this normally should not happen! But the buffer is left in there so it shold be freed! */ + + /* The buffer has been sent so can be released. */ + if( xReleaseAfterSend != pdFALSE ) + { + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + } + + return retRes; + } + + + /************************************* Section: helper functions ************************************************** */ + /* */ + + void PIC32_GetMACAddress( uint8_t macAdd[ 6 ] ) + { + #if defined( __PIC32MZ__ ) || defined( __PIC32MX__ ) + PLIB_ETH_MACGetAddress( ETH_ID_0, macAdd ); + #else + #error "MAC Address: not supported architecture!" + #endif + } + + + /*-----------------------------------------------------------*/ + + const void * const PIC32_GetMacConfigData( void ) + { + #if defined( __PIC32MZ__ ) || defined( __PIC32MX__ ) + extern const TCPIP_MODULE_MAC_PIC32INT_CONFIG tcpipMACPIC32INTInitData; + + return &tcpipMACPIC32INTInitData; + #else + #error "MAC Address: not supported architecture!" + #endif + } + + /************************************* Section: worker code ************************************************** */ + /* */ + + + static bool StartInitMac( void ) + { + TCPIP_MAC_MODULE_CTRL macCtrl; + SYS_MODULE_INIT moduleInit; + EventBits_t evBits; + + + /* perform some initialization of all variables so that we can cleanup what failed */ + /* if something failed, the routine will be called again and again by FreeRTOS! */ + macHeapHandle = 0; + macObjHandle = 0; + macCliHandle = 0; + macTmrHandle = 0; + macTaskHandle = 0; + macObject = TCPIP_HOSTS_CONFIGURATION[ 0 ].pMacObject; /* the MAC object we use */ + macObjStatus = SYS_STATUS_UNINITIALIZED; + macLinkStatus = false; + + int netUpFail = 0; + + while( true ) + { + /* start the allocator */ + macHeapHandle = TCPIP_HEAP_Create( ( const TCPIP_STACK_HEAP_CONFIG * ) &tcpipHeapConfig, 0 ); + + if( macHeapHandle == 0 ) + { + netUpFail = 1; + break; + } + + if( TCPIP_PKT_Initialize( macHeapHandle, 0, 0 ) == false ) + { + netUpFail = 2; + break; + } + + moduleInit.sys.powerState = SYS_MODULE_POWER_RUN_FULL; + + /* Initialize the MAC. MAC address is defined to 0x000000000000 in + * FreeRTOSConfig.h and therefore it will be initialized to the + * factory programmed MAC address. */ + SetMacCtrl( &macCtrl ); + /* Set the mac address in the FreeRTOS+TCP stack. */ + FreeRTOS_UpdateMACAddress( macCtrl.ifPhyAddress.v ); + + TCPIP_MAC_INIT macInit = + { + .moduleInit = { moduleInit.value }, + .macControl = &macCtrl, + .moduleData = PIC32_GetMacConfigData(), + }; + + macObjHandle = ( macObject->TCPIP_MAC_Initialize )( TCPIP_MODULE_MAC_PIC32INT, &macInit.moduleInit ); + + if( macObjHandle == SYS_MODULE_OBJ_INVALID ) + { + macObjHandle = 0; + netUpFail = 4; + break; + } + + /* open the MAC */ + macCliHandle = ( macObject->TCPIP_MAC_Open )( TCPIP_MODULE_MAC_PIC32INT, DRV_IO_INTENT_READWRITE ); + + if( macCliHandle == DRV_HANDLE_INVALID ) + { + macCliHandle = 0; + netUpFail = 5; + break; + } + + if( !( macObject->TCPIP_MAC_EventMaskSet )( macCliHandle, ( TCPIP_MAC_EV_RX_DONE | TCPIP_MAC_EV_TX_DONE | TCPIP_MAC_EV_RXTX_ERRORS ), true ) ) + { + netUpFail = 6; + break; + } + + /* completed the MAC initialization */ + /* continue the initialization */ + macTmrHandle = xTimerCreate( PIC32_MAC_TIMER_NAME, PIC32_MAC_TIMER_PERIOD, pdTRUE, 0, MacTmrCallback ); + + if( ( macTmrHandle == 0 ) || ( xTimerStart( macTmrHandle, 0 ) != pdPASS ) ) + { + netUpFail = 8; + break; + } + + /* spawn the PIC32 MAC task function */ + /* and wait for its event signal */ + macObjStatus = SYS_STATUS_BUSY; + + if( xTaskCreate( MacHandlerTask, PIC32_MAC_TASK_NAME, PIC32_MAC_TASK_STACK_SIZE, xTaskGetCurrentTaskHandle(), PIC32_MAC_TASK_PRI, &macTaskHandle ) != pdPASS ) + { /* failed */ + netUpFail = 9; + break; + } + + xTaskNotifyWait( PIC32_MAC_EVENT_INIT_DONE, PIC32_MAC_EVENT_INIT_DONE, &evBits, PIC32_MAC_INIT_TIMEOUT ); + + if( ( evBits & PIC32_MAC_EVENT_INIT_DONE ) == 0 ) + { /* timed out */ + netUpFail = 10; + break; + } + + if( macObjStatus != SYS_STATUS_READY ) + { /* failed somehow ??? */ + netUpFail = 11; + break; + } + + netUpFail = 0; + break; + } + + if( netUpFail == 0 ) + { + PIC32_MAC_DbgPrint( " MAC Init success!\r\n" ); + + #if ( PIC32_MAC_DEBUG_COMMANDS != 0 ) + /* create command group */ + if( !SYS_CMD_ADDGRP( macCmdTbl, sizeof( macCmdTbl ) / sizeof( *macCmdTbl ), "mac", ": mac commands" ) ) + { + PIC32_MAC_DbgPrint( "Failed to create MAC Commands\r\n" ); + } + #endif /* (PIC32_MAC_DEBUG_COMMANDS != 0) */ + + return true; + } + else + { + StartInitCleanup(); + PIC32_MAC_DbgPrint( "MAC Init failed: %d!\r\n", netUpFail ); + + return false; + } + } + + /*-----------------------------------------------------------*/ + + static void StartInitCleanup( void ) + { + if( macHeapHandle != 0 ) + { + TCPIP_HEAP_Delete( macHeapHandle ); + macHeapHandle = 0; + } + + if( macObjHandle != 0 ) + { + ( macObject->TCPIP_MAC_Deinitialize )( macObjHandle ); + macObjHandle = 0; + } + + if( macTmrHandle != 0 ) + { + xTimerDelete( macTmrHandle, portMAX_DELAY ); + macTmrHandle = 0; + } + + if( macTaskHandle != 0 ) + { + vTaskDelete( macTaskHandle ); + macTaskHandle = 0; + } + } + + /*-----------------------------------------------------------*/ + + static void SetMacCtrl( TCPIP_MAC_MODULE_CTRL * pMacCtrl ) + { + TCPIP_MAC_ADDR macAdd; + uint8_t unsetMACAddr[ 6 ] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* not set MAC address */ + + pMacCtrl->nIfs = 1; + + pMacCtrl->mallocF = TCPIP_HEAP_MallocOutline; + pMacCtrl->callocF = TCPIP_HEAP_CallocOutline; + pMacCtrl->freeF = TCPIP_HEAP_FreeOutline; + pMacCtrl->memH = macHeapHandle; + + + pMacCtrl->pktAllocF = PIC32_MacPacketAllocate; + pMacCtrl->pktFreeF = ( TCPIP_MAC_PKT_FreeF ) _TCPIP_PKT_FREE_FNC; + pMacCtrl->pktAckF = ( TCPIP_MAC_PKT_AckF ) _TCPIP_PKT_ACK_FNC; + + pMacCtrl->synchF = MacSyncFunction; + + pMacCtrl->eventF = MAC_EventFunction; + pMacCtrl->eventParam = 0; + + pMacCtrl->moduleId = TCPIP_MODULE_MAC_PIC32INT; + pMacCtrl->netIx = 0; + pMacCtrl->macAction = TCPIP_MAC_ACTION_INIT; + pMacCtrl->powerMode = TCPIP_MAC_POWER_FULL; + + macAdd.v[ 0 ] = configMAC_ADDR0; + macAdd.v[ 1 ] = configMAC_ADDR1; + macAdd.v[ 2 ] = configMAC_ADDR2; + macAdd.v[ 3 ] = configMAC_ADDR3; + macAdd.v[ 4 ] = configMAC_ADDR4; + macAdd.v[ 5 ] = configMAC_ADDR5; + + if( memcmp( macAdd.v, unsetMACAddr, sizeof( unsetMACAddr ) ) == 0 ) + { /* if unspecified we use the factory pre-programmed address */ + PIC32_GetMACAddress( pMacCtrl->ifPhyAddress.v ); + } + else + { /* use the config suggested one */ + memcpy( pMacCtrl->ifPhyAddress.v, macAdd.v, sizeof( macAdd ) ); + } + } + + /*-----------------------------------------------------------*/ + + static bool MacSyncFunction( void * synchHandle, + TCPIP_MAC_SYNCH_REQUEST req ) + { + switch( req ) + { + case TCPIP_MAC_SYNCH_REQUEST_OBJ_CREATE: + vSemaphoreCreateBinary( *( SemaphoreHandle_t * ) synchHandle ); + + return ( *( SemaphoreHandle_t * ) synchHandle == NULL ) ? false : true; + + case TCPIP_MAC_SYNCH_REQUEST_OBJ_DELETE: + vSemaphoreDelete( *( SemaphoreHandle_t * ) synchHandle ); + *( SemaphoreHandle_t * ) synchHandle = NULL; + + return true; + + case TCPIP_MAC_SYNCH_REQUEST_OBJ_LOCK: + + return ( xSemaphoreTake( *( SemaphoreHandle_t * ) synchHandle, portMAX_DELAY ) == pdTRUE ) ? true : false; + + case TCPIP_MAC_SYNCH_REQUEST_OBJ_UNLOCK: + + return ( xSemaphoreGive( *( SemaphoreHandle_t * ) synchHandle ) == pdTRUE ) ? true : false; + + case TCPIP_MAC_SYNCH_REQUEST_CRIT_ENTER: + vTaskSuspendAll(); + + return true; + + case TCPIP_MAC_SYNCH_REQUEST_CRIT_LEAVE: + xTaskResumeAll(); + + return true; + + default: + + return false; + } + } + + + /*-----------------------------------------------------------*/ + + static void MacHandlerTask( void * params ) + { + EventBits_t evBits; + + /* perform the MAC initialization */ + while( macObjStatus == SYS_STATUS_BUSY ) + { + /* process the underlying MAC module tasks */ + ( macObject->TCPIP_MAC_Tasks )( macObjHandle ); + + SYS_STATUS macStatus = ( macObject->TCPIP_MAC_Status )( macObjHandle ); + + if( macStatus == SYS_STATUS_BUSY ) + { /* still pending */ + vTaskDelay( PIC32_MAC_TASK_INIT_PENDING_DELAY ); + } + else + { /* completed ...somehow */ + macObjStatus = macStatus; + + xTaskNotify( ( TaskHandle_t ) params, PIC32_MAC_EVENT_INIT_DONE, eSetBits ); + + if( macStatus != SYS_STATUS_READY ) + { /* failed miserably */ + vTaskDelete( 0 ); + } + + /* done, up and running */ + } + } + + while( true ) + { + xTaskNotifyWait( PIC32_MAC_EVENT_TIMEOUT | PIC32_MAC_EVENT_IF_PENDING, PIC32_MAC_EVENT_TIMEOUT | PIC32_MAC_EVENT_IF_PENDING, &evBits, portMAX_DELAY ); + + if( ( evBits & PIC32_MAC_EVENT_TIMEOUT ) != 0 ) + { /* timeout occurred... */ + ( macObject->TCPIP_MAC_Tasks )( macObjHandle ); + bool linkCurr = ( macObject->TCPIP_MAC_LinkCheck )( macCliHandle ); /* check link status */ + + if( macLinkStatus != linkCurr ) + { /* link status changed; some event could ve fired here if needed */ + PIC32_MAC_DbgPrint( " MAC link: %s!\r\n", linkCurr ? "ON" : "OFF" ); + macLinkStatus = linkCurr; + } + } + + if( ( evBits & PIC32_MAC_EVENT_IF_PENDING ) != 0 ) + { /* IF events signal */ + TCPIP_MAC_EVENT activeEvents = ( macObject->TCPIP_MAC_EventPendingGet )( macCliHandle ); + + if( activeEvents != TCPIP_MAC_EV_NONE ) + { + /* acknowledge the events */ + ( macObject->TCPIP_MAC_EventAcknowledge )( macCliHandle, activeEvents ); + + /* check for RX */ + if( ( activeEvents & ( TCPIP_MAC_EV_RX_DONE | TCPIP_MAC_EV_RX_OVFLOW | TCPIP_MAC_EV_RX_BUFNA ) ) != 0 ) + { /* RX packets available */ + MacRxPackets(); + } + + /* call the driver process function; */ + /* PIC32 driver requests it through TCPIP_MAC_ParametersGet() which is bypassed here! */ + ( macObject->TCPIP_MAC_Process )( macCliHandle ); + } + } + + /* do what you have to do and then wait for another event... */ + } + } + + /*-----------------------------------------------------------*/ + + static void MacTmrCallback( TimerHandle_t xTimer ) + { + xTaskNotify( macTaskHandle, PIC32_MAC_EVENT_TIMEOUT, eSetBits ); + } + + /* MAC interrupt event function */ + /* MAC signals an event, probably from within ISR */ + /* we care just for RX related events */ + static void MAC_EventFunction( TCPIP_MAC_EVENT event, + const void * eventParam ) + { + BaseType_t xHigherPriorityTaskWoken; + + if( ( event & ( TCPIP_MAC_EV_RX_DONE | TCPIP_MAC_EV_TX_DONE | TCPIP_MAC_EV_RXTX_ERRORS ) ) != 0 ) + { + xHigherPriorityTaskWoken = pdFALSE; + xTaskNotifyFromISR( macTaskHandle, PIC32_MAC_EVENT_IF_PENDING, eSetBits, &xHigherPriorityTaskWoken ); + + if( xHigherPriorityTaskWoken ) + { + portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); + } + } + } + + /*-----------------------------------------------------------*/ + + BaseType_t xGetPhyLinkStatus( void ) + { + return macLinkStatus == true ? pdPASS : pdFAIL; + } + + + /* receive packets from the MAC driver */ + static void MacRxPackets( void ) + { + TCPIP_MAC_PACKET * pRxPkt; + + /* get all the new MAC packets */ + while( ( pRxPkt = ( macObject->TCPIP_MAC_PacketRx )( macCliHandle, 0, 0 ) ) != 0 ) + { + MacProcessRxPacket( pRxPkt ); + } + } + + /*-----------------------------------------------------------*/ + + static void MacProcessRxPacket( TCPIP_MAC_PACKET * pRxPkt ) + { + bool pktSuccess, pktLost; + size_t pktLength; + TCPIP_MAC_DATA_SEGMENT * pSeg; + uint8_t * pPktBuff; + NetworkBufferDescriptor_t * pxBufferDescriptor; + IPStackEvent_t xRxEvent; + + pxBufferDescriptor = 0; + pktSuccess = pktLost = false; + + while( true ) + { + pktLength = 0; + int nSegs = 0; + pSeg = pRxPkt->pDSeg; + pPktBuff = pSeg->segLoad; + + /* calculate the packet size */ + do + { + pktLength += pSeg->segLen; + pSeg = pSeg->next; + nSegs++; + } while( pSeg != 0 ); + + if( nSegs > 1 ) + { /* no support in FreeRTOS for multi segment packets! */ + break; + } + + /* sizeof(TCPIP_MAC_ETHERNET_HEADER) is subtracted by the driver */ + /* but FreeRTOS needs the whole frame! */ + pktLength += sizeof( TCPIP_MAC_ETHERNET_HEADER ); + + if( eConsiderFrameForProcessing( pPktBuff ) != eProcessBuffer ) + { + break; + } + + /* get the network descriptor (no data buffer) to hold this packet */ + pxBufferDescriptor = pxGetNetworkBufferWithDescriptor( 0, 0 ); + + if( pxBufferDescriptor == 0 ) + { + pktLost = true; + break; + } + + PIC32_MacAssociate( pRxPkt, pxBufferDescriptor, pktLength ); + + xRxEvent.eEventType = eNetworkRxEvent; + xRxEvent.pvData = ( void * ) pxBufferDescriptor; + + /* Send the data to the TCP/IP stack */ + if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) + { /* failed */ + pktLost = true; + } + else + { /* success */ + pktSuccess = true; + iptraceNETWORK_INTERFACE_RECEIVE(); + } + + break; + } + + if( !pktSuccess ) + { /* smth went wrong; nothing sent to the */ + if( pxBufferDescriptor != 0 ) + { + pxBufferDescriptor->pucEthernetBuffer = 0; + vReleaseNetworkBufferAndDescriptor( pxBufferDescriptor ); + } + + if( pktLost ) + { + iptraceETHERNET_RX_EVENT_LOST(); + } + + /* acknowledge the packet to the MAC driver */ + if( pRxPkt->ackFunc ) + { + ( *pRxPkt->ackFunc )( pRxPkt, pRxPkt->ackParam ); + } + else + { + PIC32_MacPacketOrphan( pRxPkt ); + } + } + } + + #if ( PIC32_MAC_DEBUG_COMMANDS != 0 ) + /* */ + static int _Command_MacInfo( SYS_CMD_DEVICE_NODE * pCmdIO, + int argc, + char ** argv ) + { + TCPIP_MAC_RES macRes; + TCPIP_MAC_RX_STATISTICS rxStatistics; + TCPIP_MAC_TX_STATISTICS txStatistics; + TCPIP_MAC_STATISTICS_REG_ENTRY regEntries[ 8 ]; + TCPIP_MAC_STATISTICS_REG_ENTRY * pRegEntry; + int jx, hwEntries; + char entryName[ sizeof( pRegEntry->registerName ) + 1 ]; + + const void * cmdIoParam = pCmdIO->cmdIoParam; + + if( argc != 1 ) + { + ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "Usage: macinfo \r\n" ); + ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "Ex: macinfo \r\n" ); + + return false; + } + + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "Interface: %s driver statistics\r\n", macObject->macName ); + macRes = ( macObject->TCPIP_MAC_StatisticsGet )( macCliHandle, &rxStatistics, &txStatistics ); + + if( macRes == TCPIP_MAC_RES_OK ) + { + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "\tnRxOkPackets: %d, nRxPendBuffers: %d, nRxSchedBuffers: %d, ", + rxStatistics.nRxOkPackets, rxStatistics.nRxPendBuffers, rxStatistics.nRxSchedBuffers ); + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "nRxErrorPackets: %d, nRxFragmentErrors: %d\r\n", rxStatistics.nRxErrorPackets, rxStatistics.nRxFragmentErrors ); + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "\tnTxOkPackets: %d, nTxPendBuffers: %d, nTxErrorPackets: %d, nTxQueueFull: %d\r\n", + txStatistics.nTxOkPackets, txStatistics.nTxPendBuffers, txStatistics.nTxErrorPackets, txStatistics.nTxQueueFull ); + } + else + { + ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "\tnot supported\r\n" ); + } + + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "Interface: %s hardware statistics\r\n", macObject->macName ); + macRes = ( macObject->TCPIP_MAC_RegisterStatisticsGet )( macCliHandle, regEntries, sizeof( regEntries ) / sizeof( *regEntries ), &hwEntries ); + + if( macRes == TCPIP_MAC_RES_OK ) + { + entryName[ sizeof( entryName ) - 1 ] = 0; + + for( jx = 0, pRegEntry = regEntries; jx < hwEntries && jx < sizeof( regEntries ) / sizeof( *regEntries ); jx++, pRegEntry++ ) + { + strncpy( entryName, pRegEntry->registerName, sizeof( entryName ) - 1 ); + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "\t%s: 0x%8x\r\n", entryName, pRegEntry->registerValue ); + } + } + else + { + ( *pCmdIO->pCmdApi->msg )( cmdIoParam, "\tnot supported\r\n" ); + } + + return true; + } + + /*-----------------------------------------------------------*/ + + static int _Command_NetInfo( SYS_CMD_DEVICE_NODE * pCmdIO, + int argc, + char ** argv ) + { + const void * cmdIoParam = pCmdIO->cmdIoParam; + + union + { + uint32_t ul; + uint8_t b[ 4 ]; + } + sUl; + + sUl.ul = FreeRTOS_GetIPAddress(); + + bool linkUp = FreeRTOS_IsNetworkUp() == pdTRUE; + + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "IP address: %d.%d.%d.%d\r\n", sUl.b[ 0 ], sUl.b[ 1 ], sUl.b[ 2 ], sUl.b[ 3 ] ); + ( *pCmdIO->pCmdApi->print )( cmdIoParam, "Link is: %s\r\n", linkUp ? "Up" : "Down" ); + + return true; + } + +#include "aws_application_version.h" + +static int _Command_Version(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv) +{ + configPRINTF( ( "App version - maj: %d, min: %d, build: %d\r\n", xAppFirmwareVersion.u.x.ucMajor, xAppFirmwareVersion.u.x.ucMinor, xAppFirmwareVersion.u.x.usBuild) ); + return 0; +} + + #endif /* (PIC32_MAC_DEBUG_COMMANDS != 0) */ +#endif /* #ifdef PIC32_USE_ETHERNET */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_wifi.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_wifi.c index a24cfe8ad..fc8335ebe 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_wifi.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/pic32mzef/NetworkInterface_wifi.c @@ -1,192 +1,192 @@ -/******************************************************************************* -* Network Interface file -* -* Summary: -* Network Interface file for FreeRTOS-Plus-TCP stack -* -* Description: -* - Interfaces PIC32 to the FreeRTOS TCP/IP stack -*******************************************************************************/ - -/******************************************************************************* -* File Name: pic32_NetworkInterface.c -* Copyright 2017 Microchip Technology Incorporated and its subsidiaries. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy of -* this software and associated documentation files (the "Software"), to deal in -* the Software without restriction, including without limitation the rights to -* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -* of the Software, and to permit persons to whom the Software is furnished to do -* so, subject to the following conditions: -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE -*******************************************************************************/ -#ifndef PIC32_USE_ETHERNET -#include - -#include "FreeRTOS.h" -#include "semphr.h" -#include "event_groups.h" -#include "FreeRTOS_IP.h" -#include "FreeRTOS_IP_Private.h" - -#include "NetworkInterface.h" -#include "NetworkBufferManagement.h" -#include "peripheral/eth/plib_eth.h" - -#include "system_config.h" -#include "system/console/sys_console.h" -#include "system/debug/sys_debug.h" -#include "system/command/sys_command.h" - -#include "driver/ethmac/drv_ethmac.h" -#include "driver/miim/drv_miim.h" -#include "m2m_types.h" - -#include "tcpip/tcpip.h" -#include "tcpip/src/tcpip_private.h" -#include "tcpip/src/link_list.h" -#include "wilc1000_task.h" - -#include "NetworkConfig.h" - - - #include "iot_wifi.h" - - /* local definitions and data */ - - - /* FreeRTOS implementation functions */ - BaseType_t xNetworkInterfaceInitialise( void ) - { - WIFINetworkParams_t xNetworkParams; - - xNetworkParams.pcSSID = clientcredentialWIFI_SSID; - xNetworkParams.ucSSIDLength = sizeof( clientcredentialWIFI_SSID ); - xNetworkParams.pcPassword = clientcredentialWIFI_PASSWORD; - xNetworkParams.ucPasswordLength = sizeof( clientcredentialWIFI_PASSWORD ); - xNetworkParams.xSecurity = clientcredentialWIFI_SECURITY; - xNetworkParams.cChannel = M2M_WIFI_CH_ALL; /* Scan all channels (255) */ - - /*Turn WiFi ON */ - if( WIFI_On() != eWiFiSuccess ) - { - return pdFAIL; - } - - /* Connect to the AP */ - if( WIFI_ConnectAP( &xNetworkParams ) != eWiFiSuccess ) - { - return pdFAIL; - } - - return pdPASS; - } - - - /*-----------------------------------------------------------*/ - - BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, - BaseType_t xReleaseAfterSend ) - { - BaseType_t retRes = pdFALSE; - - if( ( pxDescriptor != 0 ) && ( pxDescriptor->pucEthernetBuffer != 0 ) && ( pxDescriptor->xDataLength != 0 ) ) - { - /* There you go */ - if( WDRV_EXT_DataSend( pxDescriptor->xDataLength, pxDescriptor->pucEthernetBuffer ) == 0 ) - { - retRes = pdTRUE; - } - - /* The buffer has been sent so can be released. */ - if( xReleaseAfterSend != pdFALSE ) - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - } - - return retRes; - } - - - /************************************* Section: helper functions ************************************************** */ - /* */ - - - - /************************************* Section: worker code ************************************************** */ - /* */ - - void xNetworkFrameReceived( uint32_t len, - uint8_t const * const frame ) - { - bool pktSuccess, pktLost; - NetworkBufferDescriptor_t * pxNetworkBuffer = NULL; - IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; - - pktSuccess = pktLost = false; - - while( true ) - { - if( eConsiderFrameForProcessing( frame ) != eProcessBuffer ) - { - break; - } - - /* get the network descriptor (no data buffer) to hold this packet */ - pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( len, 0 ); - - if( pxNetworkBuffer == NULL ) - { - pktLost = true; - break; - } - - /* Set the actual packet length, in case a larger buffer was - returned. */ - pxNetworkBuffer->xDataLength = len; - - /* Copy the packet. */ - memcpy( pxNetworkBuffer->pucEthernetBuffer, frame, len ); - - /* Send the data to the TCP/IP stack. */ - xRxEvent.pvData = ( void * ) pxNetworkBuffer; - - if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) - { /* failed */ - pktLost = true; - } - else - { /* success */ - pktSuccess = true; - iptraceNETWORK_INTERFACE_RECEIVE(); - } - - break; - } - - if( !pktSuccess ) - { /* smth went wrong; nothing sent to the */ - if( pxNetworkBuffer != NULL ) - { - pxNetworkBuffer->pucEthernetBuffer = 0; - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - - if( pktLost ) - { - iptraceETHERNET_RX_EVENT_LOST(); - } - } - } - -#endif /* #ifndef PIC32_USE_ETHERNET */ +/******************************************************************************* +* Network Interface file +* +* Summary: +* Network Interface file for FreeRTOS-Plus-TCP stack +* +* Description: +* - Interfaces PIC32 to the FreeRTOS TCP/IP stack +*******************************************************************************/ + +/******************************************************************************* +* File Name: pic32_NetworkInterface.c +* Copyright 2017 Microchip Technology Incorporated and its subsidiaries. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of +* this software and associated documentation files (the "Software"), to deal in +* the Software without restriction, including without limitation the rights to +* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +* of the Software, and to permit persons to whom the Software is furnished to do +* so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE +*******************************************************************************/ +#ifndef PIC32_USE_ETHERNET +#include + +#include "FreeRTOS.h" +#include "semphr.h" +#include "event_groups.h" +#include "FreeRTOS_IP.h" +#include "FreeRTOS_IP_Private.h" + +#include "NetworkInterface.h" +#include "NetworkBufferManagement.h" +#include "peripheral/eth/plib_eth.h" + +#include "system_config.h" +#include "system/console/sys_console.h" +#include "system/debug/sys_debug.h" +#include "system/command/sys_command.h" + +#include "driver/ethmac/drv_ethmac.h" +#include "driver/miim/drv_miim.h" +#include "m2m_types.h" + +#include "tcpip/tcpip.h" +#include "tcpip/src/tcpip_private.h" +#include "tcpip/src/link_list.h" +#include "wilc1000_task.h" + +#include "NetworkConfig.h" + + + #include "iot_wifi.h" + + /* local definitions and data */ + + + /* FreeRTOS implementation functions */ + BaseType_t xNetworkInterfaceInitialise( void ) + { + WIFINetworkParams_t xNetworkParams; + + xNetworkParams.pcSSID = clientcredentialWIFI_SSID; + xNetworkParams.ucSSIDLength = sizeof( clientcredentialWIFI_SSID ); + xNetworkParams.pcPassword = clientcredentialWIFI_PASSWORD; + xNetworkParams.ucPasswordLength = sizeof( clientcredentialWIFI_PASSWORD ); + xNetworkParams.xSecurity = clientcredentialWIFI_SECURITY; + xNetworkParams.cChannel = M2M_WIFI_CH_ALL; /* Scan all channels (255) */ + + /*Turn WiFi ON */ + if( WIFI_On() != eWiFiSuccess ) + { + return pdFAIL; + } + + /* Connect to the AP */ + if( WIFI_ConnectAP( &xNetworkParams ) != eWiFiSuccess ) + { + return pdFAIL; + } + + return pdPASS; + } + + + /*-----------------------------------------------------------*/ + + BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, + BaseType_t xReleaseAfterSend ) + { + BaseType_t retRes = pdFALSE; + + if( ( pxDescriptor != 0 ) && ( pxDescriptor->pucEthernetBuffer != 0 ) && ( pxDescriptor->xDataLength != 0 ) ) + { + /* There you go */ + if( WDRV_EXT_DataSend( pxDescriptor->xDataLength, pxDescriptor->pucEthernetBuffer ) == 0 ) + { + retRes = pdTRUE; + } + + /* The buffer has been sent so can be released. */ + if( xReleaseAfterSend != pdFALSE ) + { + vReleaseNetworkBufferAndDescriptor( pxDescriptor ); + } + } + + return retRes; + } + + + /************************************* Section: helper functions ************************************************** */ + /* */ + + + + /************************************* Section: worker code ************************************************** */ + /* */ + + void xNetworkFrameReceived( uint32_t len, + uint8_t const * const frame ) + { + bool pktSuccess, pktLost; + NetworkBufferDescriptor_t * pxNetworkBuffer = NULL; + IPStackEvent_t xRxEvent = { eNetworkRxEvent, NULL }; + + pktSuccess = pktLost = false; + + while( true ) + { + if( eConsiderFrameForProcessing( frame ) != eProcessBuffer ) + { + break; + } + + /* get the network descriptor (no data buffer) to hold this packet */ + pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( len, 0 ); + + if( pxNetworkBuffer == NULL ) + { + pktLost = true; + break; + } + + /* Set the actual packet length, in case a larger buffer was + returned. */ + pxNetworkBuffer->xDataLength = len; + + /* Copy the packet. */ + memcpy( pxNetworkBuffer->pucEthernetBuffer, frame, len ); + + /* Send the data to the TCP/IP stack. */ + xRxEvent.pvData = ( void * ) pxNetworkBuffer; + + if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ) + { /* failed */ + pktLost = true; + } + else + { /* success */ + pktSuccess = true; + iptraceNETWORK_INTERFACE_RECEIVE(); + } + + break; + } + + if( !pktSuccess ) + { /* smth went wrong; nothing sent to the */ + if( pxNetworkBuffer != NULL ) + { + pxNetworkBuffer->pucEthernetBuffer = 0; + vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); + } + + if( pktLost ) + { + iptraceETHERNET_RX_EVENT_LOST(); + } + } + } + +#endif /* #ifndef PIC32_USE_ETHERNET */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/readme.txt b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/readme.txt index a90fb9e17..65e5e2b19 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/readme.txt +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/readme.txt @@ -1,18 +1,18 @@ -Contains the files that implement FreeRTOS+TCP. - -User documentation, including an API reference is available on: -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/ - -A description of the source code organisation is available on: -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Networking_Tutorial.html - -The porting guide is available on: -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_TCP_Porting.html - -License information is available on: -http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_Plus_TCP_License.html - -At this time it is recommended to use BufferAllocation_2.c in which case it is -essential to use the heap_4.c memory allocation scheme: -http://www.FreeRTOS.org/a00111.html - +Contains the files that implement FreeRTOS+TCP. + +User documentation, including an API reference is available on: +http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/ + +A description of the source code organisation is available on: +http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Networking_Tutorial.html + +The porting guide is available on: +http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_TCP_Porting.html + +License information is available on: +http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/FreeRTOS_Plus_TCP_License.html + +At this time it is recommended to use BufferAllocation_2.c in which case it is +essential to use the heap_4.c memory allocation scheme: +http://www.FreeRTOS.org/a00111.html + diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h index 3dd136cf7..1e12d0e7f 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile index 7aaffb568..d917e5f77 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c index 4442610e4..bf6021e2f 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c index 1076e1a76..3c2fe4c12 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c index 91107d42a..bb21ef224 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c index 058a04b8f..2839764fb 100644 --- a/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c +++ b/FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h index b6642e016..da35db510 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c index cf103f189..5ede834b1 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c index 1d2b789bb..8d910b0ac 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c index b9a7e05b5..a812c8961 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c index e6c5bacf9..558351565 100644 --- a/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h index 35d28db71..fadccd8a3 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile b/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile index ff876820c..c76f711ff 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/Makefile @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c index 0f735878a..6f12833c9 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c index 677e5586e..c24f02f1f 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c index 6e7de78fd..a47a67a5b 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c index 446d7def1..ab6c444ee 100644 --- a/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c +++ b/FreeRTOS/Demo/ARM7_LPC2106_GCC/serial/serialISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h index 1e302cbad..3ed8e6a3e 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c index b2ab22ab4..6822e2ca0 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c index 846aac7de..8a59ce9ef 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c index dd26bdb48..625be0530 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h index b61c801cf..c373bb04b 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c index 2cea246bf..a5be9aa36 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c index 39e9f513f..e09f97f5f 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c index d415c8a52..16bc3f0b5 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s index 498d4b2a0..633cc508b 100644 --- a/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s +++ b/FreeRTOS/Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h index 6840d1f34..a76c1d8d3 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c index 399a6c9ec..07c21ac5f 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c index bd81c823d..10c8588c4 100644 --- a/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c +++ b/FreeRTOS/Demo/ARM7_LPC2138_Rowley/mainISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h index 88d231bd2..fd0831799 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile index 171e1b0d2..7a96d3720 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c index 4a2ae0335..e644737b4 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c index b52d1dfe2..6f3f59bf2 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c index 668c0b442..8fa61d486 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h index 9caacc931..a9b8afa56 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c index 4a2ae0335..e644737b4 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c index 3722305a1..68208df5f 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c index 2d18844d5..d3ac6ec1d 100644 --- a/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/ARM7_LPC2368_Rowley/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h index 18e07dcde..686a0eee8 100644 --- a/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c index 5c5dc5058..ac4be779c 100644 --- a/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c index 3f2997f1b..8c007de6a 100644 --- a/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c index 3c35f6bcc..709f6c362 100644 --- a/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_STR71x_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h index 0a40a137a..1453dbf26 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c index 3d66bc43a..4917784d4 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c index 632ba4e2a..bef019759 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c index d67266666..5df501471 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c index 32255892a..845557e4e 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c +++ b/FreeRTOS/Demo/ARM7_STR75x_GCC/serial/serialISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h index 48bf36029..3e5cfd22c 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c index 3d66bc43a..4917784d4 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c index 33e374b43..cdadc8bed 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c b/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c index 3ffb5904f..72ea37d56 100644 --- a/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM7_STR75x_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h index ec561c5d7..da70eac0f 100644 --- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c index edb0a5cf6..acab516e3 100644 --- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c index a75c88af4..bde81a654 100644 --- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c +++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c index bb92a6d02..21c7d6e62 100644 --- a/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM9_AT91SAM9XE_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h index 62bc84368..ce1594a48 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c index 6c64f41b5..519cf48c2 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h index 8e5fdc1bf..513a5a75c 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/include/lwIPWebServer/BasicWEB.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c index e58775733..29b69aac0 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/lwip/lwipWebServer/BasicWEB.c @@ -1,7 +1,7 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c index 18ebbc9fa..d0544b445 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c index 59a05c0e5..62ec72a4f 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c index 43cf40e9e..3bd0c7930 100644 --- a/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR32_UC3/main.c b/FreeRTOS/Demo/AVR32_UC3/main.c index 3753ac8f9..a13a45f77 100644 --- a/FreeRTOS/Demo/AVR32_UC3/main.c +++ b/FreeRTOS/Demo/AVR32_UC3/main.c @@ -30,8 +30,8 @@ *****************************************************************************/ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h index c900b23e3..096e2690a 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c index 533c30faf..eb9f3f5b5 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c index d9938680d..c628dc5e6 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c index 50da17cd9..c4f3be26a 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h index 8643e3ea5..902ad87a9 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/regtest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c b/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c index 64905bac5..21e7d3293 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c +++ b/FreeRTOS/Demo/AVR_ATMega323_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h index 05bc9c077..75264f839 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c index 6282788cd..d9f2a8277 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c index befcc0086..b8f9f6f7a 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c index 268f69b45..da34b924b 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h index 8643e3ea5..902ad87a9 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/regtest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c index d1d57a7e7..65b6ef6b4 100644 --- a/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c +++ b/FreeRTOS/Demo/AVR_ATMega323_WinAVR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h index 46f7efd1b..a2e8a8365 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c index d1c406ca7..ccc7bc3b7 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c index e0194876e..48305bdb7 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c index 248e1355e..bd5b5c0c2 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c index 88506a4e1..f3cbf6531 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h index e615f3251..cb5afcfdb 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c index d1c406ca7..ccc7bc3b7 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c index 5e4ca97f2..7bf649f81 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c index 716fd8f38..903de81be 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c index a998a33cd..1b6db0e33 100644 --- a/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_A2F200_SoftConsole/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Blinky_Demo/main_blinky.c index 0d472963d..4f4f551c5 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOSConfig.h index 9174cdd7a..fe5ae2a62 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOS_tick_config.c index cc3f0f695..84e9e3008 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/FreeRTOS_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.c index 0faa2a4b8..d0fbc4043 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/main_full.c index 250cbc494..1b27469e7 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/reg_test.S index 1d3c41e9f..102a6d39c 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/Full_Demo/reg_test.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/main.c b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/main.c index 6bb268d96..e585fad57 100644 --- a/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/main.c +++ b/FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOSConfig.h index 104d61aff..276560d84 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOS_tick_config.c index 6a06132f2..c8bb6a387 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/FreeRTOS_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.c index 39f8da057..aa5b1dfb5 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/main_full.c index 5575945a5..442dc4ce6 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/reg_test.S index 267c029a8..974bbc200 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/Full_Demo/reg_test.S @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/LEDs.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/LEDs.c index ea0c5c9c5..561e5380b 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/LEDs.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/LEDs.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/blinky_demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/blinky_demo/main_blinky.c index d4ffdd766..e4cc724a9 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/blinky_demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/main.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/main.c index 4fc9c835b..da81f12e3 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c index 19f19f951..fc7c41336 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/CDCCommandConsole.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h index 094f73084..c22f09b9b 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c index 4d16e49f1..1721e0aac 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.c index f859a0f5b..228a80154 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/main_full.c index 3cdd2164e..8d0786709 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S index 267c029a8..974bbc200 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c index 47eeb3f21..66112d80e 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/LEDs.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/blinky_demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/blinky_demo/main_blinky.c index 2e8c80143..34b7f2b92 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/blinky_demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c index ab7ac6e86..9b12ef46d 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Blinky_Demo/main_blinky.c index 2e8c80143..34b7f2b92 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c index c0bfa4d34..4d15a8651 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/CDCCommandConsole.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h index 18d59aa04..46938154f 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOS_tick_config.c index 9fe550d0c..7a8afdda3 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/FreeRTOS_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.c index 0e0e5d3be..f5bef15f6 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/main_full.c index 0f79ecf18..362a6530f 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S index a55e0fdda..c3a5ec25a 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c index 47eeb3f21..66112d80e 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/LEDs.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c index ae782a72d..5696c2ee9 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h index c58d6280f..44bcb2eb4 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/LEDs.c b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/LEDs.c index 92516572f..5dcb1c357 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/LEDs.c +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/LEDs.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c index d9bc41663..29fec5f9c 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_blinky.c b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_blinky.c index 462dbc43c..aec22a203 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_full.c b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_full.c index 692770d9b..3f8a52fd4 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S index d84d4771e..75da22d44 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/serial.c b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/serial.c index 58e3e5713..dc5d8c2b2 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/serial.c +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c index dcc12bcd5..a24c287d4 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h index 1f530b994..7777aaa9f 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOS_tick_config.c index 60aab2e9a..453eb3600 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOS_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.c index 0c03b560c..4291f1382 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c index 3200bf6a6..21e5509cf 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S index d84d4771e..75da22d44 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c index 5624e45d0..9fb09f049 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/ParTest.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/ParTest.c index ccf04e953..04a81eb2c 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c index 37d3e82ab..8789767f1 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c index 41482df23..0cf50683f 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h index fc00d94ca..4bb4aec7d 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/main_lwIP.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/main_lwIP.c index 21737798f..3276bf08e 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/main_lwIP.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/main_lwIP.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c index 7903326e1..5aeeb12a4 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h index 913a4653b..b14f41f48 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c index daa0563c4..8d406e555 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h index c9ffe4354..1c14fccad 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/lcd_message.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c index 1aa62a467..625773f4a 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c index 7a00fac78..76009ed76 100644 --- a/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c +++ b/FreeRTOS/Demo/CORTEX_AT91SAM3U256_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c index 91875e568..ec8a2411d 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h index 9c4fbcd18..173184b05 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h index 97dce01fd..0bce0ef72 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/ParTest.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/ParTest.c index b046c9868..a5322f5c5 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c index 72bad178f..98d0c8682 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c index f861d7dff..2ad8e244b 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c index e74a7e67e..f59c8085d 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c index 8a480de89..4aeb4cf7a 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3S-EK2_Atmel_Studio/src/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c index 91875e568..ec8a2411d 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h index 9c4fbcd18..173184b05 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h index 97dce01fd..0bce0ef72 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c index b046c9868..a5322f5c5 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c index 72bad178f..98d0c8682 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c index f861d7dff..2ad8e244b 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c index e74a7e67e..f59c8085d 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c index 042513ca3..dc5f2d5fe 100644 --- a/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c +++ b/FreeRTOS/Demo/CORTEX_ATSAM3X_Atmel_Studio/src/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h index 4ac3ee40c..9f9afea33 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.c index 4c63111af..4dd90e28e 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.h index b46b5c855..13eea3c0a 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/ParTest.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/ParTest.c index 1aa263428..1e2ef0925 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c index 92494b611..4f1418a60 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/Serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/TimerTest.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/TimerTest.c index 56e1657f8..6540cf64d 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/TimerTest.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/TimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c index ca59ab2fc..f066a45e4 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_GCC/FreeRTOS_Demo.cydsn/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h index 4ac3ee40c..9f9afea33 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.c index 4c63111af..4dd90e28e 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.h index b46b5c855..13eea3c0a 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/ParTest.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/ParTest.c index 1aa263428..1e2ef0925 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c index 92494b611..4f1418a60 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/Serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/TimerTest.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/TimerTest.c index 56e1657f8..6540cf64d 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/TimerTest.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/TimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c index ca59ab2fc..f066a45e4 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_Keil/FreeRTOS_Demo.cydsn/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h index 4ac3ee40c..9f9afea33 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.c index 4c63111af..4dd90e28e 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.h index b46b5c855..13eea3c0a 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/ParTest.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/ParTest.c index 1aa263428..1e2ef0925 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c index 92494b611..4f1418a60 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/Serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/TimerTest.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/TimerTest.c index 56e1657f8..6540cf64d 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/TimerTest.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/TimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c index ca59ab2fc..f066a45e4 100644 --- a/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c +++ b/FreeRTOS/Demo/CORTEX_CY8C5588_PSoC_Creator_RVDS/FreeRTOS_Demo.cydsn/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/FreeRTOSConfig.h index c9f26dffb..775855fc8 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/RegTest.c b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/RegTest.c index 0d32ad805..3597b3a74 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/main_full.c index 1e5c05905..218c9075b 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_BURTC.c b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_BURTC.c index 4f7ac1ccf..036626639 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_BURTC.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_BURTC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTC.c b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTC.c index f0dbe2a3c..4756e0d8b 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTC.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c index 84ca5f184..3c137f484 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/main.c b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/main.c index 83647234b..d35fa541a 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/main.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Giant_Gecko_Simplicity_Studio/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/FreeRTOSConfig.h index 4be766b51..be4e10d8c 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/RegTest.c b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/RegTest.c index e8ed7bd45..af7901ffc 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/main_full.c index 1e5c05905..218c9075b 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTCC.c b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTCC.c index 1504f026c..adce62cc4 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTCC.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/low_power_tick_management_RTCC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c index 84ca5f184..3c137f484 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/Low_Power_Demo/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/main.c b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/main.c index 0c99bf863..99f5edc82 100644 --- a/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/main.c +++ b/FreeRTOS/Demo/CORTEX_EFM32_Pearl_Gecko_Simplicity_Studio/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h index 040a125c4..c850d6969 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c index 131db0cd7..9ec86f895 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c index 366db237d..0eaf29803 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c index 4493b0e58..85edcf66f 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c index e80db990f..5198f497f 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c index 936ef63a1..bcbe08169 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.h b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.h index 6bdbedfcf..6deeed13c 100644 --- a/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.h +++ b/FreeRTOS/Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h index 5309e01be..c60761d72 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c index c537a4d6a..759c3784e 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo1/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h index bf147fb8b..831060888 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c index 81b036235..60bd59e02 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/Demo2/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h index 31e689ed2..20610e53a 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c index 82fe2370d..08b49d03a 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c index c537a4d6a..759c3784e 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h index 31e689ed2..20610e53a 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c index 82fe2370d..08b49d03a 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c index 908905b34..39c785574 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h index 97c429de3..ba2559854 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c index 82fe2370d..08b49d03a 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c index 56dfea857..d56017d69 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h index a4c49af1b..1c8f6fe63 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c index 4fe48a508..80f826e44 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c index 700e8e520..cc9d7f40e 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h index 188ab15c3..c456e896c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c index 82fe2370d..08b49d03a 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c index 47e05c5a5..61cdb7e21 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h index b173aae88..933db9e38 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/commstest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c index 261112061..87849af06 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S316_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h index 8db172c10..6280359e4 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c index 4c22aed8c..21440a4d7 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S811_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h index 6c546950d..2fa1bfefc 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c index 80712d03f..632cd5d09 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S811_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h index ee61fbcf4..e5cce82eb 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c index 60b845e05..351915a24 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c +++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/heap/heap_1.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c index 2532104ca..ffccc86de 100644 --- a/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3S811_KEIL/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h index f122fcfea..122005345 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c index 6e03c3dfa..fda25c3a1 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c index 8603cd3d5..bf7a0de71 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c index 825dcbb51..4e39a252c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c index 6ecd5001c..aef4aafad 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c index 1eeaf3a15..225ff354e 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/emac.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c index 0b83dd409..093ef037f 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h index c55718c2a..f446a470c 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c index 6e03c3dfa..fda25c3a1 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c index 8603cd3d5..bf7a0de71 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c index 56328a724..e28c52542 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c index f45a92557..7104b6a2d 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c index a6d635613..428e66a53 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/emac.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c index f81d277c9..95f93b9fc 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h index 8b9fb264f..1186f01b8 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c index 0ee928d5b..c31136e01 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c index 0ff78d51b..3d001eb7c 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c index 1e9913716..15e89e447 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/emac.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c index 46014e8fb..c213717a1 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_RedSuite/src/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h index 4397c8355..c60a16c91 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h index 1994c61a7..42580f83a 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/LED.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c index f4148f050..0f542500f 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c index b11610d63..51932cc21 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c index c5be6ac8c..7661f7af7 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c index 9113af203..e06e76611 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h index 10ed0839c..cf3d40871 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h index 1994c61a7..42580f83a 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/LED.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c index 8a5d69e94..676ccb1c3 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c index c4d4dd9d4..6ef021dd2 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c index 089b85fde..3d6eebccb 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/emac.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c index 9113af203..e06e76611 100644 --- a/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_LPC1768_IAR/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/RegTest.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/RegTest.c index cea618d87..35d39c119 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c index 9b438714b..5d12a66dc 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c index fd793a04c..ffafd3365 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.h b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.h index 1783abe3c..ba365fa0b 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.h +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h index e5034d3b1..940a856ec 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c index ef872fb7b..4ae80c0c8 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c index a327a7962..d9dbf2282 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c index 8e6300b2f..397b1d2f1 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/RegTest.c b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/RegTest.c index 383b8ba82..c5ecd13e5 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/compiler_attributes.h b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/compiler_attributes.h index 8abf71e3c..ffe5a1195 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/compiler_attributes.h +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/compiler_attributes.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/RegTest_IAR.s b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/RegTest_IAR.s index 54fc1a235..26510b233 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/RegTest_IAR.s +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/RegTest_IAR.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/compiler_attributes.h b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/compiler_attributes.h index 0160d96c4..062fdaf7b 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/compiler_attributes.h +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/IAR_specific/compiler_attributes.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/RegTest_Keil.s b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/RegTest_Keil.s index 0374936bb..e57acb2b3 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/RegTest_Keil.s +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/RegTest_Keil.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/compiler_attributes.h b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/compiler_attributes.h index 3a030396e..2f25267ae 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/compiler_attributes.h +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/Keil_specific/compiler_attributes.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/FreeRTOSConfig.h index f4402eddf..f11e8f62c 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.c index 2bf143344..4f1c7b993 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_blinky.c b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_blinky.c index 1fd2e2635..f15909a3c 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_full.c b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_full.c index 2f6b882d4..3c039a278 100644 --- a/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/app/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Atollic_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Atollic_Specific/RegTest.c index 183bfe96a..7ae55a389 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Atollic_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Atollic_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h index c080491cc..0863bd437 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/IAR_Specific/RegTest_IAR.s b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/IAR_Specific/RegTest_IAR.s index 54fc1a235..26510b233 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/IAR_Specific/RegTest_IAR.s +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/IAR_Specific/RegTest_IAR.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Keil_Specific/RegTest_Keil.s b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Keil_Specific/RegTest_Keil.s index 0374936bb..e57acb2b3 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Keil_Specific/RegTest_Keil.s +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/Keil_Specific/RegTest_Keil.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1100.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1100.c index 473c119d7..150fea3e2 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1100.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1100.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1200.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1200.c index 24aaed8e2..84b7e0227 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1200.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1200.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1300.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1300.c index 1ba3d1163..629d2fab5 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1300.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/ParTest_XMC1300.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c index 506aedcef..6db1b6ff3 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c index 3c9fac6f2..3c0ebdc54 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c index a4afd9f22..0f3770b95 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h index 04bc4ccc0..d4b7f1318 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.c index 016f498ab..1e089991d 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/RegTest.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/RegTest.c index 383b8ba82..c5ecd13e5 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c index f044b3356..bc11611ed 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c index ef4961fa9..88c182d8f 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c index a82558b96..94ccd4490 100644 --- a/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c +++ b/FreeRTOS/Demo/CORTEX_M0_LPC1114_LPCXpresso/RTOSDemo/Source/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h index 7dc6e64b0..d9f3820cf 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c index 0be88a619..56fdb3ae6 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s index 9d36797ed..23cede323 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c index 580420712..88e61b743 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c index 8287df08f..9c5a297f1 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c index d1db0a326..a375fdccb 100644 --- a/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_M0_STM32F0518_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/FreeRTOSConfig.h index e3c3aa50f..b4befe0e3 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/GCC_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/GCC_Specific/RegTest.c index 54b0aced2..b7b927cb9 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/GCC_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/GCC_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/Keil_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/Keil_Specific/RegTest.c index 0af781539..acb198a5b 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/Keil_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/Keil_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main.c index e51978617..96b07fff7 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.c index 67c80a0e6..053f2be50 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/main_full.c index 5db812d6f..8e0c0235c 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_full/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/low_power_tick_config.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/low_power_tick_config.c index 037d11d17..0eab0d185 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/low_power_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/low_power_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/main_low_power.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/main_low_power.c index 14bd4ca89..5bdaf51c4 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main_low_power/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/FreeRTOSConfig.h index 3b07e4bc6..2e9d2fed3 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/MikroC_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/MikroC_Specific/RegTest.c index d769c6824..0177fb1d6 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/MikroC_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/MikroC_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main.c index 634f3a79c..a70a88fc5 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.c index df8b2b0ec..becf9861a 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/main_full.c index fa8683b76..f5e81f418 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_full/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/low_power_tick_config.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/low_power_tick_config.c index c5a100a0c..24f410968 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/low_power_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/low_power_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/main_low_power.c b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/main_low_power.c index edb2e1079..e89db71f7 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC1302_MikroC/main_low_power/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h index 856241706..344223303 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/main.c b/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/main.c index d1cad45e1..6473aa362 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_CEC_MEC_17xx_51xx_Keil_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h index 742beed96..c97ab0878 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c index 476a5604a..283c9aea5 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c index f18370246..224ce01cf 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c index 7fb19c34b..c1b795bf1 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h index e9bee76ce..36844de78 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s index 21cdde346..ff2f1e8dd 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c index a7ae5ca01..34097f00b 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c index f18370246..224ce01cf 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c index 29fbc1ebd..295980020 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h index 9420e624a..82b82e5b1 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c index 133544ea3..2f0500d21 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c index a01f36a8c..ab9cea85f 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c index f18370246..224ce01cf 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c index 27714f93b..d8ca24c9f 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h index e181a93aa..7dc08c9e7 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c index 831bbc6fe..149556076 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c index fa7ab4d82..3c1fd2290 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c index 037ce68b1..2b3eb84a0 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Tasking/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h index 6ac37b455..7e3a532d5 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c index 9ee0dc891..60988797e 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c index c97f16926..420dfb7b4 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c index e4f89c90f..f13af64f5 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4500_GCC_Atollic/src/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h index 6988e0072..22703fd1e 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c index b4df4b738..121e5baae 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/RegTest.c b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/RegTest.c index e58d0d0e2..4d8d069ab 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c index c7fe2d273..11d88eadb 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/FreeRTOSConfig.h index a3f54850c..645d34456 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.c index 8ea5447cc..0324777ad 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.asm b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.asm index 76bc39bea..b345c9692 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.asm +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.c b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.c index e56954a95..0fcd5ad7f 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.s b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.s index ff50f4378..44389ee08 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.s +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RunTimeStatsTimer.c b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RunTimeStatsTimer.c index a29633df7..8c3f34eba 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RunTimeStatsTimer.c +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/RunTimeStatsTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/main_full.c index 092bdb06a..269628439 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/serial.c b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/serial.c index 389a0a453..4c7361971 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/serial.c +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/Full_Demo/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/SimplyBlinkyDemo/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/SimplyBlinkyDemo/main_blinky.c index 94c63fcd0..66a588219 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/SimplyBlinkyDemo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/SimplyBlinkyDemo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/main.c b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/main.c index 8e8d61874..f8ee5dffb 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h index 47cc56ed5..a2dc31e81 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c index 412809880..558a34f50 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s index 08a6eb03c..b45284ef8 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s +++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c index 6032bc417..ad86e6a32 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c +++ b/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/ParTest.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/ParTest.c index a230f366e..32f398cd6 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c index 1cf20d24e..2cdd34de1 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/SAM4L_low_power_tick_management.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h index 8593ab77a..2b4d4c97e 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c index 8d44b248d..7841c7f58 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c index 076bd8c2d..5ec4c88e7 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c index dc2610f0f..c759d1f46 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4L_Atmel_Studio/src/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c index 91875e568..ec8a2411d 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/comtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h index 9c4fbcd18..173184b05 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/Common-Demo-Source/include/demo_serial.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h index a0eeb29c6..65d912560 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.c index c23a1b8c0..f454ce2e7 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/ParTest.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/ParTest.c index 96ce7a750..abad725d5 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c index 9ee862f5e..7f76ad501 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c index f861d7dff..2ad8e244b 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c index 54b2b4e19..edc652512 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c index effe8a53a..c81dd2dbb 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/FreeRTOSConfig.h index 4de29dff1..cb6c52b0f 100644 --- a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/RegTest.asm b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/RegTest.asm index 8f1dd8f64..2d0b47c03 100644 --- a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/RegTest.asm +++ b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/RegTest.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/main_full.c index feecc3634..1e3ae8e8e 100644 --- a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Simply_Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Simply_Blinky_Demo/main_blinky.c index 1dbf3febb..4d4502a11 100644 --- a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Simply_Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/Simply_Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/main.c b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/main.c index 5a910297a..fedb822d6 100644 --- a/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/main.c +++ b/FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM4/main.c b/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM4/main.c index 7d2f9b08b..0483cd7f8 100644 --- a/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM4/main.c +++ b/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM4/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM7/main.c b/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM7/main.c index 100bd3267..66d81170c 100644 --- a/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM7/main.c +++ b/FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/CM7/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Blinky_Demo/main_blinky.c index 2e5d96434..d70ceddc5 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/FreeRTOSConfig.h index f88185212..2c7165d2c 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.c index 58cd2def6..a2eb29bb9 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/RegTest_GCC.c b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/RegTest_GCC.c index 54b0aced2..b7b927cb9 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/RegTest_GCC.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/RegTest_GCC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/main_full.c index ab9069d37..346ba3d82 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/main.c b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/main.c index a43811ac7..0acc409e0 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAME70_Xplained_AtmelStudio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Blinky_Demo/main_blinky.c index 5645aef1a..2c688ec8d 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h index e07d6699c..953666439 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.c index 0a11a4888..94618be67 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/RegTest_GCC.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/RegTest_GCC.c index 54b0aced2..b7b927cb9 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/RegTest_GCC.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/RegTest_GCC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/main_full.c index 2e09ade6a..0421b7998 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c index ab165cb76..923f4488e 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_AtmelStudio/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Blinky_Demo/main_blinky.c index 5645aef1a..2c688ec8d 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/FreeRTOSConfig.h index e07d6699c..953666439 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.c index f06ac7f7a..54e98f6e1 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.c index 2e11af1e2..cfff05d84 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.s b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.s index 30a26518f..fc35798b2 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.s +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/main_full.c index 2e09ade6a..0421b7998 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/main.c b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/main.c index de52bbe73..94a0906b5 100644 --- a/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_M7_SAMV71_Xplained_IAR_Keil/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Blinky_Demo/main_blinky.c index e5787c547..d679fc974 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/FreeRTOSConfig.h index 6b3e587d8..293497ebc 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.c index f0949e190..ae9ee2f2f 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_IAR.s b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_IAR.s index 30a26518f..fc35798b2 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_IAR.s +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_IAR.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_Keil.c b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_Keil.c index 2e11af1e2..cfff05d84 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_Keil.c +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/RegTest_Keil.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/main_full.c index 68df23373..be0dda9e2 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/main.c b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/main.c index 4db0dca23..0fc5ec26d 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h index 4af9d909d..e0953c192 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c index 13a1b87ab..cb64948ca 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c index bde9d9add..eb8c42110 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c index aaf9baa4e..7caabd451 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c index e82864728..b810fb638 100644 --- a/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c +++ b/FreeRTOS/Demo/CORTEX_MB9A310_IAR_Keil/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h index ee0ee8f0d..349138249 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c index 04ed65777..c135569ac 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c index 4931e088c..d5c956cf9 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c index 28b737760..df980c000 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c index e1ec1ea98..6e487b268 100644 --- a/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c +++ b/FreeRTOS/Demo/CORTEX_MB9B500_IAR_Keil/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h index ca7cfc627..1c0cd1824 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/GCC_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/GCC_Specific/RegTest.c index d35d74daf..0307f8614 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/GCC_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/GCC_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/Keil_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/Keil_Specific/RegTest.c index 4030b43ca..3604030ab 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/Keil_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/Keil_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/main.c b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/main.c index f8d104e7d..12515de4b 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_CEC_MEC_17xx_51xx_Keil_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Config/FreeRTOSConfig.h index f2aa78e88..badc3e76c 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/main.c b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/main.c index 6d8e06739..b113ad59a 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.c b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.c index 039439a91..83f7bcc92 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.c +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.h b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.h index e62402761..ece6a5a72 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.h +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Demo/mpu_demo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Projects/MCUXpresso/Startup/memfault_handler.c b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Projects/MCUXpresso/Startup/memfault_handler.c index f0e1b92e3..7fba78e41 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Projects/MCUXpresso/Startup/memfault_handler.c +++ b/FreeRTOS/Demo/CORTEX_MPU_LPC54018_MCUXpresso/Projects/MCUXpresso/Startup/memfault_handler.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Config/FreeRTOSConfig.h index 5ecb9decb..e2f6dd13c 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/fault_handler.s b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/fault_handler.s index d04bb51c4..f24872c4b 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/fault_handler.s +++ b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/fault_handler.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/main_ns.c b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/main_ns.c index 7c8af0101..47ddbf601 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/main_ns.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/NonSecure/main_ns.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Secure/main_s.c b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Secure/main_s.c index f44a018c7..27c644346 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Secure/main_s.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/IAR/Secure/main_s.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Config/FreeRTOSConfig.h index 5ecb9decb..e2f6dd13c 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/NonSecure/main_ns.c b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/NonSecure/main_ns.c index 68d74acc0..757524f01 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/NonSecure/main_ns.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/NonSecure/main_ns.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Secure/main_s.c b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Secure/main_s.c index 9915e9195..7c2bca58f 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Secure/main_s.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Projects/Keil/Secure/main_s.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Config/FreeRTOSConfig.h index 181a66521..6f62a7ab0 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/NonSecure/main_ns.c b/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/NonSecure/main_ns.c index 7ef3618c6..de4d0d527 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/NonSecure/main_ns.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/NonSecure/main_ns.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Secure/main_s.c b/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Secure/main_s.c index 531b0efd0..8353ae381 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Secure/main_s.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/Secure/main_s.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Config/FreeRTOSConfig.h index 181a66521..6f62a7ab0 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c index fb6aeaa6b..da4914654 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c index f32f47a21..7972a95be 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Config/FreeRTOSConfig.h index c8f6553ab..44f756a1c 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.c b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.c index 81d6f5f69..9a72e6c1a 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.h b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.h index 64210fcec..3df250fb3 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.h +++ b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/app_main.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.c b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.c index 039439a91..83f7bcc92 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.h b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.h index e62402761..ece6a5a72 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.h +++ b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Demo/mpu_demo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Projects/GCC/Startup/memfault_handler.c b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Projects/GCC/Startup/memfault_handler.c index f0e1b92e3..7fba78e41 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Projects/GCC/Startup/memfault_handler.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M3_NUCLEO_L152RE_GCC/Projects/GCC/Startup/memfault_handler.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Config/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Config/FreeRTOSConfig.h index c8f6553ab..44f756a1c 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Config/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Config/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.c b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.c index 81d6f5f69..9a72e6c1a 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.h b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.h index 64210fcec..3df250fb3 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.h +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/app_main.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.c b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.c index 039439a91..83f7bcc92 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.c +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.h b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.h index e62402761..ece6a5a72 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.h +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Demo/mpu_demo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/GCC/Startup/memfault_handler.c b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/GCC/Startup/memfault_handler.c index f0e1b92e3..7fba78e41 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/GCC/Startup/memfault_handler.c +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/GCC/Startup/memfault_handler.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/IAR/memfault_handler.s b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/IAR/memfault_handler.s index 4e7b3afd9..a94c0d777 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/IAR/memfault_handler.s +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/IAR/memfault_handler.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/Keil/memfault_handler.c b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/Keil/memfault_handler.c index 59efcd77f..ff7291911 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/Keil/memfault_handler.c +++ b/FreeRTOS/Demo/CORTEX_MPU_STM32L4_Discovery_GCC_IAR_Keil/Projects/Keil/memfault_handler.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h index b486d465b..79ddcc990 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/GCC_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/GCC_Specific/RegTest.c index d35d74daf..0307f8614 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/GCC_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/GCC_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RegTest.c index 4030b43ca..3604030ab 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/Keil_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/main.c b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/main.c index 9a13d6f23..3d61777dc 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h index bfbf80958..6411abe3d 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/RegTest.c index d35d74daf..0307f8614 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RegTest.c b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RegTest.c index 4030b43ca..3604030ab 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RegTest.c +++ b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/main.c b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/main.c index 89aeb02d1..d065d8178 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/System/IAR/Interrupt_Entry_Stubs.asm b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/System/IAR/Interrupt_Entry_Stubs.asm index 97b5812df..ab2c4350d 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/System/IAR/Interrupt_Entry_Stubs.asm +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/System/IAR/Interrupt_Entry_Stubs.asm @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Blinky_Demo/main_blinky.c index 112974536..42260ad2e 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOSConfig.h index 5b994c302..66635240d 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOS_tick_config.c index ce838c526..c250aa33a 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/FreeRTOS_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.c index c9b4edf05..a9755c8b9 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/main_full.c index bd7db3c05..79c112607 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_GCC.S b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_GCC.S index 4cc09f76f..bd899bae3 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_GCC.S +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_GCC.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_IAR.asm b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_IAR.asm index 0b8b98057..33c23a3a6 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_IAR.asm +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/Full_Demo/reg_test_IAR.asm @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/main.c b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/main.c index 8529edc5c..959153937 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/main.c +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h index d81849f65..a64b320c7 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.c index a32ab2989..37645ff4f 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.h b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.h index 0e06be9d7..0361608c4 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.h +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/Library/het.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c index 1b3569a91..937c9086c 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c index b98f068f9..6a1f60a0d 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.h b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.h index 57cec12f6..69238f197 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.h +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/flop_hercules.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c index b2e2f4443..1f36d6cac 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c index ea7605c37..14780b953 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c index 8deb9a0aa..34c995487 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/reg_test.asm b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/reg_test.asm index 6d8490d23..e748bdcf4 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/reg_test.asm +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/reg_test.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c index b2af4a584..ff28134be 100644 --- a/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c +++ b/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Blinky_Demo/main_blinky.c index 0d472963d..4f4f551c5 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOSConfig.h index e2ff86495..9e554809f 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOS_tick_config.c index 148ccf333..f0695b7e1 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/FreeRTOS_tick_config.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.c index 73367ed6b..aadbc0246 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/main_full.c b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/main_full.c index ffe68fba4..d84614581 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/reg_test.S index a73c5ed77..60b122b16 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/Full_Demo/reg_test.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/main.c b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/main.c index ea325d81e..6d0a233ea 100644 --- a/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/main.c +++ b/FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h index 4a669c76e..d82a1dee8 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c index 1b434fa6d..15c1e4b48 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c index 799ec946e..3c7548e10 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h index 424eb885d..1711c79b3 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/Drivers/STM32_USART.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h index 99a7834d1..f07c89e82 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_MCBSTM32.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_MCBSTM32.c index d1c40b138..04a154a7d 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_MCBSTM32.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_MCBSTM32.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_ST_Eval.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_ST_Eval.c index 5970f60f1..65b72ba5a 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_ST_Eval.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/ParTest/ParTest_ST_Eval.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c index bb2583490..e2ee01601 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h index a818268a8..36bcc70ea 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c index 5970f60f1..65b72ba5a 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c index b662866c3..c1c7c39fb 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c index f32be3655..65d40ee5b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c index 89138f4aa..a875f61b2 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h index a818268a8..36bcc70ea 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c index 5970f60f1..65b72ba5a 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c index b662866c3..c1c7c39fb 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c index f32be3655..65d40ee5b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c index 89138f4aa..a875f61b2 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h index 0add48286..af744109e 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c index be2276bd0..58ab8cf64 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h index 9c336cb34..ce632a669 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/bitmap.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c index 311e3f652..c7754809a 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c index 89138f4aa..a875f61b2 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h index dddb301d2..f4a809d03 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c index 795fcbd89..92bd61974 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c index cb6be8508..c26e60896 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/scsc.tmp b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/scsc.tmp index d84023d80..2f5a5c182 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/scsc.tmp +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/scsc.tmp @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c index 308b1b424..326a89837 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c index 6534aa71f..616ede213 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c.scsc b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c.scsc index fcc8246ac..5caffa8bf 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c.scsc +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.c.scsc @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h index c79a4ed79..6b04cfc35 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h.scsc b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h.scsc index 4766eb132..407664b69 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h.scsc +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/emac.h.scsc @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c index 01cdad968..401df1e0b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c +++ b/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/webserver/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c index 8ab0a605c..2b72665bf 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/STM32L_low_power_tick_management.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h index a78e2b5fe..1528291b5 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c index ed5cf6a38..3644ba0f8 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c index 903fa6e53..0cc45ac82 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c index b716d745f..e26d6721e 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h index 3421055d4..521a2b2f6 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c index 5bbb55b0d..236ebf322 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c index a237c1086..023ccca6d 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c index 980a978b9..bc9039117 100644 --- a/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c +++ b/FreeRTOS/Demo/CORTEX_STM32L152_IAR/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c index 7394bdbd7..da9836c51 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h index fe63c0ee0..c113bb0de 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/7seg.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h index a5adc6f23..ee8bdef89 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c index 946d25a56..3eb1bc876 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c index 71ac2bbb9..63e926ac4 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h index 8643e3ea5..902ad87a9 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/RegTest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h index 2f395461d..bd5b33a9d 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c index b6163bb76..6377fb60d 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c index 6cf0ddbe3..f3abcf9b5 100644 --- a/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c +++ b/FreeRTOS/Demo/CORTUS_APS3_GCC/Demo/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h index 10a7e59eb..bf645bcaa 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c index 2de6b8fa6..094393f13 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c index 6ccb20e2e..2b5a35bb2 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/httpd/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c index 6d81f1b4f..8b99185a3 100644 --- a/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF51CN128_CodeWarrior/Sources/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h index f91570dc7..42089150c 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c index 7384cffec..8074b1296 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c index 86748ca95..ce8f1b15c 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c index 1e698b91f..ebdf05271 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c index f8f096e80..3d28c1036 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h index 483edfc10..16a7870cb 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c index d397ff62a..e92f40a2c 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c index f2289fd56..2d913be88 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h index f55669acd..34bd7bf41 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/HTTPDemo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c index 86748ca95..ce8f1b15c 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c index 18598007a..9b3fe5108 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.c b/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.c index 6dea6db9d..2d9516ff3 100644 --- a/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.c +++ b/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.h b/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.h index e62402761..ece6a5a72 100644 --- a/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.h +++ b/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.c b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.c index 9bf2b59db..0e3b563ea 100644 --- a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.c +++ b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.h b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.h index 45642303e..fbc0372eb 100644 --- a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.h +++ b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/nsc_functions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.c b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.c index 7d42da48a..5d8d86f30 100644 --- a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.c +++ b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.h b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.h index f3277ab29..fe390890f 100644 --- a/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.h +++ b/FreeRTOS/Demo/Common/ARMv8M/tz_demo/tz_demo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/BlockQ.c b/FreeRTOS/Demo/Common/Full/BlockQ.c index 63e109159..b3ea3a057 100644 --- a/FreeRTOS/Demo/Common/Full/BlockQ.c +++ b/FreeRTOS/Demo/Common/Full/BlockQ.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/PollQ.c b/FreeRTOS/Demo/Common/Full/PollQ.c index 169ab484e..0c1708f5b 100644 --- a/FreeRTOS/Demo/Common/Full/PollQ.c +++ b/FreeRTOS/Demo/Common/Full/PollQ.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/comtest.c b/FreeRTOS/Demo/Common/Full/comtest.c index 6019c7c4b..8852498c7 100644 --- a/FreeRTOS/Demo/Common/Full/comtest.c +++ b/FreeRTOS/Demo/Common/Full/comtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/death.c b/FreeRTOS/Demo/Common/Full/death.c index 7bc65f519..b5f64ee4a 100644 --- a/FreeRTOS/Demo/Common/Full/death.c +++ b/FreeRTOS/Demo/Common/Full/death.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/dynamic.c b/FreeRTOS/Demo/Common/Full/dynamic.c index 1311eb62c..979ed64e4 100644 --- a/FreeRTOS/Demo/Common/Full/dynamic.c +++ b/FreeRTOS/Demo/Common/Full/dynamic.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/events.c b/FreeRTOS/Demo/Common/Full/events.c index 1e0ec9928..4ffa19321 100644 --- a/FreeRTOS/Demo/Common/Full/events.c +++ b/FreeRTOS/Demo/Common/Full/events.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/flash.c b/FreeRTOS/Demo/Common/Full/flash.c index 1a56a6949..d0ce67021 100644 --- a/FreeRTOS/Demo/Common/Full/flash.c +++ b/FreeRTOS/Demo/Common/Full/flash.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/flop.c b/FreeRTOS/Demo/Common/Full/flop.c index b1c6b13d5..f501979df 100644 --- a/FreeRTOS/Demo/Common/Full/flop.c +++ b/FreeRTOS/Demo/Common/Full/flop.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/integer.c b/FreeRTOS/Demo/Common/Full/integer.c index cc7787800..736ef758b 100644 --- a/FreeRTOS/Demo/Common/Full/integer.c +++ b/FreeRTOS/Demo/Common/Full/integer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/print.c b/FreeRTOS/Demo/Common/Full/print.c index 787609fc9..063652d13 100644 --- a/FreeRTOS/Demo/Common/Full/print.c +++ b/FreeRTOS/Demo/Common/Full/print.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Full/semtest.c b/FreeRTOS/Demo/Common/Full/semtest.c index 382bf2a65..97422e9a9 100644 --- a/FreeRTOS/Demo/Common/Full/semtest.c +++ b/FreeRTOS/Demo/Common/Full/semtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/AbortDelay.c b/FreeRTOS/Demo/Common/Minimal/AbortDelay.c index 65d0104e8..d00347ad9 100644 --- a/FreeRTOS/Demo/Common/Minimal/AbortDelay.c +++ b/FreeRTOS/Demo/Common/Minimal/AbortDelay.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/BlockQ.c b/FreeRTOS/Demo/Common/Minimal/BlockQ.c index 96607860d..df338ab2a 100644 --- a/FreeRTOS/Demo/Common/Minimal/BlockQ.c +++ b/FreeRTOS/Demo/Common/Minimal/BlockQ.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c index 21b2d7769..0cf8c2b79 100644 --- a/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/GenQTest.c b/FreeRTOS/Demo/Common/Minimal/GenQTest.c index b9022333f..ec468ea27 100644 --- a/FreeRTOS/Demo/Common/Minimal/GenQTest.c +++ b/FreeRTOS/Demo/Common/Minimal/GenQTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/IntQueue.c b/FreeRTOS/Demo/Common/Minimal/IntQueue.c index d6e823e5a..f449a37d3 100644 --- a/FreeRTOS/Demo/Common/Minimal/IntQueue.c +++ b/FreeRTOS/Demo/Common/Minimal/IntQueue.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/IntSemTest.c b/FreeRTOS/Demo/Common/Minimal/IntSemTest.c index 884f719a3..effedfad8 100644 --- a/FreeRTOS/Demo/Common/Minimal/IntSemTest.c +++ b/FreeRTOS/Demo/Common/Minimal/IntSemTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/MessageBufferAMP.c b/FreeRTOS/Demo/Common/Minimal/MessageBufferAMP.c index 241784426..abb2fa02f 100644 --- a/FreeRTOS/Demo/Common/Minimal/MessageBufferAMP.c +++ b/FreeRTOS/Demo/Common/Minimal/MessageBufferAMP.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/MessageBufferDemo.c b/FreeRTOS/Demo/Common/Minimal/MessageBufferDemo.c index ef52b2fd1..73f392b1e 100644 --- a/FreeRTOS/Demo/Common/Minimal/MessageBufferDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/MessageBufferDemo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/PollQ.c b/FreeRTOS/Demo/Common/Minimal/PollQ.c index f24dd071e..dea876a6b 100644 --- a/FreeRTOS/Demo/Common/Minimal/PollQ.c +++ b/FreeRTOS/Demo/Common/Minimal/PollQ.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/QPeek.c b/FreeRTOS/Demo/Common/Minimal/QPeek.c index f1820b9a7..55b21d2f2 100644 --- a/FreeRTOS/Demo/Common/Minimal/QPeek.c +++ b/FreeRTOS/Demo/Common/Minimal/QPeek.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c index 5b1dea541..f0dc2d368 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueOverwrite.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/QueueSet.c b/FreeRTOS/Demo/Common/Minimal/QueueSet.c index ad34a50e5..507006c2c 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueSet.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueSet.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c b/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c index e5e57d43c..0782f0588 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueSetPolling.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c b/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c index 32e677731..f08713d5d 100644 --- a/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c +++ b/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/StreamBufferDemo.c b/FreeRTOS/Demo/Common/Minimal/StreamBufferDemo.c index 3eac259cf..49546ce96 100644 --- a/FreeRTOS/Demo/Common/Minimal/StreamBufferDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/StreamBufferDemo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c b/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c index 997d1d740..6cff87d2f 100644 --- a/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c +++ b/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/TaskNotify.c b/FreeRTOS/Demo/Common/Minimal/TaskNotify.c index 8ee87051f..1afdde760 100644 --- a/FreeRTOS/Demo/Common/Minimal/TaskNotify.c +++ b/FreeRTOS/Demo/Common/Minimal/TaskNotify.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c index 29478819a..9df78c467 100644 --- a/FreeRTOS/Demo/Common/Minimal/TimerDemo.c +++ b/FreeRTOS/Demo/Common/Minimal/TimerDemo.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/blocktim.c b/FreeRTOS/Demo/Common/Minimal/blocktim.c index 9abf824fc..92282fe26 100644 --- a/FreeRTOS/Demo/Common/Minimal/blocktim.c +++ b/FreeRTOS/Demo/Common/Minimal/blocktim.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/comtest.c b/FreeRTOS/Demo/Common/Minimal/comtest.c index 3c4de38cf..fe9c77091 100644 --- a/FreeRTOS/Demo/Common/Minimal/comtest.c +++ b/FreeRTOS/Demo/Common/Minimal/comtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c index 286725dac..6ff05e87a 100644 --- a/FreeRTOS/Demo/Common/Minimal/comtest_strings.c +++ b/FreeRTOS/Demo/Common/Minimal/comtest_strings.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/countsem.c b/FreeRTOS/Demo/Common/Minimal/countsem.c index 5f49369d1..70eafaf8a 100644 --- a/FreeRTOS/Demo/Common/Minimal/countsem.c +++ b/FreeRTOS/Demo/Common/Minimal/countsem.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/crflash.c b/FreeRTOS/Demo/Common/Minimal/crflash.c index 23f553b55..4acb2d1db 100644 --- a/FreeRTOS/Demo/Common/Minimal/crflash.c +++ b/FreeRTOS/Demo/Common/Minimal/crflash.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/crhook.c b/FreeRTOS/Demo/Common/Minimal/crhook.c index 6069ada40..576e247e0 100644 --- a/FreeRTOS/Demo/Common/Minimal/crhook.c +++ b/FreeRTOS/Demo/Common/Minimal/crhook.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/death.c b/FreeRTOS/Demo/Common/Minimal/death.c index b2fa8980a..aff60e59a 100644 --- a/FreeRTOS/Demo/Common/Minimal/death.c +++ b/FreeRTOS/Demo/Common/Minimal/death.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/dynamic.c b/FreeRTOS/Demo/Common/Minimal/dynamic.c index 26ccdf04f..4e613e890 100644 --- a/FreeRTOS/Demo/Common/Minimal/dynamic.c +++ b/FreeRTOS/Demo/Common/Minimal/dynamic.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/flash.c b/FreeRTOS/Demo/Common/Minimal/flash.c index 58a70a48b..c0bf488b0 100644 --- a/FreeRTOS/Demo/Common/Minimal/flash.c +++ b/FreeRTOS/Demo/Common/Minimal/flash.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/flash_timer.c b/FreeRTOS/Demo/Common/Minimal/flash_timer.c index 5a244ba65..e353615e9 100644 --- a/FreeRTOS/Demo/Common/Minimal/flash_timer.c +++ b/FreeRTOS/Demo/Common/Minimal/flash_timer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/flop.c b/FreeRTOS/Demo/Common/Minimal/flop.c index 186b97f72..63e61a6cd 100644 --- a/FreeRTOS/Demo/Common/Minimal/flop.c +++ b/FreeRTOS/Demo/Common/Minimal/flop.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/integer.c b/FreeRTOS/Demo/Common/Minimal/integer.c index 25b6eab22..bacae5938 100644 --- a/FreeRTOS/Demo/Common/Minimal/integer.c +++ b/FreeRTOS/Demo/Common/Minimal/integer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/recmutex.c b/FreeRTOS/Demo/Common/Minimal/recmutex.c index a2d4ed2e4..81fd49308 100644 --- a/FreeRTOS/Demo/Common/Minimal/recmutex.c +++ b/FreeRTOS/Demo/Common/Minimal/recmutex.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/semtest.c b/FreeRTOS/Demo/Common/Minimal/semtest.c index 84c53a78c..7303d598e 100644 --- a/FreeRTOS/Demo/Common/Minimal/semtest.c +++ b/FreeRTOS/Demo/Common/Minimal/semtest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/Minimal/sp_flop.c b/FreeRTOS/Demo/Common/Minimal/sp_flop.c index 6feaed353..04e5677cd 100644 --- a/FreeRTOS/Demo/Common/Minimal/sp_flop.c +++ b/FreeRTOS/Demo/Common/Minimal/sp_flop.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c index 1570c4b9b..00496b1a5 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/ethernetif.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c index 7b2ffba3a..130ecf939 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/arch.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/netif.h b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/netif.h index 114bdf38a..6887a50ff 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/netif.h +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/WinPCap/netif.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c index bebadc59b..f2ba2068b 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/AbortDelay.h b/FreeRTOS/Demo/Common/include/AbortDelay.h index 30792a72f..91e963902 100644 --- a/FreeRTOS/Demo/Common/include/AbortDelay.h +++ b/FreeRTOS/Demo/Common/include/AbortDelay.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/BlockQ.h b/FreeRTOS/Demo/Common/include/BlockQ.h index 18265ef88..200661cd0 100644 --- a/FreeRTOS/Demo/Common/include/BlockQ.h +++ b/FreeRTOS/Demo/Common/include/BlockQ.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/EventGroupsDemo.h b/FreeRTOS/Demo/Common/include/EventGroupsDemo.h index 4080e99a5..06ef0605f 100644 --- a/FreeRTOS/Demo/Common/include/EventGroupsDemo.h +++ b/FreeRTOS/Demo/Common/include/EventGroupsDemo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/GenQTest.h b/FreeRTOS/Demo/Common/include/GenQTest.h index 942970740..a58addfdd 100644 --- a/FreeRTOS/Demo/Common/include/GenQTest.h +++ b/FreeRTOS/Demo/Common/include/GenQTest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/IntQueue.h b/FreeRTOS/Demo/Common/include/IntQueue.h index 3b532a614..2ba7c7cb8 100644 --- a/FreeRTOS/Demo/Common/include/IntQueue.h +++ b/FreeRTOS/Demo/Common/include/IntQueue.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/IntSemTest.h b/FreeRTOS/Demo/Common/include/IntSemTest.h index 200582565..ba4f065c2 100644 --- a/FreeRTOS/Demo/Common/include/IntSemTest.h +++ b/FreeRTOS/Demo/Common/include/IntSemTest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/MessageBufferAMP.h b/FreeRTOS/Demo/Common/include/MessageBufferAMP.h index 89a7c55cf..d7175cc47 100644 --- a/FreeRTOS/Demo/Common/include/MessageBufferAMP.h +++ b/FreeRTOS/Demo/Common/include/MessageBufferAMP.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/MessageBufferDemo.h b/FreeRTOS/Demo/Common/include/MessageBufferDemo.h index b18ee555a..88d66413f 100644 --- a/FreeRTOS/Demo/Common/include/MessageBufferDemo.h +++ b/FreeRTOS/Demo/Common/include/MessageBufferDemo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/PollQ.h b/FreeRTOS/Demo/Common/include/PollQ.h index 5d2e3fdd9..dcdf95ac5 100644 --- a/FreeRTOS/Demo/Common/include/PollQ.h +++ b/FreeRTOS/Demo/Common/include/PollQ.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/QPeek.h b/FreeRTOS/Demo/Common/include/QPeek.h index a628063fa..280fe97b8 100644 --- a/FreeRTOS/Demo/Common/include/QPeek.h +++ b/FreeRTOS/Demo/Common/include/QPeek.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/QueueOverwrite.h b/FreeRTOS/Demo/Common/include/QueueOverwrite.h index cbdd1866c..b00ee088a 100644 --- a/FreeRTOS/Demo/Common/include/QueueOverwrite.h +++ b/FreeRTOS/Demo/Common/include/QueueOverwrite.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/QueueSet.h b/FreeRTOS/Demo/Common/include/QueueSet.h index 4f1090c34..e5b8513b8 100644 --- a/FreeRTOS/Demo/Common/include/QueueSet.h +++ b/FreeRTOS/Demo/Common/include/QueueSet.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/QueueSetPolling.h b/FreeRTOS/Demo/Common/include/QueueSetPolling.h index 775eb7b68..da8a2bed3 100644 --- a/FreeRTOS/Demo/Common/include/QueueSetPolling.h +++ b/FreeRTOS/Demo/Common/include/QueueSetPolling.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/StaticAllocation.h b/FreeRTOS/Demo/Common/include/StaticAllocation.h index 130a13f2b..e76e35a64 100644 --- a/FreeRTOS/Demo/Common/include/StaticAllocation.h +++ b/FreeRTOS/Demo/Common/include/StaticAllocation.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/StreamBufferDemo.h b/FreeRTOS/Demo/Common/include/StreamBufferDemo.h index 9327872ad..cf36e03d1 100644 --- a/FreeRTOS/Demo/Common/include/StreamBufferDemo.h +++ b/FreeRTOS/Demo/Common/include/StreamBufferDemo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/StreamBufferInterrupt.h b/FreeRTOS/Demo/Common/include/StreamBufferInterrupt.h index 24914fc0f..050895abb 100644 --- a/FreeRTOS/Demo/Common/include/StreamBufferInterrupt.h +++ b/FreeRTOS/Demo/Common/include/StreamBufferInterrupt.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/TaskNotify.h b/FreeRTOS/Demo/Common/include/TaskNotify.h index 9ad8d5e00..e5636b720 100644 --- a/FreeRTOS/Demo/Common/include/TaskNotify.h +++ b/FreeRTOS/Demo/Common/include/TaskNotify.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/TimerDemo.h b/FreeRTOS/Demo/Common/include/TimerDemo.h index f3101e7cf..a9eabd24c 100644 --- a/FreeRTOS/Demo/Common/include/TimerDemo.h +++ b/FreeRTOS/Demo/Common/include/TimerDemo.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/blocktim.h b/FreeRTOS/Demo/Common/include/blocktim.h index 76223b7a1..891ca53c7 100644 --- a/FreeRTOS/Demo/Common/include/blocktim.h +++ b/FreeRTOS/Demo/Common/include/blocktim.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/comtest.h b/FreeRTOS/Demo/Common/include/comtest.h index 0607f2b5b..9699a15cb 100644 --- a/FreeRTOS/Demo/Common/include/comtest.h +++ b/FreeRTOS/Demo/Common/include/comtest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/comtest2.h b/FreeRTOS/Demo/Common/include/comtest2.h index 397236183..89b95115f 100644 --- a/FreeRTOS/Demo/Common/include/comtest2.h +++ b/FreeRTOS/Demo/Common/include/comtest2.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/comtest_strings.h b/FreeRTOS/Demo/Common/include/comtest_strings.h index f9291b6cc..4b7619582 100644 --- a/FreeRTOS/Demo/Common/include/comtest_strings.h +++ b/FreeRTOS/Demo/Common/include/comtest_strings.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/countsem.h b/FreeRTOS/Demo/Common/include/countsem.h index 644faae4e..4bb0b0532 100644 --- a/FreeRTOS/Demo/Common/include/countsem.h +++ b/FreeRTOS/Demo/Common/include/countsem.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/crflash.h b/FreeRTOS/Demo/Common/include/crflash.h index f4b8988d7..7ecd9ef15 100644 --- a/FreeRTOS/Demo/Common/include/crflash.h +++ b/FreeRTOS/Demo/Common/include/crflash.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/crhook.h b/FreeRTOS/Demo/Common/include/crhook.h index 85209fc7a..eae878e37 100644 --- a/FreeRTOS/Demo/Common/include/crhook.h +++ b/FreeRTOS/Demo/Common/include/crhook.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/death.h b/FreeRTOS/Demo/Common/include/death.h index c6213c6df..8552bf8b1 100644 --- a/FreeRTOS/Demo/Common/include/death.h +++ b/FreeRTOS/Demo/Common/include/death.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/dynamic.h b/FreeRTOS/Demo/Common/include/dynamic.h index b90ce4067..ca64c2a97 100644 --- a/FreeRTOS/Demo/Common/include/dynamic.h +++ b/FreeRTOS/Demo/Common/include/dynamic.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/fileIO.h b/FreeRTOS/Demo/Common/include/fileIO.h index 747a56464..51dcbf24b 100644 --- a/FreeRTOS/Demo/Common/include/fileIO.h +++ b/FreeRTOS/Demo/Common/include/fileIO.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/flash.h b/FreeRTOS/Demo/Common/include/flash.h index 88a1efed6..2ac631a3a 100644 --- a/FreeRTOS/Demo/Common/include/flash.h +++ b/FreeRTOS/Demo/Common/include/flash.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/flash_timer.h b/FreeRTOS/Demo/Common/include/flash_timer.h index a61e5a577..b31912009 100644 --- a/FreeRTOS/Demo/Common/include/flash_timer.h +++ b/FreeRTOS/Demo/Common/include/flash_timer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/flop.h b/FreeRTOS/Demo/Common/include/flop.h index 7e7f43646..1a20822da 100644 --- a/FreeRTOS/Demo/Common/include/flop.h +++ b/FreeRTOS/Demo/Common/include/flop.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/integer.h b/FreeRTOS/Demo/Common/include/integer.h index c1c53624b..30d56b643 100644 --- a/FreeRTOS/Demo/Common/include/integer.h +++ b/FreeRTOS/Demo/Common/include/integer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/mevents.h b/FreeRTOS/Demo/Common/include/mevents.h index 4d5f8525a..54d3e43de 100644 --- a/FreeRTOS/Demo/Common/include/mevents.h +++ b/FreeRTOS/Demo/Common/include/mevents.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/partest.h b/FreeRTOS/Demo/Common/include/partest.h index cbe3e67fe..deccda904 100644 --- a/FreeRTOS/Demo/Common/include/partest.h +++ b/FreeRTOS/Demo/Common/include/partest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/print.h b/FreeRTOS/Demo/Common/include/print.h index 29088b950..04eb4d5da 100644 --- a/FreeRTOS/Demo/Common/include/print.h +++ b/FreeRTOS/Demo/Common/include/print.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/recmutex.h b/FreeRTOS/Demo/Common/include/recmutex.h index 679c37976..44a48caf1 100644 --- a/FreeRTOS/Demo/Common/include/recmutex.h +++ b/FreeRTOS/Demo/Common/include/recmutex.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/semtest.h b/FreeRTOS/Demo/Common/include/semtest.h index b7a5bb044..3b42141ef 100644 --- a/FreeRTOS/Demo/Common/include/semtest.h +++ b/FreeRTOS/Demo/Common/include/semtest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Common/include/serial.h b/FreeRTOS/Demo/Common/include/serial.h index 9c4fbcd18..173184b05 100644 --- a/FreeRTOS/Demo/Common/include/serial.h +++ b/FreeRTOS/Demo/Common/include/serial.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h b/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h index 3b655fec9..1d00cafc4 100644 --- a/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/Cygnal/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Cygnal/Makefile b/FreeRTOS/Demo/Cygnal/Makefile index 4f88b8cca..8aef80bb5 100644 --- a/FreeRTOS/Demo/Cygnal/Makefile +++ b/FreeRTOS/Demo/Cygnal/Makefile @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c b/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c index 40551cb48..beade909f 100644 --- a/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c +++ b/FreeRTOS/Demo/Cygnal/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Cygnal/main.c b/FreeRTOS/Demo/Cygnal/main.c index e148cae78..2f5123bfb 100644 --- a/FreeRTOS/Demo/Cygnal/main.c +++ b/FreeRTOS/Demo/Cygnal/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Cygnal/serial/serial.c b/FreeRTOS/Demo/Cygnal/serial/serial.c index 712f7a735..349ae4536 100644 --- a/FreeRTOS/Demo/Cygnal/serial/serial.c +++ b/FreeRTOS/Demo/Cygnal/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Flshlite/FRConfig.h b/FreeRTOS/Demo/Flshlite/FRConfig.h index 8abe28dc1..03b09e52f 100644 --- a/FreeRTOS/Demo/Flshlite/FRConfig.h +++ b/FreeRTOS/Demo/Flshlite/FRConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c b/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c index d0e54c0a3..9c830c5e8 100644 --- a/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c +++ b/FreeRTOS/Demo/Flshlite/FileIO/fileIO.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h b/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h index b1cb93211..8f0ae1890 100644 --- a/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/Flshlite/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c b/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c index e3decdcc5..71f9483e8 100644 --- a/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c +++ b/FreeRTOS/Demo/Flshlite/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Flshlite/main.c b/FreeRTOS/Demo/Flshlite/main.c index 37cc81fa2..4a87a3dbe 100644 --- a/FreeRTOS/Demo/Flshlite/main.c +++ b/FreeRTOS/Demo/Flshlite/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Flshlite/serial/serial.c b/FreeRTOS/Demo/Flshlite/serial/serial.c index 83208fcc8..1af9bbbfa 100644 --- a/FreeRTOS/Demo/Flshlite/serial/serial.c +++ b/FreeRTOS/Demo/Flshlite/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h index b551bf105..8d9fdb943 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/H8S/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c index 06347de17..90b5f3a13 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c +++ b/FreeRTOS/Demo/H8S/RTOSDemo/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/main.c b/FreeRTOS/Demo/H8S/RTOSDemo/main.c index 9a1fb2ea3..a77e31999 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/main.c +++ b/FreeRTOS/Demo/H8S/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c index a570302ff..4b2ec8c84 100644 --- a/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/H8S/RTOSDemo/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/COM0.C b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/_COM0.C similarity index 100% rename from FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/COM0.C rename to FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/_COM0.C diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/COM0.H b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/_COM0.H similarity index 100% rename from FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/COM0.H rename to FreeRTOS/Demo/HCS12_CodeWarrior_banked/CODE/_COM0.H diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h index 768bb3f18..4d756a395 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c index 13c1f19fe..6961feefe 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c index 9e16bcaf2..a373fbd0e 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/main.c @@ -1,7 +1,7 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c index 4bd363f5c..15a9c8164 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_banked/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h index 9c9b60330..c30df043c 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c index 13c1f19fe..6961feefe 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c index 3b99c78c6..87fe3c5e7 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c b/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c index 98ae6e092..4f00245c8 100644 --- a/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c +++ b/FreeRTOS/Demo/HCS12_CodeWarrior_small/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h b/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h index 291e171e8..a7afefb72 100644 --- a/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/HCS12_GCC_banked/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c b/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c index 9837e107f..791e20596 100644 --- a/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c +++ b/FreeRTOS/Demo/HCS12_GCC_banked/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/main.c b/FreeRTOS/Demo/HCS12_GCC_banked/main.c index 1d7f5ac97..c2f3b25e0 100644 --- a/FreeRTOS/Demo/HCS12_GCC_banked/main.c +++ b/FreeRTOS/Demo/HCS12_GCC_banked/main.c @@ -1,7 +1,7 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/HCS12_GCC_banked/startup.c b/FreeRTOS/Demo/HCS12_GCC_banked/startup.c index aeada05eb..3399a6fa6 100644 --- a/FreeRTOS/Demo/HCS12_GCC_banked/startup.c +++ b/FreeRTOS/Demo/HCS12_GCC_banked/startup.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Blinky_Demo/main_blinky.c index 4b16e1741..75bda5645 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/FreeRTOSConfig.h b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/FreeRTOSConfig.h index 3f396ccee..320e5de60 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.c index 052f322bc..5f0132d59 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/RegTest.S b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/RegTest.S index a546aee4d..40ac2cd00 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/RegTest.S +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/RegTest.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/main_full.c b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/main_full.c index 35b8c1770..3fe322186 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/freestanding_functions.c b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/freestanding_functions.c index ae9f22a57..45e8b099e 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/freestanding_functions.c +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/freestanding_functions.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/math.h b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/math.h index d58a463dc..4a9eeb638 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/math.h +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/math.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/startup.S b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/startup.S index 5c474bc5a..b2677a95f 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/startup.S +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/startup.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/stdint.h b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/stdint.h index 106f70f38..7b4e40e89 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/stdint.h +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/Support_Files/stdint.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/main.c b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/main.c index 07102337c..7dc570554 100644 --- a/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/main.c +++ b/FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h b/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h index be7def4a0..6da50219d 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c b/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c index d040a857f..9cdcb917e 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/crflash_modified.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c index 67a6124b7..cfe480583 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/main.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c b/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c index 5528748de..6bdbec36b 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/partest/partest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c b/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c index f7371a44b..25b56f6dd 100644 --- a/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c +++ b/FreeRTOS/Demo/MB91460_Softune/SRC/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h index 9411c9826..254dcbc21 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c index d040a857f..9cdcb917e 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/crflash_sk16fx100mpc.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c index f1363e052..883a50d2d 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/partest/partest.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/partest/partest.c index 7118a7527..37f44db9f 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/partest/partest.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/partest/partest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c index 39e09616c..54f0442bd 100644 --- a/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c +++ b/FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c index f705607e4..62de98060 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h index 75a9c4d81..18899c594 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/DiceTask.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h index f81223e7b..58facd906 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c index 7e9efffa3..b0fdb5c6e 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c index 893aa04f2..cfdb3d8e6 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/SegmentToggleTasks.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c index d57c1d452..b53cbb1b1 100644 --- a/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c +++ b/FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h index 2d71723ff..c8bafad0e 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c index b7df323fb..6815b7ae2 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm index 3cbc136f9..59bbb6e39 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm @@ -1,7 +1,7 @@ ; ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c index 31752aab6..a45cd0de1 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RunTimeStatsConfig.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c index b095c0638..c2f6877df 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c index 70d5a8867..015a3e1ab 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h index a988f5061..87a89800c 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c index b7df323fb..6815b7ae2 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43 b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43 index 76ff4d59d..5f2498f27 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43 +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RegTest.s43 @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c index b6f527c14..2c3c4faf5 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/RunTimeStatsConfig.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c index e868d18c1..422d651ac 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c index e3d00a976..a90ae6125 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c +++ b/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Blinky_Demo/main_blinky.c index 840b57c68..bae812a1a 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/CCS_Only/RegTest.asm b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/CCS_Only/RegTest.asm index 18bbff2f8..6c5e434c2 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/CCS_Only/RegTest.asm +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/CCS_Only/RegTest.asm @@ -1,7 +1,7 @@ ; ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h index 49bcc5e9d..16ce691f9 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/main_full.c b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/main_full.c index 871ff615c..c82e6800e 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/serial.c b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/serial.c index 2f425e8e3..0fccdd7f3 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/serial.c +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/Full_Demo/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/IAR_Only/RegTest.s43 b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/IAR_Only/RegTest.s43 index b9dd6eca8..407c919f6 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/IAR_Only/RegTest.s43 +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/IAR_Only/RegTest.s43 @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c index 2cbbf97ab..f339b7b26 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/LEDs.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c index 7318bdacf..57fa0ff8b 100644 --- a/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c +++ b/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Blinky_Demo/main_blinky.c index 599c69d4f..37034be10 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h index 1a7731c0a..3c879b419 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/RegisterTests.S b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/RegisterTests.S index 849f80e2f..c4924a7a2 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/RegisterTests.S +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/RegisterTests.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/main_full.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/main_full.c index 13e273720..1da94468c 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c index 9e6bdc866..320b318a2 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c index b88eb393d..e58bcbe50 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c index 81fcacbe8..57bc5a2db 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h index fc00d94ca..4bb4aec7d 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/main_lwIP.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/main_lwIP.c index 66ce54c87..723df6c28 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/main_lwIP.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lwIP_Demo/main_lwIP.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c index bf1bb7eb3..fef7a5ffe 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c index 72cc8f027..a1c24f583 100644 --- a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c +++ b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26 b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26 index a39c6e641..cd98ce192 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26 +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonISR.s26 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c index c1f089c50..eee4e5746 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/ButtonTask.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h index 48f68a5d9..6cdf2dbe4 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26 b/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26 index d0136f737..e132a4836 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26 +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/RegTest.s26 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_78K0R_IAR/main.c b/FreeRTOS/Demo/NEC_78K0R_IAR/main.c index 9b5b56a21..ecc2223b6 100644 --- a/FreeRTOS/Demo/NEC_78K0R_IAR/main.c +++ b/FreeRTOS/Demo/NEC_78K0R_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h index 24ebdbd88..f1ba02041 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c index e28f33c98..a70f4c769 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c index 7318e777f..b3a1b3f6d 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Fx3.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c index db2ab176b..2e559cf2d 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/LowLevelInit/LowLevelInit_Hx2.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Fx3_App_Board.c b/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Fx3_App_Board.c index 08f5e80ca..89e436e66 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Fx3_App_Board.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Fx3_App_Board.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Generic_Target_Board.c b/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Generic_Target_Board.c index a44cfbbd6..709fc6e0f 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Generic_Target_Board.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/ParTest/ParTest_Generic_Target_Board.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85 b/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85 index 03582f5cb..1ef661da0 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85 +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/RegTest.s85 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/main.c b/FreeRTOS/Demo/NEC_V850ES_IAR/main.c index e3276061f..684bf5d6a 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/main.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c b/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c index 5abd48e25..5ff1c6d41 100644 --- a/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c +++ b/FreeRTOS/Demo/NEC_V850ES_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h index e65d0443e..cd47b84f8 100644 --- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/ParTest/ParTest.c index 00b3ce2f5..9aaddecd3 100644 --- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/ParTest/ParTest.c +++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c index 0795c7f04..b91d78da8 100644 --- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c index 9d56e4fa1..6fd8a3042 100644 --- a/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c +++ b/FreeRTOS/Demo/NiosII_CycloneIII_DBC3C40_GCC/RTOSDemo/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h index 8e55655f4..a662736fc 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_MPLAB/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c index c6ed51049..5235d35c4 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main1.c b/FreeRTOS/Demo/PIC18_MPLAB/main1.c index 8950f3623..4dc1989f8 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main1.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main1.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main2.c b/FreeRTOS/Demo/PIC18_MPLAB/main2.c index 15ba88509..1ea5517b8 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main2.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main2.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_MPLAB/main3.c b/FreeRTOS/Demo/PIC18_MPLAB/main3.c index c746dbdc7..a47cdc9f3 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/main3.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/main3.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c index 5dc2fdb90..790f9e239 100644 --- a/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c +++ b/FreeRTOS/Demo/PIC18_MPLAB/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h index e4bd51fce..18dd39910 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h index 4424dfe5f..e40e2ba72 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/WIZCmake.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c index 1793f88a8..b80c87183 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/fuses.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c index 818a180f0..3110f7988 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/interrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c index 5251acb11..04d1bc1ed 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo1/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h index eb7f09483..10d19f2a8 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h index 836f5bcd1..eabe108a6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/WIZCmake.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c index 1793f88a8..b80c87183 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/fuses.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c index 080c2eaf2..1d831e445 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/interrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c index 2d20860ef..baa9d8e39 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo2/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h index 6a63b6e9e..8cd5fd710 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h index 836f5bcd1..eabe108a6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/WIZCmake.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c index 1793f88a8..b80c87183 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/fuses.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c index 080c2eaf2..1d831e445 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/interrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c index 95ec723e6..869302ac4 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo3/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h index ca1647c0f..a36a0d100 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h index 836f5bcd1..eabe108a6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/WIZCmake.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c index 1793f88a8..b80c87183 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/fuses.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c index 080c2eaf2..1d831e445 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/interrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c index 1e84a0b03..df2eb908e 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo4/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h index 8cc3762d0..6d881c13d 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h index 836f5bcd1..eabe108a6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/WIZCmake.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c index 1793f88a8..b80c87183 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/fuses.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c index 080c2eaf2..1d831e445 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/interrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c index afc42fcab..20ea8ae3b 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo5/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h index 4da1dc6b2..bb8a6852b 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h index 836f5bcd1..eabe108a6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c index 1793f88a8..b80c87183 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c index 080c2eaf2..1d831e445 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c index 7afaaeef1..21369994a 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo6/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h index 76dfcf20f..85fd6cc32 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h b/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h index 836f5bcd1..eabe108a6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h +++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/WIZCmake.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c index 1793f88a8..b80c87183 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/fuses.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c index 080c2eaf2..1d831e445 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/interrupt.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c index 95a444b3d..f81c25748 100644 --- a/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c +++ b/FreeRTOS/Demo/PIC18_WizC/Demo7/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c b/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c index f90b6a63e..0f80beb9a 100644 --- a/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c +++ b/FreeRTOS/Demo/PIC18_WizC/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c index aae3f0270..48083720c 100644 --- a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c +++ b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialRx.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c index 20e5d7db8..b58e126a6 100644 --- a/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c +++ b/FreeRTOS/Demo/PIC18_WizC/serial/isrSerialTx.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC18_WizC/serial/serial.c b/FreeRTOS/Demo/PIC18_WizC/serial/serial.c index 5e27e50cf..36274755e 100644 --- a/FreeRTOS/Demo/PIC18_WizC/serial/serial.c +++ b/FreeRTOS/Demo/PIC18_WizC/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h index abd44f1e7..9cff5ec02 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC24_MPLAB/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c index 18187d222..3a6272c40 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c index b1324f5f7..177780bdf 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/lcd.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/lcd.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/lcd.h b/FreeRTOS/Demo/PIC24_MPLAB/lcd.h index 99a537962..ace730eff 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/lcd.h +++ b/FreeRTOS/Demo/PIC24_MPLAB/lcd.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/main.c b/FreeRTOS/Demo/PIC24_MPLAB/main.c index 1b5489e47..7c89a4c70 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/main.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c index 6c005042f..a7bebb5b0 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/timertest.c b/FreeRTOS/Demo/PIC24_MPLAB/timertest.c index 5fa0950eb..8b49715fa 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/timertest.c +++ b/FreeRTOS/Demo/PIC24_MPLAB/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC24_MPLAB/timertest.h b/FreeRTOS/Demo/PIC24_MPLAB/timertest.h index 98ffa08eb..f552114d7 100644 --- a/FreeRTOS/Demo/PIC24_MPLAB/timertest.h +++ b/FreeRTOS/Demo/PIC24_MPLAB/timertest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Blinky_Demo/main_blinky.c index 173fa71e2..24ef787b5 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/FreeRTOSConfig.h index 3bd9a1bca..802de247f 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.c index deb65e20a..adf43345e 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer_isr.S b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer_isr.S index fb65d433f..633ed2357 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer_isr.S +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/IntQueueTimer_isr.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/RegisterTestTasks.S b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/RegisterTestTasks.S index b109593e3..9690c9ad4 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/RegisterTestTasks.S +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/RegisterTestTasks.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/main_full.c b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/main_full.c index 7c14a22a2..fdb018d0f 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.c b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.c index c4ca7ea8c..3916d4d5b 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.c +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.h b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.h index 98ffa08eb..f552114d7 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.h +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/Full_Demo/timertest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/main.c b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/main.c index f645b2591..6a5fa3030 100644 --- a/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/main.c +++ b/FreeRTOS/Demo/PIC32MEC14xx_MPLAB/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c index de9dcb6ab..fbab92639 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h index 16094c38c..e55518bcc 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ConfigPerformance.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h index b9d8760e4..334541d26 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c index e6df0db9f..bd8edf3e0 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S index 27666f80a..e406cf34b 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c b/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c index a3156cdc4..79933e614 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_Explorer16.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_USBII_Starter_Kit.c b/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_USBII_Starter_Kit.c index 03e6fc65a..d3e3f2639 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_USBII_Starter_Kit.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/ParTest/ParTest_USBII_Starter_Kit.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S b/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S index b6cb7891d..8b0d71bc4 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/RegisterTestTasks.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c index 14606e729..5112745f8 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h index 99a537962..ace730eff 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/lcd.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main.c index 8a8d1b970..e17619fee 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c index df2216e03..d8ab2099c 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c index 25ecbfc47..2828710c6 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c b/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c index 9a0f4f3c8..170251259 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c index 0b3041798..cfacc7720 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h index 98ffa08eb..f552114d7 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S index 440b15739..3a4a788cd 100644 --- a/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S +++ b/FreeRTOS/Demo/PIC32MX_MPLAB/timertest_isr.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c index e17675522..ebf55dfd7 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h index 16094c38c..e55518bcc 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h index c8ef10c53..beb102e16 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c index 4eb94e040..827517c35 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S index 23c7443be..43653657a 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ISRTriggeredTask_isr.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c index e6df0db9f..bd8edf3e0 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S index e8a5aeeda..541d68fc5 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/IntQueueTimer_isr.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c index 2fde5a4bf..3dbcd8997 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S index 31192e074..a701c4201 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/RegisterTestTasks.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.c index aa5dcbbdb..16c3be042 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.h index 57cec12f6..69238f197 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.h +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/flop_mz.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c index 029f0fbd4..7f1d193d3 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c index fc076ba51..5a9ca77a3 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c index 1e9c67f2d..25b799e7b 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c index 918b6771d..7e9078ea8 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h index 98ffa08eb..f552114d7 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S index 5882bed62..fd83b29e8 100644 --- a/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S +++ b/FreeRTOS/Demo/PIC32MZ_MPLAB/timertest_isr.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h index 5a208903a..bfd2994be 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 99ff70b60..d330bcf94 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h index 6071b7a5c..456a2dab4 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index 86da60d8f..1a8313e5c 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c index ade0c2348..5fedf1f78 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c index 198e35627..22363718c 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c index 31e414d26..eb72e67c5 100644 --- a/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h index 5a208903a..bfd2994be 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 536127311..5614d25c3 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h index 6071b7a5c..456a2dab4 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index e10ac3a1e..64ed89748 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c index 1a77cbdbf..25dad61d8 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c index 198e35627..22363718c 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c index 31e414d26..eb72e67c5 100644 --- a/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC440_SP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h index def7f07a4..1d5c32cf0 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c index 536127311..5614d25c3 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h index 6071b7a5c..456a2dab4 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop-reg-test.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c index e10ac3a1e..64ed89748 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c index 4c8dac5cc..66a65e55a 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c index d31439657..d8a42ec1d 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/partest/partest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c index 31e414d26..eb72e67c5 100644 --- a/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c +++ b/FreeRTOS/Demo/PPC440_Xilinx_Virtex5_GCC/RTOSDemo/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/blinky_demo/main_blinky.c b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/blinky_demo/main_blinky.c index 96b9f9110..f2580f553 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/blinky_demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/RegTest.S b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/RegTest.S index 83b80c111..3eab0e9d9 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/RegTest.S +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/RegTest.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/main_full.c index d50f84560..825d34270 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/full_demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/main.c b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/main.c index 04c095bce..e3a2c3a16 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/main.c +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-Eclipse-GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c index bfd6cfd1e..fac14f4a2 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/RegTest.S b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/RegTest.S index 64ed55545..95b1632a7 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/RegTest.S +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/RegTest.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c index 501e7ade7..5cbf6d844 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/main.c b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/main.c index c8be19e6d..3f876da9b 100644 --- a/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/main.c +++ b/FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/FreeRTOSConfig.h b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/FreeRTOSConfig.h index cdb34f87a..ac70526d8 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/blinky_demo/main_blinky.c b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/blinky_demo/main_blinky.c index 30aeb1baa..29ba2c906 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/blinky_demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/RegTest.S b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/RegTest.S index f2602c430..03bb0800c 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/RegTest.S +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/RegTest.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/main_full.c index 1f25b0174..9521318a5 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/full_demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/main.c b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/main.c index de03b623b..5cdcc5636 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/main.c +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/FreeRTOSConfig.h index 1edf11793..951097f76 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/blinky_demo/main_blinky.c b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/blinky_demo/main_blinky.c index a1d1edb0b..0944ef763 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/blinky_demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/RegTest.s b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/RegTest.s index 7b13c8ab1..cdf5e4d7b 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/RegTest.s +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/main_full.c index 4591e6118..5cc4358ab 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/full_demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/main.c b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/main.c index 4d9eeae01..b8ee55a01 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/main.c +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/blinky_demo/main_blinky.c b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/blinky_demo/main_blinky.c index 303baf193..16aa66172 100644 --- a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/blinky_demo/main_blinky.c +++ b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/blinky_demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/RegTest.S b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/RegTest.S index f2602c430..03bb0800c 100644 --- a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/RegTest.S +++ b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/RegTest.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c index 276b15e62..998a25161 100644 --- a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/main.c b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/main.c index 0f0d40d3e..a91b077fb 100644 --- a/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/main.c +++ b/FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.HardwareDebuglinker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.HardwareDebuglinker deleted file mode 100644 index de9a65c55..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.HardwareDebuglinker +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RL78_G1A_TBlinker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.RL78_G1A_TBlinker deleted file mode 100644 index 9d33098d7..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RL78_G1A_TBlinker +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78G1Clinker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78G1Clinker deleted file mode 100644 index 279af16d5..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78G1Clinker +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L13linker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L13linker deleted file mode 100644 index 851e32c88..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L13linker +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L1Clinker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L1Clinker deleted file mode 100644 index b933427aa..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.RSKRL78L1Clinker +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker deleted file mode 100644 index 6cce6bbca..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject b/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject deleted file mode 100644 index 6635b59fe..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject +++ /dev/null @@ -1,651 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.info b/FreeRTOS/Demo/RL78_E2Studio_GCC/.info deleted file mode 100644 index 69e2de3c2..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.info +++ /dev/null @@ -1,7 +0,0 @@ -TOOL_CHAIN=KPIT GNURL78-ELF Toolchain -VERSION=v14.01 -TC_INSTALL=C:\devtools\KPIT\GNURL78v14.01-ELF\rl78-ELF\ -GCC_STRING=4.8-GNURL78_v14.01 -VERSION_IDE= -E2STUDIO_VERSION=3.0.0.22 -ACTIVE_CONFIGURATION=RSKRL78L13 diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.project b/FreeRTOS/Demo/RL78_E2Studio_GCC/.project deleted file mode 100644 index 6c88a762b..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.project +++ /dev/null @@ -1,161 +0,0 @@ - - - RTOSDemo - - - - - - com.renesas.cdt.core.genmakebuilder - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/RTOSDemo/HardwareDebug} - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.configurationIds - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - com.renesas.cdt.core.kpitcnature - com.renesas.cdt.core.kpitccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - src/FreeRTOS_Source - 2 - FREERTOS_ROOT/FreeRTOS/Source - - - - - 1389872096784 - src/FreeRTOS_Source - 5 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-*.c - - - - 1389872116001 - src/FreeRTOS_Source/include - 5 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-*.h - - - - 1389875541327 - src/FreeRTOS_Source/portable - 9 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-GCC - - - - 1389875542015 - src/FreeRTOS_Source/portable - 6 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-*.* - - - - 1389875542015 - src/FreeRTOS_Source/portable - 9 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-MemMang - - - - 1389872218149 - src/FreeRTOS_Source/portable/GCC - 9 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-RL78 - - - - 1389875563809 - src/FreeRTOS_Source/portable/MemMang - 5 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-heap_2.c - - - - - - FREERTOS_ROOT - $%7BPARENT-3-PROJECT_LOC%7D - - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/Project_Generation_Prefrences.prefs b/FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/Project_Generation_Prefrences.prefs deleted file mode 100644 index c2c6be9ac..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/Project_Generation_Prefrences.prefs +++ /dev/null @@ -1,21 +0,0 @@ -Library\ Generator\ Command=rl78-elf-libgen -com.renesas.cdt.core.Assembler.option.includeFileDirectories="${workspace_loc\:/${ProjName}}\\src"; -com.renesas.cdt.core.Compiler.option.includeFileDir.1067754383="${TCINSTALL}\\rl78-elf\\optlibinc"; -com.renesas.cdt.core.LibraryGenerator.option.ctype=true -com.renesas.cdt.core.LibraryGenerator.option.libraryType=Project-Built -com.renesas.cdt.core.LibraryGenerator.option.math=false -com.renesas.cdt.core.LibraryGenerator.option.selectLibrary=Optimized -com.renesas.cdt.core.LibraryGenerator.option.stdio=true -com.renesas.cdt.core.LibraryGenerator.option.stdlib=true -com.renesas.cdt.core.LibraryGenerator.option.string=true -com.renesas.cdt.core.Linker.option.userDefinedOptions=[Ljava.lang.String;@1dfdfb2 -com.renesas.cdt.rl78.HardwareDebug.Compiler.option.cpuType=RL78 - G1C -com.renesas.cdt.rl78.HardwareDebug.Compiler.option.cpuType.1364542281=RL78 - G1C -com.renesas.cdt.rl78.HardwareDebug.Compiler.option.mmul=None -com.renesas.cdt.rl78.HardwareDebug.Linker.option.archiveLibraryFiles=${ProjName};gcc; -com.renesas.cdt.rl78.HardwareDebug.Linker.option.archiveSearchDirectories.1610499591="${CONFIGDIR}";"${TCINSTALL}/lib/gcc/rl78-elf//${GCC_VERSION}";"${TCINSTALL}\\lib\\gcc\\rl78-elf\\\\${GCC_VERSION}"; -com.renesas.cdt.rl78.HardwareDebug.Linker.option.archiveSearchDirectories.1960648199="${CONFIGDIR}";"${TCINSTALL}\\lib\\gcc\\rl78-elf\\\\${GCC_VERSION}"; -com.renesas.cdt.rl78.HardwareDebug.Linker.option.archiveSearchDirectories.8586332="${CONFIGDIR}";"${TCINSTALL}/lib/gcc/rl78-elf//${GCC_VERSION}";"${TCINSTALL}/lib/gcc/rl78-elf/${GCC_VERSION}"; -com.renesas.cdt.rl78.HardwareDebug.Linker.option.archiveSearchDirectories.970009502="${CONFIGDIR}";"${TCINSTALL}\\lib\\gcc\\rl78-elf\\\\${GCC_VERSION}"; -com.renesas.cdt.rl78.HardwareDebug.Linker.option.archiveSearchDirectories.984802356="${CONFIGDIR}";"${TCINSTALL}/lib/gcc/rl78-elf//${GCC_VERSION}";"${TCINSTALL}\\lib\\gcc\\rl78-elf\\\\${GCC_VERSION}"; -eclipse.preferences.version=1 diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/org.eclipse.ltk.core.refactoring.prefs b/FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/org.eclipse.ltk.core.refactoring.prefs deleted file mode 100644 index 50255e8e0..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.settings/org.eclipse.ltk.core.refactoring.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Fri Feb 22 15:51:32 GMT 2013 -eclipse.preferences.version=1 -org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/custom.bat b/FreeRTOS/Demo/RL78_E2Studio_GCC/custom.bat deleted file mode 100644 index e69de29bb..000000000 diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/PollQ.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/PollQ.c deleted file mode 100644 index 804ec06c5..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/PollQ.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * This version of PollQ. c is for use on systems that have limited stack - * space and no display facilities. The complete version can be found in - * the Demo/Common/Full directory. - * - * Creates two tasks that communicate over a single queue. One task acts as a - * producer, the other a consumer. - * - * The producer loops for three iteration, posting an incrementing number onto the - * queue each cycle. It then delays for a fixed period before doing exactly the - * same again. - * - * The consumer loops emptying the queue. Each item removed from the queue is - * checked to ensure it contains the expected value. When the queue is empty it - * blocks for a fixed period, then does the same again. - * - * All queue access is performed without blocking. The consumer completely empties - * the queue each time it runs so the producer should never find the queue full. - * - * An error is flagged if the consumer obtains an unexpected value or the producer - * find the queue is full. - */ - -/* -Changes from V2.0.0 - - + Delay periods are now specified using variables and constants of - TickType_t rather than unsigned long. -*/ - -#include - -/* Scheduler include files. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" - -/* Demo program include files. */ -#include "PollQ.h" - -#define pollqSTACK_SIZE configMINIMAL_STACK_SIZE -#define pollqQUEUE_SIZE ( 10 ) -#define pollqPRODUCER_DELAY ( ( TickType_t ) 200 / portTICK_PERIOD_MS ) -#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) ) -#define pollqNO_DELAY ( ( TickType_t ) 0 ) -#define pollqVALUES_TO_PRODUCE ( ( signed portBASE_TYPE ) 3 ) -#define pollqINITIAL_VALUE ( ( signed portBASE_TYPE ) 0 ) - -/* The task that posts the incrementing number onto the queue. */ -static portTASK_FUNCTION_PROTO( vPolledQueueProducer, pvParameters ); - -/* The task that empties the queue. */ -static portTASK_FUNCTION_PROTO( vPolledQueueConsumer, pvParameters ); - -/* Variables that are used to check that the tasks are still running with no -errors. */ -static volatile signed portBASE_TYPE xPollingConsumerCount = pollqINITIAL_VALUE, xPollingProducerCount = pollqINITIAL_VALUE; - -/*-----------------------------------------------------------*/ - -void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority ) -{ -static QueueHandle_t xPolledQueue; - - /* Create the queue used by the producer and consumer. */ - xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) ); - - /* vQueueAddToRegistry() adds the queue to the queue registry, if one is - in use. The queue registry is provided as a means for kernel aware - debuggers to locate queues and has no purpose if a kernel aware debugger - is not being used. The call to vQueueAddToRegistry() will be removed - by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is - defined to be less than 1. */ - vQueueAddToRegistry( xPolledQueue, ( signed char * ) "Poll_Test_Queue" ); - - /* Spawn the producer and consumer. */ - xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL ); - xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL ); -} -/*-----------------------------------------------------------*/ - -static portTASK_FUNCTION( vPolledQueueProducer, pvParameters ) -{ -unsigned short usValue = ( unsigned short ) 0; -signed portBASE_TYPE xError = pdFALSE, xLoop; - - for( ;; ) - { - for( xLoop = 0; xLoop < pollqVALUES_TO_PRODUCE; xLoop++ ) - { - /* Send an incrementing number on the queue without blocking. */ - if( xQueueSend( *( ( QueueHandle_t * ) pvParameters ), ( void * ) &usValue, pollqNO_DELAY ) != pdPASS ) - { - /* We should never find the queue full so if we get here there - has been an error. */ - xError = pdTRUE; - } - else - { - if( xError == pdFALSE ) - { - /* If an error has ever been recorded we stop incrementing the - check variable. */ - portENTER_CRITICAL(); - xPollingProducerCount++; - portEXIT_CRITICAL(); - } - - /* Update the value we are going to post next time around. */ - usValue++; - } - } - - /* Wait before we start posting again to ensure the consumer runs and - empties the queue. */ - vTaskDelay( pollqPRODUCER_DELAY ); - } -} /*lint !e818 Function prototype must conform to API. */ -/*-----------------------------------------------------------*/ - -static portTASK_FUNCTION( vPolledQueueConsumer, pvParameters ) -{ -unsigned short usData, usExpectedValue = ( unsigned short ) 0; -signed portBASE_TYPE xError = pdFALSE; - - for( ;; ) - { - /* Loop until the queue is empty. */ - while( uxQueueMessagesWaiting( *( ( QueueHandle_t * ) pvParameters ) ) ) - { - if( xQueueReceive( *( ( QueueHandle_t * ) pvParameters ), &usData, pollqNO_DELAY ) == pdPASS ) - { - if( usData != usExpectedValue ) - { - /* This is not what we expected to receive so an error has - occurred. */ - xError = pdTRUE; - - /* Catch-up to the value we received so our next expected - value should again be correct. */ - usExpectedValue = usData; - } - else - { - if( xError == pdFALSE ) - { - /* Only increment the check variable if no errors have - occurred. */ - portENTER_CRITICAL(); - xPollingConsumerCount++; - portEXIT_CRITICAL(); - } - } - - /* Next time round we would expect the number to be one higher. */ - usExpectedValue++; - } - } - - /* Now the queue is empty we block, allowing the producer to place more - items in the queue. */ - vTaskDelay( pollqCONSUMER_DELAY ); - } -} /*lint !e818 Function prototype must conform to API. */ -/*-----------------------------------------------------------*/ - -/* This is called to check that all the created tasks are still running with no errors. */ -portBASE_TYPE xArePollingQueuesStillRunning( void ) -{ -portBASE_TYPE xReturn; - - /* Check both the consumer and producer poll count to check they have both - been changed since out last trip round. We do not need a critical section - around the check variables as this is called from a higher priority than - the other tasks that access the same variables. */ - if( ( xPollingConsumerCount == pollqINITIAL_VALUE ) || - ( xPollingProducerCount == pollqINITIAL_VALUE ) - ) - { - xReturn = pdFALSE; - } - else - { - xReturn = pdTRUE; - } - - /* Set the check variables back down so we know if they have been - incremented the next time around. */ - xPollingConsumerCount = pollqINITIAL_VALUE; - xPollingProducerCount = pollqINITIAL_VALUE; - - return xReturn; -} diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c deleted file mode 100644 index 932fb68f2..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/blocktim.c +++ /dev/null @@ -1,467 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * This file contains some test scenarios that ensure tasks do not exit queue - * send or receive functions prematurely. A description of the tests is - * included within the code. - */ - -/* Kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" - -/* Demo includes. */ -#include "blocktim.h" - -/* Task priorities. Allow these to be overridden. */ -#ifndef bktPRIMARY_PRIORITY - #define bktPRIMARY_PRIORITY ( configMAX_PRIORITIES - 3 ) -#endif - -#ifndef bktSECONDARY_PRIORITY - #define bktSECONDARY_PRIORITY ( configMAX_PRIORITIES - 4 ) -#endif - -/* Task behaviour. */ -#define bktQUEUE_LENGTH ( 5 ) -#define bktSHORT_WAIT ( ( ( TickType_t ) 20 ) / portTICK_PERIOD_MS ) -#define bktPRIMARY_BLOCK_TIME ( 10 ) -#define bktALLOWABLE_MARGIN ( 15 ) -#define bktTIME_TO_BLOCK ( 175 ) -#define bktDONT_BLOCK ( ( TickType_t ) 0 ) -#define bktRUN_INDICATOR ( ( unsigned portBASE_TYPE ) 0x55 ) - -/* The queue on which the tasks block. */ -static QueueHandle_t xTestQueue; - -/* Handle to the secondary task is required by the primary task for calls -to vTaskSuspend/Resume(). */ -static TaskHandle_t xSecondary; - -/* Used to ensure that tasks are still executing without error. */ -static volatile portBASE_TYPE xPrimaryCycles = 0, xSecondaryCycles = 0; -static volatile portBASE_TYPE xErrorOccurred = pdFALSE; - -/* Provides a simple mechanism for the primary task to know when the -secondary task has executed. */ -static volatile unsigned portBASE_TYPE xRunIndicator; - -/* The two test tasks. Their behaviour is commented within the files. */ -static void vPrimaryBlockTimeTestTask( void *pvParameters ); -static void vSecondaryBlockTimeTestTask( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -void vCreateBlockTimeTasks( void ) -{ - /* Create the queue on which the two tasks block. */ - xTestQueue = xQueueCreate( bktQUEUE_LENGTH, sizeof( portBASE_TYPE ) ); - - /* vQueueAddToRegistry() adds the queue to the queue registry, if one is - in use. The queue registry is provided as a means for kernel aware - debuggers to locate queues and has no purpose if a kernel aware debugger - is not being used. The call to vQueueAddToRegistry() will be removed - by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is - defined to be less than 1. */ - vQueueAddToRegistry( xTestQueue, ( signed char * ) "Block_Time_Queue" ); - - /* Create the two test tasks. */ - xTaskCreate( vPrimaryBlockTimeTestTask, "BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); - xTaskCreate( vSecondaryBlockTimeTestTask, "BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); -} -/*-----------------------------------------------------------*/ - -static void vPrimaryBlockTimeTestTask( void *pvParameters ) -{ -portBASE_TYPE xItem, xData; -TickType_t xTimeWhenBlocking; -TickType_t xTimeToBlock, xBlockedTime; - - ( void ) pvParameters; - - for( ;; ) - { - /********************************************************************* - Test 1 - - Simple block time wakeup test on queue receives. */ - for( xItem = 0; xItem < bktQUEUE_LENGTH; xItem++ ) - { - /* The queue is empty. Attempt to read from the queue using a block - time. When we wake, ensure the delta in time is as expected. */ - xTimeToBlock = bktPRIMARY_BLOCK_TIME << xItem; - - xTimeWhenBlocking = xTaskGetTickCount(); - - /* We should unblock after xTimeToBlock having not received - anything on the queue. */ - if( xQueueReceive( xTestQueue, &xData, xTimeToBlock ) != errQUEUE_EMPTY ) - { - xErrorOccurred = pdTRUE; - } - - /* How long were we blocked for? */ - xBlockedTime = xTaskGetTickCount() - xTimeWhenBlocking; - - if( xBlockedTime < xTimeToBlock ) - { - /* Should not have blocked for less than we requested. */ - xErrorOccurred = pdTRUE; - } - - if( xBlockedTime > ( xTimeToBlock + bktALLOWABLE_MARGIN ) ) - { - /* Should not have blocked for longer than we requested, - although we would not necessarily run as soon as we were - unblocked so a margin is allowed. */ - xErrorOccurred = pdTRUE; - } - } - - /********************************************************************* - Test 2 - - Simple block time wakeup test on queue sends. - - First fill the queue. It should be empty so all sends should pass. */ - for( xItem = 0; xItem < bktQUEUE_LENGTH; xItem++ ) - { - if( xQueueSend( xTestQueue, &xItem, bktDONT_BLOCK ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - #if configUSE_PREEMPTION == 0 - taskYIELD(); - #endif - } - - for( xItem = 0; xItem < bktQUEUE_LENGTH; xItem++ ) - { - /* The queue is full. Attempt to write to the queue using a block - time. When we wake, ensure the delta in time is as expected. */ - xTimeToBlock = bktPRIMARY_BLOCK_TIME << xItem; - - xTimeWhenBlocking = xTaskGetTickCount(); - - /* We should unblock after xTimeToBlock having not received - anything on the queue. */ - if( xQueueSend( xTestQueue, &xItem, xTimeToBlock ) != errQUEUE_FULL ) - { - xErrorOccurred = pdTRUE; - } - - /* How long were we blocked for? */ - xBlockedTime = xTaskGetTickCount() - xTimeWhenBlocking; - - if( xBlockedTime < xTimeToBlock ) - { - /* Should not have blocked for less than we requested. */ - xErrorOccurred = pdTRUE; - } - - if( xBlockedTime > ( xTimeToBlock + bktALLOWABLE_MARGIN ) ) - { - /* Should not have blocked for longer than we requested, - although we would not necessarily run as soon as we were - unblocked so a margin is allowed. */ - xErrorOccurred = pdTRUE; - } - } - - /********************************************************************* - Test 3 - - Wake the other task, it will block attempting to post to the queue. - When we read from the queue the other task will wake, but before it - can run we will post to the queue again. When the other task runs it - will find the queue still full, even though it was woken. It should - recognise that its block time has not expired and return to block for - the remains of its block time. - - Wake the other task so it blocks attempting to post to the already - full queue. */ - xRunIndicator = 0; - vTaskResume( xSecondary ); - - /* We need to wait a little to ensure the other task executes. */ - while( xRunIndicator != bktRUN_INDICATOR ) - { - /* The other task has not yet executed. */ - vTaskDelay( bktSHORT_WAIT ); - } - /* Make sure the other task is blocked on the queue. */ - vTaskDelay( bktSHORT_WAIT ); - xRunIndicator = 0; - - for( xItem = 0; xItem < bktQUEUE_LENGTH; xItem++ ) - { - /* Now when we make space on the queue the other task should wake - but not execute as this task has higher priority. */ - if( xQueueReceive( xTestQueue, &xData, bktDONT_BLOCK ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - /* Now fill the queue again before the other task gets a chance to - execute. If the other task had executed we would find the queue - full ourselves, and the other task have set xRunIndicator. */ - if( xQueueSend( xTestQueue, &xItem, bktDONT_BLOCK ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - if( xRunIndicator == bktRUN_INDICATOR ) - { - /* The other task should not have executed. */ - xErrorOccurred = pdTRUE; - } - - /* Raise the priority of the other task so it executes and blocks - on the queue again. */ - vTaskPrioritySet( xSecondary, bktPRIMARY_PRIORITY + 2 ); - - /* The other task should now have re-blocked without exiting the - queue function. */ - if( xRunIndicator == bktRUN_INDICATOR ) - { - /* The other task should not have executed outside of the - queue function. */ - xErrorOccurred = pdTRUE; - } - - /* Set the priority back down. */ - vTaskPrioritySet( xSecondary, bktSECONDARY_PRIORITY ); - } - - /* Let the other task timeout. When it unblockes it will check that it - unblocked at the correct time, then suspend itself. */ - while( xRunIndicator != bktRUN_INDICATOR ) - { - vTaskDelay( bktSHORT_WAIT ); - } - vTaskDelay( bktSHORT_WAIT ); - xRunIndicator = 0; - - - /********************************************************************* - Test 4 - - As per test 3 - but with the send and receive the other way around. - The other task blocks attempting to read from the queue. - - Empty the queue. We should find that it is full. */ - for( xItem = 0; xItem < bktQUEUE_LENGTH; xItem++ ) - { - if( xQueueReceive( xTestQueue, &xData, bktDONT_BLOCK ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - } - - /* Wake the other task so it blocks attempting to read from the - already empty queue. */ - vTaskResume( xSecondary ); - - /* We need to wait a little to ensure the other task executes. */ - while( xRunIndicator != bktRUN_INDICATOR ) - { - vTaskDelay( bktSHORT_WAIT ); - } - vTaskDelay( bktSHORT_WAIT ); - xRunIndicator = 0; - - for( xItem = 0; xItem < bktQUEUE_LENGTH; xItem++ ) - { - /* Now when we place an item on the queue the other task should - wake but not execute as this task has higher priority. */ - if( xQueueSend( xTestQueue, &xItem, bktDONT_BLOCK ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - /* Now empty the queue again before the other task gets a chance to - execute. If the other task had executed we would find the queue - empty ourselves, and the other task would be suspended. */ - if( xQueueReceive( xTestQueue, &xData, bktDONT_BLOCK ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - if( xRunIndicator == bktRUN_INDICATOR ) - { - /* The other task should not have executed. */ - xErrorOccurred = pdTRUE; - } - - /* Raise the priority of the other task so it executes and blocks - on the queue again. */ - vTaskPrioritySet( xSecondary, bktPRIMARY_PRIORITY + 2 ); - - /* The other task should now have re-blocked without exiting the - queue function. */ - if( xRunIndicator == bktRUN_INDICATOR ) - { - /* The other task should not have executed outside of the - queue function. */ - xErrorOccurred = pdTRUE; - } - vTaskPrioritySet( xSecondary, bktSECONDARY_PRIORITY ); - } - - /* Let the other task timeout. When it unblockes it will check that it - unblocked at the correct time, then suspend itself. */ - while( xRunIndicator != bktRUN_INDICATOR ) - { - vTaskDelay( bktSHORT_WAIT ); - } - vTaskDelay( bktSHORT_WAIT ); - - xPrimaryCycles++; - } -} -/*-----------------------------------------------------------*/ - -static void vSecondaryBlockTimeTestTask( void *pvParameters ) -{ -TickType_t xTimeWhenBlocking, xBlockedTime; -portBASE_TYPE xData; - - ( void ) pvParameters; - - for( ;; ) - { - /********************************************************************* - Test 1 and 2 - - This task does does not participate in these tests. */ - vTaskSuspend( NULL ); - - /********************************************************************* - Test 3 - - The first thing we do is attempt to read from the queue. It should be - full so we block. Note the time before we block so we can check the - wake time is as per that expected. */ - xTimeWhenBlocking = xTaskGetTickCount(); - - /* We should unblock after bktTIME_TO_BLOCK having not sent - anything to the queue. */ - xData = 0; - xRunIndicator = bktRUN_INDICATOR; - if( xQueueSend( xTestQueue, &xData, bktTIME_TO_BLOCK ) != errQUEUE_FULL ) - { - xErrorOccurred = pdTRUE; - } - - /* How long were we inside the send function? */ - xBlockedTime = xTaskGetTickCount() - xTimeWhenBlocking; - - /* We should not have blocked for less time than bktTIME_TO_BLOCK. */ - if( xBlockedTime < bktTIME_TO_BLOCK ) - { - xErrorOccurred = pdTRUE; - } - - /* We should of not blocked for much longer than bktALLOWABLE_MARGIN - either. A margin is permitted as we would not necessarily run as - soon as we unblocked. */ - if( xBlockedTime > ( bktTIME_TO_BLOCK + bktALLOWABLE_MARGIN ) ) - { - xErrorOccurred = pdTRUE; - } - - /* Suspend ready for test 3. */ - xRunIndicator = bktRUN_INDICATOR; - vTaskSuspend( NULL ); - - /********************************************************************* - Test 4 - - As per test three, but with the send and receive reversed. */ - xTimeWhenBlocking = xTaskGetTickCount(); - - /* We should unblock after bktTIME_TO_BLOCK having not received - anything on the queue. */ - xRunIndicator = bktRUN_INDICATOR; - if( xQueueReceive( xTestQueue, &xData, bktTIME_TO_BLOCK ) != errQUEUE_EMPTY ) - { - xErrorOccurred = pdTRUE; - } - - xBlockedTime = xTaskGetTickCount() - xTimeWhenBlocking; - - /* We should not have blocked for less time than bktTIME_TO_BLOCK. */ - if( xBlockedTime < bktTIME_TO_BLOCK ) - { - xErrorOccurred = pdTRUE; - } - - /* We should of not blocked for much longer than bktALLOWABLE_MARGIN - either. A margin is permitted as we would not necessarily run as soon - as we unblocked. */ - if( xBlockedTime > ( bktTIME_TO_BLOCK + bktALLOWABLE_MARGIN ) ) - { - xErrorOccurred = pdTRUE; - } - - xRunIndicator = bktRUN_INDICATOR; - - xSecondaryCycles++; - } -} -/*-----------------------------------------------------------*/ - -portBASE_TYPE xAreBlockTimeTestTasksStillRunning( void ) -{ -static portBASE_TYPE xLastPrimaryCycleCount = 0, xLastSecondaryCycleCount = 0; -portBASE_TYPE xReturn = pdPASS; - - /* Have both tasks performed at least one cycle since this function was - last called? */ - if( xPrimaryCycles == xLastPrimaryCycleCount ) - { - xReturn = pdFAIL; - } - - if( xSecondaryCycles == xLastSecondaryCycleCount ) - { - xReturn = pdFAIL; - } - - if( xErrorOccurred == pdTRUE ) - { - xReturn = pdFAIL; - } - - xLastSecondaryCycleCount = xSecondaryCycles; - xLastPrimaryCycleCount = xPrimaryCycles; - - return xReturn; -} diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/dynamic.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/dynamic.c deleted file mode 100644 index 07d16e31a..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/dynamic.c +++ /dev/null @@ -1,401 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * The first test creates three tasks - two counter tasks (one continuous count - * and one limited count) and one controller. A "count" variable is shared - * between all three tasks. The two counter tasks should never be in a "ready" - * state at the same time. The controller task runs at the same priority as - * the continuous count task, and at a lower priority than the limited count - * task. - * - * One counter task loops indefinitely, incrementing the shared count variable - * on each iteration. To ensure it has exclusive access to the variable it - * raises it's priority above that of the controller task before each - * increment, lowering it again to it's original priority before starting the - * next iteration. - * - * The other counter task increments the shared count variable on each - * iteration of it's loop until the count has reached a limit of 0xff - at - * which point it suspends itself. It will not start a new loop until the - * controller task has made it "ready" again by calling vTaskResume (). - * This second counter task operates at a higher priority than controller - * task so does not need to worry about mutual exclusion of the counter - * variable. - * - * The controller task is in two sections. The first section controls and - * monitors the continuous count task. When this section is operational the - * limited count task is suspended. Likewise, the second section controls - * and monitors the limited count task. When this section is operational the - * continuous count task is suspended. - * - * In the first section the controller task first takes a copy of the shared - * count variable. To ensure mutual exclusion on the count variable it - * suspends the continuous count task, resuming it again when the copy has been - * taken. The controller task then sleeps for a fixed period - during which - * the continuous count task will execute and increment the shared variable. - * When the controller task wakes it checks that the continuous count task - * has executed by comparing the copy of the shared variable with its current - * value. This time, to ensure mutual exclusion, the scheduler itself is - * suspended with a call to vTaskSuspendAll (). This is for demonstration - * purposes only and is not a recommended technique due to its inefficiency. - * - * After a fixed number of iterations the controller task suspends the - * continuous count task, and moves on to its second section. - * - * At the start of the second section the shared variable is cleared to zero. - * The limited count task is then woken from it's suspension by a call to - * vTaskResume (). As this counter task operates at a higher priority than - * the controller task the controller task should not run again until the - * shared variable has been counted up to the limited value causing the counter - * task to suspend itself. The next line after vTaskResume () is therefore - * a check on the shared variable to ensure everything is as expected. - * - * - * The second test consists of a couple of very simple tasks that post onto a - * queue while the scheduler is suspended. This test was added to test parts - * of the scheduler not exercised by the first test. - * - */ - -#include - -/* Scheduler include files. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* Demo app include files. */ -#include "dynamic.h" - -/* Function that implements the "limited count" task as described above. */ -static portTASK_FUNCTION_PROTO( vLimitedIncrementTask, pvParameters ); - -/* Function that implements the "continuous count" task as described above. */ -static portTASK_FUNCTION_PROTO( vContinuousIncrementTask, pvParameters ); - -/* Function that implements the controller task as described above. */ -static portTASK_FUNCTION_PROTO( vCounterControlTask, pvParameters ); - -static portTASK_FUNCTION_PROTO( vQueueReceiveWhenSuspendedTask, pvParameters ); -static portTASK_FUNCTION_PROTO( vQueueSendWhenSuspendedTask, pvParameters ); - -/* Demo task specific constants. */ -#define priSTACK_SIZE ( configMINIMAL_STACK_SIZE ) -#define priSLEEP_TIME ( ( TickType_t ) 128 / portTICK_PERIOD_MS ) -#define priLOOPS ( 5 ) -#define priMAX_COUNT ( ( unsigned long ) 0xff ) -#define priNO_BLOCK ( ( TickType_t ) 0 ) -#define priSUSPENDED_QUEUE_LENGTH ( 1 ) - -/*-----------------------------------------------------------*/ - -/* Handles to the two counter tasks. These could be passed in as parameters -to the controller task to prevent them having to be file scope. */ -static TaskHandle_t xContinousIncrementHandle, xLimitedIncrementHandle; - -/* The shared counter variable. This is passed in as a parameter to the two -counter variables for demonstration purposes. */ -static unsigned long ulCounter; - -/* Variables used to check that the tasks are still operating without error. -Each complete iteration of the controller task increments this variable -provided no errors have been found. The variable maintaining the same value -is therefore indication of an error. */ -static volatile unsigned short usCheckVariable = ( unsigned short ) 0; -static volatile portBASE_TYPE xSuspendedQueueSendError = pdFALSE; -static volatile portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE; - -/* Queue used by the second test. */ -static QueueHandle_t xSuspendedTestQueue; - -/*-----------------------------------------------------------*/ -/* - * Start the three tasks as described at the top of the file. - * Note that the limited count task is given a higher priority. - */ -void vStartDynamicPriorityTasks( void ) -{ - xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( unsigned long ) ); - - /* vQueueAddToRegistry() adds the queue to the queue registry, if one is - in use. The queue registry is provided as a means for kernel aware - debuggers to locate queues and has no purpose if a kernel aware debugger - is not being used. The call to vQueueAddToRegistry() will be removed - by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is - defined to be less than 1. */ - vQueueAddToRegistry( xSuspendedTestQueue, ( signed char * ) "Suspended_Test_Queue" ); - - xTaskCreate( vContinuousIncrementTask, "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinousIncrementHandle ); - xTaskCreate( vLimitedIncrementTask, "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle ); - xTaskCreate( vCounterControlTask, "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vQueueSendWhenSuspendedTask, "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vQueueReceiveWhenSuspendedTask, "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); -} -/*-----------------------------------------------------------*/ - -/* - * Just loops around incrementing the shared variable until the limit has been - * reached. Once the limit has been reached it suspends itself. - */ -static portTASK_FUNCTION( vLimitedIncrementTask, pvParameters ) -{ -unsigned long *pulCounter; - - /* Take a pointer to the shared variable from the parameters passed into - the task. */ - pulCounter = ( unsigned long * ) pvParameters; - - /* This will run before the control task, so the first thing it does is - suspend - the control task will resume it when ready. */ - vTaskSuspend( NULL ); - - for( ;; ) - { - /* Just count up to a value then suspend. */ - ( *pulCounter )++; - - if( *pulCounter >= priMAX_COUNT ) - { - vTaskSuspend( NULL ); - } - } -} -/*-----------------------------------------------------------*/ - -/* - * Just keep counting the shared variable up. The control task will suspend - * this task when it wants. - */ -static portTASK_FUNCTION( vContinuousIncrementTask, pvParameters ) -{ -unsigned long *pulCounter; -unsigned portBASE_TYPE uxOurPriority; - - /* Take a pointer to the shared variable from the parameters passed into - the task. */ - pulCounter = ( unsigned long * ) pvParameters; - - /* Query our priority so we can raise it when exclusive access to the - shared variable is required. */ - uxOurPriority = uxTaskPriorityGet( NULL ); - - for( ;; ) - { - /* Raise our priority above the controller task to ensure a context - switch does not occur while we are accessing this variable. */ - vTaskPrioritySet( NULL, uxOurPriority + 1 ); - ( *pulCounter )++; - vTaskPrioritySet( NULL, uxOurPriority ); - } -} -/*-----------------------------------------------------------*/ - -/* - * Controller task as described above. - */ -static portTASK_FUNCTION( vCounterControlTask, pvParameters ) -{ -unsigned long ulLastCounter; -short sLoops; -short sError = pdFALSE; - - /* Just to stop warning messages. */ - ( void ) pvParameters; - - for( ;; ) - { - /* Start with the counter at zero. */ - ulCounter = ( unsigned long ) 0; - - /* First section : */ - - /* Check the continuous count task is running. */ - for( sLoops = 0; sLoops < priLOOPS; sLoops++ ) - { - /* Suspend the continuous count task so we can take a mirror of the - shared variable without risk of corruption. */ - vTaskSuspend( xContinousIncrementHandle ); - ulLastCounter = ulCounter; - vTaskResume( xContinousIncrementHandle ); - - /* Now delay to ensure the other task has processor time. */ - vTaskDelay( priSLEEP_TIME ); - - /* Check the shared variable again. This time to ensure mutual - exclusion the whole scheduler will be locked. This is just for - demo purposes! */ - vTaskSuspendAll(); - { - if( ulLastCounter == ulCounter ) - { - /* The shared variable has not changed. There is a problem - with the continuous count task so flag an error. */ - sError = pdTRUE; - } - } - xTaskResumeAll(); - } - - - /* Second section: */ - - /* Suspend the continuous counter task so it stops accessing the shared variable. */ - vTaskSuspend( xContinousIncrementHandle ); - - /* Reset the variable. */ - ulCounter = ( unsigned long ) 0; - - /* Resume the limited count task which has a higher priority than us. - We should therefore not return from this call until the limited count - task has suspended itself with a known value in the counter variable. */ - vTaskResume( xLimitedIncrementHandle ); - - /* Does the counter variable have the expected value? */ - if( ulCounter != priMAX_COUNT ) - { - sError = pdTRUE; - } - - if( sError == pdFALSE ) - { - /* If no errors have occurred then increment the check variable. */ - portENTER_CRITICAL(); - usCheckVariable++; - portEXIT_CRITICAL(); - } - - /* Resume the continuous count task and do it all again. */ - vTaskResume( xContinousIncrementHandle ); - } -} -/*-----------------------------------------------------------*/ - -static portTASK_FUNCTION( vQueueSendWhenSuspendedTask, pvParameters ) -{ -static unsigned long ulValueToSend = ( unsigned long ) 0; - - /* Just to stop warning messages. */ - ( void ) pvParameters; - - for( ;; ) - { - vTaskSuspendAll(); - { - /* We must not block while the scheduler is suspended! */ - if( xQueueSend( xSuspendedTestQueue, ( void * ) &ulValueToSend, priNO_BLOCK ) != pdTRUE ) - { - xSuspendedQueueSendError = pdTRUE; - } - } - xTaskResumeAll(); - - vTaskDelay( priSLEEP_TIME ); - - ++ulValueToSend; - } -} -/*-----------------------------------------------------------*/ - -static portTASK_FUNCTION( vQueueReceiveWhenSuspendedTask, pvParameters ) -{ -static unsigned long ulExpectedValue = ( unsigned long ) 0, ulReceivedValue; -portBASE_TYPE xGotValue; - - /* Just to stop warning messages. */ - ( void ) pvParameters; - - for( ;; ) - { - do - { - /* Suspending the scheduler here is fairly pointless and - undesirable for a normal application. It is done here purely - to test the scheduler. The inner xTaskResumeAll() should - never return pdTRUE as the scheduler is still locked by the - outer call. */ - vTaskSuspendAll(); - { - vTaskSuspendAll(); - { - xGotValue = xQueueReceive( xSuspendedTestQueue, ( void * ) &ulReceivedValue, priNO_BLOCK ); - } - if( xTaskResumeAll() ) - { - xSuspendedQueueReceiveError = pdTRUE; - } - } - xTaskResumeAll(); - - #if configUSE_PREEMPTION == 0 - { - taskYIELD(); - } - #endif - - } while( xGotValue == pdFALSE ); - - if( ulReceivedValue != ulExpectedValue ) - { - xSuspendedQueueReceiveError = pdTRUE; - } - - ++ulExpectedValue; - } -} -/*-----------------------------------------------------------*/ - -/* Called to check that all the created tasks are still running without error. */ -portBASE_TYPE xAreDynamicPriorityTasksStillRunning( void ) -{ -/* Keep a history of the check variables so we know if it has been incremented -since the last call. */ -static unsigned short usLastTaskCheck = ( unsigned short ) 0; -portBASE_TYPE xReturn = pdTRUE; - - /* Check the tasks are still running by ensuring the check variable - is still incrementing. */ - - if( usCheckVariable == usLastTaskCheck ) - { - /* The check has not incremented so an error exists. */ - xReturn = pdFALSE; - } - - if( xSuspendedQueueSendError == pdTRUE ) - { - xReturn = pdFALSE; - } - - if( xSuspendedQueueReceiveError == pdTRUE ) - { - xReturn = pdFALSE; - } - - usLastTaskCheck = usCheckVariable; - return xReturn; -} diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/PollQ.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/PollQ.h deleted file mode 100644 index c87b31ea5..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/PollQ.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef POLLED_Q_H -#define POLLED_Q_H - -void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority ); -portBASE_TYPE xArePollingQueuesStillRunning( void ); - -#endif - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/blocktim.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/blocktim.h deleted file mode 100644 index 479e089a1..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/blocktim.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef BLOCK_TIME_TEST_H -#define BLOCK_TIME_TEST_H - -void vCreateBlockTimeTasks( void ); -portBASE_TYPE xAreBlockTimeTestTasksStillRunning( void ); - -#endif - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/dynamic.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/dynamic.h deleted file mode 100644 index bbfb4cdd4..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/Common-Demo-Tasks/include/dynamic.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef DYNAMIC_MANIPULATION_H -#define DYNAMIC_MANIPULATION_H - -void vStartDynamicPriorityTasks( void ); -portBASE_TYPE xAreDynamicPriorityTasksStillRunning( void ); - -#endif - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/ExampleISR.S b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/ExampleISR.S deleted file mode 100644 index 5d7a6d973..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/ExampleISR.S +++ /dev/null @@ -1,75 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * This file defines the assembler wrapper for the example interrupt that is - * defined in main.c. The wrapper is the interrupt entry point. - */ - -/* ISR_Support.h contains the definitions of portSAVE_CONTEXT() and -portRESTORE_CONTEXT(). */ -#include "ISR_Support.h" - - .global _vANExampleISR_ASM_Wrapper - .extern _vAnExampleISR_C_Handler - - .text - - /* - * This demo does not include a functional interrupt service routine - so - * this dummy handler (which is not actually installed) is provided as an - * example of how an ISR that needs to cause a context switch needs to be - * implemented. ISRs that do not cause a context switch have no special - * requirements and can be written as per the compiler documentation. - * - * This assembly wrapper function calls the main handler, which is called - * vAnExampleISR_C_Handler(), and is implemented in main.c. See the - * documentation page for this demo on the FreeRTOS.org website for full - * instructions. - * - * NOTE: vANExampleISR_ASM_Wrapper needs to be installed into the relevant - * vector within vector_table.c. - */ - - vANExampleISR_ASM_Wrapper: - - /* portSAVE_CONTEXT() must be the first thing called in the ASM - wrapper. */ - portSAVE_CONTEXT - - /* Once the context has been saved the C handler can be called. */ - call !!_vAnExampleISR_C_Handler - - /* Finally the ISR must end with a call to portRESTORE_CONTEXT() - followed by a reti instruction to return from the interrupt to whichever - task is now the task selected to run (which may be different to the task - that was running before the interrupt started). */ - portRESTORE_CONTEXT - reti - - .end - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h deleted file mode 100644 index e17441acd..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * - * See http://www.freertos.org/a00110.html - *----------------------------------------------------------*/ - -/* Include hardware dependent header files to allow this demo to run on -multiple evaluation boards. */ -#include "demo_specific_io.h" - -#define configUSE_PREEMPTION 1 -#define configTICK_RATE_HZ ( ( unsigned short ) 1000 ) -#define configMAX_PRIORITIES ( 4 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) -#define configMAX_TASK_NAME_LEN ( 10 ) -#define configUSE_TRACE_FACILITY 0 -#define configUSE_16_BIT_TICKS 1 -#define configIDLE_SHOULD_YIELD 1 -#define configTOTAL_HEAP_SIZE ( (size_t ) ( 3420 ) ) -#define configCHECK_FOR_STACK_OVERFLOW 2 -#define configUSE_MUTEXES 1 - -/* Hook function definitions. */ -#define configUSE_IDLE_HOOK 0 -#define configUSE_TICK_HOOK 0 -#define configUSE_MALLOC_FAILED_HOOK 1 - -/* Software timer definitions. */ -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY ( 2 ) -#define configTIMER_QUEUE_LENGTH 10 -#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) - -/* Co-routine definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - -/* Set the following definitions to 1 to include the API function, or zero -to exclude the API function. */ -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskDelete 0 -#define INCLUDE_vTaskCleanUpResources 0 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_xTaskGetIdleTaskHandle 0 -#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0 - -#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } - - -#endif /* FREERTOS_CONFIG_H */ - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/RegTest.S b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/RegTest.S deleted file mode 100644 index 4ef4110fc..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/RegTest.S +++ /dev/null @@ -1,243 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * This file defines the RegTest tasks as described at the top of main.c - */ - - .global _vRegTest1Task - .short _vRegTest1Task - .global _vRegTest2Task - .short _vRegTest2Task - - .extern _vRegTestError - .extern _usRegTest1LoopCounter - .extern _usRegTest2LoopCounter - - .text -/* - * Fill all the registers with known values, then check that the registers - * contain the expected value. An incorrect value being indicative of an - * error in the context switch mechanism. - */ -_vRegTest1Task: - - /* First fill the registers. */ - SEL RB0 - MOVW AX, #0x1122 - MOVW BC, #0x3344 - MOVW DE, #0x5566 - MOVW HL, #0x7788 - SEL RB1 - MOVW AX, #0x1111 - MOVW BC, #0x2222 - MOVW DE, #0x3333 - MOVW HL, #0x4444 - SEL RB2 - MOVW AX, #0x5555 - MOVW BC, #0x6666 - MOVW DE, #0x7777 - MOVW HL, #0x8888 - - /* Register bank 3 is not used outside of interrupts so is not saved as part - of the task context. */ - SEL RB0 - -_loop1: - - /* Continuously check that the register values remain at their expected - values. The BRK is to test the yield. This task runs at low priority - so will also regularly get preempted. */ - BRK - - /* Compare with the expected value. */ - CMPW AX, #0x1122 - BZ $.+5 - - /* Jump over the branch to vRegTestError() if the register contained the - expected value - otherwise flag an error by executing vRegTestError(). */ - BR !!_vRegTestError - - /* Repeat for all the registers. */ - MOVW AX, BC - CMPW AX, #0x3344 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, DE - CMPW AX, #0x5566 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, HL - CMPW AX, #0x7788 - BZ $.+5 - BR !!_vRegTestError - - /* Set AX back to its initial value. */ - MOVW AX, #0x1122 - - SEL RB1 - CMPW AX, #0x1111 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, BC - CMPW AX, #0x2222 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, DE - CMPW AX, #0x3333 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, HL - CMPW AX, #0x4444 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, #0x1111 - - - SEL RB2 - CMPW AX, #0x5555 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, BC - CMPW AX, #0x6666 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, DE - CMPW AX, #0x7777 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, HL - CMPW AX, #0x8888 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, #0x5555 - - - /* Register bank 3 is not used outside of interrupts so is not saved as - part of the task context. */ - - SEL RB0 - - /* Indicate that this task is still cycling. */ - INCW !_usRegTest1LoopCounter - - BR !!_loop1 - - -/* - * Fill all the registers with known values, then check that the registers - * contain the expected value. An incorrect value being indicative of an - * error in the context switch mechanism. - */ -_vRegTest2Task: - - SEL RB0 - MOVW AX, #0x99aa - MOVW BC, #0xbbcc - MOVW DE, #0xddee - MOVW HL, #0xff12 - SEL RB1 - MOVW AX, #0x0110 - MOVW BC, #0x0220 - MOVW DE, #0x0330 - MOVW HL, #0x0440 - SEL RB2 - MOVW AX, #0x0550 - MOVW BC, #0x0660 - MOVW DE, #0x0770 - MOVW HL, #0x0880 - - /* Register bank 3 is not used outside of interrupts so is not saved as - part of the task context. */ - SEL RB0 - -_loop2: - CMPW AX, #0x99aa - BZ $.+5 - BR !!_vRegTestError - MOVW AX, BC - CMPW AX, #0xbbcc - BZ $.+5 - BR !!_vRegTestError - MOVW AX, DE - CMPW AX, #0xddee - BZ $.+5 - BR !!_vRegTestError - MOVW AX, HL - CMPW AX, #0xff12 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, #0x99aa - - SEL RB1 - CMPW AX, #0x0110 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, BC - CMPW AX, #0x0220 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, DE - CMPW AX, #0x0330 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, HL - CMPW AX, #0x0440 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, #0x0110 - - SEL RB2 - CMPW AX, #0x0550 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, BC - CMPW AX, #0x0660 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, DE - CMPW AX, #0x0770 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, HL - CMPW AX, #0x0880 - BZ $.+5 - BR !!_vRegTestError - MOVW AX, #0x0550 - - /* Register bank 3 is not used outside of interrupts so is not saved as - part of the task context. */ - - SEL RB0 - - /* Indicate that this task is still cycling. */ - INCW !_usRegTest2LoopCounter - - BR !!_loop2 - - .end - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/demo_specific_io.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/demo_specific_io.h deleted file mode 100644 index 1237255ad..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/demo_specific_io.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef LED_IO_H -#define LED_IO_H - -/* Include the register definition file that is correct for the hardware being -used. The C and assembler pre-processor must have one of the following board -definitions defined to have the correct register definition header file -included. Alternatively, just manually include the correct files here. */ - - /* Prevent the files being included from the FreeRTOS port layer assembly - source files. */ - #ifndef __ASSEMBLER__ - - #ifdef YRDKRL78G14 - #include "iodefine_RL78G14.h" - #include "iodefine_RL78G14_ext.h" - #define LED_BIT ( P4_bit.no1 ) - #define LED_INIT() LED_BIT = 0 - #endif /* YRDKRL78G14 */ - - #ifdef RSKRL78G1C - #include "iodefine_RL78G1C.h" - #include "iodefine_RL78G1C_ext.h" - #define LED_BIT ( P0_bit.no1 ) - #define LED_INIT() P0 &= 0xFD; PM0 &= 0xFD - #endif /* RSKRL78G1C */ - - #ifdef RSKRL78L1C - #include "iodefine_RL78L1C.h" - #include "iodefine_RL78L1C_ext.h" - #define LED_BIT ( P4_bit.no1 ) - #define LED_INIT() P4 &= 0xFD; PM4 &= 0xFD - #endif /* RSKRL78L1C */ - - #ifdef RSKRL78L13 - #include "iodefine_RL78L13.h" - #include "iodefine_RL78L13_ext.h" - #define LED_BIT ( P4_bit.no1 ) - #define LED_INIT() P4 &= 0xFD; PM4 &= 0xFD - #endif /* RSKRL78L13 */ - - #ifdef RL78_G1A_TB - #include "iodefine_RL78G1A.h" - #include "iodefine_RL78G1A_ext.h" - #define LED_BIT ( P6_bit.no2 ) - #define LED_INIT() P6 &= 0xFB; PM6 &= 0xFB - #endif /* RL78_G1A_TB */ - - #ifndef LED_BIT - #error The hardware platform is not defined - #endif - - #endif /* INCLUDED_FROM_FREERTOS_ASM_FILE */ - -#endif /* LED_IO_H */ - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c deleted file mode 100644 index 061df9c76..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c +++ /dev/null @@ -1,39 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RTOSDemo */ -/* FILE : hardware_setup.c */ -/* DESCRIPTION : Hardware Initialization */ -/* CPU SERIES : RL78 - G1C */ -/* CPU TYPE : R5F10JBC */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/* Scheduler include files. */ -#include "FreeRTOS.h" - -void HardwareSetup( void ) -{ - portDISABLE_INTERRUPTS(); - - /* Set fMX */ - CMC = 0x00; - MSTOP = 1U; - - /* Set fMAIN */ - MCM0 = 0U; - - /* Set fSUB */ - XTSTOP = 1U; - OSMC = 0x10; - - /* Set fCLK */ - CSS = 0U; - - /* Set fIH */ - HIOSTOP = 0U; - - /* LED port initialization. */ - LED_INIT(); -} diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14.h deleted file mode 100644 index bfa227a6d..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14.h +++ /dev/null @@ -1,1121 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78G14 */ -/* FILE : iodefine.h */ -/* DESCRIPTION : Definition of I/O Registers */ -/* CPU SERIES : RL78 - G14 */ -/* CPU TYPE : R5F104PJ */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F104PJ.DVF */ -/* Copyright(C) 2012 Renesas */ -/* File Version V2.00 */ -/* Tool Version 1.9.7121 */ -/* Date Generated 13/11/2012 */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_H -#define IODEFINE_H - -/* - IO Registers - */ -union un_p0 { - unsigned char p0; - __BITS8 BIT; -}; -union un_p1 { - unsigned char p1; - __BITS8 BIT; -}; -union un_p2 { - unsigned char p2; - __BITS8 BIT; -}; -union un_p3 { - unsigned char p3; - __BITS8 BIT; -}; -union un_p4 { - unsigned char p4; - __BITS8 BIT; -}; -union un_p5 { - unsigned char p5; - __BITS8 BIT; -}; -union un_p6 { - unsigned char p6; - __BITS8 BIT; -}; -union un_p7 { - unsigned char p7; - __BITS8 BIT; -}; -union un_p8 { - unsigned char p8; - __BITS8 BIT; -}; -union un_p10 { - unsigned char p10; - __BITS8 BIT; -}; -union un_p11 { - unsigned char p11; - __BITS8 BIT; -}; -union un_p12 { - unsigned char p12; - __BITS8 BIT; -}; -union un_p13 { - unsigned char p13; - __BITS8 BIT; -}; -union un_p14 { - unsigned char p14; - __BITS8 BIT; -}; -union un_p15 { - unsigned char p15; - __BITS8 BIT; -}; -union un_pm0 { - unsigned char pm0; - __BITS8 BIT; -}; -union un_pm1 { - unsigned char pm1; - __BITS8 BIT; -}; -union un_pm2 { - unsigned char pm2; - __BITS8 BIT; -}; -union un_pm3 { - unsigned char pm3; - __BITS8 BIT; -}; -union un_pm4 { - unsigned char pm4; - __BITS8 BIT; -}; -union un_pm5 { - unsigned char pm5; - __BITS8 BIT; -}; -union un_pm6 { - unsigned char pm6; - __BITS8 BIT; -}; -union un_pm7 { - unsigned char pm7; - __BITS8 BIT; -}; -union un_pm8 { - unsigned char pm8; - __BITS8 BIT; -}; -union un_pm10 { - unsigned char pm10; - __BITS8 BIT; -}; -union un_pm11 { - unsigned char pm11; - __BITS8 BIT; -}; -union un_pm12 { - unsigned char pm12; - __BITS8 BIT; -}; -union un_pm14 { - unsigned char pm14; - __BITS8 BIT; -}; -union un_pm15 { - unsigned char pm15; - __BITS8 BIT; -}; -union un_adm0 { - unsigned char adm0; - __BITS8 BIT; -}; -union un_ads { - unsigned char ads; - __BITS8 BIT; -}; -union un_adm1 { - unsigned char adm1; - __BITS8 BIT; -}; -union un_dam { - unsigned char dam; - __BITS8 BIT; -}; -union un_krm { - unsigned char krm; - __BITS8 BIT; -}; -union un_egp0 { - unsigned char egp0; - __BITS8 BIT; -}; -union un_egn0 { - unsigned char egn0; - __BITS8 BIT; -}; -union un_egp1 { - unsigned char egp1; - __BITS8 BIT; -}; -union un_egn1 { - unsigned char egn1; - __BITS8 BIT; -}; -union un_iics0 { - unsigned char iics0; - __BITS8 BIT; -}; -union un_iicf0 { - unsigned char iicf0; - __BITS8 BIT; -}; -union un_iics1 { - unsigned char iics1; - __BITS8 BIT; -}; -union un_iicf1 { - unsigned char iicf1; - __BITS8 BIT; -}; -union un_flars { - unsigned char flars; - __BITS8 BIT; -}; -union un_fssq { - unsigned char fssq; - __BITS8 BIT; -}; -union un_flrst { - unsigned char flrst; - __BITS8 BIT; -}; -union un_fsastl { - unsigned char fsastl; - __BITS8 BIT; -}; -union un_fsasth { - unsigned char fsasth; - __BITS8 BIT; -}; -union un_rtcc0 { - unsigned char rtcc0; - __BITS8 BIT; -}; -union un_rtcc1 { - unsigned char rtcc1; - __BITS8 BIT; -}; -union un_csc { - unsigned char csc; - __BITS8 BIT; -}; -union un_ostc { - unsigned char ostc; - __BITS8 BIT; -}; -union un_ckc { - unsigned char ckc; - __BITS8 BIT; -}; -union un_cks0 { - unsigned char cks0; - __BITS8 BIT; -}; -union un_cks1 { - unsigned char cks1; - __BITS8 BIT; -}; -union un_lvim { - unsigned char lvim; - __BITS8 BIT; -}; -union un_lvis { - unsigned char lvis; - __BITS8 BIT; -}; -union un_monsta0 { - unsigned char monsta0; - __BITS8 BIT; -}; -union un_asim { - unsigned char asim; - __BITS8 BIT; -}; -union un_if2 { - unsigned short if2; - __BITS16 BIT; -}; -union un_if2l { - unsigned char if2l; - __BITS8 BIT; -}; -union un_if2h { - unsigned char if2h; - __BITS8 BIT; -}; -union un_mk2 { - unsigned short mk2; - __BITS16 BIT; -}; -union un_mk2l { - unsigned char mk2l; - __BITS8 BIT; -}; -union un_mk2h { - unsigned char mk2h; - __BITS8 BIT; -}; -union un_pr02 { - unsigned short pr02; - __BITS16 BIT; -}; -union un_pr02l { - unsigned char pr02l; - __BITS8 BIT; -}; -union un_pr02h { - unsigned char pr02h; - __BITS8 BIT; -}; -union un_pr12 { - unsigned short pr12; - __BITS16 BIT; -}; -union un_pr12l { - unsigned char pr12l; - __BITS8 BIT; -}; -union un_pr12h { - unsigned char pr12h; - __BITS8 BIT; -}; -union un_if0 { - unsigned short if0; - __BITS16 BIT; -}; -union un_if0l { - unsigned char if0l; - __BITS8 BIT; -}; -union un_if0h { - unsigned char if0h; - __BITS8 BIT; -}; -union un_if1 { - unsigned short if1; - __BITS16 BIT; -}; -union un_if1l { - unsigned char if1l; - __BITS8 BIT; -}; -union un_if1h { - unsigned char if1h; - __BITS8 BIT; -}; -union un_mk0 { - unsigned short mk0; - __BITS16 BIT; -}; -union un_mk0l { - unsigned char mk0l; - __BITS8 BIT; -}; -union un_mk0h { - unsigned char mk0h; - __BITS8 BIT; -}; -union un_mk1 { - unsigned short mk1; - __BITS16 BIT; -}; -union un_mk1l { - unsigned char mk1l; - __BITS8 BIT; -}; -union un_mk1h { - unsigned char mk1h; - __BITS8 BIT; -}; -union un_pr00 { - unsigned short pr00; - __BITS16 BIT; -}; -union un_pr00l { - unsigned char pr00l; - __BITS8 BIT; -}; -union un_pr00h { - unsigned char pr00h; - __BITS8 BIT; -}; -union un_pr01 { - unsigned short pr01; - __BITS16 BIT; -}; -union un_pr01l { - unsigned char pr01l; - __BITS8 BIT; -}; -union un_pr01h { - unsigned char pr01h; - __BITS8 BIT; -}; -union un_pr10 { - unsigned short pr10; - __BITS16 BIT; -}; -union un_pr10l { - unsigned char pr10l; - __BITS8 BIT; -}; -union un_pr10h { - unsigned char pr10h; - __BITS8 BIT; -}; -union un_pr11 { - unsigned short pr11; - __BITS16 BIT; -}; -union un_pr11l { - unsigned char pr11l; - __BITS8 BIT; -}; -union un_pr11h { - unsigned char pr11h; - __BITS8 BIT; -}; -union un_pmc { - unsigned char pmc; - __BITS8 BIT; -}; - -#define P0 (*(volatile union un_p0 *)0xFFF00).p0 -#define P0_bit (*(volatile union un_p0 *)0xFFF00).BIT -#define P1 (*(volatile union un_p1 *)0xFFF01).p1 -#define P1_bit (*(volatile union un_p1 *)0xFFF01).BIT -#define P2 (*(volatile union un_p2 *)0xFFF02).p2 -#define P2_bit (*(volatile union un_p2 *)0xFFF02).BIT -#define P3 (*(volatile union un_p3 *)0xFFF03).p3 -#define P3_bit (*(volatile union un_p3 *)0xFFF03).BIT -#define P4 (*(volatile union un_p4 *)0xFFF04).p4 -#define P4_bit (*(volatile union un_p4 *)0xFFF04).BIT -#define P5 (*(volatile union un_p5 *)0xFFF05).p5 -#define P5_bit (*(volatile union un_p5 *)0xFFF05).BIT -#define P6 (*(volatile union un_p6 *)0xFFF06).p6 -#define P6_bit (*(volatile union un_p6 *)0xFFF06).BIT -#define P7 (*(volatile union un_p7 *)0xFFF07).p7 -#define P7_bit (*(volatile union un_p7 *)0xFFF07).BIT -#define P8 (*(volatile union un_p8 *)0xFFF08).p8 -#define P8_bit (*(volatile union un_p8 *)0xFFF08).BIT -#define P10 (*(volatile union un_p10 *)0xFFF0A).p10 -#define P10_bit (*(volatile union un_p10 *)0xFFF0A).BIT -#define P11 (*(volatile union un_p11 *)0xFFF0B).p11 -#define P11_bit (*(volatile union un_p11 *)0xFFF0B).BIT -#define P12 (*(volatile union un_p12 *)0xFFF0C).p12 -#define P12_bit (*(volatile union un_p12 *)0xFFF0C).BIT -#define P13 (*(volatile union un_p13 *)0xFFF0D).p13 -#define P13_bit (*(volatile union un_p13 *)0xFFF0D).BIT -#define P14 (*(volatile union un_p14 *)0xFFF0E).p14 -#define P14_bit (*(volatile union un_p14 *)0xFFF0E).BIT -#define P15 (*(volatile union un_p15 *)0xFFF0F).p15 -#define P15_bit (*(volatile union un_p15 *)0xFFF0F).BIT -#define SDR00 (*(volatile unsigned short *)0xFFF10) -#define SIO00 (*(volatile unsigned char *)0xFFF10) -#define TXD0 (*(volatile unsigned char *)0xFFF10) -#define SDR01 (*(volatile unsigned short *)0xFFF12) -#define RXD0 (*(volatile unsigned char *)0xFFF12) -#define SIO01 (*(volatile unsigned char *)0xFFF12) -#define SDR12 (*(volatile unsigned short *)0xFFF14) -#define SIO30 (*(volatile unsigned char *)0xFFF14) -#define TXD3 (*(volatile unsigned char *)0xFFF14) -#define SDR13 (*(volatile unsigned short *)0xFFF16) -#define RXD3 (*(volatile unsigned char *)0xFFF16) -#define SIO31 (*(volatile unsigned char *)0xFFF16) -#define TDR00 (*(volatile unsigned short *)0xFFF18) -#define TDR01 (*(volatile unsigned short *)0xFFF1A) -#define TDR01L (*(volatile unsigned char *)0xFFF1A) -#define TDR01H (*(volatile unsigned char *)0xFFF1B) -#define ADCR (*(volatile unsigned short *)0xFFF1E) -#define ADCRH (*(volatile unsigned char *)0xFFF1F) -#define PM0 (*(volatile union un_pm0 *)0xFFF20).pm0 -#define PM0_bit (*(volatile union un_pm0 *)0xFFF20).BIT -#define PM1 (*(volatile union un_pm1 *)0xFFF21).pm1 -#define PM1_bit (*(volatile union un_pm1 *)0xFFF21).BIT -#define PM2 (*(volatile union un_pm2 *)0xFFF22).pm2 -#define PM2_bit (*(volatile union un_pm2 *)0xFFF22).BIT -#define PM3 (*(volatile union un_pm3 *)0xFFF23).pm3 -#define PM3_bit (*(volatile union un_pm3 *)0xFFF23).BIT -#define PM4 (*(volatile union un_pm4 *)0xFFF24).pm4 -#define PM4_bit (*(volatile union un_pm4 *)0xFFF24).BIT -#define PM5 (*(volatile union un_pm5 *)0xFFF25).pm5 -#define PM5_bit (*(volatile union un_pm5 *)0xFFF25).BIT -#define PM6 (*(volatile union un_pm6 *)0xFFF26).pm6 -#define PM6_bit (*(volatile union un_pm6 *)0xFFF26).BIT -#define PM7 (*(volatile union un_pm7 *)0xFFF27).pm7 -#define PM7_bit (*(volatile union un_pm7 *)0xFFF27).BIT -#define PM8 (*(volatile union un_pm8 *)0xFFF28).pm8 -#define PM8_bit (*(volatile union un_pm8 *)0xFFF28).BIT -#define PM10 (*(volatile union un_pm10 *)0xFFF2A).pm10 -#define PM10_bit (*(volatile union un_pm10 *)0xFFF2A).BIT -#define PM11 (*(volatile union un_pm11 *)0xFFF2B).pm11 -#define PM11_bit (*(volatile union un_pm11 *)0xFFF2B).BIT -#define PM12 (*(volatile union un_pm12 *)0xFFF2C).pm12 -#define PM12_bit (*(volatile union un_pm12 *)0xFFF2C).BIT -#define PM14 (*(volatile union un_pm14 *)0xFFF2E).pm14 -#define PM14_bit (*(volatile union un_pm14 *)0xFFF2E).BIT -#define PM15 (*(volatile union un_pm15 *)0xFFF2F).pm15 -#define PM15_bit (*(volatile union un_pm15 *)0xFFF2F).BIT -#define ADM0 (*(volatile union un_adm0 *)0xFFF30).adm0 -#define ADM0_bit (*(volatile union un_adm0 *)0xFFF30).BIT -#define ADS (*(volatile union un_ads *)0xFFF31).ads -#define ADS_bit (*(volatile union un_ads *)0xFFF31).BIT -#define ADM1 (*(volatile union un_adm1 *)0xFFF32).adm1 -#define ADM1_bit (*(volatile union un_adm1 *)0xFFF32).BIT -#define DACS0 (*(volatile unsigned char *)0xFFF34) -#define DACS1 (*(volatile unsigned char *)0xFFF35) -#define DAM (*(volatile union un_dam *)0xFFF36).dam -#define DAM_bit (*(volatile union un_dam *)0xFFF36).BIT -#define KRM (*(volatile union un_krm *)0xFFF37).krm -#define KRM_bit (*(volatile union un_krm *)0xFFF37).BIT -#define EGP0 (*(volatile union un_egp0 *)0xFFF38).egp0 -#define EGP0_bit (*(volatile union un_egp0 *)0xFFF38).BIT -#define EGN0 (*(volatile union un_egn0 *)0xFFF39).egn0 -#define EGN0_bit (*(volatile union un_egn0 *)0xFFF39).BIT -#define EGP1 (*(volatile union un_egp1 *)0xFFF3A).egp1 -#define EGP1_bit (*(volatile union un_egp1 *)0xFFF3A).BIT -#define EGN1 (*(volatile union un_egn1 *)0xFFF3B).egn1 -#define EGN1_bit (*(volatile union un_egn1 *)0xFFF3B).BIT -#define SDR02 (*(volatile unsigned short *)0xFFF44) -#define SIO10 (*(volatile unsigned char *)0xFFF44) -#define TXD1 (*(volatile unsigned char *)0xFFF44) -#define SDR03 (*(volatile unsigned short *)0xFFF46) -#define RXD1 (*(volatile unsigned char *)0xFFF46) -#define SIO11 (*(volatile unsigned char *)0xFFF46) -#define SDR10 (*(volatile unsigned short *)0xFFF48) -#define SIO20 (*(volatile unsigned char *)0xFFF48) -#define TXD2 (*(volatile unsigned char *)0xFFF48) -#define SDR11 (*(volatile unsigned short *)0xFFF4A) -#define RXD2 (*(volatile unsigned char *)0xFFF4A) -#define SIO21 (*(volatile unsigned char *)0xFFF4A) -#define IICA0 (*(volatile unsigned char *)0xFFF50) -#define IICS0 (*(volatile union un_iics0 *)0xFFF51).iics0 -#define IICS0_bit (*(volatile union un_iics0 *)0xFFF51).BIT -#define IICF0 (*(volatile union un_iicf0 *)0xFFF52).iicf0 -#define IICF0_bit (*(volatile union un_iicf0 *)0xFFF52).BIT -#define IICA1 (*(volatile unsigned char *)0xFFF54) -#define IICS1 (*(volatile union un_iics1 *)0xFFF55).iics1 -#define IICS1_bit (*(volatile union un_iics1 *)0xFFF55).BIT -#define IICF1 (*(volatile union un_iicf1 *)0xFFF56).iicf1 -#define IICF1_bit (*(volatile union un_iicf1 *)0xFFF56).BIT -#define TRDGRC0 (*(volatile unsigned short *)0xFFF58) -#define TRDGRD0 (*(volatile unsigned short *)0xFFF5A) -#define TRDGRC1 (*(volatile unsigned short *)0xFFF5C) -#define TRDGRD1 (*(volatile unsigned short *)0xFFF5E) -#define TRGGRC (*(volatile unsigned short *)0xFFF60) -#define TRGGRD (*(volatile unsigned short *)0xFFF62) -#define TDR02 (*(volatile unsigned short *)0xFFF64) -#define TDR03 (*(volatile unsigned short *)0xFFF66) -#define TDR03L (*(volatile unsigned char *)0xFFF66) -#define TDR03H (*(volatile unsigned char *)0xFFF67) -#define TDR10 (*(volatile unsigned short *)0xFFF70) -#define TDR11 (*(volatile unsigned short *)0xFFF72) -#define TDR11L (*(volatile unsigned char *)0xFFF72) -#define TDR11H (*(volatile unsigned char *)0xFFF73) -#define TDR12 (*(volatile unsigned short *)0xFFF74) -#define TDR13 (*(volatile unsigned short *)0xFFF76) -#define TDR13L (*(volatile unsigned char *)0xFFF76) -#define TDR13H (*(volatile unsigned char *)0xFFF77) -#define FLPMC (*(volatile unsigned char *)0xFFF80) -#define FLARS (*(volatile union un_flars *)0xFFF81).flars -#define FLARS_bit (*(volatile union un_flars *)0xFFF81).BIT -#define FLAPL (*(volatile unsigned short *)0xFFF82) -#define FLAPH (*(volatile unsigned char *)0xFFF84) -#define FSSQ (*(volatile union un_fssq *)0xFFF85).fssq -#define FSSQ_bit (*(volatile union un_fssq *)0xFFF85).BIT -#define FLSEDL (*(volatile unsigned short *)0xFFF86) -#define FLSEDH (*(volatile unsigned char *)0xFFF88) -#define FLRST (*(volatile union un_flrst *)0xFFF89).flrst -#define FLRST_bit (*(volatile union un_flrst *)0xFFF89).BIT -#define FSASTL (*(volatile union un_fsastl *)0xFFF8A).fsastl -#define FSASTL_bit (*(volatile union un_fsastl *)0xFFF8A).BIT -#define FSASTH (*(volatile union un_fsasth *)0xFFF8B).fsasth -#define FSASTH_bit (*(volatile union un_fsasth *)0xFFF8B).BIT -#define FLWL (*(volatile unsigned short *)0xFFF8C) -#define FLWH (*(volatile unsigned short *)0xFFF8E) -#define ITMC (*(volatile unsigned short *)0xFFF90) -#define SEC (*(volatile unsigned char *)0xFFF92) -#define MIN (*(volatile unsigned char *)0xFFF93) -#define HOUR (*(volatile unsigned char *)0xFFF94) -#define WEEK (*(volatile unsigned char *)0xFFF95) -#define DAY (*(volatile unsigned char *)0xFFF96) -#define MONTH (*(volatile unsigned char *)0xFFF97) -#define YEAR (*(volatile unsigned char *)0xFFF98) -#define SUBCUD (*(volatile unsigned char *)0xFFF99) -#define ALARMWM (*(volatile unsigned char *)0xFFF9A) -#define ALARMWH (*(volatile unsigned char *)0xFFF9B) -#define ALARMWW (*(volatile unsigned char *)0xFFF9C) -#define RTCC0 (*(volatile union un_rtcc0 *)0xFFF9D).rtcc0 -#define RTCC0_bit (*(volatile union un_rtcc0 *)0xFFF9D).BIT -#define RTCC1 (*(volatile union un_rtcc1 *)0xFFF9E).rtcc1 -#define RTCC1_bit (*(volatile union un_rtcc1 *)0xFFF9E).BIT -#define CMC (*(volatile unsigned char *)0xFFFA0) -#define CSC (*(volatile union un_csc *)0xFFFA1).csc -#define CSC_bit (*(volatile union un_csc *)0xFFFA1).BIT -#define OSTC (*(volatile union un_ostc *)0xFFFA2).ostc -#define OSTC_bit (*(volatile union un_ostc *)0xFFFA2).BIT -#define OSTS (*(volatile unsigned char *)0xFFFA3) -#define CKC (*(volatile union un_ckc *)0xFFFA4).ckc -#define CKC_bit (*(volatile union un_ckc *)0xFFFA4).BIT -#define CKS0 (*(volatile union un_cks0 *)0xFFFA5).cks0 -#define CKS0_bit (*(volatile union un_cks0 *)0xFFFA5).BIT -#define CKS1 (*(volatile union un_cks1 *)0xFFFA6).cks1 -#define CKS1_bit (*(volatile union un_cks1 *)0xFFFA6).BIT -#define RESF (*(volatile unsigned char *)0xFFFA8) -#define LVIM (*(volatile union un_lvim *)0xFFFA9).lvim -#define LVIM_bit (*(volatile union un_lvim *)0xFFFA9).BIT -#define LVIS (*(volatile union un_lvis *)0xFFFAA).lvis -#define LVIS_bit (*(volatile union un_lvis *)0xFFFAA).BIT -#define WDTE (*(volatile unsigned char *)0xFFFAB) -#define CRCIN (*(volatile unsigned char *)0xFFFAC) -#define RXB (*(volatile unsigned char *)0xFFFAD) -#define TXS (*(volatile unsigned char *)0xFFFAD) -#define MONSTA0 (*(volatile union un_monsta0 *)0xFFFAE).monsta0 -#define MONSTA0_bit (*(volatile union un_monsta0 *)0xFFFAE).BIT -#define ASIM (*(volatile union un_asim *)0xFFFAF).asim -#define ASIM_bit (*(volatile union un_asim *)0xFFFAF).BIT -#define IF2 (*(volatile union un_if2 *)0xFFFD0).if2 -#define IF2_bit (*(volatile union un_if2 *)0xFFFD0).BIT -#define IF2L (*(volatile union un_if2l *)0xFFFD0).if2l -#define IF2L_bit (*(volatile union un_if2l *)0xFFFD0).BIT -#define IF2H (*(volatile union un_if2h *)0xFFFD1).if2h -#define IF2H_bit (*(volatile union un_if2h *)0xFFFD1).BIT -#define MK2 (*(volatile union un_mk2 *)0xFFFD4).mk2 -#define MK2_bit (*(volatile union un_mk2 *)0xFFFD4).BIT -#define MK2L (*(volatile union un_mk2l *)0xFFFD4).mk2l -#define MK2L_bit (*(volatile union un_mk2l *)0xFFFD4).BIT -#define MK2H (*(volatile union un_mk2h *)0xFFFD5).mk2h -#define MK2H_bit (*(volatile union un_mk2h *)0xFFFD5).BIT -#define PR02 (*(volatile union un_pr02 *)0xFFFD8).pr02 -#define PR02_bit (*(volatile union un_pr02 *)0xFFFD8).BIT -#define PR02L (*(volatile union un_pr02l *)0xFFFD8).pr02l -#define PR02L_bit (*(volatile union un_pr02l *)0xFFFD8).BIT -#define PR02H (*(volatile union un_pr02h *)0xFFFD9).pr02h -#define PR02H_bit (*(volatile union un_pr02h *)0xFFFD9).BIT -#define PR12 (*(volatile union un_pr12 *)0xFFFDC).pr12 -#define PR12_bit (*(volatile union un_pr12 *)0xFFFDC).BIT -#define PR12L (*(volatile union un_pr12l *)0xFFFDC).pr12l -#define PR12L_bit (*(volatile union un_pr12l *)0xFFFDC).BIT -#define PR12H (*(volatile union un_pr12h *)0xFFFDD).pr12h -#define PR12H_bit (*(volatile union un_pr12h *)0xFFFDD).BIT -#define IF0 (*(volatile union un_if0 *)0xFFFE0).if0 -#define IF0_bit (*(volatile union un_if0 *)0xFFFE0).BIT -#define IF0L (*(volatile union un_if0l *)0xFFFE0).if0l -#define IF0L_bit (*(volatile union un_if0l *)0xFFFE0).BIT -#define IF0H (*(volatile union un_if0h *)0xFFFE1).if0h -#define IF0H_bit (*(volatile union un_if0h *)0xFFFE1).BIT -#define IF1 (*(volatile union un_if1 *)0xFFFE2).if1 -#define IF1_bit (*(volatile union un_if1 *)0xFFFE2).BIT -#define IF1L (*(volatile union un_if1l *)0xFFFE2).if1l -#define IF1L_bit (*(volatile union un_if1l *)0xFFFE2).BIT -#define IF1H (*(volatile union un_if1h *)0xFFFE3).if1h -#define IF1H_bit (*(volatile union un_if1h *)0xFFFE3).BIT -#define MK0 (*(volatile union un_mk0 *)0xFFFE4).mk0 -#define MK0_bit (*(volatile union un_mk0 *)0xFFFE4).BIT -#define MK0L (*(volatile union un_mk0l *)0xFFFE4).mk0l -#define MK0L_bit (*(volatile union un_mk0l *)0xFFFE4).BIT -#define MK0H (*(volatile union un_mk0h *)0xFFFE5).mk0h -#define MK0H_bit (*(volatile union un_mk0h *)0xFFFE5).BIT -#define MK1 (*(volatile union un_mk1 *)0xFFFE6).mk1 -#define MK1_bit (*(volatile union un_mk1 *)0xFFFE6).BIT -#define MK1L (*(volatile union un_mk1l *)0xFFFE6).mk1l -#define MK1L_bit (*(volatile union un_mk1l *)0xFFFE6).BIT -#define MK1H (*(volatile union un_mk1h *)0xFFFE7).mk1h -#define MK1H_bit (*(volatile union un_mk1h *)0xFFFE7).BIT -#define PR00 (*(volatile union un_pr00 *)0xFFFE8).pr00 -#define PR00_bit (*(volatile union un_pr00 *)0xFFFE8).BIT -#define PR00L (*(volatile union un_pr00l *)0xFFFE8).pr00l -#define PR00L_bit (*(volatile union un_pr00l *)0xFFFE8).BIT -#define PR00H (*(volatile union un_pr00h *)0xFFFE9).pr00h -#define PR00H_bit (*(volatile union un_pr00h *)0xFFFE9).BIT -#define PR01 (*(volatile union un_pr01 *)0xFFFEA).pr01 -#define PR01_bit (*(volatile union un_pr01 *)0xFFFEA).BIT -#define PR01L (*(volatile union un_pr01l *)0xFFFEA).pr01l -#define PR01L_bit (*(volatile union un_pr01l *)0xFFFEA).BIT -#define PR01H (*(volatile union un_pr01h *)0xFFFEB).pr01h -#define PR01H_bit (*(volatile union un_pr01h *)0xFFFEB).BIT -#define PR10 (*(volatile union un_pr10 *)0xFFFEC).pr10 -#define PR10_bit (*(volatile union un_pr10 *)0xFFFEC).BIT -#define PR10L (*(volatile union un_pr10l *)0xFFFEC).pr10l -#define PR10L_bit (*(volatile union un_pr10l *)0xFFFEC).BIT -#define PR10H (*(volatile union un_pr10h *)0xFFFED).pr10h -#define PR10H_bit (*(volatile union un_pr10h *)0xFFFED).BIT -#define PR11 (*(volatile union un_pr11 *)0xFFFEE).pr11 -#define PR11_bit (*(volatile union un_pr11 *)0xFFFEE).BIT -#define PR11L (*(volatile union un_pr11l *)0xFFFEE).pr11l -#define PR11L_bit (*(volatile union un_pr11l *)0xFFFEE).BIT -#define PR11H (*(volatile union un_pr11h *)0xFFFEF).pr11h -#define PR11H_bit (*(volatile union un_pr11h *)0xFFFEF).BIT -#define MACRL (*(volatile unsigned short *)0xFFFF0) -#define MACRH (*(volatile unsigned short *)0xFFFF2) -#define MDUC (*(volatile unsigned char *)0xFFFFB) -#define PMC (*(volatile union un_pmc *)0xFFFFE).pmc -#define PMC_bit (*(volatile union un_pmc *)0xFFFFE).BIT - -/* - Sfr bits - */ -#define ADCE ADM0_bit.no0 -#define ADCS ADM0_bit.no7 -#define DACE0 DAM_bit.no4 -#define DACE1 DAM_bit.no5 -#define SPD0 IICS0_bit.no0 -#define STD0 IICS0_bit.no1 -#define ACKD0 IICS0_bit.no2 -#define TRC0 IICS0_bit.no3 -#define COI0 IICS0_bit.no4 -#define EXC0 IICS0_bit.no5 -#define ALD0 IICS0_bit.no6 -#define MSTS0 IICS0_bit.no7 -#define IICRSV0 IICF0_bit.no0 -#define STCEN0 IICF0_bit.no1 -#define IICBSY0 IICF0_bit.no6 -#define STCF0 IICF0_bit.no7 -#define SPD1 IICS1_bit.no0 -#define STD1 IICS1_bit.no1 -#define ACKD1 IICS1_bit.no2 -#define TRC1 IICS1_bit.no3 -#define COI1 IICS1_bit.no4 -#define EXC1 IICS1_bit.no5 -#define ALD1 IICS1_bit.no6 -#define MSTS1 IICS1_bit.no7 -#define IICRSV1 IICF1_bit.no0 -#define STCEN1 IICF1_bit.no1 -#define IICBSY1 IICF1_bit.no6 -#define STCF1 IICF1_bit.no7 -#define FSSTP FSSQ_bit.no6 -#define SQST FSSQ_bit.no7 -#define SQEND FSASTH_bit.no6 -#define ESQEND FSASTH_bit.no7 -#define RCLOE1 RTCC0_bit.no5 -#define RTCE RTCC0_bit.no7 -#define RWAIT RTCC1_bit.no0 -#define RWST RTCC1_bit.no1 -#define RIFG RTCC1_bit.no3 -#define WAFG RTCC1_bit.no4 -#define WALIE RTCC1_bit.no6 -#define WALE RTCC1_bit.no7 -#define HIOSTOP CSC_bit.no0 -#define XTSTOP CSC_bit.no6 -#define MSTOP CSC_bit.no7 -#define SDIV CKC_bit.no3 -#define MCM0 CKC_bit.no4 -#define MCS CKC_bit.no5 -#define CSS CKC_bit.no6 -#define CLS CKC_bit.no7 -#define PCLOE0 CKS0_bit.no7 -#define PCLOE1 CKS1_bit.no7 -#define LVIF LVIM_bit.no0 -#define LVIOMSK LVIM_bit.no1 -#define LVISEN LVIM_bit.no7 -#define LVILV LVIS_bit.no0 -#define LVIMD LVIS_bit.no7 -#define TMIF11 IF2_bit.no0 -#define TMIF12 IF2_bit.no1 -#define TMIF13 IF2_bit.no2 -#define PIF6 IF2_bit.no3 -#define PIF7 IF2_bit.no4 -#define PIF8 IF2_bit.no5 -#define PIF9 IF2_bit.no6 -#define CMPIF0 IF2_bit.no7 -#define PIF10 IF2_bit.no7 -#define CMPIF1 IF2H_bit.no0 -#define PIF11 IF2H_bit.no0 -#define TRDIF0 IF2H_bit.no1 -#define TRDIF1 IF2H_bit.no2 -#define TRGIF IF2H_bit.no3 -#define SREIF3 IF2H_bit.no4 -#define TMIF13H IF2H_bit.no4 -#define IICAIF1 IF2H_bit.no6 -#define FLIF IF2H_bit.no7 -#define TMMK11 MK2_bit.no0 -#define TMMK12 MK2_bit.no1 -#define TMMK13 MK2_bit.no2 -#define PMK6 MK2_bit.no3 -#define PMK7 MK2_bit.no4 -#define PMK8 MK2_bit.no5 -#define PMK9 MK2_bit.no6 -#define CMPMK0 MK2_bit.no7 -#define PMK10 MK2_bit.no7 -#define CMPMK1 MK2H_bit.no0 -#define PMK11 MK2H_bit.no0 -#define TRDMK0 MK2H_bit.no1 -#define TRDMK1 MK2H_bit.no2 -#define TRGMK MK2H_bit.no3 -#define SREMK3 MK2H_bit.no4 -#define TMMK13H MK2H_bit.no4 -#define IICAMK1 MK2H_bit.no6 -#define FLMK MK2H_bit.no7 -#define TMPR011 PR02_bit.no0 -#define TMPR012 PR02_bit.no1 -#define TMPR013 PR02_bit.no2 -#define PPR06 PR02_bit.no3 -#define PPR07 PR02_bit.no4 -#define PPR08 PR02_bit.no5 -#define PPR09 PR02_bit.no6 -#define CMPPR00 PR02_bit.no7 -#define PPR010 PR02_bit.no7 -#define CMPPR01 PR02H_bit.no0 -#define PPR011 PR02H_bit.no0 -#define TRDPR00 PR02H_bit.no1 -#define TRDPR01 PR02H_bit.no2 -#define TRGPR0 PR02H_bit.no3 -#define SREPR03 PR02H_bit.no4 -#define TMPR013H PR02H_bit.no4 -#define IICAPR01 PR02H_bit.no6 -#define FLPR0 PR02H_bit.no7 -#define TMPR111 PR12_bit.no0 -#define TMPR112 PR12_bit.no1 -#define TMPR113 PR12_bit.no2 -#define PPR16 PR12_bit.no3 -#define PPR17 PR12_bit.no4 -#define PPR18 PR12_bit.no5 -#define PPR19 PR12_bit.no6 -#define CMPPR10 PR12_bit.no7 -#define PPR110 PR12_bit.no7 -#define CMPPR11 PR12H_bit.no0 -#define PPR111 PR12H_bit.no0 -#define TRDPR10 PR12H_bit.no1 -#define TRDPR11 PR12H_bit.no2 -#define TRGPR1 PR12H_bit.no3 -#define SREPR13 PR12H_bit.no4 -#define TMPR113H PR12H_bit.no4 -#define IICAPR11 PR12H_bit.no6 -#define FLPR1 PR12H_bit.no7 -#define SROIF IF0_bit.no0 -#define WDTIIF IF0_bit.no0 -#define LVIIF IF0_bit.no1 -#define PIF0 IF0_bit.no2 -#define PIF1 IF0_bit.no3 -#define PIF2 IF0_bit.no4 -#define PIF3 IF0_bit.no5 -#define PIF4 IF0_bit.no6 -#define PIF5 IF0_bit.no7 -#define CSIIF20 IF0H_bit.no0 -#define IICIF20 IF0H_bit.no0 -#define STIF2 IF0H_bit.no0 -#define CSIIF21 IF0H_bit.no1 -#define IICIF21 IF0H_bit.no1 -#define SRIF2 IF0H_bit.no1 -#define SREIF2 IF0H_bit.no2 -#define TMIF11H IF0H_bit.no2 -#define CSIIF00 IF0H_bit.no5 -#define IICIF00 IF0H_bit.no5 -#define STIF0 IF0H_bit.no5 -#define CSIIF01 IF0H_bit.no6 -#define IICIF01 IF0H_bit.no6 -#define SRIF0 IF0H_bit.no6 -#define SREIF0 IF0H_bit.no7 -#define TMIF01H IF0H_bit.no7 -#define CSIIF10 IF1_bit.no0 -#define IICIF10 IF1_bit.no0 -#define STIF1 IF1_bit.no0 -#define CSIIF11 IF1_bit.no1 -#define IICIF11 IF1_bit.no1 -#define SRIF1 IF1_bit.no1 -#define SREIF1 IF1_bit.no2 -#define TMIF03H IF1_bit.no2 -#define IICAIF0 IF1_bit.no3 -#define TMIF00 IF1_bit.no4 -#define TMIF01 IF1_bit.no5 -#define TMIF02 IF1_bit.no6 -#define TMIF03 IF1_bit.no7 -#define ADIF IF1H_bit.no0 -#define RTCIF IF1H_bit.no1 -#define ITIF IF1H_bit.no2 -#define KRIF IF1H_bit.no3 -#define CSIIF30 IF1H_bit.no4 -#define IICIF30 IF1H_bit.no4 -#define STIF3 IF1H_bit.no4 -#define CSIIF31 IF1H_bit.no5 -#define IICIF31 IF1H_bit.no5 -#define SRIF3 IF1H_bit.no5 -#define TRJIF0 IF1H_bit.no6 -#define TMIF10 IF1H_bit.no7 -#define SROMK MK0_bit.no0 -#define WDTIMK MK0_bit.no0 -#define LVIMK MK0_bit.no1 -#define PMK0 MK0_bit.no2 -#define PMK1 MK0_bit.no3 -#define PMK2 MK0_bit.no4 -#define PMK3 MK0_bit.no5 -#define PMK4 MK0_bit.no6 -#define PMK5 MK0_bit.no7 -#define CSIMK20 MK0H_bit.no0 -#define IICMK20 MK0H_bit.no0 -#define STMK2 MK0H_bit.no0 -#define CSIMK21 MK0H_bit.no1 -#define IICMK21 MK0H_bit.no1 -#define SRMK2 MK0H_bit.no1 -#define SREMK2 MK0H_bit.no2 -#define TMMK11H MK0H_bit.no2 -#define CSIMK00 MK0H_bit.no5 -#define IICMK00 MK0H_bit.no5 -#define STMK0 MK0H_bit.no5 -#define CSIMK01 MK0H_bit.no6 -#define IICMK01 MK0H_bit.no6 -#define SRMK0 MK0H_bit.no6 -#define SREMK0 MK0H_bit.no7 -#define TMMK01H MK0H_bit.no7 -#define CSIMK10 MK1_bit.no0 -#define IICMK10 MK1_bit.no0 -#define STMK1 MK1_bit.no0 -#define CSIMK11 MK1_bit.no1 -#define IICMK11 MK1_bit.no1 -#define SRMK1 MK1_bit.no1 -#define SREMK1 MK1_bit.no2 -#define TMMK03H MK1_bit.no2 -#define IICAMK0 MK1_bit.no3 -#define TMMK00 MK1_bit.no4 -#define TMMK01 MK1_bit.no5 -#define TMMK02 MK1_bit.no6 -#define TMMK03 MK1_bit.no7 -#define ADMK MK1H_bit.no0 -#define RTCMK MK1H_bit.no1 -#define ITMK MK1H_bit.no2 -#define KRMK MK1H_bit.no3 -#define CSIMK30 MK1H_bit.no4 -#define IICMK30 MK1H_bit.no4 -#define STMK3 MK1H_bit.no4 -#define CSIMK31 MK1H_bit.no5 -#define IICMK31 MK1H_bit.no5 -#define SRMK3 MK1H_bit.no5 -#define TRJMK0 MK1H_bit.no6 -#define TMMK10 MK1H_bit.no7 -#define SROPR0 PR00_bit.no0 -#define WDTIPR0 PR00_bit.no0 -#define LVIPR0 PR00_bit.no1 -#define PPR00 PR00_bit.no2 -#define PPR01 PR00_bit.no3 -#define PPR02 PR00_bit.no4 -#define PPR03 PR00_bit.no5 -#define PPR04 PR00_bit.no6 -#define PPR05 PR00_bit.no7 -#define CSIPR020 PR00H_bit.no0 -#define IICPR020 PR00H_bit.no0 -#define STPR02 PR00H_bit.no0 -#define CSIPR021 PR00H_bit.no1 -#define IICPR021 PR00H_bit.no1 -#define SRPR02 PR00H_bit.no1 -#define SREPR02 PR00H_bit.no2 -#define TMPR011H PR00H_bit.no2 -#define CSIPR000 PR00H_bit.no5 -#define IICPR000 PR00H_bit.no5 -#define STPR00 PR00H_bit.no5 -#define CSIPR001 PR00H_bit.no6 -#define IICPR001 PR00H_bit.no6 -#define SRPR00 PR00H_bit.no6 -#define SREPR00 PR00H_bit.no7 -#define TMPR001H PR00H_bit.no7 -#define CSIPR010 PR01_bit.no0 -#define IICPR010 PR01_bit.no0 -#define STPR01 PR01_bit.no0 -#define CSIPR011 PR01_bit.no1 -#define IICPR011 PR01_bit.no1 -#define SRPR01 PR01_bit.no1 -#define SREPR01 PR01_bit.no2 -#define TMPR003H PR01_bit.no2 -#define IICAPR00 PR01_bit.no3 -#define TMPR000 PR01_bit.no4 -#define TMPR001 PR01_bit.no5 -#define TMPR002 PR01_bit.no6 -#define TMPR003 PR01_bit.no7 -#define ADPR0 PR01H_bit.no0 -#define RTCPR0 PR01H_bit.no1 -#define ITPR0 PR01H_bit.no2 -#define KRPR0 PR01H_bit.no3 -#define CSIPR030 PR01H_bit.no4 -#define IICPR030 PR01H_bit.no4 -#define STPR03 PR01H_bit.no4 -#define CSIPR031 PR01H_bit.no5 -#define IICPR031 PR01H_bit.no5 -#define SRPR03 PR01H_bit.no5 -#define TRJPR00 PR01H_bit.no6 -#define TMPR010 PR01H_bit.no7 -#define SROPR1 PR10_bit.no0 -#define WDTIPR1 PR10_bit.no0 -#define LVIPR1 PR10_bit.no1 -#define PPR10 PR10_bit.no2 -#define PPR11 PR10_bit.no3 -#define PPR12 PR10_bit.no4 -#define PPR13 PR10_bit.no5 -#define PPR14 PR10_bit.no6 -#define PPR15 PR10_bit.no7 -#define CSIPR120 PR10H_bit.no0 -#define IICPR120 PR10H_bit.no0 -#define STPR12 PR10H_bit.no0 -#define CSIPR121 PR10H_bit.no1 -#define IICPR121 PR10H_bit.no1 -#define SRPR12 PR10H_bit.no1 -#define SREPR12 PR10H_bit.no2 -#define TMPR111H PR10H_bit.no2 -#define CSIPR100 PR10H_bit.no5 -#define IICPR100 PR10H_bit.no5 -#define STPR10 PR10H_bit.no5 -#define CSIPR101 PR10H_bit.no6 -#define IICPR101 PR10H_bit.no6 -#define SRPR10 PR10H_bit.no6 -#define SREPR10 PR10H_bit.no7 -#define TMPR101H PR10H_bit.no7 -#define CSIPR110 PR11_bit.no0 -#define IICPR110 PR11_bit.no0 -#define STPR11 PR11_bit.no0 -#define CSIPR111 PR11_bit.no1 -#define IICPR111 PR11_bit.no1 -#define SRPR11 PR11_bit.no1 -#define SREPR11 PR11_bit.no2 -#define TMPR103H PR11_bit.no2 -#define IICAPR10 PR11_bit.no3 -#define TMPR100 PR11_bit.no4 -#define TMPR101 PR11_bit.no5 -#define TMPR102 PR11_bit.no6 -#define TMPR103 PR11_bit.no7 -#define ADPR1 PR11H_bit.no0 -#define RTCPR1 PR11H_bit.no1 -#define ITPR1 PR11H_bit.no2 -#define KRPR1 PR11H_bit.no3 -#define CSIPR130 PR11H_bit.no4 -#define IICPR130 PR11H_bit.no4 -#define STPR13 PR11H_bit.no4 -#define CSIPR131 PR11H_bit.no5 -#define IICPR131 PR11H_bit.no5 -#define SRPR13 PR11H_bit.no5 -#define TRJPR10 PR11H_bit.no6 -#define TMPR110 PR11H_bit.no7 -#define MAA PMC_bit.no0 - -/* - Interrupt vector addresses - */ -#define RST_vect (0x0) -#define INTDBG_vect (0x2) -#define INTSRO_vect (0x4) -#define INTWDTI_vect (0x4) -#define INTLVI_vect (0x6) -#define INTP0_vect (0x8) -#define INTP1_vect (0xA) -#define INTP2_vect (0xC) -#define INTP3_vect (0xE) -#define INTP4_vect (0x10) -#define INTP5_vect (0x12) -#define INTCSI20_vect (0x14) -#define INTIIC20_vect (0x14) -#define INTST2_vect (0x14) -#define INTCSI21_vect (0x16) -#define INTIIC21_vect (0x16) -#define INTSR2_vect (0x16) -#define INTSRE2_vect (0x18) -#define INTTM11H_vect (0x18) -#define INTCSI00_vect (0x1E) -#define INTIIC00_vect (0x1E) -#define INTST0_vect (0x1E) -#define INTCSI01_vect (0x20) -#define INTIIC01_vect (0x20) -#define INTSR0_vect (0x20) -#define INTSRE0_vect (0x22) -#define INTTM01H_vect (0x22) -#define INTCSI10_vect (0x24) -#define INTIIC10_vect (0x24) -#define INTST1_vect (0x24) -#define INTCSI11_vect (0x26) -#define INTIIC11_vect (0x26) -#define INTSR1_vect (0x26) -#define INTSRE1_vect (0x28) -#define INTTM03H_vect (0x28) -#define INTIICA0_vect (0x2A) -#define INTTM00_vect (0x2C) -#define INTTM01_vect (0x2E) -#define INTTM02_vect (0x30) -#define INTTM03_vect (0x32) -#define INTAD_vect (0x34) -#define INTRTC_vect (0x36) -#define INTIT_vect (0x38) -#define INTKR_vect (0x3A) -#define INTCSI30_vect (0x3C) -#define INTIIC30_vect (0x3C) -#define INTST3_vect (0x3C) -#define INTCSI31_vect (0x3E) -#define INTIIC31_vect (0x3E) -#define INTSR3_vect (0x3E) -#define INTTRJ0_vect (0x40) -#define INTTM10_vect (0x42) -#define INTTM11_vect (0x44) -#define INTTM12_vect (0x46) -#define INTTM13_vect (0x48) -#define INTP6_vect (0x4A) -#define INTP7_vect (0x4C) -#define INTP8_vect (0x4E) -#define INTP9_vect (0x50) -#define INTCMP0_vect (0x52) -#define INTP10_vect (0x52) -#define INTCMP1_vect (0x54) -#define INTP11_vect (0x54) -#define INTTRD0_vect (0x56) -#define INTTRD1_vect (0x58) -#define INTTRG_vect (0x5A) -#define INTSRE3_vect (0x5C) -#define INTTM13H_vect (0x5C) -#define INTIICA1_vect (0x60) -#define INTFL_vect (0x62) -#define BRK_I_vect (0x7E) -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14_ext.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14_ext.h deleted file mode 100644 index 892692056..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G14_ext.h +++ /dev/null @@ -1,1204 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78G14 */ -/* FILE : iodefine_ext.h */ -/* DESCRIPTION : Definition of Extended SFRs */ -/* CPU SERIES : RL78 - G14 */ -/* CPU TYPE : R5F104PJ */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F104PJ.DVF */ -/* Copyright(C) 2012 Renesas */ -/* File Version V2.00 */ -/* Tool Version 1.9.7121 */ -/* Date Generated 13/11/2012 */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_EXT_H -#define IODEFINE_EXT_H - -/* - IO Registers - */ -union un_adm2 { - unsigned char adm2; - __BITS8 BIT; -}; -union un_pu0 { - unsigned char pu0; - __BITS8 BIT; -}; -union un_pu1 { - unsigned char pu1; - __BITS8 BIT; -}; -union un_pu3 { - unsigned char pu3; - __BITS8 BIT; -}; -union un_pu4 { - unsigned char pu4; - __BITS8 BIT; -}; -union un_pu5 { - unsigned char pu5; - __BITS8 BIT; -}; -union un_pu6 { - unsigned char pu6; - __BITS8 BIT; -}; -union un_pu7 { - unsigned char pu7; - __BITS8 BIT; -}; -union un_pu8 { - unsigned char pu8; - __BITS8 BIT; -}; -union un_pu10 { - unsigned char pu10; - __BITS8 BIT; -}; -union un_pu11 { - unsigned char pu11; - __BITS8 BIT; -}; -union un_pu12 { - unsigned char pu12; - __BITS8 BIT; -}; -union un_pu14 { - unsigned char pu14; - __BITS8 BIT; -}; -union un_pim0 { - unsigned char pim0; - __BITS8 BIT; -}; -union un_pim1 { - unsigned char pim1; - __BITS8 BIT; -}; -union un_pim3 { - unsigned char pim3; - __BITS8 BIT; -}; -union un_pim4 { - unsigned char pim4; - __BITS8 BIT; -}; -union un_pim5 { - unsigned char pim5; - __BITS8 BIT; -}; -union un_pim8 { - unsigned char pim8; - __BITS8 BIT; -}; -union un_pim14 { - unsigned char pim14; - __BITS8 BIT; -}; -union un_pom0 { - unsigned char pom0; - __BITS8 BIT; -}; -union un_pom1 { - unsigned char pom1; - __BITS8 BIT; -}; -union un_pom3 { - unsigned char pom3; - __BITS8 BIT; -}; -union un_pom4 { - unsigned char pom4; - __BITS8 BIT; -}; -union un_pom5 { - unsigned char pom5; - __BITS8 BIT; -}; -union un_pom7 { - unsigned char pom7; - __BITS8 BIT; -}; -union un_pom8 { - unsigned char pom8; - __BITS8 BIT; -}; -union un_pom14 { - unsigned char pom14; - __BITS8 BIT; -}; -union un_pmc0 { - unsigned char pmc0; - __BITS8 BIT; -}; -union un_pmc1 { - unsigned char pmc1; - __BITS8 BIT; -}; -union un_pmc10 { - unsigned char pmc10; - __BITS8 BIT; -}; -union un_pmc12 { - unsigned char pmc12; - __BITS8 BIT; -}; -union un_pmc14 { - unsigned char pmc14; - __BITS8 BIT; -}; -union un_nfen0 { - unsigned char nfen0; - __BITS8 BIT; -}; -union un_nfen1 { - unsigned char nfen1; - __BITS8 BIT; -}; -union un_nfen2 { - unsigned char nfen2; - __BITS8 BIT; -}; -union un_isc { - unsigned char isc; - __BITS8 BIT; -}; -union un_per1 { - unsigned char per1; - __BITS8 BIT; -}; -union un_pms { - unsigned char pms; - __BITS8 BIT; -}; -union un_gdidis { - unsigned char gdidis; - __BITS8 BIT; -}; -union un_dflctl { - unsigned char dflctl; - __BITS8 BIT; -}; -union un_bectl { - unsigned char bectl; - __BITS8 BIT; -}; -union un_fsse { - unsigned char fsse; - __BITS8 BIT; -}; -union un_pfs { - unsigned char pfs; - __BITS8 BIT; -}; -union un_per0 { - unsigned char per0; - __BITS8 BIT; -}; -union un_rmc { - unsigned char rmc; - __BITS8 BIT; -}; -union un_rpectl { - unsigned char rpectl; - __BITS8 BIT; -}; -union un_se0l { - unsigned char se0l; - __BITS8 BIT; -}; -union un_ss0l { - unsigned char ss0l; - __BITS8 BIT; -}; -union un_st0l { - unsigned char st0l; - __BITS8 BIT; -}; -union un_soe0l { - unsigned char soe0l; - __BITS8 BIT; -}; -union un_se1l { - unsigned char se1l; - __BITS8 BIT; -}; -union un_ss1l { - unsigned char ss1l; - __BITS8 BIT; -}; -union un_st1l { - unsigned char st1l; - __BITS8 BIT; -}; -union un_soe1l { - unsigned char soe1l; - __BITS8 BIT; -}; -union un_te0l { - unsigned char te0l; - __BITS8 BIT; -}; -union un_ts0l { - unsigned char ts0l; - __BITS8 BIT; -}; -union un_tt0l { - unsigned char tt0l; - __BITS8 BIT; -}; -union un_toe0l { - unsigned char toe0l; - __BITS8 BIT; -}; -union un_te1l { - unsigned char te1l; - __BITS8 BIT; -}; -union un_ts1l { - unsigned char ts1l; - __BITS8 BIT; -}; -union un_tt1l { - unsigned char tt1l; - __BITS8 BIT; -}; -union un_toe1l { - unsigned char toe1l; - __BITS8 BIT; -}; -union un_iicctl00 { - unsigned char iicctl00; - __BITS8 BIT; -}; -union un_iicctl01 { - unsigned char iicctl01; - __BITS8 BIT; -}; -union un_iicctl10 { - unsigned char iicctl10; - __BITS8 BIT; -}; -union un_iicctl11 { - unsigned char iicctl11; - __BITS8 BIT; -}; -union un_trjioc0 { - unsigned char trjioc0; - __BITS8 BIT; -}; -union un_trjmr0 { - unsigned char trjmr0; - __BITS8 BIT; -}; -union un_trjisr0 { - unsigned char trjisr0; - __BITS8 BIT; -}; -union un_trgmr { - unsigned char trgmr; - __BITS8 BIT; -}; -union un_trgcntc { - unsigned char trgcntc; - __BITS8 BIT; -}; -union un_trgcr { - unsigned char trgcr; - __BITS8 BIT; -}; -union un_trgier { - unsigned char trgier; - __BITS8 BIT; -}; -union un_trgsr { - unsigned char trgsr; - __BITS8 BIT; -}; -union un_trgior { - unsigned char trgior; - __BITS8 BIT; -}; -union un_trdelc { - unsigned char trdelc; - __BITS8 BIT; -}; -union un_trdmr { - unsigned char trdmr; - __BITS8 BIT; -}; -union un_trdpmr { - unsigned char trdpmr; - __BITS8 BIT; -}; -union un_trdfcr { - unsigned char trdfcr; - __BITS8 BIT; -}; -union un_trdoer1 { - unsigned char trdoer1; - __BITS8 BIT; -}; -union un_trdoer2 { - unsigned char trdoer2; - __BITS8 BIT; -}; -union un_trdocr { - unsigned char trdocr; - __BITS8 BIT; -}; -union un_trddf0 { - unsigned char trddf0; - __BITS8 BIT; -}; -union un_trddf1 { - unsigned char trddf1; - __BITS8 BIT; -}; -union un_trdcr0 { - unsigned char trdcr0; - __BITS8 BIT; -}; -union un_trdiora0 { - unsigned char trdiora0; - __BITS8 BIT; -}; -union un_trdiorc0 { - unsigned char trdiorc0; - __BITS8 BIT; -}; -union un_trdsr0 { - unsigned char trdsr0; - __BITS8 BIT; -}; -union un_trdier0 { - unsigned char trdier0; - __BITS8 BIT; -}; -union un_trdpocr0 { - unsigned char trdpocr0; - __BITS8 BIT; -}; -union un_trdcr1 { - unsigned char trdcr1; - __BITS8 BIT; -}; -union un_trdiora1 { - unsigned char trdiora1; - __BITS8 BIT; -}; -union un_trdiorc1 { - unsigned char trdiorc1; - __BITS8 BIT; -}; -union un_trdsr1 { - unsigned char trdsr1; - __BITS8 BIT; -}; -union un_trdier1 { - unsigned char trdier1; - __BITS8 BIT; -}; -union un_trdpocr1 { - unsigned char trdpocr1; - __BITS8 BIT; -}; -union un_dtcen0 { - unsigned char dtcen0; - __BITS8 BIT; -}; -union un_dtcen1 { - unsigned char dtcen1; - __BITS8 BIT; -}; -union un_dtcen2 { - unsigned char dtcen2; - __BITS8 BIT; -}; -union un_dtcen3 { - unsigned char dtcen3; - __BITS8 BIT; -}; -union un_dtcen4 { - unsigned char dtcen4; - __BITS8 BIT; -}; -union un_crc0ctl { - unsigned char crc0ctl; - __BITS8 BIT; -}; -union un_elselr00 { - unsigned char elselr00; - __BITS8 BIT; -}; -union un_elselr01 { - unsigned char elselr01; - __BITS8 BIT; -}; -union un_elselr02 { - unsigned char elselr02; - __BITS8 BIT; -}; -union un_elselr03 { - unsigned char elselr03; - __BITS8 BIT; -}; -union un_elselr04 { - unsigned char elselr04; - __BITS8 BIT; -}; -union un_elselr05 { - unsigned char elselr05; - __BITS8 BIT; -}; -union un_elselr06 { - unsigned char elselr06; - __BITS8 BIT; -}; -union un_elselr07 { - unsigned char elselr07; - __BITS8 BIT; -}; -union un_elselr08 { - unsigned char elselr08; - __BITS8 BIT; -}; -union un_elselr09 { - unsigned char elselr09; - __BITS8 BIT; -}; -union un_elselr10 { - unsigned char elselr10; - __BITS8 BIT; -}; -union un_elselr11 { - unsigned char elselr11; - __BITS8 BIT; -}; -union un_elselr12 { - unsigned char elselr12; - __BITS8 BIT; -}; -union un_elselr13 { - unsigned char elselr13; - __BITS8 BIT; -}; -union un_elselr14 { - unsigned char elselr14; - __BITS8 BIT; -}; -union un_elselr15 { - unsigned char elselr15; - __BITS8 BIT; -}; -union un_elselr16 { - unsigned char elselr16; - __BITS8 BIT; -}; -union un_elselr17 { - unsigned char elselr17; - __BITS8 BIT; -}; -union un_elselr18 { - unsigned char elselr18; - __BITS8 BIT; -}; -union un_elselr19 { - unsigned char elselr19; - __BITS8 BIT; -}; -union un_elselr20 { - unsigned char elselr20; - __BITS8 BIT; -}; -union un_elselr21 { - unsigned char elselr21; - __BITS8 BIT; -}; -union un_elselr22 { - unsigned char elselr22; - __BITS8 BIT; -}; -union un_elselr23 { - unsigned char elselr23; - __BITS8 BIT; -}; -union un_elselr24 { - unsigned char elselr24; - __BITS8 BIT; -}; -union un_elselr25 { - unsigned char elselr25; - __BITS8 BIT; -}; -union un_compmdr { - unsigned char compmdr; - __BITS8 BIT; -}; -union un_compfir { - unsigned char compfir; - __BITS8 BIT; -}; -union un_compocr { - unsigned char compocr; - __BITS8 BIT; -}; -union un_comptcr { - unsigned char comptcr; - __BITS8 BIT; -}; - -#define ADM2 (*(volatile union un_adm2 *)0xF0010).adm2 -#define ADM2_bit (*(volatile union un_adm2 *)0xF0010).BIT -#define ADUL (*(volatile unsigned char *)0xF0011) -#define ADLL (*(volatile unsigned char *)0xF0012) -#define ADTES (*(volatile unsigned char *)0xF0013) -#define PU0 (*(volatile union un_pu0 *)0xF0030).pu0 -#define PU0_bit (*(volatile union un_pu0 *)0xF0030).BIT -#define PU1 (*(volatile union un_pu1 *)0xF0031).pu1 -#define PU1_bit (*(volatile union un_pu1 *)0xF0031).BIT -#define PU3 (*(volatile union un_pu3 *)0xF0033).pu3 -#define PU3_bit (*(volatile union un_pu3 *)0xF0033).BIT -#define PU4 (*(volatile union un_pu4 *)0xF0034).pu4 -#define PU4_bit (*(volatile union un_pu4 *)0xF0034).BIT -#define PU5 (*(volatile union un_pu5 *)0xF0035).pu5 -#define PU5_bit (*(volatile union un_pu5 *)0xF0035).BIT -#define PU6 (*(volatile union un_pu6 *)0xF0036).pu6 -#define PU6_bit (*(volatile union un_pu6 *)0xF0036).BIT -#define PU7 (*(volatile union un_pu7 *)0xF0037).pu7 -#define PU7_bit (*(volatile union un_pu7 *)0xF0037).BIT -#define PU8 (*(volatile union un_pu8 *)0xF0038).pu8 -#define PU8_bit (*(volatile union un_pu8 *)0xF0038).BIT -#define PU10 (*(volatile union un_pu10 *)0xF003A).pu10 -#define PU10_bit (*(volatile union un_pu10 *)0xF003A).BIT -#define PU11 (*(volatile union un_pu11 *)0xF003B).pu11 -#define PU11_bit (*(volatile union un_pu11 *)0xF003B).BIT -#define PU12 (*(volatile union un_pu12 *)0xF003C).pu12 -#define PU12_bit (*(volatile union un_pu12 *)0xF003C).BIT -#define PU14 (*(volatile union un_pu14 *)0xF003E).pu14 -#define PU14_bit (*(volatile union un_pu14 *)0xF003E).BIT -#define PIM0 (*(volatile union un_pim0 *)0xF0040).pim0 -#define PIM0_bit (*(volatile union un_pim0 *)0xF0040).BIT -#define PIM1 (*(volatile union un_pim1 *)0xF0041).pim1 -#define PIM1_bit (*(volatile union un_pim1 *)0xF0041).BIT -#define PIM3 (*(volatile union un_pim3 *)0xF0043).pim3 -#define PIM3_bit (*(volatile union un_pim3 *)0xF0043).BIT -#define PIM4 (*(volatile union un_pim4 *)0xF0044).pim4 -#define PIM4_bit (*(volatile union un_pim4 *)0xF0044).BIT -#define PIM5 (*(volatile union un_pim5 *)0xF0045).pim5 -#define PIM5_bit (*(volatile union un_pim5 *)0xF0045).BIT -#define PIM8 (*(volatile union un_pim8 *)0xF0048).pim8 -#define PIM8_bit (*(volatile union un_pim8 *)0xF0048).BIT -#define PIM14 (*(volatile union un_pim14 *)0xF004E).pim14 -#define PIM14_bit (*(volatile union un_pim14 *)0xF004E).BIT -#define POM0 (*(volatile union un_pom0 *)0xF0050).pom0 -#define POM0_bit (*(volatile union un_pom0 *)0xF0050).BIT -#define POM1 (*(volatile union un_pom1 *)0xF0051).pom1 -#define POM1_bit (*(volatile union un_pom1 *)0xF0051).BIT -#define POM3 (*(volatile union un_pom3 *)0xF0053).pom3 -#define POM3_bit (*(volatile union un_pom3 *)0xF0053).BIT -#define POM4 (*(volatile union un_pom4 *)0xF0054).pom4 -#define POM4_bit (*(volatile union un_pom4 *)0xF0054).BIT -#define POM5 (*(volatile union un_pom5 *)0xF0055).pom5 -#define POM5_bit (*(volatile union un_pom5 *)0xF0055).BIT -#define POM7 (*(volatile union un_pom7 *)0xF0057).pom7 -#define POM7_bit (*(volatile union un_pom7 *)0xF0057).BIT -#define POM8 (*(volatile union un_pom8 *)0xF0058).pom8 -#define POM8_bit (*(volatile union un_pom8 *)0xF0058).BIT -#define POM14 (*(volatile union un_pom14 *)0xF005E).pom14 -#define POM14_bit (*(volatile union un_pom14 *)0xF005E).BIT -#define PMC0 (*(volatile union un_pmc0 *)0xF0060).pmc0 -#define PMC0_bit (*(volatile union un_pmc0 *)0xF0060).BIT -#define PMC1 (*(volatile union un_pmc1 *)0xF0061).pmc1 -#define PMC1_bit (*(volatile union un_pmc1 *)0xF0061).BIT -#define PMC10 (*(volatile union un_pmc10 *)0xF006A).pmc10 -#define PMC10_bit (*(volatile union un_pmc10 *)0xF006A).BIT -#define PMC12 (*(volatile union un_pmc12 *)0xF006C).pmc12 -#define PMC12_bit (*(volatile union un_pmc12 *)0xF006C).BIT -#define PMC14 (*(volatile union un_pmc14 *)0xF006E).pmc14 -#define PMC14_bit (*(volatile union un_pmc14 *)0xF006E).BIT -#define NFEN0 (*(volatile union un_nfen0 *)0xF0070).nfen0 -#define NFEN0_bit (*(volatile union un_nfen0 *)0xF0070).BIT -#define NFEN1 (*(volatile union un_nfen1 *)0xF0071).nfen1 -#define NFEN1_bit (*(volatile union un_nfen1 *)0xF0071).BIT -#define NFEN2 (*(volatile union un_nfen2 *)0xF0072).nfen2 -#define NFEN2_bit (*(volatile union un_nfen2 *)0xF0072).BIT -#define ISC (*(volatile union un_isc *)0xF0073).isc -#define ISC_bit (*(volatile union un_isc *)0xF0073).BIT -#define TIS0 (*(volatile unsigned char *)0xF0074) -#define ADPC (*(volatile unsigned char *)0xF0076) -#define PIOR0 (*(volatile unsigned char *)0xF0077) -#define IAWCTL (*(volatile unsigned char *)0xF0078) -#define PIOR1 (*(volatile unsigned char *)0xF0079) -#define PER1 (*(volatile union un_per1 *)0xF007A).per1 -#define PER1_bit (*(volatile union un_per1 *)0xF007A).BIT -#define PMS (*(volatile union un_pms *)0xF007B).pms -#define PMS_bit (*(volatile union un_pms *)0xF007B).BIT -#define GDIDIS (*(volatile union un_gdidis *)0xF007D).gdidis -#define GDIDIS_bit (*(volatile union un_gdidis *)0xF007D).BIT -#define PRDSEL (*(volatile unsigned short *)0xF007E) -#define TOOLEN (*(volatile unsigned char *)0xF0080) -#define BPAL0 (*(volatile unsigned char *)0xF0081) -#define BPAH0 (*(volatile unsigned char *)0xF0082) -#define BPAS0 (*(volatile unsigned char *)0xF0083) -#define BACDVL0 (*(volatile unsigned char *)0xF0084) -#define BACDVH0 (*(volatile unsigned char *)0xF0085) -#define BACDML0 (*(volatile unsigned char *)0xF0086) -#define BACDMH0 (*(volatile unsigned char *)0xF0087) -#define MONMOD (*(volatile unsigned char *)0xF0088) -#define BPAL1 (*(volatile unsigned char *)0xF0089) -#define BPAH1 (*(volatile unsigned char *)0xF008A) -#define BPAS1 (*(volatile unsigned char *)0xF008B) -#define BACDVL1 (*(volatile unsigned char *)0xF008C) -#define BACDVH1 (*(volatile unsigned char *)0xF008D) -#define BACDML1 (*(volatile unsigned char *)0xF008E) -#define BACDMH1 (*(volatile unsigned char *)0xF008F) -#define DFLCTL (*(volatile union un_dflctl *)0xF0090).dflctl -#define DFLCTL_bit (*(volatile union un_dflctl *)0xF0090).BIT -#define HIOTRM (*(volatile unsigned char *)0xF00A0) -#define BECTL (*(volatile union un_bectl *)0xF00A1).bectl -#define BECTL_bit (*(volatile union un_bectl *)0xF00A1).BIT -#define HOCODIV (*(volatile unsigned char *)0xF00A8) -#define TEMPCAL0 (*(volatile unsigned char *)0xF00AC) -#define TEMPCAL1 (*(volatile unsigned char *)0xF00AD) -#define TEMPCAL2 (*(volatile unsigned char *)0xF00AE) -#define TEMPCAL3 (*(volatile unsigned char *)0xF00AF) -#define FLSEC (*(volatile unsigned short *)0xF00B0) -#define FLFSWS (*(volatile unsigned short *)0xF00B2) -#define FLFSWE (*(volatile unsigned short *)0xF00B4) -#define FSSET (*(volatile unsigned char *)0xF00B6) -#define FSSE (*(volatile union un_fsse *)0xF00B7).fsse -#define FSSE_bit (*(volatile union un_fsse *)0xF00B7).BIT -#define FLFADL (*(volatile unsigned short *)0xF00B8) -#define FLFADH (*(volatile unsigned char *)0xF00BA) -#define PFCMD (*(volatile unsigned char *)0xF00C0) -#define PFS (*(volatile union un_pfs *)0xF00C1).pfs -#define PFS_bit (*(volatile union un_pfs *)0xF00C1).BIT -#define FLRL (*(volatile unsigned short *)0xF00C2) -#define FLRH (*(volatile unsigned short *)0xF00C4) -#define FLWE (*(volatile unsigned char *)0xF00C6) -#define FLRE (*(volatile unsigned char *)0xF00C7) -#define FLTMS (*(volatile unsigned short *)0xF00C8) -#define DFLMC (*(volatile unsigned short *)0xF00CA) -#define FLMCL (*(volatile unsigned short *)0xF00CC) -#define FLMCH (*(volatile unsigned char *)0xF00CE) -#define FSCTL (*(volatile unsigned char *)0xF00CF) -#define ICEADR (*(volatile unsigned short *)0xF00D0) -#define ICEDAT (*(volatile unsigned short *)0xF00D2) -#define PER0 (*(volatile union un_per0 *)0xF00F0).per0 -#define PER0_bit (*(volatile union un_per0 *)0xF00F0).BIT -#define OSMC (*(volatile unsigned char *)0xF00F3) -#define RMC (*(volatile union un_rmc *)0xF00F4).rmc -#define RMC_bit (*(volatile union un_rmc *)0xF00F4).BIT -#define RPECTL (*(volatile union un_rpectl *)0xF00F5).rpectl -#define RPECTL_bit (*(volatile union un_rpectl *)0xF00F5).BIT -#define BCDADJ (*(volatile unsigned char *)0xF00FE) -#define VECTCTRL (*(volatile unsigned char *)0xF00FF) -#define SSR00 (*(volatile unsigned short *)0xF0100) -#define SSR00L (*(volatile unsigned char *)0xF0100) -#define SSR01 (*(volatile unsigned short *)0xF0102) -#define SSR01L (*(volatile unsigned char *)0xF0102) -#define SSR02 (*(volatile unsigned short *)0xF0104) -#define SSR02L (*(volatile unsigned char *)0xF0104) -#define SSR03 (*(volatile unsigned short *)0xF0106) -#define SSR03L (*(volatile unsigned char *)0xF0106) -#define SIR00 (*(volatile unsigned short *)0xF0108) -#define SIR00L (*(volatile unsigned char *)0xF0108) -#define SIR01 (*(volatile unsigned short *)0xF010A) -#define SIR01L (*(volatile unsigned char *)0xF010A) -#define SIR02 (*(volatile unsigned short *)0xF010C) -#define SIR02L (*(volatile unsigned char *)0xF010C) -#define SIR03 (*(volatile unsigned short *)0xF010E) -#define SIR03L (*(volatile unsigned char *)0xF010E) -#define SMR00 (*(volatile unsigned short *)0xF0110) -#define SMR01 (*(volatile unsigned short *)0xF0112) -#define SMR02 (*(volatile unsigned short *)0xF0114) -#define SMR03 (*(volatile unsigned short *)0xF0116) -#define SCR00 (*(volatile unsigned short *)0xF0118) -#define SCR01 (*(volatile unsigned short *)0xF011A) -#define SCR02 (*(volatile unsigned short *)0xF011C) -#define SCR03 (*(volatile unsigned short *)0xF011E) -#define SE0 (*(volatile unsigned short *)0xF0120) -#define SE0L (*(volatile union un_se0l *)0xF0120).se0l -#define SE0L_bit (*(volatile union un_se0l *)0xF0120).BIT -#define SS0 (*(volatile unsigned short *)0xF0122) -#define SS0L (*(volatile union un_ss0l *)0xF0122).ss0l -#define SS0L_bit (*(volatile union un_ss0l *)0xF0122).BIT -#define ST0 (*(volatile unsigned short *)0xF0124) -#define ST0L (*(volatile union un_st0l *)0xF0124).st0l -#define ST0L_bit (*(volatile union un_st0l *)0xF0124).BIT -#define SPS0 (*(volatile unsigned short *)0xF0126) -#define SPS0L (*(volatile unsigned char *)0xF0126) -#define SO0 (*(volatile unsigned short *)0xF0128) -#define SOE0 (*(volatile unsigned short *)0xF012A) -#define SOE0L (*(volatile union un_soe0l *)0xF012A).soe0l -#define SOE0L_bit (*(volatile union un_soe0l *)0xF012A).BIT -#define EDR00 (*(volatile unsigned short *)0xF012C) -#define EDR00L (*(volatile unsigned char *)0xF012C) -#define EDR01 (*(volatile unsigned short *)0xF012E) -#define EDR01L (*(volatile unsigned char *)0xF012E) -#define EDR02 (*(volatile unsigned short *)0xF0130) -#define EDR02L (*(volatile unsigned char *)0xF0130) -#define EDR03 (*(volatile unsigned short *)0xF0132) -#define EDR03L (*(volatile unsigned char *)0xF0132) -#define SOL0 (*(volatile unsigned short *)0xF0134) -#define SOL0L (*(volatile unsigned char *)0xF0134) -#define SSC0 (*(volatile unsigned short *)0xF0138) -#define SSC0L (*(volatile unsigned char *)0xF0138) -#define SSR10 (*(volatile unsigned short *)0xF0140) -#define SSR10L (*(volatile unsigned char *)0xF0140) -#define SSR11 (*(volatile unsigned short *)0xF0142) -#define SSR11L (*(volatile unsigned char *)0xF0142) -#define SSR12 (*(volatile unsigned short *)0xF0144) -#define SSR12L (*(volatile unsigned char *)0xF0144) -#define SSR13 (*(volatile unsigned short *)0xF0146) -#define SSR13L (*(volatile unsigned char *)0xF0146) -#define SIR10 (*(volatile unsigned short *)0xF0148) -#define SIR10L (*(volatile unsigned char *)0xF0148) -#define SIR11 (*(volatile unsigned short *)0xF014A) -#define SIR11L (*(volatile unsigned char *)0xF014A) -#define SIR12 (*(volatile unsigned short *)0xF014C) -#define SIR12L (*(volatile unsigned char *)0xF014C) -#define SIR13 (*(volatile unsigned short *)0xF014E) -#define SIR13L (*(volatile unsigned char *)0xF014E) -#define SMR10 (*(volatile unsigned short *)0xF0150) -#define SMR11 (*(volatile unsigned short *)0xF0152) -#define SMR12 (*(volatile unsigned short *)0xF0154) -#define SMR13 (*(volatile unsigned short *)0xF0156) -#define SCR10 (*(volatile unsigned short *)0xF0158) -#define SCR11 (*(volatile unsigned short *)0xF015A) -#define SCR12 (*(volatile unsigned short *)0xF015C) -#define SCR13 (*(volatile unsigned short *)0xF015E) -#define SE1 (*(volatile unsigned short *)0xF0160) -#define SE1L (*(volatile union un_se1l *)0xF0160).se1l -#define SE1L_bit (*(volatile union un_se1l *)0xF0160).BIT -#define SS1 (*(volatile unsigned short *)0xF0162) -#define SS1L (*(volatile union un_ss1l *)0xF0162).ss1l -#define SS1L_bit (*(volatile union un_ss1l *)0xF0162).BIT -#define ST1 (*(volatile unsigned short *)0xF0164) -#define ST1L (*(volatile union un_st1l *)0xF0164).st1l -#define ST1L_bit (*(volatile union un_st1l *)0xF0164).BIT -#define SPS1 (*(volatile unsigned short *)0xF0166) -#define SPS1L (*(volatile unsigned char *)0xF0166) -#define SO1 (*(volatile unsigned short *)0xF0168) -#define SOE1 (*(volatile unsigned short *)0xF016A) -#define SOE1L (*(volatile union un_soe1l *)0xF016A).soe1l -#define SOE1L_bit (*(volatile union un_soe1l *)0xF016A).BIT -#define EDR10 (*(volatile unsigned short *)0xF016C) -#define EDR10L (*(volatile unsigned char *)0xF016C) -#define EDR11 (*(volatile unsigned short *)0xF016E) -#define EDR11L (*(volatile unsigned char *)0xF016E) -#define EDR12 (*(volatile unsigned short *)0xF0170) -#define EDR12L (*(volatile unsigned char *)0xF0170) -#define EDR13 (*(volatile unsigned short *)0xF0172) -#define EDR13L (*(volatile unsigned char *)0xF0172) -#define SOL1 (*(volatile unsigned short *)0xF0174) -#define SOL1L (*(volatile unsigned char *)0xF0174) -#define SSC1 (*(volatile unsigned short *)0xF0178) -#define SSC1L (*(volatile unsigned char *)0xF0178) -#define TCR00 (*(volatile unsigned short *)0xF0180) -#define TCR01 (*(volatile unsigned short *)0xF0182) -#define TCR02 (*(volatile unsigned short *)0xF0184) -#define TCR03 (*(volatile unsigned short *)0xF0186) -#define TMR00 (*(volatile unsigned short *)0xF0190) -#define TMR01 (*(volatile unsigned short *)0xF0192) -#define TMR02 (*(volatile unsigned short *)0xF0194) -#define TMR03 (*(volatile unsigned short *)0xF0196) -#define TSR00 (*(volatile unsigned short *)0xF01A0) -#define TSR00L (*(volatile unsigned char *)0xF01A0) -#define TSR01 (*(volatile unsigned short *)0xF01A2) -#define TSR01L (*(volatile unsigned char *)0xF01A2) -#define TSR02 (*(volatile unsigned short *)0xF01A4) -#define TSR02L (*(volatile unsigned char *)0xF01A4) -#define TSR03 (*(volatile unsigned short *)0xF01A6) -#define TSR03L (*(volatile unsigned char *)0xF01A6) -#define TE0 (*(volatile unsigned short *)0xF01B0) -#define TE0L (*(volatile union un_te0l *)0xF01B0).te0l -#define TE0L_bit (*(volatile union un_te0l *)0xF01B0).BIT -#define TS0 (*(volatile unsigned short *)0xF01B2) -#define TS0L (*(volatile union un_ts0l *)0xF01B2).ts0l -#define TS0L_bit (*(volatile union un_ts0l *)0xF01B2).BIT -#define TT0 (*(volatile unsigned short *)0xF01B4) -#define TT0L (*(volatile union un_tt0l *)0xF01B4).tt0l -#define TT0L_bit (*(volatile union un_tt0l *)0xF01B4).BIT -#define TPS0 (*(volatile unsigned short *)0xF01B6) -#define TO0 (*(volatile unsigned short *)0xF01B8) -#define TO0L (*(volatile unsigned char *)0xF01B8) -#define TOE0 (*(volatile unsigned short *)0xF01BA) -#define TOE0L (*(volatile union un_toe0l *)0xF01BA).toe0l -#define TOE0L_bit (*(volatile union un_toe0l *)0xF01BA).BIT -#define TOL0 (*(volatile unsigned short *)0xF01BC) -#define TOL0L (*(volatile unsigned char *)0xF01BC) -#define TOM0 (*(volatile unsigned short *)0xF01BE) -#define TOM0L (*(volatile unsigned char *)0xF01BE) -#define TCR10 (*(volatile unsigned short *)0xF01C0) -#define TCR11 (*(volatile unsigned short *)0xF01C2) -#define TCR12 (*(volatile unsigned short *)0xF01C4) -#define TCR13 (*(volatile unsigned short *)0xF01C6) -#define TMR10 (*(volatile unsigned short *)0xF01D0) -#define TMR11 (*(volatile unsigned short *)0xF01D2) -#define TMR12 (*(volatile unsigned short *)0xF01D4) -#define TMR13 (*(volatile unsigned short *)0xF01D6) -#define TSR10 (*(volatile unsigned short *)0xF01E0) -#define TSR10L (*(volatile unsigned char *)0xF01E0) -#define TSR11 (*(volatile unsigned short *)0xF01E2) -#define TSR11L (*(volatile unsigned char *)0xF01E2) -#define TSR12 (*(volatile unsigned short *)0xF01E4) -#define TSR12L (*(volatile unsigned char *)0xF01E4) -#define TSR13 (*(volatile unsigned short *)0xF01E6) -#define TSR13L (*(volatile unsigned char *)0xF01E6) -#define TE1 (*(volatile unsigned short *)0xF01F0) -#define TE1L (*(volatile union un_te1l *)0xF01F0).te1l -#define TE1L_bit (*(volatile union un_te1l *)0xF01F0).BIT -#define TS1 (*(volatile unsigned short *)0xF01F2) -#define TS1L (*(volatile union un_ts1l *)0xF01F2).ts1l -#define TS1L_bit (*(volatile union un_ts1l *)0xF01F2).BIT -#define TT1 (*(volatile unsigned short *)0xF01F4) -#define TT1L (*(volatile union un_tt1l *)0xF01F4).tt1l -#define TT1L_bit (*(volatile union un_tt1l *)0xF01F4).BIT -#define TPS1 (*(volatile unsigned short *)0xF01F6) -#define TO1 (*(volatile unsigned short *)0xF01F8) -#define TO1L (*(volatile unsigned char *)0xF01F8) -#define TOE1 (*(volatile unsigned short *)0xF01FA) -#define TOE1L (*(volatile union un_toe1l *)0xF01FA).toe1l -#define TOE1L_bit (*(volatile union un_toe1l *)0xF01FA).BIT -#define TOL1 (*(volatile unsigned short *)0xF01FC) -#define TOL1L (*(volatile unsigned char *)0xF01FC) -#define TOM1 (*(volatile unsigned short *)0xF01FE) -#define TOM1L (*(volatile unsigned char *)0xF01FE) -#define IICCTL00 (*(volatile union un_iicctl00 *)0xF0230).iicctl00 -#define IICCTL00_bit (*(volatile union un_iicctl00 *)0xF0230).BIT -#define IICCTL01 (*(volatile union un_iicctl01 *)0xF0231).iicctl01 -#define IICCTL01_bit (*(volatile union un_iicctl01 *)0xF0231).BIT -#define IICWL0 (*(volatile unsigned char *)0xF0232) -#define IICWH0 (*(volatile unsigned char *)0xF0233) -#define SVA0 (*(volatile unsigned char *)0xF0234) -#define IICSE0 (*(volatile unsigned char *)0xF0235) -#define IICCTL10 (*(volatile union un_iicctl10 *)0xF0238).iicctl10 -#define IICCTL10_bit (*(volatile union un_iicctl10 *)0xF0238).BIT -#define IICCTL11 (*(volatile union un_iicctl11 *)0xF0239).iicctl11 -#define IICCTL11_bit (*(volatile union un_iicctl11 *)0xF0239).BIT -#define IICWL1 (*(volatile unsigned char *)0xF023A) -#define IICWH1 (*(volatile unsigned char *)0xF023B) -#define SVA1 (*(volatile unsigned char *)0xF023C) -#define IICSE1 (*(volatile unsigned char *)0xF023D) -#define TRJCR0 (*(volatile unsigned char *)0xF0240) -#define TRJIOC0 (*(volatile union un_trjioc0 *)0xF0241).trjioc0 -#define TRJIOC0_bit (*(volatile union un_trjioc0 *)0xF0241).BIT -#define TRJMR0 (*(volatile union un_trjmr0 *)0xF0242).trjmr0 -#define TRJMR0_bit (*(volatile union un_trjmr0 *)0xF0242).BIT -#define TRJISR0 (*(volatile union un_trjisr0 *)0xF0243).trjisr0 -#define TRJISR0_bit (*(volatile union un_trjisr0 *)0xF0243).BIT -#define TRGMR (*(volatile union un_trgmr *)0xF0250).trgmr -#define TRGMR_bit (*(volatile union un_trgmr *)0xF0250).BIT -#define TRGCNTC (*(volatile union un_trgcntc *)0xF0251).trgcntc -#define TRGCNTC_bit (*(volatile union un_trgcntc *)0xF0251).BIT -#define TRGCR (*(volatile union un_trgcr *)0xF0252).trgcr -#define TRGCR_bit (*(volatile union un_trgcr *)0xF0252).BIT -#define TRGIER (*(volatile union un_trgier *)0xF0253).trgier -#define TRGIER_bit (*(volatile union un_trgier *)0xF0253).BIT -#define TRGSR (*(volatile union un_trgsr *)0xF0254).trgsr -#define TRGSR_bit (*(volatile union un_trgsr *)0xF0254).BIT -#define TRGIOR (*(volatile union un_trgior *)0xF0255).trgior -#define TRGIOR_bit (*(volatile union un_trgior *)0xF0255).BIT -#define TRG (*(volatile unsigned short *)0xF0256) -#define TRGGRA (*(volatile unsigned short *)0xF0258) -#define TRGGRB (*(volatile unsigned short *)0xF025A) -#define TRGGRCM (*(volatile unsigned short *)0xF025C) -#define TRGGRDM (*(volatile unsigned short *)0xF025E) -#define TRDELC (*(volatile union un_trdelc *)0xF0260).trdelc -#define TRDELC_bit (*(volatile union un_trdelc *)0xF0260).BIT -#define TRDSTR (*(volatile unsigned char *)0xF0263) -#define TRDMR (*(volatile union un_trdmr *)0xF0264).trdmr -#define TRDMR_bit (*(volatile union un_trdmr *)0xF0264).BIT -#define TRDPMR (*(volatile union un_trdpmr *)0xF0265).trdpmr -#define TRDPMR_bit (*(volatile union un_trdpmr *)0xF0265).BIT -#define TRDFCR (*(volatile union un_trdfcr *)0xF0266).trdfcr -#define TRDFCR_bit (*(volatile union un_trdfcr *)0xF0266).BIT -#define TRDOER1 (*(volatile union un_trdoer1 *)0xF0267).trdoer1 -#define TRDOER1_bit (*(volatile union un_trdoer1 *)0xF0267).BIT -#define TRDOER2 (*(volatile union un_trdoer2 *)0xF0268).trdoer2 -#define TRDOER2_bit (*(volatile union un_trdoer2 *)0xF0268).BIT -#define TRDOCR (*(volatile union un_trdocr *)0xF0269).trdocr -#define TRDOCR_bit (*(volatile union un_trdocr *)0xF0269).BIT -#define TRDDF0 (*(volatile union un_trddf0 *)0xF026A).trddf0 -#define TRDDF0_bit (*(volatile union un_trddf0 *)0xF026A).BIT -#define TRDDF1 (*(volatile union un_trddf1 *)0xF026B).trddf1 -#define TRDDF1_bit (*(volatile union un_trddf1 *)0xF026B).BIT -#define TRDCR0 (*(volatile union un_trdcr0 *)0xF0270).trdcr0 -#define TRDCR0_bit (*(volatile union un_trdcr0 *)0xF0270).BIT -#define TRDIORA0 (*(volatile union un_trdiora0 *)0xF0271).trdiora0 -#define TRDIORA0_bit (*(volatile union un_trdiora0 *)0xF0271).BIT -#define TRDIORC0 (*(volatile union un_trdiorc0 *)0xF0272).trdiorc0 -#define TRDIORC0_bit (*(volatile union un_trdiorc0 *)0xF0272).BIT -#define TRDSR0 (*(volatile union un_trdsr0 *)0xF0273).trdsr0 -#define TRDSR0_bit (*(volatile union un_trdsr0 *)0xF0273).BIT -#define TRDIER0 (*(volatile union un_trdier0 *)0xF0274).trdier0 -#define TRDIER0_bit (*(volatile union un_trdier0 *)0xF0274).BIT -#define TRDPOCR0 (*(volatile union un_trdpocr0 *)0xF0275).trdpocr0 -#define TRDPOCR0_bit (*(volatile union un_trdpocr0 *)0xF0275).BIT -#define TRD0 (*(volatile unsigned short *)0xF0276) -#define TRDGRA0 (*(volatile unsigned short *)0xF0278) -#define TRDGRB0 (*(volatile unsigned short *)0xF027A) -#define TRDGRC0M (*(volatile unsigned short *)0xF027C) -#define TRDGRD0M (*(volatile unsigned short *)0xF027E) -#define TRDCR1 (*(volatile union un_trdcr1 *)0xF0280).trdcr1 -#define TRDCR1_bit (*(volatile union un_trdcr1 *)0xF0280).BIT -#define TRDIORA1 (*(volatile union un_trdiora1 *)0xF0281).trdiora1 -#define TRDIORA1_bit (*(volatile union un_trdiora1 *)0xF0281).BIT -#define TRDIORC1 (*(volatile union un_trdiorc1 *)0xF0282).trdiorc1 -#define TRDIORC1_bit (*(volatile union un_trdiorc1 *)0xF0282).BIT -#define TRDSR1 (*(volatile union un_trdsr1 *)0xF0283).trdsr1 -#define TRDSR1_bit (*(volatile union un_trdsr1 *)0xF0283).BIT -#define TRDIER1 (*(volatile union un_trdier1 *)0xF0284).trdier1 -#define TRDIER1_bit (*(volatile union un_trdier1 *)0xF0284).BIT -#define TRDPOCR1 (*(volatile union un_trdpocr1 *)0xF0285).trdpocr1 -#define TRDPOCR1_bit (*(volatile union un_trdpocr1 *)0xF0285).BIT -#define TRD1 (*(volatile unsigned short *)0xF0286) -#define TRDGRA1 (*(volatile unsigned short *)0xF0288) -#define TRDGRB1 (*(volatile unsigned short *)0xF028A) -#define TRDGRC1M (*(volatile unsigned short *)0xF028C) -#define TRDGRD1M (*(volatile unsigned short *)0xF028E) -#define DTCBAR (*(volatile unsigned char *)0xF02E0) -#define DTCEN0 (*(volatile union un_dtcen0 *)0xF02E8).dtcen0 -#define DTCEN0_bit (*(volatile union un_dtcen0 *)0xF02E8).BIT -#define DTCEN1 (*(volatile union un_dtcen1 *)0xF02E9).dtcen1 -#define DTCEN1_bit (*(volatile union un_dtcen1 *)0xF02E9).BIT -#define DTCEN2 (*(volatile union un_dtcen2 *)0xF02EA).dtcen2 -#define DTCEN2_bit (*(volatile union un_dtcen2 *)0xF02EA).BIT -#define DTCEN3 (*(volatile union un_dtcen3 *)0xF02EB).dtcen3 -#define DTCEN3_bit (*(volatile union un_dtcen3 *)0xF02EB).BIT -#define DTCEN4 (*(volatile union un_dtcen4 *)0xF02EC).dtcen4 -#define DTCEN4_bit (*(volatile union un_dtcen4 *)0xF02EC).BIT -#define CRC0CTL (*(volatile union un_crc0ctl *)0xF02F0).crc0ctl -#define CRC0CTL_bit (*(volatile union un_crc0ctl *)0xF02F0).BIT -#define PGCRCL (*(volatile unsigned short *)0xF02F2) -#define CRCD (*(volatile unsigned short *)0xF02FA) -#define ELSELR00 (*(volatile union un_elselr00 *)0xF0300).elselr00 -#define ELSELR00_bit (*(volatile union un_elselr00 *)0xF0300).BIT -#define ELSELR01 (*(volatile union un_elselr01 *)0xF0301).elselr01 -#define ELSELR01_bit (*(volatile union un_elselr01 *)0xF0301).BIT -#define ELSELR02 (*(volatile union un_elselr02 *)0xF0302).elselr02 -#define ELSELR02_bit (*(volatile union un_elselr02 *)0xF0302).BIT -#define ELSELR03 (*(volatile union un_elselr03 *)0xF0303).elselr03 -#define ELSELR03_bit (*(volatile union un_elselr03 *)0xF0303).BIT -#define ELSELR04 (*(volatile union un_elselr04 *)0xF0304).elselr04 -#define ELSELR04_bit (*(volatile union un_elselr04 *)0xF0304).BIT -#define ELSELR05 (*(volatile union un_elselr05 *)0xF0305).elselr05 -#define ELSELR05_bit (*(volatile union un_elselr05 *)0xF0305).BIT -#define ELSELR06 (*(volatile union un_elselr06 *)0xF0306).elselr06 -#define ELSELR06_bit (*(volatile union un_elselr06 *)0xF0306).BIT -#define ELSELR07 (*(volatile union un_elselr07 *)0xF0307).elselr07 -#define ELSELR07_bit (*(volatile union un_elselr07 *)0xF0307).BIT -#define ELSELR08 (*(volatile union un_elselr08 *)0xF0308).elselr08 -#define ELSELR08_bit (*(volatile union un_elselr08 *)0xF0308).BIT -#define ELSELR09 (*(volatile union un_elselr09 *)0xF0309).elselr09 -#define ELSELR09_bit (*(volatile union un_elselr09 *)0xF0309).BIT -#define ELSELR10 (*(volatile union un_elselr10 *)0xF030A).elselr10 -#define ELSELR10_bit (*(volatile union un_elselr10 *)0xF030A).BIT -#define ELSELR11 (*(volatile union un_elselr11 *)0xF030B).elselr11 -#define ELSELR11_bit (*(volatile union un_elselr11 *)0xF030B).BIT -#define ELSELR12 (*(volatile union un_elselr12 *)0xF030C).elselr12 -#define ELSELR12_bit (*(volatile union un_elselr12 *)0xF030C).BIT -#define ELSELR13 (*(volatile union un_elselr13 *)0xF030D).elselr13 -#define ELSELR13_bit (*(volatile union un_elselr13 *)0xF030D).BIT -#define ELSELR14 (*(volatile union un_elselr14 *)0xF030E).elselr14 -#define ELSELR14_bit (*(volatile union un_elselr14 *)0xF030E).BIT -#define ELSELR15 (*(volatile union un_elselr15 *)0xF030F).elselr15 -#define ELSELR15_bit (*(volatile union un_elselr15 *)0xF030F).BIT -#define ELSELR16 (*(volatile union un_elselr16 *)0xF0310).elselr16 -#define ELSELR16_bit (*(volatile union un_elselr16 *)0xF0310).BIT -#define ELSELR17 (*(volatile union un_elselr17 *)0xF0311).elselr17 -#define ELSELR17_bit (*(volatile union un_elselr17 *)0xF0311).BIT -#define ELSELR18 (*(volatile union un_elselr18 *)0xF0312).elselr18 -#define ELSELR18_bit (*(volatile union un_elselr18 *)0xF0312).BIT -#define ELSELR19 (*(volatile union un_elselr19 *)0xF0313).elselr19 -#define ELSELR19_bit (*(volatile union un_elselr19 *)0xF0313).BIT -#define ELSELR20 (*(volatile union un_elselr20 *)0xF0314).elselr20 -#define ELSELR20_bit (*(volatile union un_elselr20 *)0xF0314).BIT -#define ELSELR21 (*(volatile union un_elselr21 *)0xF0315).elselr21 -#define ELSELR21_bit (*(volatile union un_elselr21 *)0xF0315).BIT -#define ELSELR22 (*(volatile union un_elselr22 *)0xF0316).elselr22 -#define ELSELR22_bit (*(volatile union un_elselr22 *)0xF0316).BIT -#define ELSELR23 (*(volatile union un_elselr23 *)0xF0317).elselr23 -#define ELSELR23_bit (*(volatile union un_elselr23 *)0xF0317).BIT -#define ELSELR24 (*(volatile union un_elselr24 *)0xF0318).elselr24 -#define ELSELR24_bit (*(volatile union un_elselr24 *)0xF0318).BIT -#define ELSELR25 (*(volatile union un_elselr25 *)0xF0319).elselr25 -#define ELSELR25_bit (*(volatile union un_elselr25 *)0xF0319).BIT -#define COMPMDR (*(volatile union un_compmdr *)0xF0340).compmdr -#define COMPMDR_bit (*(volatile union un_compmdr *)0xF0340).BIT -#define COMPFIR (*(volatile union un_compfir *)0xF0341).compfir -#define COMPFIR_bit (*(volatile union un_compfir *)0xF0341).BIT -#define COMPOCR (*(volatile union un_compocr *)0xF0342).compocr -#define COMPOCR_bit (*(volatile union un_compocr *)0xF0342).BIT -#define COMPTCR (*(volatile union un_comptcr *)0xF0343).comptcr -#define COMPTCR_bit (*(volatile union un_comptcr *)0xF0343).BIT -#define TRJ0 (*(volatile unsigned short *)0xF0500) -#define MONMOD1 (*(volatile unsigned char *)0xF0720) -#define TRCMA (*(volatile unsigned char *)0xF0721) - -/* - Sfr bits - */ -#define ADTYP ADM2_bit.no0 -#define AWC ADM2_bit.no2 -#define ADRCK ADM2_bit.no3 -#define SSIE00 ISC_bit.no7 -#define TRJ0EN PER1_bit.no0 -#define DTCEN PER1_bit.no3 -#define TRD0EN PER1_bit.no4 -#define CMPEN PER1_bit.no5 -#define TRGEN PER1_bit.no6 -#define DACEN PER1_bit.no7 -#define DFLEN DFLCTL_bit.no0 -#define BRSAM BECTL_bit.no0 -#define ESQST FSSE_bit.no7 -#define TAU0EN PER0_bit.no0 -#define TAU1EN PER0_bit.no1 -#define SAU0EN PER0_bit.no2 -#define SAU1EN PER0_bit.no3 -#define IICA0EN PER0_bit.no4 -#define ADCEN PER0_bit.no5 -#define IICA1EN PER0_bit.no6 -#define RTCEN PER0_bit.no7 -#define PAENB RMC_bit.no0 -#define WDVOL RMC_bit.no7 -#define RPEF RPECTL_bit.no0 -#define RPERDIS RPECTL_bit.no7 -#define SPT0 IICCTL00_bit.no0 -#define STT0 IICCTL00_bit.no1 -#define ACKE0 IICCTL00_bit.no2 -#define WTIM0 IICCTL00_bit.no3 -#define SPIE0 IICCTL00_bit.no4 -#define WREL0 IICCTL00_bit.no5 -#define LREL0 IICCTL00_bit.no6 -#define IICE0 IICCTL00_bit.no7 -#define PRS0 IICCTL01_bit.no0 -#define DFC0 IICCTL01_bit.no2 -#define SMC0 IICCTL01_bit.no3 -#define DAD0 IICCTL01_bit.no4 -#define CLD0 IICCTL01_bit.no5 -#define WUP0 IICCTL01_bit.no7 -#define SPT1 IICCTL10_bit.no0 -#define STT1 IICCTL10_bit.no1 -#define ACKE1 IICCTL10_bit.no2 -#define WTIM1 IICCTL10_bit.no3 -#define SPIE1 IICCTL10_bit.no4 -#define WREL1 IICCTL10_bit.no5 -#define LREL1 IICCTL10_bit.no6 -#define IICE1 IICCTL10_bit.no7 -#define PRS1 IICCTL11_bit.no0 -#define DFC1 IICCTL11_bit.no2 -#define SMC1 IICCTL11_bit.no3 -#define DAD1 IICCTL11_bit.no4 -#define CLD1 IICCTL11_bit.no5 -#define WUP1 IICCTL11_bit.no7 -#define TRGPWM TRGMR_bit.no0 -#define TRGMDF TRGMR_bit.no1 -#define TRGDFA TRGMR_bit.no2 -#define TRGDFB TRGMR_bit.no3 -#define TRGDFCK0 TRGMR_bit.no4 -#define TRGDFCK1 TRGMR_bit.no5 -#define TRGELCICE TRGMR_bit.no6 -#define TRGSTART TRGMR_bit.no7 -#define TRGTCK0 TRGCR_bit.no0 -#define TRGTCK1 TRGCR_bit.no1 -#define TRGTCK2 TRGCR_bit.no2 -#define TRGCKEG0 TRGCR_bit.no3 -#define TRGCKEG1 TRGCR_bit.no4 -#define TRGCCLR0 TRGCR_bit.no5 -#define TRGCCLR1 TRGCR_bit.no6 -#define TRGIMIEA TRGIER_bit.no0 -#define TRGIMIEB TRGIER_bit.no1 -#define TRGUDIE TRGIER_bit.no2 -#define TRGOVIE TRGIER_bit.no3 -#define TRGIMFA TRGSR_bit.no0 -#define TRGIMFB TRGSR_bit.no1 -#define TRGUDF TRGSR_bit.no2 -#define TRGOVF TRGSR_bit.no3 -#define TRGDIRF TRGSR_bit.no4 -#define TRGIOA0 TRGIOR_bit.no0 -#define TRGIOA1 TRGIOR_bit.no1 -#define TRGIOA2 TRGIOR_bit.no2 -#define TRGBUFA TRGIOR_bit.no3 -#define TRGIOB0 TRGIOR_bit.no4 -#define TRGIOB1 TRGIOR_bit.no5 -#define TRGIOB2 TRGIOR_bit.no6 -#define TRGBUFB TRGIOR_bit.no7 -#define TRDSYNC TRDMR_bit.no0 -#define TRDBFC0 TRDMR_bit.no4 -#define TRDBFD0 TRDMR_bit.no5 -#define TRDBFC1 TRDMR_bit.no6 -#define TRDBFD1 TRDMR_bit.no7 -#define TRDPWMB0 TRDPMR_bit.no0 -#define TRDPWMC0 TRDPMR_bit.no1 -#define TRDPWMD0 TRDPMR_bit.no2 -#define TRDPWMB1 TRDPMR_bit.no4 -#define TRDPWMC1 TRDPMR_bit.no5 -#define TRDPWMD1 TRDPMR_bit.no6 -#define TRDSHUTS TRDOER2_bit.no0 -#define TRDPTO TRDOER2_bit.no7 -#define CRC0EN CRC0CTL_bit.no7 -#define C0ENB COMPMDR_bit.no0 -#define C0MON COMPMDR_bit.no3 -#define C1ENB COMPMDR_bit.no4 -#define C1MON COMPMDR_bit.no7 -#define C0IE COMPOCR_bit.no0 -#define C0OE COMPOCR_bit.no1 -#define C0OP COMPOCR_bit.no2 -#define C1IE COMPOCR_bit.no4 -#define C1OE COMPOCR_bit.no5 -#define C1OP COMPOCR_bit.no6 -#define SPDMD COMPOCR_bit.no7 -#define TSTMD COMPTCR_bit.no0 -#define TMDWE COMPTCR_bit.no7 - -/* - Interrupt vector addresses - */ -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A.h deleted file mode 100644 index 341081ea3..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A.h +++ /dev/null @@ -1,1037 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78G1A */ -/* FILE : iodefine.h */ -/* DESCRIPTION : Definition of I/O Registers */ -/* CPU SERIES : RL78 - G1A */ -/* CPU TYPE : R5F10ELE */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F10ELE.DVF */ -/* Copyright(C) 2012 Renesas */ -/* File Version V1.00 */ -/* Tool Version 1.9.7121 */ -/* Date Generated 13/11/2012 */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_H -#define IODEFINE_H - -/* - IO Registers - */ -union un_p0 { - unsigned char p0; - __BITS8 BIT; -}; -union un_p1 { - unsigned char p1; - __BITS8 BIT; -}; -union un_p2 { - unsigned char p2; - __BITS8 BIT; -}; -union un_p3 { - unsigned char p3; - __BITS8 BIT; -}; -union un_p4 { - unsigned char p4; - __BITS8 BIT; -}; -union un_p5 { - unsigned char p5; - __BITS8 BIT; -}; -union un_p6 { - unsigned char p6; - __BITS8 BIT; -}; -union un_p7 { - unsigned char p7; - __BITS8 BIT; -}; -union un_p12 { - unsigned char p12; - __BITS8 BIT; -}; -union un_p13 { - unsigned char p13; - __BITS8 BIT; -}; -union un_p14 { - unsigned char p14; - __BITS8 BIT; -}; -union un_p15 { - unsigned char p15; - __BITS8 BIT; -}; -union un_pm0 { - unsigned char pm0; - __BITS8 BIT; -}; -union un_pm1 { - unsigned char pm1; - __BITS8 BIT; -}; -union un_pm2 { - unsigned char pm2; - __BITS8 BIT; -}; -union un_pm3 { - unsigned char pm3; - __BITS8 BIT; -}; -union un_pm4 { - unsigned char pm4; - __BITS8 BIT; -}; -union un_pm5 { - unsigned char pm5; - __BITS8 BIT; -}; -union un_pm6 { - unsigned char pm6; - __BITS8 BIT; -}; -union un_pm7 { - unsigned char pm7; - __BITS8 BIT; -}; -union un_pm12 { - unsigned char pm12; - __BITS8 BIT; -}; -union un_pm14 { - unsigned char pm14; - __BITS8 BIT; -}; -union un_pm15 { - unsigned char pm15; - __BITS8 BIT; -}; -union un_adm0 { - unsigned char adm0; - __BITS8 BIT; -}; -union un_ads { - unsigned char ads; - __BITS8 BIT; -}; -union un_adm1 { - unsigned char adm1; - __BITS8 BIT; -}; -union un_krctl { - unsigned char krctl; - __BITS8 BIT; -}; -union un_krf { - unsigned char krf; - __BITS8 BIT; -}; -union un_krm1 { - unsigned char krm1; - __BITS8 BIT; -}; -union un_krm0 { - unsigned char krm0; - __BITS8 BIT; -}; -union un_egp0 { - unsigned char egp0; - __BITS8 BIT; -}; -union un_egn0 { - unsigned char egn0; - __BITS8 BIT; -}; -union un_egp1 { - unsigned char egp1; - __BITS8 BIT; -}; -union un_egn1 { - unsigned char egn1; - __BITS8 BIT; -}; -union un_iics0 { - unsigned char iics0; - __BITS8 BIT; -}; -union un_iicf0 { - unsigned char iicf0; - __BITS8 BIT; -}; -union un_flars { - unsigned char flars; - __BITS8 BIT; -}; -union un_fssq { - unsigned char fssq; - __BITS8 BIT; -}; -union un_flrst { - unsigned char flrst; - __BITS8 BIT; -}; -union un_fsastl { - unsigned char fsastl; - __BITS8 BIT; -}; -union un_fsasth { - unsigned char fsasth; - __BITS8 BIT; -}; -union un_rtcc0 { - unsigned char rtcc0; - __BITS8 BIT; -}; -union un_rtcc1 { - unsigned char rtcc1; - __BITS8 BIT; -}; -union un_csc { - unsigned char csc; - __BITS8 BIT; -}; -union un_ostc { - unsigned char ostc; - __BITS8 BIT; -}; -union un_ckc { - unsigned char ckc; - __BITS8 BIT; -}; -union un_cks0 { - unsigned char cks0; - __BITS8 BIT; -}; -union un_cks1 { - unsigned char cks1; - __BITS8 BIT; -}; -union un_lvim { - unsigned char lvim; - __BITS8 BIT; -}; -union un_lvis { - unsigned char lvis; - __BITS8 BIT; -}; -union un_monsta0 { - unsigned char monsta0; - __BITS8 BIT; -}; -union un_asim { - unsigned char asim; - __BITS8 BIT; -}; -union un_dmc0 { - unsigned char dmc0; - __BITS8 BIT; -}; -union un_dmc1 { - unsigned char dmc1; - __BITS8 BIT; -}; -union un_drc0 { - unsigned char drc0; - __BITS8 BIT; -}; -union un_drc1 { - unsigned char drc1; - __BITS8 BIT; -}; -union un_if2 { - unsigned short if2; - __BITS16 BIT; -}; -union un_if2l { - unsigned char if2l; - __BITS8 BIT; -}; -union un_if2h { - unsigned char if2h; - __BITS8 BIT; -}; -union un_mk2 { - unsigned short mk2; - __BITS16 BIT; -}; -union un_mk2l { - unsigned char mk2l; - __BITS8 BIT; -}; -union un_mk2h { - unsigned char mk2h; - __BITS8 BIT; -}; -union un_pr02 { - unsigned short pr02; - __BITS16 BIT; -}; -union un_pr02l { - unsigned char pr02l; - __BITS8 BIT; -}; -union un_pr02h { - unsigned char pr02h; - __BITS8 BIT; -}; -union un_pr12 { - unsigned short pr12; - __BITS16 BIT; -}; -union un_pr12l { - unsigned char pr12l; - __BITS8 BIT; -}; -union un_pr12h { - unsigned char pr12h; - __BITS8 BIT; -}; -union un_if0 { - unsigned short if0; - __BITS16 BIT; -}; -union un_if0l { - unsigned char if0l; - __BITS8 BIT; -}; -union un_if0h { - unsigned char if0h; - __BITS8 BIT; -}; -union un_if1 { - unsigned short if1; - __BITS16 BIT; -}; -union un_if1l { - unsigned char if1l; - __BITS8 BIT; -}; -union un_if1h { - unsigned char if1h; - __BITS8 BIT; -}; -union un_mk0 { - unsigned short mk0; - __BITS16 BIT; -}; -union un_mk0l { - unsigned char mk0l; - __BITS8 BIT; -}; -union un_mk0h { - unsigned char mk0h; - __BITS8 BIT; -}; -union un_mk1 { - unsigned short mk1; - __BITS16 BIT; -}; -union un_mk1l { - unsigned char mk1l; - __BITS8 BIT; -}; -union un_mk1h { - unsigned char mk1h; - __BITS8 BIT; -}; -union un_pr00 { - unsigned short pr00; - __BITS16 BIT; -}; -union un_pr00l { - unsigned char pr00l; - __BITS8 BIT; -}; -union un_pr00h { - unsigned char pr00h; - __BITS8 BIT; -}; -union un_pr01 { - unsigned short pr01; - __BITS16 BIT; -}; -union un_pr01l { - unsigned char pr01l; - __BITS8 BIT; -}; -union un_pr01h { - unsigned char pr01h; - __BITS8 BIT; -}; -union un_pr10 { - unsigned short pr10; - __BITS16 BIT; -}; -union un_pr10l { - unsigned char pr10l; - __BITS8 BIT; -}; -union un_pr10h { - unsigned char pr10h; - __BITS8 BIT; -}; -union un_pr11 { - unsigned short pr11; - __BITS16 BIT; -}; -union un_pr11l { - unsigned char pr11l; - __BITS8 BIT; -}; -union un_pr11h { - unsigned char pr11h; - __BITS8 BIT; -}; -union un_pmc { - unsigned char pmc; - __BITS8 BIT; -}; - -#define P0 (*(volatile union un_p0 *)0xFFF00).p0 -#define P0_bit (*(volatile union un_p0 *)0xFFF00).BIT -#define P1 (*(volatile union un_p1 *)0xFFF01).p1 -#define P1_bit (*(volatile union un_p1 *)0xFFF01).BIT -#define P2 (*(volatile union un_p2 *)0xFFF02).p2 -#define P2_bit (*(volatile union un_p2 *)0xFFF02).BIT -#define P3 (*(volatile union un_p3 *)0xFFF03).p3 -#define P3_bit (*(volatile union un_p3 *)0xFFF03).BIT -#define P4 (*(volatile union un_p4 *)0xFFF04).p4 -#define P4_bit (*(volatile union un_p4 *)0xFFF04).BIT -#define P5 (*(volatile union un_p5 *)0xFFF05).p5 -#define P5_bit (*(volatile union un_p5 *)0xFFF05).BIT -#define P6 (*(volatile union un_p6 *)0xFFF06).p6 -#define P6_bit (*(volatile union un_p6 *)0xFFF06).BIT -#define P7 (*(volatile union un_p7 *)0xFFF07).p7 -#define P7_bit (*(volatile union un_p7 *)0xFFF07).BIT -#define P12 (*(volatile union un_p12 *)0xFFF0C).p12 -#define P12_bit (*(volatile union un_p12 *)0xFFF0C).BIT -#define P13 (*(volatile union un_p13 *)0xFFF0D).p13 -#define P13_bit (*(volatile union un_p13 *)0xFFF0D).BIT -#define P14 (*(volatile union un_p14 *)0xFFF0E).p14 -#define P14_bit (*(volatile union un_p14 *)0xFFF0E).BIT -#define P15 (*(volatile union un_p15 *)0xFFF0F).p15 -#define P15_bit (*(volatile union un_p15 *)0xFFF0F).BIT -#define SDR00 (*(volatile unsigned short *)0xFFF10) -#define SIO00 (*(volatile unsigned char *)0xFFF10) -#define TXD0 (*(volatile unsigned char *)0xFFF10) -#define SDR01 (*(volatile unsigned short *)0xFFF12) -#define RXD0 (*(volatile unsigned char *)0xFFF12) -#define SIO01 (*(volatile unsigned char *)0xFFF12) -#define TDR00 (*(volatile unsigned short *)0xFFF18) -#define TDR01 (*(volatile unsigned short *)0xFFF1A) -#define TDR01L (*(volatile unsigned char *)0xFFF1A) -#define TDR01H (*(volatile unsigned char *)0xFFF1B) -#define ADCR (*(volatile unsigned short *)0xFFF1E) -#define ADCRH (*(volatile unsigned char *)0xFFF1F) -#define PM0 (*(volatile union un_pm0 *)0xFFF20).pm0 -#define PM0_bit (*(volatile union un_pm0 *)0xFFF20).BIT -#define PM1 (*(volatile union un_pm1 *)0xFFF21).pm1 -#define PM1_bit (*(volatile union un_pm1 *)0xFFF21).BIT -#define PM2 (*(volatile union un_pm2 *)0xFFF22).pm2 -#define PM2_bit (*(volatile union un_pm2 *)0xFFF22).BIT -#define PM3 (*(volatile union un_pm3 *)0xFFF23).pm3 -#define PM3_bit (*(volatile union un_pm3 *)0xFFF23).BIT -#define PM4 (*(volatile union un_pm4 *)0xFFF24).pm4 -#define PM4_bit (*(volatile union un_pm4 *)0xFFF24).BIT -#define PM5 (*(volatile union un_pm5 *)0xFFF25).pm5 -#define PM5_bit (*(volatile union un_pm5 *)0xFFF25).BIT -#define PM6 (*(volatile union un_pm6 *)0xFFF26).pm6 -#define PM6_bit (*(volatile union un_pm6 *)0xFFF26).BIT -#define PM7 (*(volatile union un_pm7 *)0xFFF27).pm7 -#define PM7_bit (*(volatile union un_pm7 *)0xFFF27).BIT -#define PM12 (*(volatile union un_pm12 *)0xFFF2C).pm12 -#define PM12_bit (*(volatile union un_pm12 *)0xFFF2C).BIT -#define PM14 (*(volatile union un_pm14 *)0xFFF2E).pm14 -#define PM14_bit (*(volatile union un_pm14 *)0xFFF2E).BIT -#define PM15 (*(volatile union un_pm15 *)0xFFF2F).pm15 -#define PM15_bit (*(volatile union un_pm15 *)0xFFF2F).BIT -#define ADM0 (*(volatile union un_adm0 *)0xFFF30).adm0 -#define ADM0_bit (*(volatile union un_adm0 *)0xFFF30).BIT -#define ADS (*(volatile union un_ads *)0xFFF31).ads -#define ADS_bit (*(volatile union un_ads *)0xFFF31).BIT -#define ADM1 (*(volatile union un_adm1 *)0xFFF32).adm1 -#define ADM1_bit (*(volatile union un_adm1 *)0xFFF32).BIT -#define KRCTL (*(volatile union un_krctl *)0xFFF34).krctl -#define KRCTL_bit (*(volatile union un_krctl *)0xFFF34).BIT -#define KRF (*(volatile union un_krf *)0xFFF35).krf -#define KRF_bit (*(volatile union un_krf *)0xFFF35).BIT -#define KRM1 (*(volatile union un_krm1 *)0xFFF36).krm1 -#define KRM1_bit (*(volatile union un_krm1 *)0xFFF36).BIT -#define KRM0 (*(volatile union un_krm0 *)0xFFF37).krm0 -#define KRM0_bit (*(volatile union un_krm0 *)0xFFF37).BIT -#define EGP0 (*(volatile union un_egp0 *)0xFFF38).egp0 -#define EGP0_bit (*(volatile union un_egp0 *)0xFFF38).BIT -#define EGN0 (*(volatile union un_egn0 *)0xFFF39).egn0 -#define EGN0_bit (*(volatile union un_egn0 *)0xFFF39).BIT -#define EGP1 (*(volatile union un_egp1 *)0xFFF3A).egp1 -#define EGP1_bit (*(volatile union un_egp1 *)0xFFF3A).BIT -#define EGN1 (*(volatile union un_egn1 *)0xFFF3B).egn1 -#define EGN1_bit (*(volatile union un_egn1 *)0xFFF3B).BIT -#define SDR02 (*(volatile unsigned short *)0xFFF44) -#define SIO10 (*(volatile unsigned char *)0xFFF44) -#define TXD1 (*(volatile unsigned char *)0xFFF44) -#define SDR03 (*(volatile unsigned short *)0xFFF46) -#define RXD1 (*(volatile unsigned char *)0xFFF46) -#define SIO11 (*(volatile unsigned char *)0xFFF46) -#define SDR10 (*(volatile unsigned short *)0xFFF48) -#define SIO20 (*(volatile unsigned char *)0xFFF48) -#define TXD2 (*(volatile unsigned char *)0xFFF48) -#define SDR11 (*(volatile unsigned short *)0xFFF4A) -#define RXD2 (*(volatile unsigned char *)0xFFF4A) -#define SIO21 (*(volatile unsigned char *)0xFFF4A) -#define IICA0 (*(volatile unsigned char *)0xFFF50) -#define IICS0 (*(volatile union un_iics0 *)0xFFF51).iics0 -#define IICS0_bit (*(volatile union un_iics0 *)0xFFF51).BIT -#define IICF0 (*(volatile union un_iicf0 *)0xFFF52).iicf0 -#define IICF0_bit (*(volatile union un_iicf0 *)0xFFF52).BIT -#define TDR02 (*(volatile unsigned short *)0xFFF64) -#define TDR03 (*(volatile unsigned short *)0xFFF66) -#define TDR03L (*(volatile unsigned char *)0xFFF66) -#define TDR03H (*(volatile unsigned char *)0xFFF67) -#define TDR04 (*(volatile unsigned short *)0xFFF68) -#define TDR05 (*(volatile unsigned short *)0xFFF6A) -#define TDR06 (*(volatile unsigned short *)0xFFF6C) -#define TDR07 (*(volatile unsigned short *)0xFFF6E) -#define FLPMC (*(volatile unsigned char *)0xFFF80) -#define FLARS (*(volatile union un_flars *)0xFFF81).flars -#define FLARS_bit (*(volatile union un_flars *)0xFFF81).BIT -#define FLAPL (*(volatile unsigned short *)0xFFF82) -#define FLAPH (*(volatile unsigned char *)0xFFF84) -#define FSSQ (*(volatile union un_fssq *)0xFFF85).fssq -#define FSSQ_bit (*(volatile union un_fssq *)0xFFF85).BIT -#define FLSEDL (*(volatile unsigned short *)0xFFF86) -#define FLSEDH (*(volatile unsigned char *)0xFFF88) -#define FLRST (*(volatile union un_flrst *)0xFFF89).flrst -#define FLRST_bit (*(volatile union un_flrst *)0xFFF89).BIT -#define FSASTL (*(volatile union un_fsastl *)0xFFF8A).fsastl -#define FSASTL_bit (*(volatile union un_fsastl *)0xFFF8A).BIT -#define FSASTH (*(volatile union un_fsasth *)0xFFF8B).fsasth -#define FSASTH_bit (*(volatile union un_fsasth *)0xFFF8B).BIT -#define FLWL (*(volatile unsigned short *)0xFFF8C) -#define FLWH (*(volatile unsigned short *)0xFFF8E) -#define ITMC (*(volatile unsigned short *)0xFFF90) -#define SEC (*(volatile unsigned char *)0xFFF92) -#define MIN (*(volatile unsigned char *)0xFFF93) -#define HOUR (*(volatile unsigned char *)0xFFF94) -#define WEEK (*(volatile unsigned char *)0xFFF95) -#define DAY (*(volatile unsigned char *)0xFFF96) -#define MONTH (*(volatile unsigned char *)0xFFF97) -#define YEAR (*(volatile unsigned char *)0xFFF98) -#define SUBCUD (*(volatile unsigned char *)0xFFF99) -#define ALARMWM (*(volatile unsigned char *)0xFFF9A) -#define ALARMWH (*(volatile unsigned char *)0xFFF9B) -#define ALARMWW (*(volatile unsigned char *)0xFFF9C) -#define RTCC0 (*(volatile union un_rtcc0 *)0xFFF9D).rtcc0 -#define RTCC0_bit (*(volatile union un_rtcc0 *)0xFFF9D).BIT -#define RTCC1 (*(volatile union un_rtcc1 *)0xFFF9E).rtcc1 -#define RTCC1_bit (*(volatile union un_rtcc1 *)0xFFF9E).BIT -#define CMC (*(volatile unsigned char *)0xFFFA0) -#define CSC (*(volatile union un_csc *)0xFFFA1).csc -#define CSC_bit (*(volatile union un_csc *)0xFFFA1).BIT -#define OSTC (*(volatile union un_ostc *)0xFFFA2).ostc -#define OSTC_bit (*(volatile union un_ostc *)0xFFFA2).BIT -#define OSTS (*(volatile unsigned char *)0xFFFA3) -#define CKC (*(volatile union un_ckc *)0xFFFA4).ckc -#define CKC_bit (*(volatile union un_ckc *)0xFFFA4).BIT -#define CKS0 (*(volatile union un_cks0 *)0xFFFA5).cks0 -#define CKS0_bit (*(volatile union un_cks0 *)0xFFFA5).BIT -#define CKS1 (*(volatile union un_cks1 *)0xFFFA6).cks1 -#define CKS1_bit (*(volatile union un_cks1 *)0xFFFA6).BIT -#define RESF (*(volatile unsigned char *)0xFFFA8) -#define LVIM (*(volatile union un_lvim *)0xFFFA9).lvim -#define LVIM_bit (*(volatile union un_lvim *)0xFFFA9).BIT -#define LVIS (*(volatile union un_lvis *)0xFFFAA).lvis -#define LVIS_bit (*(volatile union un_lvis *)0xFFFAA).BIT -#define WDTE (*(volatile unsigned char *)0xFFFAB) -#define CRCIN (*(volatile unsigned char *)0xFFFAC) -#define RXB (*(volatile unsigned char *)0xFFFAD) -#define TXS (*(volatile unsigned char *)0xFFFAD) -#define MONSTA0 (*(volatile union un_monsta0 *)0xFFFAE).monsta0 -#define MONSTA0_bit (*(volatile union un_monsta0 *)0xFFFAE).BIT -#define ASIM (*(volatile union un_asim *)0xFFFAF).asim -#define ASIM_bit (*(volatile union un_asim *)0xFFFAF).BIT -#define DSA0 (*(volatile unsigned char *)0xFFFB0) -#define DSA1 (*(volatile unsigned char *)0xFFFB1) -#define DRA0 (*(volatile unsigned short *)0xFFFB2) -#define DRA0L (*(volatile unsigned char *)0xFFFB2) -#define DRA0H (*(volatile unsigned char *)0xFFFB3) -#define DRA1 (*(volatile unsigned short *)0xFFFB4) -#define DRA1L (*(volatile unsigned char *)0xFFFB4) -#define DRA1H (*(volatile unsigned char *)0xFFFB5) -#define DBC0 (*(volatile unsigned short *)0xFFFB6) -#define DBC0L (*(volatile unsigned char *)0xFFFB6) -#define DBC0H (*(volatile unsigned char *)0xFFFB7) -#define DBC1 (*(volatile unsigned short *)0xFFFB8) -#define DBC1L (*(volatile unsigned char *)0xFFFB8) -#define DBC1H (*(volatile unsigned char *)0xFFFB9) -#define DMC0 (*(volatile union un_dmc0 *)0xFFFBA).dmc0 -#define DMC0_bit (*(volatile union un_dmc0 *)0xFFFBA).BIT -#define DMC1 (*(volatile union un_dmc1 *)0xFFFBB).dmc1 -#define DMC1_bit (*(volatile union un_dmc1 *)0xFFFBB).BIT -#define DRC0 (*(volatile union un_drc0 *)0xFFFBC).drc0 -#define DRC0_bit (*(volatile union un_drc0 *)0xFFFBC).BIT -#define DRC1 (*(volatile union un_drc1 *)0xFFFBD).drc1 -#define DRC1_bit (*(volatile union un_drc1 *)0xFFFBD).BIT -#define IF2 (*(volatile union un_if2 *)0xFFFD0).if2 -#define IF2_bit (*(volatile union un_if2 *)0xFFFD0).BIT -#define IF2L (*(volatile union un_if2l *)0xFFFD0).if2l -#define IF2L_bit (*(volatile union un_if2l *)0xFFFD0).BIT -#define IF2H (*(volatile union un_if2h *)0xFFFD1).if2h -#define IF2H_bit (*(volatile union un_if2h *)0xFFFD1).BIT -#define MK2 (*(volatile union un_mk2 *)0xFFFD4).mk2 -#define MK2_bit (*(volatile union un_mk2 *)0xFFFD4).BIT -#define MK2L (*(volatile union un_mk2l *)0xFFFD4).mk2l -#define MK2L_bit (*(volatile union un_mk2l *)0xFFFD4).BIT -#define MK2H (*(volatile union un_mk2h *)0xFFFD5).mk2h -#define MK2H_bit (*(volatile union un_mk2h *)0xFFFD5).BIT -#define PR02 (*(volatile union un_pr02 *)0xFFFD8).pr02 -#define PR02_bit (*(volatile union un_pr02 *)0xFFFD8).BIT -#define PR02L (*(volatile union un_pr02l *)0xFFFD8).pr02l -#define PR02L_bit (*(volatile union un_pr02l *)0xFFFD8).BIT -#define PR02H (*(volatile union un_pr02h *)0xFFFD9).pr02h -#define PR02H_bit (*(volatile union un_pr02h *)0xFFFD9).BIT -#define PR12 (*(volatile union un_pr12 *)0xFFFDC).pr12 -#define PR12_bit (*(volatile union un_pr12 *)0xFFFDC).BIT -#define PR12L (*(volatile union un_pr12l *)0xFFFDC).pr12l -#define PR12L_bit (*(volatile union un_pr12l *)0xFFFDC).BIT -#define PR12H (*(volatile union un_pr12h *)0xFFFDD).pr12h -#define PR12H_bit (*(volatile union un_pr12h *)0xFFFDD).BIT -#define IF0 (*(volatile union un_if0 *)0xFFFE0).if0 -#define IF0_bit (*(volatile union un_if0 *)0xFFFE0).BIT -#define IF0L (*(volatile union un_if0l *)0xFFFE0).if0l -#define IF0L_bit (*(volatile union un_if0l *)0xFFFE0).BIT -#define IF0H (*(volatile union un_if0h *)0xFFFE1).if0h -#define IF0H_bit (*(volatile union un_if0h *)0xFFFE1).BIT -#define IF1 (*(volatile union un_if1 *)0xFFFE2).if1 -#define IF1_bit (*(volatile union un_if1 *)0xFFFE2).BIT -#define IF1L (*(volatile union un_if1l *)0xFFFE2).if1l -#define IF1L_bit (*(volatile union un_if1l *)0xFFFE2).BIT -#define IF1H (*(volatile union un_if1h *)0xFFFE3).if1h -#define IF1H_bit (*(volatile union un_if1h *)0xFFFE3).BIT -#define MK0 (*(volatile union un_mk0 *)0xFFFE4).mk0 -#define MK0_bit (*(volatile union un_mk0 *)0xFFFE4).BIT -#define MK0L (*(volatile union un_mk0l *)0xFFFE4).mk0l -#define MK0L_bit (*(volatile union un_mk0l *)0xFFFE4).BIT -#define MK0H (*(volatile union un_mk0h *)0xFFFE5).mk0h -#define MK0H_bit (*(volatile union un_mk0h *)0xFFFE5).BIT -#define MK1 (*(volatile union un_mk1 *)0xFFFE6).mk1 -#define MK1_bit (*(volatile union un_mk1 *)0xFFFE6).BIT -#define MK1L (*(volatile union un_mk1l *)0xFFFE6).mk1l -#define MK1L_bit (*(volatile union un_mk1l *)0xFFFE6).BIT -#define MK1H (*(volatile union un_mk1h *)0xFFFE7).mk1h -#define MK1H_bit (*(volatile union un_mk1h *)0xFFFE7).BIT -#define PR00 (*(volatile union un_pr00 *)0xFFFE8).pr00 -#define PR00_bit (*(volatile union un_pr00 *)0xFFFE8).BIT -#define PR00L (*(volatile union un_pr00l *)0xFFFE8).pr00l -#define PR00L_bit (*(volatile union un_pr00l *)0xFFFE8).BIT -#define PR00H (*(volatile union un_pr00h *)0xFFFE9).pr00h -#define PR00H_bit (*(volatile union un_pr00h *)0xFFFE9).BIT -#define PR01 (*(volatile union un_pr01 *)0xFFFEA).pr01 -#define PR01_bit (*(volatile union un_pr01 *)0xFFFEA).BIT -#define PR01L (*(volatile union un_pr01l *)0xFFFEA).pr01l -#define PR01L_bit (*(volatile union un_pr01l *)0xFFFEA).BIT -#define PR01H (*(volatile union un_pr01h *)0xFFFEB).pr01h -#define PR01H_bit (*(volatile union un_pr01h *)0xFFFEB).BIT -#define PR10 (*(volatile union un_pr10 *)0xFFFEC).pr10 -#define PR10_bit (*(volatile union un_pr10 *)0xFFFEC).BIT -#define PR10L (*(volatile union un_pr10l *)0xFFFEC).pr10l -#define PR10L_bit (*(volatile union un_pr10l *)0xFFFEC).BIT -#define PR10H (*(volatile union un_pr10h *)0xFFFED).pr10h -#define PR10H_bit (*(volatile union un_pr10h *)0xFFFED).BIT -#define PR11 (*(volatile union un_pr11 *)0xFFFEE).pr11 -#define PR11_bit (*(volatile union un_pr11 *)0xFFFEE).BIT -#define PR11L (*(volatile union un_pr11l *)0xFFFEE).pr11l -#define PR11L_bit (*(volatile union un_pr11l *)0xFFFEE).BIT -#define PR11H (*(volatile union un_pr11h *)0xFFFEF).pr11h -#define PR11H_bit (*(volatile union un_pr11h *)0xFFFEF).BIT -#define MDAL (*(volatile unsigned short *)0xFFFF0) -#define MULA (*(volatile unsigned short *)0xFFFF0) -#define MDAH (*(volatile unsigned short *)0xFFFF2) -#define MULB (*(volatile unsigned short *)0xFFFF2) -#define MDBH (*(volatile unsigned short *)0xFFFF4) -#define MULOH (*(volatile unsigned short *)0xFFFF4) -#define MDBL (*(volatile unsigned short *)0xFFFF6) -#define MULOL (*(volatile unsigned short *)0xFFFF6) -#define PMC (*(volatile union un_pmc *)0xFFFFE).pmc -#define PMC_bit (*(volatile union un_pmc *)0xFFFFE).BIT - -/* - Sfr bits - */ -#define ADCE ADM0_bit.no0 -#define ADCS ADM0_bit.no7 -#define SPD0 IICS0_bit.no0 -#define STD0 IICS0_bit.no1 -#define ACKD0 IICS0_bit.no2 -#define TRC0 IICS0_bit.no3 -#define COI0 IICS0_bit.no4 -#define EXC0 IICS0_bit.no5 -#define ALD0 IICS0_bit.no6 -#define MSTS0 IICS0_bit.no7 -#define IICRSV0 IICF0_bit.no0 -#define STCEN0 IICF0_bit.no1 -#define IICBSY0 IICF0_bit.no6 -#define STCF0 IICF0_bit.no7 -#define FSSTP FSSQ_bit.no6 -#define SQST FSSQ_bit.no7 -#define SQEND FSASTH_bit.no6 -#define ESQEND FSASTH_bit.no7 -#define RCLOE1 RTCC0_bit.no5 -#define RTCE RTCC0_bit.no7 -#define RWAIT RTCC1_bit.no0 -#define RWST RTCC1_bit.no1 -#define RIFG RTCC1_bit.no3 -#define WAFG RTCC1_bit.no4 -#define WALIE RTCC1_bit.no6 -#define WALE RTCC1_bit.no7 -#define HIOSTOP CSC_bit.no0 -#define XTSTOP CSC_bit.no6 -#define MSTOP CSC_bit.no7 -#define SDIV CKC_bit.no3 -#define MCM0 CKC_bit.no4 -#define MCS CKC_bit.no5 -#define CSS CKC_bit.no6 -#define CLS CKC_bit.no7 -#define PCLOE0 CKS0_bit.no7 -#define PCLOE1 CKS1_bit.no7 -#define LVIF LVIM_bit.no0 -#define LVIOMSK LVIM_bit.no1 -#define LVISEN LVIM_bit.no7 -#define LVILV LVIS_bit.no0 -#define LVIMD LVIS_bit.no7 -#define DWAIT0 DMC0_bit.no4 -#define DS0 DMC0_bit.no5 -#define DRS0 DMC0_bit.no6 -#define STG0 DMC0_bit.no7 -#define DWAIT1 DMC1_bit.no4 -#define DS1 DMC1_bit.no5 -#define DRS1 DMC1_bit.no6 -#define STG1 DMC1_bit.no7 -#define DST0 DRC0_bit.no0 -#define DEN0 DRC0_bit.no7 -#define DST1 DRC1_bit.no0 -#define DEN1 DRC1_bit.no7 -#define TMIF05 IF2_bit.no0 -#define TMIF06 IF2_bit.no1 -#define TMIF07 IF2_bit.no2 -#define PIF6 IF2_bit.no3 -#define PIF7 IF2_bit.no4 -#define PIF8 IF2_bit.no5 -#define PIF9 IF2_bit.no6 -#define PIF10 IF2_bit.no7 -#define PIF11 IF2H_bit.no0 -#define MDIF IF2H_bit.no5 -#define FLIF IF2H_bit.no7 -#define TMMK05 MK2_bit.no0 -#define TMMK06 MK2_bit.no1 -#define TMMK07 MK2_bit.no2 -#define PMK6 MK2_bit.no3 -#define PMK7 MK2_bit.no4 -#define PMK8 MK2_bit.no5 -#define PMK9 MK2_bit.no6 -#define PMK10 MK2_bit.no7 -#define PMK11 MK2H_bit.no0 -#define MDMK MK2H_bit.no5 -#define FLMK MK2H_bit.no7 -#define TMPR005 PR02_bit.no0 -#define TMPR006 PR02_bit.no1 -#define TMPR007 PR02_bit.no2 -#define PPR06 PR02_bit.no3 -#define PPR07 PR02_bit.no4 -#define PPR08 PR02_bit.no5 -#define PPR09 PR02_bit.no6 -#define PPR010 PR02_bit.no7 -#define PPR011 PR02H_bit.no0 -#define MDPR0 PR02H_bit.no5 -#define FLPR0 PR02H_bit.no7 -#define TMPR105 PR12_bit.no0 -#define TMPR106 PR12_bit.no1 -#define TMPR107 PR12_bit.no2 -#define PPR16 PR12_bit.no3 -#define PPR17 PR12_bit.no4 -#define PPR18 PR12_bit.no5 -#define PPR19 PR12_bit.no6 -#define PPR110 PR12_bit.no7 -#define PPR111 PR12H_bit.no0 -#define MDPR1 PR12H_bit.no5 -#define FLPR1 PR12H_bit.no7 -#define WDTIIF IF0_bit.no0 -#define LVIIF IF0_bit.no1 -#define PIF0 IF0_bit.no2 -#define PIF1 IF0_bit.no3 -#define PIF2 IF0_bit.no4 -#define PIF3 IF0_bit.no5 -#define PIF4 IF0_bit.no6 -#define PIF5 IF0_bit.no7 -#define CSIIF20 IF0H_bit.no0 -#define IICIF20 IF0H_bit.no0 -#define STIF2 IF0H_bit.no0 -#define CSIIF21 IF0H_bit.no1 -#define IICIF21 IF0H_bit.no1 -#define SRIF2 IF0H_bit.no1 -#define SREIF2 IF0H_bit.no2 -#define DMAIF0 IF0H_bit.no3 -#define DMAIF1 IF0H_bit.no4 -#define CSIIF00 IF0H_bit.no5 -#define IICIF00 IF0H_bit.no5 -#define STIF0 IF0H_bit.no5 -#define CSIIF01 IF0H_bit.no6 -#define IICIF01 IF0H_bit.no6 -#define SRIF0 IF0H_bit.no6 -#define SREIF0 IF0H_bit.no7 -#define TMIF01H IF0H_bit.no7 -#define CSIIF10 IF1_bit.no0 -#define IICIF10 IF1_bit.no0 -#define STIF1 IF1_bit.no0 -#define CSIIF11 IF1_bit.no1 -#define IICIF11 IF1_bit.no1 -#define SRIF1 IF1_bit.no1 -#define SREIF1 IF1_bit.no2 -#define TMIF03H IF1_bit.no2 -#define IICAIF0 IF1_bit.no3 -#define TMIF00 IF1_bit.no4 -#define TMIF01 IF1_bit.no5 -#define TMIF02 IF1_bit.no6 -#define TMIF03 IF1_bit.no7 -#define ADIF IF1H_bit.no0 -#define RTCIF IF1H_bit.no1 -#define ITIF IF1H_bit.no2 -#define KRIF IF1H_bit.no3 -#define TMIF04 IF1H_bit.no7 -#define WDTIMK MK0_bit.no0 -#define LVIMK MK0_bit.no1 -#define PMK0 MK0_bit.no2 -#define PMK1 MK0_bit.no3 -#define PMK2 MK0_bit.no4 -#define PMK3 MK0_bit.no5 -#define PMK4 MK0_bit.no6 -#define PMK5 MK0_bit.no7 -#define CSIMK20 MK0H_bit.no0 -#define IICMK20 MK0H_bit.no0 -#define STMK2 MK0H_bit.no0 -#define CSIMK21 MK0H_bit.no1 -#define IICMK21 MK0H_bit.no1 -#define SRMK2 MK0H_bit.no1 -#define SREMK2 MK0H_bit.no2 -#define DMAMK0 MK0H_bit.no3 -#define DMAMK1 MK0H_bit.no4 -#define CSIMK00 MK0H_bit.no5 -#define IICMK00 MK0H_bit.no5 -#define STMK0 MK0H_bit.no5 -#define CSIMK01 MK0H_bit.no6 -#define IICMK01 MK0H_bit.no6 -#define SRMK0 MK0H_bit.no6 -#define SREMK0 MK0H_bit.no7 -#define TMMK01H MK0H_bit.no7 -#define CSIMK10 MK1_bit.no0 -#define IICMK10 MK1_bit.no0 -#define STMK1 MK1_bit.no0 -#define CSIMK11 MK1_bit.no1 -#define IICMK11 MK1_bit.no1 -#define SRMK1 MK1_bit.no1 -#define SREMK1 MK1_bit.no2 -#define TMMK03H MK1_bit.no2 -#define IICAMK0 MK1_bit.no3 -#define TMMK00 MK1_bit.no4 -#define TMMK01 MK1_bit.no5 -#define TMMK02 MK1_bit.no6 -#define TMMK03 MK1_bit.no7 -#define ADMK MK1H_bit.no0 -#define RTCMK MK1H_bit.no1 -#define ITMK MK1H_bit.no2 -#define KRMK MK1H_bit.no3 -#define TMMK04 MK1H_bit.no7 -#define WDTIPR0 PR00_bit.no0 -#define LVIPR0 PR00_bit.no1 -#define PPR00 PR00_bit.no2 -#define PPR01 PR00_bit.no3 -#define PPR02 PR00_bit.no4 -#define PPR03 PR00_bit.no5 -#define PPR04 PR00_bit.no6 -#define PPR05 PR00_bit.no7 -#define CSIPR020 PR00H_bit.no0 -#define IICPR020 PR00H_bit.no0 -#define STPR02 PR00H_bit.no0 -#define CSIPR021 PR00H_bit.no1 -#define IICPR021 PR00H_bit.no1 -#define SRPR02 PR00H_bit.no1 -#define SREPR02 PR00H_bit.no2 -#define DMAPR00 PR00H_bit.no3 -#define DMAPR01 PR00H_bit.no4 -#define CSIPR000 PR00H_bit.no5 -#define IICPR000 PR00H_bit.no5 -#define STPR00 PR00H_bit.no5 -#define CSIPR001 PR00H_bit.no6 -#define IICPR001 PR00H_bit.no6 -#define SRPR00 PR00H_bit.no6 -#define SREPR00 PR00H_bit.no7 -#define TMPR001H PR00H_bit.no7 -#define CSIPR010 PR01_bit.no0 -#define IICPR010 PR01_bit.no0 -#define STPR01 PR01_bit.no0 -#define CSIPR011 PR01_bit.no1 -#define IICPR011 PR01_bit.no1 -#define SRPR01 PR01_bit.no1 -#define SREPR01 PR01_bit.no2 -#define TMPR003H PR01_bit.no2 -#define IICAPR00 PR01_bit.no3 -#define TMPR000 PR01_bit.no4 -#define TMPR001 PR01_bit.no5 -#define TMPR002 PR01_bit.no6 -#define TMPR003 PR01_bit.no7 -#define ADPR0 PR01H_bit.no0 -#define RTCPR0 PR01H_bit.no1 -#define ITPR0 PR01H_bit.no2 -#define KRPR0 PR01H_bit.no3 -#define TMPR004 PR01H_bit.no7 -#define WDTIPR1 PR10_bit.no0 -#define LVIPR1 PR10_bit.no1 -#define PPR10 PR10_bit.no2 -#define PPR11 PR10_bit.no3 -#define PPR12 PR10_bit.no4 -#define PPR13 PR10_bit.no5 -#define PPR14 PR10_bit.no6 -#define PPR15 PR10_bit.no7 -#define CSIPR120 PR10H_bit.no0 -#define IICPR120 PR10H_bit.no0 -#define STPR12 PR10H_bit.no0 -#define CSIPR121 PR10H_bit.no1 -#define IICPR121 PR10H_bit.no1 -#define SRPR12 PR10H_bit.no1 -#define SREPR12 PR10H_bit.no2 -#define DMAPR10 PR10H_bit.no3 -#define DMAPR11 PR10H_bit.no4 -#define CSIPR100 PR10H_bit.no5 -#define IICPR100 PR10H_bit.no5 -#define STPR10 PR10H_bit.no5 -#define CSIPR101 PR10H_bit.no6 -#define IICPR101 PR10H_bit.no6 -#define SRPR10 PR10H_bit.no6 -#define SREPR10 PR10H_bit.no7 -#define TMPR101H PR10H_bit.no7 -#define CSIPR110 PR11_bit.no0 -#define IICPR110 PR11_bit.no0 -#define STPR11 PR11_bit.no0 -#define CSIPR111 PR11_bit.no1 -#define IICPR111 PR11_bit.no1 -#define SRPR11 PR11_bit.no1 -#define SREPR11 PR11_bit.no2 -#define TMPR103H PR11_bit.no2 -#define IICAPR10 PR11_bit.no3 -#define TMPR100 PR11_bit.no4 -#define TMPR101 PR11_bit.no5 -#define TMPR102 PR11_bit.no6 -#define TMPR103 PR11_bit.no7 -#define ADPR1 PR11H_bit.no0 -#define RTCPR1 PR11H_bit.no1 -#define ITPR1 PR11H_bit.no2 -#define KRPR1 PR11H_bit.no3 -#define TMPR104 PR11H_bit.no7 -#define MAA PMC_bit.no0 - -/* - Interrupt vector addresses - */ -#define RST_vect (0x0) -#define INTDBG_vect (0x2) -#define INTWDTI_vect (0x4) -#define INTLVI_vect (0x6) -#define INTP0_vect (0x8) -#define INTP1_vect (0xA) -#define INTP2_vect (0xC) -#define INTP3_vect (0xE) -#define INTP4_vect (0x10) -#define INTP5_vect (0x12) -#define INTCSI20_vect (0x14) -#define INTIIC20_vect (0x14) -#define INTST2_vect (0x14) -#define INTCSI21_vect (0x16) -#define INTIIC21_vect (0x16) -#define INTSR2_vect (0x16) -#define INTSRE2_vect (0x18) -#define INTDMA0_vect (0x1A) -#define INTDMA1_vect (0x1C) -#define INTCSI00_vect (0x1E) -#define INTIIC00_vect (0x1E) -#define INTST0_vect (0x1E) -#define INTCSI01_vect (0x20) -#define INTIIC01_vect (0x20) -#define INTSR0_vect (0x20) -#define INTSRE0_vect (0x22) -#define INTTM01H_vect (0x22) -#define INTCSI10_vect (0x24) -#define INTIIC10_vect (0x24) -#define INTST1_vect (0x24) -#define INTCSI11_vect (0x26) -#define INTIIC11_vect (0x26) -#define INTSR1_vect (0x26) -#define INTSRE1_vect (0x28) -#define INTTM03H_vect (0x28) -#define INTIICA0_vect (0x2A) -#define INTTM00_vect (0x2C) -#define INTTM01_vect (0x2E) -#define INTTM02_vect (0x30) -#define INTTM03_vect (0x32) -#define INTAD_vect (0x34) -#define INTRTC_vect (0x36) -#define INTIT_vect (0x38) -#define INTKR_vect (0x3A) -#define INTTM04_vect (0x42) -#define INTTM05_vect (0x44) -#define INTTM06_vect (0x46) -#define INTTM07_vect (0x48) -#define INTP6_vect (0x4A) -#define INTP7_vect (0x4C) -#define INTP8_vect (0x4E) -#define INTP9_vect (0x50) -#define INTP10_vect (0x52) -#define INTP11_vect (0x54) -#define INTMD_vect (0x5E) -#define INTFL_vect (0x62) -#define BRK_I_vect (0x7E) -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A_ext.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A_ext.h deleted file mode 100644 index 0048962c4..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1A_ext.h +++ /dev/null @@ -1,571 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78G1A */ -/* FILE : iodefine_ext.h */ -/* DESCRIPTION : Definition of Extended SFRs */ -/* CPU SERIES : RL78 - G1A */ -/* CPU TYPE : R5F10ELE */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F10ELE.DVF */ -/* Copyright(C) 2012 Renesas */ -/* File Version V1.00 */ -/* Tool Version 1.9.7121 */ -/* Date Generated 13/11/2012 */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_EXT_H -#define IODEFINE_EXT_H - -/* - IO Registers - */ -union un_adm2 { - unsigned char adm2; - __BITS8 BIT; -}; -union un_pu0 { - unsigned char pu0; - __BITS8 BIT; -}; -union un_pu1 { - unsigned char pu1; - __BITS8 BIT; -}; -union un_pu3 { - unsigned char pu3; - __BITS8 BIT; -}; -union un_pu4 { - unsigned char pu4; - __BITS8 BIT; -}; -union un_pu5 { - unsigned char pu5; - __BITS8 BIT; -}; -union un_pu7 { - unsigned char pu7; - __BITS8 BIT; -}; -union un_pu12 { - unsigned char pu12; - __BITS8 BIT; -}; -union un_pu14 { - unsigned char pu14; - __BITS8 BIT; -}; -union un_pim0 { - unsigned char pim0; - __BITS8 BIT; -}; -union un_pim1 { - unsigned char pim1; - __BITS8 BIT; -}; -union un_pom0 { - unsigned char pom0; - __BITS8 BIT; -}; -union un_pom1 { - unsigned char pom1; - __BITS8 BIT; -}; -union un_pom5 { - unsigned char pom5; - __BITS8 BIT; -}; -union un_pom7 { - unsigned char pom7; - __BITS8 BIT; -}; -union un_pmc0 { - unsigned char pmc0; - __BITS8 BIT; -}; -union un_pmc1 { - unsigned char pmc1; - __BITS8 BIT; -}; -union un_pmc3 { - unsigned char pmc3; - __BITS8 BIT; -}; -union un_pmc4 { - unsigned char pmc4; - __BITS8 BIT; -}; -union un_pmc5 { - unsigned char pmc5; - __BITS8 BIT; -}; -union un_pmc7 { - unsigned char pmc7; - __BITS8 BIT; -}; -union un_pmc12 { - unsigned char pmc12; - __BITS8 BIT; -}; -union un_nfen0 { - unsigned char nfen0; - __BITS8 BIT; -}; -union un_nfen1 { - unsigned char nfen1; - __BITS8 BIT; -}; -union un_isc { - unsigned char isc; - __BITS8 BIT; -}; -union un_gaidis { - unsigned char gaidis; - __BITS8 BIT; -}; -union un_gdidis { - unsigned char gdidis; - __BITS8 BIT; -}; -union un_dflctl { - unsigned char dflctl; - __BITS8 BIT; -}; -union un_bectl { - unsigned char bectl; - __BITS8 BIT; -}; -union un_fsse { - unsigned char fsse; - __BITS8 BIT; -}; -union un_pfs { - unsigned char pfs; - __BITS8 BIT; -}; -union un_mduc { - unsigned char mduc; - __BITS8 BIT; -}; -union un_per0 { - unsigned char per0; - __BITS8 BIT; -}; -union un_rmc { - unsigned char rmc; - __BITS8 BIT; -}; -union un_rpectl { - unsigned char rpectl; - __BITS8 BIT; -}; -union un_se0l { - unsigned char se0l; - __BITS8 BIT; -}; -union un_ss0l { - unsigned char ss0l; - __BITS8 BIT; -}; -union un_st0l { - unsigned char st0l; - __BITS8 BIT; -}; -union un_soe0l { - unsigned char soe0l; - __BITS8 BIT; -}; -union un_se1l { - unsigned char se1l; - __BITS8 BIT; -}; -union un_ss1l { - unsigned char ss1l; - __BITS8 BIT; -}; -union un_st1l { - unsigned char st1l; - __BITS8 BIT; -}; -union un_soe1l { - unsigned char soe1l; - __BITS8 BIT; -}; -union un_te0l { - unsigned char te0l; - __BITS8 BIT; -}; -union un_ts0l { - unsigned char ts0l; - __BITS8 BIT; -}; -union un_tt0l { - unsigned char tt0l; - __BITS8 BIT; -}; -union un_toe0l { - unsigned char toe0l; - __BITS8 BIT; -}; -union un_iicctl00 { - unsigned char iicctl00; - __BITS8 BIT; -}; -union un_iicctl01 { - unsigned char iicctl01; - __BITS8 BIT; -}; -union un_crc0ctl { - unsigned char crc0ctl; - __BITS8 BIT; -}; - -#define ADM2 (*(volatile union un_adm2 *)0xF0010).adm2 -#define ADM2_bit (*(volatile union un_adm2 *)0xF0010).BIT -#define ADUL (*(volatile unsigned char *)0xF0011) -#define ADLL (*(volatile unsigned char *)0xF0012) -#define ADTES (*(volatile unsigned char *)0xF0013) -#define PU0 (*(volatile union un_pu0 *)0xF0030).pu0 -#define PU0_bit (*(volatile union un_pu0 *)0xF0030).BIT -#define PU1 (*(volatile union un_pu1 *)0xF0031).pu1 -#define PU1_bit (*(volatile union un_pu1 *)0xF0031).BIT -#define PU3 (*(volatile union un_pu3 *)0xF0033).pu3 -#define PU3_bit (*(volatile union un_pu3 *)0xF0033).BIT -#define PU4 (*(volatile union un_pu4 *)0xF0034).pu4 -#define PU4_bit (*(volatile union un_pu4 *)0xF0034).BIT -#define PU5 (*(volatile union un_pu5 *)0xF0035).pu5 -#define PU5_bit (*(volatile union un_pu5 *)0xF0035).BIT -#define PU7 (*(volatile union un_pu7 *)0xF0037).pu7 -#define PU7_bit (*(volatile union un_pu7 *)0xF0037).BIT -#define PU12 (*(volatile union un_pu12 *)0xF003C).pu12 -#define PU12_bit (*(volatile union un_pu12 *)0xF003C).BIT -#define PU14 (*(volatile union un_pu14 *)0xF003E).pu14 -#define PU14_bit (*(volatile union un_pu14 *)0xF003E).BIT -#define PIM0 (*(volatile union un_pim0 *)0xF0040).pim0 -#define PIM0_bit (*(volatile union un_pim0 *)0xF0040).BIT -#define PIM1 (*(volatile union un_pim1 *)0xF0041).pim1 -#define PIM1_bit (*(volatile union un_pim1 *)0xF0041).BIT -#define POM0 (*(volatile union un_pom0 *)0xF0050).pom0 -#define POM0_bit (*(volatile union un_pom0 *)0xF0050).BIT -#define POM1 (*(volatile union un_pom1 *)0xF0051).pom1 -#define POM1_bit (*(volatile union un_pom1 *)0xF0051).BIT -#define POM5 (*(volatile union un_pom5 *)0xF0055).pom5 -#define POM5_bit (*(volatile union un_pom5 *)0xF0055).BIT -#define POM7 (*(volatile union un_pom7 *)0xF0057).pom7 -#define POM7_bit (*(volatile union un_pom7 *)0xF0057).BIT -#define PMC0 (*(volatile union un_pmc0 *)0xF0060).pmc0 -#define PMC0_bit (*(volatile union un_pmc0 *)0xF0060).BIT -#define PMC1 (*(volatile union un_pmc1 *)0xF0061).pmc1 -#define PMC1_bit (*(volatile union un_pmc1 *)0xF0061).BIT -#define PMC3 (*(volatile union un_pmc3 *)0xF0063).pmc3 -#define PMC3_bit (*(volatile union un_pmc3 *)0xF0063).BIT -#define PMC4 (*(volatile union un_pmc4 *)0xF0064).pmc4 -#define PMC4_bit (*(volatile union un_pmc4 *)0xF0064).BIT -#define PMC5 (*(volatile union un_pmc5 *)0xF0065).pmc5 -#define PMC5_bit (*(volatile union un_pmc5 *)0xF0065).BIT -#define PMC7 (*(volatile union un_pmc7 *)0xF0067).pmc7 -#define PMC7_bit (*(volatile union un_pmc7 *)0xF0067).BIT -#define PMC12 (*(volatile union un_pmc12 *)0xF006C).pmc12 -#define PMC12_bit (*(volatile union un_pmc12 *)0xF006C).BIT -#define NFEN0 (*(volatile union un_nfen0 *)0xF0070).nfen0 -#define NFEN0_bit (*(volatile union un_nfen0 *)0xF0070).BIT -#define NFEN1 (*(volatile union un_nfen1 *)0xF0071).nfen1 -#define NFEN1_bit (*(volatile union un_nfen1 *)0xF0071).BIT -#define ISC (*(volatile union un_isc *)0xF0073).isc -#define ISC_bit (*(volatile union un_isc *)0xF0073).BIT -#define TIS0 (*(volatile unsigned char *)0xF0074) -#define ADPC (*(volatile unsigned char *)0xF0076) -#define PIOR (*(volatile unsigned char *)0xF0077) -#define IAWCTL (*(volatile unsigned char *)0xF0078) -#define GAIDIS (*(volatile union un_gaidis *)0xF007C).gaidis -#define GAIDIS_bit (*(volatile union un_gaidis *)0xF007C).BIT -#define GDIDIS (*(volatile union un_gdidis *)0xF007D).gdidis -#define GDIDIS_bit (*(volatile union un_gdidis *)0xF007D).BIT -#define PRDSEL (*(volatile unsigned short *)0xF007E) -#define TOOLEN (*(volatile unsigned char *)0xF0080) -#define BPAL0 (*(volatile unsigned char *)0xF0081) -#define BPAH0 (*(volatile unsigned char *)0xF0082) -#define BPAS0 (*(volatile unsigned char *)0xF0083) -#define BACDVL0 (*(volatile unsigned char *)0xF0084) -#define BACDVH0 (*(volatile unsigned char *)0xF0085) -#define BACDML0 (*(volatile unsigned char *)0xF0086) -#define BACDMH0 (*(volatile unsigned char *)0xF0087) -#define MONMOD (*(volatile unsigned char *)0xF0088) -#define DFLCTL (*(volatile union un_dflctl *)0xF0090).dflctl -#define DFLCTL_bit (*(volatile union un_dflctl *)0xF0090).BIT -#define HIOTRM (*(volatile unsigned char *)0xF00A0) -#define BECTL (*(volatile union un_bectl *)0xF00A1).bectl -#define BECTL_bit (*(volatile union un_bectl *)0xF00A1).BIT -#define HOCODIV (*(volatile unsigned char *)0xF00A8) -#define TEMPCAL0 (*(volatile unsigned char *)0xF00AC) -#define TEMPCAL1 (*(volatile unsigned char *)0xF00AD) -#define TEMPCAL2 (*(volatile unsigned char *)0xF00AE) -#define TEMPCAL3 (*(volatile unsigned char *)0xF00AF) -#define FLSEC (*(volatile unsigned short *)0xF00B0) -#define FLFSWS (*(volatile unsigned short *)0xF00B2) -#define FLFSWE (*(volatile unsigned short *)0xF00B4) -#define FSSET (*(volatile unsigned char *)0xF00B6) -#define FSSE (*(volatile union un_fsse *)0xF00B7).fsse -#define FSSE_bit (*(volatile union un_fsse *)0xF00B7).BIT -#define FLFADL (*(volatile unsigned short *)0xF00B8) -#define FLFADH (*(volatile unsigned char *)0xF00BA) -#define PFCMD (*(volatile unsigned char *)0xF00C0) -#define PFS (*(volatile union un_pfs *)0xF00C1).pfs -#define PFS_bit (*(volatile union un_pfs *)0xF00C1).BIT -#define FLRL (*(volatile unsigned short *)0xF00C2) -#define FLRH (*(volatile unsigned short *)0xF00C4) -#define FLWE (*(volatile unsigned char *)0xF00C6) -#define FLRE (*(volatile unsigned char *)0xF00C7) -#define FLTMS (*(volatile unsigned short *)0xF00C8) -#define DFLMC (*(volatile unsigned short *)0xF00CA) -#define FLMCL (*(volatile unsigned short *)0xF00CC) -#define FLMCH (*(volatile unsigned char *)0xF00CE) -#define FSCTL (*(volatile unsigned char *)0xF00CF) -#define ICEADR (*(volatile unsigned short *)0xF00D0) -#define ICEDAT (*(volatile unsigned short *)0xF00D2) -#define MDCL (*(volatile unsigned short *)0xF00E0) -#define MDCH (*(volatile unsigned short *)0xF00E2) -#define MDUC (*(volatile union un_mduc *)0xF00E8).mduc -#define MDUC_bit (*(volatile union un_mduc *)0xF00E8).BIT -#define PER0 (*(volatile union un_per0 *)0xF00F0).per0 -#define PER0_bit (*(volatile union un_per0 *)0xF00F0).BIT -#define OSMC (*(volatile unsigned char *)0xF00F3) -#define RMC (*(volatile union un_rmc *)0xF00F4).rmc -#define RMC_bit (*(volatile union un_rmc *)0xF00F4).BIT -#define RPECTL (*(volatile union un_rpectl *)0xF00F5).rpectl -#define RPECTL_bit (*(volatile union un_rpectl *)0xF00F5).BIT -#define BCDADJ (*(volatile unsigned char *)0xF00FE) -#define VECTCTRL (*(volatile unsigned char *)0xF00FF) -#define SSR00 (*(volatile unsigned short *)0xF0100) -#define SSR00L (*(volatile unsigned char *)0xF0100) -#define SSR01 (*(volatile unsigned short *)0xF0102) -#define SSR01L (*(volatile unsigned char *)0xF0102) -#define SSR02 (*(volatile unsigned short *)0xF0104) -#define SSR02L (*(volatile unsigned char *)0xF0104) -#define SSR03 (*(volatile unsigned short *)0xF0106) -#define SSR03L (*(volatile unsigned char *)0xF0106) -#define SIR00 (*(volatile unsigned short *)0xF0108) -#define SIR00L (*(volatile unsigned char *)0xF0108) -#define SIR01 (*(volatile unsigned short *)0xF010A) -#define SIR01L (*(volatile unsigned char *)0xF010A) -#define SIR02 (*(volatile unsigned short *)0xF010C) -#define SIR02L (*(volatile unsigned char *)0xF010C) -#define SIR03 (*(volatile unsigned short *)0xF010E) -#define SIR03L (*(volatile unsigned char *)0xF010E) -#define SMR00 (*(volatile unsigned short *)0xF0110) -#define SMR01 (*(volatile unsigned short *)0xF0112) -#define SMR02 (*(volatile unsigned short *)0xF0114) -#define SMR03 (*(volatile unsigned short *)0xF0116) -#define SCR00 (*(volatile unsigned short *)0xF0118) -#define SCR01 (*(volatile unsigned short *)0xF011A) -#define SCR02 (*(volatile unsigned short *)0xF011C) -#define SCR03 (*(volatile unsigned short *)0xF011E) -#define SE0 (*(volatile unsigned short *)0xF0120) -#define SE0L (*(volatile union un_se0l *)0xF0120).se0l -#define SE0L_bit (*(volatile union un_se0l *)0xF0120).BIT -#define SS0 (*(volatile unsigned short *)0xF0122) -#define SS0L (*(volatile union un_ss0l *)0xF0122).ss0l -#define SS0L_bit (*(volatile union un_ss0l *)0xF0122).BIT -#define ST0 (*(volatile unsigned short *)0xF0124) -#define ST0L (*(volatile union un_st0l *)0xF0124).st0l -#define ST0L_bit (*(volatile union un_st0l *)0xF0124).BIT -#define SPS0 (*(volatile unsigned short *)0xF0126) -#define SPS0L (*(volatile unsigned char *)0xF0126) -#define SO0 (*(volatile unsigned short *)0xF0128) -#define SOE0 (*(volatile unsigned short *)0xF012A) -#define SOE0L (*(volatile union un_soe0l *)0xF012A).soe0l -#define SOE0L_bit (*(volatile union un_soe0l *)0xF012A).BIT -#define EDR00 (*(volatile unsigned short *)0xF012C) -#define EDR00L (*(volatile unsigned char *)0xF012C) -#define EDR01 (*(volatile unsigned short *)0xF012E) -#define EDR01L (*(volatile unsigned char *)0xF012E) -#define EDR02 (*(volatile unsigned short *)0xF0130) -#define EDR02L (*(volatile unsigned char *)0xF0130) -#define EDR03 (*(volatile unsigned short *)0xF0132) -#define EDR03L (*(volatile unsigned char *)0xF0132) -#define SOL0 (*(volatile unsigned short *)0xF0134) -#define SOL0L (*(volatile unsigned char *)0xF0134) -#define SSC0 (*(volatile unsigned short *)0xF0138) -#define SSC0L (*(volatile unsigned char *)0xF0138) -#define SSR10 (*(volatile unsigned short *)0xF0140) -#define SSR10L (*(volatile unsigned char *)0xF0140) -#define SSR11 (*(volatile unsigned short *)0xF0142) -#define SSR11L (*(volatile unsigned char *)0xF0142) -#define SIR10 (*(volatile unsigned short *)0xF0148) -#define SIR10L (*(volatile unsigned char *)0xF0148) -#define SIR11 (*(volatile unsigned short *)0xF014A) -#define SIR11L (*(volatile unsigned char *)0xF014A) -#define SMR10 (*(volatile unsigned short *)0xF0150) -#define SMR11 (*(volatile unsigned short *)0xF0152) -#define SCR10 (*(volatile unsigned short *)0xF0158) -#define SCR11 (*(volatile unsigned short *)0xF015A) -#define SE1 (*(volatile unsigned short *)0xF0160) -#define SE1L (*(volatile union un_se1l *)0xF0160).se1l -#define SE1L_bit (*(volatile union un_se1l *)0xF0160).BIT -#define SS1 (*(volatile unsigned short *)0xF0162) -#define SS1L (*(volatile union un_ss1l *)0xF0162).ss1l -#define SS1L_bit (*(volatile union un_ss1l *)0xF0162).BIT -#define ST1 (*(volatile unsigned short *)0xF0164) -#define ST1L (*(volatile union un_st1l *)0xF0164).st1l -#define ST1L_bit (*(volatile union un_st1l *)0xF0164).BIT -#define SPS1 (*(volatile unsigned short *)0xF0166) -#define SPS1L (*(volatile unsigned char *)0xF0166) -#define SO1 (*(volatile unsigned short *)0xF0168) -#define SOE1 (*(volatile unsigned short *)0xF016A) -#define SOE1L (*(volatile union un_soe1l *)0xF016A).soe1l -#define SOE1L_bit (*(volatile union un_soe1l *)0xF016A).BIT -#define EDR10 (*(volatile unsigned short *)0xF016C) -#define EDR10L (*(volatile unsigned char *)0xF016C) -#define EDR11 (*(volatile unsigned short *)0xF016E) -#define EDR11L (*(volatile unsigned char *)0xF016E) -#define SOL1 (*(volatile unsigned short *)0xF0174) -#define SOL1L (*(volatile unsigned char *)0xF0174) -#define TCR00 (*(volatile unsigned short *)0xF0180) -#define TCR01 (*(volatile unsigned short *)0xF0182) -#define TCR02 (*(volatile unsigned short *)0xF0184) -#define TCR03 (*(volatile unsigned short *)0xF0186) -#define TCR04 (*(volatile unsigned short *)0xF0188) -#define TCR05 (*(volatile unsigned short *)0xF018A) -#define TCR06 (*(volatile unsigned short *)0xF018C) -#define TCR07 (*(volatile unsigned short *)0xF018E) -#define TMR00 (*(volatile unsigned short *)0xF0190) -#define TMR01 (*(volatile unsigned short *)0xF0192) -#define TMR02 (*(volatile unsigned short *)0xF0194) -#define TMR03 (*(volatile unsigned short *)0xF0196) -#define TMR04 (*(volatile unsigned short *)0xF0198) -#define TMR05 (*(volatile unsigned short *)0xF019A) -#define TMR06 (*(volatile unsigned short *)0xF019C) -#define TMR07 (*(volatile unsigned short *)0xF019E) -#define TSR00 (*(volatile unsigned short *)0xF01A0) -#define TSR00L (*(volatile unsigned char *)0xF01A0) -#define TSR01 (*(volatile unsigned short *)0xF01A2) -#define TSR01L (*(volatile unsigned char *)0xF01A2) -#define TSR02 (*(volatile unsigned short *)0xF01A4) -#define TSR02L (*(volatile unsigned char *)0xF01A4) -#define TSR03 (*(volatile unsigned short *)0xF01A6) -#define TSR03L (*(volatile unsigned char *)0xF01A6) -#define TSR04 (*(volatile unsigned short *)0xF01A8) -#define TSR04L (*(volatile unsigned char *)0xF01A8) -#define TSR05 (*(volatile unsigned short *)0xF01AA) -#define TSR05L (*(volatile unsigned char *)0xF01AA) -#define TSR06 (*(volatile unsigned short *)0xF01AC) -#define TSR06L (*(volatile unsigned char *)0xF01AC) -#define TSR07 (*(volatile unsigned short *)0xF01AE) -#define TSR07L (*(volatile unsigned char *)0xF01AE) -#define TE0 (*(volatile unsigned short *)0xF01B0) -#define TE0L (*(volatile union un_te0l *)0xF01B0).te0l -#define TE0L_bit (*(volatile union un_te0l *)0xF01B0).BIT -#define TS0 (*(volatile unsigned short *)0xF01B2) -#define TS0L (*(volatile union un_ts0l *)0xF01B2).ts0l -#define TS0L_bit (*(volatile union un_ts0l *)0xF01B2).BIT -#define TT0 (*(volatile unsigned short *)0xF01B4) -#define TT0L (*(volatile union un_tt0l *)0xF01B4).tt0l -#define TT0L_bit (*(volatile union un_tt0l *)0xF01B4).BIT -#define TPS0 (*(volatile unsigned short *)0xF01B6) -#define TO0 (*(volatile unsigned short *)0xF01B8) -#define TO0L (*(volatile unsigned char *)0xF01B8) -#define TOE0 (*(volatile unsigned short *)0xF01BA) -#define TOE0L (*(volatile union un_toe0l *)0xF01BA).toe0l -#define TOE0L_bit (*(volatile union un_toe0l *)0xF01BA).BIT -#define TOL0 (*(volatile unsigned short *)0xF01BC) -#define TOL0L (*(volatile unsigned char *)0xF01BC) -#define TOM0 (*(volatile unsigned short *)0xF01BE) -#define TOM0L (*(volatile unsigned char *)0xF01BE) -#define IICCTL00 (*(volatile union un_iicctl00 *)0xF0230).iicctl00 -#define IICCTL00_bit (*(volatile union un_iicctl00 *)0xF0230).BIT -#define IICCTL01 (*(volatile union un_iicctl01 *)0xF0231).iicctl01 -#define IICCTL01_bit (*(volatile union un_iicctl01 *)0xF0231).BIT -#define IICWL0 (*(volatile unsigned char *)0xF0232) -#define IICWH0 (*(volatile unsigned char *)0xF0233) -#define SVA0 (*(volatile unsigned char *)0xF0234) -#define IICSE0 (*(volatile unsigned char *)0xF0235) -#define CRC0CTL (*(volatile union un_crc0ctl *)0xF02F0).crc0ctl -#define CRC0CTL_bit (*(volatile union un_crc0ctl *)0xF02F0).BIT -#define PGCRCL (*(volatile unsigned short *)0xF02F2) -#define CRCD (*(volatile unsigned short *)0xF02FA) - -/* - Sfr bits - */ -#define ADTYP ADM2_bit.no0 -#define AWC ADM2_bit.no2 -#define ADRCK ADM2_bit.no3 -#define DFLEN DFLCTL_bit.no0 -#define BRSAM BECTL_bit.no0 -#define ESQST FSSE_bit.no7 -#define DIVST MDUC_bit.no0 -#define MACSF MDUC_bit.no1 -#define MACOF MDUC_bit.no2 -#define MDSM MDUC_bit.no3 -#define MACMODE MDUC_bit.no6 -#define DIVMODE MDUC_bit.no7 -#define TAU0EN PER0_bit.no0 -#define SAU0EN PER0_bit.no2 -#define SAU1EN PER0_bit.no3 -#define IICA0EN PER0_bit.no4 -#define ADCEN PER0_bit.no5 -#define RTCEN PER0_bit.no7 -#define PAENB RMC_bit.no0 -#define WDVOL RMC_bit.no7 -#define RPEF RPECTL_bit.no0 -#define RPERDIS RPECTL_bit.no7 -#define SPT0 IICCTL00_bit.no0 -#define STT0 IICCTL00_bit.no1 -#define ACKE0 IICCTL00_bit.no2 -#define WTIM0 IICCTL00_bit.no3 -#define SPIE0 IICCTL00_bit.no4 -#define WREL0 IICCTL00_bit.no5 -#define LREL0 IICCTL00_bit.no6 -#define IICE0 IICCTL00_bit.no7 -#define PRS0 IICCTL01_bit.no0 -#define DFC0 IICCTL01_bit.no2 -#define SMC0 IICCTL01_bit.no3 -#define DAD0 IICCTL01_bit.no4 -#define CLD0 IICCTL01_bit.no5 -#define WUP0 IICCTL01_bit.no7 -#define CRC0EN CRC0CTL_bit.no7 - -/* - Interrupt vector addresses - */ -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C.h deleted file mode 100644 index dfd868535..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C.h +++ /dev/null @@ -1,903 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78G1C */ -/* FILE : iodefine.h */ -/* DESCRIPTION : Definition of I/O Registers */ -/* CPU SERIES : RL78 - G1C */ -/* CPU TYPE : R5F10JGC */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F10JGC.DVF */ -/* Copyright(C) 2012 Renesas */ -/* File Version V1.00 */ -/* Tool Version 1.9.7121 */ -/* Date Generated 13/11/2012 */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_H -#define IODEFINE_H - -/* - IO Registers - */ -union un_p0 { - unsigned char p0; - __BITS8 BIT; -}; -union un_p1 { - unsigned char p1; - __BITS8 BIT; -}; -union un_p2 { - unsigned char p2; - __BITS8 BIT; -}; -union un_p3 { - unsigned char p3; - __BITS8 BIT; -}; -union un_p4 { - unsigned char p4; - __BITS8 BIT; -}; -union un_p5 { - unsigned char p5; - __BITS8 BIT; -}; -union un_p6 { - unsigned char p6; - __BITS8 BIT; -}; -union un_p7 { - unsigned char p7; - __BITS8 BIT; -}; -union un_p12 { - unsigned char p12; - __BITS8 BIT; -}; -union un_p13 { - unsigned char p13; - __BITS8 BIT; -}; -union un_p14 { - unsigned char p14; - __BITS8 BIT; -}; -union un_pm0 { - unsigned char pm0; - __BITS8 BIT; -}; -union un_pm1 { - unsigned char pm1; - __BITS8 BIT; -}; -union un_pm2 { - unsigned char pm2; - __BITS8 BIT; -}; -union un_pm3 { - unsigned char pm3; - __BITS8 BIT; -}; -union un_pm4 { - unsigned char pm4; - __BITS8 BIT; -}; -union un_pm5 { - unsigned char pm5; - __BITS8 BIT; -}; -union un_pm6 { - unsigned char pm6; - __BITS8 BIT; -}; -union un_pm7 { - unsigned char pm7; - __BITS8 BIT; -}; -union un_pm12 { - unsigned char pm12; - __BITS8 BIT; -}; -union un_pm14 { - unsigned char pm14; - __BITS8 BIT; -}; -union un_adm0 { - unsigned char adm0; - __BITS8 BIT; -}; -union un_ads { - unsigned char ads; - __BITS8 BIT; -}; -union un_adm1 { - unsigned char adm1; - __BITS8 BIT; -}; -union un_krm { - unsigned char krm; - __BITS8 BIT; -}; -union un_egp0 { - unsigned char egp0; - __BITS8 BIT; -}; -union un_egn0 { - unsigned char egn0; - __BITS8 BIT; -}; -union un_egp1 { - unsigned char egp1; - __BITS8 BIT; -}; -union un_egn1 { - unsigned char egn1; - __BITS8 BIT; -}; -union un_iics0 { - unsigned char iics0; - __BITS8 BIT; -}; -union un_iicf0 { - unsigned char iicf0; - __BITS8 BIT; -}; -union un_flars { - unsigned char flars; - __BITS8 BIT; -}; -union un_fssq { - unsigned char fssq; - __BITS8 BIT; -}; -union un_flrst { - unsigned char flrst; - __BITS8 BIT; -}; -union un_fsastl { - unsigned char fsastl; - __BITS8 BIT; -}; -union un_fsasth { - unsigned char fsasth; - __BITS8 BIT; -}; -union un_rtcc0 { - unsigned char rtcc0; - __BITS8 BIT; -}; -union un_rtcc1 { - unsigned char rtcc1; - __BITS8 BIT; -}; -union un_csc { - unsigned char csc; - __BITS8 BIT; -}; -union un_ostc { - unsigned char ostc; - __BITS8 BIT; -}; -union un_ckc { - unsigned char ckc; - __BITS8 BIT; -}; -union un_cks0 { - unsigned char cks0; - __BITS8 BIT; -}; -union un_cks1 { - unsigned char cks1; - __BITS8 BIT; -}; -union un_lvim { - unsigned char lvim; - __BITS8 BIT; -}; -union un_lvis { - unsigned char lvis; - __BITS8 BIT; -}; -union un_monsta0 { - unsigned char monsta0; - __BITS8 BIT; -}; -union un_asim { - unsigned char asim; - __BITS8 BIT; -}; -union un_dmc0 { - unsigned char dmc0; - __BITS8 BIT; -}; -union un_dmc1 { - unsigned char dmc1; - __BITS8 BIT; -}; -union un_drc0 { - unsigned char drc0; - __BITS8 BIT; -}; -union un_drc1 { - unsigned char drc1; - __BITS8 BIT; -}; -union un_if2 { - unsigned short if2; - __BITS16 BIT; -}; -union un_if2l { - unsigned char if2l; - __BITS8 BIT; -}; -union un_if2h { - unsigned char if2h; - __BITS8 BIT; -}; -union un_mk2 { - unsigned short mk2; - __BITS16 BIT; -}; -union un_mk2l { - unsigned char mk2l; - __BITS8 BIT; -}; -union un_mk2h { - unsigned char mk2h; - __BITS8 BIT; -}; -union un_pr02 { - unsigned short pr02; - __BITS16 BIT; -}; -union un_pr02l { - unsigned char pr02l; - __BITS8 BIT; -}; -union un_pr02h { - unsigned char pr02h; - __BITS8 BIT; -}; -union un_pr12 { - unsigned short pr12; - __BITS16 BIT; -}; -union un_pr12l { - unsigned char pr12l; - __BITS8 BIT; -}; -union un_pr12h { - unsigned char pr12h; - __BITS8 BIT; -}; -union un_if0 { - unsigned short if0; - __BITS16 BIT; -}; -union un_if0l { - unsigned char if0l; - __BITS8 BIT; -}; -union un_if0h { - unsigned char if0h; - __BITS8 BIT; -}; -union un_if1 { - unsigned short if1; - __BITS16 BIT; -}; -union un_if1l { - unsigned char if1l; - __BITS8 BIT; -}; -union un_if1h { - unsigned char if1h; - __BITS8 BIT; -}; -union un_mk0 { - unsigned short mk0; - __BITS16 BIT; -}; -union un_mk0l { - unsigned char mk0l; - __BITS8 BIT; -}; -union un_mk0h { - unsigned char mk0h; - __BITS8 BIT; -}; -union un_mk1 { - unsigned short mk1; - __BITS16 BIT; -}; -union un_mk1l { - unsigned char mk1l; - __BITS8 BIT; -}; -union un_mk1h { - unsigned char mk1h; - __BITS8 BIT; -}; -union un_pr00 { - unsigned short pr00; - __BITS16 BIT; -}; -union un_pr00l { - unsigned char pr00l; - __BITS8 BIT; -}; -union un_pr00h { - unsigned char pr00h; - __BITS8 BIT; -}; -union un_pr01 { - unsigned short pr01; - __BITS16 BIT; -}; -union un_pr01l { - unsigned char pr01l; - __BITS8 BIT; -}; -union un_pr01h { - unsigned char pr01h; - __BITS8 BIT; -}; -union un_pr10 { - unsigned short pr10; - __BITS16 BIT; -}; -union un_pr10l { - unsigned char pr10l; - __BITS8 BIT; -}; -union un_pr10h { - unsigned char pr10h; - __BITS8 BIT; -}; -union un_pr11 { - unsigned short pr11; - __BITS16 BIT; -}; -union un_pr11l { - unsigned char pr11l; - __BITS8 BIT; -}; -union un_pr11h { - unsigned char pr11h; - __BITS8 BIT; -}; -union un_pmc { - unsigned char pmc; - __BITS8 BIT; -}; - -#define P0 (*(volatile union un_p0 *)0xFFF00).p0 -#define P0_bit (*(volatile union un_p0 *)0xFFF00).BIT -#define P1 (*(volatile union un_p1 *)0xFFF01).p1 -#define P1_bit (*(volatile union un_p1 *)0xFFF01).BIT -#define P2 (*(volatile union un_p2 *)0xFFF02).p2 -#define P2_bit (*(volatile union un_p2 *)0xFFF02).BIT -#define P3 (*(volatile union un_p3 *)0xFFF03).p3 -#define P3_bit (*(volatile union un_p3 *)0xFFF03).BIT -#define P4 (*(volatile union un_p4 *)0xFFF04).p4 -#define P4_bit (*(volatile union un_p4 *)0xFFF04).BIT -#define P5 (*(volatile union un_p5 *)0xFFF05).p5 -#define P5_bit (*(volatile union un_p5 *)0xFFF05).BIT -#define P6 (*(volatile union un_p6 *)0xFFF06).p6 -#define P6_bit (*(volatile union un_p6 *)0xFFF06).BIT -#define P7 (*(volatile union un_p7 *)0xFFF07).p7 -#define P7_bit (*(volatile union un_p7 *)0xFFF07).BIT -#define P12 (*(volatile union un_p12 *)0xFFF0C).p12 -#define P12_bit (*(volatile union un_p12 *)0xFFF0C).BIT -#define P13 (*(volatile union un_p13 *)0xFFF0D).p13 -#define P13_bit (*(volatile union un_p13 *)0xFFF0D).BIT -#define P14 (*(volatile union un_p14 *)0xFFF0E).p14 -#define P14_bit (*(volatile union un_p14 *)0xFFF0E).BIT -#define SDR00 (*(volatile unsigned short *)0xFFF10) -#define SIO00 (*(volatile unsigned char *)0xFFF10) -#define TXD0 (*(volatile unsigned char *)0xFFF10) -#define SDR01 (*(volatile unsigned short *)0xFFF12) -#define RXD0 (*(volatile unsigned char *)0xFFF12) -#define SIO01 (*(volatile unsigned char *)0xFFF12) -#define TDR00 (*(volatile unsigned short *)0xFFF18) -#define TDR01 (*(volatile unsigned short *)0xFFF1A) -#define TDR01L (*(volatile unsigned char *)0xFFF1A) -#define TDR01H (*(volatile unsigned char *)0xFFF1B) -#define ADCR (*(volatile unsigned short *)0xFFF1E) -#define ADCRH (*(volatile unsigned char *)0xFFF1F) -#define PM0 (*(volatile union un_pm0 *)0xFFF20).pm0 -#define PM0_bit (*(volatile union un_pm0 *)0xFFF20).BIT -#define PM1 (*(volatile union un_pm1 *)0xFFF21).pm1 -#define PM1_bit (*(volatile union un_pm1 *)0xFFF21).BIT -#define PM2 (*(volatile union un_pm2 *)0xFFF22).pm2 -#define PM2_bit (*(volatile union un_pm2 *)0xFFF22).BIT -#define PM3 (*(volatile union un_pm3 *)0xFFF23).pm3 -#define PM3_bit (*(volatile union un_pm3 *)0xFFF23).BIT -#define PM4 (*(volatile union un_pm4 *)0xFFF24).pm4 -#define PM4_bit (*(volatile union un_pm4 *)0xFFF24).BIT -#define PM5 (*(volatile union un_pm5 *)0xFFF25).pm5 -#define PM5_bit (*(volatile union un_pm5 *)0xFFF25).BIT -#define PM6 (*(volatile union un_pm6 *)0xFFF26).pm6 -#define PM6_bit (*(volatile union un_pm6 *)0xFFF26).BIT -#define PM7 (*(volatile union un_pm7 *)0xFFF27).pm7 -#define PM7_bit (*(volatile union un_pm7 *)0xFFF27).BIT -#define PM12 (*(volatile union un_pm12 *)0xFFF2C).pm12 -#define PM12_bit (*(volatile union un_pm12 *)0xFFF2C).BIT -#define PM14 (*(volatile union un_pm14 *)0xFFF2E).pm14 -#define PM14_bit (*(volatile union un_pm14 *)0xFFF2E).BIT -#define ADM0 (*(volatile union un_adm0 *)0xFFF30).adm0 -#define ADM0_bit (*(volatile union un_adm0 *)0xFFF30).BIT -#define ADS (*(volatile union un_ads *)0xFFF31).ads -#define ADS_bit (*(volatile union un_ads *)0xFFF31).BIT -#define ADM1 (*(volatile union un_adm1 *)0xFFF32).adm1 -#define ADM1_bit (*(volatile union un_adm1 *)0xFFF32).BIT -#define KRM (*(volatile union un_krm *)0xFFF37).krm -#define KRM_bit (*(volatile union un_krm *)0xFFF37).BIT -#define EGP0 (*(volatile union un_egp0 *)0xFFF38).egp0 -#define EGP0_bit (*(volatile union un_egp0 *)0xFFF38).BIT -#define EGN0 (*(volatile union un_egn0 *)0xFFF39).egn0 -#define EGN0_bit (*(volatile union un_egn0 *)0xFFF39).BIT -#define EGP1 (*(volatile union un_egp1 *)0xFFF3A).egp1 -#define EGP1_bit (*(volatile union un_egp1 *)0xFFF3A).BIT -#define EGN1 (*(volatile union un_egn1 *)0xFFF3B).egn1 -#define EGN1_bit (*(volatile union un_egn1 *)0xFFF3B).BIT -#define IICA0 (*(volatile unsigned char *)0xFFF50) -#define IICS0 (*(volatile union un_iics0 *)0xFFF51).iics0 -#define IICS0_bit (*(volatile union un_iics0 *)0xFFF51).BIT -#define IICF0 (*(volatile union un_iicf0 *)0xFFF52).iicf0 -#define IICF0_bit (*(volatile union un_iicf0 *)0xFFF52).BIT -#define CFIFO (*(volatile unsigned short *)0xFFF54) -#define CFIFOL (*(volatile unsigned char *)0xFFF54) -#define D0FIFO (*(volatile unsigned short *)0xFFF58) -#define D0FIFOL (*(volatile unsigned char *)0xFFF58) -#define D1FIFO (*(volatile unsigned short *)0xFFF5C) -#define D1FIFOL (*(volatile unsigned char *)0xFFF5C) -#define TDR02 (*(volatile unsigned short *)0xFFF64) -#define TDR03 (*(volatile unsigned short *)0xFFF66) -#define TDR03L (*(volatile unsigned char *)0xFFF66) -#define TDR03H (*(volatile unsigned char *)0xFFF67) -#define FLPMC (*(volatile unsigned char *)0xFFF80) -#define FLARS (*(volatile union un_flars *)0xFFF81).flars -#define FLARS_bit (*(volatile union un_flars *)0xFFF81).BIT -#define FLAPL (*(volatile unsigned short *)0xFFF82) -#define FLAPH (*(volatile unsigned char *)0xFFF84) -#define FSSQ (*(volatile union un_fssq *)0xFFF85).fssq -#define FSSQ_bit (*(volatile union un_fssq *)0xFFF85).BIT -#define FLSEDL (*(volatile unsigned short *)0xFFF86) -#define FLSEDH (*(volatile unsigned char *)0xFFF88) -#define FLRST (*(volatile union un_flrst *)0xFFF89).flrst -#define FLRST_bit (*(volatile union un_flrst *)0xFFF89).BIT -#define FSASTL (*(volatile union un_fsastl *)0xFFF8A).fsastl -#define FSASTL_bit (*(volatile union un_fsastl *)0xFFF8A).BIT -#define FSASTH (*(volatile union un_fsasth *)0xFFF8B).fsasth -#define FSASTH_bit (*(volatile union un_fsasth *)0xFFF8B).BIT -#define FLWL (*(volatile unsigned short *)0xFFF8C) -#define FLWH (*(volatile unsigned short *)0xFFF8E) -#define ITMC (*(volatile unsigned short *)0xFFF90) -#define SEC (*(volatile unsigned char *)0xFFF92) -#define MIN (*(volatile unsigned char *)0xFFF93) -#define HOUR (*(volatile unsigned char *)0xFFF94) -#define WEEK (*(volatile unsigned char *)0xFFF95) -#define DAY (*(volatile unsigned char *)0xFFF96) -#define MONTH (*(volatile unsigned char *)0xFFF97) -#define YEAR (*(volatile unsigned char *)0xFFF98) -#define SUBCUD (*(volatile unsigned char *)0xFFF99) -#define ALARMWM (*(volatile unsigned char *)0xFFF9A) -#define ALARMWH (*(volatile unsigned char *)0xFFF9B) -#define ALARMWW (*(volatile unsigned char *)0xFFF9C) -#define RTCC0 (*(volatile union un_rtcc0 *)0xFFF9D).rtcc0 -#define RTCC0_bit (*(volatile union un_rtcc0 *)0xFFF9D).BIT -#define RTCC1 (*(volatile union un_rtcc1 *)0xFFF9E).rtcc1 -#define RTCC1_bit (*(volatile union un_rtcc1 *)0xFFF9E).BIT -#define CMC (*(volatile unsigned char *)0xFFFA0) -#define CSC (*(volatile union un_csc *)0xFFFA1).csc -#define CSC_bit (*(volatile union un_csc *)0xFFFA1).BIT -#define OSTC (*(volatile union un_ostc *)0xFFFA2).ostc -#define OSTC_bit (*(volatile union un_ostc *)0xFFFA2).BIT -#define OSTS (*(volatile unsigned char *)0xFFFA3) -#define CKC (*(volatile union un_ckc *)0xFFFA4).ckc -#define CKC_bit (*(volatile union un_ckc *)0xFFFA4).BIT -#define CKS0 (*(volatile union un_cks0 *)0xFFFA5).cks0 -#define CKS0_bit (*(volatile union un_cks0 *)0xFFFA5).BIT -#define CKS1 (*(volatile union un_cks1 *)0xFFFA6).cks1 -#define CKS1_bit (*(volatile union un_cks1 *)0xFFFA6).BIT -#define RESF (*(volatile unsigned char *)0xFFFA8) -#define LVIM (*(volatile union un_lvim *)0xFFFA9).lvim -#define LVIM_bit (*(volatile union un_lvim *)0xFFFA9).BIT -#define LVIS (*(volatile union un_lvis *)0xFFFAA).lvis -#define LVIS_bit (*(volatile union un_lvis *)0xFFFAA).BIT -#define WDTE (*(volatile unsigned char *)0xFFFAB) -#define CRCIN (*(volatile unsigned char *)0xFFFAC) -#define RXB (*(volatile unsigned char *)0xFFFAD) -#define TXS (*(volatile unsigned char *)0xFFFAD) -#define MONSTA0 (*(volatile union un_monsta0 *)0xFFFAE).monsta0 -#define MONSTA0_bit (*(volatile union un_monsta0 *)0xFFFAE).BIT -#define ASIM (*(volatile union un_asim *)0xFFFAF).asim -#define ASIM_bit (*(volatile union un_asim *)0xFFFAF).BIT -#define DSA0 (*(volatile unsigned char *)0xFFFB0) -#define DSA1 (*(volatile unsigned char *)0xFFFB1) -#define DRA0 (*(volatile unsigned short *)0xFFFB2) -#define DRA0L (*(volatile unsigned char *)0xFFFB2) -#define DRA0H (*(volatile unsigned char *)0xFFFB3) -#define DRA1 (*(volatile unsigned short *)0xFFFB4) -#define DRA1L (*(volatile unsigned char *)0xFFFB4) -#define DRA1H (*(volatile unsigned char *)0xFFFB5) -#define DBC0 (*(volatile unsigned short *)0xFFFB6) -#define DBC0L (*(volatile unsigned char *)0xFFFB6) -#define DBC0H (*(volatile unsigned char *)0xFFFB7) -#define DBC1 (*(volatile unsigned short *)0xFFFB8) -#define DBC1L (*(volatile unsigned char *)0xFFFB8) -#define DBC1H (*(volatile unsigned char *)0xFFFB9) -#define DMC0 (*(volatile union un_dmc0 *)0xFFFBA).dmc0 -#define DMC0_bit (*(volatile union un_dmc0 *)0xFFFBA).BIT -#define DMC1 (*(volatile union un_dmc1 *)0xFFFBB).dmc1 -#define DMC1_bit (*(volatile union un_dmc1 *)0xFFFBB).BIT -#define DRC0 (*(volatile union un_drc0 *)0xFFFBC).drc0 -#define DRC0_bit (*(volatile union un_drc0 *)0xFFFBC).BIT -#define DRC1 (*(volatile union un_drc1 *)0xFFFBD).drc1 -#define DRC1_bit (*(volatile union un_drc1 *)0xFFFBD).BIT -#define IF2 (*(volatile union un_if2 *)0xFFFD0).if2 -#define IF2_bit (*(volatile union un_if2 *)0xFFFD0).BIT -#define IF2L (*(volatile union un_if2l *)0xFFFD0).if2l -#define IF2L_bit (*(volatile union un_if2l *)0xFFFD0).BIT -#define IF2H (*(volatile union un_if2h *)0xFFFD1).if2h -#define IF2H_bit (*(volatile union un_if2h *)0xFFFD1).BIT -#define MK2 (*(volatile union un_mk2 *)0xFFFD4).mk2 -#define MK2_bit (*(volatile union un_mk2 *)0xFFFD4).BIT -#define MK2L (*(volatile union un_mk2l *)0xFFFD4).mk2l -#define MK2L_bit (*(volatile union un_mk2l *)0xFFFD4).BIT -#define MK2H (*(volatile union un_mk2h *)0xFFFD5).mk2h -#define MK2H_bit (*(volatile union un_mk2h *)0xFFFD5).BIT -#define PR02 (*(volatile union un_pr02 *)0xFFFD8).pr02 -#define PR02_bit (*(volatile union un_pr02 *)0xFFFD8).BIT -#define PR02L (*(volatile union un_pr02l *)0xFFFD8).pr02l -#define PR02L_bit (*(volatile union un_pr02l *)0xFFFD8).BIT -#define PR02H (*(volatile union un_pr02h *)0xFFFD9).pr02h -#define PR02H_bit (*(volatile union un_pr02h *)0xFFFD9).BIT -#define PR12 (*(volatile union un_pr12 *)0xFFFDC).pr12 -#define PR12_bit (*(volatile union un_pr12 *)0xFFFDC).BIT -#define PR12L (*(volatile union un_pr12l *)0xFFFDC).pr12l -#define PR12L_bit (*(volatile union un_pr12l *)0xFFFDC).BIT -#define PR12H (*(volatile union un_pr12h *)0xFFFDD).pr12h -#define PR12H_bit (*(volatile union un_pr12h *)0xFFFDD).BIT -#define IF0 (*(volatile union un_if0 *)0xFFFE0).if0 -#define IF0_bit (*(volatile union un_if0 *)0xFFFE0).BIT -#define IF0L (*(volatile union un_if0l *)0xFFFE0).if0l -#define IF0L_bit (*(volatile union un_if0l *)0xFFFE0).BIT -#define IF0H (*(volatile union un_if0h *)0xFFFE1).if0h -#define IF0H_bit (*(volatile union un_if0h *)0xFFFE1).BIT -#define IF1 (*(volatile union un_if1 *)0xFFFE2).if1 -#define IF1_bit (*(volatile union un_if1 *)0xFFFE2).BIT -#define IF1L (*(volatile union un_if1l *)0xFFFE2).if1l -#define IF1L_bit (*(volatile union un_if1l *)0xFFFE2).BIT -#define IF1H (*(volatile union un_if1h *)0xFFFE3).if1h -#define IF1H_bit (*(volatile union un_if1h *)0xFFFE3).BIT -#define MK0 (*(volatile union un_mk0 *)0xFFFE4).mk0 -#define MK0_bit (*(volatile union un_mk0 *)0xFFFE4).BIT -#define MK0L (*(volatile union un_mk0l *)0xFFFE4).mk0l -#define MK0L_bit (*(volatile union un_mk0l *)0xFFFE4).BIT -#define MK0H (*(volatile union un_mk0h *)0xFFFE5).mk0h -#define MK0H_bit (*(volatile union un_mk0h *)0xFFFE5).BIT -#define MK1 (*(volatile union un_mk1 *)0xFFFE6).mk1 -#define MK1_bit (*(volatile union un_mk1 *)0xFFFE6).BIT -#define MK1L (*(volatile union un_mk1l *)0xFFFE6).mk1l -#define MK1L_bit (*(volatile union un_mk1l *)0xFFFE6).BIT -#define MK1H (*(volatile union un_mk1h *)0xFFFE7).mk1h -#define MK1H_bit (*(volatile union un_mk1h *)0xFFFE7).BIT -#define PR00 (*(volatile union un_pr00 *)0xFFFE8).pr00 -#define PR00_bit (*(volatile union un_pr00 *)0xFFFE8).BIT -#define PR00L (*(volatile union un_pr00l *)0xFFFE8).pr00l -#define PR00L_bit (*(volatile union un_pr00l *)0xFFFE8).BIT -#define PR00H (*(volatile union un_pr00h *)0xFFFE9).pr00h -#define PR00H_bit (*(volatile union un_pr00h *)0xFFFE9).BIT -#define PR01 (*(volatile union un_pr01 *)0xFFFEA).pr01 -#define PR01_bit (*(volatile union un_pr01 *)0xFFFEA).BIT -#define PR01L (*(volatile union un_pr01l *)0xFFFEA).pr01l -#define PR01L_bit (*(volatile union un_pr01l *)0xFFFEA).BIT -#define PR01H (*(volatile union un_pr01h *)0xFFFEB).pr01h -#define PR01H_bit (*(volatile union un_pr01h *)0xFFFEB).BIT -#define PR10 (*(volatile union un_pr10 *)0xFFFEC).pr10 -#define PR10_bit (*(volatile union un_pr10 *)0xFFFEC).BIT -#define PR10L (*(volatile union un_pr10l *)0xFFFEC).pr10l -#define PR10L_bit (*(volatile union un_pr10l *)0xFFFEC).BIT -#define PR10H (*(volatile union un_pr10h *)0xFFFED).pr10h -#define PR10H_bit (*(volatile union un_pr10h *)0xFFFED).BIT -#define PR11 (*(volatile union un_pr11 *)0xFFFEE).pr11 -#define PR11_bit (*(volatile union un_pr11 *)0xFFFEE).BIT -#define PR11L (*(volatile union un_pr11l *)0xFFFEE).pr11l -#define PR11L_bit (*(volatile union un_pr11l *)0xFFFEE).BIT -#define PR11H (*(volatile union un_pr11h *)0xFFFEF).pr11h -#define PR11H_bit (*(volatile union un_pr11h *)0xFFFEF).BIT -#define MDAL (*(volatile unsigned short *)0xFFFF0) -#define MULA (*(volatile unsigned short *)0xFFFF0) -#define MDAH (*(volatile unsigned short *)0xFFFF2) -#define MULB (*(volatile unsigned short *)0xFFFF2) -#define MDBH (*(volatile unsigned short *)0xFFFF4) -#define MULOH (*(volatile unsigned short *)0xFFFF4) -#define MDBL (*(volatile unsigned short *)0xFFFF6) -#define MULOL (*(volatile unsigned short *)0xFFFF6) -#define PMC (*(volatile union un_pmc *)0xFFFFE).pmc -#define PMC_bit (*(volatile union un_pmc *)0xFFFFE).BIT - -/* - Sfr bits - */ -#define ADCE ADM0_bit.no0 -#define ADCS ADM0_bit.no7 -#define SPD0 IICS0_bit.no0 -#define STD0 IICS0_bit.no1 -#define ACKD0 IICS0_bit.no2 -#define TRC0 IICS0_bit.no3 -#define COI0 IICS0_bit.no4 -#define EXC0 IICS0_bit.no5 -#define ALD0 IICS0_bit.no6 -#define MSTS0 IICS0_bit.no7 -#define IICRSV0 IICF0_bit.no0 -#define STCEN0 IICF0_bit.no1 -#define IICBSY0 IICF0_bit.no6 -#define STCF0 IICF0_bit.no7 -#define FSSTP FSSQ_bit.no6 -#define SQST FSSQ_bit.no7 -#define SQEND FSASTH_bit.no6 -#define ESQEND FSASTH_bit.no7 -#define RCLOE1 RTCC0_bit.no5 -#define RTCE RTCC0_bit.no7 -#define RWAIT RTCC1_bit.no0 -#define RWST RTCC1_bit.no1 -#define RIFG RTCC1_bit.no3 -#define WAFG RTCC1_bit.no4 -#define WALIE RTCC1_bit.no6 -#define WALE RTCC1_bit.no7 -#define HIOSTOP CSC_bit.no0 -#define XTSTOP CSC_bit.no6 -#define MSTOP CSC_bit.no7 -#define SDIV CKC_bit.no3 -#define MCM0 CKC_bit.no4 -#define MCS CKC_bit.no5 -#define CSS CKC_bit.no6 -#define CLS CKC_bit.no7 -#define PCLOE0 CKS0_bit.no7 -#define PCLOE1 CKS1_bit.no7 -#define LVIF LVIM_bit.no0 -#define LVIOMSK LVIM_bit.no1 -#define LVISEN LVIM_bit.no7 -#define LVILV LVIS_bit.no0 -#define LVIMD LVIS_bit.no7 -#define DWAIT0 DMC0_bit.no4 -#define DS0 DMC0_bit.no5 -#define DRS0 DMC0_bit.no6 -#define STG0 DMC0_bit.no7 -#define DWAIT1 DMC1_bit.no4 -#define DS1 DMC1_bit.no5 -#define DRS1 DMC1_bit.no6 -#define STG1 DMC1_bit.no7 -#define DST0 DRC0_bit.no0 -#define DEN0 DRC0_bit.no7 -#define DST1 DRC1_bit.no0 -#define DEN1 DRC1_bit.no7 -#define PIF6 IF2_bit.no3 -#define PIF8 IF2_bit.no5 -#define PIF9 IF2_bit.no6 -#define MDIF IF2H_bit.no5 -#define FLIF IF2H_bit.no7 -#define PMK6 MK2_bit.no3 -#define PMK8 MK2_bit.no5 -#define PMK9 MK2_bit.no6 -#define MDMK MK2H_bit.no5 -#define FLMK MK2H_bit.no7 -#define PPR06 PR02_bit.no3 -#define PPR08 PR02_bit.no5 -#define PPR09 PR02_bit.no6 -#define MDPR0 PR02H_bit.no5 -#define FLPR0 PR02H_bit.no7 -#define PPR16 PR12_bit.no3 -#define PPR18 PR12_bit.no5 -#define PPR19 PR12_bit.no6 -#define MDPR1 PR12H_bit.no5 -#define FLPR1 PR12H_bit.no7 -#define WDTIIF IF0_bit.no0 -#define LVIIF IF0_bit.no1 -#define PIF0 IF0_bit.no2 -#define PIF1 IF0_bit.no3 -#define PIF2 IF0_bit.no4 -#define PIF3 IF0_bit.no5 -#define PIF4 IF0_bit.no6 -#define PIF5 IF0_bit.no7 -#define DMAIF0 IF0H_bit.no3 -#define DMAIF1 IF0H_bit.no4 -#define CSIIF00 IF0H_bit.no5 -#define IICIF00 IF0H_bit.no5 -#define STIF0 IF0H_bit.no5 -#define TMIF00 IF0H_bit.no6 -#define CSIIF01 IF0H_bit.no7 -#define IICIF01 IF0H_bit.no7 -#define SRIF0 IF0H_bit.no7 -#define SREIF0 IF1_bit.no0 -#define TMIF01H IF1_bit.no0 -#define TMIF03H IF1_bit.no3 -#define IICAIF0 IF1_bit.no4 -#define TMIF01 IF1_bit.no5 -#define TMIF02 IF1_bit.no6 -#define TMIF03 IF1_bit.no7 -#define ADIF IF1H_bit.no0 -#define RTCIF IF1H_bit.no1 -#define ITIF IF1H_bit.no2 -#define KRIF IF1H_bit.no3 -#define USBIF IF1H_bit.no4 -#define RSUIF IF1H_bit.no5 -#define WDTIMK MK0_bit.no0 -#define LVIMK MK0_bit.no1 -#define PMK0 MK0_bit.no2 -#define PMK1 MK0_bit.no3 -#define PMK2 MK0_bit.no4 -#define PMK3 MK0_bit.no5 -#define PMK4 MK0_bit.no6 -#define PMK5 MK0_bit.no7 -#define DMAMK0 MK0H_bit.no3 -#define DMAMK1 MK0H_bit.no4 -#define CSIMK00 MK0H_bit.no5 -#define IICMK00 MK0H_bit.no5 -#define STMK0 MK0H_bit.no5 -#define TMMK00 MK0H_bit.no6 -#define CSIMK01 MK0H_bit.no7 -#define IICMK01 MK0H_bit.no7 -#define SRMK0 MK0H_bit.no7 -#define SREMK0 MK1_bit.no0 -#define TMMK01H MK1_bit.no0 -#define TMMK03H MK1_bit.no3 -#define IICAMK0 MK1_bit.no4 -#define TMMK01 MK1_bit.no5 -#define TMMK02 MK1_bit.no6 -#define TMMK03 MK1_bit.no7 -#define ADMK MK1H_bit.no0 -#define RTCMK MK1H_bit.no1 -#define ITMK MK1H_bit.no2 -#define KRMK MK1H_bit.no3 -#define USBMK MK1H_bit.no4 -#define RSUMK MK1H_bit.no5 -#define WDTIPR0 PR00_bit.no0 -#define LVIPR0 PR00_bit.no1 -#define PPR00 PR00_bit.no2 -#define PPR01 PR00_bit.no3 -#define PPR02 PR00_bit.no4 -#define PPR03 PR00_bit.no5 -#define PPR04 PR00_bit.no6 -#define PPR05 PR00_bit.no7 -#define DMAPR00 PR00H_bit.no3 -#define DMAPR01 PR00H_bit.no4 -#define CSIPR000 PR00H_bit.no5 -#define IICPR000 PR00H_bit.no5 -#define STPR00 PR00H_bit.no5 -#define TMPR000 PR00H_bit.no6 -#define CSIPR001 PR00H_bit.no7 -#define IICPR001 PR00H_bit.no7 -#define SRPR00 PR00H_bit.no7 -#define SREPR00 PR01_bit.no0 -#define TMPR001H PR01_bit.no0 -#define TMPR003H PR01_bit.no3 -#define IICAPR00 PR01_bit.no4 -#define TMPR001 PR01_bit.no5 -#define TMPR002 PR01_bit.no6 -#define TMPR003 PR01_bit.no7 -#define ADPR0 PR01H_bit.no0 -#define RTCPR0 PR01H_bit.no1 -#define ITPR0 PR01H_bit.no2 -#define KRPR0 PR01H_bit.no3 -#define USBPR0 PR01H_bit.no4 -#define RSUPR0 PR01H_bit.no5 -#define WDTIPR1 PR10_bit.no0 -#define LVIPR1 PR10_bit.no1 -#define PPR10 PR10_bit.no2 -#define PPR11 PR10_bit.no3 -#define PPR12 PR10_bit.no4 -#define PPR13 PR10_bit.no5 -#define PPR14 PR10_bit.no6 -#define PPR15 PR10_bit.no7 -#define DMAPR10 PR10H_bit.no3 -#define DMAPR11 PR10H_bit.no4 -#define CSIPR100 PR10H_bit.no5 -#define IICPR100 PR10H_bit.no5 -#define STPR10 PR10H_bit.no5 -#define TMPR100 PR10H_bit.no6 -#define CSIPR101 PR10H_bit.no7 -#define IICPR101 PR10H_bit.no7 -#define SRPR10 PR10H_bit.no7 -#define SREPR10 PR11_bit.no0 -#define TMPR101H PR11_bit.no0 -#define TMPR103H PR11_bit.no3 -#define IICAPR10 PR11_bit.no4 -#define TMPR101 PR11_bit.no5 -#define TMPR102 PR11_bit.no6 -#define TMPR103 PR11_bit.no7 -#define ADPR1 PR11H_bit.no0 -#define RTCPR1 PR11H_bit.no1 -#define ITPR1 PR11H_bit.no2 -#define KRPR1 PR11H_bit.no3 -#define USBPR1 PR11H_bit.no4 -#define RSUPR1 PR11H_bit.no5 -#define MAA PMC_bit.no0 - -/* - Interrupt vector addresses - */ -#define RST_vect (0x0) -#define INTDBG_vect (0x2) -#define INTSRO_vect (0x4) -#define INTWDTI_vect (0x4) -#define INTLVI_vect (0x6) -#define INTP0_vect (0x8) -#define INTP1_vect (0xA) -#define INTP2_vect (0xC) -#define INTP3_vect (0xE) -#define INTP4_vect (0x10) -#define INTP5_vect (0x12) -#define INTDMA0_vect (0x1A) -#define INTDMA1_vect (0x1C) -#define INTCSI00_vect (0x1E) -#define INTIIC00_vect (0x1E) -#define INTST0_vect (0x1E) -#define INTTM00_vect (0x20) -#define INTCSI01_vect (0x22) -#define INTIIC01_vect (0x22) -#define INTSR0_vect (0x22) -#define INTSRE0_vect (0x24) -#define INTTM01H_vect (0x24) -#define INTTM03H_vect (0x2A) -#define INTIICA0_vect (0x2C) -#define INTTM01_vect (0x2E) -#define INTTM02_vect (0x30) -#define INTTM03_vect (0x32) -#define INTAD_vect (0x34) -#define INTRTC_vect (0x36) -#define INTIT_vect (0x38) -#define INTKR_vect (0x3A) -#define INTUSB_vect (0x3C) -#define INTRSUM_vect (0x3E) -#define INTP6_vect (0x4A) -#define INTP8_vect (0x4E) -#define INTP9_vect (0x50) -#define INTMD_vect (0x5E) -#define INTFL_vect (0x62) -#define BRK_I_vect (0x7E) -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C_ext.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C_ext.h deleted file mode 100644 index e881e4b6a..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78G1C_ext.h +++ /dev/null @@ -1,530 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78G1C */ -/* FILE : iodefine_ext.h */ -/* DESCRIPTION : Definition of Extended SFRs */ -/* CPU SERIES : RL78 - G1C */ -/* CPU TYPE : R5F10JGC */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F10JGC.DVF */ -/* Copyright(C) 2012 Renesas */ -/* File Version V1.00 */ -/* Tool Version 1.9.7121 */ -/* Date Generated 13/11/2012 */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_EXT_H -#define IODEFINE_EXT_H - -/* - IO Registers - */ -union un_adm2 { - unsigned char adm2; - __BITS8 BIT; -}; -union un_pms { - unsigned char pms; - __BITS8 BIT; -}; -union un_pu0 { - unsigned char pu0; - __BITS8 BIT; -}; -union un_pu1 { - unsigned char pu1; - __BITS8 BIT; -}; -union un_pu3 { - unsigned char pu3; - __BITS8 BIT; -}; -union un_pu4 { - unsigned char pu4; - __BITS8 BIT; -}; -union un_pu5 { - unsigned char pu5; - __BITS8 BIT; -}; -union un_pu7 { - unsigned char pu7; - __BITS8 BIT; -}; -union un_pu12 { - unsigned char pu12; - __BITS8 BIT; -}; -union un_pu14 { - unsigned char pu14; - __BITS8 BIT; -}; -union un_pim0 { - unsigned char pim0; - __BITS8 BIT; -}; -union un_pim3 { - unsigned char pim3; - __BITS8 BIT; -}; -union un_pim5 { - unsigned char pim5; - __BITS8 BIT; -}; -union un_pom0 { - unsigned char pom0; - __BITS8 BIT; -}; -union un_pom3 { - unsigned char pom3; - __BITS8 BIT; -}; -union un_pom5 { - unsigned char pom5; - __BITS8 BIT; -}; -union un_pom7 { - unsigned char pom7; - __BITS8 BIT; -}; -union un_pmc12 { - unsigned char pmc12; - __BITS8 BIT; -}; -union un_nfen0 { - unsigned char nfen0; - __BITS8 BIT; -}; -union un_nfen1 { - unsigned char nfen1; - __BITS8 BIT; -}; -union un_isc { - unsigned char isc; - __BITS8 BIT; -}; -union un_dflctl { - unsigned char dflctl; - __BITS8 BIT; -}; -union un_bectl { - unsigned char bectl; - __BITS8 BIT; -}; -union un_fsse { - unsigned char fsse; - __BITS8 BIT; -}; -union un_pfs { - unsigned char pfs; - __BITS8 BIT; -}; -union un_mduc { - unsigned char mduc; - __BITS8 BIT; -}; -union un_per0 { - unsigned char per0; - __BITS8 BIT; -}; -union un_rmc { - unsigned char rmc; - __BITS8 BIT; -}; -union un_rpectl { - unsigned char rpectl; - __BITS8 BIT; -}; -union un_se0l { - unsigned char se0l; - __BITS8 BIT; -}; -union un_ss0l { - unsigned char ss0l; - __BITS8 BIT; -}; -union un_st0l { - unsigned char st0l; - __BITS8 BIT; -}; -union un_soe0l { - unsigned char soe0l; - __BITS8 BIT; -}; -union un_te0l { - unsigned char te0l; - __BITS8 BIT; -}; -union un_ts0l { - unsigned char ts0l; - __BITS8 BIT; -}; -union un_tt0l { - unsigned char tt0l; - __BITS8 BIT; -}; -union un_toe0l { - unsigned char toe0l; - __BITS8 BIT; -}; -union un_iicctl00 { - unsigned char iicctl00; - __BITS8 BIT; -}; -union un_iicctl01 { - unsigned char iicctl01; - __BITS8 BIT; -}; -union un_dscctl { - unsigned char dscctl; - __BITS8 BIT; -}; -union un_mckc { - unsigned char mckc; - __BITS8 BIT; -}; -union un_crc0ctl { - unsigned char crc0ctl; - __BITS8 BIT; -}; - -#define ADM2 (*(volatile union un_adm2 *)0xF0010).adm2 -#define ADM2_bit (*(volatile union un_adm2 *)0xF0010).BIT -#define ADUL (*(volatile unsigned char *)0xF0011) -#define ADLL (*(volatile unsigned char *)0xF0012) -#define ADTES (*(volatile unsigned char *)0xF0013) -#define PMS (*(volatile union un_pms *)0xF0018).pms -#define PMS_bit (*(volatile union un_pms *)0xF0018).BIT -#define PIOR (*(volatile unsigned char *)0xF001A) -#define PU0 (*(volatile union un_pu0 *)0xF0030).pu0 -#define PU0_bit (*(volatile union un_pu0 *)0xF0030).BIT -#define PU1 (*(volatile union un_pu1 *)0xF0031).pu1 -#define PU1_bit (*(volatile union un_pu1 *)0xF0031).BIT -#define PU3 (*(volatile union un_pu3 *)0xF0033).pu3 -#define PU3_bit (*(volatile union un_pu3 *)0xF0033).BIT -#define PU4 (*(volatile union un_pu4 *)0xF0034).pu4 -#define PU4_bit (*(volatile union un_pu4 *)0xF0034).BIT -#define PU5 (*(volatile union un_pu5 *)0xF0035).pu5 -#define PU5_bit (*(volatile union un_pu5 *)0xF0035).BIT -#define PU7 (*(volatile union un_pu7 *)0xF0037).pu7 -#define PU7_bit (*(volatile union un_pu7 *)0xF0037).BIT -#define PU12 (*(volatile union un_pu12 *)0xF003C).pu12 -#define PU12_bit (*(volatile union un_pu12 *)0xF003C).BIT -#define PU14 (*(volatile union un_pu14 *)0xF003E).pu14 -#define PU14_bit (*(volatile union un_pu14 *)0xF003E).BIT -#define PIM0 (*(volatile union un_pim0 *)0xF0040).pim0 -#define PIM0_bit (*(volatile union un_pim0 *)0xF0040).BIT -#define PIM3 (*(volatile union un_pim3 *)0xF0043).pim3 -#define PIM3_bit (*(volatile union un_pim3 *)0xF0043).BIT -#define PIM5 (*(volatile union un_pim5 *)0xF0045).pim5 -#define PIM5_bit (*(volatile union un_pim5 *)0xF0045).BIT -#define POM0 (*(volatile union un_pom0 *)0xF0050).pom0 -#define POM0_bit (*(volatile union un_pom0 *)0xF0050).BIT -#define POM3 (*(volatile union un_pom3 *)0xF0053).pom3 -#define POM3_bit (*(volatile union un_pom3 *)0xF0053).BIT -#define POM5 (*(volatile union un_pom5 *)0xF0055).pom5 -#define POM5_bit (*(volatile union un_pom5 *)0xF0055).BIT -#define POM7 (*(volatile union un_pom7 *)0xF0057).pom7 -#define POM7_bit (*(volatile union un_pom7 *)0xF0057).BIT -#define PMC12 (*(volatile union un_pmc12 *)0xF006C).pmc12 -#define PMC12_bit (*(volatile union un_pmc12 *)0xF006C).BIT -#define NFEN0 (*(volatile union un_nfen0 *)0xF0070).nfen0 -#define NFEN0_bit (*(volatile union un_nfen0 *)0xF0070).BIT -#define NFEN1 (*(volatile union un_nfen1 *)0xF0071).nfen1 -#define NFEN1_bit (*(volatile union un_nfen1 *)0xF0071).BIT -#define ISC (*(volatile union un_isc *)0xF0073).isc -#define ISC_bit (*(volatile union un_isc *)0xF0073).BIT -#define TIS0 (*(volatile unsigned char *)0xF0074) -#define ADPC (*(volatile unsigned char *)0xF0076) -#define IAWCTL (*(volatile unsigned char *)0xF0077) -#define PRDSEL (*(volatile unsigned short *)0xF007E) -#define TOOLEN (*(volatile unsigned char *)0xF0080) -#define BPAL0 (*(volatile unsigned char *)0xF0081) -#define BPAH0 (*(volatile unsigned char *)0xF0082) -#define BPAS0 (*(volatile unsigned char *)0xF0083) -#define BACDVL0 (*(volatile unsigned char *)0xF0084) -#define BACDVH0 (*(volatile unsigned char *)0xF0085) -#define BACDML0 (*(volatile unsigned char *)0xF0086) -#define BACDMH0 (*(volatile unsigned char *)0xF0087) -#define MONMOD (*(volatile unsigned char *)0xF0088) -#define DFLCTL (*(volatile union un_dflctl *)0xF0090).dflctl -#define DFLCTL_bit (*(volatile union un_dflctl *)0xF0090).BIT -#define HIOTRM (*(volatile unsigned char *)0xF00A0) -#define BECTL (*(volatile union un_bectl *)0xF00A1).bectl -#define BECTL_bit (*(volatile union un_bectl *)0xF00A1).BIT -#define HOCODIV (*(volatile unsigned char *)0xF00A8) -#define TEMPCAL0 (*(volatile unsigned char *)0xF00AC) -#define TEMPCAL1 (*(volatile unsigned char *)0xF00AD) -#define TEMPCAL2 (*(volatile unsigned char *)0xF00AE) -#define TEMPCAL3 (*(volatile unsigned char *)0xF00AF) -#define FLSEC (*(volatile unsigned short *)0xF00B0) -#define FLFSWS (*(volatile unsigned short *)0xF00B2) -#define FLFSWE (*(volatile unsigned short *)0xF00B4) -#define FSSET (*(volatile unsigned char *)0xF00B6) -#define FSSE (*(volatile union un_fsse *)0xF00B7).fsse -#define FSSE_bit (*(volatile union un_fsse *)0xF00B7).BIT -#define FLFADL (*(volatile unsigned short *)0xF00B8) -#define FLFADH (*(volatile unsigned char *)0xF00BA) -#define PFCMD (*(volatile unsigned char *)0xF00C0) -#define PFS (*(volatile union un_pfs *)0xF00C1).pfs -#define PFS_bit (*(volatile union un_pfs *)0xF00C1).BIT -#define FLRL (*(volatile unsigned short *)0xF00C2) -#define FLRH (*(volatile unsigned short *)0xF00C4) -#define FLWE (*(volatile unsigned char *)0xF00C6) -#define FLRE (*(volatile unsigned char *)0xF00C7) -#define FLTMS (*(volatile unsigned short *)0xF00C8) -#define DFLMC (*(volatile unsigned short *)0xF00CA) -#define FLMCL (*(volatile unsigned short *)0xF00CC) -#define FLMCH (*(volatile unsigned char *)0xF00CE) -#define FSCTL (*(volatile unsigned char *)0xF00CF) -#define ICEADR (*(volatile unsigned short *)0xF00D0) -#define ICEDAT (*(volatile unsigned short *)0xF00D2) -#define MDCL (*(volatile unsigned short *)0xF00E0) -#define MDCH (*(volatile unsigned short *)0xF00E2) -#define MDUC (*(volatile union un_mduc *)0xF00E8).mduc -#define MDUC_bit (*(volatile union un_mduc *)0xF00E8).BIT -#define PER0 (*(volatile union un_per0 *)0xF00F0).per0 -#define PER0_bit (*(volatile union un_per0 *)0xF00F0).BIT -#define OSMC (*(volatile unsigned char *)0xF00F3) -#define RMC (*(volatile union un_rmc *)0xF00F4).rmc -#define RMC_bit (*(volatile union un_rmc *)0xF00F4).BIT -#define RPECTL (*(volatile union un_rpectl *)0xF00F5).rpectl -#define RPECTL_bit (*(volatile union un_rpectl *)0xF00F5).BIT -#define BCDADJ (*(volatile unsigned char *)0xF00FE) -#define VECTCTRL (*(volatile unsigned char *)0xF00FF) -#define SSR00 (*(volatile unsigned short *)0xF0100) -#define SSR00L (*(volatile unsigned char *)0xF0100) -#define SSR01 (*(volatile unsigned short *)0xF0102) -#define SSR01L (*(volatile unsigned char *)0xF0102) -#define SIR00 (*(volatile unsigned short *)0xF0108) -#define SIR00L (*(volatile unsigned char *)0xF0108) -#define SIR01 (*(volatile unsigned short *)0xF010A) -#define SIR01L (*(volatile unsigned char *)0xF010A) -#define SMR00 (*(volatile unsigned short *)0xF0110) -#define SMR01 (*(volatile unsigned short *)0xF0112) -#define SCR00 (*(volatile unsigned short *)0xF0118) -#define SCR01 (*(volatile unsigned short *)0xF011A) -#define SE0 (*(volatile unsigned short *)0xF0120) -#define SE0L (*(volatile union un_se0l *)0xF0120).se0l -#define SE0L_bit (*(volatile union un_se0l *)0xF0120).BIT -#define SS0 (*(volatile unsigned short *)0xF0122) -#define SS0L (*(volatile union un_ss0l *)0xF0122).ss0l -#define SS0L_bit (*(volatile union un_ss0l *)0xF0122).BIT -#define ST0 (*(volatile unsigned short *)0xF0124) -#define ST0L (*(volatile union un_st0l *)0xF0124).st0l -#define ST0L_bit (*(volatile union un_st0l *)0xF0124).BIT -#define SPS0 (*(volatile unsigned short *)0xF0126) -#define SPS0L (*(volatile unsigned char *)0xF0126) -#define SO0 (*(volatile unsigned short *)0xF0128) -#define SOE0 (*(volatile unsigned short *)0xF012A) -#define SOE0L (*(volatile union un_soe0l *)0xF012A).soe0l -#define SOE0L_bit (*(volatile union un_soe0l *)0xF012A).BIT -#define EDR00 (*(volatile unsigned short *)0xF012C) -#define EDR00L (*(volatile unsigned char *)0xF012C) -#define EDR01 (*(volatile unsigned short *)0xF012E) -#define EDR01L (*(volatile unsigned char *)0xF012E) -#define SOL0 (*(volatile unsigned short *)0xF0134) -#define SOL0L (*(volatile unsigned char *)0xF0134) -#define SSC0 (*(volatile unsigned short *)0xF0138) -#define SSC0L (*(volatile unsigned char *)0xF0138) -#define TCR00 (*(volatile unsigned short *)0xF0180) -#define TCR01 (*(volatile unsigned short *)0xF0182) -#define TCR02 (*(volatile unsigned short *)0xF0184) -#define TCR03 (*(volatile unsigned short *)0xF0186) -#define TMR00 (*(volatile unsigned short *)0xF0190) -#define TMR01 (*(volatile unsigned short *)0xF0192) -#define TMR02 (*(volatile unsigned short *)0xF0194) -#define TMR03 (*(volatile unsigned short *)0xF0196) -#define TSR00 (*(volatile unsigned short *)0xF01A0) -#define TSR00L (*(volatile unsigned char *)0xF01A0) -#define TSR01 (*(volatile unsigned short *)0xF01A2) -#define TSR01L (*(volatile unsigned char *)0xF01A2) -#define TSR02 (*(volatile unsigned short *)0xF01A4) -#define TSR02L (*(volatile unsigned char *)0xF01A4) -#define TSR03 (*(volatile unsigned short *)0xF01A6) -#define TSR03L (*(volatile unsigned char *)0xF01A6) -#define TE0 (*(volatile unsigned short *)0xF01B0) -#define TE0L (*(volatile union un_te0l *)0xF01B0).te0l -#define TE0L_bit (*(volatile union un_te0l *)0xF01B0).BIT -#define TS0 (*(volatile unsigned short *)0xF01B2) -#define TS0L (*(volatile union un_ts0l *)0xF01B2).ts0l -#define TS0L_bit (*(volatile union un_ts0l *)0xF01B2).BIT -#define TT0 (*(volatile unsigned short *)0xF01B4) -#define TT0L (*(volatile union un_tt0l *)0xF01B4).tt0l -#define TT0L_bit (*(volatile union un_tt0l *)0xF01B4).BIT -#define TPS0 (*(volatile unsigned short *)0xF01B6) -#define TO0 (*(volatile unsigned short *)0xF01B8) -#define TO0L (*(volatile unsigned char *)0xF01B8) -#define TOE0 (*(volatile unsigned short *)0xF01BA) -#define TOE0L (*(volatile union un_toe0l *)0xF01BA).toe0l -#define TOE0L_bit (*(volatile union un_toe0l *)0xF01BA).BIT -#define TOL0 (*(volatile unsigned short *)0xF01BC) -#define TOL0L (*(volatile unsigned char *)0xF01BC) -#define TOM0 (*(volatile unsigned short *)0xF01BE) -#define TOM0L (*(volatile unsigned char *)0xF01BE) -#define IICCTL00 (*(volatile union un_iicctl00 *)0xF0230).iicctl00 -#define IICCTL00_bit (*(volatile union un_iicctl00 *)0xF0230).BIT -#define IICCTL01 (*(volatile union un_iicctl01 *)0xF0231).iicctl01 -#define IICCTL01_bit (*(volatile union un_iicctl01 *)0xF0231).BIT -#define IICWL0 (*(volatile unsigned char *)0xF0232) -#define IICWH0 (*(volatile unsigned char *)0xF0233) -#define SVA0 (*(volatile unsigned char *)0xF0234) -#define IICSE0 (*(volatile unsigned char *)0xF0235) -#define DSCCTL (*(volatile union un_dscctl *)0xF02E5).dscctl -#define DSCCTL_bit (*(volatile union un_dscctl *)0xF02E5).BIT -#define MCKC (*(volatile union un_mckc *)0xF02E6).mckc -#define MCKC_bit (*(volatile union un_mckc *)0xF02E6).BIT -#define CRC0CTL (*(volatile union un_crc0ctl *)0xF02F0).crc0ctl -#define CRC0CTL_bit (*(volatile union un_crc0ctl *)0xF02F0).BIT -#define PGCRCL (*(volatile unsigned short *)0xF02F2) -#define CRCD (*(volatile unsigned short *)0xF02FA) -#define SYSCFG (*(volatile unsigned short *)0xF0400) -#define SYSCFG1 (*(volatile unsigned short *)0xF0402) -#define SYSSTS0 (*(volatile unsigned short *)0xF0404) -#define SYSSTS1 (*(volatile unsigned short *)0xF0406) -#define DVSTCTR0 (*(volatile unsigned short *)0xF0408) -#define DVSTCTR1 (*(volatile unsigned short *)0xF040A) -#define DMA0PCFG (*(volatile unsigned short *)0xF0410) -#define DMA1PCFG (*(volatile unsigned short *)0xF0412) -#define CFIFOM (*(volatile unsigned short *)0xF0414) -#define CFIFOML (*(volatile unsigned char *)0xF0414) -#define D0FIFOM (*(volatile unsigned short *)0xF0418) -#define D0FIFOML (*(volatile unsigned char *)0xF0418) -#define D1FIFOM (*(volatile unsigned short *)0xF041C) -#define D1FIFOML (*(volatile unsigned char *)0xF041C) -#define CFIFOSEL (*(volatile unsigned short *)0xF0420) -#define CFIFOCTR (*(volatile unsigned short *)0xF0422) -#define D0FIFOSEL (*(volatile unsigned short *)0xF0428) -#define D0FIFOCTR (*(volatile unsigned short *)0xF042A) -#define D1FIFOSEL (*(volatile unsigned short *)0xF042C) -#define D1FIFOCTR (*(volatile unsigned short *)0xF042E) -#define INTENB0 (*(volatile unsigned short *)0xF0430) -#define INTENB1 (*(volatile unsigned short *)0xF0432) -#define INTENB2 (*(volatile unsigned short *)0xF0434) -#define BRDYENB (*(volatile unsigned short *)0xF0436) -#define NRDYENB (*(volatile unsigned short *)0xF0438) -#define BEMPENB (*(volatile unsigned short *)0xF043A) -#define SOFCFG (*(volatile unsigned short *)0xF043C) -#define INTSTS0 (*(volatile unsigned short *)0xF0440) -#define INTSTS1 (*(volatile unsigned short *)0xF0442) -#define INTSTS2 (*(volatile unsigned short *)0xF0444) -#define BRDYSTS (*(volatile unsigned short *)0xF0446) -#define NRDYSTS (*(volatile unsigned short *)0xF0448) -#define BEMPSTS (*(volatile unsigned short *)0xF044A) -#define FRMNUM (*(volatile unsigned short *)0xF044C) -#define USBADDR (*(volatile unsigned short *)0xF0450) -#define USBREQ (*(volatile unsigned short *)0xF0454) -#define USBVAL (*(volatile unsigned short *)0xF0456) -#define USBINDX (*(volatile unsigned short *)0xF0458) -#define USBLENG (*(volatile unsigned short *)0xF045A) -#define DCPCFG (*(volatile unsigned short *)0xF045C) -#define DCPMAXP (*(volatile unsigned short *)0xF045E) -#define DCPCTR (*(volatile unsigned short *)0xF0460) -#define PIPESEL (*(volatile unsigned short *)0xF0464) -#define PIPECFG (*(volatile unsigned short *)0xF0468) -#define PIPEMAXP (*(volatile unsigned short *)0xF046C) -#define PIPEPERI (*(volatile unsigned short *)0xF046E) -#define PIPE4CTR (*(volatile unsigned short *)0xF0476) -#define PIPE5CTR (*(volatile unsigned short *)0xF0478) -#define PIPE6CTR (*(volatile unsigned short *)0xF047A) -#define PIPE7CTR (*(volatile unsigned short *)0xF047C) -#define PIPE4TRE (*(volatile unsigned short *)0xF049C) -#define PIPE4TRN (*(volatile unsigned short *)0xF049E) -#define PIPE5TRE (*(volatile unsigned short *)0xF04A0) -#define PIPE5TRN (*(volatile unsigned short *)0xF04A2) -#define USBBCCTRL0 (*(volatile unsigned short *)0xF04B0) -#define USBBCCTRL1 (*(volatile unsigned short *)0xF04B4) -#define USBBCOPT0 (*(volatile unsigned short *)0xF04B8) -#define USBBCOPT1 (*(volatile unsigned short *)0xF04BC) -#define USBMC (*(volatile unsigned short *)0xF04CC) -#define DEVADD0 (*(volatile unsigned short *)0xF04D0) -#define DEVADD1 (*(volatile unsigned short *)0xF04D2) -#define DEVADD2 (*(volatile unsigned short *)0xF04D4) -#define DEVADD3 (*(volatile unsigned short *)0xF04D6) -#define DEVADD4 (*(volatile unsigned short *)0xF04D8) -#define DEVADD5 (*(volatile unsigned short *)0xF04DA) - -/* - Sfr bits - */ -#define ADTYP ADM2_bit.no0 -#define AWC ADM2_bit.no2 -#define ADRCK ADM2_bit.no3 -#define DFLEN DFLCTL_bit.no0 -#define BRSAM BECTL_bit.no0 -#define ESQST FSSE_bit.no7 -#define DIVST MDUC_bit.no0 -#define MACSF MDUC_bit.no1 -#define MACOF MDUC_bit.no2 -#define MDSM MDUC_bit.no3 -#define MACMODE MDUC_bit.no6 -#define DIVMODE MDUC_bit.no7 -#define TAU0EN PER0_bit.no0 -#define SAU0EN PER0_bit.no2 -#define IICA0EN PER0_bit.no4 -#define ADCEN PER0_bit.no5 -#define RTCEN PER0_bit.no7 -#define PAENB RMC_bit.no0 -#define WDVOL RMC_bit.no7 -#define RPEF RPECTL_bit.no0 -#define RPERDIS RPECTL_bit.no7 -#define SPT0 IICCTL00_bit.no0 -#define STT0 IICCTL00_bit.no1 -#define ACKE0 IICCTL00_bit.no2 -#define WTIM0 IICCTL00_bit.no3 -#define SPIE0 IICCTL00_bit.no4 -#define WREL0 IICCTL00_bit.no5 -#define LREL0 IICCTL00_bit.no6 -#define IICE0 IICCTL00_bit.no7 -#define PRS0 IICCTL01_bit.no0 -#define DFC0 IICCTL01_bit.no2 -#define SMC0 IICCTL01_bit.no3 -#define DAD0 IICCTL01_bit.no4 -#define CLD0 IICCTL01_bit.no5 -#define WUP0 IICCTL01_bit.no7 -#define CRC0EN CRC0CTL_bit.no7 - -/* - Interrupt vector addresses - */ -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13.h deleted file mode 100644 index 60db13d1f..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13.h +++ /dev/null @@ -1,1057 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78L13 */ -/* FILE : iodefine.h */ -/* DESCRIPTION : Definition of I/O Registers */ -/* CPU SERIES : RL78 - L13 */ -/* CPU TYPE : R5F10WMG */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F10WMG.DVF */ -/* Copyright(C) 2012 Renesas */ -/* Version E1.00d */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_H -#define IODEFINE_H - -/* - IO Registers - */ -union un_p0 { - unsigned char p0; - __BITS8 BIT; -}; -union un_p1 { - unsigned char p1; - __BITS8 BIT; -}; -union un_p2 { - unsigned char p2; - __BITS8 BIT; -}; -union un_p3 { - unsigned char p3; - __BITS8 BIT; -}; -union un_p4 { - unsigned char p4; - __BITS8 BIT; -}; -union un_p5 { - unsigned char p5; - __BITS8 BIT; -}; -union un_p6 { - unsigned char p6; - __BITS8 BIT; -}; -union un_p7 { - unsigned char p7; - __BITS8 BIT; -}; -union un_p12 { - unsigned char p12; - __BITS8 BIT; -}; -union un_p13 { - unsigned char p13; - __BITS8 BIT; -}; -union un_pm0 { - unsigned char pm0; - __BITS8 BIT; -}; -union un_pm1 { - unsigned char pm1; - __BITS8 BIT; -}; -union un_pm2 { - unsigned char pm2; - __BITS8 BIT; -}; -union un_pm3 { - unsigned char pm3; - __BITS8 BIT; -}; -union un_pm4 { - unsigned char pm4; - __BITS8 BIT; -}; -union un_pm5 { - unsigned char pm5; - __BITS8 BIT; -}; -union un_pm6 { - unsigned char pm6; - __BITS8 BIT; -}; -union un_pm7 { - unsigned char pm7; - __BITS8 BIT; -}; -union un_pm12 { - unsigned char pm12; - __BITS8 BIT; -}; -union un_pm13 { - unsigned char pm13; - __BITS8 BIT; -}; -union un_adm0 { - unsigned char adm0; - __BITS8 BIT; -}; -union un_ads { - unsigned char ads; - __BITS8 BIT; -}; -union un_adm1 { - unsigned char adm1; - __BITS8 BIT; -}; -union un_krctl { - unsigned char krctl; - __BITS8 BIT; -}; -union un_krm0 { - unsigned char krm0; - __BITS8 BIT; -}; -union un_egp0 { - unsigned char egp0; - __BITS8 BIT; -}; -union un_egn0 { - unsigned char egn0; - __BITS8 BIT; -}; -union un_lcdm1 { - unsigned char lcdm1; - __BITS8 BIT; -}; -union un_mlcd { - unsigned char mlcd; - __BITS8 BIT; -}; -union un_iics0 { - unsigned char iics0; - __BITS8 BIT; -}; -union un_iicf0 { - unsigned char iicf0; - __BITS8 BIT; -}; -union un_flars { - unsigned char flars; - __BITS8 BIT; -}; -union un_fssq { - unsigned char fssq; - __BITS8 BIT; -}; -union un_flrst { - unsigned char flrst; - __BITS8 BIT; -}; -union un_fsastl { - unsigned char fsastl; - __BITS8 BIT; -}; -union un_fsasth { - unsigned char fsasth; - __BITS8 BIT; -}; -union un_rtcc0 { - unsigned char rtcc0; - __BITS8 BIT; -}; -union un_rtcc1 { - unsigned char rtcc1; - __BITS8 BIT; -}; -union un_csc { - unsigned char csc; - __BITS8 BIT; -}; -union un_ostc { - unsigned char ostc; - __BITS8 BIT; -}; -union un_ckc { - unsigned char ckc; - __BITS8 BIT; -}; -union un_cks0 { - unsigned char cks0; - __BITS8 BIT; -}; -union un_cks1 { - unsigned char cks1; - __BITS8 BIT; -}; -union un_lvim { - unsigned char lvim; - __BITS8 BIT; -}; -union un_lvis { - unsigned char lvis; - __BITS8 BIT; -}; -union un_monsta0 { - unsigned char monsta0; - __BITS8 BIT; -}; -union un_asim { - unsigned char asim; - __BITS8 BIT; -}; -union un_dmc0 { - unsigned char dmc0; - __BITS8 BIT; -}; -union un_dmc1 { - unsigned char dmc1; - __BITS8 BIT; -}; -union un_drc0 { - unsigned char drc0; - __BITS8 BIT; -}; -union un_drc1 { - unsigned char drc1; - __BITS8 BIT; -}; -union un_if2 { - unsigned short if2; - __BITS16 BIT; -}; -union un_if2l { - unsigned char if2l; - __BITS8 BIT; -}; -union un_if2h { - unsigned char if2h; - __BITS8 BIT; -}; -union un_if3 { - unsigned short if3; - __BITS16 BIT; -}; -union un_if3l { - unsigned char if3l; - __BITS8 BIT; -}; -union un_mk2 { - unsigned short mk2; - __BITS16 BIT; -}; -union un_mk2l { - unsigned char mk2l; - __BITS8 BIT; -}; -union un_mk2h { - unsigned char mk2h; - __BITS8 BIT; -}; -union un_mk3 { - unsigned short mk3; - __BITS16 BIT; -}; -union un_mk3l { - unsigned char mk3l; - __BITS8 BIT; -}; -union un_pr02 { - unsigned short pr02; - __BITS16 BIT; -}; -union un_pr02l { - unsigned char pr02l; - __BITS8 BIT; -}; -union un_pr02h { - unsigned char pr02h; - __BITS8 BIT; -}; -union un_pr03 { - unsigned short pr03; - __BITS16 BIT; -}; -union un_pr03l { - unsigned char pr03l; - __BITS8 BIT; -}; -union un_pr12 { - unsigned short pr12; - __BITS16 BIT; -}; -union un_pr12l { - unsigned char pr12l; - __BITS8 BIT; -}; -union un_pr12h { - unsigned char pr12h; - __BITS8 BIT; -}; -union un_pr13 { - unsigned short pr13; - __BITS16 BIT; -}; -union un_pr13l { - unsigned char pr13l; - __BITS8 BIT; -}; -union un_if0 { - unsigned short if0; - __BITS16 BIT; -}; -union un_if0l { - unsigned char if0l; - __BITS8 BIT; -}; -union un_if0h { - unsigned char if0h; - __BITS8 BIT; -}; -union un_if1 { - unsigned short if1; - __BITS16 BIT; -}; -union un_if1l { - unsigned char if1l; - __BITS8 BIT; -}; -union un_if1h { - unsigned char if1h; - __BITS8 BIT; -}; -union un_mk0 { - unsigned short mk0; - __BITS16 BIT; -}; -union un_mk0l { - unsigned char mk0l; - __BITS8 BIT; -}; -union un_mk0h { - unsigned char mk0h; - __BITS8 BIT; -}; -union un_mk1 { - unsigned short mk1; - __BITS16 BIT; -}; -union un_mk1l { - unsigned char mk1l; - __BITS8 BIT; -}; -union un_mk1h { - unsigned char mk1h; - __BITS8 BIT; -}; -union un_pr00 { - unsigned short pr00; - __BITS16 BIT; -}; -union un_pr00l { - unsigned char pr00l; - __BITS8 BIT; -}; -union un_pr00h { - unsigned char pr00h; - __BITS8 BIT; -}; -union un_pr01 { - unsigned short pr01; - __BITS16 BIT; -}; -union un_pr01l { - unsigned char pr01l; - __BITS8 BIT; -}; -union un_pr01h { - unsigned char pr01h; - __BITS8 BIT; -}; -union un_pr10 { - unsigned short pr10; - __BITS16 BIT; -}; -union un_pr10l { - unsigned char pr10l; - __BITS8 BIT; -}; -union un_pr10h { - unsigned char pr10h; - __BITS8 BIT; -}; -union un_pr11 { - unsigned short pr11; - __BITS16 BIT; -}; -union un_pr11l { - unsigned char pr11l; - __BITS8 BIT; -}; -union un_pr11h { - unsigned char pr11h; - __BITS8 BIT; -}; -union un_pmc { - unsigned char pmc; - __BITS8 BIT; -}; - -#define P0 (*(volatile union un_p0 *)0xFFF00).p0 -#define P0_bit (*(volatile union un_p0 *)0xFFF00).BIT -#define P1 (*(volatile union un_p1 *)0xFFF01).p1 -#define P1_bit (*(volatile union un_p1 *)0xFFF01).BIT -#define P2 (*(volatile union un_p2 *)0xFFF02).p2 -#define P2_bit (*(volatile union un_p2 *)0xFFF02).BIT -#define P3 (*(volatile union un_p3 *)0xFFF03).p3 -#define P3_bit (*(volatile union un_p3 *)0xFFF03).BIT -#define P4 (*(volatile union un_p4 *)0xFFF04).p4 -#define P4_bit (*(volatile union un_p4 *)0xFFF04).BIT -#define P5 (*(volatile union un_p5 *)0xFFF05).p5 -#define P5_bit (*(volatile union un_p5 *)0xFFF05).BIT -#define P6 (*(volatile union un_p6 *)0xFFF06).p6 -#define P6_bit (*(volatile union un_p6 *)0xFFF06).BIT -#define P7 (*(volatile union un_p7 *)0xFFF07).p7 -#define P7_bit (*(volatile union un_p7 *)0xFFF07).BIT -#define P12 (*(volatile union un_p12 *)0xFFF0C).p12 -#define P12_bit (*(volatile union un_p12 *)0xFFF0C).BIT -#define P13 (*(volatile union un_p13 *)0xFFF0D).p13 -#define P13_bit (*(volatile union un_p13 *)0xFFF0D).BIT -#define SDR00 (*(volatile unsigned short *)0xFFF10) -#define SIO00 (*(volatile unsigned char *)0xFFF10) -#define TXD0 (*(volatile unsigned char *)0xFFF10) -#define SDR01 (*(volatile unsigned short *)0xFFF12) -#define RXD0 (*(volatile unsigned char *)0xFFF12) -#define SDR12 (*(volatile unsigned short *)0xFFF14) -#define TXD3 (*(volatile unsigned char *)0xFFF14) -#define SDR13 (*(volatile unsigned short *)0xFFF16) -#define RXD3 (*(volatile unsigned char *)0xFFF16) -#define TDR00 (*(volatile unsigned short *)0xFFF18) -#define TDR01 (*(volatile unsigned short *)0xFFF1A) -#define TDR01L (*(volatile unsigned char *)0xFFF1A) -#define TDR01H (*(volatile unsigned char *)0xFFF1B) -#define ADCR (*(volatile unsigned short *)0xFFF1E) -#define ADCRH (*(volatile unsigned char *)0xFFF1F) -#define PM0 (*(volatile union un_pm0 *)0xFFF20).pm0 -#define PM0_bit (*(volatile union un_pm0 *)0xFFF20).BIT -#define PM1 (*(volatile union un_pm1 *)0xFFF21).pm1 -#define PM1_bit (*(volatile union un_pm1 *)0xFFF21).BIT -#define PM2 (*(volatile union un_pm2 *)0xFFF22).pm2 -#define PM2_bit (*(volatile union un_pm2 *)0xFFF22).BIT -#define PM3 (*(volatile union un_pm3 *)0xFFF23).pm3 -#define PM3_bit (*(volatile union un_pm3 *)0xFFF23).BIT -#define PM4 (*(volatile union un_pm4 *)0xFFF24).pm4 -#define PM4_bit (*(volatile union un_pm4 *)0xFFF24).BIT -#define PM5 (*(volatile union un_pm5 *)0xFFF25).pm5 -#define PM5_bit (*(volatile union un_pm5 *)0xFFF25).BIT -#define PM6 (*(volatile union un_pm6 *)0xFFF26).pm6 -#define PM6_bit (*(volatile union un_pm6 *)0xFFF26).BIT -#define PM7 (*(volatile union un_pm7 *)0xFFF27).pm7 -#define PM7_bit (*(volatile union un_pm7 *)0xFFF27).BIT -#define PM12 (*(volatile union un_pm12 *)0xFFF2C).pm12 -#define PM12_bit (*(volatile union un_pm12 *)0xFFF2C).BIT -#define PM13 (*(volatile union un_pm13 *)0xFFF2D).pm13 -#define PM13_bit (*(volatile union un_pm13 *)0xFFF2D).BIT -#define ADM0 (*(volatile union un_adm0 *)0xFFF30).adm0 -#define ADM0_bit (*(volatile union un_adm0 *)0xFFF30).BIT -#define ADS (*(volatile union un_ads *)0xFFF31).ads -#define ADS_bit (*(volatile union un_ads *)0xFFF31).BIT -#define ADM1 (*(volatile union un_adm1 *)0xFFF32).adm1 -#define ADM1_bit (*(volatile union un_adm1 *)0xFFF32).BIT -#define KRCTL (*(volatile union un_krctl *)0xFFF34).krctl -#define KRCTL_bit (*(volatile union un_krctl *)0xFFF34).BIT -#define KRF (*(volatile unsigned char *)0xFFF35) -#define KRM0 (*(volatile union un_krm0 *)0xFFF37).krm0 -#define KRM0_bit (*(volatile union un_krm0 *)0xFFF37).BIT -#define EGP0 (*(volatile union un_egp0 *)0xFFF38).egp0 -#define EGP0_bit (*(volatile union un_egp0 *)0xFFF38).BIT -#define EGN0 (*(volatile union un_egn0 *)0xFFF39).egn0 -#define EGN0_bit (*(volatile union un_egn0 *)0xFFF39).BIT -#define LCDM0 (*(volatile unsigned char *)0xFFF40) -#define LCDM1 (*(volatile union un_lcdm1 *)0xFFF41).lcdm1 -#define LCDM1_bit (*(volatile union un_lcdm1 *)0xFFF41).BIT -#define LCDC0 (*(volatile unsigned char *)0xFFF42) -#define VLCD (*(volatile unsigned char *)0xFFF43) -#define SDR02 (*(volatile unsigned short *)0xFFF44) -#define SIO10 (*(volatile unsigned char *)0xFFF44) -#define TXD1 (*(volatile unsigned char *)0xFFF44) -#define SDR03 (*(volatile unsigned short *)0xFFF46) -#define RXD1 (*(volatile unsigned char *)0xFFF46) -#define SDR10 (*(volatile unsigned short *)0xFFF48) -#define TXD2 (*(volatile unsigned char *)0xFFF48) -#define SDR11 (*(volatile unsigned short *)0xFFF4A) -#define RXD2 (*(volatile unsigned char *)0xFFF4A) -#define MLCD (*(volatile union un_mlcd *)0xFFF4C).mlcd -#define MLCD_bit (*(volatile union un_mlcd *)0xFFF4C).BIT -#define IICA0 (*(volatile unsigned char *)0xFFF50) -#define IICS0 (*(volatile union un_iics0 *)0xFFF51).iics0 -#define IICS0_bit (*(volatile union un_iics0 *)0xFFF51).BIT -#define IICF0 (*(volatile union un_iicf0 *)0xFFF52).iicf0 -#define IICF0_bit (*(volatile union un_iicf0 *)0xFFF52).BIT -#define TDR02 (*(volatile unsigned short *)0xFFF64) -#define TDR03 (*(volatile unsigned short *)0xFFF66) -#define TDR03L (*(volatile unsigned char *)0xFFF66) -#define TDR03H (*(volatile unsigned char *)0xFFF67) -#define TDR04 (*(volatile unsigned short *)0xFFF68) -#define TDR05 (*(volatile unsigned short *)0xFFF6A) -#define TDR06 (*(volatile unsigned short *)0xFFF6C) -#define TDR07 (*(volatile unsigned short *)0xFFF6E) -#define FLPMC (*(volatile unsigned char *)0xFFF80) -#define FLARS (*(volatile union un_flars *)0xFFF81).flars -#define FLARS_bit (*(volatile union un_flars *)0xFFF81).BIT -#define FLAPL (*(volatile unsigned short *)0xFFF82) -#define FLAPH (*(volatile unsigned char *)0xFFF84) -#define FSSQ (*(volatile union un_fssq *)0xFFF85).fssq -#define FSSQ_bit (*(volatile union un_fssq *)0xFFF85).BIT -#define FLSEDL (*(volatile unsigned short *)0xFFF86) -#define FLSEDH (*(volatile unsigned char *)0xFFF88) -#define FLRST (*(volatile union un_flrst *)0xFFF89).flrst -#define FLRST_bit (*(volatile union un_flrst *)0xFFF89).BIT -#define FSASTL (*(volatile union un_fsastl *)0xFFF8A).fsastl -#define FSASTL_bit (*(volatile union un_fsastl *)0xFFF8A).BIT -#define FSASTH (*(volatile union un_fsasth *)0xFFF8B).fsasth -#define FSASTH_bit (*(volatile union un_fsasth *)0xFFF8B).BIT -#define FLWL (*(volatile unsigned short *)0xFFF8C) -#define FLWH (*(volatile unsigned short *)0xFFF8E) -#define ITMC (*(volatile unsigned short *)0xFFF90) -#define SEC (*(volatile unsigned char *)0xFFF92) -#define MIN (*(volatile unsigned char *)0xFFF93) -#define HOUR (*(volatile unsigned char *)0xFFF94) -#define WEEK (*(volatile unsigned char *)0xFFF95) -#define DAY (*(volatile unsigned char *)0xFFF96) -#define MONTH (*(volatile unsigned char *)0xFFF97) -#define YEAR (*(volatile unsigned char *)0xFFF98) -#define ALARMWM (*(volatile unsigned char *)0xFFF9A) -#define ALARMWH (*(volatile unsigned char *)0xFFF9B) -#define ALARMWW (*(volatile unsigned char *)0xFFF9C) -#define RTCC0 (*(volatile union un_rtcc0 *)0xFFF9D).rtcc0 -#define RTCC0_bit (*(volatile union un_rtcc0 *)0xFFF9D).BIT -#define RTCC1 (*(volatile union un_rtcc1 *)0xFFF9E).rtcc1 -#define RTCC1_bit (*(volatile union un_rtcc1 *)0xFFF9E).BIT -#define CMC (*(volatile unsigned char *)0xFFFA0) -#define CSC (*(volatile union un_csc *)0xFFFA1).csc -#define CSC_bit (*(volatile union un_csc *)0xFFFA1).BIT -#define OSTC (*(volatile union un_ostc *)0xFFFA2).ostc -#define OSTC_bit (*(volatile union un_ostc *)0xFFFA2).BIT -#define OSTS (*(volatile unsigned char *)0xFFFA3) -#define CKC (*(volatile union un_ckc *)0xFFFA4).ckc -#define CKC_bit (*(volatile union un_ckc *)0xFFFA4).BIT -#define CKS0 (*(volatile union un_cks0 *)0xFFFA5).cks0 -#define CKS0_bit (*(volatile union un_cks0 *)0xFFFA5).BIT -#define CKS1 (*(volatile union un_cks1 *)0xFFFA6).cks1 -#define CKS1_bit (*(volatile union un_cks1 *)0xFFFA6).BIT -#define RESF (*(volatile unsigned char *)0xFFFA8) -#define LVIM (*(volatile union un_lvim *)0xFFFA9).lvim -#define LVIM_bit (*(volatile union un_lvim *)0xFFFA9).BIT -#define LVIS (*(volatile union un_lvis *)0xFFFAA).lvis -#define LVIS_bit (*(volatile union un_lvis *)0xFFFAA).BIT -#define WDTE (*(volatile unsigned char *)0xFFFAB) -#define CRCIN (*(volatile unsigned char *)0xFFFAC) -#define RXB (*(volatile unsigned char *)0xFFFAD) -#define TXS (*(volatile unsigned char *)0xFFFAD) -#define MONSTA0 (*(volatile union un_monsta0 *)0xFFFAE).monsta0 -#define MONSTA0_bit (*(volatile union un_monsta0 *)0xFFFAE).BIT -#define ASIM (*(volatile union un_asim *)0xFFFAF).asim -#define ASIM_bit (*(volatile union un_asim *)0xFFFAF).BIT -#define DSA0 (*(volatile unsigned char *)0xFFFB0) -#define DSA1 (*(volatile unsigned char *)0xFFFB1) -#define DRA0 (*(volatile unsigned short *)0xFFFB2) -#define DRA0L (*(volatile unsigned char *)0xFFFB2) -#define DRA0H (*(volatile unsigned char *)0xFFFB3) -#define DRA1 (*(volatile unsigned short *)0xFFFB4) -#define DRA1L (*(volatile unsigned char *)0xFFFB4) -#define DRA1H (*(volatile unsigned char *)0xFFFB5) -#define DBC0 (*(volatile unsigned short *)0xFFFB6) -#define DBC0L (*(volatile unsigned char *)0xFFFB6) -#define DBC0H (*(volatile unsigned char *)0xFFFB7) -#define DBC1 (*(volatile unsigned short *)0xFFFB8) -#define DBC1L (*(volatile unsigned char *)0xFFFB8) -#define DBC1H (*(volatile unsigned char *)0xFFFB9) -#define DMC0 (*(volatile union un_dmc0 *)0xFFFBA).dmc0 -#define DMC0_bit (*(volatile union un_dmc0 *)0xFFFBA).BIT -#define DMC1 (*(volatile union un_dmc1 *)0xFFFBB).dmc1 -#define DMC1_bit (*(volatile union un_dmc1 *)0xFFFBB).BIT -#define DRC0 (*(volatile union un_drc0 *)0xFFFBC).drc0 -#define DRC0_bit (*(volatile union un_drc0 *)0xFFFBC).BIT -#define DRC1 (*(volatile union un_drc1 *)0xFFFBD).drc1 -#define DRC1_bit (*(volatile union un_drc1 *)0xFFFBD).BIT -#define IF2 (*(volatile union un_if2 *)0xFFFD0).if2 -#define IF2_bit (*(volatile union un_if2 *)0xFFFD0).BIT -#define IF2L (*(volatile union un_if2l *)0xFFFD0).if2l -#define IF2L_bit (*(volatile union un_if2l *)0xFFFD0).BIT -#define IF2H (*(volatile union un_if2h *)0xFFFD1).if2h -#define IF2H_bit (*(volatile union un_if2h *)0xFFFD1).BIT -#define IF3 (*(volatile union un_if3 *)0xFFFD2).if3 -#define IF3_bit (*(volatile union un_if3 *)0xFFFD2).BIT -#define IF3L (*(volatile union un_if3l *)0xFFFD2).if3l -#define IF3L_bit (*(volatile union un_if3l *)0xFFFD2).BIT -#define MK2 (*(volatile union un_mk2 *)0xFFFD4).mk2 -#define MK2_bit (*(volatile union un_mk2 *)0xFFFD4).BIT -#define MK2L (*(volatile union un_mk2l *)0xFFFD4).mk2l -#define MK2L_bit (*(volatile union un_mk2l *)0xFFFD4).BIT -#define MK2H (*(volatile union un_mk2h *)0xFFFD5).mk2h -#define MK2H_bit (*(volatile union un_mk2h *)0xFFFD5).BIT -#define MK3 (*(volatile union un_mk3 *)0xFFFD6).mk3 -#define MK3_bit (*(volatile union un_mk3 *)0xFFFD6).BIT -#define MK3L (*(volatile union un_mk3l *)0xFFFD6).mk3l -#define MK3L_bit (*(volatile union un_mk3l *)0xFFFD6).BIT -#define PR02 (*(volatile union un_pr02 *)0xFFFD8).pr02 -#define PR02_bit (*(volatile union un_pr02 *)0xFFFD8).BIT -#define PR02L (*(volatile union un_pr02l *)0xFFFD8).pr02l -#define PR02L_bit (*(volatile union un_pr02l *)0xFFFD8).BIT -#define PR02H (*(volatile union un_pr02h *)0xFFFD9).pr02h -#define PR02H_bit (*(volatile union un_pr02h *)0xFFFD9).BIT -#define PR03 (*(volatile union un_pr03 *)0xFFFDA).pr03 -#define PR03_bit (*(volatile union un_pr03 *)0xFFFDA).BIT -#define PR03L (*(volatile union un_pr03l *)0xFFFDA).pr03l -#define PR03L_bit (*(volatile union un_pr03l *)0xFFFDA).BIT -#define PR12 (*(volatile union un_pr12 *)0xFFFDC).pr12 -#define PR12_bit (*(volatile union un_pr12 *)0xFFFDC).BIT -#define PR12L (*(volatile union un_pr12l *)0xFFFDC).pr12l -#define PR12L_bit (*(volatile union un_pr12l *)0xFFFDC).BIT -#define PR12H (*(volatile union un_pr12h *)0xFFFDD).pr12h -#define PR12H_bit (*(volatile union un_pr12h *)0xFFFDD).BIT -#define PR13 (*(volatile union un_pr13 *)0xFFFDE).pr13 -#define PR13_bit (*(volatile union un_pr13 *)0xFFFDE).BIT -#define PR13L (*(volatile union un_pr13l *)0xFFFDE).pr13l -#define PR13L_bit (*(volatile union un_pr13l *)0xFFFDE).BIT -#define IF0 (*(volatile union un_if0 *)0xFFFE0).if0 -#define IF0_bit (*(volatile union un_if0 *)0xFFFE0).BIT -#define IF0L (*(volatile union un_if0l *)0xFFFE0).if0l -#define IF0L_bit (*(volatile union un_if0l *)0xFFFE0).BIT -#define IF0H (*(volatile union un_if0h *)0xFFFE1).if0h -#define IF0H_bit (*(volatile union un_if0h *)0xFFFE1).BIT -#define IF1 (*(volatile union un_if1 *)0xFFFE2).if1 -#define IF1_bit (*(volatile union un_if1 *)0xFFFE2).BIT -#define IF1L (*(volatile union un_if1l *)0xFFFE2).if1l -#define IF1L_bit (*(volatile union un_if1l *)0xFFFE2).BIT -#define IF1H (*(volatile union un_if1h *)0xFFFE3).if1h -#define IF1H_bit (*(volatile union un_if1h *)0xFFFE3).BIT -#define MK0 (*(volatile union un_mk0 *)0xFFFE4).mk0 -#define MK0_bit (*(volatile union un_mk0 *)0xFFFE4).BIT -#define MK0L (*(volatile union un_mk0l *)0xFFFE4).mk0l -#define MK0L_bit (*(volatile union un_mk0l *)0xFFFE4).BIT -#define MK0H (*(volatile union un_mk0h *)0xFFFE5).mk0h -#define MK0H_bit (*(volatile union un_mk0h *)0xFFFE5).BIT -#define MK1 (*(volatile union un_mk1 *)0xFFFE6).mk1 -#define MK1_bit (*(volatile union un_mk1 *)0xFFFE6).BIT -#define MK1L (*(volatile union un_mk1l *)0xFFFE6).mk1l -#define MK1L_bit (*(volatile union un_mk1l *)0xFFFE6).BIT -#define MK1H (*(volatile union un_mk1h *)0xFFFE7).mk1h -#define MK1H_bit (*(volatile union un_mk1h *)0xFFFE7).BIT -#define PR00 (*(volatile union un_pr00 *)0xFFFE8).pr00 -#define PR00_bit (*(volatile union un_pr00 *)0xFFFE8).BIT -#define PR00L (*(volatile union un_pr00l *)0xFFFE8).pr00l -#define PR00L_bit (*(volatile union un_pr00l *)0xFFFE8).BIT -#define PR00H (*(volatile union un_pr00h *)0xFFFE9).pr00h -#define PR00H_bit (*(volatile union un_pr00h *)0xFFFE9).BIT -#define PR01 (*(volatile union un_pr01 *)0xFFFEA).pr01 -#define PR01_bit (*(volatile union un_pr01 *)0xFFFEA).BIT -#define PR01L (*(volatile union un_pr01l *)0xFFFEA).pr01l -#define PR01L_bit (*(volatile union un_pr01l *)0xFFFEA).BIT -#define PR01H (*(volatile union un_pr01h *)0xFFFEB).pr01h -#define PR01H_bit (*(volatile union un_pr01h *)0xFFFEB).BIT -#define PR10 (*(volatile union un_pr10 *)0xFFFEC).pr10 -#define PR10_bit (*(volatile union un_pr10 *)0xFFFEC).BIT -#define PR10L (*(volatile union un_pr10l *)0xFFFEC).pr10l -#define PR10L_bit (*(volatile union un_pr10l *)0xFFFEC).BIT -#define PR10H (*(volatile union un_pr10h *)0xFFFED).pr10h -#define PR10H_bit (*(volatile union un_pr10h *)0xFFFED).BIT -#define PR11 (*(volatile union un_pr11 *)0xFFFEE).pr11 -#define PR11_bit (*(volatile union un_pr11 *)0xFFFEE).BIT -#define PR11L (*(volatile union un_pr11l *)0xFFFEE).pr11l -#define PR11L_bit (*(volatile union un_pr11l *)0xFFFEE).BIT -#define PR11H (*(volatile union un_pr11h *)0xFFFEF).pr11h -#define PR11H_bit (*(volatile union un_pr11h *)0xFFFEF).BIT -#define MDAL (*(volatile unsigned short *)0xFFFF0) -#define MULA (*(volatile unsigned short *)0xFFFF0) -#define MDAH (*(volatile unsigned short *)0xFFFF2) -#define MULB (*(volatile unsigned short *)0xFFFF2) -#define MDBH (*(volatile unsigned short *)0xFFFF4) -#define MULOH (*(volatile unsigned short *)0xFFFF4) -#define MDBL (*(volatile unsigned short *)0xFFFF6) -#define MULOL (*(volatile unsigned short *)0xFFFF6) -#define PMC (*(volatile union un_pmc *)0xFFFFE).pmc -#define PMC_bit (*(volatile union un_pmc *)0xFFFFE).BIT - -/* - Sfr bits - */ -#define ADCE ADM0_bit.no0 -#define ADCS ADM0_bit.no7 -#define LCDVLM LCDM1_bit.no0 -#define LCDSEL LCDM1_bit.no3 -#define BLON LCDM1_bit.no4 -#define VLCON LCDM1_bit.no5 -#define SCOC LCDM1_bit.no6 -#define LCDON LCDM1_bit.no7 -#define OPTCKE MLCD_bit.no4 -#define COMEXP MLCD_bit.no6 -#define MLCDEN MLCD_bit.no7 -#define SPD0 IICS0_bit.no0 -#define STD0 IICS0_bit.no1 -#define ACKD0 IICS0_bit.no2 -#define TRC0 IICS0_bit.no3 -#define COI0 IICS0_bit.no4 -#define EXC0 IICS0_bit.no5 -#define ALD0 IICS0_bit.no6 -#define MSTS0 IICS0_bit.no7 -#define IICRSV0 IICF0_bit.no0 -#define STCEN0 IICF0_bit.no1 -#define IICBSY0 IICF0_bit.no6 -#define STCF0 IICF0_bit.no7 -#define FSSTP FSSQ_bit.no6 -#define SQST FSSQ_bit.no7 -#define SQEND FSASTH_bit.no6 -#define ESQEND FSASTH_bit.no7 -#define RCLOE1 RTCC0_bit.no5 -#define RCLOSEL RTCC0_bit.no6 -#define RTCE RTCC0_bit.no7 -#define RWAIT RTCC1_bit.no0 -#define RWST RTCC1_bit.no1 -#define RIFG RTCC1_bit.no3 -#define WAFG RTCC1_bit.no4 -#define RITE RTCC1_bit.no5 -#define WALIE RTCC1_bit.no6 -#define WALE RTCC1_bit.no7 -#define HIOSTOP CSC_bit.no0 -#define XTSTOP CSC_bit.no6 -#define MSTOP CSC_bit.no7 -#define SDIV CKC_bit.no3 -#define MCM0 CKC_bit.no4 -#define MCS CKC_bit.no5 -#define CSS CKC_bit.no6 -#define CLS CKC_bit.no7 -#define PCLOE0 CKS0_bit.no7 -#define PCLOE1 CKS1_bit.no7 -#define LVIF LVIM_bit.no0 -#define LVIOMSK LVIM_bit.no1 -#define LVISEN LVIM_bit.no7 -#define LVILV LVIS_bit.no0 -#define LVIMD LVIS_bit.no7 -#define DWAIT0 DMC0_bit.no4 -#define DS0 DMC0_bit.no5 -#define DRS0 DMC0_bit.no6 -#define STG0 DMC0_bit.no7 -#define DWAIT1 DMC1_bit.no4 -#define DS1 DMC1_bit.no5 -#define DRS1 DMC1_bit.no6 -#define STG1 DMC1_bit.no7 -#define DST0 DRC0_bit.no0 -#define DEN0 DRC0_bit.no7 -#define DST1 DRC1_bit.no0 -#define DEN1 DRC1_bit.no7 -#define TKBIF2 IF2_bit.no0 -#define TMIF04 IF2_bit.no1 -#define TMIF05 IF2_bit.no2 -#define PIF6 IF2_bit.no3 -#define PIF7 IF2_bit.no4 -#define LCDIF0 IF2_bit.no5 -#define CMPIF0 IF2_bit.no6 -#define CMPIF1 IF2_bit.no7 -#define TMIF06 IF2H_bit.no0 -#define TMIF07 IF2H_bit.no1 -#define SREIF3 IF2H_bit.no4 -#define MDIF IF2H_bit.no5 -#define FLIF IF2H_bit.no7 -#define DMAIF2 IF3_bit.no0 -#define DMAIF3 IF3_bit.no1 -#define TKBMK2 MK2_bit.no0 -#define TMMK04 MK2_bit.no1 -#define TMMK05 MK2_bit.no2 -#define PMK6 MK2_bit.no3 -#define PMK7 MK2_bit.no4 -#define LCDMK0 MK2_bit.no5 -#define CMPMK0 MK2_bit.no6 -#define CMPMK1 MK2_bit.no7 -#define TMMK06 MK2H_bit.no0 -#define TMMK07 MK2H_bit.no1 -#define SREMK3 MK2H_bit.no4 -#define MDMK MK2H_bit.no5 -#define FLMK MK2H_bit.no7 -#define DMAMK2 MK3_bit.no0 -#define DMAMK3 MK3_bit.no1 -#define TKBPR02 PR02_bit.no0 -#define TMPR004 PR02_bit.no1 -#define TMPR005 PR02_bit.no2 -#define PPR06 PR02_bit.no3 -#define PPR07 PR02_bit.no4 -#define LCDPR00 PR02_bit.no5 -#define CMPPR00 PR02_bit.no6 -#define CMPPR01 PR02_bit.no7 -#define TPR006 PR02H_bit.no0 -#define TPR007 PR02H_bit.no1 -#define SREPR03 PR02H_bit.no4 -#define MDPR0 PR02H_bit.no5 -#define FLPR0 PR02H_bit.no7 -#define DMAPR02 PR03_bit.no0 -#define DMAPR03 PR03_bit.no1 -#define TKBPR12 PR12_bit.no0 -#define TMPR104 PR12_bit.no1 -#define TMPR105 PR12_bit.no2 -#define PPR16 PR12_bit.no3 -#define PPR17 PR12_bit.no4 -#define LCDPR10 PR12_bit.no5 -#define CMPPR10 PR12_bit.no6 -#define CMPPR11 PR12_bit.no7 -#define TPR106 PR12H_bit.no0 -#define TPR107 PR12H_bit.no1 -#define SREPR13 PR12H_bit.no4 -#define MDPR1 PR12H_bit.no5 -#define FLPR1 PR12H_bit.no7 -#define DMAPR12 PR13_bit.no0 -#define DMAPR13 PR13_bit.no1 -#define WDTIIF IF0_bit.no0 -#define LVIIF IF0_bit.no1 -#define PIF0 IF0_bit.no2 -#define PIF1 IF0_bit.no3 -#define PIF2 IF0_bit.no4 -#define PIF3 IF0_bit.no5 -#define PIF4 IF0_bit.no6 -#define PIF5 IF0_bit.no7 -#define STIF2 IF0H_bit.no0 -#define SRIF2 IF0H_bit.no1 -#define SREIF2 IF0H_bit.no2 -#define DMAIF0 IF0H_bit.no3 -#define DMAIF1 IF0H_bit.no4 -#define CSIIF00 IF0H_bit.no5 -#define IICIF00 IF0H_bit.no5 -#define STIF0 IF0H_bit.no5 -#define TMIF00 IF0H_bit.no6 -#define SRIF0 IF0H_bit.no7 -#define SREIF0 IF1_bit.no0 -#define TMIF01H IF1_bit.no0 -#define CSIIF10 IF1_bit.no1 -#define IICIF10 IF1_bit.no1 -#define STIF1 IF1_bit.no1 -#define SRIF1 IF1_bit.no2 -#define SREIF1 IF1_bit.no3 -#define TMIF03H IF1_bit.no3 -#define IICAIF0 IF1_bit.no4 -#define RTITIF IF1_bit.no5 -#define TMIF01 IF1_bit.no7 -#define TMIF02 IF1H_bit.no0 -#define TMIF03 IF1H_bit.no1 -#define ADIF IF1H_bit.no2 -#define RTCIF IF1H_bit.no3 -#define TMKAIF IF1H_bit.no4 -#define KRIF IF1H_bit.no5 -#define STIF3 IF1H_bit.no6 -#define SRIF3 IF1H_bit.no7 -#define WDTIMK MK0_bit.no0 -#define LVIMK MK0_bit.no1 -#define PMK0 MK0_bit.no2 -#define PMK1 MK0_bit.no3 -#define PMK2 MK0_bit.no4 -#define PMK3 MK0_bit.no5 -#define PMK4 MK0_bit.no6 -#define PMK5 MK0_bit.no7 -#define STMK2 MK0H_bit.no0 -#define SRMK2 MK0H_bit.no1 -#define SREMK2 MK0H_bit.no2 -#define DMAMK0 MK0H_bit.no3 -#define DMAMK1 MK0H_bit.no4 -#define CSIMK00 MK0H_bit.no5 -#define IICMK00 MK0H_bit.no5 -#define STMK0 MK0H_bit.no5 -#define TMMK00 MK0H_bit.no6 -#define SRMK0 MK0H_bit.no7 -#define SREMK0 MK1_bit.no0 -#define TMMK01H MK1_bit.no0 -#define CSIMK10 MK1_bit.no1 -#define IICMK10 MK1_bit.no1 -#define STMK1 MK1_bit.no1 -#define SRMK1 MK1_bit.no2 -#define SREMK1 MK1_bit.no3 -#define TMMK03H MK1_bit.no3 -#define IICAMK0 MK1_bit.no4 -#define RTITMK MK1_bit.no5 -#define TMMK01 MK1_bit.no7 -#define TMMK02 MK1H_bit.no0 -#define TMMK03 MK1H_bit.no1 -#define ADMK MK1H_bit.no2 -#define RTCMK MK1H_bit.no3 -#define TMKAMK MK1H_bit.no4 -#define KRMK MK1H_bit.no5 -#define STMK3 MK1H_bit.no6 -#define SRMK3 MK1H_bit.no7 -#define WDTIPR0 PR00_bit.no0 -#define LVIPR0 PR00_bit.no1 -#define PPR00 PR00_bit.no2 -#define PPR01 PR00_bit.no3 -#define PPR02 PR00_bit.no4 -#define PPR03 PR00_bit.no5 -#define PPR04 PR00_bit.no6 -#define PPR05 PR00_bit.no7 -#define STPR02 PR00H_bit.no0 -#define SRPR02 PR00H_bit.no1 -#define SREPR02 PR00H_bit.no2 -#define DMAPR00 PR00H_bit.no3 -#define DMAPR01 PR00H_bit.no4 -#define CSIPR000 PR00H_bit.no5 -#define IICPR000 PR00H_bit.no5 -#define STPR00 PR00H_bit.no5 -#define TMPR000 PR00H_bit.no6 -#define SRPR00 PR00H_bit.no7 -#define SREPR00 PR01_bit.no0 -#define TMPR001H PR01_bit.no0 -#define CSIPR010 PR01_bit.no1 -#define IICPR010 PR01_bit.no1 -#define STPR01 PR01_bit.no1 -#define SRPR01 PR01_bit.no2 -#define SREPR01 PR01_bit.no3 -#define TMPR003H PR01_bit.no3 -#define IICAPR00 PR01_bit.no4 -#define RTITPR0 PR01_bit.no5 -#define TMPR001 PR01_bit.no7 -#define TMPR002 PR01H_bit.no0 -#define TMPR003 PR01H_bit.no1 -#define ADPR0 PR01H_bit.no2 -#define RTCPR0 PR01H_bit.no3 -#define TMKAPR0 PR01H_bit.no4 -#define KRPR0 PR01H_bit.no5 -#define STPR03 PR01H_bit.no6 -#define SRPR03 PR01H_bit.no7 -#define WDTIPR1 PR10_bit.no0 -#define LVIPR1 PR10_bit.no1 -#define PPR10 PR10_bit.no2 -#define PPR11 PR10_bit.no3 -#define PPR12 PR10_bit.no4 -#define PPR13 PR10_bit.no5 -#define PPR14 PR10_bit.no6 -#define PPR15 PR10_bit.no7 -#define STPR12 PR10H_bit.no0 -#define SRPR12 PR10H_bit.no1 -#define SREPR12 PR10H_bit.no2 -#define DMAPR10 PR10H_bit.no3 -#define DMAPR11 PR10H_bit.no4 -#define CSIPR100 PR10H_bit.no5 -#define IICPR100 PR10H_bit.no5 -#define STPR10 PR10H_bit.no5 -#define TMPR100 PR10H_bit.no6 -#define SRPR10 PR10H_bit.no7 -#define SREPR10 PR11_bit.no0 -#define TMPR101H PR11_bit.no0 -#define CSIPR110 PR11_bit.no1 -#define IICPR110 PR11_bit.no1 -#define STPR11 PR11_bit.no1 -#define SRPR11 PR11_bit.no2 -#define SREPR11 PR11_bit.no3 -#define TMPR103H PR11_bit.no3 -#define IICAPR10 PR11_bit.no4 -#define RTITPR1 PR11_bit.no5 -#define TMPR101 PR11_bit.no7 -#define TMPR102 PR11H_bit.no0 -#define TMPR103 PR11H_bit.no1 -#define ADPR1 PR11H_bit.no2 -#define RTCPR1 PR11H_bit.no3 -#define TMKAPR1 PR11H_bit.no4 -#define KRPR1 PR11H_bit.no5 -#define STPR13 PR11H_bit.no6 -#define SRPR13 PR11H_bit.no7 -#define MAA PMC_bit.no0 - -/* - Interrupt vector addresses - */ -#define RST_vect (0x0) -#define INTDBG_vect (0x2) -#define INTWDTI_vect (0x4) -#define INTLVI_vect (0x6) -#define INTP0_vect (0x8) -#define INTP1_vect (0xA) -#define INTP2_vect (0xC) -#define INTP3_vect (0xE) -#define INTP4_vect (0x10) -#define INTP5_vect (0x12) -#define INTST2_vect (0x14) -#define INTSR2_vect (0x16) -#define INTSRE2_vect (0x18) -#define INTDMA0_vect (0x1A) -#define INTDMA1_vect (0x1C) -#define INTCSI00_vect (0x1E) -#define INTIIC00_vect (0x1E) -#define INTST0_vect (0x1E) -#define INTTM00_vect (0x20) -#define INTSR0_vect (0x22) -#define INTSRE0_vect (0x24) -#define INTTM01H_vect (0x24) -#define INTCSI10_vect (0x26) -#define INTIIC10_vect (0x26) -#define INTST1_vect (0x26) -#define INTSR1_vect (0x28) -#define INTSRE1_vect (0x2A) -#define INTTM03H_vect (0x2A) -#define INTIICA0_vect (0x2C) -#define INTRTIT_vect (0x2E) -#define INTTM01_vect (0x32) -#define INTTM02_vect (0x34) -#define INTTM03_vect (0x36) -#define INTAD_vect (0x38) -#define INTRTC_vect (0x3A) -#define INTIT_vect (0x3C) -#define INTKR_vect (0x3E) -#define INTST3_vect (0x40) -#define INTSR3_vect (0x42) -#define INTTKB20_vect (0x44) -#define INTTM04_vect (0x46) -#define INTTM05_vect (0x48) -#define INTP6_vect (0x4A) -#define INTP7_vect (0x4C) -#define INTLCD0_vect (0x4E) -#define INTCMP0_vect (0x50) -#define INTCMP1_vect (0x52) -#define INTTM06_vect (0x54) -#define INTTM07_vect (0x56) -#define INTSRE3_vect (0x5C) -#define INTMD_vect (0x5E) -#define INTFL_vect (0x62) -#define INTDMA2_vect (0x64) -#define INTDMA3_vect (0x66) -#define BRK_I_vect (0x7E) -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13_ext.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13_ext.h deleted file mode 100644 index dca40d06e..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L13_ext.h +++ /dev/null @@ -1,946 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RL78L13 */ -/* FILE : iodefine_ext.h */ -/* DESCRIPTION : Definition of Extended SFRs */ -/* CPU SERIES : RL78 - L13 */ -/* CPU TYPE : R5F10WMG */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F10WMG.DVF */ -/* Copyright(C) 2012 Renesas */ -/* Version E1.00d */ -/************************************************************************/ - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_EXT_H -#define IODEFINE_EXT_H - -/* - IO Registers - */ -union un_adm2 { - unsigned char adm2; - __BITS8 BIT; -}; -union un_pu0 { - unsigned char pu0; - __BITS8 BIT; -}; -union un_pu1 { - unsigned char pu1; - __BITS8 BIT; -}; -union un_pu2 { - unsigned char pu2; - __BITS8 BIT; -}; -union un_pu3 { - unsigned char pu3; - __BITS8 BIT; -}; -union un_pu4 { - unsigned char pu4; - __BITS8 BIT; -}; -union un_pu5 { - unsigned char pu5; - __BITS8 BIT; -}; -union un_pu7 { - unsigned char pu7; - __BITS8 BIT; -}; -union un_pu12 { - unsigned char pu12; - __BITS8 BIT; -}; -union un_pu13 { - unsigned char pu13; - __BITS8 BIT; -}; -union un_pim0 { - unsigned char pim0; - __BITS8 BIT; -}; -union un_pim1 { - unsigned char pim1; - __BITS8 BIT; -}; -union un_pim3 { - unsigned char pim3; - __BITS8 BIT; -}; -union un_pim4 { - unsigned char pim4; - __BITS8 BIT; -}; -union un_pim5 { - unsigned char pim5; - __BITS8 BIT; -}; -union un_pom0 { - unsigned char pom0; - __BITS8 BIT; -}; -union un_pom1 { - unsigned char pom1; - __BITS8 BIT; -}; -union un_pom3 { - unsigned char pom3; - __BITS8 BIT; -}; -union un_pom4 { - unsigned char pom4; - __BITS8 BIT; -}; -union un_pom5 { - unsigned char pom5; - __BITS8 BIT; -}; -union un_pom13 { - unsigned char pom13; - __BITS8 BIT; -}; -union un_pmc1 { - unsigned char pmc1; - __BITS8 BIT; -}; -union un_pmc2 { - unsigned char pmc2; - __BITS8 BIT; -}; -union un_pmc4 { - unsigned char pmc4; - __BITS8 BIT; -}; -union un_nfen0 { - unsigned char nfen0; - __BITS8 BIT; -}; -union un_nfen1 { - unsigned char nfen1; - __BITS8 BIT; -}; -union un_isc { - unsigned char isc; - __BITS8 BIT; -}; -union un_tos { - unsigned char tos; - __BITS8 BIT; -}; -union un_per1 { - unsigned char per1; - __BITS8 BIT; -}; -union un_pms { - unsigned char pms; - __BITS8 BIT; -}; -union un_dflctl { - unsigned char dflctl; - __BITS8 BIT; -}; -union un_perz { - unsigned char perz; - __BITS8 BIT; -}; -union un_bectl { - unsigned char bectl; - __BITS8 BIT; -}; -union un_fsse { - unsigned char fsse; - __BITS8 BIT; -}; -union un_pfs { - unsigned char pfs; - __BITS8 BIT; -}; -union un_mduc { - unsigned char mduc; - __BITS8 BIT; -}; -union un_per0 { - unsigned char per0; - __BITS8 BIT; -}; -union un_rmc { - unsigned char rmc; - __BITS8 BIT; -}; -union un_rpectl { - unsigned char rpectl; - __BITS8 BIT; -}; -union un_porsr { - unsigned char porsr; - __BITS8 BIT; -}; -union un_se0l { - unsigned char se0l; - __BITS8 BIT; -}; -union un_ss0l { - unsigned char ss0l; - __BITS8 BIT; -}; -union un_st0l { - unsigned char st0l; - __BITS8 BIT; -}; -union un_soe0l { - unsigned char soe0l; - __BITS8 BIT; -}; -union un_se1l { - unsigned char se1l; - __BITS8 BIT; -}; -union un_ss1l { - unsigned char ss1l; - __BITS8 BIT; -}; -union un_st1l { - unsigned char st1l; - __BITS8 BIT; -}; -union un_soe1l { - unsigned char soe1l; - __BITS8 BIT; -}; -union un_te0l { - unsigned char te0l; - __BITS8 BIT; -}; -union un_ts0l { - unsigned char ts0l; - __BITS8 BIT; -}; -union un_tt0l { - unsigned char tt0l; - __BITS8 BIT; -}; -union un_toe0l { - unsigned char toe0l; - __BITS8 BIT; -}; -union un_dmc2 { - unsigned char dmc2; - __BITS8 BIT; -}; -union un_dmc3 { - unsigned char dmc3; - __BITS8 BIT; -}; -union un_drc2 { - unsigned char drc2; - __BITS8 BIT; -}; -union un_drc3 { - unsigned char drc3; - __BITS8 BIT; -}; -union un_dwaitall { - unsigned char dwaitall; - __BITS8 BIT; -}; -union un_iicctl00 { - unsigned char iicctl00; - __BITS8 BIT; -}; -union un_iicctl01 { - unsigned char iicctl01; - __BITS8 BIT; -}; -union un_crc0ctl { - unsigned char crc0ctl; - __BITS8 BIT; -}; -union un_pfseg0 { - unsigned char pfseg0; - __BITS8 BIT; -}; -union un_pfseg1 { - unsigned char pfseg1; - __BITS8 BIT; -}; -union un_pfseg2 { - unsigned char pfseg2; - __BITS8 BIT; -}; -union un_pfseg3 { - unsigned char pfseg3; - __BITS8 BIT; -}; -union un_pfseg4 { - unsigned char pfseg4; - __BITS8 BIT; -}; -union un_pfseg5 { - unsigned char pfseg5; - __BITS8 BIT; -}; -union un_pfseg6 { - unsigned char pfseg6; - __BITS8 BIT; -}; -union un_isclcd { - unsigned char isclcd; - __BITS8 BIT; -}; -union un_compmdr { - unsigned char compmdr; - __BITS8 BIT; -}; -union un_compfir { - unsigned char compfir; - __BITS8 BIT; -}; -union un_compocr { - unsigned char compocr; - __BITS8 BIT; -}; -union un_comptcr { - unsigned char comptcr; - __BITS8 BIT; -}; -union un_tkbtrg0 { - unsigned char tkbtrg0; - __BITS8 BIT; -}; -union un_tkbflg0 { - unsigned char tkbflg0; - __BITS8 BIT; -}; -union un_tkbioc00 { - unsigned char tkbioc00; - __BITS8 BIT; -}; -union un_tkbclr0 { - unsigned char tkbclr0; - __BITS8 BIT; -}; -union un_tkbioc01 { - unsigned char tkbioc01; - __BITS8 BIT; -}; -union un_tkbctl01 { - unsigned char tkbctl01; - __BITS8 BIT; -}; -union un_tkbpahfs0 { - unsigned char tkbpahfs0; - __BITS8 BIT; -}; -union un_tkbpahft0 { - unsigned char tkbpahft0; - __BITS8 BIT; -}; -union un_tkbpaflg0 { - unsigned char tkbpaflg0; - __BITS8 BIT; -}; -union un_tkbpactl02 { - unsigned char tkbpactl02; - __BITS8 BIT; -}; - -#define ADM2 (*(volatile union un_adm2 *)0xF0010).adm2 -#define ADM2_bit (*(volatile union un_adm2 *)0xF0010).BIT -#define ADUL (*(volatile unsigned char *)0xF0011) -#define ADLL (*(volatile unsigned char *)0xF0012) -#define ADTES (*(volatile unsigned char *)0xF0013) -#define LCDI (*(volatile unsigned char *)0xF001F) -#define PU0 (*(volatile union un_pu0 *)0xF0030).pu0 -#define PU0_bit (*(volatile union un_pu0 *)0xF0030).BIT -#define PU1 (*(volatile union un_pu1 *)0xF0031).pu1 -#define PU1_bit (*(volatile union un_pu1 *)0xF0031).BIT -#define PU2 (*(volatile union un_pu2 *)0xF0032).pu2 -#define PU2_bit (*(volatile union un_pu2 *)0xF0032).BIT -#define PU3 (*(volatile union un_pu3 *)0xF0033).pu3 -#define PU3_bit (*(volatile union un_pu3 *)0xF0033).BIT -#define PU4 (*(volatile union un_pu4 *)0xF0034).pu4 -#define PU4_bit (*(volatile union un_pu4 *)0xF0034).BIT -#define PU5 (*(volatile union un_pu5 *)0xF0035).pu5 -#define PU5_bit (*(volatile union un_pu5 *)0xF0035).BIT -#define PU7 (*(volatile union un_pu7 *)0xF0037).pu7 -#define PU7_bit (*(volatile union un_pu7 *)0xF0037).BIT -#define PU12 (*(volatile union un_pu12 *)0xF003C).pu12 -#define PU12_bit (*(volatile union un_pu12 *)0xF003C).BIT -#define PU13 (*(volatile union un_pu13 *)0xF003D).pu13 -#define PU13_bit (*(volatile union un_pu13 *)0xF003D).BIT -#define PIM0 (*(volatile union un_pim0 *)0xF0040).pim0 -#define PIM0_bit (*(volatile union un_pim0 *)0xF0040).BIT -#define PIM1 (*(volatile union un_pim1 *)0xF0041).pim1 -#define PIM1_bit (*(volatile union un_pim1 *)0xF0041).BIT -#define PIM3 (*(volatile union un_pim3 *)0xF0043).pim3 -#define PIM3_bit (*(volatile union un_pim3 *)0xF0043).BIT -#define PIM4 (*(volatile union un_pim4 *)0xF0044).pim4 -#define PIM4_bit (*(volatile union un_pim4 *)0xF0044).BIT -#define PIM5 (*(volatile union un_pim5 *)0xF0045).pim5 -#define PIM5_bit (*(volatile union un_pim5 *)0xF0045).BIT -#define POM0 (*(volatile union un_pom0 *)0xF0050).pom0 -#define POM0_bit (*(volatile union un_pom0 *)0xF0050).BIT -#define POM1 (*(volatile union un_pom1 *)0xF0051).pom1 -#define POM1_bit (*(volatile union un_pom1 *)0xF0051).BIT -#define POM3 (*(volatile union un_pom3 *)0xF0053).pom3 -#define POM3_bit (*(volatile union un_pom3 *)0xF0053).BIT -#define POM4 (*(volatile union un_pom4 *)0xF0054).pom4 -#define POM4_bit (*(volatile union un_pom4 *)0xF0054).BIT -#define POM5 (*(volatile union un_pom5 *)0xF0055).pom5 -#define POM5_bit (*(volatile union un_pom5 *)0xF0055).BIT -#define POM13 (*(volatile union un_pom13 *)0xF005D).pom13 -#define POM13_bit (*(volatile union un_pom13 *)0xF005D).BIT -#define PMC1 (*(volatile union un_pmc1 *)0xF0061).pmc1 -#define PMC1_bit (*(volatile union un_pmc1 *)0xF0061).BIT -#define PMC2 (*(volatile union un_pmc2 *)0xF0062).pmc2 -#define PMC2_bit (*(volatile union un_pmc2 *)0xF0062).BIT -#define PMC4 (*(volatile union un_pmc4 *)0xF0064).pmc4 -#define PMC4_bit (*(volatile union un_pmc4 *)0xF0064).BIT -#define NFEN0 (*(volatile union un_nfen0 *)0xF0070).nfen0 -#define NFEN0_bit (*(volatile union un_nfen0 *)0xF0070).BIT -#define NFEN1 (*(volatile union un_nfen1 *)0xF0071).nfen1 -#define NFEN1_bit (*(volatile union un_nfen1 *)0xF0071).BIT -#define ISC (*(volatile union un_isc *)0xF0073).isc -#define ISC_bit (*(volatile union un_isc *)0xF0073).BIT -#define TIS0 (*(volatile unsigned char *)0xF0074) -#define ADPC (*(volatile unsigned char *)0xF0076) -#define PIOR (*(volatile unsigned char *)0xF0077) -#define IAWCTL (*(volatile unsigned char *)0xF0078) -#define TOS (*(volatile union un_tos *)0xF0079).tos -#define TOS_bit (*(volatile union un_tos *)0xF0079).BIT -#define PER1 (*(volatile union un_per1 *)0xF007A).per1 -#define PER1_bit (*(volatile union un_per1 *)0xF007A).BIT -#define PMS (*(volatile union un_pms *)0xF007B).pms -#define PMS_bit (*(volatile union un_pms *)0xF007B).BIT -#define PWCTKB (*(volatile unsigned char *)0xF007C) -#define PRDSEL (*(volatile unsigned short *)0xF007E) -#define TOOLEN (*(volatile unsigned char *)0xF0080) -#define BPAL0 (*(volatile unsigned char *)0xF0081) -#define BPAH0 (*(volatile unsigned char *)0xF0082) -#define BPAS0 (*(volatile unsigned char *)0xF0083) -#define BACDVL0 (*(volatile unsigned char *)0xF0084) -#define BACDVH0 (*(volatile unsigned char *)0xF0085) -#define BACDML0 (*(volatile unsigned char *)0xF0086) -#define BACDMH0 (*(volatile unsigned char *)0xF0087) -#define MONMOD (*(volatile unsigned char *)0xF0088) -#define DFLCTL (*(volatile union un_dflctl *)0xF0090).dflctl -#define DFLCTL_bit (*(volatile union un_dflctl *)0xF0090).BIT -#define PERZ (*(volatile union un_perz *)0xF009F).perz -#define PERZ_bit (*(volatile union un_perz *)0xF009F).BIT -#define HIOTRM (*(volatile unsigned char *)0xF00A0) -#define BECTL (*(volatile union un_bectl *)0xF00A1).bectl -#define BECTL_bit (*(volatile union un_bectl *)0xF00A1).BIT -#define HOCODIV (*(volatile unsigned char *)0xF00A8) -#define TEMPCAL0 (*(volatile unsigned char *)0xF00AC) -#define TEMPCAL1 (*(volatile unsigned char *)0xF00AD) -#define TEMPCAL2 (*(volatile unsigned char *)0xF00AE) -#define TEMPCAL3 (*(volatile unsigned char *)0xF00AF) -#define FLSEC (*(volatile unsigned short *)0xF00B0) -#define FLFSWS (*(volatile unsigned short *)0xF00B2) -#define FLFSWE (*(volatile unsigned short *)0xF00B4) -#define FSSET (*(volatile unsigned char *)0xF00B6) -#define FSSE (*(volatile union un_fsse *)0xF00B7).fsse -#define FSSE_bit (*(volatile union un_fsse *)0xF00B7).BIT -#define FLFADL (*(volatile unsigned short *)0xF00B8) -#define FLFADH (*(volatile unsigned char *)0xF00BA) -#define PFCMD (*(volatile unsigned char *)0xF00C0) -#define PFS (*(volatile union un_pfs *)0xF00C1).pfs -#define PFS_bit (*(volatile union un_pfs *)0xF00C1).BIT -#define FLRL (*(volatile unsigned short *)0xF00C2) -#define FLRH (*(volatile unsigned short *)0xF00C4) -#define FLWE (*(volatile unsigned char *)0xF00C6) -#define FLRE (*(volatile unsigned char *)0xF00C7) -#define FLTMS (*(volatile unsigned short *)0xF00C8) -#define DFLMC (*(volatile unsigned short *)0xF00CA) -#define FLMCL (*(volatile unsigned short *)0xF00CC) -#define FLMCH (*(volatile unsigned char *)0xF00CE) -#define FSCTL (*(volatile unsigned char *)0xF00CF) -#define ICEADR (*(volatile unsigned short *)0xF00D0) -#define ICEDAT (*(volatile unsigned short *)0xF00D2) -#define MDCL (*(volatile unsigned short *)0xF00E0) -#define MDCH (*(volatile unsigned short *)0xF00E2) -#define MDUC (*(volatile union un_mduc *)0xF00E8).mduc -#define MDUC_bit (*(volatile union un_mduc *)0xF00E8).BIT -#define PER0 (*(volatile union un_per0 *)0xF00F0).per0 -#define PER0_bit (*(volatile union un_per0 *)0xF00F0).BIT -#define OSMC (*(volatile unsigned char *)0xF00F3) -#define RMC (*(volatile union un_rmc *)0xF00F4).rmc -#define RMC_bit (*(volatile union un_rmc *)0xF00F4).BIT -#define RPECTL (*(volatile union un_rpectl *)0xF00F5).rpectl -#define RPECTL_bit (*(volatile union un_rpectl *)0xF00F5).BIT -#define PORSR (*(volatile union un_porsr *)0xF00F9).porsr -#define PORSR_bit (*(volatile union un_porsr *)0xF00F9).BIT -#define BCDADJ (*(volatile unsigned char *)0xF00FE) -#define VECTCTRL (*(volatile unsigned char *)0xF00FF) -#define SSR00 (*(volatile unsigned short *)0xF0100) -#define SSR00L (*(volatile unsigned char *)0xF0100) -#define SSR01 (*(volatile unsigned short *)0xF0102) -#define SSR01L (*(volatile unsigned char *)0xF0102) -#define SSR02 (*(volatile unsigned short *)0xF0104) -#define SSR02L (*(volatile unsigned char *)0xF0104) -#define SSR03 (*(volatile unsigned short *)0xF0106) -#define SSR03L (*(volatile unsigned char *)0xF0106) -#define SIR00 (*(volatile unsigned short *)0xF0108) -#define SIR00L (*(volatile unsigned char *)0xF0108) -#define SIR01 (*(volatile unsigned short *)0xF010A) -#define SIR01L (*(volatile unsigned char *)0xF010A) -#define SIR02 (*(volatile unsigned short *)0xF010C) -#define SIR02L (*(volatile unsigned char *)0xF010C) -#define SIR03 (*(volatile unsigned short *)0xF010E) -#define SIR03L (*(volatile unsigned char *)0xF010E) -#define SMR00 (*(volatile unsigned short *)0xF0110) -#define SMR01 (*(volatile unsigned short *)0xF0112) -#define SMR02 (*(volatile unsigned short *)0xF0114) -#define SMR03 (*(volatile unsigned short *)0xF0116) -#define SCR00 (*(volatile unsigned short *)0xF0118) -#define SCR01 (*(volatile unsigned short *)0xF011A) -#define SCR02 (*(volatile unsigned short *)0xF011C) -#define SCR03 (*(volatile unsigned short *)0xF011E) -#define SE0 (*(volatile unsigned short *)0xF0120) -#define SE0L (*(volatile union un_se0l *)0xF0120).se0l -#define SE0L_bit (*(volatile union un_se0l *)0xF0120).BIT -#define SS0 (*(volatile unsigned short *)0xF0122) -#define SS0L (*(volatile union un_ss0l *)0xF0122).ss0l -#define SS0L_bit (*(volatile union un_ss0l *)0xF0122).BIT -#define ST0 (*(volatile unsigned short *)0xF0124) -#define ST0L (*(volatile union un_st0l *)0xF0124).st0l -#define ST0L_bit (*(volatile union un_st0l *)0xF0124).BIT -#define SPS0 (*(volatile unsigned short *)0xF0126) -#define SPS0L (*(volatile unsigned char *)0xF0126) -#define SO0 (*(volatile unsigned short *)0xF0128) -#define SOE0 (*(volatile unsigned short *)0xF012A) -#define SOE0L (*(volatile union un_soe0l *)0xF012A).soe0l -#define SOE0L_bit (*(volatile union un_soe0l *)0xF012A).BIT -#define EDR00 (*(volatile unsigned short *)0xF012C) -#define EDR00L (*(volatile unsigned char *)0xF012C) -#define EDR01 (*(volatile unsigned short *)0xF012E) -#define EDR01L (*(volatile unsigned char *)0xF012E) -#define EDR02 (*(volatile unsigned short *)0xF0130) -#define EDR02L (*(volatile unsigned char *)0xF0130) -#define EDR03 (*(volatile unsigned short *)0xF0132) -#define EDR03L (*(volatile unsigned char *)0xF0132) -#define SOL0 (*(volatile unsigned short *)0xF0134) -#define SOL0L (*(volatile unsigned char *)0xF0134) -#define SSC0 (*(volatile unsigned short *)0xF0138) -#define SSC0L (*(volatile unsigned char *)0xF0138) -#define SSR10 (*(volatile unsigned short *)0xF0140) -#define SSR10L (*(volatile unsigned char *)0xF0140) -#define SSR11 (*(volatile unsigned short *)0xF0142) -#define SSR11L (*(volatile unsigned char *)0xF0142) -#define SSR12 (*(volatile unsigned short *)0xF0144) -#define SSR12L (*(volatile unsigned char *)0xF0144) -#define SSR13 (*(volatile unsigned short *)0xF0146) -#define SSR13L (*(volatile unsigned char *)0xF0146) -#define SIR10 (*(volatile unsigned short *)0xF0148) -#define SIR10L (*(volatile unsigned char *)0xF0148) -#define SIR11 (*(volatile unsigned short *)0xF014A) -#define SIR11L (*(volatile unsigned char *)0xF014A) -#define SIR12 (*(volatile unsigned short *)0xF014C) -#define SIR12L (*(volatile unsigned char *)0xF014C) -#define SIR13 (*(volatile unsigned short *)0xF014E) -#define SIR13L (*(volatile unsigned char *)0xF014E) -#define SMR10 (*(volatile unsigned short *)0xF0150) -#define SMR11 (*(volatile unsigned short *)0xF0152) -#define SMR12 (*(volatile unsigned short *)0xF0154) -#define SMR13 (*(volatile unsigned short *)0xF0156) -#define SCR10 (*(volatile unsigned short *)0xF0158) -#define SCR11 (*(volatile unsigned short *)0xF015A) -#define SCR12 (*(volatile unsigned short *)0xF015C) -#define SCR13 (*(volatile unsigned short *)0xF015E) -#define SE1 (*(volatile unsigned short *)0xF0160) -#define SE1L (*(volatile union un_se1l *)0xF0160).se1l -#define SE1L_bit (*(volatile union un_se1l *)0xF0160).BIT -#define SS1 (*(volatile unsigned short *)0xF0162) -#define SS1L (*(volatile union un_ss1l *)0xF0162).ss1l -#define SS1L_bit (*(volatile union un_ss1l *)0xF0162).BIT -#define ST1 (*(volatile unsigned short *)0xF0164) -#define ST1L (*(volatile union un_st1l *)0xF0164).st1l -#define ST1L_bit (*(volatile union un_st1l *)0xF0164).BIT -#define SPS1 (*(volatile unsigned short *)0xF0166) -#define SPS1L (*(volatile unsigned char *)0xF0166) -#define SO1 (*(volatile unsigned short *)0xF0168) -#define SOE1 (*(volatile unsigned short *)0xF016A) -#define SOE1L (*(volatile union un_soe1l *)0xF016A).soe1l -#define SOE1L_bit (*(volatile union un_soe1l *)0xF016A).BIT -#define EDR10 (*(volatile unsigned short *)0xF016C) -#define EDR10L (*(volatile unsigned char *)0xF016C) -#define EDR11 (*(volatile unsigned short *)0xF016E) -#define EDR11L (*(volatile unsigned char *)0xF016E) -#define EDR12 (*(volatile unsigned short *)0xF0170) -#define EDR12L (*(volatile unsigned char *)0xF0170) -#define EDR13 (*(volatile unsigned short *)0xF0172) -#define EDR13L (*(volatile unsigned char *)0xF0172) -#define SOL1 (*(volatile unsigned short *)0xF0174) -#define SOL1L (*(volatile unsigned char *)0xF0174) -#define SSC1 (*(volatile unsigned short *)0xF0178) -#define SSC1L (*(volatile unsigned char *)0xF0178) -#define TCR00 (*(volatile unsigned short *)0xF0180) -#define TCR01 (*(volatile unsigned short *)0xF0182) -#define TCR02 (*(volatile unsigned short *)0xF0184) -#define TCR03 (*(volatile unsigned short *)0xF0186) -#define TCR04 (*(volatile unsigned short *)0xF0188) -#define TCR05 (*(volatile unsigned short *)0xF018A) -#define TCR06 (*(volatile unsigned short *)0xF018C) -#define TCR07 (*(volatile unsigned short *)0xF018E) -#define TMR00 (*(volatile unsigned short *)0xF0190) -#define TMR01 (*(volatile unsigned short *)0xF0192) -#define TMR02 (*(volatile unsigned short *)0xF0194) -#define TMR03 (*(volatile unsigned short *)0xF0196) -#define TMR04 (*(volatile unsigned short *)0xF0198) -#define TMR05 (*(volatile unsigned short *)0xF019A) -#define TMR06 (*(volatile unsigned short *)0xF019C) -#define TMR07 (*(volatile unsigned short *)0xF019E) -#define TSR00 (*(volatile unsigned short *)0xF01A0) -#define TSR00L (*(volatile unsigned char *)0xF01A0) -#define TSR01 (*(volatile unsigned short *)0xF01A2) -#define TSR01L (*(volatile unsigned char *)0xF01A2) -#define TSR02 (*(volatile unsigned short *)0xF01A4) -#define TSR02L (*(volatile unsigned char *)0xF01A4) -#define TSR03 (*(volatile unsigned short *)0xF01A6) -#define TSR03L (*(volatile unsigned char *)0xF01A6) -#define TSR04 (*(volatile unsigned short *)0xF01A8) -#define TSR04L (*(volatile unsigned char *)0xF01A8) -#define TSR05 (*(volatile unsigned short *)0xF01AA) -#define TSR05L (*(volatile unsigned char *)0xF01AA) -#define TSR06 (*(volatile unsigned short *)0xF01AC) -#define TSR06L (*(volatile unsigned char *)0xF01AC) -#define TSR07 (*(volatile unsigned short *)0xF01AE) -#define TSR07L (*(volatile unsigned char *)0xF01AE) -#define TE0 (*(volatile unsigned short *)0xF01B0) -#define TE0L (*(volatile union un_te0l *)0xF01B0).te0l -#define TE0L_bit (*(volatile union un_te0l *)0xF01B0).BIT -#define TS0 (*(volatile unsigned short *)0xF01B2) -#define TS0L (*(volatile union un_ts0l *)0xF01B2).ts0l -#define TS0L_bit (*(volatile union un_ts0l *)0xF01B2).BIT -#define TT0 (*(volatile unsigned short *)0xF01B4) -#define TT0L (*(volatile union un_tt0l *)0xF01B4).tt0l -#define TT0L_bit (*(volatile union un_tt0l *)0xF01B4).BIT -#define TPS0 (*(volatile unsigned short *)0xF01B6) -#define TO0 (*(volatile unsigned short *)0xF01B8) -#define TO0L (*(volatile unsigned char *)0xF01B8) -#define TOE0 (*(volatile unsigned short *)0xF01BA) -#define TOE0L (*(volatile union un_toe0l *)0xF01BA).toe0l -#define TOE0L_bit (*(volatile union un_toe0l *)0xF01BA).BIT -#define TOL0 (*(volatile unsigned short *)0xF01BC) -#define TOL0L (*(volatile unsigned char *)0xF01BC) -#define TOM0 (*(volatile unsigned short *)0xF01BE) -#define TOM0L (*(volatile unsigned char *)0xF01BE) -#define DSA2 (*(volatile unsigned char *)0xF0200) -#define DSA3 (*(volatile unsigned char *)0xF0201) -#define DRA2 (*(volatile unsigned short *)0xF0202) -#define DRA2L (*(volatile unsigned char *)0xF0202) -#define DRA2H (*(volatile unsigned char *)0xF0203) -#define DRA3 (*(volatile unsigned short *)0xF0204) -#define DRA3L (*(volatile unsigned char *)0xF0204) -#define DRA3H (*(volatile unsigned char *)0xF0205) -#define DBC2 (*(volatile unsigned short *)0xF0206) -#define DBC2L (*(volatile unsigned char *)0xF0206) -#define DBC2H (*(volatile unsigned char *)0xF0207) -#define DBC3 (*(volatile unsigned short *)0xF0208) -#define DBC3L (*(volatile unsigned char *)0xF0208) -#define DBC3H (*(volatile unsigned char *)0xF0209) -#define DMC2 (*(volatile union un_dmc2 *)0xF020A).dmc2 -#define DMC2_bit (*(volatile union un_dmc2 *)0xF020A).BIT -#define DMC3 (*(volatile union un_dmc3 *)0xF020B).dmc3 -#define DMC3_bit (*(volatile union un_dmc3 *)0xF020B).BIT -#define DRC2 (*(volatile union un_drc2 *)0xF020C).drc2 -#define DRC2_bit (*(volatile union un_drc2 *)0xF020C).BIT -#define DRC3 (*(volatile union un_drc3 *)0xF020D).drc3 -#define DRC3_bit (*(volatile union un_drc3 *)0xF020D).BIT -#define DWAITALL (*(volatile union un_dwaitall *)0xF020F).dwaitall -#define DWAITALL_bit (*(volatile union un_dwaitall *)0xF020F).BIT -#define IICCTL00 (*(volatile union un_iicctl00 *)0xF0230).iicctl00 -#define IICCTL00_bit (*(volatile union un_iicctl00 *)0xF0230).BIT -#define IICCTL01 (*(volatile union un_iicctl01 *)0xF0231).iicctl01 -#define IICCTL01_bit (*(volatile union un_iicctl01 *)0xF0231).BIT -#define IICWL0 (*(volatile unsigned char *)0xF0232) -#define IICWH0 (*(volatile unsigned char *)0xF0233) -#define SVA0 (*(volatile unsigned char *)0xF0234) -#define IICSE0 (*(volatile unsigned char *)0xF0235) -#define ELSELR00 (*(volatile unsigned char *)0xF0240) -#define ELSELR01 (*(volatile unsigned char *)0xF0241) -#define ELSELR02 (*(volatile unsigned char *)0xF0242) -#define ELSELR03 (*(volatile unsigned char *)0xF0243) -#define ELSELR04 (*(volatile unsigned char *)0xF0244) -#define ELSELR05 (*(volatile unsigned char *)0xF0245) -#define ELSELR06 (*(volatile unsigned char *)0xF0246) -#define ELSELR07 (*(volatile unsigned char *)0xF0247) -#define ELSELR08 (*(volatile unsigned char *)0xF0248) -#define ELSELR09 (*(volatile unsigned char *)0xF0249) -#define CRC0CTL (*(volatile union un_crc0ctl *)0xF02F0).crc0ctl -#define CRC0CTL_bit (*(volatile union un_crc0ctl *)0xF02F0).BIT -#define PGCRCL (*(volatile unsigned short *)0xF02F2) -#define CRCD (*(volatile unsigned short *)0xF02FA) -#define PFSEG0 (*(volatile union un_pfseg0 *)0xF0300).pfseg0 -#define PFSEG0_bit (*(volatile union un_pfseg0 *)0xF0300).BIT -#define PFSEG1 (*(volatile union un_pfseg1 *)0xF0301).pfseg1 -#define PFSEG1_bit (*(volatile union un_pfseg1 *)0xF0301).BIT -#define PFSEG2 (*(volatile union un_pfseg2 *)0xF0302).pfseg2 -#define PFSEG2_bit (*(volatile union un_pfseg2 *)0xF0302).BIT -#define PFSEG3 (*(volatile union un_pfseg3 *)0xF0303).pfseg3 -#define PFSEG3_bit (*(volatile union un_pfseg3 *)0xF0303).BIT -#define PFSEG4 (*(volatile union un_pfseg4 *)0xF0304).pfseg4 -#define PFSEG4_bit (*(volatile union un_pfseg4 *)0xF0304).BIT -#define PFSEG5 (*(volatile union un_pfseg5 *)0xF0305).pfseg5 -#define PFSEG5_bit (*(volatile union un_pfseg5 *)0xF0305).BIT -#define PFSEG6 (*(volatile union un_pfseg6 *)0xF0306).pfseg6 -#define PFSEG6_bit (*(volatile union un_pfseg6 *)0xF0306).BIT -#define ISCLCD (*(volatile union un_isclcd *)0xF0308).isclcd -#define ISCLCD_bit (*(volatile union un_isclcd *)0xF0308).BIT -#define SUBCUD (*(volatile unsigned short *)0xF0310) -#define COMPMDR (*(volatile union un_compmdr *)0xF0340).compmdr -#define COMPMDR_bit (*(volatile union un_compmdr *)0xF0340).BIT -#define COMPFIR (*(volatile union un_compfir *)0xF0341).compfir -#define COMPFIR_bit (*(volatile union un_compfir *)0xF0341).BIT -#define COMPOCR (*(volatile union un_compocr *)0xF0342).compocr -#define COMPOCR_bit (*(volatile union un_compocr *)0xF0342).BIT -#define COMPTCR (*(volatile union un_comptcr *)0xF0343).comptcr -#define COMPTCR_bit (*(volatile union un_comptcr *)0xF0343).BIT -#define SEG0 (*(volatile unsigned char *)0xF0400) -#define SEG1 (*(volatile unsigned char *)0xF0401) -#define SEG2 (*(volatile unsigned char *)0xF0402) -#define SEG3 (*(volatile unsigned char *)0xF0403) -#define SEG4 (*(volatile unsigned char *)0xF0404) -#define SEG5 (*(volatile unsigned char *)0xF0405) -#define SEG6 (*(volatile unsigned char *)0xF0406) -#define SEG7 (*(volatile unsigned char *)0xF0407) -#define SEG8 (*(volatile unsigned char *)0xF0408) -#define SEG9 (*(volatile unsigned char *)0xF0409) -#define SEG10 (*(volatile unsigned char *)0xF040A) -#define SEG11 (*(volatile unsigned char *)0xF040B) -#define SEG12 (*(volatile unsigned char *)0xF040C) -#define SEG13 (*(volatile unsigned char *)0xF040D) -#define SEG14 (*(volatile unsigned char *)0xF040E) -#define SEG15 (*(volatile unsigned char *)0xF040F) -#define SEG16 (*(volatile unsigned char *)0xF0410) -#define SEG17 (*(volatile unsigned char *)0xF0411) -#define SEG18 (*(volatile unsigned char *)0xF0412) -#define SEG19 (*(volatile unsigned char *)0xF0413) -#define SEG20 (*(volatile unsigned char *)0xF0414) -#define SEG21 (*(volatile unsigned char *)0xF0415) -#define SEG22 (*(volatile unsigned char *)0xF0416) -#define SEG23 (*(volatile unsigned char *)0xF0417) -#define SEG24 (*(volatile unsigned char *)0xF0418) -#define SEG25 (*(volatile unsigned char *)0xF0419) -#define SEG26 (*(volatile unsigned char *)0xF041A) -#define SEG27 (*(volatile unsigned char *)0xF041B) -#define SEG28 (*(volatile unsigned char *)0xF041C) -#define SEG29 (*(volatile unsigned char *)0xF041D) -#define SEG30 (*(volatile unsigned char *)0xF041E) -#define SEG31 (*(volatile unsigned char *)0xF041F) -#define SEG32 (*(volatile unsigned char *)0xF0420) -#define SEG33 (*(volatile unsigned char *)0xF0421) -#define SEG34 (*(volatile unsigned char *)0xF0422) -#define SEG35 (*(volatile unsigned char *)0xF0423) -#define SEG36 (*(volatile unsigned char *)0xF0424) -#define SEG37 (*(volatile unsigned char *)0xF0425) -#define SEG38 (*(volatile unsigned char *)0xF0426) -#define SEG39 (*(volatile unsigned char *)0xF0427) -#define SEG40 (*(volatile unsigned char *)0xF0428) -#define SEG41 (*(volatile unsigned char *)0xF0429) -#define SEG42 (*(volatile unsigned char *)0xF042A) -#define SEG43 (*(volatile unsigned char *)0xF042B) -#define SEG44 (*(volatile unsigned char *)0xF042C) -#define SEG45 (*(volatile unsigned char *)0xF042D) -#define SEG46 (*(volatile unsigned char *)0xF042E) -#define SEG47 (*(volatile unsigned char *)0xF042F) -#define SEG48 (*(volatile unsigned char *)0xF0430) -#define SEG49 (*(volatile unsigned char *)0xF0431) -#define SEG50 (*(volatile unsigned char *)0xF0432) -#define SEG51 (*(volatile unsigned char *)0xF0433) -#define SEG52 (*(volatile unsigned char *)0xF0434) -#define SEG53 (*(volatile unsigned char *)0xF0435) -#define SEG54 (*(volatile unsigned char *)0xF0436) -#define SEG55 (*(volatile unsigned char *)0xF0437) -#define TKBCR00 (*(volatile unsigned short *)0xF0500) -#define TKBCR01 (*(volatile unsigned short *)0xF0502) -#define TKBCR02 (*(volatile unsigned short *)0xF0504) -#define TKBCR03 (*(volatile unsigned short *)0xF0506) -#define TKBTGCR0 (*(volatile unsigned short *)0xF0508) -#define TKBSIR00 (*(volatile unsigned short *)0xF050A) -#define TKBSIR01 (*(volatile unsigned short *)0xF050C) -#define TKBDNR00 (*(volatile unsigned char *)0xF050E) -#define TKBSSR00 (*(volatile unsigned char *)0xF050F) -#define TKBDNR01 (*(volatile unsigned char *)0xF0510) -#define TKBSSR01 (*(volatile unsigned char *)0xF0511) -#define TKBTRG0 (*(volatile union un_tkbtrg0 *)0xF0512).tkbtrg0 -#define TKBTRG0_bit (*(volatile union un_tkbtrg0 *)0xF0512).BIT -#define TKBFLG0 (*(volatile union un_tkbflg0 *)0xF0513).tkbflg0 -#define TKBFLG0_bit (*(volatile union un_tkbflg0 *)0xF0513).BIT -#define TKBCRLD00 (*(volatile unsigned short *)0xF0514) -#define TKBCRLD01 (*(volatile unsigned short *)0xF0516) -#define TKBCNT0 (*(volatile unsigned short *)0xF0520) -#define TKBCTL00 (*(volatile unsigned short *)0xF0522) -#define TKBMFR0 (*(volatile unsigned short *)0xF0524) -#define TKBIOC00 (*(volatile union un_tkbioc00 *)0xF0526).tkbioc00 -#define TKBIOC00_bit (*(volatile union un_tkbioc00 *)0xF0526).BIT -#define TKBCLR0 (*(volatile union un_tkbclr0 *)0xF0527).tkbclr0 -#define TKBCLR0_bit (*(volatile union un_tkbclr0 *)0xF0527).BIT -#define TKBIOC01 (*(volatile union un_tkbioc01 *)0xF0528).tkbioc01 -#define TKBIOC01_bit (*(volatile union un_tkbioc01 *)0xF0528).BIT -#define TKBCTL01 (*(volatile union un_tkbctl01 *)0xF0529).tkbctl01 -#define TKBCTL01_bit (*(volatile union un_tkbctl01 *)0xF0529).BIT -#define TKBPSCS0 (*(volatile unsigned char *)0xF052A) -#define TKBPACTL00 (*(volatile unsigned short *)0xF0530) -#define TKBPACTL01 (*(volatile unsigned short *)0xF0532) -#define TKBPAHFS0 (*(volatile union un_tkbpahfs0 *)0xF0534).tkbpahfs0 -#define TKBPAHFS0_bit (*(volatile union un_tkbpahfs0 *)0xF0534).BIT -#define TKBPAHFT0 (*(volatile union un_tkbpahft0 *)0xF0535).tkbpahft0 -#define TKBPAHFT0_bit (*(volatile union un_tkbpahft0 *)0xF0535).BIT -#define TKBPAFLG0 (*(volatile union un_tkbpaflg0 *)0xF0536).tkbpaflg0 -#define TKBPAFLG0_bit (*(volatile union un_tkbpaflg0 *)0xF0536).BIT -#define TKBPACTL02 (*(volatile union un_tkbpactl02 *)0xF0537).tkbpactl02 -#define TKBPACTL02_bit (*(volatile union un_tkbpactl02 *)0xF0537).BIT - -/* - Sfr bits - */ -#define ADTYP ADM2_bit.no0 -#define AWC ADM2_bit.no2 -#define ADRCK ADM2_bit.no3 -#define TOS0 TOS_bit.no0 -#define TKB2EN PER1_bit.no4 -#define CMPEN PER1_bit.no5 -#define TMKAEN PER1_bit.no7 -#define DFLEN DFLCTL_bit.no0 -#define FSUBEN PERZ_bit.no7 -#define BRSAM BECTL_bit.no0 -#define ESQST FSSE_bit.no7 -#define DIVST MDUC_bit.no0 -#define MACSF MDUC_bit.no1 -#define MACOF MDUC_bit.no2 -#define MDSM MDUC_bit.no3 -#define MACMODE MDUC_bit.no6 -#define DIVMODE MDUC_bit.no7 -#define TAU0EN PER0_bit.no0 -#define SAU0EN PER0_bit.no2 -#define SAU1EN PER0_bit.no3 -#define IICA0EN PER0_bit.no4 -#define ADCEN PER0_bit.no5 -#define RTCWEN PER0_bit.no7 -#define PAENB RMC_bit.no0 -#define WDVOL RMC_bit.no7 -#define RPEF RPECTL_bit.no0 -#define RPERDIS RPECTL_bit.no7 -#define DWAIT2 DMC2_bit.no4 -#define DS2 DMC2_bit.no5 -#define DRS2 DMC2_bit.no6 -#define STG2 DMC2_bit.no7 -#define DWAIT3 DMC3_bit.no4 -#define DS3 DMC3_bit.no5 -#define DRS3 DMC3_bit.no6 -#define STG3 DMC3_bit.no7 -#define DST2 DRC2_bit.no0 -#define DEN2 DRC2_bit.no7 -#define DST3 DRC3_bit.no0 -#define DEN3 DRC3_bit.no7 -#define DWAITALL0 DWAITALL_bit.no0 -#define PRVARI DWAITALL_bit.no7 -#define SPT0 IICCTL00_bit.no0 -#define STT0 IICCTL00_bit.no1 -#define ACKE0 IICCTL00_bit.no2 -#define WTIM0 IICCTL00_bit.no3 -#define SPIE0 IICCTL00_bit.no4 -#define WREL0 IICCTL00_bit.no5 -#define LREL0 IICCTL00_bit.no6 -#define IICE0 IICCTL00_bit.no7 -#define PRS0 IICCTL01_bit.no0 -#define DFC0 IICCTL01_bit.no2 -#define SMC0 IICCTL01_bit.no3 -#define DAD0 IICCTL01_bit.no4 -#define CLD0 IICCTL01_bit.no5 -#define WUP0 IICCTL01_bit.no7 -#define CRC0EN CRC0CTL_bit.no7 -#define C0ENB COMPMDR_bit.no0 -#define C0MON COMPMDR_bit.no3 -#define C1ENB COMPMDR_bit.no4 -#define C1MON COMPMDR_bit.no7 -#define C0IE COMPOCR_bit.no0 -#define C0OE COMPOCR_bit.no1 -#define C0OP COMPOCR_bit.no2 -#define C1IE COMPOCR_bit.no4 -#define C1OE COMPOCR_bit.no5 -#define C1OP COMPOCR_bit.no6 -#define SPDMD COMPOCR_bit.no7 -#define TKBRDT0 TKBTRG0_bit.no0 -#define TKBRSF0 TKBFLG0_bit.no0 -#define TKBMFF0 TKBFLG0_bit.no1 -#define TKBIEF0 TKBFLG0_bit.no2 -#define TKBIRF0 TKBFLG0_bit.no3 -#define TKBSEF00 TKBFLG0_bit.no4 -#define TKBSEF01 TKBFLG0_bit.no5 -#define TKBSSF00 TKBFLG0_bit.no6 -#define TKBSSF01 TKBFLG0_bit.no7 -#define TKBTOD00 TKBIOC00_bit.no0 -#define TKBTOD01 TKBIOC00_bit.no1 -#define TKBTOL00 TKBIOC00_bit.no2 -#define TKBTOL01 TKBIOC00_bit.no3 -#define TKBCLMF0 TKBCLR0_bit.no1 -#define TKBCLIE0 TKBCLR0_bit.no2 -#define TKBCLIR0 TKBCLR0_bit.no3 -#define TKBCLSE00 TKBCLR0_bit.no4 -#define TKBCLSE01 TKBCLR0_bit.no5 -#define TKBTOE00 TKBIOC01_bit.no0 -#define TKBTOE01 TKBIOC01_bit.no1 -#define TKBCE0 TKBCTL01_bit.no7 -#define TKBPAHTS00 TKBPAHFS0_bit.no0 -#define TKBPAHTS01 TKBPAHFS0_bit.no1 -#define TKBPAHTT00 TKBPAHFT0_bit.no0 -#define TKBPAHTT01 TKBPAHFT0_bit.no1 -#define TKBPAHIF00 TKBPAFLG0_bit.no0 -#define TKBPAFIF00 TKBPAFLG0_bit.no1 -#define TKBPAHIF01 TKBPAFLG0_bit.no2 -#define TKBPAFIF01 TKBPAFLG0_bit.no3 -#define TKBPAHSF00 TKBPAFLG0_bit.no4 -#define TKBPAFSF00 TKBPAFLG0_bit.no5 -#define TKBPAHSF01 TKBPAFLG0_bit.no6 -#define TKBPAFSF01 TKBPAFLG0_bit.no7 -#define TKBPACE00 TKBPACTL02_bit.no0 -#define TKBPACE01 TKBPACTL02_bit.no1 - -/* - Interrupt vector addresses - */ -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C.h deleted file mode 100644 index b20855615..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C.h +++ /dev/null @@ -1,1002 +0,0 @@ - -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F110PJ.DVF */ -/* Copyright(C) 2013 Renesas */ -/* File Version E1.00h */ -/* Tool Version 2.5.211 */ -/* Date Generated 07/05/2013 */ -/************************************************************************/ - -#ifndef __INTRINSIC_FUNCTIONS -#define __INTRINSIC_FUNCTIONS - -#define DI() asm("di") -#define EI() asm("ei") -#define HALT() asm("halt") -#define NOP() asm("nop") -#define STOP() asm("stop") - -#endif - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_H -#define IODEFINE_H - -/* - IO Registers - */ -union un_p0 { - unsigned char p0; - __BITS8 BIT; -}; -union un_p1 { - unsigned char p1; - __BITS8 BIT; -}; -union un_p2 { - unsigned char p2; - __BITS8 BIT; -}; -union un_p3 { - unsigned char p3; - __BITS8 BIT; -}; -union un_p4 { - unsigned char p4; - __BITS8 BIT; -}; -union un_p5 { - unsigned char p5; - __BITS8 BIT; -}; -union un_p6 { - unsigned char p6; - __BITS8 BIT; -}; -union un_p7 { - unsigned char p7; - __BITS8 BIT; -}; -union un_p12 { - unsigned char p12; - __BITS8 BIT; -}; -union un_p13 { - unsigned char p13; - __BITS8 BIT; -}; -union un_p14 { - unsigned char p14; - __BITS8 BIT; -}; -union un_p15 { - unsigned char p15; - __BITS8 BIT; -}; -union un_pm0 { - unsigned char pm0; - __BITS8 BIT; -}; -union un_pm1 { - unsigned char pm1; - __BITS8 BIT; -}; -union un_pm2 { - unsigned char pm2; - __BITS8 BIT; -}; -union un_pm3 { - unsigned char pm3; - __BITS8 BIT; -}; -union un_pm4 { - unsigned char pm4; - __BITS8 BIT; -}; -union un_pm5 { - unsigned char pm5; - __BITS8 BIT; -}; -union un_pm6 { - unsigned char pm6; - __BITS8 BIT; -}; -union un_pm7 { - unsigned char pm7; - __BITS8 BIT; -}; -union un_pm12 { - unsigned char pm12; - __BITS8 BIT; -}; -union un_pm14 { - unsigned char pm14; - __BITS8 BIT; -}; -union un_pm15 { - unsigned char pm15; - __BITS8 BIT; -}; -union un_adm0 { - unsigned char adm0; - __BITS8 BIT; -}; -union un_ads { - unsigned char ads; - __BITS8 BIT; -}; -union un_adm1 { - unsigned char adm1; - __BITS8 BIT; -}; -union un_krctl { - unsigned char krctl; - __BITS8 BIT; -}; -union un_krm0 { - unsigned char krm0; - __BITS8 BIT; -}; -union un_egp0 { - unsigned char egp0; - __BITS8 BIT; -}; -union un_egn0 { - unsigned char egn0; - __BITS8 BIT; -}; -union un_lcdm1 { - unsigned char lcdm1; - __BITS8 BIT; -}; -union un_mlcd { - unsigned char mlcd; - __BITS8 BIT; -}; -union un_iics0 { - unsigned char iics0; - __BITS8 BIT; -}; -union un_iicf0 { - unsigned char iicf0; - __BITS8 BIT; -}; -union un_dam { - unsigned char dam; - __BITS8 BIT; -}; -union un_rtcc0 { - unsigned char rtcc0; - __BITS8 BIT; -}; -union un_rtcc1 { - unsigned char rtcc1; - __BITS8 BIT; -}; -union un_csc { - unsigned char csc; - __BITS8 BIT; -}; -union un_ostc { - unsigned char ostc; - __BITS8 BIT; -}; -union un_ckc { - unsigned char ckc; - __BITS8 BIT; -}; -union un_cks0 { - unsigned char cks0; - __BITS8 BIT; -}; -union un_cks1 { - unsigned char cks1; - __BITS8 BIT; -}; -union un_lvim { - unsigned char lvim; - __BITS8 BIT; -}; -union un_lvis { - unsigned char lvis; - __BITS8 BIT; -}; -union un_if2 { - unsigned short if2; - __BITS16 BIT; -}; -union un_if2l { - unsigned char if2l; - __BITS8 BIT; -}; -union un_if2h { - unsigned char if2h; - __BITS8 BIT; -}; -union un_if3 { - unsigned short if3; - __BITS16 BIT; -}; -union un_if3l { - unsigned char if3l; - __BITS8 BIT; -}; -union un_mk2 { - unsigned short mk2; - __BITS16 BIT; -}; -union un_mk2l { - unsigned char mk2l; - __BITS8 BIT; -}; -union un_mk2h { - unsigned char mk2h; - __BITS8 BIT; -}; -union un_mk3 { - unsigned short mk3; - __BITS16 BIT; -}; -union un_mk3l { - unsigned char mk3l; - __BITS8 BIT; -}; -union un_pr02 { - unsigned short pr02; - __BITS16 BIT; -}; -union un_pr02l { - unsigned char pr02l; - __BITS8 BIT; -}; -union un_pr02h { - unsigned char pr02h; - __BITS8 BIT; -}; -union un_pr03 { - unsigned short pr03; - __BITS16 BIT; -}; -union un_pr03l { - unsigned char pr03l; - __BITS8 BIT; -}; -union un_pr12 { - unsigned short pr12; - __BITS16 BIT; -}; -union un_pr12l { - unsigned char pr12l; - __BITS8 BIT; -}; -union un_pr12h { - unsigned char pr12h; - __BITS8 BIT; -}; -union un_pr13 { - unsigned short pr13; - __BITS16 BIT; -}; -union un_pr13l { - unsigned char pr13l; - __BITS8 BIT; -}; -union un_if0 { - unsigned short if0; - __BITS16 BIT; -}; -union un_if0l { - unsigned char if0l; - __BITS8 BIT; -}; -union un_if0h { - unsigned char if0h; - __BITS8 BIT; -}; -union un_if1 { - unsigned short if1; - __BITS16 BIT; -}; -union un_if1l { - unsigned char if1l; - __BITS8 BIT; -}; -union un_if1h { - unsigned char if1h; - __BITS8 BIT; -}; -union un_mk0 { - unsigned short mk0; - __BITS16 BIT; -}; -union un_mk0l { - unsigned char mk0l; - __BITS8 BIT; -}; -union un_mk0h { - unsigned char mk0h; - __BITS8 BIT; -}; -union un_mk1 { - unsigned short mk1; - __BITS16 BIT; -}; -union un_mk1l { - unsigned char mk1l; - __BITS8 BIT; -}; -union un_mk1h { - unsigned char mk1h; - __BITS8 BIT; -}; -union un_pr00 { - unsigned short pr00; - __BITS16 BIT; -}; -union un_pr00l { - unsigned char pr00l; - __BITS8 BIT; -}; -union un_pr00h { - unsigned char pr00h; - __BITS8 BIT; -}; -union un_pr01 { - unsigned short pr01; - __BITS16 BIT; -}; -union un_pr01l { - unsigned char pr01l; - __BITS8 BIT; -}; -union un_pr01h { - unsigned char pr01h; - __BITS8 BIT; -}; -union un_pr10 { - unsigned short pr10; - __BITS16 BIT; -}; -union un_pr10l { - unsigned char pr10l; - __BITS8 BIT; -}; -union un_pr10h { - unsigned char pr10h; - __BITS8 BIT; -}; -union un_pr11 { - unsigned short pr11; - __BITS16 BIT; -}; -union un_pr11l { - unsigned char pr11l; - __BITS8 BIT; -}; -union un_pr11h { - unsigned char pr11h; - __BITS8 BIT; -}; -union un_pmc { - unsigned char pmc; - __BITS8 BIT; -}; - -#define P0 (*(volatile union un_p0 *)0xFFF00).p0 -#define P0_bit (*(volatile union un_p0 *)0xFFF00).BIT -#define P1 (*(volatile union un_p1 *)0xFFF01).p1 -#define P1_bit (*(volatile union un_p1 *)0xFFF01).BIT -#define P2 (*(volatile union un_p2 *)0xFFF02).p2 -#define P2_bit (*(volatile union un_p2 *)0xFFF02).BIT -#define P3 (*(volatile union un_p3 *)0xFFF03).p3 -#define P3_bit (*(volatile union un_p3 *)0xFFF03).BIT -#define P4 (*(volatile union un_p4 *)0xFFF04).p4 -#define P4_bit (*(volatile union un_p4 *)0xFFF04).BIT -#define P5 (*(volatile union un_p5 *)0xFFF05).p5 -#define P5_bit (*(volatile union un_p5 *)0xFFF05).BIT -#define P6 (*(volatile union un_p6 *)0xFFF06).p6 -#define P6_bit (*(volatile union un_p6 *)0xFFF06).BIT -#define P7 (*(volatile union un_p7 *)0xFFF07).p7 -#define P7_bit (*(volatile union un_p7 *)0xFFF07).BIT -#define P12 (*(volatile union un_p12 *)0xFFF0C).p12 -#define P12_bit (*(volatile union un_p12 *)0xFFF0C).BIT -#define P13 (*(volatile union un_p13 *)0xFFF0D).p13 -#define P13_bit (*(volatile union un_p13 *)0xFFF0D).BIT -#define P14 (*(volatile union un_p14 *)0xFFF0E).p14 -#define P14_bit (*(volatile union un_p14 *)0xFFF0E).BIT -#define P15 (*(volatile union un_p15 *)0xFFF0F).p15 -#define P15_bit (*(volatile union un_p15 *)0xFFF0F).BIT -#define SDR00 (*(volatile unsigned short *)0xFFF10) -#define SIO00 (*(volatile unsigned char *)0xFFF10) -#define TXD0 (*(volatile unsigned char *)0xFFF10) -#define SDR01 (*(volatile unsigned short *)0xFFF12) -#define RXD0 (*(volatile unsigned char *)0xFFF12) -#define SDR12 (*(volatile unsigned short *)0xFFF14) -#define SIO30 (*(volatile unsigned char *)0xFFF14) -#define TXD3 (*(volatile unsigned char *)0xFFF14) -#define SDR13 (*(volatile unsigned short *)0xFFF16) -#define RXD3 (*(volatile unsigned char *)0xFFF16) -#define TDR00 (*(volatile unsigned short *)0xFFF18) -#define TDR01 (*(volatile unsigned short *)0xFFF1A) -#define TDR01L (*(volatile unsigned char *)0xFFF1A) -#define TDR01H (*(volatile unsigned char *)0xFFF1B) -#define ADCR (*(volatile unsigned short *)0xFFF1E) -#define ADCRH (*(volatile unsigned char *)0xFFF1F) -#define PM0 (*(volatile union un_pm0 *)0xFFF20).pm0 -#define PM0_bit (*(volatile union un_pm0 *)0xFFF20).BIT -#define PM1 (*(volatile union un_pm1 *)0xFFF21).pm1 -#define PM1_bit (*(volatile union un_pm1 *)0xFFF21).BIT -#define PM2 (*(volatile union un_pm2 *)0xFFF22).pm2 -#define PM2_bit (*(volatile union un_pm2 *)0xFFF22).BIT -#define PM3 (*(volatile union un_pm3 *)0xFFF23).pm3 -#define PM3_bit (*(volatile union un_pm3 *)0xFFF23).BIT -#define PM4 (*(volatile union un_pm4 *)0xFFF24).pm4 -#define PM4_bit (*(volatile union un_pm4 *)0xFFF24).BIT -#define PM5 (*(volatile union un_pm5 *)0xFFF25).pm5 -#define PM5_bit (*(volatile union un_pm5 *)0xFFF25).BIT -#define PM6 (*(volatile union un_pm6 *)0xFFF26).pm6 -#define PM6_bit (*(volatile union un_pm6 *)0xFFF26).BIT -#define PM7 (*(volatile union un_pm7 *)0xFFF27).pm7 -#define PM7_bit (*(volatile union un_pm7 *)0xFFF27).BIT -#define PM12 (*(volatile union un_pm12 *)0xFFF2C).pm12 -#define PM12_bit (*(volatile union un_pm12 *)0xFFF2C).BIT -#define PM14 (*(volatile union un_pm14 *)0xFFF2E).pm14 -#define PM14_bit (*(volatile union un_pm14 *)0xFFF2E).BIT -#define PM15 (*(volatile union un_pm15 *)0xFFF2F).pm15 -#define PM15_bit (*(volatile union un_pm15 *)0xFFF2F).BIT -#define ADM0 (*(volatile union un_adm0 *)0xFFF30).adm0 -#define ADM0_bit (*(volatile union un_adm0 *)0xFFF30).BIT -#define ADS (*(volatile union un_ads *)0xFFF31).ads -#define ADS_bit (*(volatile union un_ads *)0xFFF31).BIT -#define ADM1 (*(volatile union un_adm1 *)0xFFF32).adm1 -#define ADM1_bit (*(volatile union un_adm1 *)0xFFF32).BIT -#define KRCTL (*(volatile union un_krctl *)0xFFF34).krctl -#define KRCTL_bit (*(volatile union un_krctl *)0xFFF34).BIT -#define KRF (*(volatile unsigned char *)0xFFF35) -#define KRM0 (*(volatile union un_krm0 *)0xFFF37).krm0 -#define KRM0_bit (*(volatile union un_krm0 *)0xFFF37).BIT -#define EGP0 (*(volatile union un_egp0 *)0xFFF38).egp0 -#define EGP0_bit (*(volatile union un_egp0 *)0xFFF38).BIT -#define EGN0 (*(volatile union un_egn0 *)0xFFF39).egn0 -#define EGN0_bit (*(volatile union un_egn0 *)0xFFF39).BIT -#define LCDM0 (*(volatile unsigned char *)0xFFF40) -#define LCDM1 (*(volatile union un_lcdm1 *)0xFFF41).lcdm1 -#define LCDM1_bit (*(volatile union un_lcdm1 *)0xFFF41).BIT -#define LCDC0 (*(volatile unsigned char *)0xFFF42) -#define VLCD (*(volatile unsigned char *)0xFFF43) -#define SDR02 (*(volatile unsigned short *)0xFFF44) -#define SIO10 (*(volatile unsigned char *)0xFFF44) -#define TXD1 (*(volatile unsigned char *)0xFFF44) -#define SDR03 (*(volatile unsigned short *)0xFFF46) -#define RXD1 (*(volatile unsigned char *)0xFFF46) -#define SDR10 (*(volatile unsigned short *)0xFFF48) -#define SIO20 (*(volatile unsigned char *)0xFFF48) -#define TXD2 (*(volatile unsigned char *)0xFFF48) -#define SDR11 (*(volatile unsigned short *)0xFFF4A) -#define RXD2 (*(volatile unsigned char *)0xFFF4A) -#define MLCD (*(volatile union un_mlcd *)0xFFF4C).mlcd -#define MLCD_bit (*(volatile union un_mlcd *)0xFFF4C).BIT -#define IICA0 (*(volatile unsigned char *)0xFFF50) -#define IICS0 (*(volatile union un_iics0 *)0xFFF51).iics0 -#define IICS0_bit (*(volatile union un_iics0 *)0xFFF51).BIT -#define IICF0 (*(volatile union un_iicf0 *)0xFFF52).iicf0 -#define IICF0_bit (*(volatile union un_iicf0 *)0xFFF52).BIT -#define TDR02 (*(volatile unsigned short *)0xFFF64) -#define TDR03 (*(volatile unsigned short *)0xFFF66) -#define TDR03L (*(volatile unsigned char *)0xFFF66) -#define TDR03H (*(volatile unsigned char *)0xFFF67) -#define TDR04 (*(volatile unsigned short *)0xFFF68) -#define TDR05 (*(volatile unsigned short *)0xFFF6A) -#define TDR06 (*(volatile unsigned short *)0xFFF6C) -#define TDR07 (*(volatile unsigned short *)0xFFF6E) -#define DACS0 (*(volatile unsigned char *)0xFFF74) -#define DACS1 (*(volatile unsigned char *)0xFFF75) -#define DAM (*(volatile union un_dam *)0xFFF76).dam -#define DAM_bit (*(volatile union un_dam *)0xFFF76).BIT -#define ITMC (*(volatile unsigned short *)0xFFF90) -#define SEC (*(volatile unsigned char *)0xFFF92) -#define MIN (*(volatile unsigned char *)0xFFF93) -#define HOUR (*(volatile unsigned char *)0xFFF94) -#define WEEK (*(volatile unsigned char *)0xFFF95) -#define DAY (*(volatile unsigned char *)0xFFF96) -#define MONTH (*(volatile unsigned char *)0xFFF97) -#define YEAR (*(volatile unsigned char *)0xFFF98) -#define ALARMWM (*(volatile unsigned char *)0xFFF9A) -#define ALARMWH (*(volatile unsigned char *)0xFFF9B) -#define ALARMWW (*(volatile unsigned char *)0xFFF9C) -#define RTCC0 (*(volatile union un_rtcc0 *)0xFFF9D).rtcc0 -#define RTCC0_bit (*(volatile union un_rtcc0 *)0xFFF9D).BIT -#define RTCC1 (*(volatile union un_rtcc1 *)0xFFF9E).rtcc1 -#define RTCC1_bit (*(volatile union un_rtcc1 *)0xFFF9E).BIT -#define CMC (*(volatile unsigned char *)0xFFFA0) -#define CSC (*(volatile union un_csc *)0xFFFA1).csc -#define CSC_bit (*(volatile union un_csc *)0xFFFA1).BIT -#define OSTC (*(volatile union un_ostc *)0xFFFA2).ostc -#define OSTC_bit (*(volatile union un_ostc *)0xFFFA2).BIT -#define OSTS (*(volatile unsigned char *)0xFFFA3) -#define CKC (*(volatile union un_ckc *)0xFFFA4).ckc -#define CKC_bit (*(volatile union un_ckc *)0xFFFA4).BIT -#define CKS0 (*(volatile union un_cks0 *)0xFFFA5).cks0 -#define CKS0_bit (*(volatile union un_cks0 *)0xFFFA5).BIT -#define CKS1 (*(volatile union un_cks1 *)0xFFFA6).cks1 -#define CKS1_bit (*(volatile union un_cks1 *)0xFFFA6).BIT -#define RESF (*(volatile unsigned char *)0xFFFA8) -#define LVIM (*(volatile union un_lvim *)0xFFFA9).lvim -#define LVIM_bit (*(volatile union un_lvim *)0xFFFA9).BIT -#define LVIS (*(volatile union un_lvis *)0xFFFAA).lvis -#define LVIS_bit (*(volatile union un_lvis *)0xFFFAA).BIT -#define WDTE (*(volatile unsigned char *)0xFFFAB) -#define CRCIN (*(volatile unsigned char *)0xFFFAC) -#define IF2 (*(volatile union un_if2 *)0xFFFD0).if2 -#define IF2_bit (*(volatile union un_if2 *)0xFFFD0).BIT -#define IF2L (*(volatile union un_if2l *)0xFFFD0).if2l -#define IF2L_bit (*(volatile union un_if2l *)0xFFFD0).BIT -#define IF2H (*(volatile union un_if2h *)0xFFFD1).if2h -#define IF2H_bit (*(volatile union un_if2h *)0xFFFD1).BIT -#define IF3 (*(volatile union un_if3 *)0xFFFD2).if3 -#define IF3_bit (*(volatile union un_if3 *)0xFFFD2).BIT -#define IF3L (*(volatile union un_if3l *)0xFFFD2).if3l -#define IF3L_bit (*(volatile union un_if3l *)0xFFFD2).BIT -#define MK2 (*(volatile union un_mk2 *)0xFFFD4).mk2 -#define MK2_bit (*(volatile union un_mk2 *)0xFFFD4).BIT -#define MK2L (*(volatile union un_mk2l *)0xFFFD4).mk2l -#define MK2L_bit (*(volatile union un_mk2l *)0xFFFD4).BIT -#define MK2H (*(volatile union un_mk2h *)0xFFFD5).mk2h -#define MK2H_bit (*(volatile union un_mk2h *)0xFFFD5).BIT -#define MK3 (*(volatile union un_mk3 *)0xFFFD6).mk3 -#define MK3_bit (*(volatile union un_mk3 *)0xFFFD6).BIT -#define MK3L (*(volatile union un_mk3l *)0xFFFD6).mk3l -#define MK3L_bit (*(volatile union un_mk3l *)0xFFFD6).BIT -#define PR02 (*(volatile union un_pr02 *)0xFFFD8).pr02 -#define PR02_bit (*(volatile union un_pr02 *)0xFFFD8).BIT -#define PR02L (*(volatile union un_pr02l *)0xFFFD8).pr02l -#define PR02L_bit (*(volatile union un_pr02l *)0xFFFD8).BIT -#define PR02H (*(volatile union un_pr02h *)0xFFFD9).pr02h -#define PR02H_bit (*(volatile union un_pr02h *)0xFFFD9).BIT -#define PR03 (*(volatile union un_pr03 *)0xFFFDA).pr03 -#define PR03_bit (*(volatile union un_pr03 *)0xFFFDA).BIT -#define PR03L (*(volatile union un_pr03l *)0xFFFDA).pr03l -#define PR03L_bit (*(volatile union un_pr03l *)0xFFFDA).BIT -#define PR12 (*(volatile union un_pr12 *)0xFFFDC).pr12 -#define PR12_bit (*(volatile union un_pr12 *)0xFFFDC).BIT -#define PR12L (*(volatile union un_pr12l *)0xFFFDC).pr12l -#define PR12L_bit (*(volatile union un_pr12l *)0xFFFDC).BIT -#define PR12H (*(volatile union un_pr12h *)0xFFFDD).pr12h -#define PR12H_bit (*(volatile union un_pr12h *)0xFFFDD).BIT -#define PR13 (*(volatile union un_pr13 *)0xFFFDE).pr13 -#define PR13_bit (*(volatile union un_pr13 *)0xFFFDE).BIT -#define PR13L (*(volatile union un_pr13l *)0xFFFDE).pr13l -#define PR13L_bit (*(volatile union un_pr13l *)0xFFFDE).BIT -#define IF0 (*(volatile union un_if0 *)0xFFFE0).if0 -#define IF0_bit (*(volatile union un_if0 *)0xFFFE0).BIT -#define IF0L (*(volatile union un_if0l *)0xFFFE0).if0l -#define IF0L_bit (*(volatile union un_if0l *)0xFFFE0).BIT -#define IF0H (*(volatile union un_if0h *)0xFFFE1).if0h -#define IF0H_bit (*(volatile union un_if0h *)0xFFFE1).BIT -#define IF1 (*(volatile union un_if1 *)0xFFFE2).if1 -#define IF1_bit (*(volatile union un_if1 *)0xFFFE2).BIT -#define IF1L (*(volatile union un_if1l *)0xFFFE2).if1l -#define IF1L_bit (*(volatile union un_if1l *)0xFFFE2).BIT -#define IF1H (*(volatile union un_if1h *)0xFFFE3).if1h -#define IF1H_bit (*(volatile union un_if1h *)0xFFFE3).BIT -#define MK0 (*(volatile union un_mk0 *)0xFFFE4).mk0 -#define MK0_bit (*(volatile union un_mk0 *)0xFFFE4).BIT -#define MK0L (*(volatile union un_mk0l *)0xFFFE4).mk0l -#define MK0L_bit (*(volatile union un_mk0l *)0xFFFE4).BIT -#define MK0H (*(volatile union un_mk0h *)0xFFFE5).mk0h -#define MK0H_bit (*(volatile union un_mk0h *)0xFFFE5).BIT -#define MK1 (*(volatile union un_mk1 *)0xFFFE6).mk1 -#define MK1_bit (*(volatile union un_mk1 *)0xFFFE6).BIT -#define MK1L (*(volatile union un_mk1l *)0xFFFE6).mk1l -#define MK1L_bit (*(volatile union un_mk1l *)0xFFFE6).BIT -#define MK1H (*(volatile union un_mk1h *)0xFFFE7).mk1h -#define MK1H_bit (*(volatile union un_mk1h *)0xFFFE7).BIT -#define PR00 (*(volatile union un_pr00 *)0xFFFE8).pr00 -#define PR00_bit (*(volatile union un_pr00 *)0xFFFE8).BIT -#define PR00L (*(volatile union un_pr00l *)0xFFFE8).pr00l -#define PR00L_bit (*(volatile union un_pr00l *)0xFFFE8).BIT -#define PR00H (*(volatile union un_pr00h *)0xFFFE9).pr00h -#define PR00H_bit (*(volatile union un_pr00h *)0xFFFE9).BIT -#define PR01 (*(volatile union un_pr01 *)0xFFFEA).pr01 -#define PR01_bit (*(volatile union un_pr01 *)0xFFFEA).BIT -#define PR01L (*(volatile union un_pr01l *)0xFFFEA).pr01l -#define PR01L_bit (*(volatile union un_pr01l *)0xFFFEA).BIT -#define PR01H (*(volatile union un_pr01h *)0xFFFEB).pr01h -#define PR01H_bit (*(volatile union un_pr01h *)0xFFFEB).BIT -#define PR10 (*(volatile union un_pr10 *)0xFFFEC).pr10 -#define PR10_bit (*(volatile union un_pr10 *)0xFFFEC).BIT -#define PR10L (*(volatile union un_pr10l *)0xFFFEC).pr10l -#define PR10L_bit (*(volatile union un_pr10l *)0xFFFEC).BIT -#define PR10H (*(volatile union un_pr10h *)0xFFFED).pr10h -#define PR10H_bit (*(volatile union un_pr10h *)0xFFFED).BIT -#define PR11 (*(volatile union un_pr11 *)0xFFFEE).pr11 -#define PR11_bit (*(volatile union un_pr11 *)0xFFFEE).BIT -#define PR11L (*(volatile union un_pr11l *)0xFFFEE).pr11l -#define PR11L_bit (*(volatile union un_pr11l *)0xFFFEE).BIT -#define PR11H (*(volatile union un_pr11h *)0xFFFEF).pr11h -#define PR11H_bit (*(volatile union un_pr11h *)0xFFFEF).BIT -#define MACRL (*(volatile unsigned short *)0xFFFF0) -#define MACRH (*(volatile unsigned short *)0xFFFF2) -#define PMC (*(volatile union un_pmc *)0xFFFFE).pmc -#define PMC_bit (*(volatile union un_pmc *)0xFFFFE).BIT - -/* - Sfr bits - */ -#define ADCE ADM0_bit.no0 -#define ADCS ADM0_bit.no7 -#define LCDVLM LCDM1_bit.no0 -#define LCDSEL LCDM1_bit.no3 -#define BLON LCDM1_bit.no4 -#define VLCON LCDM1_bit.no5 -#define SCOC LCDM1_bit.no6 -#define LCDON LCDM1_bit.no7 -#define OPTCKE MLCD_bit.no4 -#define COMEXP MLCD_bit.no6 -#define LCTZS MLCD_bit.no7 -#define SPD0 IICS0_bit.no0 -#define STD0 IICS0_bit.no1 -#define ACKD0 IICS0_bit.no2 -#define TRC0 IICS0_bit.no3 -#define COI0 IICS0_bit.no4 -#define EXC0 IICS0_bit.no5 -#define ALD0 IICS0_bit.no6 -#define MSTS0 IICS0_bit.no7 -#define IICRSV0 IICF0_bit.no0 -#define STCEN0 IICF0_bit.no1 -#define IICBSY0 IICF0_bit.no6 -#define STCF0 IICF0_bit.no7 -#define DACE0 DAM_bit.no4 -#define DACE1 DAM_bit.no5 -#define CLOE1 RTCC0_bit.no5 -#define RTCE RTCC0_bit.no7 -#define RWAIT RTCC1_bit.no0 -#define RWST RTCC1_bit.no1 -#define RIFG RTCC1_bit.no3 -#define WAFG RTCC1_bit.no4 -#define RITE RTCC1_bit.no5 -#define WALIE RTCC1_bit.no6 -#define WALE RTCC1_bit.no7 -#define HIOSTOP CSC_bit.no0 -#define XTSTOP CSC_bit.no6 -#define MSTOP CSC_bit.no7 -#define SDIV CKC_bit.no3 -#define MCM0 CKC_bit.no4 -#define MCS CKC_bit.no5 -#define CSS CKC_bit.no6 -#define CLS CKC_bit.no7 -#define PCLOE0 CKS0_bit.no7 -#define PCLOE1 CKS1_bit.no7 -#define LVIF LVIM_bit.no0 -#define LVIOMSK LVIM_bit.no1 -#define LVISEN LVIM_bit.no7 -#define LVILV LVIS_bit.no0 -#define LVIMD LVIS_bit.no7 -#define TMIF04 IF2_bit.no1 -#define TMIF05 IF2_bit.no2 -#define PIF6 IF2_bit.no3 -#define PIF7 IF2_bit.no4 -#define LCDIF0 IF2_bit.no5 -#define CMPIF0 IF2_bit.no6 -#define CMPIF1 IF2_bit.no7 -#define TMIF06 IF2H_bit.no0 -#define TMIF07 IF2H_bit.no1 -#define USBIF IF2H_bit.no2 -#define RSUIF IF2H_bit.no3 -#define SREIF3 IF2H_bit.no4 -#define TKB2IF0 IF2H_bit.no5 -#define TKB2IF1 IF2H_bit.no6 -#define FLIF IF2H_bit.no7 -#define TKB2IF2 IF3_bit.no0 -#define FIFOIF0 IF3_bit.no1 -#define FIFOIF1 IF3_bit.no2 -#define TMMK04 MK2_bit.no1 -#define TMMK05 MK2_bit.no2 -#define PMK6 MK2_bit.no3 -#define PMK7 MK2_bit.no4 -#define LCDMK0 MK2_bit.no5 -#define CMPMK0 MK2_bit.no6 -#define CMPMK1 MK2_bit.no7 -#define TMMK06 MK2H_bit.no0 -#define TMMK07 MK2H_bit.no1 -#define USBMK MK2H_bit.no2 -#define RSUMK MK2H_bit.no3 -#define SREMK3 MK2H_bit.no4 -#define TKB2MK0 MK2H_bit.no5 -#define TKB2MK1 MK2H_bit.no6 -#define FLMK MK2H_bit.no7 -#define TKB2MK2 MK3_bit.no0 -#define FIFOMK0 MK3_bit.no1 -#define FIFOMK1 MK3_bit.no2 -#define TMPR004 PR02_bit.no1 -#define TMPR005 PR02_bit.no2 -#define PPR06 PR02_bit.no3 -#define PPR07 PR02_bit.no4 -#define LCDPR00 PR02_bit.no5 -#define CMPPR00 PR02_bit.no6 -#define CMPPR01 PR02_bit.no7 -#define TMPR006 PR02H_bit.no0 -#define TMPR007 PR02H_bit.no1 -#define USBPR0 PR02H_bit.no2 -#define RSUPR0 PR02H_bit.no3 -#define SREPR03 PR02H_bit.no4 -#define TKB2PR00 PR02H_bit.no5 -#define TKB2PR01 PR02H_bit.no6 -#define FLPR0 PR02H_bit.no7 -#define TKB2PR02 PR03_bit.no0 -#define FIFOPR00 PR03_bit.no1 -#define FIFOPR01 PR03_bit.no2 -#define TMPR104 PR12_bit.no1 -#define TMPR105 PR12_bit.no2 -#define PPR16 PR12_bit.no3 -#define PPR17 PR12_bit.no4 -#define LCDPR10 PR12_bit.no5 -#define CMPPR10 PR12_bit.no6 -#define CMPPR11 PR12_bit.no7 -#define TMPR106 PR12H_bit.no0 -#define TMPR107 PR12H_bit.no1 -#define USBPR1 PR12H_bit.no2 -#define RSUPR1 PR12H_bit.no3 -#define SREPR13 PR12H_bit.no4 -#define TKB2PR10 PR12H_bit.no5 -#define TKB2PR11 PR12H_bit.no6 -#define FLPR1 PR12H_bit.no7 -#define TKB2PR12 PR13_bit.no0 -#define FIFOPR10 PR13_bit.no1 -#define FIFOPR11 PR13_bit.no2 -#define WDTIIF IF0_bit.no0 -#define LVIIF IF0_bit.no1 -#define PIF0 IF0_bit.no2 -#define PIF1 IF0_bit.no3 -#define PIF2 IF0_bit.no4 -#define PIF3 IF0_bit.no5 -#define PIF4 IF0_bit.no6 -#define PIF5 IF0_bit.no7 -#define CSIIF20 IF0H_bit.no0 -#define IICIF20 IF0H_bit.no0 -#define STIF2 IF0H_bit.no0 -#define SRIF2 IF0H_bit.no1 -#define SREIF2 IF0H_bit.no2 -#define CSIIF00 IF0H_bit.no5 -#define IICIF00 IF0H_bit.no5 -#define STIF0 IF0H_bit.no5 -#define TMIF00 IF0H_bit.no6 -#define SRIF0 IF0H_bit.no7 -#define SREIF0 IF1_bit.no0 -#define TMIF01H IF1_bit.no0 -#define CSIIF10 IF1_bit.no1 -#define IICIF10 IF1_bit.no1 -#define STIF1 IF1_bit.no1 -#define SRIF1 IF1_bit.no2 -#define SREIF1 IF1_bit.no3 -#define TMIF03H IF1_bit.no3 -#define IICAIF0 IF1_bit.no4 -#define RTITIF IF1_bit.no5 -#define TMIF01 IF1_bit.no7 -#define TMIF02 IF1H_bit.no0 -#define TMIF03 IF1H_bit.no1 -#define ADIF IF1H_bit.no2 -#define RTCIF IF1H_bit.no3 -#define TMKAIF IF1H_bit.no4 -#define KRIF IF1H_bit.no5 -#define CSIIF30 IF1H_bit.no6 -#define IICIF30 IF1H_bit.no6 -#define STIF3 IF1H_bit.no6 -#define SRIF3 IF1H_bit.no7 -#define WDTIMK MK0_bit.no0 -#define LVIMK MK0_bit.no1 -#define PMK0 MK0_bit.no2 -#define PMK1 MK0_bit.no3 -#define PMK2 MK0_bit.no4 -#define PMK3 MK0_bit.no5 -#define PMK4 MK0_bit.no6 -#define PMK5 MK0_bit.no7 -#define CSIMK20 MK0H_bit.no0 -#define IICMK20 MK0H_bit.no0 -#define STMK2 MK0H_bit.no0 -#define SRMK2 MK0H_bit.no1 -#define SREMK2 MK0H_bit.no2 -#define CSIMK00 MK0H_bit.no5 -#define IICMK00 MK0H_bit.no5 -#define STMK0 MK0H_bit.no5 -#define TMMK00 MK0H_bit.no6 -#define SRMK0 MK0H_bit.no7 -#define SREMK0 MK1_bit.no0 -#define TMMK01H MK1_bit.no0 -#define CSIMK10 MK1_bit.no1 -#define IICMK10 MK1_bit.no1 -#define STMK1 MK1_bit.no1 -#define SRMK1 MK1_bit.no2 -#define SREMK1 MK1_bit.no3 -#define TMMK03H MK1_bit.no3 -#define IICAMK0 MK1_bit.no4 -#define RTITMK MK1_bit.no5 -#define TMMK01 MK1_bit.no7 -#define TMMK02 MK1H_bit.no0 -#define TMMK03 MK1H_bit.no1 -#define ADMK MK1H_bit.no2 -#define RTCMK MK1H_bit.no3 -#define TMKAMK MK1H_bit.no4 -#define KRMK MK1H_bit.no5 -#define CSIMK30 MK1H_bit.no6 -#define IICMK30 MK1H_bit.no6 -#define STMK3 MK1H_bit.no6 -#define SRMK3 MK1H_bit.no7 -#define WDTIPR0 PR00_bit.no0 -#define LVIPR0 PR00_bit.no1 -#define PPR00 PR00_bit.no2 -#define PPR01 PR00_bit.no3 -#define PPR02 PR00_bit.no4 -#define PPR03 PR00_bit.no5 -#define PPR04 PR00_bit.no6 -#define PPR05 PR00_bit.no7 -#define CSIPR020 PR00H_bit.no0 -#define IICPR020 PR00H_bit.no0 -#define STPR02 PR00H_bit.no0 -#define SRPR02 PR00H_bit.no1 -#define SREPR02 PR00H_bit.no2 -#define CSIPR000 PR00H_bit.no5 -#define IICPR000 PR00H_bit.no5 -#define STPR00 PR00H_bit.no5 -#define TMPR000 PR00H_bit.no6 -#define SRPR00 PR00H_bit.no7 -#define SREPR00 PR01_bit.no0 -#define TMPR001H PR01_bit.no0 -#define CSIPR010 PR01_bit.no1 -#define IICPR010 PR01_bit.no1 -#define STPR01 PR01_bit.no1 -#define SRPR01 PR01_bit.no2 -#define SREPR01 PR01_bit.no3 -#define TMPR003H PR01_bit.no3 -#define IICAPR00 PR01_bit.no4 -#define RTITPR0 PR01_bit.no5 -#define TMPR001 PR01_bit.no7 -#define TMPR002 PR01H_bit.no0 -#define TMPR003 PR01H_bit.no1 -#define ADPR0 PR01H_bit.no2 -#define RTCPR0 PR01H_bit.no3 -#define TMKAPR0 PR01H_bit.no4 -#define KRPR0 PR01H_bit.no5 -#define CSIPR030 PR01H_bit.no6 -#define IICPR030 PR01H_bit.no6 -#define STPR03 PR01H_bit.no6 -#define SRPR03 PR01H_bit.no7 -#define WDTIPR1 PR10_bit.no0 -#define LVIPR1 PR10_bit.no1 -#define PPR10 PR10_bit.no2 -#define PPR11 PR10_bit.no3 -#define PPR12 PR10_bit.no4 -#define PPR13 PR10_bit.no5 -#define PPR14 PR10_bit.no6 -#define PPR15 PR10_bit.no7 -#define CSIPR120 PR10H_bit.no0 -#define IICPR120 PR10H_bit.no0 -#define STPR12 PR10H_bit.no0 -#define SRPR12 PR10H_bit.no1 -#define SREPR12 PR10H_bit.no2 -#define CSIPR100 PR10H_bit.no5 -#define IICPR100 PR10H_bit.no5 -#define STPR10 PR10H_bit.no5 -#define TMPR100 PR10H_bit.no6 -#define SRPR10 PR10H_bit.no7 -#define SREPR10 PR11_bit.no0 -#define TMPR101H PR11_bit.no0 -#define CSIPR110 PR11_bit.no1 -#define IICPR110 PR11_bit.no1 -#define STPR11 PR11_bit.no1 -#define SRPR11 PR11_bit.no2 -#define SREPR11 PR11_bit.no3 -#define TMPR103H PR11_bit.no3 -#define IICAPR10 PR11_bit.no4 -#define RTITPR1 PR11_bit.no5 -#define TMPR101 PR11_bit.no7 -#define TMPR102 PR11H_bit.no0 -#define TMPR103 PR11H_bit.no1 -#define ADPR1 PR11H_bit.no2 -#define RTCPR1 PR11H_bit.no3 -#define TMKAPR1 PR11H_bit.no4 -#define KRPR1 PR11H_bit.no5 -#define CSIPR130 PR11H_bit.no6 -#define IICPR130 PR11H_bit.no6 -#define STPR13 PR11H_bit.no6 -#define SRPR13 PR11H_bit.no7 -#define MAA PMC_bit.no0 - -/* - Interrupt vector addresses - */ -#define RST_vect (0x0) -#define INTDBG_vect (0x2) -#define INTWDTI_vect (0x4) -#define INTLVI_vect (0x6) -#define INTP0_vect (0x8) -#define INTP1_vect (0xA) -#define INTP2_vect (0xC) -#define INTP3_vect (0xE) -#define INTP4_vect (0x10) -#define INTP5_vect (0x12) -#define INTCSI20_vect (0x14) -#define INTIIC20_vect (0x14) -#define INTST2_vect (0x14) -#define INTSR2_vect (0x16) -#define INTSRE2_vect (0x18) -#define INTCSI00_vect (0x1E) -#define INTIIC00_vect (0x1E) -#define INTST0_vect (0x1E) -#define INTTM00_vect (0x20) -#define INTSR0_vect (0x22) -#define INTSRE0_vect (0x24) -#define INTTM01H_vect (0x24) -#define INTCSI10_vect (0x26) -#define INTIIC10_vect (0x26) -#define INTST1_vect (0x26) -#define INTSR1_vect (0x28) -#define INTSRE1_vect (0x2A) -#define INTTM03H_vect (0x2A) -#define INTIICA0_vect (0x2C) -#define INTRTIT_vect (0x2E) -#define INTTM01_vect (0x32) -#define INTTM02_vect (0x34) -#define INTTM03_vect (0x36) -#define INTAD_vect (0x38) -#define INTRTC_vect (0x3A) -#define INTIT_vect (0x3C) -#define INTKR_vect (0x3E) -#define INTCSI30_vect (0x40) -#define INTIIC30_vect (0x40) -#define INTST3_vect (0x40) -#define INTSR3_vect (0x42) -#define INTTM04_vect (0x46) -#define INTTM05_vect (0x48) -#define INTP6_vect (0x4A) -#define INTP7_vect (0x4C) -#define INTLCD0_vect (0x4E) -#define INTCMP0_vect (0x50) -#define INTCMP1_vect (0x52) -#define INTTM06_vect (0x54) -#define INTTM07_vect (0x56) -#define INTUSB_vect (0x58) -#define INTRSUM_vect (0x5A) -#define INTSRE3_vect (0x5C) -#define INTTKB20_vect (0x5E) -#define INTTKB21_vect (0x60) -#define INTFL_vect (0x62) -#define INTTKB22_vect (0x64) -#define DTC0FIFO_vect (0x66) -#define DTC1FIFO_vect (0x68) -#define BRK_I_vect (0x7E) -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C_ext.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C_ext.h deleted file mode 100644 index 9460259b2..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine/iodefine_RL78L1C_ext.h +++ /dev/null @@ -1,1178 +0,0 @@ -/************************************************************************/ -/* Header file generated from device file: */ -/* DR5F110PJ.DVF */ -/* Copyright(C) 2013 Renesas */ -/* File Version E1.00h */ -/* Tool Version 2.5.211 */ -/* Date Generated 07/05/2013 */ -/************************************************************************/ - -#ifndef __INTRINSIC_FUNCTIONS -#define __INTRINSIC_FUNCTIONS - -#define DI() asm("di") -#define EI() asm("ei") -#define HALT() asm("halt") -#define NOP() asm("nop") -#define STOP() asm("stop") - -#endif - -#ifndef __IOREG_BIT_STRUCTURES -#define __IOREG_BIT_STRUCTURES -typedef struct { - unsigned char no0 :1; - unsigned char no1 :1; - unsigned char no2 :1; - unsigned char no3 :1; - unsigned char no4 :1; - unsigned char no5 :1; - unsigned char no6 :1; - unsigned char no7 :1; -} __BITS8; - -typedef struct { - unsigned short no0 :1; - unsigned short no1 :1; - unsigned short no2 :1; - unsigned short no3 :1; - unsigned short no4 :1; - unsigned short no5 :1; - unsigned short no6 :1; - unsigned short no7 :1; - unsigned short no8 :1; - unsigned short no9 :1; - unsigned short no10 :1; - unsigned short no11 :1; - unsigned short no12 :1; - unsigned short no13 :1; - unsigned short no14 :1; - unsigned short no15 :1; -} __BITS16; - -#endif - -#ifndef IODEFINE_EXT_H -#define IODEFINE_EXT_H - -/* - IO Registers - */ -union un_adm2 { - unsigned char adm2; - __BITS8 BIT; -}; -union un_pu0 { - unsigned char pu0; - __BITS8 BIT; -}; -union un_pu1 { - unsigned char pu1; - __BITS8 BIT; -}; -union un_pu2 { - unsigned char pu2; - __BITS8 BIT; -}; -union un_pu3 { - unsigned char pu3; - __BITS8 BIT; -}; -union un_pu4 { - unsigned char pu4; - __BITS8 BIT; -}; -union un_pu5 { - unsigned char pu5; - __BITS8 BIT; -}; -union un_pu7 { - unsigned char pu7; - __BITS8 BIT; -}; -union un_pu12 { - unsigned char pu12; - __BITS8 BIT; -}; -union un_pu14 { - unsigned char pu14; - __BITS8 BIT; -}; -union un_pim0 { - unsigned char pim0; - __BITS8 BIT; -}; -union un_pim1 { - unsigned char pim1; - __BITS8 BIT; -}; -union un_pim2 { - unsigned char pim2; - __BITS8 BIT; -}; -union un_pim3 { - unsigned char pim3; - __BITS8 BIT; -}; -union un_pim4 { - unsigned char pim4; - __BITS8 BIT; -}; -union un_pom0 { - unsigned char pom0; - __BITS8 BIT; -}; -union un_pom1 { - unsigned char pom1; - __BITS8 BIT; -}; -union un_pom2 { - unsigned char pom2; - __BITS8 BIT; -}; -union un_pom3 { - unsigned char pom3; - __BITS8 BIT; -}; -union un_pom4 { - unsigned char pom4; - __BITS8 BIT; -}; -union un_pmc2 { - unsigned char pmc2; - __BITS8 BIT; -}; -union un_pmc4 { - unsigned char pmc4; - __BITS8 BIT; -}; -union un_pmc14 { - unsigned char pmc14; - __BITS8 BIT; -}; -union un_nfen0 { - unsigned char nfen0; - __BITS8 BIT; -}; -union un_nfen1 { - unsigned char nfen1; - __BITS8 BIT; -}; -union un_isc { - unsigned char isc; - __BITS8 BIT; -}; -union un_tos { - unsigned char tos; - __BITS8 BIT; -}; -union un_per1 { - unsigned char per1; - __BITS8 BIT; -}; -union un_pms { - unsigned char pms; - __BITS8 BIT; -}; -union un_dflctl { - unsigned char dflctl; - __BITS8 BIT; -}; -union un_per0 { - unsigned char per0; - __BITS8 BIT; -}; -union un_rpectl { - unsigned char rpectl; - __BITS8 BIT; -}; -union un_per2 { - unsigned char per2; - __BITS8 BIT; -}; -union un_se0l { - unsigned char se0l; - __BITS8 BIT; -}; -union un_ss0l { - unsigned char ss0l; - __BITS8 BIT; -}; -union un_st0l { - unsigned char st0l; - __BITS8 BIT; -}; -union un_soe0l { - unsigned char soe0l; - __BITS8 BIT; -}; -union un_se1l { - unsigned char se1l; - __BITS8 BIT; -}; -union un_ss1l { - unsigned char ss1l; - __BITS8 BIT; -}; -union un_st1l { - unsigned char st1l; - __BITS8 BIT; -}; -union un_soe1l { - unsigned char soe1l; - __BITS8 BIT; -}; -union un_te0l { - unsigned char te0l; - __BITS8 BIT; -}; -union un_ts0l { - unsigned char ts0l; - __BITS8 BIT; -}; -union un_tt0l { - unsigned char tt0l; - __BITS8 BIT; -}; -union un_toe0l { - unsigned char toe0l; - __BITS8 BIT; -}; -union un_iicctl00 { - unsigned char iicctl00; - __BITS8 BIT; -}; -union un_iicctl01 { - unsigned char iicctl01; - __BITS8 BIT; -}; -union un_tkbtrg1 { - unsigned char tkbtrg1; - __BITS8 BIT; -}; -union un_tkbflg1 { - unsigned char tkbflg1; - __BITS8 BIT; -}; -union un_tkbioc10 { - unsigned char tkbioc10; - __BITS8 BIT; -}; -union un_tkbclr1 { - unsigned char tkbclr1; - __BITS8 BIT; -}; -union un_tkbioc11 { - unsigned char tkbioc11; - __BITS8 BIT; -}; -union un_tkbctl11 { - unsigned char tkbctl11; - __BITS8 BIT; -}; -union un_tkbpahfs1 { - unsigned char tkbpahfs1; - __BITS8 BIT; -}; -union un_tkbpahft1 { - unsigned char tkbpahft1; - __BITS8 BIT; -}; -union un_tkbpaflg1 { - unsigned char tkbpaflg1; - __BITS8 BIT; -}; -union un_tkbpactl12 { - unsigned char tkbpactl12; - __BITS8 BIT; -}; -union un_tkbtrg2 { - unsigned char tkbtrg2; - __BITS8 BIT; -}; -union un_tkbflg2 { - unsigned char tkbflg2; - __BITS8 BIT; -}; -union un_tkbioc20 { - unsigned char tkbioc20; - __BITS8 BIT; -}; -union un_tkbclr2 { - unsigned char tkbclr2; - __BITS8 BIT; -}; -union un_tkbioc21 { - unsigned char tkbioc21; - __BITS8 BIT; -}; -union un_tkbctl21 { - unsigned char tkbctl21; - __BITS8 BIT; -}; -union un_tkbpahfs2 { - unsigned char tkbpahfs2; - __BITS8 BIT; -}; -union un_tkbpahft2 { - unsigned char tkbpahft2; - __BITS8 BIT; -}; -union un_tkbpaflg2 { - unsigned char tkbpaflg2; - __BITS8 BIT; -}; -union un_tkbpactl22 { - unsigned char tkbpactl22; - __BITS8 BIT; -}; -union un_dscctl { - unsigned char dscctl; - __BITS8 BIT; -}; -union un_mckc { - unsigned char mckc; - __BITS8 BIT; -}; -union un_dtcen0 { - unsigned char dtcen0; - __BITS8 BIT; -}; -union un_dtcen1 { - unsigned char dtcen1; - __BITS8 BIT; -}; -union un_dtcen2 { - unsigned char dtcen2; - __BITS8 BIT; -}; -union un_dtcen3 { - unsigned char dtcen3; - __BITS8 BIT; -}; -union un_dtcen4 { - unsigned char dtcen4; - __BITS8 BIT; -}; -union un_crc0ctl { - unsigned char crc0ctl; - __BITS8 BIT; -}; -union un_pfseg0 { - unsigned char pfseg0; - __BITS8 BIT; -}; -union un_pfseg1 { - unsigned char pfseg1; - __BITS8 BIT; -}; -union un_pfseg2 { - unsigned char pfseg2; - __BITS8 BIT; -}; -union un_pfseg3 { - unsigned char pfseg3; - __BITS8 BIT; -}; -union un_pfseg4 { - unsigned char pfseg4; - __BITS8 BIT; -}; -union un_pfseg5 { - unsigned char pfseg5; - __BITS8 BIT; -}; -union un_pfseg6 { - unsigned char pfseg6; - __BITS8 BIT; -}; -union un_isclcd { - unsigned char isclcd; - __BITS8 BIT; -}; -union un_compmdr { - unsigned char compmdr; - __BITS8 BIT; -}; -union un_compfir { - unsigned char compfir; - __BITS8 BIT; -}; -union un_compocr { - unsigned char compocr; - __BITS8 BIT; -}; -union un_tkbtrg0 { - unsigned char tkbtrg0; - __BITS8 BIT; -}; -union un_tkbflg0 { - unsigned char tkbflg0; - __BITS8 BIT; -}; -union un_tkbioc00 { - unsigned char tkbioc00; - __BITS8 BIT; -}; -union un_tkbclr0 { - unsigned char tkbclr0; - __BITS8 BIT; -}; -union un_tkbioc01 { - unsigned char tkbioc01; - __BITS8 BIT; -}; -union un_tkbctl01 { - unsigned char tkbctl01; - __BITS8 BIT; -}; -union un_tkbpahfs0 { - unsigned char tkbpahfs0; - __BITS8 BIT; -}; -union un_tkbpahft0 { - unsigned char tkbpahft0; - __BITS8 BIT; -}; -union un_tkbpaflg0 { - unsigned char tkbpaflg0; - __BITS8 BIT; -}; -union un_tkbpactl02 { - unsigned char tkbpactl02; - __BITS8 BIT; -}; - -#define ADM2 (*(volatile union un_adm2 *)0xF0010).adm2 -#define ADM2_bit (*(volatile union un_adm2 *)0xF0010).BIT -#define ADUL (*(volatile unsigned char *)0xF0011) -#define ADLL (*(volatile unsigned char *)0xF0012) -#define ADTES (*(volatile unsigned char *)0xF0013) -#define PU0 (*(volatile union un_pu0 *)0xF0030).pu0 -#define PU0_bit (*(volatile union un_pu0 *)0xF0030).BIT -#define PU1 (*(volatile union un_pu1 *)0xF0031).pu1 -#define PU1_bit (*(volatile union un_pu1 *)0xF0031).BIT -#define PU2 (*(volatile union un_pu2 *)0xF0032).pu2 -#define PU2_bit (*(volatile union un_pu2 *)0xF0032).BIT -#define PU3 (*(volatile union un_pu3 *)0xF0033).pu3 -#define PU3_bit (*(volatile union un_pu3 *)0xF0033).BIT -#define PU4 (*(volatile union un_pu4 *)0xF0034).pu4 -#define PU4_bit (*(volatile union un_pu4 *)0xF0034).BIT -#define PU5 (*(volatile union un_pu5 *)0xF0035).pu5 -#define PU5_bit (*(volatile union un_pu5 *)0xF0035).BIT -#define PU7 (*(volatile union un_pu7 *)0xF0037).pu7 -#define PU7_bit (*(volatile union un_pu7 *)0xF0037).BIT -#define PU12 (*(volatile union un_pu12 *)0xF003C).pu12 -#define PU12_bit (*(volatile union un_pu12 *)0xF003C).BIT -#define PU14 (*(volatile union un_pu14 *)0xF003E).pu14 -#define PU14_bit (*(volatile union un_pu14 *)0xF003E).BIT -#define PIM0 (*(volatile union un_pim0 *)0xF0040).pim0 -#define PIM0_bit (*(volatile union un_pim0 *)0xF0040).BIT -#define PIM1 (*(volatile union un_pim1 *)0xF0041).pim1 -#define PIM1_bit (*(volatile union un_pim1 *)0xF0041).BIT -#define PIM2 (*(volatile union un_pim2 *)0xF0042).pim2 -#define PIM2_bit (*(volatile union un_pim2 *)0xF0042).BIT -#define PIM3 (*(volatile union un_pim3 *)0xF0043).pim3 -#define PIM3_bit (*(volatile union un_pim3 *)0xF0043).BIT -#define PIM4 (*(volatile union un_pim4 *)0xF0044).pim4 -#define PIM4_bit (*(volatile union un_pim4 *)0xF0044).BIT -#define POM0 (*(volatile union un_pom0 *)0xF0050).pom0 -#define POM0_bit (*(volatile union un_pom0 *)0xF0050).BIT -#define POM1 (*(volatile union un_pom1 *)0xF0051).pom1 -#define POM1_bit (*(volatile union un_pom1 *)0xF0051).BIT -#define POM2 (*(volatile union un_pom2 *)0xF0052).pom2 -#define POM2_bit (*(volatile union un_pom2 *)0xF0052).BIT -#define POM3 (*(volatile union un_pom3 *)0xF0053).pom3 -#define POM3_bit (*(volatile union un_pom3 *)0xF0053).BIT -#define POM4 (*(volatile union un_pom4 *)0xF0054).pom4 -#define POM4_bit (*(volatile union un_pom4 *)0xF0054).BIT -#define PMC2 (*(volatile union un_pmc2 *)0xF0062).pmc2 -#define PMC2_bit (*(volatile union un_pmc2 *)0xF0062).BIT -#define PMC4 (*(volatile union un_pmc4 *)0xF0064).pmc4 -#define PMC4_bit (*(volatile union un_pmc4 *)0xF0064).BIT -#define PMC14 (*(volatile union un_pmc14 *)0xF006E).pmc14 -#define PMC14_bit (*(volatile union un_pmc14 *)0xF006E).BIT -#define NFEN0 (*(volatile union un_nfen0 *)0xF0070).nfen0 -#define NFEN0_bit (*(volatile union un_nfen0 *)0xF0070).BIT -#define NFEN1 (*(volatile union un_nfen1 *)0xF0071).nfen1 -#define NFEN1_bit (*(volatile union un_nfen1 *)0xF0071).BIT -#define ISC (*(volatile union un_isc *)0xF0073).isc -#define ISC_bit (*(volatile union un_isc *)0xF0073).BIT -#define TIS0 (*(volatile unsigned char *)0xF0074) -#define ADPC (*(volatile unsigned char *)0xF0076) -#define PIOR (*(volatile unsigned char *)0xF0077) -#define IAWCTL (*(volatile unsigned char *)0xF0078) -#define TOS (*(volatile union un_tos *)0xF0079).tos -#define TOS_bit (*(volatile union un_tos *)0xF0079).BIT -#define PER1 (*(volatile union un_per1 *)0xF007A).per1 -#define PER1_bit (*(volatile union un_per1 *)0xF007A).BIT -#define PMS (*(volatile union un_pms *)0xF007B).pms -#define PMS_bit (*(volatile union un_pms *)0xF007B).BIT -#define GAIDIS (*(volatile unsigned char *)0xF007C) -#define DFLCTL (*(volatile union un_dflctl *)0xF0090).dflctl -#define DFLCTL_bit (*(volatile union un_dflctl *)0xF0090).BIT -#define HOCODIV (*(volatile unsigned char *)0xF00A8) -#define PER0 (*(volatile union un_per0 *)0xF00F0).per0 -#define PER0_bit (*(volatile union un_per0 *)0xF00F0).BIT -#define OSMC (*(volatile unsigned char *)0xF00F3) -#define RPECTL (*(volatile union un_rpectl *)0xF00F5).rpectl -#define RPECTL_bit (*(volatile union un_rpectl *)0xF00F5).BIT -#define PORSR (*(volatile unsigned char *)0xF00F9) -#define PER2 (*(volatile union un_per2 *)0xF00FD).per2 -#define PER2_bit (*(volatile union un_per2 *)0xF00FD).BIT -#define BCDADJ (*(volatile unsigned char *)0xF00FE) -#define SSR00 (*(volatile unsigned short *)0xF0100) -#define SSR00L (*(volatile unsigned char *)0xF0100) -#define SSR01 (*(volatile unsigned short *)0xF0102) -#define SSR01L (*(volatile unsigned char *)0xF0102) -#define SSR02 (*(volatile unsigned short *)0xF0104) -#define SSR02L (*(volatile unsigned char *)0xF0104) -#define SSR03 (*(volatile unsigned short *)0xF0106) -#define SSR03L (*(volatile unsigned char *)0xF0106) -#define SIR00 (*(volatile unsigned short *)0xF0108) -#define SIR00L (*(volatile unsigned char *)0xF0108) -#define SIR01 (*(volatile unsigned short *)0xF010A) -#define SIR01L (*(volatile unsigned char *)0xF010A) -#define SIR02 (*(volatile unsigned short *)0xF010C) -#define SIR02L (*(volatile unsigned char *)0xF010C) -#define SIR03 (*(volatile unsigned short *)0xF010E) -#define SIR03L (*(volatile unsigned char *)0xF010E) -#define SMR00 (*(volatile unsigned short *)0xF0110) -#define SMR01 (*(volatile unsigned short *)0xF0112) -#define SMR02 (*(volatile unsigned short *)0xF0114) -#define SMR03 (*(volatile unsigned short *)0xF0116) -#define SCR00 (*(volatile unsigned short *)0xF0118) -#define SCR01 (*(volatile unsigned short *)0xF011A) -#define SCR02 (*(volatile unsigned short *)0xF011C) -#define SCR03 (*(volatile unsigned short *)0xF011E) -#define SE0 (*(volatile unsigned short *)0xF0120) -#define SE0L (*(volatile union un_se0l *)0xF0120).se0l -#define SE0L_bit (*(volatile union un_se0l *)0xF0120).BIT -#define SS0 (*(volatile unsigned short *)0xF0122) -#define SS0L (*(volatile union un_ss0l *)0xF0122).ss0l -#define SS0L_bit (*(volatile union un_ss0l *)0xF0122).BIT -#define ST0 (*(volatile unsigned short *)0xF0124) -#define ST0L (*(volatile union un_st0l *)0xF0124).st0l -#define ST0L_bit (*(volatile union un_st0l *)0xF0124).BIT -#define SPS0 (*(volatile unsigned short *)0xF0126) -#define SPS0L (*(volatile unsigned char *)0xF0126) -#define SO0 (*(volatile unsigned short *)0xF0128) -#define SOE0 (*(volatile unsigned short *)0xF012A) -#define SOE0L (*(volatile union un_soe0l *)0xF012A).soe0l -#define SOE0L_bit (*(volatile union un_soe0l *)0xF012A).BIT -#define SOL0 (*(volatile unsigned short *)0xF0134) -#define SOL0L (*(volatile unsigned char *)0xF0134) -#define SSC0 (*(volatile unsigned short *)0xF0138) -#define SSC0L (*(volatile unsigned char *)0xF0138) -#define SSR10 (*(volatile unsigned short *)0xF0140) -#define SSR10L (*(volatile unsigned char *)0xF0140) -#define SSR11 (*(volatile unsigned short *)0xF0142) -#define SSR11L (*(volatile unsigned char *)0xF0142) -#define SSR12 (*(volatile unsigned short *)0xF0144) -#define SSR12L (*(volatile unsigned char *)0xF0144) -#define SSR13 (*(volatile unsigned short *)0xF0146) -#define SSR13L (*(volatile unsigned char *)0xF0146) -#define SIR10 (*(volatile unsigned short *)0xF0148) -#define SIR10L (*(volatile unsigned char *)0xF0148) -#define SIR11 (*(volatile unsigned short *)0xF014A) -#define SIR11L (*(volatile unsigned char *)0xF014A) -#define SIR12 (*(volatile unsigned short *)0xF014C) -#define SIR12L (*(volatile unsigned char *)0xF014C) -#define SIR13 (*(volatile unsigned short *)0xF014E) -#define SIR13L (*(volatile unsigned char *)0xF014E) -#define SMR10 (*(volatile unsigned short *)0xF0150) -#define SMR11 (*(volatile unsigned short *)0xF0152) -#define SMR12 (*(volatile unsigned short *)0xF0154) -#define SMR13 (*(volatile unsigned short *)0xF0156) -#define SCR10 (*(volatile unsigned short *)0xF0158) -#define SCR11 (*(volatile unsigned short *)0xF015A) -#define SCR12 (*(volatile unsigned short *)0xF015C) -#define SCR13 (*(volatile unsigned short *)0xF015E) -#define SE1 (*(volatile unsigned short *)0xF0160) -#define SE1L (*(volatile union un_se1l *)0xF0160).se1l -#define SE1L_bit (*(volatile union un_se1l *)0xF0160).BIT -#define SS1 (*(volatile unsigned short *)0xF0162) -#define SS1L (*(volatile union un_ss1l *)0xF0162).ss1l -#define SS1L_bit (*(volatile union un_ss1l *)0xF0162).BIT -#define ST1 (*(volatile unsigned short *)0xF0164) -#define ST1L (*(volatile union un_st1l *)0xF0164).st1l -#define ST1L_bit (*(volatile union un_st1l *)0xF0164).BIT -#define SPS1 (*(volatile unsigned short *)0xF0166) -#define SPS1L (*(volatile unsigned char *)0xF0166) -#define SO1 (*(volatile unsigned short *)0xF0168) -#define SOE1 (*(volatile unsigned short *)0xF016A) -#define SOE1L (*(volatile union un_soe1l *)0xF016A).soe1l -#define SOE1L_bit (*(volatile union un_soe1l *)0xF016A).BIT -#define SOL1 (*(volatile unsigned short *)0xF0174) -#define SOL1L (*(volatile unsigned char *)0xF0174) -#define SSC1 (*(volatile unsigned short *)0xF0178) -#define SSC1L (*(volatile unsigned char *)0xF0178) -#define TCR00 (*(volatile unsigned short *)0xF0180) -#define TCR01 (*(volatile unsigned short *)0xF0182) -#define TCR02 (*(volatile unsigned short *)0xF0184) -#define TCR03 (*(volatile unsigned short *)0xF0186) -#define TCR04 (*(volatile unsigned short *)0xF0188) -#define TCR05 (*(volatile unsigned short *)0xF018A) -#define TCR06 (*(volatile unsigned short *)0xF018C) -#define TCR07 (*(volatile unsigned short *)0xF018E) -#define TMR00 (*(volatile unsigned short *)0xF0190) -#define TMR01 (*(volatile unsigned short *)0xF0192) -#define TMR02 (*(volatile unsigned short *)0xF0194) -#define TMR03 (*(volatile unsigned short *)0xF0196) -#define TMR04 (*(volatile unsigned short *)0xF0198) -#define TMR05 (*(volatile unsigned short *)0xF019A) -#define TMR06 (*(volatile unsigned short *)0xF019C) -#define TMR07 (*(volatile unsigned short *)0xF019E) -#define TSR00 (*(volatile unsigned short *)0xF01A0) -#define TSR00L (*(volatile unsigned char *)0xF01A0) -#define TSR01 (*(volatile unsigned short *)0xF01A2) -#define TSR01L (*(volatile unsigned char *)0xF01A2) -#define TSR02 (*(volatile unsigned short *)0xF01A4) -#define TSR02L (*(volatile unsigned char *)0xF01A4) -#define TSR03 (*(volatile unsigned short *)0xF01A6) -#define TSR03L (*(volatile unsigned char *)0xF01A6) -#define TSR04 (*(volatile unsigned short *)0xF01A8) -#define TSR04L (*(volatile unsigned char *)0xF01A8) -#define TSR05 (*(volatile unsigned short *)0xF01AA) -#define TSR05L (*(volatile unsigned char *)0xF01AA) -#define TSR06 (*(volatile unsigned short *)0xF01AC) -#define TSR06L (*(volatile unsigned char *)0xF01AC) -#define TSR07 (*(volatile unsigned short *)0xF01AE) -#define TSR07L (*(volatile unsigned char *)0xF01AE) -#define TE0 (*(volatile unsigned short *)0xF01B0) -#define TE0L (*(volatile union un_te0l *)0xF01B0).te0l -#define TE0L_bit (*(volatile union un_te0l *)0xF01B0).BIT -#define TS0 (*(volatile unsigned short *)0xF01B2) -#define TS0L (*(volatile union un_ts0l *)0xF01B2).ts0l -#define TS0L_bit (*(volatile union un_ts0l *)0xF01B2).BIT -#define TT0 (*(volatile unsigned short *)0xF01B4) -#define TT0L (*(volatile union un_tt0l *)0xF01B4).tt0l -#define TT0L_bit (*(volatile union un_tt0l *)0xF01B4).BIT -#define TPS0 (*(volatile unsigned short *)0xF01B6) -#define TO0 (*(volatile unsigned short *)0xF01B8) -#define TO0L (*(volatile unsigned char *)0xF01B8) -#define TOE0 (*(volatile unsigned short *)0xF01BA) -#define TOE0L (*(volatile union un_toe0l *)0xF01BA).toe0l -#define TOE0L_bit (*(volatile union un_toe0l *)0xF01BA).BIT -#define TOL0 (*(volatile unsigned short *)0xF01BC) -#define TOL0L (*(volatile unsigned char *)0xF01BC) -#define TOM0 (*(volatile unsigned short *)0xF01BE) -#define TOM0L (*(volatile unsigned char *)0xF01BE) -#define ELSELR00 (*(volatile unsigned char *)0xF01C0) -#define ELSELR01 (*(volatile unsigned char *)0xF01C1) -#define ELSELR02 (*(volatile unsigned char *)0xF01C2) -#define ELSELR03 (*(volatile unsigned char *)0xF01C3) -#define ELSELR04 (*(volatile unsigned char *)0xF01C4) -#define ELSELR05 (*(volatile unsigned char *)0xF01C5) -#define ELSELR06 (*(volatile unsigned char *)0xF01C6) -#define ELSELR07 (*(volatile unsigned char *)0xF01C7) -#define ELSELR08 (*(volatile unsigned char *)0xF01C8) -#define ELSELR09 (*(volatile unsigned char *)0xF01C9) -#define ELSELR10 (*(volatile unsigned char *)0xF01CA) -#define ELSELR11 (*(volatile unsigned char *)0xF01CB) -#define ELSELR12 (*(volatile unsigned char *)0xF01CC) -#define ELSELR13 (*(volatile unsigned char *)0xF01CD) -#define ELSELR14 (*(volatile unsigned char *)0xF01CE) -#define ELSELR15 (*(volatile unsigned char *)0xF01CF) -#define ELSELR16 (*(volatile unsigned char *)0xF01D0) -#define ELSELR17 (*(volatile unsigned char *)0xF01D1) -#define ELSELR18 (*(volatile unsigned char *)0xF01D2) -#define ELSELR19 (*(volatile unsigned char *)0xF01D3) -#define ELSELR20 (*(volatile unsigned char *)0xF01D4) -#define ELSELR21 (*(volatile unsigned char *)0xF01D5) -#define ELSELR22 (*(volatile unsigned char *)0xF01D6) -#define ELSELR23 (*(volatile unsigned char *)0xF01D7) -#define ELSELR24 (*(volatile unsigned char *)0xF01D8) -#define ELSELR25 (*(volatile unsigned char *)0xF01D9) -#define ELSELR26 (*(volatile unsigned char *)0xF01DA) -#define ELSELR27 (*(volatile unsigned char *)0xF01DB) -#define ELSELR28 (*(volatile unsigned char *)0xF01DC) -#define ELSELR29 (*(volatile unsigned char *)0xF01DD) -#define ELSELR30 (*(volatile unsigned char *)0xF01DE) -#define IICCTL00 (*(volatile union un_iicctl00 *)0xF0230).iicctl00 -#define IICCTL00_bit (*(volatile union un_iicctl00 *)0xF0230).BIT -#define IICCTL01 (*(volatile union un_iicctl01 *)0xF0231).iicctl01 -#define IICCTL01_bit (*(volatile union un_iicctl01 *)0xF0231).BIT -#define IICWL0 (*(volatile unsigned char *)0xF0232) -#define IICWH0 (*(volatile unsigned char *)0xF0233) -#define SVA0 (*(volatile unsigned char *)0xF0234) -#define TKBCR10 (*(volatile unsigned short *)0xF0240) -#define TKBCR11 (*(volatile unsigned short *)0xF0242) -#define TKBCR12 (*(volatile unsigned short *)0xF0244) -#define TKBCR13 (*(volatile unsigned short *)0xF0246) -#define TKBTGCR1 (*(volatile unsigned short *)0xF0248) -#define TKBSIR10 (*(volatile unsigned short *)0xF024A) -#define TKBSIR11 (*(volatile unsigned short *)0xF024C) -#define TKBDNR10 (*(volatile unsigned char *)0xF024E) -#define TKBSSR10 (*(volatile unsigned char *)0xF024F) -#define TKBDNR11 (*(volatile unsigned char *)0xF0250) -#define TKBSSR11 (*(volatile unsigned char *)0xF0251) -#define TKBTRG1 (*(volatile union un_tkbtrg1 *)0xF0252).tkbtrg1 -#define TKBTRG1_bit (*(volatile union un_tkbtrg1 *)0xF0252).BIT -#define TKBFLG1 (*(volatile union un_tkbflg1 *)0xF0253).tkbflg1 -#define TKBFLG1_bit (*(volatile union un_tkbflg1 *)0xF0253).BIT -#define TKBCRLD10 (*(volatile unsigned short *)0xF0254) -#define TKBCRLD11 (*(volatile unsigned short *)0xF0256) -#define TKBCNT1 (*(volatile unsigned short *)0xF0260) -#define TKBCTL10 (*(volatile unsigned short *)0xF0262) -#define TKBMFR1 (*(volatile unsigned short *)0xF0264) -#define TKBIOC10 (*(volatile union un_tkbioc10 *)0xF0266).tkbioc10 -#define TKBIOC10_bit (*(volatile union un_tkbioc10 *)0xF0266).BIT -#define TKBCLR1 (*(volatile union un_tkbclr1 *)0xF0267).tkbclr1 -#define TKBCLR1_bit (*(volatile union un_tkbclr1 *)0xF0267).BIT -#define TKBIOC11 (*(volatile union un_tkbioc11 *)0xF0268).tkbioc11 -#define TKBIOC11_bit (*(volatile union un_tkbioc11 *)0xF0268).BIT -#define TKBCTL11 (*(volatile union un_tkbctl11 *)0xF0269).tkbctl11 -#define TKBCTL11_bit (*(volatile union un_tkbctl11 *)0xF0269).BIT -#define TKBPSCS1 (*(volatile unsigned char *)0xF026A) -#define TKBPACTL10 (*(volatile unsigned short *)0xF0270) -#define TKBPACTL11 (*(volatile unsigned short *)0xF0272) -#define TKBPAHFS1 (*(volatile union un_tkbpahfs1 *)0xF0274).tkbpahfs1 -#define TKBPAHFS1_bit (*(volatile union un_tkbpahfs1 *)0xF0274).BIT -#define TKBPAHFT1 (*(volatile union un_tkbpahft1 *)0xF0275).tkbpahft1 -#define TKBPAHFT1_bit (*(volatile union un_tkbpahft1 *)0xF0275).BIT -#define TKBPAFLG1 (*(volatile union un_tkbpaflg1 *)0xF0276).tkbpaflg1 -#define TKBPAFLG1_bit (*(volatile union un_tkbpaflg1 *)0xF0276).BIT -#define TKBPACTL12 (*(volatile union un_tkbpactl12 *)0xF0277).tkbpactl12 -#define TKBPACTL12_bit (*(volatile union un_tkbpactl12 *)0xF0277).BIT -#define TKBCR20 (*(volatile unsigned short *)0xF0280) -#define TKBCR21 (*(volatile unsigned short *)0xF0282) -#define TKBCR22 (*(volatile unsigned short *)0xF0284) -#define TKBCR23 (*(volatile unsigned short *)0xF0286) -#define TKBTGCR2 (*(volatile unsigned short *)0xF0288) -#define TKBSIR20 (*(volatile unsigned short *)0xF028A) -#define TKBSIR21 (*(volatile unsigned short *)0xF028C) -#define TKBDNR20 (*(volatile unsigned char *)0xF028E) -#define TKBSSR20 (*(volatile unsigned char *)0xF028F) -#define TKBDNR21 (*(volatile unsigned char *)0xF0290) -#define TKBSSR21 (*(volatile unsigned char *)0xF0291) -#define TKBTRG2 (*(volatile union un_tkbtrg2 *)0xF0292).tkbtrg2 -#define TKBTRG2_bit (*(volatile union un_tkbtrg2 *)0xF0292).BIT -#define TKBFLG2 (*(volatile union un_tkbflg2 *)0xF0293).tkbflg2 -#define TKBFLG2_bit (*(volatile union un_tkbflg2 *)0xF0293).BIT -#define TKBCRLD20 (*(volatile unsigned short *)0xF0294) -#define TKBCRLD21 (*(volatile unsigned short *)0xF0296) -#define TKBCNT2 (*(volatile unsigned short *)0xF02A0) -#define TKBCTL20 (*(volatile unsigned short *)0xF02A2) -#define TKBMFR2 (*(volatile unsigned short *)0xF02A4) -#define TKBIOC20 (*(volatile union un_tkbioc20 *)0xF02A6).tkbioc20 -#define TKBIOC20_bit (*(volatile union un_tkbioc20 *)0xF02A6).BIT -#define TKBCLR2 (*(volatile union un_tkbclr2 *)0xF02A7).tkbclr2 -#define TKBCLR2_bit (*(volatile union un_tkbclr2 *)0xF02A7).BIT -#define TKBIOC21 (*(volatile union un_tkbioc21 *)0xF02A8).tkbioc21 -#define TKBIOC21_bit (*(volatile union un_tkbioc21 *)0xF02A8).BIT -#define TKBCTL21 (*(volatile union un_tkbctl21 *)0xF02A9).tkbctl21 -#define TKBCTL21_bit (*(volatile union un_tkbctl21 *)0xF02A9).BIT -#define TKBPSCS2 (*(volatile unsigned char *)0xF02AA) -#define TKBPACTL20 (*(volatile unsigned short *)0xF02B0) -#define TKBPACTL21 (*(volatile unsigned short *)0xF02B2) -#define TKBPAHFS2 (*(volatile union un_tkbpahfs2 *)0xF02B4).tkbpahfs2 -#define TKBPAHFS2_bit (*(volatile union un_tkbpahfs2 *)0xF02B4).BIT -#define TKBPAHFT2 (*(volatile union un_tkbpahft2 *)0xF02B5).tkbpahft2 -#define TKBPAHFT2_bit (*(volatile union un_tkbpahft2 *)0xF02B5).BIT -#define TKBPAFLG2 (*(volatile union un_tkbpaflg2 *)0xF02B6).tkbpaflg2 -#define TKBPAFLG2_bit (*(volatile union un_tkbpaflg2 *)0xF02B6).BIT -#define TKBPACTL22 (*(volatile union un_tkbpactl22 *)0xF02B7).tkbpactl22 -#define TKBPACTL22_bit (*(volatile union un_tkbpactl22 *)0xF02B7).BIT -#define DTCBAR (*(volatile unsigned char *)0xF02E0) -#define DSCCTL (*(volatile union un_dscctl *)0xF02E5).dscctl -#define DSCCTL_bit (*(volatile union un_dscctl *)0xF02E5).BIT -#define MCKC (*(volatile union un_mckc *)0xF02E6).mckc -#define MCKC_bit (*(volatile union un_mckc *)0xF02E6).BIT -#define DTCEN0 (*(volatile union un_dtcen0 *)0xF02E8).dtcen0 -#define DTCEN0_bit (*(volatile union un_dtcen0 *)0xF02E8).BIT -#define DTCEN1 (*(volatile union un_dtcen1 *)0xF02E9).dtcen1 -#define DTCEN1_bit (*(volatile union un_dtcen1 *)0xF02E9).BIT -#define DTCEN2 (*(volatile union un_dtcen2 *)0xF02EA).dtcen2 -#define DTCEN2_bit (*(volatile union un_dtcen2 *)0xF02EA).BIT -#define DTCEN3 (*(volatile union un_dtcen3 *)0xF02EB).dtcen3 -#define DTCEN3_bit (*(volatile union un_dtcen3 *)0xF02EB).BIT -#define DTCEN4 (*(volatile union un_dtcen4 *)0xF02EC).dtcen4 -#define DTCEN4_bit (*(volatile union un_dtcen4 *)0xF02EC).BIT -#define CRC0CTL (*(volatile union un_crc0ctl *)0xF02F0).crc0ctl -#define CRC0CTL_bit (*(volatile union un_crc0ctl *)0xF02F0).BIT -#define PGCRCL (*(volatile unsigned short *)0xF02F2) -#define CRCD (*(volatile unsigned short *)0xF02FA) -#define PFSEG0 (*(volatile union un_pfseg0 *)0xF0300).pfseg0 -#define PFSEG0_bit (*(volatile union un_pfseg0 *)0xF0300).BIT -#define PFSEG1 (*(volatile union un_pfseg1 *)0xF0301).pfseg1 -#define PFSEG1_bit (*(volatile union un_pfseg1 *)0xF0301).BIT -#define PFSEG2 (*(volatile union un_pfseg2 *)0xF0302).pfseg2 -#define PFSEG2_bit (*(volatile union un_pfseg2 *)0xF0302).BIT -#define PFSEG3 (*(volatile union un_pfseg3 *)0xF0303).pfseg3 -#define PFSEG3_bit (*(volatile union un_pfseg3 *)0xF0303).BIT -#define PFSEG4 (*(volatile union un_pfseg4 *)0xF0304).pfseg4 -#define PFSEG4_bit (*(volatile union un_pfseg4 *)0xF0304).BIT -#define PFSEG5 (*(volatile union un_pfseg5 *)0xF0305).pfseg5 -#define PFSEG5_bit (*(volatile union un_pfseg5 *)0xF0305).BIT -#define PFSEG6 (*(volatile union un_pfseg6 *)0xF0306).pfseg6 -#define PFSEG6_bit (*(volatile union un_pfseg6 *)0xF0306).BIT -#define ISCLCD (*(volatile union un_isclcd *)0xF0308).isclcd -#define ISCLCD_bit (*(volatile union un_isclcd *)0xF0308).BIT -#define SUBCUD (*(volatile unsigned short *)0xF0310) -#define COMPMDR (*(volatile union un_compmdr *)0xF0340).compmdr -#define COMPMDR_bit (*(volatile union un_compmdr *)0xF0340).BIT -#define COMPFIR (*(volatile union un_compfir *)0xF0341).compfir -#define COMPFIR_bit (*(volatile union un_compfir *)0xF0341).BIT -#define COMPOCR (*(volatile union un_compocr *)0xF0342).compocr -#define COMPOCR_bit (*(volatile union un_compocr *)0xF0342).BIT -#define SEG0 (*(volatile unsigned char *)0xF0400) -#define SEG1 (*(volatile unsigned char *)0xF0401) -#define SEG2 (*(volatile unsigned char *)0xF0402) -#define SEG3 (*(volatile unsigned char *)0xF0403) -#define SEG4 (*(volatile unsigned char *)0xF0404) -#define SEG5 (*(volatile unsigned char *)0xF0405) -#define SEG6 (*(volatile unsigned char *)0xF0406) -#define SEG7 (*(volatile unsigned char *)0xF0407) -#define SEG8 (*(volatile unsigned char *)0xF0408) -#define SEG9 (*(volatile unsigned char *)0xF0409) -#define SEG10 (*(volatile unsigned char *)0xF040A) -#define SEG11 (*(volatile unsigned char *)0xF040B) -#define SEG12 (*(volatile unsigned char *)0xF040C) -#define SEG13 (*(volatile unsigned char *)0xF040D) -#define SEG14 (*(volatile unsigned char *)0xF040E) -#define SEG15 (*(volatile unsigned char *)0xF040F) -#define SEG16 (*(volatile unsigned char *)0xF0410) -#define SEG17 (*(volatile unsigned char *)0xF0411) -#define SEG18 (*(volatile unsigned char *)0xF0412) -#define SEG19 (*(volatile unsigned char *)0xF0413) -#define SEG20 (*(volatile unsigned char *)0xF0414) -#define SEG21 (*(volatile unsigned char *)0xF0415) -#define SEG22 (*(volatile unsigned char *)0xF0416) -#define SEG23 (*(volatile unsigned char *)0xF0417) -#define SEG24 (*(volatile unsigned char *)0xF0418) -#define SEG25 (*(volatile unsigned char *)0xF0419) -#define SEG26 (*(volatile unsigned char *)0xF041A) -#define SEG27 (*(volatile unsigned char *)0xF041B) -#define SEG28 (*(volatile unsigned char *)0xF041C) -#define SEG29 (*(volatile unsigned char *)0xF041D) -#define SEG30 (*(volatile unsigned char *)0xF041E) -#define SEG31 (*(volatile unsigned char *)0xF041F) -#define SEG32 (*(volatile unsigned char *)0xF0420) -#define SEG33 (*(volatile unsigned char *)0xF0421) -#define SEG34 (*(volatile unsigned char *)0xF0422) -#define SEG35 (*(volatile unsigned char *)0xF0423) -#define SEG36 (*(volatile unsigned char *)0xF0424) -#define SEG37 (*(volatile unsigned char *)0xF0425) -#define SEG38 (*(volatile unsigned char *)0xF0426) -#define SEG39 (*(volatile unsigned char *)0xF0427) -#define SEG40 (*(volatile unsigned char *)0xF0428) -#define SEG41 (*(volatile unsigned char *)0xF0429) -#define SEG42 (*(volatile unsigned char *)0xF042A) -#define SEG43 (*(volatile unsigned char *)0xF042B) -#define SEG44 (*(volatile unsigned char *)0xF042C) -#define SEG45 (*(volatile unsigned char *)0xF042D) -#define SEG46 (*(volatile unsigned char *)0xF042E) -#define SEG47 (*(volatile unsigned char *)0xF042F) -#define SEG48 (*(volatile unsigned char *)0xF0430) -#define SEG49 (*(volatile unsigned char *)0xF0431) -#define SEG50 (*(volatile unsigned char *)0xF0432) -#define SEG51 (*(volatile unsigned char *)0xF0433) -#define SEG52 (*(volatile unsigned char *)0xF0434) -#define SEG53 (*(volatile unsigned char *)0xF0435) -#define SEG54 (*(volatile unsigned char *)0xF0436) -#define SEG55 (*(volatile unsigned char *)0xF0437) -#define TKBCR00 (*(volatile unsigned short *)0xF0500) -#define TKBCR01 (*(volatile unsigned short *)0xF0502) -#define TKBCR02 (*(volatile unsigned short *)0xF0504) -#define TKBCR03 (*(volatile unsigned short *)0xF0506) -#define TKBTGCR0 (*(volatile unsigned short *)0xF0508) -#define TKBSIR00 (*(volatile unsigned short *)0xF050A) -#define TKBSIR01 (*(volatile unsigned short *)0xF050C) -#define TKBDNR00 (*(volatile unsigned char *)0xF050E) -#define TKBSSR00 (*(volatile unsigned char *)0xF050F) -#define TKBDNR01 (*(volatile unsigned char *)0xF0510) -#define TKBSSR01 (*(volatile unsigned char *)0xF0511) -#define TKBTRG0 (*(volatile union un_tkbtrg0 *)0xF0512).tkbtrg0 -#define TKBTRG0_bit (*(volatile union un_tkbtrg0 *)0xF0512).BIT -#define TKBFLG0 (*(volatile union un_tkbflg0 *)0xF0513).tkbflg0 -#define TKBFLG0_bit (*(volatile union un_tkbflg0 *)0xF0513).BIT -#define TKBCRLD00 (*(volatile unsigned short *)0xF0514) -#define TKBCRLD01 (*(volatile unsigned short *)0xF0516) -#define TKBCNT0 (*(volatile unsigned short *)0xF0520) -#define TKBCTL00 (*(volatile unsigned short *)0xF0522) -#define TKBMFR0 (*(volatile unsigned short *)0xF0524) -#define TKBIOC00 (*(volatile union un_tkbioc00 *)0xF0526).tkbioc00 -#define TKBIOC00_bit (*(volatile union un_tkbioc00 *)0xF0526).BIT -#define TKBCLR0 (*(volatile union un_tkbclr0 *)0xF0527).tkbclr0 -#define TKBCLR0_bit (*(volatile union un_tkbclr0 *)0xF0527).BIT -#define TKBIOC01 (*(volatile union un_tkbioc01 *)0xF0528).tkbioc01 -#define TKBIOC01_bit (*(volatile union un_tkbioc01 *)0xF0528).BIT -#define TKBCTL01 (*(volatile union un_tkbctl01 *)0xF0529).tkbctl01 -#define TKBCTL01_bit (*(volatile union un_tkbctl01 *)0xF0529).BIT -#define TKBPSCS0 (*(volatile unsigned char *)0xF052A) -#define TKBPACTL00 (*(volatile unsigned short *)0xF0530) -#define TKBPACTL01 (*(volatile unsigned short *)0xF0532) -#define TKBPAHFS0 (*(volatile union un_tkbpahfs0 *)0xF0534).tkbpahfs0 -#define TKBPAHFS0_bit (*(volatile union un_tkbpahfs0 *)0xF0534).BIT -#define TKBPAHFT0 (*(volatile union un_tkbpahft0 *)0xF0535).tkbpahft0 -#define TKBPAHFT0_bit (*(volatile union un_tkbpahft0 *)0xF0535).BIT -#define TKBPAFLG0 (*(volatile union un_tkbpaflg0 *)0xF0536).tkbpaflg0 -#define TKBPAFLG0_bit (*(volatile union un_tkbpaflg0 *)0xF0536).BIT -#define TKBPACTL02 (*(volatile union un_tkbpactl02 *)0xF0537).tkbpactl02 -#define TKBPACTL02_bit (*(volatile union un_tkbpactl02 *)0xF0537).BIT -#define D0FIFOD00 (*(volatile unsigned short *)0xF0580) -#define D1FIFOD00 (*(volatile unsigned short *)0xF05C0) -#define SYSCFG (*(volatile unsigned short *)0xF0600) -#define SYSSTS0 (*(volatile unsigned short *)0xF0604) -#define DVSTCTR0 (*(volatile unsigned short *)0xF0608) -#define CFIFOM (*(volatile unsigned short *)0xF0614) -#define CFIFOML (*(volatile unsigned char *)0xF0614) -#define D0FIFOM (*(volatile unsigned short *)0xF0618) -#define D0FIFOML (*(volatile unsigned char *)0xF0618) -#define D1FIFOM (*(volatile unsigned short *)0xF061C) -#define D1FIFOML (*(volatile unsigned char *)0xF061C) -#define CFIFOSEL (*(volatile unsigned short *)0xF0620) -#define CFIFOCTR (*(volatile unsigned short *)0xF0622) -#define D0FIFOSEL (*(volatile unsigned short *)0xF0628) -#define D0FIFOCTR (*(volatile unsigned short *)0xF062A) -#define D1FIFOSEL (*(volatile unsigned short *)0xF062C) -#define D1FIFOCTR (*(volatile unsigned short *)0xF062E) -#define INTENB0 (*(volatile unsigned short *)0xF0630) -#define INTENB1 (*(volatile unsigned short *)0xF0632) -#define BRDYENB (*(volatile unsigned short *)0xF0636) -#define NRDYENB (*(volatile unsigned short *)0xF0638) -#define BEMPENB (*(volatile unsigned short *)0xF063A) -#define SOFCFG (*(volatile unsigned short *)0xF063C) -#define INTSTS0 (*(volatile unsigned short *)0xF0640) -#define INTSTS1 (*(volatile unsigned short *)0xF0642) -#define BRDYSTS (*(volatile unsigned short *)0xF0646) -#define NRDYSTS (*(volatile unsigned short *)0xF0648) -#define BEMPSTS (*(volatile unsigned short *)0xF064A) -#define FRMNUM (*(volatile unsigned short *)0xF064C) -#define USBADDR (*(volatile unsigned short *)0xF0650) -#define USBREQ (*(volatile unsigned short *)0xF0654) -#define USBVAL (*(volatile unsigned short *)0xF0656) -#define USBINDX (*(volatile unsigned short *)0xF0658) -#define USBLENG (*(volatile unsigned short *)0xF065A) -#define DCPCFG (*(volatile unsigned short *)0xF065C) -#define DCPMAXP (*(volatile unsigned short *)0xF065E) -#define DCPCTR (*(volatile unsigned short *)0xF0660) -#define PIPESEL (*(volatile unsigned short *)0xF0664) -#define PIPECFG (*(volatile unsigned short *)0xF0668) -#define PIPEMAXP (*(volatile unsigned short *)0xF066C) -#define PIPE4CTR (*(volatile unsigned short *)0xF0676) -#define PIPE5CTR (*(volatile unsigned short *)0xF0678) -#define PIPE6CTR (*(volatile unsigned short *)0xF067A) -#define PIPE7CTR (*(volatile unsigned short *)0xF067C) -#define PIPE4TRE (*(volatile unsigned short *)0xF069C) -#define PIPE4TRN (*(volatile unsigned short *)0xF069E) -#define PIPE5TRE (*(volatile unsigned short *)0xF06A0) -#define PIPE5TRN (*(volatile unsigned short *)0xF06A2) -#define DTC0PCFG (*(volatile unsigned short *)0xF06A8) -#define DTC1PCFG (*(volatile unsigned short *)0xF06AC) -#define USBBCCTRL0 (*(volatile unsigned short *)0xF06B0) -#define USBBCOPT0 (*(volatile unsigned short *)0xF06B8) -#define USBMC (*(volatile unsigned short *)0xF06CC) - -/* - Sfr bits - */ -#define ADTYP ADM2_bit.no0 -#define AWC ADM2_bit.no2 -#define ADRCK ADM2_bit.no3 -#define TOS0 TOS_bit.no0 -#define DACEN PER1_bit.no0 -#define DTCEN PER1_bit.no3 -#define TKB20EN PER1_bit.no4 -#define CMPEN PER1_bit.no5 -#define TMKAEN PER1_bit.no7 -#define DFLEN DFLCTL_bit.no0 -#define TAU0EN PER0_bit.no0 -#define SAU0EN PER0_bit.no2 -#define SAU1EN PER0_bit.no3 -#define IICA0EN PER0_bit.no4 -#define ADCEN PER0_bit.no5 -#define RTCWEN PER0_bit.no7 -#define RPEF RPECTL_bit.no0 -#define RPERDIS RPECTL_bit.no7 -#define TKB21EN PER2_bit.no0 -#define TKB22EN PER2_bit.no1 -#define SPT0 IICCTL00_bit.no0 -#define STT0 IICCTL00_bit.no1 -#define ACKE0 IICCTL00_bit.no2 -#define WTIM0 IICCTL00_bit.no3 -#define SPIE0 IICCTL00_bit.no4 -#define WREL0 IICCTL00_bit.no5 -#define LREL0 IICCTL00_bit.no6 -#define IICE0 IICCTL00_bit.no7 -#define PRS0 IICCTL01_bit.no0 -#define DFC0 IICCTL01_bit.no2 -#define SMC0 IICCTL01_bit.no3 -#define DAD0 IICCTL01_bit.no4 -#define CLD0 IICCTL01_bit.no5 -#define WUP0 IICCTL01_bit.no7 -#define TKBRDT1 TKBTRG1_bit.no0 -#define TKBRSF1 TKBFLG1_bit.no0 -#define TKBMFF1 TKBFLG1_bit.no1 -#define TKBIEF1 TKBFLG1_bit.no2 -#define TKBIRF1 TKBFLG1_bit.no3 -#define TKBSEF10 TKBFLG1_bit.no4 -#define TKBSEF11 TKBFLG1_bit.no5 -#define TKBSSF10 TKBFLG1_bit.no6 -#define TKBSSF11 TKBFLG1_bit.no7 -#define TKBTOD10 TKBIOC10_bit.no0 -#define TKBTOD11 TKBIOC10_bit.no1 -#define TKBTOL10 TKBIOC10_bit.no2 -#define TKBTOL11 TKBIOC10_bit.no3 -#define TKBCLMF1 TKBCLR1_bit.no1 -#define TKBCLIE1 TKBCLR1_bit.no2 -#define TKBCLIR1 TKBCLR1_bit.no3 -#define TKBCLSE10 TKBCLR1_bit.no4 -#define TKBCLSE11 TKBCLR1_bit.no5 -#define TKBTOE10 TKBIOC11_bit.no0 -#define TKBTOE11 TKBIOC11_bit.no1 -#define TKBCE1 TKBCTL11_bit.no7 -#define TKBPAHTS10 TKBPAHFS1_bit.no0 -#define TKBPAHTS11 TKBPAHFS1_bit.no1 -#define TKBPAHTT10 TKBPAHFT1_bit.no0 -#define TKBPAHTT11 TKBPAHFT1_bit.no1 -#define TKBPAHIF10 TKBPAFLG1_bit.no0 -#define TKBPAFIF10 TKBPAFLG1_bit.no1 -#define TKBPAHIF11 TKBPAFLG1_bit.no2 -#define TKBPAFIF11 TKBPAFLG1_bit.no3 -#define TKBPAHSF10 TKBPAFLG1_bit.no4 -#define TKBPAFSF10 TKBPAFLG1_bit.no5 -#define TKBPAHSF11 TKBPAFLG1_bit.no6 -#define TKBPAFSF11 TKBPAFLG1_bit.no7 -#define TKBPACE10 TKBPACTL12_bit.no0 -#define TKBPACE11 TKBPACTL12_bit.no1 -#define TKBRDT2 TKBTRG2_bit.no0 -#define TKBRSF2 TKBFLG2_bit.no0 -#define TKBMFF2 TKBFLG2_bit.no1 -#define TKBIEF2 TKBFLG2_bit.no2 -#define TKBIRF2 TKBFLG2_bit.no3 -#define TKBSEF20 TKBFLG2_bit.no4 -#define TKBSEF21 TKBFLG2_bit.no5 -#define TKBSSF20 TKBFLG2_bit.no6 -#define TKBSSF21 TKBFLG2_bit.no7 -#define TKBTOD20 TKBIOC20_bit.no0 -#define TKBTOD21 TKBIOC20_bit.no1 -#define TKBTOL20 TKBIOC20_bit.no2 -#define TKBTOL21 TKBIOC20_bit.no3 -#define TKBCLMF2 TKBCLR2_bit.no1 -#define TKBCLIE2 TKBCLR2_bit.no2 -#define TKBCLIR2 TKBCLR2_bit.no3 -#define TKBCLSE20 TKBCLR2_bit.no4 -#define TKBCLSE21 TKBCLR2_bit.no5 -#define TKBTOE20 TKBIOC21_bit.no0 -#define TKBTOE21 TKBIOC21_bit.no1 -#define TKBCE2 TKBCTL21_bit.no7 -#define TKBPAHTS20 TKBPAHFS2_bit.no0 -#define TKBPAHTS21 TKBPAHFS2_bit.no1 -#define TKBPAHTT20 TKBPAHFT2_bit.no0 -#define TKBPAHTT21 TKBPAHFT2_bit.no1 -#define TKBPAHIF20 TKBPAFLG2_bit.no0 -#define TKBPAFIF20 TKBPAFLG2_bit.no1 -#define TKBPAHIF21 TKBPAFLG2_bit.no2 -#define TKBPAFIF21 TKBPAFLG2_bit.no3 -#define TKBPAHSF20 TKBPAFLG2_bit.no4 -#define TKBPAFSF20 TKBPAFLG2_bit.no5 -#define TKBPAHSF21 TKBPAFLG2_bit.no6 -#define TKBPAFSF21 TKBPAFLG2_bit.no7 -#define TKBPACE20 TKBPACTL22_bit.no0 -#define TKBPACE21 TKBPACTL22_bit.no1 -#define CRC0EN CRC0CTL_bit.no7 -#define PFSEG04 PFSEG0_bit.no4 -#define PFSEG05 PFSEG0_bit.no5 -#define PFSEG06 PFSEG0_bit.no6 -#define PFSEG07 PFSEG0_bit.no7 -#define PFSEG08 PFSEG1_bit.no0 -#define PFSEG09 PFSEG1_bit.no1 -#define PFSEG10 PFSEG1_bit.no2 -#define PFSEG11 PFSEG1_bit.no3 -#define PFSEG12 PFSEG1_bit.no4 -#define PFSEG13 PFSEG1_bit.no5 -#define PFSEG14 PFSEG1_bit.no6 -#define PFSEG15 PFSEG1_bit.no7 -#define PFSEG16 PFSEG2_bit.no0 -#define PFSEG17 PFSEG2_bit.no1 -#define PFSEG18 PFSEG2_bit.no2 -#define PFSEG19 PFSEG2_bit.no3 -#define PFSEG20 PFSEG2_bit.no4 -#define PFSEG21 PFSEG2_bit.no5 -#define PFSEG22 PFSEG2_bit.no6 -#define PFSEG23 PFSEG2_bit.no7 -#define PFSEG24 PFSEG3_bit.no0 -#define PFSEG25 PFSEG3_bit.no1 -#define PFSEG26 PFSEG3_bit.no2 -#define PFSEG27 PFSEG3_bit.no3 -#define PFSEG28 PFSEG3_bit.no4 -#define PFSEG29 PFSEG3_bit.no5 -#define PFSEG30 PFSEG3_bit.no6 -#define PFSEG31 PFSEG3_bit.no7 -#define PFSEG32 PFSEG4_bit.no0 -#define PFSEG33 PFSEG4_bit.no1 -#define PFSEG34 PFSEG4_bit.no2 -#define PFSEG35 PFSEG4_bit.no3 -#define PFSEG36 PFSEG4_bit.no4 -#define PFSEG37 PFSEG4_bit.no5 -#define PFSEG38 PFSEG4_bit.no6 -#define PFSEG39 PFSEG4_bit.no7 -#define PFSEG40 PFSEG5_bit.no0 -#define PFSEG41 PFSEG5_bit.no1 -#define PFSEG42 PFSEG5_bit.no2 -#define PFSEG43 PFSEG5_bit.no3 -#define PFSEG44 PFSEG5_bit.no4 -#define PFSEG45 PFSEG5_bit.no5 -#define PFSEG46 PFSEG5_bit.no6 -#define PFSEG47 PFSEG5_bit.no7 -#define PFSEG48 PFSEG6_bit.no0 -#define PFSEG49 PFSEG6_bit.no1 -#define PFSEG50 PFSEG6_bit.no2 -#define PFSEG51 PFSEG6_bit.no3 -#define PFSEG52 PFSEG6_bit.no4 -#define PFSEG53 PFSEG6_bit.no5 -#define PFSEG54 PFSEG6_bit.no6 -#define PFSEG55 PFSEG6_bit.no7 -#define C0ENB COMPMDR_bit.no0 -#define C0MON COMPMDR_bit.no3 -#define C1ENB COMPMDR_bit.no4 -#define C1MON COMPMDR_bit.no7 -#define C0IE COMPOCR_bit.no0 -#define C0OE COMPOCR_bit.no1 -#define C0OP COMPOCR_bit.no2 -#define C1IE COMPOCR_bit.no4 -#define C1OE COMPOCR_bit.no5 -#define C1OP COMPOCR_bit.no6 -#define SPDMD COMPOCR_bit.no7 -#define TKBRDT0 TKBTRG0_bit.no0 -#define TKBRSF0 TKBFLG0_bit.no0 -#define TKBMFF0 TKBFLG0_bit.no1 -#define TKBIEF0 TKBFLG0_bit.no2 -#define TKBIRF0 TKBFLG0_bit.no3 -#define TKBSEF00 TKBFLG0_bit.no4 -#define TKBSEF01 TKBFLG0_bit.no5 -#define TKBSSF00 TKBFLG0_bit.no6 -#define TKBSSF01 TKBFLG0_bit.no7 -#define TKBTOD00 TKBIOC00_bit.no0 -#define TKBTOD01 TKBIOC00_bit.no1 -#define TKBTOL00 TKBIOC00_bit.no2 -#define TKBTOL01 TKBIOC00_bit.no3 -#define TKBCLMF0 TKBCLR0_bit.no1 -#define TKBCLIE0 TKBCLR0_bit.no2 -#define TKBCLIR0 TKBCLR0_bit.no3 -#define TKBCLSE00 TKBCLR0_bit.no4 -#define TKBCLSE01 TKBCLR0_bit.no5 -#define TKBTOE00 TKBIOC01_bit.no0 -#define TKBTOE01 TKBIOC01_bit.no1 -#define TKBCE0 TKBCTL01_bit.no7 -#define TKBPAHTS00 TKBPAHFS0_bit.no0 -#define TKBPAHTS01 TKBPAHFS0_bit.no1 -#define TKBPAHTT00 TKBPAHFT0_bit.no0 -#define TKBPAHTT01 TKBPAHFT0_bit.no1 -#define TKBPAHIF00 TKBPAFLG0_bit.no0 -#define TKBPAFIF00 TKBPAFLG0_bit.no1 -#define TKBPAHIF01 TKBPAFLG0_bit.no2 -#define TKBPAFIF01 TKBPAFLG0_bit.no3 -#define TKBPAHSF00 TKBPAFLG0_bit.no4 -#define TKBPAFSF00 TKBPAFLG0_bit.no5 -#define TKBPAHSF01 TKBPAFLG0_bit.no6 -#define TKBPAFSF01 TKBPAFLG0_bit.no7 -#define TKBPACE00 TKBPACTL02_bit.no0 -#define TKBPACE01 TKBPACTL02_bit.no1 - -/* - Interrupt vector addresses - */ -#endif diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c deleted file mode 100644 index b3f0fc05a..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/****************************************************************************** - * This project provides two demo applications. A simple blinky style project, - * and a more comprehensive test and demo application. The - * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to - * select between the two. The simply blinky demo is implemented and described - * in main_blinky.c. The more comprehensive test and demo application is - * implemented and described in main_full.c. - * - * This file implements the code that is not demo specific, including the - * hardware setup and FreeRTOS hook functions. - * - * This project does not provide an example of how to write an RTOS compatible - * interrupt service routine (other than the tick interrupt itself), so this - * file contains the function vAnExampleISR_C_Handler() as a dummy example (that - * is not actually installed) that can be used as a reference. Also see the - * file ExampleISR.S, and the documentation page for this demo on the - * FreeRTOS.org website for full instructions. - * - * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON - * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO - * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT! - * - */ - -/* Scheduler include files. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo, -or 0 to run the more comprehensive test and demo application. */ -#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 - -/*-----------------------------------------------------------*/ - -/* - * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1. - * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0. - */ -#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 - extern void main_blinky( void ); -#else - extern void main_full( void ); -#endif - -/* Prototypes for the standard FreeRTOS callback/hook functions implemented -within this file. */ -void vApplicationMallocFailedHook( void ); -void vApplicationIdleHook( void ); -void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); -void vApplicationTickHook( void ); - -/* This variable is not actually used, but provided to allow an example of how -to write an ISR to be included in this file. */ -static SemaphoreHandle_t xSemaphore = NULL; -/*-----------------------------------------------------------*/ - -#define portPSW ( 0xc6UL ) -volatile uint32_t *pulAddress; -volatile uint32_t ulValue, ulError = 0; - -int main( void ) -{ - /* Store an address below 0x8000 */ - pulAddress = ( uint32_t * ) 0x7fff; - - /* Cast and OR with a value that uses the two most significant - bytes. */ - ulValue = ( ( uint32_t ) pulAddress ) | ( portPSW << 24UL ); - - /* This test passes. */ - if( ulValue != 0xc6007fff ) - { - /* This line of code is not executed. */ - ulError = 1; - } - - /* Now do the same, but with an address above 0x7fff, but - still slower than the max 16-bit value. */ - pulAddress = ( uint32_t * ) 0x8000; - ulValue = ( ( uint32_t ) pulAddress ) | ( portPSW << 24UL ); - - /* This test *fails*. */ - if( ulValue != 0xc6008000 ) - { - /* This line of code *is* executed. */ - ulError = 1; - } - - - /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is - described at the top of this file. */ - #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 - { - main_blinky(); - } - #else - { - main_full(); - } - #endif - - /* Should not get here. See the definitions of main_blinky() and - main_full(). */ - return 0; -} -/*-----------------------------------------------------------*/ - -void vAnExampleISR_C_Handler( void ) -{ - /* - * This demo does not include a functional interrupt service routine - so - * this dummy handler (which is not actually installed) is provided as an - * example of how an ISR that needs to cause a context switch needs to be - * implemented. ISRs that do not cause a context switch have no special - * requirements and can be written as per the compiler documentation. - * - * This C function is called from a wrapper function that is implemented - * in assembly code. See vANExampleISR_ASM_Wrapper() in ExampleISR.S. Also - * see the documentation page for this demo on the FreeRTOS.org website for - * full instructions. - */ -short sHigherPriorityTaskWoken = pdFALSE; - - /* Handler code goes here...*/ - - /* For purposes of demonstration, assume at some point the hander calls - xSemaphoreGiveFromISR().*/ - xSemaphoreGiveFromISR( xSemaphore, &sHigherPriorityTaskWoken ); - - /* If giving the semaphore unblocked a task, and the unblocked task has a - priority higher than or equal to the currently running task, then - sHigherPriorityTaskWoken will have been set to pdTRUE internally within the - xSemaphoreGiveFromISR() function. Passing a pdTRUE value to - portYIELD_FROM_ISR() will cause this interrupt to return directly to the - higher priority unblocked task. */ - portYIELD_FROM_ISR( sHigherPriorityTaskWoken ); -} -/*-----------------------------------------------------------*/ - -void vApplicationMallocFailedHook( void ) -{ - /* Called if a call to pvPortMalloc() fails because there is insufficient - free memory available in the FreeRTOS heap. pvPortMalloc() is called - internally by FreeRTOS API functions that create tasks, queues, software - timers, and semaphores. The size of the FreeRTOS heap is set by the - configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */ - taskDISABLE_INTERRUPTS(); - for( ;; ); -} -/*-----------------------------------------------------------*/ - -void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) -{ - ( void ) pcTaskName; - ( void ) pxTask; - - /* Run time stack overflow checking is performed if - configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook - function is called if a stack overflow is detected. */ - taskDISABLE_INTERRUPTS(); - for( ;; ); -} -/*-----------------------------------------------------------*/ - -void vApplicationIdleHook( void ) -{ -volatile size_t xFreeHeapSpace; - - /* This is just a trivial example of an idle hook. It is called on each - cycle of the idle task. It must *NOT* attempt to block. In this case the - idle task just queries the amount of FreeRTOS heap that remains. See the - memory management section on the http://www.FreeRTOS.org web site for memory - management options. If there is a lot of heap memory free then the - configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up - RAM. */ - xFreeHeapSpace = xPortGetFreeHeapSize(); - - /* Remove compiler warning about xFreeHeapSpace being set but never used. */ - ( void ) xFreeHeapSpace; -} - - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_blinky.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_blinky.c deleted file mode 100644 index eb2237ecf..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_blinky.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/****************************************************************************** - * NOTE 1: This project provides two demo applications. A simple blinky style - * project, and a more comprehensive test and demo application. The - * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select - * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY - * in main.c. This file implements the simply blinky style version. - * - * NOTE 2: This file only contains the source code that is specific to the - * basic demo. Generic functions, such FreeRTOS hook functions, and functions - * required to configure the hardware, along with an example interrupt service - * routine, are defined in main.c. - ****************************************************************************** - * - * main_blinky() creates one queue, and two tasks. It then starts the - * scheduler. - * - * The Queue Send Task: - * The queue send task is implemented by the prvQueueSendTask() function in - * this file. prvQueueSendTask() sits in a loop that causes it to repeatedly - * block for 200 milliseconds, before sending the value 100 to the queue that - * was created within main_blinky(). Once the value is sent, the task loops - * back around to block for another 200 milliseconds. - * - * The Queue Receive Task: - * The queue receive task is implemented by the prvQueueReceiveTask() function - * in this file. prvQueueReceiveTask() sits in a loop where it repeatedly - * blocks on attempts to read data from the queue that was created within - * main_blinky(). When data is received, the task checks the value of the - * data, and if the value equals the expected 100, toggles the LED. The 'block - * time' parameter passed to the queue receive function specifies that the - * task should be held in the Blocked state indefinitely to wait for data to - * be available on the queue. The queue receive task will only leave the - * Blocked state when the queue send task writes to the queue. As the queue - * send task writes to the queue every 200 milliseconds, the queue receive - * task leaves the Blocked state every 200 milliseconds, and therefore toggles - * the LED every 200 milliseconds. - */ - -/* Standard includes. */ -#include - -/* Kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* Eval board specific definitions. */ -#include "demo_specific_io.h" - -/* Priorities at which the tasks are created. */ -#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) -#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) - -/* The rate at which data is sent to the queue. The 200ms value is converted -to ticks using the portTICK_PERIOD_MS constant. */ -#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS ) - -/* The number of items the queue can hold. This is 1 as the receive task -will remove items as they are added, meaning the send task should always find -the queue empty. */ -#define mainQUEUE_LENGTH ( 1 ) - -/* Used to check the task parameter passing in both supported memory models. */ -#define mainQUEUE_SEND_PARAMETER ( ( void * ) 0x1234U ) -#define mainQUEUE_RECEIVE_PARAMETER ( ( void * ) 0x1122U ) -/*-----------------------------------------------------------*/ - -/* - * The tasks as described in the comments at the top of this file. - */ -static void prvQueueReceiveTask( void *pvParameters ); -static void prvQueueSendTask( void *pvParameters ); - -/* - * Called by main() to create the simply blinky style application if - * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1. - */ -void main_blinky( void ); - -/*-----------------------------------------------------------*/ - -/* The queue used by both tasks. */ -static QueueHandle_t xQueue = NULL; - -/*-----------------------------------------------------------*/ - -void main_blinky( void ) -{ - /* Create the queue. */ - xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) ); - - if( xQueue != NULL ) - { - /* Start the two tasks as described in the comments at the top of this - file. */ - xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ - mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just used to check the port in this case. */ - mainQUEUE_RECEIVE_TASK_PRIORITY,/* The priority assigned to the task. */ - NULL ); /* The task handle is not required, so NULL is passed. */ - - xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL ); - - /* Start the tasks and timer running. */ - vTaskStartScheduler(); - } - - /* If all is well, the scheduler will now be running, and the following - line will never be reached. If the following line does execute, then - there was insufficient FreeRTOS heap memory available for the idle and/or - timer tasks to be created. See the memory management section on the - FreeRTOS web site for more details. http://www.freertos.org/a00111.html. */ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -static void prvQueueSendTask( void *pvParameters ) -{ -TickType_t xNextWakeTime; -const unsigned long ulValueToSend = 100UL; - - /* Check the parameter was passed in correctly. */ - configASSERT( pvParameters == mainQUEUE_SEND_PARAMETER ) - - /* Initialise xNextWakeTime - this only needs to be done once. */ - xNextWakeTime = xTaskGetTickCount(); - - for( ;; ) - { - /* Place this task in the blocked state until it is time to run again. */ - vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS ); - - /* Send to the queue - causing the queue receive task to unblock and - toggle the LED. 0 is used as the block time so the sending operation - will not block - it shouldn't need to block as the queue should always - be empty at this point in the code. */ - xQueueSend( xQueue, &ulValueToSend, 0U ); - } -} -/*-----------------------------------------------------------*/ - -static void prvQueueReceiveTask( void *pvParameters ) -{ -unsigned long ulReceivedValue; -const unsigned long ulExpectedValue = 100UL; - - /* Check the parameter was passed in correctly. */ - configASSERT( pvParameters == mainQUEUE_RECEIVE_PARAMETER ) - - for( ;; ) - { - /* Wait until something arrives in the queue - this task will block - indefinitely provided INCLUDE_vTaskSuspend is set to 1 in - FreeRTOSConfig.h. */ - xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY ); - - /* To get here something must have been received from the queue, but - is it the expected value? If it is, toggle the LED. */ - if( ulReceivedValue == ulExpectedValue ) - { - LED_BIT = !LED_BIT; - ulReceivedValue = 0U; - } - } -} -/*-----------------------------------------------------------*/ - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c deleted file mode 100644 index 090e310ae..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main_full.c +++ /dev/null @@ -1,379 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/****************************************************************************** - * NOTE 1: This project provides two demo applications. A simple blinky style - * project, and a more comprehensive test and demo application. The - * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select - * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY - * in main.c. This file implements the comprehensive test and demo version. - * - * NOTE 2: This file only contains the source code that is specific to the - * full demo. Generic functions, such FreeRTOS hook functions, and functions - * required to configure the hardware, along with an example of how to write an - * interrupt service routine, are defined in main.c. - ****************************************************************************** - * - * main_full() creates all the demo application tasks and two software timers, - * then starts the scheduler. The web documentation provides more details of - * the standard demo application tasks, which provide no particular - * functionality, but do provide a good example of how to use the FreeRTOS API. - * - * In addition to the standard demo tasks, the following tasks, tests and - * timers are created within this file: - * - * "Reg test" tasks - These fill the registers with known values, then check - * that each register still contains its expected value. Each task uses a - * different set of values. The reg test tasks execute with a very low priority, - * so get preempted very frequently. A register containing an unexpected value - * is indicative of an error in the context switching mechanism. - * - * The "Demo" Timer and Callback Function: - * The demo timer callback function does nothing more than increment a variable. - * The period of the demo timer is set relative to the period of the check timer - * (described below). This allows the check timer to know how many times the - * demo timer callback function should execute between each execution of the - * check timer callback function. The variable incremented in the demo timer - * callback function is used to determine how many times the callback function - * has executed. - * - * The "Check" Timer and Callback Function: - * The check timer period is initially set to three seconds. The check timer - * callback function checks that all the standard demo tasks, the reg test - * tasks, and the demo timer are not only still executing, but are executing - * without reporting any errors. If the check timer discovers that a task or - * timer has stalled, or reported an error, then it changes its own period from - * the initial three seconds, to just 200ms. The check timer callback function - * also toggles an LED each time it is called. This provides a visual - * indication of the system status: If the LED toggles every three seconds, - * then no issues have been discovered. If the LED toggles every 200ms, then - * an issue has been discovered with at least one task. - * - * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON - * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO - * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT! - * - */ - -/* Scheduler include files. */ -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" - -/* Standard demo includes. */ -#include "dynamic.h" -#include "PollQ.h" -#include "blocktim.h" - -/* Hardware includes. */ -#include "demo_specific_io.h" - -/* The period at which the check timer will expire, in ms, provided no errors -have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_PERIOD_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) - -/* The period at which the check timer will expire, in ms, if an error has been -reported in one of the standard demo tasks, the check tasks, or the demo timer. -ms are converted to the equivalent in ticks using the portTICK_PERIOD_MS -constant. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS ) - -/* These two definitions are used to set the period of the demo timer. The demo -timer period is always relative to the check timer period, so the check timer -can determine if the demo timer has expired the expected number of times between -its own executions. */ -#define mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT ( 100UL ) -#define mainDEMO_TIMER_PERIOD_MS ( mainCHECK_TIMER_PERIOD_MS / mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT ) - -/* A block time of zero simply means "don't block". */ -#define mainDONT_BLOCK ( 0U ) - -/* Values that are passed as parameters into the reg test tasks (purely to -ensure task parameters are passed correctly). */ -#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x1234 ) -#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x5678 ) - -/*-----------------------------------------------------------*/ - -/* - * The 'check' timer callback function, as described at the top of this file. - */ -static void prvCheckTimerCallback( TimerHandle_t xTimer ); - -/* - * The 'demo' timer callback function, as described at the top of this file. - */ -static void prvDemoTimerCallback( TimerHandle_t xTimer ); - -/* - * Functions that define the RegTest tasks, as described at the top of this - * file. The RegTest tasks are written (necessarily) in assembler. Their - * entry points are written in C to allow for easy checking of the task - * parameter values. - */ -extern void vRegTest1Task( void ); -extern void vRegTest2Task( void ); -static void prvRegTest1Entry( void *pvParameters ); -static void prvRegTest2Entry( void *pvParameters ); - -/* - * Called if a RegTest task discovers an error as a mechanism to stop the - * tasks loop counter incrementing (so the check task can detect that an - * error exists). - */ -void vRegTestError( void ); - -/* - * Called by main() to create the more comprehensive application if - * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0. - */ -void main_full( void ); - -/*-----------------------------------------------------------*/ - -/* Variables that are incremented on each cycle of the two reg tests to allow -the check timer to know that they are still executing. */ -unsigned short usRegTest1LoopCounter = 0, usRegTest2LoopCounter; - -/* The check timer. This uses prvCheckTimerCallback() as its callback -function. */ -static TimerHandle_t xCheckTimer = NULL; - -/* The demo timer. This uses prvDemoTimerCallback() as its callback function. */ -static TimerHandle_t xDemoTimer = NULL; - -/* This variable is incremented each time the demo timer expires. */ -static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL; - -/*-----------------------------------------------------------*/ - -void main_full( void ) -{ - /* Creates all the tasks and timers, then starts the scheduler. */ - - /* First create the 'standard demo' tasks. These are used to demonstrate - API functions being used and also to test the kernel port. More information - is provided on the FreeRTOS.org WEB site. */ -// vStartDynamicPriorityTasks(); -// vStartPolledQueueTasks( tskIDLE_PRIORITY ); - - /* Additional tasks can be added by un-commenting the line below on devices - with sufficient RAM for a larger heap (see configTOTAL_HEAP_SIZE in - FreeRTOSConfig.h). */ - /*vCreateBlockTimeTasks();*/ - - /* Create the RegTest tasks as described at the top of this file. */ - xTaskCreate( prvRegTest1Entry, /* The function that implements the task. */ - "Reg1", /* Text name for the task - to assist debugging only, not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack allocated to the task (in words, not bytes). */ - mainREG_TEST_1_PARAMETER, /* The parameter passed into the task. */ - configMAX_PRIORITIES-1, /*tskIDLE_PRIORITY,*/ /* The priority at which the task will execute. */ - NULL ); /* Used to pass the handle of the created task out to the function caller - not used in this case. */ - -// xTaskCreate( prvRegTest2Entry, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); - - /* Create the software timer that performs the 'check' functionality, - as described at the top of this file. */ -// xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ -// ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ -// pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ -// ( void * ) 0, /* The ID is not used, so can be set to anything. */ -// prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ -// ); - - /* Create the software timer that just increments a variable for demo - purposes. */ -// xDemoTimer = xTimerCreate( "DemoTimer", /* A text name, purely to help debugging. */ -// ( mainDEMO_TIMER_PERIOD_MS ), /* The timer period, in this case it is always calculated relative to the check timer period (see the definition of mainDEMO_TIMER_PERIOD_MS). */ -// pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ -// ( void * ) 0, /* The ID is not used, so can be set to anything. */ -// prvDemoTimerCallback /* The callback function that inspects the status of all the other tasks. */ -// ); - - /* Start both the check timer and the demo timer. The timers won't actually - start until the scheduler is started. */ -// xTimerStart( xCheckTimer, mainDONT_BLOCK ); -// xTimerStart( xDemoTimer, mainDONT_BLOCK ); - - /* Finally start the scheduler running. */ - vTaskStartScheduler(); - -extern void my_function( void ); - my_function(); - - /* If all is well execution will never reach here as the scheduler will be - running. If this null loop is reached then it is likely there was - insufficient FreeRTOS heap available for the idle task and/or timer task to - be created. See http://www.freertos.org/a00111.html. */ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -static void prvDemoTimerCallback( TimerHandle_t xTimer ) -{ - /* Remove compiler warning about unused parameter. */ - ( void ) xTimer; - - /* The demo timer has expired. All it does is increment a variable. The - period of the demo timer is relative to that of the check timer, so the - check timer knows how many times this variable should have been incremented - between each execution of the check timer's own callback. */ - ulDemoSoftwareTimerCounter++; -} -/*-----------------------------------------------------------*/ - -static void prvCheckTimerCallback( TimerHandle_t xTimer ) -{ -static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS; -static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0; - - /* Remove compiler warning about unused parameter. */ - ( void ) xTimer; - - /* Inspect the status of the standard demo tasks. */ - if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) - { - xErrorStatus = pdFAIL; - } - - if( xArePollingQueuesStillRunning() != pdTRUE ) - { - xErrorStatus = pdFAIL; - } - - if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) - { - /* Un-comment this line if the block time tasks are included in the - demo. */ - /* xErrorStatus = pdFAIL; */ - } - - /* Indicate an error if either of the reg test loop counters have not - incremented since the last time this function was called. */ - if( usLastRegTest1Counter == usRegTest1LoopCounter ) - { - xErrorStatus = pdFAIL; - } - else - { - usLastRegTest1Counter = usRegTest1LoopCounter; - } - - if( usLastRegTest2Counter == usRegTest2LoopCounter ) - { - xErrorStatus = pdFAIL; - } - else - { - usLastRegTest2Counter = usRegTest2LoopCounter; - } - - /* Ensure that the demo software timer has expired - mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT times in between - each call of this function. A critical section is not required to access - ulDemoSoftwareTimerCounter as the variable is only accessed from another - software timer callback, and only one software timer callback can be - executing at any time. */ - if( ( ulDemoSoftwareTimerCounter < ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT - 1 ) ) || - ( ulDemoSoftwareTimerCounter > ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT + 1 ) ) - ) - { - xErrorStatus = pdFAIL; - } - else - { - ulDemoSoftwareTimerCounter = 0UL; - } - - if( ( xErrorStatus == pdFAIL ) && ( xChangedTimerPeriodAlready == pdFALSE ) ) - { - /* An error has occurred, but the timer's period has not yet been changed, - change it now, and remember that it has been changed. Shortening the - timer's period means the LED will toggle at a faster rate, giving a - visible indication that something has gone wrong. */ - xChangedTimerPeriodAlready = pdTRUE; - - /* This call to xTimerChangePeriod() uses a zero block time. Functions - called from inside of a timer callback function must *never* attempt to - block. */ - xTimerChangePeriod( xCheckTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); - } - - /* Toggle the LED. The toggle rate will depend on whether or not an error - has been found in any tasks. */ - LED_BIT = !LED_BIT; -} -/*-----------------------------------------------------------*/ - -void vRegTestError( void ) -{ - /* Called by both reg test tasks if an error is found. There is no way out - of this function so the loop counter of the calling task will stop - incrementing, which will result in the check timer signaling an error. */ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -static void prvRegTest1Entry( void *pvParameters ) -{ - /* If the parameter has its expected value then start the first reg test - task (this is only done to test that the RTOS port is correctly handling - task parameters. */ - if( pvParameters == mainREG_TEST_1_PARAMETER ) - { - vRegTest1Task(); - } - else - { - vRegTestError(); - } - - /* It is not possible to get here as neither of the two functions called - above will ever return. */ -} -/*-----------------------------------------------------------*/ - -static void prvRegTest2Entry( void *pvParameters ) -{ - /* If the parameter has its expected value then start the first reg test - task (this is only done to test that the RTOS port is correctly handling - task parameters. */ - if( pvParameters == mainREG_TEST_2_PARAMETER ) - { - vRegTest2Task(); - } - else - { - vRegTestError(); - } - - /* It is not possible to get here as neither of the two functions called - above will ever return. */ -} -/*-----------------------------------------------------------*/ - diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm deleted file mode 100644 index c2e5b11eb..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm +++ /dev/null @@ -1,11005 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RTOSDemo */ -/* FILE : reset_program.asm */ -/* DESCRIPTION : Reset Program */ -/* CPU SERIES : RL78 - G14 */ -/* CPU TYPE : R5F104PJ */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - - /*reset_program.asm*/ - - .list - - .global _PowerON_Reset /*! global Start routine */ - .short _PowerON_Reset - -#ifdef CPPAPP -___dso_handle: - .global ___dso_handle -#endif - - - .extern _HardwareSetup /*! external Sub-routine to initialise Hardware*/ - .extern _data - .extern _mdata - .extern _ebss - .extern _bss - - .extern _edata - .extern _main - .extern _stack - .extern _exit - - /* ;; HL = start of list - ;; DE = end of list - ;; BC = step direction (+2 or -2) - */ - - .text - -/* call to _PowerON_Reset */ -_PowerON_Reset: -/* initialise user stack pointer */ - movw sp,#_stack /* Set stack pointer */ - -/* call the hardware initialiser */ - call !!_HardwareSetup - call !!_HardwareSetup - -/* load data section from ROM to RAM */ -;; block move to initialize .data - - ;; we're copying from 00:[_romdatastart] to 0F:[_datastart] - ;; and our data is not in the mirrored area. - mov es, #0 - sel rb0 /* ;;bank 0 */ - movw de, #_mdata /* src ROM address of data section in de */ - movw hl, #_data /* dest start RAM address of data section in hl */ - - sel rb1 /* bank 1 */ - movw hl, #_data /* dest start RAM address of data section in hl */ - movw ax, #_edata /* ;; size of romdata section in ax */ - subw ax,hl /* store data size */ - shrw ax,1 -1: - cmpw ax, #0 /* check if end of data */ - bz $1f - decw ax - sel rb0 /* bank 0 */ - movw ax, es:[de] - movw [hl], ax - incw de - incw de - incw hl - incw hl - sel rb1 /* bank 1 - compare and decrement*/ - br $1b -1: - - -/* bss initialisation : zero out bss */ - sel rb0 /* bank 0 */ - movw hl, #_bss /* store the start address of bss in hl */ - movw ax, #0 /* load AX reg with zero */ - sel rb1 /* bank 1 */ - movw ax, #_ebss /* store the end address (size of) bss section in ax */ - subw ax,hl ;; store data size - shrw ax,1 -1: - cmpw ax, #0 - bz $1f - decw ax - sel rb0 /* bank 0 */ - movw [hl], ax - incw hl - incw hl - sel rb1 - br $1b -1: - sel rb0 /* bank 0 */ - -/* start user program */ - - movw ax, #0 - push ax /* envp */ - push ax /* argv */ - push ax /* argc */ - call !!_main - - -/* call to exit*/ -_exit: - br $_exit - -.global _my_function -_my_function: -#if 1 - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup -#endif -#if 1 - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup - call !!_HardwareSetup -#endif - - .end diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h deleted file mode 100644 index 8972f0ea7..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h +++ /dev/null @@ -1,24 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : RTOSDemo */ -/* FILE : typedefine.h */ -/* DESCRIPTION : Aliases of Integer Type */ -/* CPU SERIES : RL78 - G14 */ -/* CPU TYPE : R5F104PJ */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - - - -typedef signed char _SBYTE; -typedef unsigned char _UBYTE; -typedef signed short _SWORD; -typedef unsigned short _UWORD; -typedef signed int _SINT; -typedef unsigned int _UINT; -typedef signed long _SDWORD; -typedef unsigned long _UDWORD; -typedef signed long long _SQWORD; -typedef unsigned long long _UQWORD; diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c deleted file mode 100644 index f891b89a0..000000000 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c +++ /dev/null @@ -1,173 +0,0 @@ -/***********************************************************************/ -/* */ -/* PROJECT NAME : test */ -/* FILE : vector_table.c */ -/* DESCRIPTION : Vector Table */ -/* CPU SERIES : RL78 - G14 */ -/* CPU TYPE : R5F104PJ */ -/* */ -/* This file is generated by e2studio. */ -/* */ -/***********************************************************************/ - -#include "FreeRTOS.h" - -extern void PowerON_Reset( void ); -extern void vPortTickISR( void ); -extern void vPortYield( void ); - -void Dummy_Handler( void ) __attribute__((interrupt)); -void Dummy_Handler( void ) -{ -} - -const unsigned char Option_Bytes[] __attribute__ ((section (".option_bytes"))) = { - 0x6e, 0xff, 0xe8, 0x85 -}; - -const unsigned char Security_Id[] __attribute__ ((section (".security_id"))) = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -#define VEC __attribute__ ((section (".vec"))) -const void *HardwareVectors[] VEC = { - // Address 0x0 - PowerON_Reset, -}; - -#define VECT_SECT __attribute__ ((section (".vects"))) -const void *Vectors[] VECT_SECT = { - //(0x4) - Dummy_Handler, - //(0x6) - Dummy_Handler, - //(0x8) - Dummy_Handler, - //(0xA) - Dummy_Handler, - //(0xC) - Dummy_Handler, - //(0xE) - Dummy_Handler, - //(0x10) - Dummy_Handler, - //(0x12) - Dummy_Handler, - //(0x14) - Dummy_Handler, - //(0x16) - Dummy_Handler, - //(0x18) - Dummy_Handler, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - //(0x1E) - Dummy_Handler, - //(0x20) - Dummy_Handler, - //(0x22) - Dummy_Handler, - //(0x24) - Dummy_Handler, - //(0x26) - Dummy_Handler, - //(0x28) - Dummy_Handler, - //(0x2A) - Dummy_Handler, - //(0x2C) - Dummy_Handler, - //(0x2E) - Dummy_Handler, - //(0x30) - Dummy_Handler, - //(0x32) - Dummy_Handler, - //(0x34) - Dummy_Handler, - //(0x36) - Dummy_Handler, - //(0x38) -#if INTIT_vect == 0x38 - vPortTickISR, /* Note this vector table definition is used with lots of RL78 chips, some of which have the INTIT vector here. */ -#else - Dummy_Handler, -#endif - //(0x3A) - Dummy_Handler, - //(0x3C) -#if INTIT_vect == 0x3C - vPortTickISR, /* Note this vector table definition is used with lots of RL78 chips, some of which have the INTIT vector here. */ -#else - Dummy_Handler, -#endif - //(0x3E) - Dummy_Handler, - //(0x40) - Dummy_Handler, - //(0x42) - Dummy_Handler, - //(0x44) - Dummy_Handler, - //(0x46) - Dummy_Handler, - //(0x48) - Dummy_Handler, - //(0x4A) - Dummy_Handler, - //(0x4C) - Dummy_Handler, - //(0x4E) - Dummy_Handler, - //(0x50) - Dummy_Handler, - //(0x52) - Dummy_Handler, - //(0x54) - Dummy_Handler, - //(0x56) - Dummy_Handler, - //(0x58) - Dummy_Handler, - //(0x5A) - Dummy_Handler, - //(0x5C) - Dummy_Handler, - // Padding - (void*)0xFFFF, - //(0x60) - Dummy_Handler, - //(0x62) - Dummy_Handler, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - // Padding - (void*)0xFFFF, - //INT_BRK_I (0x7E) - vPortYield, -}; - diff --git a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h index b9e0a91c5..b61c1687e 100644 --- a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87 b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87 index 3381d2af1..89da14af7 100644 --- a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87 +++ b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/RegTest.s87 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c index 6b7cc15a8..917e59ebd 100644 --- a/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c +++ b/FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87 b/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87 index 6c735bd02..c4c77bb9b 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87 +++ b/FreeRTOS/Demo/RL78_multiple_IAR/ExampleISR.s87 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h index 7878b8478..2ff4e6768 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RL78_multiple_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87 b/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87 index 41cb72d7f..ebd1b0c4c 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87 +++ b/FreeRTOS/Demo/RL78_multiple_IAR/RegTest.s87 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h b/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h index 4cf0ea6f8..206e21fa1 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h +++ b/FreeRTOS/Demo/RL78_multiple_IAR/demo_specific_io.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main.c b/FreeRTOS/Demo/RL78_multiple_IAR/main.c index 147779667..43f8f0671 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/main.c +++ b/FreeRTOS/Demo/RL78_multiple_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c b/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c index 269585927..4dc40e799 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c +++ b/FreeRTOS/Demo/RL78_multiple_IAR/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c b/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c index e655f8ed2..cb6a2b6cc 100644 --- a/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c +++ b/FreeRTOS/Demo/RL78_multiple_IAR/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h index ce39cb88f..4f6cbc36c 100644 --- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c index dc45b8c6a..454781cd6 100644 --- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c index 135dacfa2..14c73abcb 100644 --- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c +++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c index b980ce00f..6039ad398 100644 --- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c +++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_low_power.c b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_low_power.c index f6a811af3..9b3497c5f 100644 --- a/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_low_power.c +++ b/FreeRTOS/Demo/RX100-RSK_GCC_e2studio/RTOSDemo/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h index 4ccb00802..e69472449 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX100-RSK_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c b/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c index dc45b8c6a..454781cd6 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c +++ b/FreeRTOS/Demo/RX100-RSK_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h b/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h index e1fff48d6..ce1a83f88 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h +++ b/FreeRTOS/Demo/RX100-RSK_IAR/PriorityDefinitions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/main.c b/FreeRTOS/Demo/RX100-RSK_IAR/main.c index 784e8e54d..1972a90e5 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/main.c +++ b/FreeRTOS/Demo/RX100-RSK_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c b/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c index 2234b52c7..5cb655054 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c +++ b/FreeRTOS/Demo/RX100-RSK_IAR/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c b/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c index b3fc2c6e7..ac95a6f61 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c +++ b/FreeRTOS/Demo/RX100-RSK_IAR/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s b/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s index d8d7c4156..dd08294f3 100644 --- a/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s +++ b/FreeRTOS/Demo/RX100-RSK_IAR/reg_test.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h index 07b460d95..1a002dc94 100644 --- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c index dc45b8c6a..454781cd6 100644 --- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c index ee1639496..67a4ecd72 100644 --- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c +++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c index 839a73798..44d874f3f 100644 --- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c +++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_low_power.c b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_low_power.c index efee130be..f1275af0c 100644 --- a/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_low_power.c +++ b/FreeRTOS/Demo/RX100-RSK_Renesas_e2studio/RTOSDemo/main_low_power.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c index 96abeb896..eebc565cf 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h index 1c6472e33..5d1b16def 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c index 382d17ba3..b4a2d726a 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S index 56d7c93d9..1220cf992 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s index 3f7bedea1..382cfe5da 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c index 4376ec2cc..a69818c4e 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h index cc63ff5fe..7d3872083 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/main.c b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/main.c index d6c973410..e23332df5 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/main.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_GCC_e2studio_IAR/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c index 96abeb896..eebc565cf 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/FreeRTOSConfig.h index 83abe93d1..32c7ceb72 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c index a29322f55..39e535f73 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/main_full.c b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/main_full.c index 8c520765f..e119a7a31 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/main.c b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/main.c index a52bc25de..725eab9a5 100644 --- a/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/main.c +++ b/FreeRTOS/Demo/RX100_RX113-RSK_Renesas_e2studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c index a69f52770..a8fe1ba86 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h index 0c0f57aa2..80060637a 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c index f5a832a88..fd58093f0 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c index e1f835bac..d2888a83a 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c index 7b7dfd252..62b0b30c3 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/ButtonAndLCD.h b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/ButtonAndLCD.h index bf50a4c42..618df245e 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/ButtonAndLCD.h +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/ButtonAndLCD.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-blinky.c index 9bf6f846f..fa1fc5216 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c index a5d40a991..92539f2cd 100644 --- a/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c index dda3f909a..802c9046e 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h index 441c3b88e..dfa95b1b3 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c index b259c6069..d45302957 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S index 56d7c93d9..1220cf992 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s index 475239aeb..813677822 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c index d9c2b48e3..1173ab534 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h index cc63ff5fe..7d3872083 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/main.c b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/main.c index 82fb6c0bf..7fc731798 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/main.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c index dda3f909a..802c9046e 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/FreeRTOSConfig.h index 13f8aae52..c7e639c16 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c index 9fc249dca..c0f42b77a 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/main_full.c b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/main_full.c index 51e3130d7..98897f7af 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/main.c b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/main.c index 62202654d..bdb44dc7e 100644 --- a/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/main.c +++ b/FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h index c7cd6a4a0..b5b41e2ba 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c index cbd30fd92..d29e5ecd0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c index beb167e76..155dc0310 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c index d7afd6601..d8711f47d 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c index ca94f5cbb..b5b80ee1a 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c index 3548a1f35..3184632f1 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c index dfe20ace4..e8728af4e 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c index c9210c45c..3ca54cff4 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h index 158b6b1df..aa9d6a0d0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c index de38a1b48..319e033ad 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c index be5f16c10..b774a3631 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c index 29d037b71..bdc68ce8b 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h index 4ef2df60b..8e1b13f1f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/PriorityDefinitions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s index 57d66fc22..25ee21ad8 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c index 03b8b938a..2de58da8a 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c index e6d34b89a..d60483ea2 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c index 72099b9a8..546d049bf 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c index 382321628..9017c72b8 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h index d0731a6c7..fd6717f95 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c index f5a832a88..fd58093f0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c index e1f835bac..d2888a83a 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c index 3954a6c5d..300a963d8 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-blinky.c index a2c300f27..dfc1b6ea7 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-full.c index 36df2c00d..a1b91f698 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c index dfe20ace4..e8728af4e 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c index 1103f10d3..3231a13fe 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c +++ b/FreeRTOS/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h index a14a1c3c6..40061a7e5 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c index cbd30fd92..d29e5ecd0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c index beb167e76..155dc0310 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c index 8ab4e0a38..04a964644 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c index ca94f5cbb..b5b80ee1a 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c index 3548a1f35..3184632f1 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c index dfe20ace4..e8728af4e 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c index c9210c45c..3ca54cff4 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h index c06d1249e..e0ddb764c 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c index de38a1b48..319e033ad 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c index be5f16c10..b774a3631 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c index a26e0d299..eba224dd7 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h index 4ef2df60b..8e1b13f1f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/PriorityDefinitions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s index 57d66fc22..25ee21ad8 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c index b9fe3dc3a..c94309e22 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c index a6de9a4bd..28488085f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c index 72099b9a8..546d049bf 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c index 382321628..9017c72b8 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h index 85e2c2496..797865236 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c index f5a832a88..fd58093f0 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c index e1f835bac..d2888a83a 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c index 8ab4e0a38..04a964644 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-blinky.c index a2c300f27..dfc1b6ea7 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-full.c index 0db41d1f2..53ddd6b3a 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c index dfe20ace4..e8728af4e 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c index d0f7e9dcd..126d59c18 100644 --- a/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c +++ b/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h index ee3d89409..e1a906c99 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c index f5a832a88..fd58093f0 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c index e1f835bac..d2888a83a 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c index 7b7dfd252..62b0b30c3 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/include/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-blinky.c index 409aac01e..69e99b210 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c index f8322eada..1ba34448b 100644 --- a/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX630-RSK_Renesas/RTOSDemo/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h index a7b9d9a8b..6fd8ca2bd 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c index b8a23b76e..d9b487afd 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/HighFrequencyTimerTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c index 5138e0abd..e8599fc3e 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c index b410bf7f5..16c9bfc8a 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-blinky.c index c3ed5f2b8..cb08260e6 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-blinky.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-full.c index bc502ee2f..b4073cfce 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-full.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/main-full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c index dfe20ace4..e8728af4e 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/EMAC.c index b666f1784..5ef307c44 100644 --- a/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/EMAC.c +++ b/FreeRTOS/Demo/RX600_RX63N-RDK_Renesas/RTOSDemo/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.Hbp b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.Hbp deleted file mode 100644 index 0d3910dbc..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.Hbp +++ /dev/null @@ -1,4 +0,0 @@ -[Setting] -ToolChain=0 -[Section] -WindowSize=726,544 diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.hws b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.hws deleted file mode 100644 index f9a2f9ef0..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.hws +++ /dev/null @@ -1,49 +0,0 @@ -[HIMDBVersion] -2.0 -[DATABASE_VERSION] -"11.0" -[WORKSPACE_DETAILS] -"RTOSDemo" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo.hws" "RX" "Renesas RX Standard" -[SHARED_WORKSPACE_CONTROL_STATUS] -"" "" "" -"" "" "" -[PROJECTS] -"RTOSDemo" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\RTOSDemo.hwp" 0 -[INFORMATION] -"No workspace information available" -[SCRAP] -[PROJECT_DEPENDENCY] -[WORKSPACE_PROPERTIES] -[HELP_FILES] -"c:\devtools\renesas\hew\tools\renesas\rx\1_0_0\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\devtools\renesas\hew\tools\renesas\rx\1_0_1\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\devtools\renesas\hew\tools\renesas\rx\1_1_0\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\devtools\renesas\hew\tools\renesas\rx\1_2_0\hew\stdlib.chm" "C/C++ Standard Library Help" 1 -"c:\program files\renesas\hew\tools\renesas\rx\1_0_1\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\program files\renesas\hew\tools\renesas\rx\1_1_0\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\program files\renesas\hew_002\tools\renesas\rx\1_0_1\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\program files\renesas\hew_rx210\tools\renesas\rx\1_0_1\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\program files\renesas\hewrx200\tools\renesas\rx\1_0_1\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -[GENERAL_DATA_PROJECT] -[USERMENUTOOLS] -[CUSTOMPLACEHOLDERS] -[MAKEFILE_BUILD_INFO] -"$(WORKSPDIR)\make\$(PROJECTNAME)_$(CONFIGNAME).mak" "" "$(WORKSPDIR)\make" 0 0 0 -[VD_CONFIGURATION_OPTIONS] -"ACTIVE_DESKTOP" "0" -[VD_CONFIGURATIONS] -"0" "Default1" "1" -"1" "Default2" "1" -"2" "Default3" "1" -"3" "Default4" "1" -[OPTIONS_DEBUG_TAB] -0 0 0 0 0 -[VCS] -"" "" "" 0 -[VCS_PROJECT] -[MAKEFILE_ENV_STRINGS] -[MAKEFILE_ENV_FLAGS] -1 0 0 -[MAKEFILE_CLEAN_INFO] -"" -[END] diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.tws b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.tws deleted file mode 100644 index e66c49083..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo.tws +++ /dev/null @@ -1,17 +0,0 @@ -[HIMDBVersion] -2.0 -[DATABASE_VERSION] -"1.2" -[CURRENT_PROJECT] -"RTOSDemo" -[GENERAL_DATA] -[BREAKPOINTS] -[OPEN_WORKSPACE_FILES] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" -[WORKSPACE_FILE_STATES] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" -4 -23 1326 673 1 1 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" 0 0 1116 444 0 0 -[LOADED_PROJECTS] -"RTOSDemo" -[END] diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/DefaultSession.hsf b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/DefaultSession.hsf deleted file mode 100644 index 4a7c75e6d..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/DefaultSession.hsf +++ /dev/null @@ -1,106 +0,0 @@ -[HIMDBVersion] -2.0 -[DATABASE_VERSION] -"2.3" -[SESSION_DETAILS] -"" -[INFORMATION] -"" -[GENERAL_DATA] -"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" "" -"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlViews" "0" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBatchFileName" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointFlag" "-1 " -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointStatus" "-1 " -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBrowseDirectory" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlLogFileName" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlSplitterPosition" "242" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlViews" "1" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "17" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineWndInstanceKey0" "{WK_00000001_CmdLine}" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" "" -"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" -"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" "" -"{7943C44E-7D44-422A-9140-4CF55C88F7D3}DifferenceCtrlViews" "0" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}ElfDwarf2Objects" "1" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}LoadModule0OBJ_ELFDWARF2_ARRAY_EXPAND_LIMIT" "-1" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}LoadModule0OBJ_ELFDWARF2_STATIC_MEM_EXPAND" "1" -[LANGUAGE] -"English" -[CONFIG_INFO_VD1] -1 -[CONFIG_INFO_VD2] -0 -[CONFIG_INFO_VD3] -0 -[CONFIG_INFO_VD4] -0 -[WINDOW_POSITION_STATE_DATA_VD1] -"Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 289 560 340 350 200 18 0 "36756|36757|36758|36759|<>|36746|36747|<>|39531|<>|39500|39534|<>|36687" "0.0" -"{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 206 560 340 350 200 18 0 "" "0.0" -"{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000003_BOOKMARKS}" "TOOLBAR 0" 59419 1 1 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000004_TEMPLATES}" "TOOLBAR 0" 59419 1 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000005_SEARCH}" "TOOLBAR 0" 59419 0 1 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000007_DEBUG}" "TOOLBAR 0" 59419 2 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000008_DEBUGRUN}" "TOOLBAR 0" 59419 2 1 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000009_VERSIONCONTROL}" "TOOLBAR 0" 59419 1 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000012_MAP}" "TOOLBAR 0" 59419 1 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000018_DEFAULTWINDOW}" "TOOLBAR 0" 59419 1 2 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000025_HELPSYSTEMTOOL}" "TOOLBAR 0" 59419 2 3 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000026_MACRO}" "TOOLBAR 0" 59419 1 6 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000028_RTOSDEBUG}" "TOOLBAR 0" 59419 2 2 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000029_SYSTEMTOOL}" "TOOLBAR 0" 59419 2 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" -[WINDOW_POSITION_STATE_DATA_VD2] -[WINDOW_POSITION_STATE_DATA_VD3] -[WINDOW_POSITION_STATE_DATA_VD4] -[WINDOW_Z_ORDER] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\RTOSDemo.c" -[TARGET_NAME] -"" "" 1229201492 -[STATUSBAR_STATEINFO_VD1] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD2] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD3] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD4] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_DEBUGGER_PANESTATE_VD1] -[STATUSBAR_DEBUGGER_PANESTATE_VD2] -[STATUSBAR_DEBUGGER_PANESTATE_VD3] -[STATUSBAR_DEBUGGER_PANESTATE_VD4] -[DEBUGGER_OPTIONS] -"" -[DOWNLOAD_MODULES] -[CONNECT_ON_GO] -"FALSE" -[DOWNLOAD_MODULES_AFTER_BUILD] -"TRUE" -[REMOVE_BREAKPOINTS_ON_DOWNLOAD] -"FALSE" -[DISABLE_MEMORY_ACCESS_PRIOR_TO_COMMAND_FILE_EXECUTION] -"FALSE" -[LIMIT_DISASSEMBLY_MEMORY_ACCESS] -"FALSE" -[DISABLE_MEMORY_ACCESS_DURING_EXECUTION] -"FALSE" -[DEBUGGER_OPTIONS_PROPERTIES] -"1" -[COMMAND_FILES] -[DEFAULT_DEBUG_FORMAT] -"" -[FLASH_DETAILS] -"0.000000" 0 0 "" 0 "" 0 0 "" 1 1 0 0 0 0 0 "" "" "" "" "" -[BREAKPOINTS] -[END] diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h deleted file mode 100644 index c398d0974..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/* Board specifics. */ -#include "platform.h" - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * - * See http://www.freertos.org/a00110.html - *----------------------------------------------------------*/ - -#define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 0 -#define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ( 96000000UL ) -#define configPERIPHERAL_CLOCK_HZ ( 48000000UL ) -#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 ) -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 50 * 1024 ) ) -#define configMAX_TASK_NAME_LEN ( 12 ) -#define configUSE_TRACE_FACILITY 1 -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_CO_ROUTINES 0 -#define configUSE_MUTEXES 1 -#define configGENERATE_RUN_TIME_STATS 1 -#define configCHECK_FOR_STACK_OVERFLOW 2 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configQUEUE_REGISTRY_SIZE 0 -#define configUSE_MALLOC_FAILED_HOOK 1 -#define configUSE_APPLICATION_TASK_TAG 0 - -#define configMAX_PRIORITIES ( 7 ) -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - -/* Software timer definitions. */ -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY ( 3 ) -#define configTIMER_QUEUE_LENGTH 5 -#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) - -/* The interrupt priority used by the kernel itself for the tick interrupt and -the pended interrupt. This would normally be the lowest priority. */ -#define configKERNEL_INTERRUPT_PRIORITY 1 - -/* The maximum interrupt priority from which FreeRTOS API calls can be made. -Interrupts that use a priority above this will not be effected by anything the -kernel is doing. */ -#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4 - -/* The peripheral used to generate the tick interrupt is configured as part of -the application code. This constant should be set to the vector number of the -peripheral chosen. As supplied this is CMT0. */ -#define configTICK_VECTOR _CMT0_CMI0 - -/* Set the following definitions to 1 to include the API function, or zero -to exclude the API function. */ - -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_vTaskCleanUpResources 0 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define INCLUDE_xTaskGetSchedulerState 1 - -/* This demo makes use of one or more example stats formatting functions. These -format the raw data provided by the xTaskGetSystemState() function in to human -readable ASCII form. See the notes in the implementation of vTaskList() within -FreeRTOS/Source/tasks.c for limitations. */ -#define configINCLUDE_STATS_FORMATTING_FUNCTIONS 1 - -#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } -extern volatile unsigned long ulHighFrequencyTickCount; -#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() nop() /* Run time stats use the same timer as the high frequency timer test. */ -#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTickCount - - -/* Override some of the priorities set in the common demo tasks. This is -required to ensure flase positive timing errors are not reported. */ -#define bktPRIMARY_PRIORITY ( configMAX_PRIORITIES - 3 ) -#define bktSECONDARY_PRIORITY ( configMAX_PRIORITIES - 4 ) -#define intqHIGHER_PRIORITY ( configMAX_PRIORITIES - 3 ) - - -/*----------------------------------------------------------- - * Ethernet configuration. - *-----------------------------------------------------------*/ - -/* MAC address configuration. */ -#define configMAC_ADDR0 0x00 -#define configMAC_ADDR1 0x12 -#define configMAC_ADDR2 0x13 -#define configMAC_ADDR3 0x10 -#define configMAC_ADDR4 0x15 -#define configMAC_ADDR5 0x11 - -/* IP address configuration. */ -#define configIP_ADDR0 192 -#define configIP_ADDR1 168 -#define configIP_ADDR2 0 -#define configIP_ADDR3 200 - -/* Netmask configuration. */ -#define configNET_MASK0 255 -#define configNET_MASK1 255 -#define configNET_MASK2 255 -#define configNET_MASK3 0 - -#endif /* FREERTOS_CONFIG_H */ diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c deleted file mode 100644 index 60b169e80..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/HighFrequencyTimerTest.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * High frequency timer test as described in main.c. - */ - -/* Scheduler includes. */ -#include "FreeRTOS.h" - -/* Hardware specifics. */ -#include "iodefine.h" - -/* The set frequency of the interrupt. Deviations from this are measured as -the jitter. */ -#define timerINTERRUPT_FREQUENCY ( 20000UL ) - -/* The expected time between each of the timer interrupts - if the jitter was -zero. */ -#define timerEXPECTED_DIFFERENCE_VALUE ( ( unsigned short ) ( ( configPERIPHERAL_CLOCK_HZ / 8UL ) / timerINTERRUPT_FREQUENCY ) ) - -/* The highest available interrupt priority. */ -#define timerHIGHEST_PRIORITY ( 15 ) - -/* Misc defines. */ -#define timerTIMER_3_COUNT_VALUE ( *( ( unsigned short * ) 0x8801a ) ) /*( CMT3.CMCNT )*/ - -/*-----------------------------------------------------------*/ - -/* Interrupt handler in which the jitter is measured. */ -static void prvTimer2IntHandler( void ); - -/* Stores the value of the maximum recorded jitter between interrupts. This is -displayed on one of the served web pages. */ -volatile unsigned short usMaxJitter = 0; - -/* Counts the number of high frequency interrupts - used to generate the run -time stats. */ -volatile unsigned long ulHighFrequencyTickCount = 0UL; - -/*-----------------------------------------------------------*/ - -void vSetupHighFrequencyTimer( void ) -{ - /* Timer CMT2 is used to generate the interrupts, and CMT3 is used - to measure the jitter. */ - - /* Enable compare match timer 2 and 3. */ - MSTP( CMT2 ) = 0; - MSTP( CMT3 ) = 0; - - /* Interrupt on compare match. */ - CMT2.CMCR.BIT.CMIE = 1; - - /* Set the compare match value. */ - CMT2.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / timerINTERRUPT_FREQUENCY ) -1 ) / 8 ); - - /* Divide the PCLK by 8. */ - CMT2.CMCR.BIT.CKS = 0; - CMT3.CMCR.BIT.CKS = 0; - - /* Enable the interrupt... */ - _IEN( _CMT2_CMI2 ) = 1; - - /* ...and set its priority to the maximum possible, this is above the priority - set by configMAX_SYSCALL_INTERRUPT_PRIORITY so will nest. */ - _IPR( _CMT2_CMI2 ) = timerHIGHEST_PRIORITY; - - /* Start the timers. */ - CMT.CMSTR1.BIT.STR2 = 1; - CMT.CMSTR1.BIT.STR3 = 1; -} -/*-----------------------------------------------------------*/ - -#pragma interrupt ( prvTimer2IntHandler( vect = _VECT( _CMT2_CMI2 ), enable ) ) -static void prvTimer2IntHandler( void ) -{ -volatile unsigned short usCurrentCount; -static unsigned short usMaxCount = 0; -static unsigned long ulErrorCount = 0UL; - - /* We use the timer 1 counter value to measure the clock cycles between - the timer 0 interrupts. First stop the clock. */ - CMT.CMSTR1.BIT.STR3 = 0; - nop(); - nop(); - usCurrentCount = timerTIMER_3_COUNT_VALUE; - - /* Is this the largest count we have measured yet? */ - if( usCurrentCount > usMaxCount ) - { - if( usCurrentCount > timerEXPECTED_DIFFERENCE_VALUE ) - { - usMaxJitter = usCurrentCount - timerEXPECTED_DIFFERENCE_VALUE; - } - else - { - /* This should not happen! */ - ulErrorCount++; - } - - usMaxCount = usCurrentCount; - } - - /* Used to generate the run time stats. */ - ulHighFrequencyTickCount++; - - /* Clear the timer. */ - timerTIMER_3_COUNT_VALUE = 0; - - /* Then start the clock again. */ - CMT.CMSTR1.BIT.STR3 = 1; -} - - - - - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.c deleted file mode 100644 index 1e13a249a..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * This file contains the non-portable and therefore RX62N specific parts of - * the IntQueue standard demo task - namely the configuration of the timers - * that generate the interrupts and the interrupt entry points. - */ - -/* Scheduler includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* Demo includes. */ -#include "IntQueueTimer.h" -#include "IntQueue.h" - -/* Hardware specifics. */ -#include "iodefine.h" - -#define tmrTIMER_0_1_FREQUENCY ( 2000UL ) -#define tmrTIMER_2_3_FREQUENCY ( 2001UL ) - -void vInitialiseTimerForIntQueueTest( void ) -{ - /* Ensure interrupts do not start until full configuration is complete. */ - portENTER_CRITICAL(); - { - /* Cascade two 8bit timer channels to generate the interrupts. - 8bit timer unit 1 (TMR0 and TMR1) and 8bit timer unit 2 (TMR2 and TMR3 are - utilised for this test. */ - - /* Enable the timers. */ - SYSTEM.MSTPCRA.BIT.MSTPA5 = 0; - SYSTEM.MSTPCRA.BIT.MSTPA4 = 0; - - /* Enable compare match A interrupt request. */ - TMR0.TCR.BIT.CMIEA = 1; - TMR2.TCR.BIT.CMIEA = 1; - - /* Clear the timer on compare match A. */ - TMR0.TCR.BIT.CCLR = 1; - TMR2.TCR.BIT.CCLR = 1; - - /* Set the compare match value. */ - TMR01.TCORA = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / tmrTIMER_0_1_FREQUENCY ) -1 ) / 8 ); - TMR23.TCORA = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / tmrTIMER_0_1_FREQUENCY ) -1 ) / 8 ); - - /* 16 bit operation ( count from timer 1,2 ). */ - TMR0.TCCR.BIT.CSS = 3; - TMR2.TCCR.BIT.CSS = 3; - - /* Use PCLK as the input. */ - TMR1.TCCR.BIT.CSS = 1; - TMR3.TCCR.BIT.CSS = 1; - - /* Divide PCLK by 8. */ - TMR1.TCCR.BIT.CKS = 2; - TMR3.TCCR.BIT.CKS = 2; - - /* Enable TMR 0, 2 interrupts. */ - IEN( TMR0, CMIA0 ) = 1; - IEN( TMR2, CMIA2 ) = 1; - - /* Set the timer interrupts to be above the kernel. The interrupts are - assigned different priorities so they nest with each other. */ - IPR( TMR0, CMIA0 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 1; - IPR( TMR2, CMIA2 ) = ( configMAX_SYSCALL_INTERRUPT_PRIORITY - 2 ); - } - portEXIT_CRITICAL(); - - /* Ensure the interrupts are clear as they are edge detected. */ - IR( TMR0, CMIA0 ) = 0; - IR( TMR2, CMIA2 ) = 0; -} -/*-----------------------------------------------------------*/ - -#pragma interrupt ( vT0_1InterruptHandler( vect = VECT_TMR0_CMIA0, enable ) ) -void vT0_1InterruptHandler( void ) -{ - portYIELD_FROM_ISR( xFirstTimerHandler() ); -} -/*-----------------------------------------------------------*/ - -#pragma interrupt ( vT2_3InterruptHandler( vect = VECT_TMR2_CMIA2, enable ) ) -void vT2_3InterruptHandler( void ) -{ - portYIELD_FROM_ISR( xSecondTimerHandler() ); -} - - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.h deleted file mode 100644 index 563001886..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/IntQueueTimer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef INT_QUEUE_TIMER_H -#define INT_QUEUE_TIMER_H - -void vInitialiseTimerForIntQueueTest( void ); -portBASE_TYPE xTimer0Handler( void ); -portBASE_TYPE xTimer1Handler( void ); - -#endif - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/ParTest.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/ParTest.c deleted file mode 100644 index 62a32ac53..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/ParTest.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/*----------------------------------------------------------- - * Simple IO routines to control the LEDs. - *-----------------------------------------------------------*/ - -/* Scheduler includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* Demo includes. */ -#include "partest.h" - -/* Hardware specifics. */ -#include "iodefine.h" - -#define partestNUM_LEDS ( 4 ) - -long lParTestGetLEDState( unsigned long ulLED ); - -/*-----------------------------------------------------------*/ - -void vParTestInitialise( void ) -{ - /* Port pin configuration is done by the low level set up prior to this - function being called. */ -} -/*-----------------------------------------------------------*/ - -void vParTestSetLED( unsigned long ulLED, signed long xValue ) -{ - if( ulLED < partestNUM_LEDS ) - { - if( xValue != 0 ) - { - /* Turn the LED on. */ - taskENTER_CRITICAL(); - { - switch( ulLED ) - { - case 0: LED0 = LED_ON; - break; - case 1: LED1 = LED_ON; - break; - case 2: LED2 = LED_ON; - break; - case 3: LED3 = LED_ON; - break; - } - } - taskEXIT_CRITICAL(); - } - else - { - /* Turn the LED off. */ - taskENTER_CRITICAL(); - { - switch( ulLED ) - { - case 0: LED0 = LED_OFF; - break; - case 1: LED1 = LED_OFF; - break; - case 2: LED2 = LED_OFF; - break; - case 3: LED3 = LED_OFF; - break; - } - - } - taskEXIT_CRITICAL(); - } - } -} -/*-----------------------------------------------------------*/ - -void vParTestToggleLED( unsigned long ulLED ) -{ - if( ulLED < partestNUM_LEDS ) - { - taskENTER_CRITICAL(); - { - if( lParTestGetLEDState( ulLED ) != 0x00 ) - { - vParTestSetLED( ulLED, 0 ); - } - else - { - vParTestSetLED( ulLED, 1 ); - } - } - taskEXIT_CRITICAL(); - } -} -/*-----------------------------------------------------------*/ - -long lParTestGetLEDState( unsigned long ulLED ) -{ -long lReturn = pdTRUE; - - if( ulLED < partestNUM_LEDS ) - { - switch( ulLED ) - { - case 0 : if( LED0 != 0 ) - { - lReturn = pdFALSE; - } - break; - case 1 : if( LED1 != 0 ) - { - lReturn = pdFALSE; - } - break; - case 2 : if( LED2 != 0 ) - { - lReturn = pdFALSE; - } - break; - case 3 : if( LED3 != 0 ) - { - lReturn = pdFALSE; - } - break; - } - } - - return lReturn; -} -/*-----------------------------------------------------------*/ - - \ No newline at end of file diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp deleted file mode 100644 index 456c784c3..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp +++ /dev/null @@ -1,479 +0,0 @@ -[HIMDBVersion] -2.0 -[DATABASE_VERSION] -"2.8" -[PROJECT_DETAILS] -"RTOSDemo" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\RTOSDemo.hwp" "RX" "Renesas RX Standard" "Application" "RX600" "Other" -[INFORMATION] -"No project information available" -[TOOL_CHAIN] -"Renesas RX Standard Toolchain" "1.2.0.0" -[CONFIGURATIONS] -"Blinky" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Blinky" -"Debug" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Debug" -"Debug-with-optimisation" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Debug-with-optimisation" -[BUILD_PHASES] -"Renesas OptLinker" 1 -"Renesas RX Assembler" 1 -"Renesas RX C/C++ Compiler" 1 -"Renesas RX C/C++ Library Generator" 1 -"Renesas RX Configurator" 1 -[TOOL_ENVIRONMENT] -[EXTENSIONS] -"Absolute file" "ABS" -"Assembly include file" "INC" -"Assembly list file" "LST" -"Assembly source file" "S" -"Assembly source file" "SRC" -"Binary file" "BIN" -"C header file" "H" -"C source file" "C" -"C++ header file" "HPP" -"C++ source file" "CC" -"C++ source file" "CP" -"C++ source file" "CPP" -"CPU information file" "CPU" -"Calling information file" "CAL" -"Configuration file" "CFG" -"Debug information file" "DBG" -"Hex file" "HEX" -"Library file" "LIB" -"Library information file" "LBP" -"Linkage map file" "MAP" -"Linkage symbol file" "FSY" -"Object file" "OBJ" -"Optimize map file" "bls" -"Preprocessed C source file" "P" -"Preprocessed C++ source file" "PP" -"Relocatable file" "REL" -"Rts information file" "RTS" -"S-Record file" "MOT" -"Stack information file" "SNI" -"TD include object file" "RTI" -[FILE_GROUPS] -"Absolute file" "BIN" "NONE" "" -"Assembly include file" "TEXT" "EDITOR" "" -"Assembly list file" "TEXT" "EDITOR" "" -"Assembly source file" "TEXT" "EDITOR" "" -"Binary file" "BIN" "NONE" "" -"C header file" "TEXT" "EDITOR" "" -"C source file" "TEXT" "EDITOR" "" -"C++ header file" "TEXT" "EDITOR" "" -"C++ source file" "TEXT" "EDITOR" "" -"CPU information file" "BIN" "NONE" "" -"Calling information file" "BIN" "NONE" "" -"Configuration file" "TEXT" "EDITOR" "" -"Debug information file" "BIN" "NONE" "" -"Hex file" "TEXT" "EDITOR" "" -"Library file" "BIN" "NONE" "" -"Library information file" "TEXT" "EDITOR" "" -"Linkage map file" "TEXT" "EDITOR" "" -"Linkage symbol file" "TEXT" "EDITOR" "" -"Object file" "BIN" "NONE" "" -"Optimize map file" "BIN" "NONE" "" -"Preprocessed C source file" "TEXT" "EDITOR" "" -"Preprocessed C++ source file" "TEXT" "EDITOR" "" -"Relocatable file" "BIN" "NONE" "" -"Rts information file" "BIN" "NONE" "" -"S-Record file" "TEXT" "EDITOR" "" -"Stack information file" "BIN" "NONE" "" -"TD include object file" "BIN" "NONE" "" -[ASSOCIATED_APPLICATIONS] -[TOOLCHAIN_PHASE] -"Renesas OptLinker" -"Renesas RX Assembler" -"Renesas RX C/C++ Compiler" -"Renesas RX C/C++ Library Generator" -"Renesas RX Configurator" -[UTILITY_PHASE] -[CUSTOM_PHASES] -[CUSTOM_PHASE_INPUT_GROUP] -[CUSTOM_PHASE_OUTPUT_SYNTAX] -[BUILD_ORDER] -"Renesas RX C/C++ Library Generator" 1 -"Renesas RX C/C++ Compiler" 1 -"Renesas RX Assembler" 1 -"Renesas OptLinker" 1 -"Renesas RX Configurator" 0 -[BUILD_PHASE_DETAILS] -"Renesas OptLinker" "Object file|Library file|Relocatable file" 0 -"Renesas RX Assembler" "Assembly source file|Linkage symbol file" 1 -"Renesas RX C/C++ Compiler" "C source file|C++ source file" 1 -"Renesas RX C/C++ Library Generator" "" 0 -"Renesas RX Configurator" "Configuration file" 0 -[BUILD_FILE_ORDER_Assembly source file] -"Renesas RX Assembler" 1 -[BUILD_FILE_ORDER_C source file] -"Renesas RX C/C++ Compiler" 1 -[BUILD_FILE_ORDER_C++ source file] -"Renesas RX C/C++ Compiler" 1 -[BUILD_FILE_ORDER_Linkage symbol file] -"Renesas RX Assembler" 1 -[SCRAP] -"Project Generator Setup File" "" -[MAPPINGS] -"Assembly source file" "Renesas RX Assembler" "Renesas RX C/C++ Compiler" -"Library file" "Renesas OptLinker" "Renesas RX C/C++ Library Generator" -"Object file" "Renesas OptLinker" "Renesas RX Assembler" -"Object file" "Renesas OptLinker" "Renesas RX C/C++ Compiler" -[PROJECT_FILES] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash_timer.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\sp_flop.c" "User" "C source file|Common demo tasks" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "User" "C source file|FreeTCP (Based on uIP)|Common" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "User" "C source file|FreeTCP (Based on uIP)|Common" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "User" "C source file|FreeTCP (Based on uIP)|Common" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "User" "C source file|FreeTCP (Based on uIP)" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "User" "C source file|FreeTCP (Based on uIP)" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "User" "C source file|FreeTCP (Based on uIP)" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "User" "C source file|FreeTCP (Based on uIP)" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\HighFrequencyTimerTest.c" "User" "C source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\IntQueueTimer.c" "User" "C source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\ParTest.c" "User" "C source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\dbsct.c" "User" "C source file|Renesas Files" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\flash_options.c" "User" "C source file|Renesas Files" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\hwsetup.c" "User" "C source file|Renesas Files" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowlvl.src" "User" "Assembly source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowsrc.c" "User" "C source file|Renesas Files" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\resetprg.c" "User" "C source file|Renesas Files" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\sbrk.c" "User" "C source file|Renesas Files" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\vecttbl.c" "User" "C source file|Renesas Files" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" "User" "C source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" "User" "C source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\uIP_Task.c" "User" "C source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\EMAC.c" "User" "C source file|FreeTCP (Based on uIP)|Port Specific" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\httpd-cgi.c" "User" "C source file|FreeTCP (Based on uIP)|Port Specific" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\phy.c" "User" "C source file|FreeTCP (Based on uIP)|Port Specific" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "User" "C source file|FreeRTOS" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "User" "C source file|FreeRTOS|Portable layer" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "User" "C source file|FreeRTOS|Portable layer" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port_asm.src" "User" "Assembly source file" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "User" "C source file|FreeRTOS" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "User" "C source file|FreeRTOS" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "User" "C source file|FreeRTOS" 2 -[FOLDER] -"Assembly source file" "Assembly source file" -"C header file" "C header file" -"C source file" "C source file" -"C source file|Common demo tasks" "" -"C source file|FreeRTOS" "" -"C source file|FreeRTOS|Portable layer" "" -"C source file|FreeTCP (Based on uIP)" "" -"C source file|FreeTCP (Based on uIP)|Common" "" -"C source file|FreeTCP (Based on uIP)|Port Specific" "" -"C source file|Renesas Files" "" -[GENERAL_DATA_PROJECT] -"FDT_AutoConnect" "0" -"FDT_BaseDevice" "" -"FDT_BaudRate" "" -"FDT_BlockLockConnect" "1" -"FDT_BlockLockDisconnect" "1" -"FDT_BootMode" "FALSE" -"FDT_CKM" "0" -"FDT_CKP" "0" -"FDT_ClockMode" "0" -"FDT_ClockSync" "00000000" -"FDT_Comments" "" -"FDT_ConnectionResetSuppression" "FFFFFFFF" -"FDT_Device" "" -"FDT_DoReadbackVerification" "" -"FDT_DoSecurityProtection" "" -"FDT_DoSecurityProtectionLevel" "" -"FDT_Frequency" "0.0000" -"FDT_Interface" "" -"FDT_InternalClock" "FALSE" -"FDT_KernelPath" "" -"FDT_KernelResident" "FALSE" -"FDT_McuId" "0" -"FDT_MessageLevel" "0" -"FDT_PinOutputs" "00000000" -"FDT_PinSettings" "00000000" -"FDT_Port" "" -"FDT_Protection" "0" -"FDT_Protocol" "" -"FDT_ReinterrogateGenericDevice" "" -"FDT_ResetOnDisconnect" "" -"FDT_ResetPinOutputs" "00000000" -"FDT_ResetPinSettings" "00000000" -"FDT_SerNumConfigString" "" -"FDT_SerNumDllFunction" "" -"FDT_SerNumDllLocation" "" -"FDT_SerNumEnabled" "FALSE" -"FDT_SerNumMemArea" "" -"FDT_UPMPinSettings" "00000000" -"FDT_UseDefaultBaudRate" "FALSE" -"FDT_UseInternalKernel" "TRUE" -"FDT_UserPinOutputs" "00000000" -"FDT_UserPinSettings" "00000000" -"MAKEGEN_GENERATE_MAKEFILE_FOR" "0" -"MAKEGEN_MAKEFILE_FORMAT" "2" -"MAKEGEN_MAKEFILE_RELATIVITY" "1" -"MAKEGEN_SCAN_DEPENDENCIES_WHILST_BUILDING_MAKEFILE" "1" -"MAKEGEN_USE_STATIC_SUBCOMMAND_FILES" "1" -"USE_CUSTOM_LINKAGE_ORDER" "0" -[ON_DEMAND_COMPONENTS_LOADED] -[SYNC_SESSION_NAMES] -[SESSIONS] -"SessionRX600_E1_E20_SYSTEM" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\SessionRX600_E1_E20_SYSTEM.hsf" 0 -[GENERAL_DATA_SESSION_SessionRX600_E1_E20_SYSTEM] -[OPTIONS_Blinky_Renesas OptLinker] -"Single Shot" "0d8c8ced0612dc10" 5 -[OPTIONS_Blinky_Renesas RX Assembler] -"Assembly source file" "00bd89f6bf10dc10" 4 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowlvl.src" "02e033f30612dc10" 4 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port_asm.src" "00bd89f6bf10dc10" 4 -"Linkage symbol file" "00bd89f6bf10dc10" 4 -[OPTIONS_Blinky_Renesas RX C/C++ Compiler] -"C source file" "08eacdba1712dc10" 2 -"C++ source file" "08eacdba1712dc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash_timer.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\sp_flop.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\HighFrequencyTimerTest.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\IntQueueTimer.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\ParTest.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\dbsct.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\flash_options.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\hwsetup.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowsrc.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\resetprg.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\sbrk.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\vecttbl.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\uIP_Task.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\EMAC.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\httpd-cgi.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\phy.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "08eacdba1712dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "08eacdba1712dc10" 2 -[OPTIONS_Blinky_Renesas RX C/C++ Library Generator] -"Single Shot" "00a669f6bf10dc10" 1 -[OPTIONS_Blinky_Renesas RX Configurator] -"Single Shot" "02e033f30612dc10" 6 -[OPTIONS_Blinky] -"" 0 -"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0]" 6 -"[V|VERSION|1] [B|SJIS|1] [B|DEBUG|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [B|SKIPDEPENDENCY|1] -" 4 -"[V|VERSION|1] [S|LANG|CPP] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\..\..\..\Source\portable\Renesas\RX600^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\.^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\.\Renesas-Files^"|^"$(PROJDIR)\webserver^"|^"$(PROJDIR)\Renesas-Files\mcu\rx63n^"] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|0] [B|SIZE|1] [B|MAP|0] [I|INLINE|100] [I|LOOP|2] [S|MISRA2004|ALL] [S|MISRA2004RULEFILE|^"$(CONFIGDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [I|PID|16] [B|SKIPDEPENDENCY|1] [N|DEPENDSCAN|1] -" 3 -"[V|VERSION|1] [S|LANG|C] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\..\..\..\Source\portable\Renesas\RX600^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\.^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\.\Renesas-Files^"|^"$(PROJDIR)\webserver^"|^"$(PROJDIR)\Renesas-Files\mcu\rx63n^"] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|0] [B|SIZE|1] [B|MAP|0] [I|INLINE|100] [I|LOOP|2] [S|MISRA2004|ALL] [S|MISRA2004RULEFILE|^"$(CONFIGDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [I|PID|16] [B|SKIPDEPENDENCY|1] [N|DEPENDSCAN|1] -" 2 -"[V|VERSION|1] [S|MODE|BUILD/CHANGED] [S|EXISTOUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|RUNTIME|1] [B|STDIO|1] [B|STDLIB|1] [B|STRING|1] [B|NOFLOAT|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|SIZE|1] [I|INLINE|100] [I|LOOP|2] [S|CPU|RX600] [S|BASE|00000000=NONE] [B|SKIPDEPENDENCY|1] -" 1 -"[V|VERSION|6] [S|FORM|STYPE] [S|BYTE_COUNT_VALUE|FF] [B|DEBUG|1] [S|ROM|(D,R)|(D_1,R_1)|(D_2,R_2)] [S|CRC|NONE|DEFAULT|00000000] [B|LIST|1] [S|LIST|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|SHOW|METHODCUSTOM|] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [I|SPACE|^"FF^"] [B|OPTIMIZE|0] [S|START|SI,SU,B_1,R_1,B_2,R_2,B,R(00)|C_1,C_2,C,C$*,L*,D*,P,W*(0FFF80000)|FIXEDVECT(0FFFFFF90)] [S|MEMORY|HIGH] [B|SKIPDEPENDENCY|1] -" 5 -[EXCLUDED_FILES_Blinky] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\sp_flop.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\HighFrequencyTimerTest.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\IntQueueTimer.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\uIP_Task.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\EMAC.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\httpd-cgi.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\phy.c" -[LINKAGE_ORDER_Blinky] -[GENERAL_DATA_CONFIGURATION_Blinky] -[OPTIONS_Debug_Renesas OptLinker] -"Single Shot" "0b7666c11612dc10" 5 -[OPTIONS_Debug_Renesas RX Assembler] -"Assembly source file" "00a669f6bf10dc10" 4 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowlvl.src" "02e033f30612dc10" 4 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port_asm.src" "00a669f6bf10dc10" 4 -"Linkage symbol file" "00a669f6bf10dc10" 4 -[OPTIONS_Debug_Renesas RX C/C++ Compiler] -"C source file" "0134ce902022dc10" 2 -"C++ source file" "0134ce902022dc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash_timer.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\sp_flop.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\HighFrequencyTimerTest.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\IntQueueTimer.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\ParTest.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\dbsct.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\flash_options.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\hwsetup.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowsrc.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\resetprg.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\sbrk.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\vecttbl.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\uIP_Task.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\EMAC.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\httpd-cgi.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\phy.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0134ce902022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0134ce902022dc10" 2 -[OPTIONS_Debug_Renesas RX C/C++ Library Generator] -"Single Shot" "00a669f6bf10dc10" 1 -[OPTIONS_Debug_Renesas RX Configurator] -"Single Shot" "02e033f30612dc10" 6 -[OPTIONS_Debug] -"" 0 -"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0]" 6 -"[V|VERSION|1] [B|SJIS|1] [B|DEBUG|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [S|CPU|RX600] [S|BASE|00000000=NONE] -" 4 -"[V|VERSION|1] [S|LANG|C99] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\..\..\..\Source\portable\Renesas\RX600^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\.^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\.\Renesas-Files^"|^"$(PROJDIR)\..\..\Common\ethernet\FreeTCPIP^"|^"$(PROJDIR)\webserver^"|^"$(PROJDIR)\Renesas-Files\mcu\rx63n^"] [S|CHANGE_MESSAGE|INFORMATION|] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|0] [B|SIZE|1] [B|MAP|0] [I|INLINE|100] [I|LOOP|2] [S|MISRA2004|ALL] [S|MISRA2004RULEFILE|^"$(CONFIGDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [I|PID|16] -" 2 -"[V|VERSION|1] [S|LANG|CPP] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\..\..\..\Source\portable\Renesas\RX600^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\.^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\.\Renesas-Files^"|^"$(PROJDIR)\..\..\Common\ethernet\FreeTCPIP^"|^"$(PROJDIR)\webserver^"|^"$(PROJDIR)\Renesas-Files\mcu\rx63n^"] [S|CHANGE_MESSAGE|INFORMATION|] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|0] [B|SIZE|1] [B|MAP|0] [I|INLINE|100] [I|LOOP|2] [S|MISRA2004|ALL] [S|MISRA2004RULEFILE|^"$(CONFIGDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [I|PID|16] -" 3 -"[V|VERSION|1] [S|MODE|BUILD/CHANGED] [S|EXISTOUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|RUNTIME|1] [B|MATH|1] [B|STDIO|1] [B|STDLIB|1] [B|STRING|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|SIZE|1] [I|INLINE|100] [I|LOOP|2] [S|CPU|RX600] [S|BASE|00000000=NONE] -" 1 -"[V|VERSION|6] [S|PRELINK|SKIP] [S|FORM|STYPE] [S|BYTE_COUNT_VALUE|FF] [B|DEBUG|1] [S|ROM|(D,R)|(D_1,R_1)|(D_2,R_2)] [S|CRC|NONE|DEFAULT|00000000] [B|LIST|1] [S|LIST|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|SHOW|METHODALL|SYMBOL|REFERENCE|XREFERENCE] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [I|SPACE|^"FF^"] [B|OPTIMIZE|0] [S|START|B_RX_DESC,B_TX_DESC,B_ETHERNET_BUFFERS,SI,SU,B_1,R_1,B_2,R_2,B,R(00)|C_1,C_2,C,C$*,L*,D*,P,W*(0FFF80000)|FIXEDVECT(0FFFFFF90)] [S|MEMORY|HIGH] -" 5 -[EXCLUDED_FILES_Debug] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" -[LINKAGE_ORDER_Debug] -[GENERAL_DATA_CONFIGURATION_Debug] -[OPTIONS_Debug-with-optimisation_Renesas OptLinker] -"Single Shot" "0d18192d3022dc10" 5 -[OPTIONS_Debug-with-optimisation_Renesas RX Assembler] -"Assembly source file" "00a669f6bf10dc10" 4 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowlvl.src" "02e033f30612dc10" 4 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port_asm.src" "00a669f6bf10dc10" 4 -"Linkage symbol file" "00a669f6bf10dc10" 4 -[OPTIONS_Debug-with-optimisation_Renesas RX C/C++ Compiler] -"C source file" "0d18192d3022dc10" 2 -"C++ source file" "0d18192d3022dc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash_timer.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\sp_flop.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\HighFrequencyTimerTest.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\IntQueueTimer.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\ParTest.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\dbsct.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\flash_options.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\hwsetup.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\lowsrc.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\resetprg.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\sbrk.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\board\rskrx63n\vecttbl.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\uIP_Task.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\EMAC.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\httpd-cgi.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\webserver\phy.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0d18192d3022dc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0d18192d3022dc10" 2 -[OPTIONS_Debug-with-optimisation_Renesas RX C/C++ Library Generator] -"Single Shot" "00a669f6bf10dc10" 1 -[OPTIONS_Debug-with-optimisation_Renesas RX Configurator] -"Single Shot" "02e033f30612dc10" 6 -[OPTIONS_Debug-with-optimisation] -"" 0 -"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0]" 6 -"[V|VERSION|1] [B|SJIS|1] [B|DEBUG|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [S|CPU|RX600] [S|BASE|00000000=NONE] -" 4 -"[V|VERSION|1] [S|LANG|C99] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\..\..\..\Source\portable\Renesas\RX600^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\.^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\.\Renesas-Files^"|^"$(PROJDIR)\..\..\Common\ethernet\FreeTCPIP^"|^"$(PROJDIR)\webserver^"|^"$(PROJDIR)\Renesas-Files\mcu\rx63n^"] [S|DEFINE|INCLUDE_HIGH_FREQUENCY_TIMER_TEST] [S|CHANGE_MESSAGE|INFORMATION|] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|MAX] [B|SIZE|1] [B|MAP|1] [S|MAPPATH|^"$(CONFIGDIR)\$(PROJECTNAME).bls^"] [I|INLINE|100] [I|LOOP|2] [B|MAPOPTIMIZATION|1] [S|MISRA2004|ALL] [S|MISRA2004RULEFILE|^"$(CONFIGDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [I|PID|16] -" 2 -"[V|VERSION|1] [S|LANG|CPP] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\..\..\..\Source\portable\Renesas\RX600^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\.^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\.\Renesas-Files^"|^"$(PROJDIR)\..\..\Common\ethernet\FreeTCPIP^"|^"$(PROJDIR)\webserver^"|^"$(PROJDIR)\Renesas-Files\mcu\rx63n^"] [S|DEFINE|INCLUDE_HIGH_FREQUENCY_TIMER_TEST] [S|CHANGE_MESSAGE|INFORMATION|] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|MAX] [B|SIZE|1] [B|MAP|1] [S|MAPPATH|^"$(CONFIGDIR)\$(PROJECTNAME).bls^"] [I|INLINE|100] [I|LOOP|2] [B|MAPOPTIMIZATION|1] [S|MISRA2004|ALL] [S|MISRA2004RULEFILE|^"$(CONFIGDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [I|PID|16] -" 3 -"[V|VERSION|1] [S|MODE|BUILD/CHANGED] [S|EXISTOUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|RUNTIME|1] [B|MATH|1] [B|STDIO|1] [B|STDLIB|1] [B|STRING|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|SIZE|1] [I|INLINE|100] [I|LOOP|2] [S|CPU|RX600] [S|BASE|00000000=NONE] -" 1 -"[V|VERSION|6] [S|PRELINK|SKIP] [S|FORM|STYPE] [S|BYTE_COUNT_VALUE|FF] [B|DEBUG|1] [S|ROM|(D,R)|(D_1,R_1)|(D_2,R_2)] [S|CRC|NONE|DEFAULT|00000000] [B|LIST|1] [S|LIST|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|SHOW|METHODALL|SYMBOL|REFERENCE|XREFERENCE] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [B|MAP|1] [S|MAPPATH|^"$(CONFIGDIR)\$(PROJECTNAME).bls^"] [I|SPACE|^"FF^"] [B|MAPOPTIMIZATION|1] [B|OPTIMIZE|0] [S|START|B_RX_DESC,B_TX_DESC,B_ETHERNET_BUFFERS,SI,SU,B_1,R_1,B_2,R_2,B,R(00)|C_1,C_2,C,C$*,L*,D*,P,W*(0FFF80000)|FIXEDVECT(0FFFFFF90)] [S|MEMORY|HIGH] -" 5 -[EXCLUDED_FILES_Debug-with-optimisation] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" -[LINKAGE_ORDER_Debug-with-optimisation] -[GENERAL_DATA_CONFIGURATION_Debug-with-optimisation] -[GENERAL_DATA_CONFIGURATION_SESSION_Blinky_SessionRX600_E1_E20_SYSTEM] -[SESSION_DATA_CONFIGURATION_SESSION_Blinky_SessionRX600_E1_E20_SYSTEM] -"MEMORY_MAPPING_OPTIONS" "Unknown Options" -[GENERAL_DATA_CONFIGURATION_SESSION_Debug_SessionRX600_E1_E20_SYSTEM] -[SESSION_DATA_CONFIGURATION_SESSION_Debug_SessionRX600_E1_E20_SYSTEM] -"MEMORY_MAPPING_OPTIONS" "Unknown Options" -[GENERAL_DATA_CONFIGURATION_SESSION_Debug-with-optimisation_SessionRX600_E1_E20_SYSTEM] -[SESSION_DATA_CONFIGURATION_SESSION_Debug-with-optimisation_SessionRX600_E1_E20_SYSTEM] -"MEMORY_MAPPING_OPTIONS" "Unknown Options" -[EXT_DEBUGGER_INFO] -0 "" "" "" "" -[END] diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.nav b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/RTOSDemo.nav deleted file mode 100644 index 982770bf64bd54a8f48ad707128f39cfa3d6d5f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 337737 zcmcG12b^42bvLoP)w|r+*q9mHn0fEbY#EI0X{&wK?96y(c2_cl@oIM@E!yVUSy?i@ z1qcKPB|vDQlLSaYC-fSU5JCz`NCF`pLJ|lekVg3a=iGazyt`-KbH4A>&+$yVg{SpB5 zg;MMb(&s&m#zehd$v4JpRF)gHn#G`+2fDa?rk?4=mV#K6Tk-5M&fP%}%I!n34@rvA z_ewSP5$QY1z>1pfz?V93aCQk_fWe z#gMWpZbqYS3!-4w=|Zj^`?zFQIB2Gjtre=%s)VNMt_D@w*~n&Ug~st}rZRD*7Waf8 zXbZQ(FG|8TQzQIc>Fd@;zECPpK36mUg&=c$r#AWliGDLR(chH5Zfg|oMQzP*m360< z^kIp93pb>XN}o4VJ9_VcueI3crLQ|kFI0+RZMUSHf>g^hwOtZqTVpa)%ubD`G~o3? z`!QhLFPbW40k(s~Nw~RsSdwu$BPwOTR6izRwlpTQe#tZeOUPDyK2r^JcKL7~nf~wV#&iBQ&U2r%E|zfPfi4 zU${g14hAz-zh1aq0_q47zb^qgtLS<)5j!SRKOl#uR!a)Yn5A z@q{3U%NdbFr!~1x!t7L-scNlU-7A51Flc=%QE@jmk9Up$TL$vRVg$I^@-D($F0HfUK| zao(SPwg&uEP+0(q7_09!t;lMl2Tz}GXNtx0OeR|_pj)XP_e=L^ZXd@_Xx{y`8{mAo zRBvQy&RD|-nkrhb!+=$)KA4?SNFKQ>5}Z^paQrNz%AR_@23Lax+6ypjGF5043#H@r ziIT*1AAo2*=%Mm{E>ka8>k^XGtrajC$dkfGgP)c(AS2W!z^^fr@#|%YE6Jw`OQT*^ zMliD_%UlOeFV3C6zce-3sAp;?8nr^bW-87{!M)D|dl_4+XW;jme{W${i?@I~*hP(d z8WX1f{Xme{eg#oVQZ4I1-xGvx%GPp!AXWPP*;)m2hFmdIEi_oQM`^9Bu3{4g#^2Q+ zZ?+l*J~qawt2wSAHw7Wv88THY-X$S+6QWeED@JB?uo&&?z`)E5K^AHoP-JD(fm(gR z=3J(f_(RDs^ws&wps(&9NniKoa_AtA`?WeIglLs-(gn8WsGD;+fBcQo*UNHw)0#I> zzEB-6YD(+tezh*-IkIXUF%7krhC39rSdW>BxwSCdr67vYSL->Z7;6Za!#F2#F%(EO!FQZXp+Kq&zT-Y90gZ-=;Yt{c*}1D>Fps2q z_lLof1WUHUU@3y7*1}-J1RHLL!A1x+vK|H-CD`bNFxVKu#vYJh+}7$9)z%Wz_e!{Z zR7ZhB4M1aa5>rc2k<*KzNN&K6Gj%R1a{8=4#TC0Uux&)^_h-`AO^7^wS^Bs= zS5kxM+a$zpgQy?(Gl^$Kfn^iVjsnXio)ZO@PyAFASRwJ;D6sLw^CXzIh0}P4gwVD? zw*gx?FNgxmIxm!9TAthZB?+PBp<97G_r+0QS@$IpOw02c@01W)9=aXK^Ij1Jmi2xv z3M}WnG72p3y-I>5puw3$WQDFJx>!ZM?lW&kr_kGS80$%l@KeJ z^Rtm)*_TFwu92f|>}{O%?NvQ+}bCH!(|#V2>ui=3zcxO}s|Zryu9MHX6=-T{N8cdI@)(((go} zS}GI~)I?aQI)zF zwuzKmmGqbv=a&#%FY4w-0m_mjLVLeds3W#tJCQJfLW^|(=$Lq87|?xlMA6<`B;XaQ zR28iHD-&qt#ZIqaf|HgK*DDgW5l}7U3jQ<#?G!yX?ZNbI=YksuTACrH2rHugWJD8i zw4~{NPLb3KrF_3A<1R~-?&pwnaiYPU*TlV(k`eZ+5;2xi15wl}>J#&lpu?J~T!$Bt(otc<8edpKjwm>7A3DR0 ztY1ghj(sJwQ)1zDIS8LAq6aKx>g4!L#eav^=xY4Lra||Y_8pT{Dn;4~^2-=PsIJsA z#~%kI1%542x+Fx`?LcZ~56Ob-VM@WLO6YBlVx@9!eoU^H6fv|>gtXb zh<#gf#iSB(QX=XpFjsX_-E10IM%~wyz*V<4E3ws0f;6vJGr0mRlkLxs7Vpb) zRbyytV}4Vvn)`EU;v!`lpcW)y|d3@X?UswRlS-b9+<%@UeZx06T zxG7)EnIXmcxH*rB+}9;9ZK1D;zZm%0`NqJ{?q3f4?ERJWc@wh2{#yFDg;T~pD1F{h za2gZ-@rhWRdPwSzEyHdH1Z#>|{2B?dqu^>L*GiD>fH0HmB*YeUeSXQ*ajPxu;Li1Qtl>w`t1>fzFwY4H}tUXnri z1WHb4JhgyF46u3}q&G%` zYajaY+QuTf&wyt7HW+P;X9htFy$RWeza@EZSE1D1TfQL#rM8xD3_+=#|Erk*yC6Co( zvNbb(M6=b(aiEp5?|6O6@!G;YQ+^eT)XBnRxq7Og$tiH#H$~qM@={r^%Mr1gDw%bP z1>Faz3VUz@W1*8SXd(A>kTk_Qm63$+?%>9e4w#i-U3MHxHZwL$>@KAKHYRqNH23Sdb0C1x6um;#mrtv~ff3r%zWxSZFO?*pIZ99K%|ziGIanf^8HyD**o9q>3RhtqKQn2!zY3-MYWk+}O2Skzt0eg7 zm}+W$+%;awpf=R%2pm++?uwas#;oGLIax-8U=@k(u`v9P?*HgO6o zqj&!}B1P4DxyGld{Nvq%SA*8uHIBm!9DPHIvuQlm`e_%odXTn^)pJim@;ie@JbJdd zd_M=9c+J-d`x&&AOcJOBTV&Sjo;wKAvAB!mySvDahi=;;<*4_}9#k@tZ zi)5hF<8I7EhAq@SLiL7uO;p@MUd|C$jy#w;YPGW?=bE#tsKovxtq=L=C&j++dzh*M z6eH=Yty?GRoTo*JwlyF1Woxm>?S zf*tI@XbTYGdp}pZNvm(2^xQEqgUU9A^L$XyDF9tk023T08#wD?`EP^ALGCRv05GkNT~ z!WxB14AWnbsICf7)yjy7`((y)={F>zAw`5UjubhsadLK}=$CM47=e&Nt@hi|DCQNI)f;LY=*$KO@0W zJ0>d_`hHIWZ1Qtc{~!%bdwe=^h&e#9j2#2VgmkPr*pG9~+$aR+nO-&omoy=G3%AKH zWWOybzXKmt+j*fbyhXp64s-sx#9$Y`q7o(W+fNj3RaM=}!QVqD96&+H3Hb=sT@r3L z;W+cZdU8B*V-(nA;-+v|9o!xf1vZ&@WEjlBvFC9o76mrx+#C*rZcaQ3Y|^Z2F4tD%^N?_Jt97meReZ=OgyCod=GK{O{Px*T! z7*`JT{5Yv!o~jfQ$0GuriHJbgj|lYcjtESihzLv-BLasfqXCPFk_6--g6!y5?@2gO zP>w61*mathlXy%dm~(q1nETjBFz=2?u;iVQV5z$#Sg+MwFAB;_MnNT0QBbMjD5&9) zD5#OqD5%k~D5$ZtgzD6c+6;Q1y%LQ32uyl#*$eJgsQ=+WoZ7WP_IKiJBwRLeE)p)6 zScrtnC!QDyS4fE$_3wfeiW4Z(-Ml?c-8lFI5>)vt*?xLtDf`|uZn=HgWu0b!GYhaLvh&h zLup?V0SEn@*G9lWKj-yPaNzg4P#iWJ3%>h?2sr5H{z3#C^mE@71qXg_48>uav*3Gg zj(~%H-diHzpr7})C^+zYtAyi;quJ;7{lqnqfH(?$RU}~DPh1@eq^)z`cZMPXaTfa8 zNWi-9To($Y-FV-3Z-@k}`tJ3SfOX$}xCG>}zgkCnJT9=9%t?7J@VWzZU^WqTN4;0wj*VF9D60 zRiS@197b~A69ERPzZM4L;=1n*he4?O{s=Ji!0!u#d1Pbn1K}_T^*$5<25uh=gC$95 z^26aU2u*$@0u0=KJq(s2p{b9C!yq*E@dz+*`&bxkn1l|0A{+*x!=H)(1Gi6x!A3~v z$fv_$5IXYN2rzK_Oc-pGgpPhL90sAIzYzfjZl4c>jgio?FNDJ&bnLexz`*S{B^Xai z(Hozn9J7;&ax|P%iH39UiH7s419A1qDu-z^i5En|WfL!yaNHR(zw)%7_!$YtW&w=D zz8U95k#Je(#S+elb#R8!cU~gFj93mMXWXBSgv+`wm2gI^OJd!ZNiZXp!_pb=<&kh% z?-dfxi1kRU_j3|ViREOt<9;Gji-ybAqv3K>(Qx@`3CDqJbs!wk2b}hPN>pU_si8=Y zXy7pSbE6`&&y$eGj*4YwCK@h#G7QH-5;t=y8ZLWp7>W|YtKK21O zKIgL&-}A*&$y6d1zfl5Ru0X@U+#q3g0E0BAdMtjG1lfbraE(s>S|?-AI;D99aK$Mk zX{^rGXV=ajZ?@@2X?CgkLe1JDxxtXEU(_VE_UzpGiG{Q0W@g*X*5qvK{8Kftl_=Md zr-&=9g_YJq`x4}u93_k78YAxliOVfEXP2i|tIf5Q_10W-?LkS>fj+W)b8+_4QzYzB z8#}e!URZpxL~t-j&}=s^N#J9BU{mB;v;BZXaj1`?w!XI7T%LcDgudROjX!ehtyXiH zJvlMEJipldnkKb;d2Nu?2b#>R=$;*!t~PhBIlsQxY@sf+n@^Key|PapoVdQ!9B-{G z`L*gtC0RFhX%?26EvlmQGe6s0T3PPuYSM45GVY}#TF3QK@1E?{UxL8CG=a+(mfL4> zDQK zfDFPCP)3u1`T`BMx{bpG?#+i~Z5Aco2Q<8gwaGBHN_q`pk!ae;!Kcaja9>kmy^l2NO{86skcSAV?yBwj zbXh|0Wi;Oi%?jKr0rwM-%f)x(;EaQ*)>gT;`(@lqQOHc1%vLKmdkY@0m>l;m6Y@jx z8A*xjS{3Wa^JaRE406Nb|VAg`5h zT06z=Ul}dGFYyZir}u>cxuN2M-CYrZ(>o=gE{b9}^{_~==^sla*4*>~ z$ju?#6l{7^2#j04H@zhUrVl`Fiv*kA8UoV?ATNsqoBoLqm_7ixJp`r?KwcgRHoYSR zrVl{wi3FS89Rkw_AoohJ?S8G?I6b?3wxCDVyD+uuo89do#N5i_%Cfmz#)51m$ns)N zVzHCHuQsu2TW*^ye~ZcG8nm!7Z=Oo9Fs#ek;_TWva|l3ytj^9g&A9^$ve}=>*Z)zn z$mMu;3^z8!7U$w-&UnVMiN>tOjULvcV>qOG7K7H}S#3Ov(QaUHAZ2Q@ zKq}p*VHT@hUD#UO6y0J*0&#YTIGJmoEKWN#W-V@fWw8MSM?8v!O!W?}k9Fj2A4Al2 zK3O^*Q<9K-dyvJ#c-N5F||elxTdLD0930yUg4oPSe%$7rU&H4CD0b) zG%=(A+uZcUJV7?)Nbj+=4I%$252A^9~Y#Fm1kC z(;8Y3=HQx+&ic$8T;gCFj|E{4ox@$$XXfA$2eUf2Aj~0YnvV6EIV6dL@skB%4k^=P zSf80gia3~q$`*ut>5wl?rLw$5zI4q&YU?Y}yF_oU?6MF!^kZg#v%V7j7}1*( z%@$%C5Ok5HF@*=6v_TFjM89xFs-eIslkDfzQ`u(hHYHYYTf>aokio zD<-nFh~vO`u2rk^MEpbx@BTWrxUkm7XjjDvC%-r_i4o5B4L?3CQr)9Ty`!~%mlqHLvKLA zk+RtHBpHX6W*3HEzBkYF5jE0_S0I$WH_ z!PAZ^Z<9#&5J|UH7#CS8Uq?8^lfhUiuCAw`dveRTPo?$|Nx%^z?A%4sQRtT>{8fbK zYZv%oy}p8*mSJhf1@GN8=*W48Bu0YoPS%dSFwUpAL@UT$*l> zAKvCDGWRc^9>~5oHvBk^v@Z4K8lsSuGVXgeG4?l0tdEiAih%D9?)cA45G)Z)fydv} zB^VeYGk7?&fUSks50ufNz@TU--XKvNCarK=fRbSfVH&jM?W-AH9toiN^dPbMu!oERsvhJ7IjBS)ydAktl-!xgt z{nKqiq>KW6`K}J==QMLR8<#ctamfZzkd$^=f&Nu2;sP*kb3M*#kl1E&Pt{ zXCxiA(Ptd-f14Cj+ra?ZHu#%Ri1XK>5cjV_AUIC`i=hzbmqH=#FNZ?BcS?}$s?gQk zpGXL0w|wU95w_T}wi5pu3UR(CK~(MK!+2i}$2fl)j&Z*mj`98_1Vis${&_gY z`C2%}{inegJ{$B738QKs?ah556yp4r1W{Jzy}NIPW1Me?W87~@n2yHo7egW5mqH=Q zFNZ=>zaI)2{=-nn$RCA5M*lVxGWPcpMEhV8uKdk#jPu(PW+(UeHSlo~{}2J>{9^== z`Azx38IyuCtN=mj&VLD zVYI@PDfd@GA>OZsLXy803Q4^u6f*qYP{_#pLLsB?4~2|7P`R<^v?!OHB>V0p}*W|wr`kMN_^mWT}d*$5Xw>PV~r*)kne_s1*>GS3i z?uU)(by_|cc{oT*NW^L~SZYz6f);*eC&F6yZ7*YCRl)9QL9?@>ncK>Z90it40N4V6 zMHO+R;;FkN7F!81Q#B!IivvW|k%rcJJj4P(#7vb$WF!$gae-)qUh0U=$4#8r+CbV{ z$>dICj$?!D9$aubGJKQfW-WDhAac=v_2=K5~ScxUh~Qa7wT6M zaIKv$jAy2bcqxr;^wT#Mn%yId`SuF*q}w2$thrh@+7Tj4h^G%g6v1TT-h@V2r38;6 zm`vR3N{Fqi^YpmSUHUskSo(~xjlLIa1+)8S0l=Vw_xtXY7~nfRUocxA7X49d;MVb` zA1(dNBc{glRxT!AX?nZ$1Otd{oKAou`-Dfhs~t5zJ9 zo|mw@8H*Svvpg-ql>ADyoS(`W`S(fSz06Zb5OG(liI7=}DquG}W+HAD@CbA4X4q;) z<|GZaP}@oTK(aW0c78bUv-|G@KYRZ%@N@D%2Yycd*TB!i|2^>Y$d3ko9{rzzpT~YY z@N?#2j}}66sHatx7CrG8ZTJ#?_SMttS65o?Owm7HqHA3n>Os!N>P2&SA(tiJZo==Y zgQV<~>`zG2j}m9PDi~=5hCRIyI0E^^&r*f??I(Ve=2B|lw%vLz8~X=Ivlv6m zrE&lGR415B&xc|p;?OchcqEdxIv-zt3`BJF8g zucIv|w4)WP{i^u02WmaBO=7%{7@J;(F5Wh~^E4Fo)e5xpE)u{AEztt*VPJi#!PlBq z&uH9ukRcoF?(LFhR}&i=ZqZ?~(>R$Q+YPu6xOPISFo%h%Qsy%e>P@WrsY>C$v<_B% z>tNrz6 zD22ZNNz!67#mII@Hlwf3<mF2jE8C;t~Ar<9(n~E8`C2 zEE+>8wz>v_`0F)x7{HCNxnj9i(AaNF*rSRsV{y|d&M_+HNpK`ZEarz40o4a2HE8q| z5_+FPQ}U+bTab|ZHL|NhT!LPup!%(5bm+9-srcXeXHr2me@^XWRc?KW1l2_>6=rz7 zp%kx4+GsRZPH0Mu9@M8+j z51Z8|NE=P@fTWAAC`>^Qj}|pSTO!zQ-gHQ6C9F3ccHv!VU7_1?b5d&_{P17**X2O5 zf7|h=X-*bqyTTOmw@Zkfgy6c>j+;hivDu+Pg}j+5SrFo*>QFmgk%a952>HRdh#t+U z9sk=wxEgXU@>9h^>`Z*GHl-z$3{|USX3*T)w|+_Db_gi#%VnGyZp^mMuEpmi^Z}sz z+~20q-bq|)R9q7yi23XS9?1o!Vax7_panoexSr{rgkCbG`hfDUM zvZ(R2qagKL8!AXr8C%GkMXfD$^+E+h^yKU!`th^6sMe@=s27!4TsXVjoR9sBmTOHW zcCTKXTyHloPOL1>H(NB~ZP?H6MvhUTfH#Bt-X(b-;9%VSb>RNhX7haC0Z*Dq6U)!z zcOUj}2TMFLRF|uGv9>J1_cOfru%^lCwm2VRXyDzFNr~}pMw@p?%&gO5s^s_P$e4Mj z1>MISYuzJ}cT2MOD}HoFw1zYt7{a7`(kR+zu5AiBVKOOR8wBjVpXMUn#HuG~q1Kpv zgn^WWR4SCGYIx>>)5whF1w6f#g0R9=2`}#Y<34tuCH_}3fAu=eae5V5WvOu{x3e!5-}H_q=s{v&LD$&daNL3LUzo z#>9S&u@a51YBlGU*14Hb?dr?gG9%@OK-||MT+2k1z*wQeq(?Oc!{1*3vjHFW&-4pIh65AtzMiUsV-T}Hk z3vR8Bm+@>+LG!cxzlBpTc0O8FA?p}7e|B~a{Os-?_}SYdecoK1%#53iaZ9s3l$b^j zSE+}#>TxYY?CzI7Z^C`G2c(aitM%fznHFqd zM0)%UFZ1NhwA<>mz@XMi+P4_&qd*$&iJ-@Q_{BuCF0uG*;cS?LqMnopb7;_4=dkp3 z3#Y$aJMgn}-N4W8ko0*on7c;?ef5qG`kFj8=xgeVL0^Zj9Q1YMszF~zuO9Su>>BCo z&hBX3xm4*3sQZ0=&%Q3Ge@^|DAaZD}xrFBy`lc*;m{%iwMzI3GeOfgOd%ePz@cNn{ z=3a?(uO>zCmb048oY<1FPXW7|M~|0S?xJ%Y2+wlYd4on--4*J9LZSD(Q3CB|5N$$G zH~a_*rX&&!%x;oUSJm(kAOIC?K~SI?|C>aZwN^uv+JusCLlx|+g@=Mft4aa8 zW$<_B*1_N1M@ipVynDmI&)$s#KPMkC@N?>>fuDyTIq>sHY~bh7_`uI&H%p)Qs0M<3 z>MBOPPVaURwWY6K?W8R%?5)v~(M%0)0-_IeP=UBjV`a&)UI^y8XMqp*gLM$}HVJ;9 zA5N>BgoNFzuoP6KkZs+OfR`&EI-xL zin>c;wRH`*sV&Tz7^JmHuvNX6YZSIpT(;o5UotaD>obv~FlKpUecw}?!V{Xf9FP|+ zof`2rsN3i4O|==vFtK{eZTLthQH?DG01^PT6)XVQyQYZNN3iFEvZl5O09>RzfW2qx z@kZ2qj@Hy&0Wev0CH6b;%rM44#7c}GEFN2Hr)pT#-zK%pP4!IPtlzCU=2qpLQ7!)h ze)c)%SQ|T9xV3;cHaoYtVGH_Q62(!XD3mOM4@v}w6ah|gA*&0))m)|+i@!obA7nJ* z;yvIuOW+#`tZtxF2L)*}9gPS3Qnb9oNx+#{yr`+IuIdV+Hqq{CgI;e3EwZrkG)bUw z&@$KIeiBUJOIZ7UM1r%ex)N$rHO_m>e^erP1oJOoP(`meQ9wC1D$%4Sw@S2=$W?SY z{#;4Mwt5bSl5!{BuL0Hzy9~(Hi^iiH1CZ+UYZ8Z@Bm&Ro(l*J5LqU_Z&WTP-)Lz30 zAPQ@JOyai7088a^#rV%+$3?5uCMbMO4&E4m8x7w(5Kuc+de1<>RQ31=B)}HVihi`z zoUd&!;Qq?aWEv4yyvkT85#W<2qS;QM23IR!Y zjzqAX&s$;!W4gpMK|?CbsAHM9ah@K%QKmN?iDjA1l%SrF9J+M&JWoNVx6s$bT?0Qm8R;|ec1H(&^~MH$O{NEZO+9AN*Wud-eI0r1ps%BM4Ej2D=b*2d z?4YmNob>g&b_;iVbwUORAE>YfqQnJEwPKG#H$~n5)%e}lV_hu}(kddBlBkB5ic{7L zs>7gwcqgV3i_b}vj~q;i_z3ny^0D|?iNS$h2E5S}GkIxN;jXl>9sXsB|K&_WrH^ly zFp4jSo7C1{Cm0_yIVzSe*E8RZXpBxXk~rnuNlftaYUzPJELu)sUyqiau{$L~Wh+$^ zl(S+v33~#wgX0NcXc+yj0W;<7E<58LJ0sn8#l!k@Rrq!vV4Qn&>qck%|o@oiRHAn82g|^a&6ZxCQAk9H;`A0jc6n$K0>0qY6Ch$bd5yR zQ}&K9go$Hsmk4^wuJ3;Q6$xtUQ|$z55*_{MG`!e*B^uQ?u`l$(HTKIAwnuklT-Pas z3_Dw~_#TPiSl2=w0tB04@k0`Y>T}fG&P-c%f0d8@wnU}n;3`B4RjbJ^cORdTD0HzE z1;!OrsgFolZPp%ar!{;+qEVf*DhF11eih^UZ%E)x*x|40>9`f!+1p+_-wC1O?A@m{ z&n7WRmfC7BLVjT=;w=A2QXhYge+%56PfIU&DmI^pS zgv(g4E773yf@nfo4~zS5P^clD)cv%i?v;S?RyZyuD`avLIMSEFI+;!%{+6csu07&{ zhIK}|Ns%|vKPvIxPy9{HhAsD53A$|xR>0A&muSFG1s56s6i?vbn^|^R8}?hL@^o?i z?`sBDWa8))ZuJ>WxK1jG-JsHO-hDwtWL*F zV!CsEVYM-P8o7wE_?s>hK)X92S#h*&Wam|8;-uVUATiaKL+HpO?y^RIJkL65RGo4`mgY8D{Z97w7L4tOT1u^Mw**o$Y1gt`%@?ZoOE|7>y!W$jp!eq%SJs-b z_$wvvUrxF+pZtWxXcswv8KEBiNaDoBBTiVql_XY&SRC!M!Vrkfu>+R1VOznP#>dTCV-BgyycM!&I-G zD<|rvQ?=N4^=9_yx@%bdW{ao(P!hpShehC#6PzG9{&bBTU=x+NRx07e8#;e=Uo;B3 zxUo>8BZsxK62(;=CzWuqDapZcpep7g7_PpliL63jX%UqQh`yrxto^k_bA?5Njrwu_ zWTEzTiR9`o39fV=XYKT1?n3RW;Z!)>#3{xT^?C(sA%t&h<}86_>uzPGr8EqO!~(NZ zV}W;d6vN2%T&;+OI?{{M6>n;?_96+tj~nXB@^WK#uDx)f8GBIof!6S0sy@|+LjFpr zx$ZR#n{#a%ME+H3{Hi-DmrAvJq;B^{=GAKA5v#`H!t!|}W8ac!j`q;3FXN@KxrH+eFvIUi z1l!49G@y-22IbLxezrZk*u+rwEXkbg_|6psT+3+#=gX39c}T<71vVD_8rBadB>4(h zpWyuOOtmtutJ21UDUya6=vR(QIPQzOxanaN{k1qACgac@vlGaCK_<{-2J@wf`z2d) zYY)KlC}P=Je#j*5nnc2e4oE4~DlG}my?X#p$v>+Pgyn5pi2!2%@Y#rSE}PhPEo2^{Wy0r1a}gPT2TWXTISyt**ExU`0Iu^#3_G$pchDWk`zcw;KM!O z)mHP&!bO7LCBb`nw^thXug}iMUL~o_6M0`%!Uv^F$ODOA>D1O2NLJ*0;_-2b{Hk8^rP(ki3}JR4tbK0p)lSp3hW**N#%SY}|L zU!GrBJ{x%4VLCaNM9(LG;vpN`i8YS5OR*cSnF> zggha^STIMBDE38x#+!9jwc0GNWE2#S92{>@r$<&#NCaFF6#-f(4k7%4R1w)s-8j~- zO1J~m@0o4$8NZY-&%9P@^4zjoxWEs$^TpzykQyL&GS$M#Nx!~Rs*gOcY&9<~(e*Fa zNbO)7D_1X@y??9stCN=ZJb_Mo{!xxDa_p; z_;f?1yCrY3{TWI@%VQFZ=dUE#jMlNwYN*xDdH&i9RRic(B|P^Fgl{#MRuHRgN~P)) zeyxeZKUIQt3ePz;m?@O*k{r@0JUcfp!Fc8j4QYac0Pw;JLYBWbu))HhJmq}4RPDLG zAiGZ#xg%U}o$bU)UnB{=0uvhChg-zC2-?=5ZU8TAO`|h-mb4#K11S2{^{Ny@_32mA;9<+h7w%^cv3Nan#8mZUDxQROK2(--DAX^ zi8=>FP-%ck>Ey6R@SiMlZ8t1~Wr-N&cLvt=A!QHOGFhfuUH z`v#38>lg2#dtxS=YiqM-n`<+(2)`|#o!59v<((Q|zqHyk7iAm)xUXD?)-P6@bL*`& zY}Mqj5YMfwFSkvVw9rt2tc82-O6yCfo2~L0`s-R*QsJr&zSf?dJ3p~-_S_8iURsm0 zt@B1DOYi-PsDc$tYoUD!!j4P)w@hR2DE7(Ql*O!T9(L1bgm@G9?I-r)j2ao%g6(Bk zwwA+$6-W82e}v3}4S{m4IOoqo zaW3K9KM%#>xXPsOeNDpc#S?N(YdR--?KI{k4cl&u>e}{T)4VBRRd` z9|?b5GQkFD z$G;$sMoRUMB_&i3#K3C)l>a9ZPWj&l!{b=}R|<*!lIS4PIS>`;9*m0g z4n;*K4@X6&jzmQcAB~7CCXPu+HIk4${pvl5|B}q!2Xp>gf+;U*Zcbv0B()#sY>kF< zw?)Hw+oR!6&PM`*<6JnPfe1M2gDyqEf!{?5rz#s?mPmq~#4Dm8scT8RG7^$_{#-bc zLNmVOyebNkq&q(!2}wL(9gd{Hi|@FviGn2Q?&~5UiRWu2WXI#G=nqD~k?1E!!9nno zLUCMZ_bCx@kn27z3J#t0Q$ukc8QXh$1RUgg&y0ctzh{Kvk|a0ztOz*BO+F_I4*Z@S zic68))K5jgL2l}KQE=e*+)&&w$sK-v1RUfJzaR<@{C+wVH$rkpUKjxfxg#%%f&;&w z3B`?)+|d_Dz(MZl&ql$4-%CPqVZ{>B)dN;;X0BzPM-0e5Dl318WON0*(1r`eG*Pf z#@#`*T1;fFi3rSI8xfehE+Q~LBmq?@o$n|jC7nd(cw}gHA{@%m6UWKi6B(MVO3;oy z71PZ15rNr z6v%OrROXh5!0fG|z+uvHIP<88!0c@ifw@OV1m+W=z!B1MBr_5bm>mrTjuOYw%wr+~ zv$ux=$B5%t=FW(~>|GIoxlBZ0J}UuLA4KU8jeG)oS>?oENNdYpsKd~2NKn;VFjxG~ zPyD3>?C^B7c;~O8Kv}%=*AlcN-oaJ>S>O2^38+RBU%G+DPw9cC!KIEX`A3u{e&QgF?jYO~TX4qo7FlMEhB#Dj@v@#J9Z z(vqacp$)*XA853t$u5P)%Zf-zZAv^3E7a6-i={VPtdBXUZ|QqvLwM|mk`hNR)S64P ztLIi)%^aTy&Mqv^wl2jMHNh9~voBRlS zcPA?nWFJFJ)=sV2o{*4AziM-BeW_{gs`A3p2=6YO>7wN_PFsnPw{%|GI`- zSJ-Tt$=8od`C!{F;$2X@=Vt6|Wvm^#NH593anvu+8=|#^2b<;yt5t@hDrYRS2#RGK z3YkN;R};Bjr=_wS3KG;{qFD*Or-QEG^|;sv_2IwQ0^i?uIyfyq_5lgnRe&VJoJbst zy;E>UL5A&C_F6ecGug*xPsLlvvArx>guh zzed9CQq0g3G~2PSNj}pesUWfE>A}qsc|fru5WT-km;Zea+oH5HYGJj3RE6Q{m6X_O z19hQ>`8y=$J&M%vSTEJaztZNn6uF|Sw8k3tvl4r)P<{4%z++F4e0<<-Z&w&wX;xPXs~AW6fyQUoN{o;7<2z-Dy9vnWhX zCMDd#i!{A!<<8A6pKVt7Txjfz+Thk5-7sPhY^wKh-6dHxyA_R|6Ms))jT%C%RcF7X z+ls|ZYs)Aj`L&W{&5|d4ok}FJWRzj~DM|iLrDcr{nLR}+3aTX)g+PYkk41*Lq4D)) zKDn|67d;H49RC8o`|Hq!m4*2sbq5-5wu{kU<8)gW&V)Sdb@*Q&`iMgFVGF-p^s@^8 zE(w2?!mpmY)L2?rXgol3)kZ=QeH>*ZA!|V)8xlE+=uHyQv92WC2r;{Kdahz{?>>D}fHOPK7Zr8$Tt z`PLz*=ebaCWtCPSae7&OLv8_0*vMUetO*^y-;nljSCjT^!_lt!xoGeQHT;qUce>mI zS{eJ^ii;Vv7g*76N#;Ja#xE8Pt&hSYr`OLk@S7-N=*rjU+C%)XJ^ka&^c8H`v$$~q ze+0?R$|bAqmj0yvj_+|gctf_KD|!1W`vV(@Y_G(iIu@hN){rEbG{j_Z2`5dO5ZA#6 z_2_;eUAqdcN(%W}A+{>n02OC_RkQ#Vn~c#dH2rN2YqmJ8eK#z#YDTBm*BZ@MYo*m# zSZk?f^dwF33Xt_#>6TulR9D}q;Ax`DWCM4tOs(O_4P7%vI>%qAE6N*!OdexQ&0d>3 zcODD$m~tWhbn6h#;H|ZlBe`ky_&2^)GmQuRcMUFWoIBrWqr-$px_?o+JXsg$X+d2M zqe2oI7e~^c&Mcskti$$h042I^pz}_ohUJDEdx+Q8abEMn!W#JxcI#57B&x@F zQ3vn82Z*y0and+%d5zzVA6i3Xt37mH`d|`GmUf8bc zq1AgFQQZ&W*K}7z_`4*$>N!;bW>;5nyW^tjXiiFnc%%Z)on1Jir)fi-e~D3da`Vvg z>{2sMv-S;}iXP+?(U~>a6E5zhG$TnaSo3<71tDFhrj$LcWmyz=QeW7Sw1VhmOm)g# zMQ=4DVh2Vo|7Pw%;}lz_LfDK=wWVRRLy7u8S9&+vmD}ojccx(|al#s&#W8&ok@IMH(_ml|Gil!;^U2-p7N7yYA$*kIe>} zy-4DEWiQvcj=4yauS-TA?a-hx=jhf4P>O3$nSDTK?i11=;COYCd%95Rz<+R!4L_PeE7b;AxKIz+mfZ`pCYL`d-uz zYRHz+M|6GA9EeYkd8(zPM0=U|4# z226*D6_ypt2-zb^^n|Sj8sJteesIqC}&n z5M7#cvx{exTF;V5Zs=8uB+ag4cF;V#f^BWIDz4Y28Cg1-dQCp%mr=&2N_-o6Y_)a4 z$8?B{e(TWc1+-V#oNjfF--C-pHZ-r9i*CrQ6LhC$AK>_IUA7P7XP?9F&|Q_y@dEGG zqaO1ncn;GcY@T9W+o$PwG~bW>Z~0bQs33C|-!K0!_~urYR$)JA>@T+`XWQpCuKC3NS_hTYo<%^S)Xwq3R5@0^bP+nn0f)Gbh$oNtp6)blL4j_ zd*6_$nfq^KQx4mcgVqAvKBrauP5kUL=IwG#t>EIm=KP>~YU)4rzyAxaLM?r+*45&g zl69@E;}-V$S-t}%P;}a@BSTt6SHoFl}GJ@4E~x~p0Cl(G2O|M3Tv#d@jvIAt29j}p}0N{FZj?^@i5x@MgE-SOpMOz(h_YJ z>&7WrdK2Ih$M$Le>of^gq5jUWOL70W33Z%>x%&KYn=XrCm^;^;JCAwdG!m}ZJ}3`2 z3{_iJw8hIoK4!|=KShLTm|^we_`;bLln^ru#psi|Vpy|JR5LbipF-Tw_3c6RW@`y~ zPkgZ!f#TaGKMillitI7aRuft^YqoQ1ke^xU720SPIasPdS8b>Q{y-|=q{U_RQXUa$ z+Luw5zR0iq-K-Z3t7^;LtRJYz)W~#A`5QfxIvi|ZbAlM2f~{k2riBRX{dRLnLsf0f zW@-hltV77=Swlu1wiZ4v34dfjxY}t$>xii~g92Q{-{Suxx$fx!2Amp#$x?6X7iuZj z3xAp0v07gBOh_SQZiaS_l&NkVx=1(@O+T@M3an=8D|lc+3y42g(#*uIJJf3K+q!^> zZwbo|B}~r$0dOHKcV+uS(Qw1pE^p`XIvJdwY7y0@| z?ty41P`w+aI;aT%wP9|5JgNr261x(`&iY#JMNILR5Sym2aWmzy+N5dp+LE@yYux>F zqtp>h)%EM4T=&#*7h^B}dzjVbk84we2%!1eApX9@-^|BNBSrX!%{y>3y!rmeJM1BM>^)U=Xs*VSj`&%rKhFf!pjoo1xMqqwu%mpr z)KT6Qh4rA>^C{iASzU0jb1SYqU{oI1TfS7QYW0@EsZtNaL7gQ%TSZmzbNJoo+~627 z*_>ZkUy7vT_az<20_N=JIY`Zzq~=V3CDv(kxT{i)zucT#f%QSBd*IgnhQ6^a*N|GJYM#9QX8q>?X7uI)R|bEmP7}e z3wK$WIkH-DZi11onoCekN)>6_ZNAH>hTZX(!2cCta4En_gPXm9+Vhq|J?16+xJ(Z~@_d8qd$F2{OHVPX4l%{nu#b$I2J5s2we7pQKBpJWbQAoBT9~zYU&o2LWNnrltb2ERO~xHBPrzrI zt!C|kg*Ii{#^0sISffC2_||6tmfHv+P zc|@Qj%*sVTUQL2^R+&i`DZq<;`UJ;UCYP$RS!r2H1Sh(9FM$~ioamZ7OUuB)p=fHE z^2Q92bxr8`mrB(l@`G5}H4)}U7W-?gi) zG_$&DV+2xrYeJ?Pv%!jw_dri`JhNx$!&Vq&6XLiTCls1kneiPVR5L%fJORqzkpH9MLaVzvDsUX-q^me24Awm>u|zX98~FG@$rxx}UIir;mXLr>C55oj2xWAJQR1692|vV>AOD zyK)Vwtqsn+73$4e{H2bJ=YjV6c2=1tY*f4q699ek%H+P2hz8 z6%)K2frJ7YlysHqurZl578|v{ZpbmRS)?Z=4OEh3hm_yq3Cg8o%49=J?l9LyMZAGj zv@_~VOtLEMgbYrko8=^aV||0-(E1$rL#X8ZQ{9n|*zg9u(wn4SX=ETvimGhPkj_(5 znXNd+OMut~Q)i$I;9Fgnru zGbA$p0tw$=2ChAd;ti5YrQV^%2wGo7gGJg8JfWZ1MEG3&sgtxvAMyGUpL)1?NI%yU z{}oA&wm(tzrfaJ#cH>@3uO}N&?XdiFr*1pU0&lGF6OD)w(PJwCRgp!48iWv^a(at; z+xUwm##bp6mljEc!&*PK^eKr*rQ;UTCbx@HEX8cJV zH+l1f4!>EtsuUcOhu&>rbpdB-xPhW}zh2iNi{^^18IeoeYsdQ}JNiA9hF%Y%`oenC zUogMWs8&;n`kwo-pMX&#;vj|*y&PpUI1(bxYFWdgzBU%00PKT@W@F>5p zO6QPR+;_FztToodgLE`8F6eh;6zyA33#lT02YoZdcYmo&(%u|@o$%UN84|NzzbPc}OD6(LEIr-*A+E zz9h*LC6VQ5A)UQiAm90W?RVX74gtJKxaH)FJLX~wfn^1|xMqhR?9b)*JBxpzp z(nqXm5=?p$oep@Ith$e(sC`|T${fF-D0|bXa9+c76Tt>=Do6Y&x_7g3tgcr2P*>c* zT@H=DW%(7l@>pH6I&5%(6SOH+L0Omb!N@}vT%Eeb*5*RHfLFB@`t1^0`?I^|WKW`U z_{(a#--$ED>C84s%;0~0#!`!y3l!Yy@`?3jQpE4n#0T-Sk610F1H_bBq8QMhXvs@I zJI5(4CS%I5N(0)`?U%08It;H;^8rQ@OSAQ8vD7u7%MycNWUlu{C~Z|ePRM35n$b_X zmx`V(jQ^6vL`?}O=ts`!F*#YG<0dQFUYAIdq1j?@wp*LK>H3|9#{YDYw*}(&Xk{#} z+JBmBedR1|$!^Rz{&b0nZWt8|p)hmj4gyto&Ai$QU8ogI=c+J9Q`jT^eJ#g|+UO2} zTBe<8;E*fKtxX)#>SKi&lD$|SW*YmKZ24@T;H3^tq(yh54}6niv8eNiHL3ec}&CqJyy zH*z>f2M*LA9Dk=IrEgz(r16_C|xF6Zdu*wLT5^lq95 z{b`L7Jr~;Xc}bedzgDKIVdD=MOGT_2=5V`JHFS^4Lo3aYa4FXPe9D7+XH`{yQde>- zzO5^HZRJdxPB5Y)SI5ri_8{&dw&+T3HK@CEAt?N0_UqW`YRK$(R~-3FUH=Gl>+9w3 z?BT4haC%6LpREgP?P}c7!fUm{tnz5A-GtyJshf>ZbXogF{vAfrPJt^){9p2J> zt?YC?<7NA?*-Y+5VCMC?py_%I-@hT-GjDr_7He(3>M@SRcF(HtgfG1Iu4%3x4(g;^ z6dq7?I(4CM?q>9{rbdR+ZFn0~K2OWEC?BspO@%g@0}>J@fzq1{jQB8e*1Ehv_+y-Cv8 zsX2=~8T58sUqW=;gP%5ZRgdl+E0dGe5c4w25g z6|Q|uwcdJvcA{K9frp8Bla>M;=Ju@kpGqyI$2R{r!l0H~!TpUEME4ltzwWOSeWjwJ zNMW-9UQokfd`xP7>HxgC{g&oJ<@Gj(Y3^^;-)I-GTPZap{`XQvzqUthnxzF+jfbS( zLod6ioIFk7`)z~$kV*pTDX(50tAFRzfR|`{S|j0YJ&LLO?)vJ58B+9Jc<~vjwyAB8 z-aCCU5m3F{eNy3idS#VjltX?TvegyYqa|Ca9jXh|e|J_1W)W?z64Vj&3pmiwAR{vC zK(@g%QM+IsJA8P{0ycZpO$GF)4blzhpH-H@UcF4QvJBk*F5qIOrEdL3;F71BI7PRx zNT+mo`<}cJHy0UL3zK1i7gayAs^5U$A86gIm0QZ@XRUW^^={DpmbJV|+U#f^saHAb zPDQJ*AJ^9Z6n^%#bZ0|u-BpdP*eA4N)(YoQHY-|>2paj?T-Neq1C4avrR2%4>B3nn zjty!>|H8vA-8;2fp9>ml#4gsrbg2r0CYVw7Ufiv^o88(Pmx82^43vO4s3jZa zMAGe}ioyG}Y^w`;v7WI8_^`jNOTmR$74-|9;YJ^o95B^WpSl}-7w=xjc{ZG5qwSI( zXj@w$xK~9|lyW--E!7OMUsn|+=E6P{g>x&bmpaEXe^Ju-bYEml{YBM}ZmhW9?0T!S z*jzr#xBE!@BcwKuoIliVrOpNab$^|r&j0_5$p6+N{|N(UpU4YharstTIJeVI-CCfZNRE@!A>Frqp+HB0ZV;>WFS-hky^<7EDXZJZo{YB4) z{@->fJri}SU6`6}`SFDt7nA!{t!0$zt?U?~k`Ej~-mO;wmX?KXpV(1qjn>GlryB85 zd3#2Ko-qn*WB$;&63b%$if|)DtkK2}(dxBjjK0w+A$5=MiKcG!n!lme8wsHvg0^D1 z2R~`P#0_9@S=J@bda7eG&7$u*|32?_FWQg4QR?Jx?;n#jQ|kqcV71{vCH@JC>)jh! zLU(n3&rxJ!Z)MFs<#pAJ-ywApez*)ew-!OflqBNf01>*08}=LNek(`C?YZJcT&bFL zDn>l7*XdTXo7%`-_VX7Tx+^%2c6OoT-xXOR|)7#MWmB1 zff$&Tx}$?&W(e+Vi^um%p@{j7BxOzH6qcTVLkO@Bb-6Irj!{}+cW?6CWJFNI7tAh1lplWOw9*uurH(87CEj=YN)^GRR z&!oz#mWciy$TPN12BADc~_>GblHxdu3ed_WEatc_` zKk!;WmEjXoMDLct)TZBJ6}}`fxm~W*frmM4lf_>t1t=$Ft}2CzlRKb2@zuxL*BD8ut;P0gJe{h3awDi1ogHB*|j{9469ZJBd z6uhbMBPKqctwTRGpwVY=F=VxgJKX2ZxU`DEEuTKSb*R16;;TyS|7zS}cBTBNnFPR5zfg?pp_|)NN||hLxU~ ztG?yH&-ZudLl?{ZV#VyDUT*h^3!S5NTVZ$5{Fb)H-=p&Mg$6#<$6G7<|FI|=RrCK< ziA?0)a!#VRmaEFkJrP`+pGDFkKSkKvFJ7g)eT!2tY_2Nc8vjuD=xpTWxQR(x{2un> zci-qd*-d-tWIB}|PLHHV(_?8Tk#?N4EY4z@K|~zksfirboT> zXfi#TN{DmBs~UWkTqbA1niN3K@zY? z0wzhoCJ7iN0jnfnmIQEYHsHu`WH~Y&*^Z1y)+6)5ehv)iz=94;=)i^!jOf6M4$SDl zjt&gzz>*G3>A;o_jOoCd4$SGmo(>G^z@iRJ>cFNBjOxIu4$SJnt_}?Az_JcZ>%g`S zjO)O<4$SMoz77oRz`_np?7+qjjO@V54$SPp&JGOiz|sy(?ZDO!jP1bM4$SSq-VO}z zz~T-}?!e{_jPAhd4$SVr?hXv^!14}E@4)sBjPJnu4$SYs{tg`Azyl6k;J^nCoZ!F< z4&30t4-OpRz!MH!;lLLToZ-M54&33uA1?gi!XGaD;ldv-{NchMF8txbA1?gi!XGaD z;i4Y9@P`Y3xbTMyf4K063xBxqhfDRDDm2$<;HXYhrKVa<)tc%xRc!dfg+E;Q!-YRw z_``)iT=>IIIIIIIII-KRo!ugFig@!-GFO_``!gJov+dKRo!ugFig@!-GFO_``!gJov+d zKRo!ugFig@!-GFO_`^f{@Zb**{_x-r5B~7r4-fwEsHdT>hWZ-rY=EQghWZ=oaHz+j zE(iYb;13V}@Zb**{_x-r5B~7r4-fwE;13V}@Zb**{_x-r5B~7r4-fwE;13V}@Zb** z{_x-r5B~7r4-fwE;13V}@Zb**{_x-r5B~7r4-fwE;13V}@Zb**{_x-r5B~7r4-fwE z;13V}@Zb**{_x-r5B~7r4-fwE;13V}@Zb**{_x-r5B~7r4-fwE;13V}@Zb**{z$?f zN%$iPea(tKa%iA68=cSA4&Kl34bKvk0kt&gg=t-M-u)>!XHWaBME;b;g2Nz zk%T{z@JABt|lJG|o{z$?fNwkk7{E>t|lJG|o{z$?fNg4xa z5TH?jh5;T2fTNLsh5{N3XfS|3lJG|o{z$?fN%$iPea(tKa%iA68=cSA4&Kl z34bKvk0kt&gg=t-M-u)>!XHWaBME;b;g2Nzk%T{z@JABt| zlJG|o{z$?fN%$iPea(tKa%iA68=cSA4&Kl34bKvk0kt&gg=t-M-u)>!5=C3 zBL#n?;Expik%B)`@J9;%NWmW|_#*{>q~MPf{E>n`Qt(F#{z$q~MPf+D8ihNWmW|_#*{>q~MPf{E>n`Qt(F#{z$ zq~MPf{E>n`Qt(F#{z$Qhyhd-ec$P>bGo{3_wDNLsw+Q=%P#d*b)5>QzVB2O?9qZfTChh8 z_GrN#E!d+4d$eGW7VOc2JzB6w3-)Ni9xd3T1$(q$j~49Ff<0QWM+^37!5%HxqXm1k zV2>8;(Ski%uty8_Xu%#W*rNq|v|x`G?9qZfTChh8_GrN#E!d+4d$eGW7VOc2JzB6w z3-)Ni9xd3T1$(q$j~49Ff<0QWM+^37!5%HxqXm1kV2>8;(Ski%uty8_Xu%#W*rNq| zv|x`G?9qZfTChh8_GrN#E!d+4d$eGW7VOc2JzB6w3-)Ni9xd3T1$(q$j~49Ff<4-> zM;rEN!yaweqYZnsVUITK(S|+RutyvAXu}?D*rN@5v|*1n?9qlj+OS6(_GrT%ZP=p? zd$eJXHtf-cJ=(BG8}?|!9&Om84STd=)fKw*rNk`bYPDT?9qWeI=)fKw z*rNk`bYPDT?9qWeI=)fKw*rNk`bYPDT?9qWeIutyj6=)xXd*rN-3bYYJ!?9qiiy0AwV_UOVMUD%@wdvsxsF6_~TJ-V<*7xw7F z9$na@3wv~7k1p)dg+02kM;G?!!X91NqYHa;-Cb3*z{*G{2keZ5a=_Bqty2!z8VTiqwUJN`*c%DufW?te4zfAyNC|SFwJAXk zvF5Ae+au0NFeu1|nu4q6Q*vAR-4Mb|9h$ zB7Ptu2qK0cq6i|6AR-AOmLQ@DBAy^33L>T;q6#9eAR-GQwjiPlBEBFZ3?jxLq6{L= zAR-MS)*zw{BHkb(4kG3tq7EYNAR-SU_8_7UBK{yE5F!R4q7WhuAtDhX79pY$A|4?k z5+Wucq7ou5AtDnZHX))DB0eD^6e30;q7))dAtDtbRw1GlB3>aP79wULq81`@lNGJ!{oahrIl!I(e3@oNGJ!{oM;s!l!I(e%nB09K{nruY)gGCKFh?PNt9K_2YK@MVOkRS(fGf0qw*cq&Vl!I(e1Pv0(K{h9j1_|XL zn-figgmRG0iK#(CImqTj)*zuAWOL$ckWdb?IZ-x9CF3gKSQO4id^i zHYZL83FRQ06Rm@Ua*)l5*?~VmImqTj?jWHYWOL$okWdb?IZ-@FC+xF00QLF^9_ zv%0V_K8VL#IAe$4DgoJXC&52AxLOICh#3v!49AtB%l#oykvN^FzNGJ!{ zoQNePl!I(e+!7p1gakQ=VM2l#a34q}<$g;EZ(IT1}rCnA)y>(b7G&6P!6&=5l~1d2icrB zC^*BEgKSPT6cWloHYX+u3FRQ06B&hsa*)l5k3vE@$mT>zA)y>(b7G~CP!6&=5mQJg z2icssDI}DGY)IprXm6G?@Ha*)lzQ=Lj_>l`GMg^W&Q6+C##LPjUP z3JGN)qZ4I?gbE>}6KjQpa*)x9xI#iX$mqmfA)y>(bfT}2P!2LWF<3~DgE%ZC$U!U? z667Er3kh-%lZAwGkkN_ELP9yn=)`9sp&Vp%qO_1u4l+8iT1Y4d8J&nNB$R`UPTUp} z%0WgadJ9_=%0Wgah6@ShAfpq>g@kgD(TV3mLOICjM0Fvd9AtE2yO2;0GCC1nNGJyx zoj5Nfl!J^;v=Awdq}$&eriF=a@QgSavz$U$rw63Rg~C&CN~E3B$R_}PDC0K%0V_K zE)5CgAe$4NhJLjsYS zh&UvWsfma~0->6SI3$zOS=zKT5?$fFa_Stt68J||#E)-q8JV6N zpV=@mIWoJjVf3uUF}hrJ36N@qcS!w2K%Q2ymL;t~Z4$M@im}Dxb5Ux`l`nbxIq0_6!_GN zUzq7p+|Q~0kMRnp_W<0p>(!3pH|e#)5o!93*m{l7ALC-o#d)gjql3b0x-h6=+v2k0 z)6q4ekxKUj_=D4r0NlEYZ5wsn(!R|d0&&o5r`J(KKYVay>D@gvlj%ED^@m}8KOW6A zIWjSMrp(>Z43G1{<2Y80zrYNRQ5=nUjO7)J6MaTJF1cM=90#f34JDRxTiWl zG!U@f6~Htey*0)%4lkpBLPn<9?G!RuWBf1=OYPvguF*PUL&4F#@u2KXsnYd*Jp z20h`iOp*Q6^bZPMf_@-MAm7Ma-^nbUbjwRXe7zI!y-WnX(<5Cx8wOh6AJE78XmxrJ zXT@5a#aualj-n?Ty`$$$NDhj!3dYPW5P;9^n*rI73fs+J3Z1Ew7<&q;crWC!WInV?#$Yt>46& zC9I;T9UdR>ho*2q&_h?5#OZ%y+k1HiRQCoTZ7v)2z0`uPxAP9E?gPlfo7U1eN_u;b zVCudAYdpIw(Q#nvfbb7jVKz7&pGs`P61`OdCllMsk!az=&QiS5Gutayfmm?!&eM}) zG8z?4K2w2Wk8{ZUdi}-_{JlOKo{wR-m9_ML4(|6GC z>7Gck$5Y@0lCMq%#{xn`#p=0&r2~Hh(h_k1`J`oHWpw~hg??>@THNvn4xkWq5DMAf zseOvun67$hh@lPv#-3&MFx2Y|E~_Tn9$Gz*It+RCD=Q~*B{JVTF^M}qsno-pBB&#P zFzQr?sJHg(lj#*~>MS_O8y2XRPYqv&dRpCo4ZVARooIkakRj17%@OO>P=9YcZ|p!)1b%x6W@HThxcSmde1 zq^t&8o2Sq8kTm)k!JySM0bPl@Dynr_Ra$LSC4F32d_{L}RiY=$>YsMouoXH!bP4JN zlu(JkE&Yas9M&fW1Xm{kyb>!@RP&kf3EFl(+b^Cv8F-ag{i6DD?@n_JBSGQSDS$t^ z|16Z&e~M~9HG#P2&MIo*Q~hJAQD9aQlZxuet;`(B9DvDR=raxHc?(Mmqj=AeR$@gL ze>XzVGe9`Ny$<{d(GDtl`aIG&*84!wr&mKs?dD8f&?fY_Q-v?eN6}M2d8R|Vh&Wkf z^oZSGGc!H6eiK=2T^L-wKL~T8$fCUnFR{s9q%=N;4I8_n7)ehCAdSwZfNSV|P`D8! zh3)4bQ$Goq;ubl6cqYtZ8TW5d_4f4!rS}2UVHI01Q>%zwp=x#gVd)OAj;vTOdk*4m z5?S>Os$JVRqHY1Pp+%!z94bezr~84@djX0(vAW|SCjgB?ujmExvBd>y$0NrKbHG0 zmbE8%1k;ZP*ufZTj($;&8BjA?Y#-+dNIw=pG>_D;Q9MRar^k4M(t9+9T3Ev3OfB_j zZ&3PCfbtS+z-!GW1bxBHl1R=+1};E90tHmsu$Bd;S<<6=ctCKyJHRWEG-WlHkUI4+ zXt2-dKLoN=7)b50iRpE-BY1;xZgg^TWC`NSOe#=R?*`bC9ZbeA%7$4#v?+q#6$o9Y zPvb7hekLv34{4HH?}FSV`;2U}j)VTd3&iwVAfnr6Ce}_bPL7_bQ|+oA90phK3|w*` z`^<#d`mP%vA6Zx!$7$=)jnmi&ZA{nnLB0|71A(~GsgALajrosmlCPFU?}RKXoJuj8 zg4(fa4t;;;YSA7h;%Vv1Z?`YuEP4lI@flvBp5j$!QwIQUAG9>N-Y&A8>3}Td9M~wk zItbZA$BJ0u%E1FIP91{cn#$=SUmfZZOdaL{OvIqWJ%Xtt0LGi>3jMK_$1{5q!&T>4&G2SFT zbu6H`k2Z`=Fh+ldZ$$M>AlB0MttLCJIfkN##7{M2rD0p8HFJrN*2f1gLY;sjp6v7$ zndk$<t`0NI}sY`?P*&aaD$pE39MMT*3jibr5#~BNFev+y& z(iB0RQujlIHAgj0^#Gzq>w>JCoI8W(r_&%_giyj1y~bB*-&&-$@CHrxt$Ix`Xf+P# zN<2YXtu3BFPXq*4lK^jHY?SZfxIs-I2zbr4_4BHE2bj`WYIpAO8U>NJg+9jyk4;vZ4Xr+J6e zPX#1zN5pROBmbCxh981+urL*=(noj%(}x4hhn;0UMFSq@A5$L+Op+by>Qrp!D8vAD zJj5@aJ{WjDgz7kk8x=grGoU^YfIdbF$Mm9(2Y83nPx18GEcmPa!5zDtJS^6$aP`H~ z$kg)k!bF^s5A|fAx^PRys2P=XKhJ>rNdR;SL+W3{^c5QW`p4A!0F(Bbeb#JSsn1cx z=)x1xYP(+HbjJ&vD6ws?aJtnPj(TCNmSH&W?G;Y%1vnSCx_=MEF}C%iOUsKJ#+OI& z@ICnvs{;XR4PY04-Mz+eeG!|CI@3|&FwlAxpnb{vYEO{nCDTS$2$?@?Y#A*wqFQUF zmnU$2(E@}K>(&||}2a~5-YY;goe@2ZTdvcembej=bMNl5^Bq3zK{{wmdtzZVWd`r}~R}j88PZ z2hb|od3IrDY|Y5R^tj$@bYcnrPS@|zz7h4KfJkw5eHOuN`z=kN0mnD3o5R6Bd$g%X z`oq$X09MK3oUIqxb#`e1_du`3WzFfTJ=`mt-W_oMwR?4pSN2;S3%F^sb8#X5-6V@5 zM)nzlEKNNVrO~*rB*&Q5lOvQ9p7uDOXzE!&;~k@OyJzZVv$x0l#ZxB$k2!(5^%G9_ zM2}$VBoAL|GriCDi>FTZfG2zf5#oOF)G5GY;l8?coAyUL#qh;hgLq# z168la0HVxbZ~CCPBRD0)quTxuM-D2AzAX(>H(nzG$Q7+f_8+*%ryZKbsyK-4;b ztSW0cV`t(e53^fZ3(m49|%1k}X zNf13(Kd+ic-hC^U%Tfht7z<%F5_Jafy&M`8<%JG0te`6?srrjS;nfo0pM}=#vjH%E zp}91&NOMbSzc587v-EN(WVHdvE|f;;S+bDt%@!Xmu8#J!^FlH@sqe-85Bw zV_1B(3HT@Z?J0|+5vxkw{OpkE>N!9U(92Qpb3!4j=K`6WIgcYV?k{VXCdQV>sLMPr zcoFJc6mg7?ub{&*(Q<-%zY?GnLfW`#(wo^e^J9w>@ttLK@yz1rnk70&rY}Nqv*C-2 z?$=&DhZ5B*23?|lIZE`>+tN)6K5KdH{9<%k^<}|}&@UZGyUmVo7@eM58(qx(l0lcK zFGPtm!FwZ}GRCdZ)EQqq-~#oFP@s!`Q@XxKBX~5q-1~)rfb|OiJmude=xEq$(p+TU z-~9Xm7N$obi%;UqDu+Lm(h9s+;oBSNsS29Z{g;%ud5OcJP8n!%dIZI-5At=~j;Xsw z)X9S_Pd^*wG1)BfMe-v*(8!H&=I^tIz)6EFO`nL;d<3v?m^J3q6TCy};{oX-ph~D` zRP$N>G4*l4^bxQWQ_!g7Gd%<9XLtgPPs^Z&$9e|T#{h7!ahd99i2aou`J$t+wj+NO zKwTn!i{l=$F;Xkc?gp)XWI%BJbb!0~D3xkX-qzCs0qds%*mFD@s(VBTRDC#5UH0o0 zT9;T7)c3GZ$ofzqd+p0B5QhR6JUWGXNI-CXFu?uyWt;*&C=jqd5WoTY2daEPC}jN< zAbTEvsPFy=MW`6S5e2|3&W?`Hro&(KlYvz+n1;fo3W90&^NFUP1hkU4SED`1u~74! z?a`TqalLwDCZKCy&wzR#0M-jOYiEPay56942T&FJM`Y8S{-N6buyhMpbpm{*@gUlo znX$7c(*Ztvdxg_`RfkK3zfmBf75TQ>E1cGVtI^ZW#A~;BWF{4}rMyAuRe-7(GFTSC zsZR473ZTY-$6BIGfJ9a*UeheU8n2gM1muZk`PC%ylX6BJONH;3DbL`r2|DAa3% zL92Curv6^B)=V65?cx6EDQ{3}8c^dEYURduuyQS=r9OQy<*4;2hd4~vR(AUyHbVLd zG(9uG!qhAZYtny`mo4?2Hz+j^D83E7!dT=6<=#dM0AAIA7jsdjKC^yabr$l<&6s@;+DFF%NwzV~(`Pr!ubxvUzctR!X_j9-7x{?{h{TL$Htbyyo)-{Y zoeS_v*IuysOgJ@+cOC?)N>pJ{Op!$us`CL#Bz&3XUrY(nk+Yfc74c(O)X6UJ4yoP_ z$N_{3Sg&8b4JDGWRMsx#Vrl&Fw|R;(6AK|Xuc)^Uwmf|a$_p=dCl`jPw+y&I{bm%n z7~F#K4fDABc6xp;q7>isUny3<5ygg&-Qm~!)Efp`oPIru3*TFPMX#^3ZT_) z6Ss&2b!3y=`sv8sM0Ld1q&`MH%`>2WDgY~9GO&2&#L~#v;%qF8s;n@2gl|NBI1p>- zRS17*@10R?5Az144+T_3wYymUP>1+L(+30Xkp5f3yn&Q+HON7}ko18-qGRKIh=y#P zUi&2ETaSc9SEm5oB_>ITxbnK2la!~1LRO<;kkQYl;RVa9+m3rbH}9Tb zr^Gq1(+5z9S|7X+G}p`k3Q@BtgkBP=ve$L9iFuE8E^q;AK4<~xQ43x~S#<_r$hV-D zcF}gDRyN8-ub#5#6HP4vt$`ZOW0@ASWp7Yw1E3D7&|(>$NEGQa{otsxfYU&oXB~K> z7Z|k(Fw9c9^ruYgWUqrb+bf)U4&YeGcd1=rZ^y+c)UD3(i>ICoJn~$dj7GlJRX@)o zm^#-37+>70&ugsQs`CL+=_Z%dWM#~Efd>%ve1KGXZGdYchI&C$1ogtY2x5{KHAPS_ z214oWFL?thxh+{=*c?N>1Q^7^M7~2&KtpEQk(^%WJ5bs{V@K4vaHrQeEsXJd=cZ{(9<@q$2fAhi#qfP* z{rv;0nBq8|xSPQ|&kcjC&jIdO)n+NKZ_W`#>RitmL@D}gl)~rEo!h?j?0$OmEGFSd zYSUoL(;HEqThy}Ew<><01e2UKz{2#ID2&AVa<8@imsx=%8wOgOUPf`OY=`QXn1~h@ z*U?y88f0mD5v8%R9qQY7i8^C&W$Dww7KSxQ&k4|H@JL^|1rUW#7Dv&Cwm!ih4*0UK|^%S3IdIV?{l|t5}dk!V5lRbjz zX9KKc9>{8#q!iL?+k36beQoNDUnIOm9&78Gs_*v(IKU&r)<=er9QGw!1NNi1}E*c={ON`3}cX zr}>&36M>mzPAppMf$Va^V{zl??8N%fWxPu_vba3I6z@t?rx%QOq-VTCs#!pmG^*Jq zm)27JQ#}^|RLuj_<-!Sv_DuE(dI1h+I1v%P`gtBXadkexst6~xhsBJt#iU-~6;3@L za7~31o8x?eUp)0f;2rF=1#PcfwNi}~^1mJB2(@bQgeBb!YhKb1$t~t}d`sD*HPQ3!fHI@1J$~JwGM=Q}=0^uzDF>99>BsY{c0YJQ$>DtasI5C$xTHs zcj`GHmXJbOj!o`;q$6eE+1i;q?`FM2>KQ;* zluUM*z*RL}H>aLL&Wc}0O&%z-F+(LbhI0%pmh#;*0W0)q5%5LmSVu%5_mzH0=LYG;N(Rc8UUM5`@s z*)*+!I&SodrZxesw$%&$VSRQGSoIvh(kYQX>sfJ2CZ3=^#}AHrE^ta#mE!tjHlok- zho#O177_Qg+Q~Z6uV3Ynxl|VetSLQi^Hs0*i>F=#JU1%9qQ}jqiv1^x#d@t*IQ2Tf zxo!EZ+LdmPxZc+5I{Nj4DoMQoCAkp{RldnEUT+KtuHFRjbxy=gm723P(mdFk2UnJQ z3(9iagje}4KC_Ec2bTmcK)n?OxJ7SQ`2w~KzgG6PL6oB2j#9>h^)k61Nxvg7m8&jA z0pzZE;Ipm1^v)2d>RmwPOVT}QW87=r9SmB%2hco~da8BOKi(SI2AMdS7ogFk^Xae7)SNr!Q{|p*{$Rs>cH(0-dh)(;sS* zTYVV0`9OPN&(D&C<^&7=e}2gTG`{{gpn_bzy?PGPAqBa8EOZI_?Vx&DI&`7Yvn?|_ zIXgQxw{B!=a%^E#Q>(lUh#t>xEiB<}SrSd&8U|Ni0$jQmuhPjGXK^GFuig^82>oUh z(Ns)`qa4uGZ}JGH-w3d&s_k346G`Gh?Pu-P8wOaIe!YigiVvWp&0pscOurUjZlPP2 zv{c&W>2rJu5vE=<(Bkx~Q5?^^E_0S4RZ0TWEFwc)9J&PkDwGg9T0xx)vfGWWGv}W* zVz=VZ=prB+P;GfE z-)GPl_{UVw2d1ZUAM%)nen9|G^+JHwmYb3mHJ1;*$S0b5G0=!&?=x){3noe3%mvB% zLa%V@C4eiDl8b8>$vJB`%*@c1>7~Aq)XRY6w&Lf=$4QH2F80CS?W#f zz(xKs)hmHn5>`}fX{lZ6YSecOhO1SVqMUF#kjVJSnerUzInO4G_d09gM z^#K5|b`=wW*dQkFjZ~3)(i>wwPI`IZ0@Mdl05ex!zW`Ar@l`1LL&1wsA4U=B!$qF# zU>!sKh&R$#eH2g}me7Ddj`(z1um0CBp1J~f6Oqpp9eL*6`L}>;5BfyYmjliJfr(`25bv(l2L@7%z6`}oSG8e9^*~q+^*@6wO}`(d zQ4D6C{>i;)?aVy&NcBE{So*!dVsEtnp2q6krESj9FR1K$0vDj)jRM@_A+0YkBcEHA z;~`PscX@@=?*tr&6uGo-mXggE2rdnQs^0-rubRAiB^cckq9tHr@=V#|M1x>@Zr%9& z!ln^+1y`-2Sc!5VS^+JG^2y^9TPIO)UBENX*#lWlh_+76a$=xs=^?G42X!R06mk2oJt;)5w z8MBuL0#+{ru$%hOr{i;tIU4ch0YKF&d^Uj{m3~nmVD&2RT(G(rkhNuwp7}|?+AExT z4dC25Q;wv-ooLhI#QJDii38j8YXg9)*8#NlDKD;R`UDjSn%9RwRc`=l$w^5wsq|@8 zyTiZHGoX4C0BegL+?wf0`pw=U)ms4R=6&>ON1oy?@d&2g3b5Lvn%gf4s(zbSIQ4eG zHST}*V)l{nG_Lw6%HY5+uY|X7O8*2b9z8XY-x+#MC3=nwp+^`o| z$7(+t0#$tusGfRk@qy*f51gQG0A#bCR!^a`?H+&(fZ#G5ZV=?+F@Unb(uL6f0 zU(icBAM$hPfJ^>p1DKgwctRwy^mBgk^k;#`@g&amE7c(ENJsUV;6><9duSE8CL68% zDZhC7O5nMj(zbMx(pFBiLKE$(J~^0j^d~&DPo&Etwu^f86@Kyb$AL!-K@-IC{l6Z*RBkvyL9~4JDzLMG^eA;Pup5gYmT&ZGzj*33z@rUanO>gnBz5+_?I_5>@>AK@=5?wL`zd zGpngC1z^chsA8HvS(6t>qetQ>-t(Ql5!JhZ=;;Ix>i2G+XzD#ct9`cfDh?VQJ!&YlbVLUW2zeGwRY zqMCh)`3y(#rRsUqmyxFykuIFX)lCu9SAY=Ytb-M_^VRTWsIS#+3E@(%X^Nn}4uk_8 z`_01q;_}#<8Qg;0b6w4~USQN_z;Mi7Ly07Q@j!3!ji{~zBA=TptfN!lqyC0BDD_Q1 z)si`qU{U=oUmTzMHjrY~-ht80wpDNM`i@sP^Hln$852JUg{*!Eycm*$|FW`Q`QM~A| zVSE|?8e62tzx6jzj@!X?izY8FXKZ0%X(V!A<8;N^rHQfSF_fgP8&pYp3reaiu(*E{ zeazVG{Pw!Q|~Zdd)*?NMZauMMIU{Z*8*-Z;O` zHmD#XWj1>1D}yahUybr=NUd~J6dkElUv8FPe+l_H;>o#vi~BfOA*$6EL!jy})caPJ zrPWp731)aB#o^>~Na)OXFz}z7|1@430+K+{XtinuIJ#akEFJPEL6)CKfpY^WFgXFO zJ~!|p^=DD!>;S$J#C&{NgZj*%OVpo6i98KSkC7k#x{f(5r9L&-^7K1Gs1)i_pvJLW z9!}%2E)#1YBrt?TSMLIP4fT?DMfs~xqR`W zQHA$6hEV?lh#Hnaf8qDcFKddRK2Yy7B)kSKad~41^+7YX`WW!z3pku-%rXH6F4+n?(@WL= zcu;tC1>h^r_hq%W1m#bJL|2~#dH}f&jecb)Wc97)jI#PRFnFt8$d%Xef)ifqJHd-k z-$fC$QuWo=qOUM>6G!?aJk<9ZL#Xcqf^I*qTnkw-5!&$s4V97Q8j4$iP2%1XH&FtP?r>4lQe}%5U}5?vD9mFxKItyROQZRJ912rN4)=_+>zsQEl%Y3iMs{viSuPb=7wRg6r=9+@ro1>5`T*Jvlc) zpYZKLl%l_dQU;*1t8ZcxKF^Lf&&XZ~{NfY3-$0psy`&T+Kl+FU#rj%C-Cu!V0^DmC zDS_7wvNXK~rOE9BUfYw;|3F6EJb*&14sRlX#{B=DIb^>xpH`WgUI2vOx4 zI;{5Tb0z9)11m~@6-9A$g$xS$QEPPY@fh`$aM=24U~{~VR9Ak~s&{5oPatL|()I^c zlKv7(3Nt&Vm2vAb9QDP)m#M#iG6xv}pgz(_F;O2y_8J15@DHR|G=@+g14IqkDQ0F! zb!e7fU4i^1Pr2F78E;_>wTlXTq9K6#BmgSdfyrf?*1fVZg!&X9DhQ!m3znoo4t%;P zg8B>)D%gVSU~GXZe6}Hg`Wygi*h0nx>hSr-5bCOW5H|nzt1$emx*oW-R0x|!y1@g8 zx)C6&*l}6h2ogHyVy7%^^y?a#)Nd+e5}N4$YGhKsMJAdIBWJASn|LN-uM*oT{kvxQ z)$fs?ZoH{dzIj(t-&8-Zx*2)-PM1P8!PrtxA@!cbkmq3j;1^Hb0zBT%7uL^^za`Op zY%aM8Ti+TGT>TN?m9$IlR>=Z)TLZRK{Rx?AzHo}=&v2V^PXEsyK-6CVQtMPfZ;SlZ z8%?jDV$0OCuZ~t$q^@TmRZWb~LuA zd2bAdt#1H!Wx1i0M&&h097c8hV9L?ILOK4FZuLv>V?MZWx&7c5!3eiRK(udlQ9mDW zf%<2jnv5^sP(SqysDA=LmJ5ZamLGix>(YJ?y>m43aG}-wco3!NAE6X_^fTK1^04#r zEm6eJnwjaj^_z%$|KWfN(my~!gE%9W9Di5eA9#`adnl6bbEs^$jL61^I$)vidWY2C z0i^829ebDYZp@{^>f4PW^tS*JMvN(xs?|3^XS%)NA=iTSo`OswzQ53z9aUchL=Cb# z=^*+`O%c?WflxvCV6t0QzpI<&S6``@UqWKP+AP2N8uAm@*yp@YW)}*rVPR?!UYx$B zeqQzUdiCZdRA1XHzuJua70x-a-OY2EdP}41>N;evcm}9bAygruq{g zDC#s?EF3BJgotdAS^Wi>tCIUnc2lSSYqR|7cI2;0?lS>(NBz9&Z*}UOunYR{&GM^% zApa?47I!1>nF>w^uc8i zOeWj;!&3KY`h{|}`u4t%)O~@}sAox32pa1@6&byfw*NQasBW%geI6V)nYzm(nEsas zFz)#3pB};VodDxdhpMDJcYkZLQ2+3Yr~eK-x(B_9O(k|f{mmzuz5{4{S*=UkWgH^o z%&ObH!05jMhSqu4mdezIHx=qHesJ`kn|+pvCQyI!0;6vOOfdOX{Sh=)n5gxH`ZpJ% z--@CJaRZeQTi6Cu_3r@5 zM+>F#RazTY$vgsBU?byEbj4G?Pa>NdNxtp^ZwcYx4cJ5}_tM3}utlicc_ z$X%;PurQAvaj)hW>fXQ@Eo%eglaw6y;6B?k{I?5VhPn^RsMV{uwlvVU_W+{q3y@l~ zg~L^GrN)kAE_q_f}O2a4JeD2>Q)tMl*V4@*4&SdEBhyAwUoBba&+ z!06JL0D>0Rnd6-G&VwsUJs4#*l4@kI?BWYaJ)|j;9Ms;`7m|7?kQ((&IXaE$Z8wi# z>R|wDG?tm5LdEt3R$Uo+d~trmvT@Yz3!%KJNFzqv-UAr-Qgt7XV0t@%oo?1_7j2-~ z@~!SY(BkyHP#hDq&R>@iO?hs^qOR`g7f;^Ie)05Hz@v%GRolw5r@5J34g15=L%?d<&yww<`cGZTwDj~s z>WmgYCV`Kc@Z{Fv+p1T+hdTJ}t z-O>L4@Q%_Mzj+4KcX;}0@xaiMxBJJ`e+4G1&oa>DM=i;P&LfR2MlVqP zB_z83GtlJ`+y=9SiNZh&|H(I^z72?j(cjgt0W{wQnQdL(v@n^7PCGQE zk=6a`A_xU?|E36PMp-5kL+58uZJFG4*5MV#i>0{j&cU8$cqfI`#?6cT8DT3W`V6ie}xx^f`JsJ&2(^97Vy z34*E{U2hs)xVG9Gl-7W%8wwGr|tFwGzuOUu{>o{1!*v(>=lzkWWF? zE4)GJCjyE!p9Zz!OK#N@{Nm|{L0cKeyirN>DP{h9r;goF4qqANtYtcvVli z4rcNI5k*XX)RM-sr;+H18EjRzM@ga2Jt3CmJ_9L6Z--*SKDb3s^Gu8_kD=|ozp!b9$^?jaP>EUlk(CyxWS&d^xs3Es(%1AeodlbZ%$v?tnUnit9A#8 z6Gkag4+k{w;S2dDH(9cGpgbZVxOybOJ(IdpEd7l%%F0vDjVD4>$l>-Ghf)4NaT64bsZp;FkU z+c!wq=99wWtNnm~Ock%7sQyc5O)rm6P15FCKRE!X+8>~m0t1U`njWooVBllH&{erL zukRG79^(^D?*TMc!(7)dNj=&dlztSTID*`zR&I_;LN_grMkEPwX^$LOQTh=m zipf=fU&Zd1<;19m52_@+J4zaWE~p*`!h|&fS*+zpJ~5r?t9*?bvCq2!ZoQE+1x0@3 z!&U8MAl+8bbvo3`9y-|a^sXq6rAPTJ`O)Y5jBt^|A<`>!3kWnAU0Pn;Fusg`jX?#+ zw>@NVW$9f|mN;*Y9BpK`{@(>t%`ZeB^WeY*=$%nOn1|q#=}mr-c^)+20`&t?AWw7B z<>ZH#zBf5Xk+A9kgDOeygpxcT8Kdz;yga^R$B^jy{y-;Rvhu;r{$nP-9TBy^Us!y- z1Moffr+iIP-4_SfD(!v1b~;eO$uXDhQ9xA!Dz|_%0j2H}23Kzf+^W~$<<^&vRYOj> zw|`81FJM-3;)@JdcmGAko7F46?or)66tdnH$dxwRMJ=D+J|*Y# z)Hb0@&|9MfFTE%I4b~P=-7R<#dMgxBi864r1XBiTI4r&%0)Bv=l+ZTnaoDR+34UW3 zZHD6Up-WItKnd*F_uoUNh|H3U=+YgRiOeSst}L|zWpMyasP9TR$d!XEP3?)&PIu~e z^=+1PbG<4s!L1Yup!qU6kmrd(PYk4k7ok?8i1a;Di z>L4Ij+K3j_*=p*8{bQ;_fLUoPQB=>uji^2}coFI_6hR^H&M`ejUqNR&FxU?Fi>HnN zUZt%Z?fssPYqpydKyZo#5K8nL&7yZJ#Yc)NEA>h@~h|zQjuRrg+NtD19i{- zJ=&;6CfEhN_8Ls^^sZ3ZDCkd<&Wx{!T@oUChYnnK@$l}~4p$1PENZsJ(KSm8qw-*b zYMuL%?@c`Xx?z`jvVWb&XXeM(uNYe#pF*YeQD0th$gyADJUr#l7V->BVWlVMCYQ#R zR;-<#nOqu~9p3<#mDWw`?35mQ&z-v+_U0|ar1v#zeBr3M;VTg&Mc*Lu%82}mjC=mZ z?LU9w=3$qavw!<1a@5emO}|>W?Al>cjLMp#V%x8oA6uLl;YV6WlF3gEt-tRNU%LHu z!?b4&Tc~U?hQ4&(Zu<>i7ov}4zSA5t9D3cpv(Lddx}EH@_T|QMth!q#yY$fCKd|+x zkH;OLoMS4+WWS0AA7i?m@G8cX=O`F3_#s<8blhS0q4B_aZGT#)wNfQ(gWVPx z0rI2IQ0SQ@=c7}h+{S+2P?f6s=nwI$5SHDZT(Lix&0X}!vjsC>5ymY9u+J)L#z>fQ z)9XWOO)@hm*`nN|AEg6=(Ir=l%kxXoH}f)J1)1uh)w@4sLwB>&esghS4yf#&()*~D z*FNCE|HK4U^%P%jC*(U4OwoA{y=fvv?xDr31aZ6sjs~_ptUljKj z|IfKfSEOm7tbb=_LHpYNiIcax^omby8Lk0iy}qD#-u-?N%s$m?W8TQtFa7Mzr~dr* zc#$sqAldiB!nsF#Ef0I!)BkkPsv|ZJS7J|#aMSaRC4266<%^=3p%TC8R!YKe4sH7U zX&2sS^Kc~!vZ#<01$pQm@0j@Wv97}_XJSh?44fo$PdASMw3brIa3Zm--=)@Eg7AH2 zl{^IIa=*2?aQvG6FA==8(eiklMu5CtV}=nHtK(WjGic-nu%WBA`txfsp&sT6kY`_> zs>r^k$pT$8I>h(YV*t=*GS!oYlBsFI=e$5&`tp@Iuv*tc^;*EzsaHsoS=TTgjcK34W zMZ$J~n2__cLq=P#MA{TJYEp#!idI@vhRg2Ebf27KvRT$Wn(NOw`@a9U{92!p0s6lY z8K5~bfHrA;x?eP<2`y1%hP2m|E7NP1>Elbt``_A>S#%;1a8&kSTmO5vuOGklb;E9+ ze-&AdmrUdLk$*4%+} ze)1!~qG>WgV8SS$eda~8eVVCQedEGZqPvp0(a5dTEz8}c9G+kN(v&i)Ss5kTsvH;O zr@4_eR~b#p$X>pE%xibwaVv-kVbn{_>Sd)3lB38dN?>D=k@rj@9IK1&zVG*+eSlkh zuQYNUjUgWLN0d@M~WAD29$jXwild_~) zSt2>I+-tEY^3ny}ItHk|bm8Qy?*b9e3tfMItV$`o7V$1a+%UH=$tp!zou*otq*X{} zhm=Is7|-8rD^U!{Vv#fh^XvXv+!l*;Sg}aH!fiv;+brx<_HKx3sURHHDti_pDxxL1 zuL@E+RIHvgbjRFRDF8Q3N;|4FOj=qx4cos^_^7kYioPOyg0vQpQ{4<%m&e1`)>kwu z5EjcSm2N8*l} z));$ja- zSHg)Qn#BfX(PFNS0-KwRGgjl0pm(PO}j1tnO*tZ@yXB=*BVF=^&fD|-cIzs3>(3xige);Vv&0|gS$gY5s?^vB5eAs?xr)BFpyjXdu%a_g6Zt+ z>08Gs`aLYqshQ_Iq1wk3pLU23)9bm3$>`GWWA-@d=;OEFJnY8GNn`cm_qdCixky?= zD%hbHS~k;)L|X6P;mzM zq;Y=-!(#kOSA_H)+8T8xRD?E|9=N=8F*c9?j*DKu#|6_{h8t0j(m>v+N6pluDr<};PSUMXR8D4TkXEty=~_TyCkv<{5h&v-JvvLijQeoB z=vl@l?je~>icm`J!1#8I@Tmv?V)zQg2>W3yWxx!Eu@tYkQ8as^!j302syPV1ECAGQN5ORnr%o_|F@**)m*>#AI!OmY*AT`fwD(9(OpW zu-lw{cNFIqy{f~J`Q%rXHI{@<)QTGxz06!F)|h`334m8ne?DQtKT0sKKTc4Vlm@(; zNM_zBJgF5QSL)xIDPoa3XpZ<*^L(d8gqAw+J+rbpX6*P=PXw>ymvj@&N{-!e$rVU2 zp0F(M)~r=0V+2O7K@HTLA-=R}X(YNWGICl!^}frtdjGZ2(UK}177vP$)|4~ z4#Y5OW*Gg^fVvh9sF?1qL4J7EFx#0e+6A~kf|{&RG>FK-qahLLic3WH#{cUo|gzEhhn zOD{Q=i)V^S_Y6|o1L7U9h+M>GBr82FskiH z&~)f+PQzrzE&`1grsDWXGkEuN`sB=Dh{NBlp<4@u$yXT$wWwf@owjNdj>OeW;*#I) zp{MY;>OBDMg=du=G0jv?JZq-EBy;^$@!cE;)dWhdYGy3j>j`tBHDIju%@08<0i`|(TFnG)Y>)o* zs%&fB=+K3kvE{Y%i?ig~+;G_k_87&3AjD{t*`s1HncEup6^Y29GR$jj_E|IgT&)5vexol439UQ7c%QL|bUd^9!+XdyhTNox=N5bdy2d-oZB%A{$B`4hXH~)r2F;Lk^Tx}QSMO?cgVI*%!oZ9!P zAN$wAn}=NrFe_G0D-}ySI+(PhS=yn2QRW?$woTzoZEhbYvc+>DiGHM6KZ*}TI&Kv5 zuAJboh)Z^Q)BPW?&*tG8I*r^Gz}MSX+PxHAyk1N#pLyNm9fCBnx5amz2=Aj6mQjqkR^bpGVe1{=KY@icUS!XD5AD3%QoO#ixG-G~tNlfIW zwbhM%cvtZy1DCgVZYqa~bIXkBWHhRK{PBk9 zeCd;`qwu6hlLKpAbT+)KGO|}Kk~-2$Lq?)uFNP>uqtH~^^SBji$xr&fB0q^X5=K1I zEFO7jyJXvyy@Hdkc=1ZVOsrVDG%>b37O6Ey+_Ckxh}9l|HaNL7$IxwXF;n4~EFH=m&C z&t_R|Qp%EW&q$;Y)BJ-|FXiie2#uC^$MTdqVZ;ZG=M!U4J?mz(G=xJ zzPOkfnjHKYc^n2(7{?kybB@H6(kt~)7`;+#=R*gThz@IWxE2mk#M)G8l+qEJ_?PB5 z$u_%u1PKZJuj1%dQk9TjtKm#;HsI&A;o)#RqpT!U{Xm ztg(g^D&;&^Og}W25VZ#hQC`Tdw2LYduL>nZJrD^|-d?7;p}Z^hJ@sWjBCq%n`5+3P z=!aE%cdoq3&b-yT)zrm1J>xq#y0+d-ZT%e&%bzcu*3vwOC9_H}6E9oNWoCAKyb@YB zyfE$R0%=x3Uj0Ujk3KXI1{pnCTaB8>w0VU}vgxwdYd3(BYXb(LF^UIB*MKCtM~)U| zjKUY!@nOQik|AEOizUNGil1ym(jr36SK3@Oo0faC6`h$rTvCKnIufOXd0ctOde_I_ z`hE(gO%wh(MPz(MOEVKHL%fG(T1R%LBF&jLN{%RDHz#lAVkX(z%%xAzIid(nVF7hg zeK-dw(`3oP7BkXlGEW9U4uG35!oFG(GtV~=@hn)V%efU0i%)vUh)?ORl2h%>cjtAL z34D4mZAbzd%)?Ft5uzl>&zWq@>#ZV0iAx@Pf;EMxyv<7^Kx-UG4QZBhvSp@UNZ8F) z@j0)$I1(gdaOw(VsU_NAc@eRsrM##d$u@Bk$2sU^=GXUnmEP(R*HycAphzJ~;8X4` zOB{`KIL$iTAO$qhm?~{wT${&eG~{}k2Z>!=^x`dZCI;6Mf%MRSLj=M*!ES<7HR^eMX2Znfh`rxrLCS6KXO)&|kAw!67HO)XSh|ciO!jFh zih%VaA0mo?xou73cFe59>_0|Z(}tQ1d)+LdNc}jNu>Uwq)sNTXoEzk5)!X(bm%Z|4 zyc6g)0D5~6S5+eA*)DFu$f>HzHq|sAd-g70>o%*94~~!C?W(W+jsn2K>qBBWA6kVy zN{z7KQ&$lOi)RzjJ>*AK0Yo5A=1m$8lM+bVtIwgtqgytY=Ev7ZqwOc}-18p~yEb{i z&#??Mfa47%?MO|Vde%Fn4F;okXx2Mu+uD$tT^x3y! zS3J4*EBF4sG+&y;Ij-LQDI2<*hfk_jMxP_qne!cT=NGL@eZInUzLMGb@b6uE_95`E zs;VWqgmt<}u$J<5jHXRIbNQON{CM|Q=6L341i6YS2d;ek6mEDLphzH$vHvm)l_-gvVg9WDG9EkY*yah z?YR2)Ci() z>ENA6LsFa%X3;1#?=UygC!{IUw#}i}^X7yU(Q77!T0qiCEHO20+?*O^Hk3UN7?^3L zlNw>=I4qdRz~^mML(}o{D1wP*!DO_ohGybJ-9Z7hR;!X*YqBmD&)0*HKSYoqipz&*=j){ZK@5L+01T5ry2~cn}yQmOP9kpa&oc2;oh7 zV4wYhJzeqQ$SkH@`_}4@kufY!4C>6Gi~juc9ei94HZvY=$PZk1@$l}~4hLYI^?(^? zah%=wv0}!V31V5G20{?ai3K;;HpRwqFXMSWa&66`$g6*U=Q{<*9&$bpseSX1($4jH zNP*x5)8%W;>|dg8#7?tj9+D&Dg%pz?`GlKWA#A|t{LRvMe7BKVUAR9;LGmNN#LUzo zqO+mQ8p4V8Y~Xm8DwUES`L%Ovk3^HjT}dm*ZHXo;6CO-rYRG70DcvqKAT6qg{LrG} zKS*2>PY5nXDVAs#BKns6{?9D^>V?nPJlurJ=1qMPreu1OR}xe+30j*e;~|;Z*7B1U z0hv!>SA#L1@-m7K=2H)X`II*C!cfW`TvaLZz6@nX|29-@C4aXlhMYU2b%nKo4^4q; zra+l3^0%@soi)8YJ~bH~f4$_4Q`Y_-oD?r7{Y$ZYx6&BULef)w27mOVK!)WL#nbi5 z3+jRJf)a3?CTkoSJ=rW<3|g9mas*<6Q7l%gI>H@UK@Mr|$gw&JF(?&Ee^w56WN$Nh zQH?*#;>p?jZ%7~|+@Cyz?1?!_lPi1+1is*HpSaJ}vuA7>P8-It9i*T5BlU!n^Yr07 zrE{Q6&uvr#VzGoZi|-q+8F!1Xh>lEC*E9ZHyi!-h<5uDEDQMJ@%QzR&68nb4t=%v) zLy;w?jURZ$-4I0DfX$KnQJ(BjyFTIsU$asJMtVAC#5=$C)9BKddfbv`Zs~M~k11{H z^tjGk_Odv-W@&*oSBD<6%bV6fG^ZuF%(}(<6ME&5hmRWi>GPK8O+K1G`#@%P$yo;f z-~;Y__%HqOY;p;I_&DGhgxcVJ!f5MiF4EyGzl&3qX&37#gW@Ae)IVtZ-5<`1KP&ao zc+_X-LXrQ7fOai1^94ekvJ~Og8Yx1I>&L`c)VPLUbMqc^;j*2MYsiqYYnLDSoJ!`4 zQ#Lb`@xW*+Sx%aSW^sF4fvK_(_`v0U7TM9X5O)h{Yx&{S=pw!NffEJBz*UV&%yfyK zo@QWqyCvT$Kk`4i0edIGZi8g+q|kXYfynpC4?iE;b3vA&Dg!ZbIs_9Z^kJA@k@g6( zN7h_CfW?hDk!L(t^im_lQugrxOkeH;X@~FgWeA@6M1N1@Vou8h2|mr~`z1KDH*nID zx_7(sMNu$jMZ&BXvyhHayX>~~@}C{x{Vmzlp|0iMf8<-Q0D)ccGxFc7<(`+~{e-9t z!}|$*P&!UC9mj4%e^;*x9haU3tWMkTxDYcSiL7A!Ga3cuuA}t{W}m@;;)7VMN>fbn zKP=2N-&4XHapm~bi8#t>wxk4wJFvBf^g}-hiYKll-Dwh%NHa-9;R}%>*z6#FDvJ5I zZPxz$ikU6ZjM?Noe@YD)dvaugjTn%! zM)kvxY5xqF_QH^9X2=G~XvxX;x&etPYUHZ;76#tTvxfCin@20^4RfVwpJVkH;>Bt#LS#!4R&cZ52T^g&#jZ>vV0b4 zC~$6_Bo{72w#Z)3&PygM*3qFG* z+m*ubi>`}}=I!L-mzRJ3{EdGDuSN?*d6k6@T;Xt5+rHcK^u@>Cbu~WWxN61pGK9QO zvf0=3UiRa^-t(cGopfSxyz?HK6v9cm2TiRNnx(hC$;i>+SyIg`Y1N*R8@ZV2DLZVq z^oz&gO4K8qnk07++Ak<#2D{_9%g?$QeeamMi0MhndWqV+Z(21BH@6v*F=>; zWpJ-92q)&%%X!yOx{jn<&g%D`iB@qy*++5ygkqxA8>aYDRvcI@qP6GFoLVSM*Y%kmx~=R^*!#9N%V0}@ID5HtR9WtvDf~Jk!2#Rl zelc0vWur=TPB}H3>1Pq4a|T6#@%~zs!I&?NcCE1sXb$)W;GH$|&S@&YB=AwDm&x(j z4a<`o?GE871~ehCrUc)*nF(6)B zj?1_m3@;{`8MKkB(fV5PnL&*P>AxQ375!Y+47tXx5qtKijg0E%FB#sLnzB~ zDjN^SQ^)L8k1ef_ooeGr&`K0}_0@2sE19;&t^;J&2>o&7>>G5pt$eWjDF5^$LVUBW;2+zhUn+@=kGA11nd#eDD2KN6k)TImENm+5YN;qsPuBF3iD4xsp?dS)-o z6mZp^oXgZ^dNLE%RcoGW`<}hab|=049Xm9cH`2X{Bi{LeI&Uny<|Zz=&B3s3IlMij zsL|*E3)q2OJ11VhHNM(6WiK!NJ)?i`EUsl@pzLXjV_v)aj$5J56)()l59>~f$+=V6 zOH_C75_Qz)-uvPkkM$J$&R$P836&!*{!~)tL#9H;c6t1114wdzfa0i)xvnyoFk_NN?Ez6n$=X zz3FwUS$dGlu^9>pe}l^A>t)p zHetd?l+x!>0U2A0d?Bq~S-y}jOxr6*VsNlmx?AU9*dM`0i%)4-A&%*8?TC`1U`?!K zEg%^m7CA*ngvzxgID7rW-ua7DQQwAAE46>7`6CRGPsECYl27!2g}V zl1$ZR=j=(Zk>+TmE?8ql0Eu++DubE5P0uC3ra>BgKx&K{K)1t~CZwrIvtVKxYvbb& z+G@K`ZFOC>olp^O;z!0>h+H4rL<`ZZg>XP};o?-he3R3_tk_rgnf%*@P(*|42(suk z)e+E{_bTJx|ZBa6!5?w+!6&nQ^zfLFRcPHOeqTovSc>}jOQAw3D}!+ zZh}k=E!99O$=-nrrs-{oQ*D-Guabb&j5%DFnz=b?>8-l(^U`Yv#Lo-;$zLeswEXbF zQd^HKs-f%EyY50Xv-sV-J1r^ESe$4BVk~7*3BukBy2P?ntEFfIIWm)3OMH^&Qr)%e zL^@X2t+Vo49-pGIB0Ay)woqj^=s5%sd#Nn?av-Ze7G5(8Pm^^YmebU+Bn+ABoARm+ zM_cu5e+e0w7p8r(k8eo)1NlX3&dO^a@Zf)9Ji1WLW)gRn74(pi6-W?nY=lC8S~K+@ zl9QJJ?uwLLZvZ!Urp#eD)18{K^12=?ubGv1qlsm_^nPB?gKBOEBKjcOA$6TgPr2i1 zi14O~xk8WXt!B@pws!BsPklC!OWfsX!YJZM)Wpf#MUn{lGG*1vfXGb}pa0zU5k^&& zAy>i3ex{K3RnbePEwkqcqhV;)Fx;%3v*4utEsHYdmB)vcp;^nQy^P7sJi*QG!GB`O#HZyL!PfL!;%#2Blh}q@2ZNM$SQfp*h z-EiBA=IT2snzVcqU!{`lIHZL(b=fu>9(fziEuX^Or%1_g^Y+tIWwM$Z5}78VsFOA; z#lDPv=o9aG^ekRD4#DpaZFlQ))R(Tav?ZRqr5U_0VNf4lNA7l6qX9;a_X znHe1&Sg!9jBP!j0b1H1C)YE^{<}J?1{Ws6NjYP$Qv7A#Ad+)&2k+E!Pf#L}CZPU_z z!9`>?nr0#oCpgN&pVq{48YDCF%z-!Jna$XZokwp+wJhyr=%ULe=(2+;On)9lsbZ3X zMZW`F3(Pc*b>8u+_$HwN>1o0)dX~R5%U@n_Eq{9G!skT(GM71i$ngnz@?Z+KLWku1_yqYfQz3WHtrh|F@(z%~Bf?I<9_brb*HP05T{iDIzT&G#C^DczRszP&YwEy7Gb+J(ChCX4^>^nBp zkhv#)FhZGpBhQ%fY4Rg~td#V^%wh+~^QuP15Mmnpl+NloqKz-b+arNwnIlzI*81ak9rP zzP^tN!&7Wlv#rR!<|#3899L?aB3;9q9wmrA^(f7H6vb9LT8odq$<7ao`n_*D<(~Kc zeth|J8BEE6pL965W?8F71tkOy6X>GA%)1mMvz^;^q*P=|m{X(d z`cs88t3nmWo}+Z5S-KGt$?MXb?9}uiln>3y2Rp3&onDKO&yZFuLx>0L76exeD97z_;*2lCi#ZD!B$b%vYOE{BB~PAv zTjK92X6D^o>=Ir*!PSggoAH-(F0+wU%0ik;YL+&AhVh>r-!M8ow>G{*(@_2{TZ3Za zfZn4Wr*~MR`?DTCv)#S1-)|PrOFZWSE>9fAJ>(n4mq#b(q5~>xF1lvym)mS{Vwj5S zYe-b8?Z@X{^3d1ZZ_Dr?g%)|$Bki^3tUYc6oyTPCV6UFT31j-SFI;rmFD5Xpc++2G zHDET;c_UNm67wfm`irby)Hhu>2vLJ&rYgP(lBO!N$swN171FF1QbT#Fhb7{=+d4)} zBm+}BH-p8eud=nvTsUeF{pd~NGr8?Mdyj|Z5l?KArkFNY#F$kY((XB2PdR!n9mmbq z#a}Kl)?CHYO-~d)UVii;=1Yf@ki#R^l^!fTgt_2~doz=YG5>412i$b>f$}5&OS3(j z$DL>zw1(3l799DJ4`^GMYby+hRZ*g6o8t1A_F7r%%%V75vV`zvw?ZT2NC0Vh5jVOG zR9@69FNTpblTpDT;_SN8wX=0ip3{n1c`Q;@<~zT6Aykz?s*Uni%tW2Ysn` zvdO2rog^yuWpn%55C3)OMd)ij
    -RSv`+FO~znD6Z*!PWHkv--@FMG_;ge=oY`}xEk#$gRSjXtEr#bQYn!BoY90g5Eg<=hyko$; zEc@H{r7{PcD1q%?Rmt+ZhxqXT3WExBW{ABAn*P zS1{YQrkLX0TCc%0k=uj-NIwITqYN410)Nx*p_6DtuH7&*6MeKflaS`si?B0$e7nXCQucfCjwPNYVv<5}4bYG<@V?HyS zEQTiC3yP?*3=FF)@=>vq;UEf_{#wGQTf(gxI_mmWx0}O3PNcn=pp0%IT(>{nLiU>R z$!c$3ZO(5#3y+tToX@LEQ^mhq*8Nari5f+Fe+6rZAmns zO52X2%hV{wn{O!I<-+IuV#}`A4aWjof6q7b`O%CxDqP$(pL^wRrnbIrc%UMa$Q}Mf zCOs5TWYWGxCe0$#`lu)OH=uA8MLi=uVP>>FOXW4no)Cn6*JG60Urf%QL^Nwm?5P$; z>=e7_g*Va;NK4_Qlm zeCF$&>z|o=5(?b6tR+p%Ok@8lT5625zn|xdPdW9+I;Eu}Bh{@}-R&y6DT4=<^XC~0 zSfmX57Sd!*F>StxyPex++G?0gJ!La3wRG!y#fU7k3835fE(WytE&ggA-@HFP+BTlj}_our>5i~2t z7RRTeFq&Qee)%s@P#C?4SHkSfbHe_oOk(B{V#D$4idT0g-;&kc_~ASvWz@)z{NZDY z;ELOarCG&edQy<&M?R#R(~yivqZ&#-BQLsgKP#O9(*B+0(3!Bk@LHuFGFs&zWJ77q zFq2!lH4}P4{o&bH-hK|c`cZX^m|4K=)xmV{st03oZ@1&lZuzT*><^)Oio6w4_0+*s zPd#K*&v443Tmu+$9F7|~jVRs8xyhxmrIE$u`K4&qF#@1w0dOUHVIRrOOn!X#u)6a< zo37pQe%D1FVxMegf-}LQdG)Xc#KKDn?w=ZK9=jDZ>7?U=XR{w(PHG0|27D=l2gb9R+@rlRM|Y@TWEGe5lanYc{g z)c&0@+pEeB^<@-Mx%M%XA}UI8)rlat4<^gMrHIO*Zgx5PZ_zB(uj2A=`lH0cdRIiX zcSTh8Ty9%Ut8Fr?s<`%+dg*p=NQ{}CG&x?^Ef_Y1!3%N9>on(pXo_&9sWMJ%ygMhV z+hC=|vm!w;ubs}Yb>jf?tQ=BH3v(q^ly;k+nK>ic)fg_Q77BCu(!)ZEyfWluFVyU4 zDK~}1EJ+ciX3zAS2t(dQlHSu$!j)#F`9Ip%G^32uE337UG17Lr50pr}%xT4az?QGV ztIrDu&`68sUAQmlm@h4pz-BK(w0vtNFS|$#EIudw@yp-xiPItVR@x;L6=UrZG^^3E zkY2W(DLJT^c-INtt%lCuxc%o(+}vF6)~t7v+gP?w&h&Sduhemm|3%e{XHx4!auvg81LNu308I@aI&$%L@apUPw?=xCTQn}x zE>4jaF98s|Bl4h;=5IUALoutFOZyE( zLzWhta%w?Khb-j__yf~Qj%E$nZNnTFXl4Lm8CmIMsiwbGtV)|f$v!(T%+@|$E>Ni^ zF!9G`H$cW8@o{pGV@PGyC!eH>%9EMHlRdtvBr&5^@N8!+XBM^9Nj)?mby5%g7t~38 zYjAZ^oHOq7q9DqTd?_(wbj$k|Nb;9F+TFUtVCe66{qv%8H%G6ydMp7>UqmWRpSJpP z93~s6+9~0SHE@# zC<2vy{c?26*Pr?D?K}VY$j!qpuB3!U7L~xQBzmbx0WN}Fu`5a2AG&avXs3~b9{;?P znqH2&utb-o5Zog>2hvGRx5IKGE{2Y#2)s4B@)(;U?gxJ1S7#pQ~o7tOs_vKvDT#u zgzbegPH)_1n*4UGjP^q4C--{4l274{KYR$GMCb!3lQtFo-?NXw-SS1f<c>wWDB3 zCyTIKKjjxLfmQL=oPoD1K}#l%^nWSMloGpS|u4L*v0KC!R<=%EV^W#pIbc>WK!E zmP=yq>S89uwE-M+0<>s*XRU#+$>Muj+%{RcB7^vQ%((Xde5$is5ZbrOj8FZmjDwk^#BU}+hI7N7g ze7M(0(<|7I7rJud|RFaHc_VBXVE7Dvnk9gbD|8&r*BdV){xmr$o!N^ess~%Ey zD8)LWu<7%sU3ee2t9eVCD0R!>p?kbz;?KvrPF^|7UAkc~+7=eqMGUSv8C-kGO9NX6 zLwDYN?REQOTIB7N_|^YEID?V~Hgx=MirSYM6~OLP1~6Td)C(rD>46x3fbK#84SCSg zLZpCvwZB051MtW|>Mz;Etcb-PtulEFw2QcIHOl-atOU$0D2*>K0xqLXErP6^h0ct{ zLqiPbDpun9aj5AHDTl*G6)2qBgpVws&PNfL$%D0wVJFDIhkQ_HgNQT*K8u00^pPxs zkg5Q , "Project Includes" -***********************************************************************************************************************/ -/* Defines type structures used in this file */ -#include - -/* Preprocessor directive */ -#pragma unpack - -/* Section start */ -#pragma section C C$DSEC - -/* MCU ROM and RAM structure definition */ -extern const struct { - uint8_t *rom_s; /* Start address of the initialized data section in ROM */ - uint8_t *rom_e; /* End address of the initialized data section in ROM */ - uint8_t *ram_s; /* Start address of the initialized data section in RAM */ -} _DTBL[] = { - { __sectop("D"), __secend("D"), __sectop("R") }, - { __sectop("D_2"), __secend("D_2"), __sectop("R_2") }, - { __sectop("D_1"), __secend("D_1"), __sectop("R_1") } -}; - -/* Section start */ -#pragma section C C$BSEC - -/* MCU ROM and RAM structure definition */ -extern const struct { - uint8_t *b_s; /* Start address of non-initialized data section */ - uint8_t *b_e; /* End address of non-initialized data section */ -} _BTBL[] = { - { __sectop("B"), __secend("B") }, - { __sectop("B_2"), __secend("B_2") }, - { __sectop("B_1"), __secend("B_1") } -}; - -/* Section start */ -#pragma section - -/* CTBL prevents excessive output of L1100 messages when linking. - Even if CTBL is deleted, the operation of the program does not change. */ -uint8_t * const _CTBL[] = { - __sectop("C_1"), __sectop("C_2"), __sectop("C"), - __sectop("W_1"), __sectop("W_2"), __sectop("W") -}; - -/* Preprocessor directive */ -#pragma packoption - -/* This is to ensure compatibility with new L section in version 1.1 and up of the RXC compiler. Do not remove! */ -#pragma section C L -const unsigned long deadSpace = 0xDEADDEAD; -#pragma section - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/flash_options.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/flash_options.c deleted file mode 100644 index a6be182d0..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/flash_options.c +++ /dev/null @@ -1,124 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : flash_options.c -* Device(s) : RX63x -* Description : Some options of the RX63x are set through registers that are found in ROM. These registers and options -* are defined in the 'Option-Setting Memory' section of the HW Manual. These memory locations are defined -* below with descriptions of what is being set. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 31.10.2011 1.00 First Release -* : 13.03.2012 1.10 USER_BOOT_ENABLE macro from r_bsp_config.h is now used to set Option-Setting Memory -* area to boot into User Boot Mode. -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -Includes , "Project Includes" -***********************************************************************************************************************/ -/* Used for fixed-width typedefs. */ -#include -/* Determines whether user boot is used or not. */ -#include "platform.h" - -/* The UB Code A, UB Code B, and Endian select register B (MDEB) are located in the User Boot space. Immediately - following the MDEB register is the User Boot Reset Vector so it is defined below as well. These settings will only - be used when the MCU is reset in User Boot Mode. In order for the MCU to start up in User Boot Mode the following - conditions must be met: - 1) UB code A is 55736572h and 426F6F74h. - 2) UB code B is FFFF FF07h and 0008 C04Ch. - 3) The low level is being input on the MD pin. - 4) The high level is being input on the PC7 pin. - Please see the Option-Setting Memory section of your MCU's HW manual for more information. */ - -/* 0xFF7FFFE8 - 0xFF7FFFEF : UB Code A register - 0xFF7FFFF0 - 0xFF7FFFF7 : UB Code B register - 0xFF7FFFF8 - 0xFF7FFFFB : MDEB register - 0xFF7FFFFC - 0xFF7FFFFF : User Boot Reset Vector */ - -#pragma address user_boot_settings = 0xFF7FFFE8 - -#if USER_BOOT_ENABLE == 1 -extern void PowerON_Reset_PC(void); - -/* Use this array if you are using User Boot. Make sure to fill in valid address for UB Reset Vector. */ -const uint32_t user_boot_settings[6] = -{ - 0x55736572, //Required setting for UB Code A to get into User Boot - 0x426f6f74, //Required setting for UB Code A to get into User Boot - 0xffffff07, //Required setting for UB Code B to get into User Boot - 0x0008c04c, //Required setting for UB Code B to get into User Boot - /* Choose endian for user application code - MDEB Register - Endian Select Register B - b31:b3 Reserved (set to 1) - b2:b0 MDE - Endian Select (0 = Big Endian, 7 = Little Endian) */ - 0xFFFFFFFF, //Select Little Endian for User Boot Code - (uint32_t) PowerON_Reset_PC //This is the User Boot Reset Vector. When using User Boot put in the reset address here -}; -#endif - -/* The Endian select register S (MDES), Option function select register 1 (OFS1), and Option function select register 0 - (OFS0) are located in User ROM. */ - -/* 0xFFFFFF80 - 0xFFFFFF83 : MDES register - 0xFFFFFF84 - 0xFFFFFF87 : Reserved space (0xFF's) - 0xFFFFFF88 - 0xFFFFFF8B : OFS1 register - 0xFFFFFF8C - 0xFFFFFF8F : OFS0 register */ - -#pragma address flash_options = 0xFFFFFF80 - -const uint32_t flash_options[] = -{ - /* Choose endian for user application code - MDES Register - Endian Select Register S - b31:b3 Reserved (set to 1) - b2:b0 MDE - Endian Select (0 = Big Endian, 7 = Little Endian) */ - 0xFFFFFFFF, //Little Endian chosen for User Application - 0xFFFFFFFF, //Reserved space - /* Configure whether voltage detection 0 circuit and HOCO are enabled after reset. - OFS1 - Option Function Select Register 1 - b31:b9 Reserved (set to 1) - b8 HOCOEN - Enable/disable HOCO oscillation after a reset (0=enable, 1=disable) - b7:b3 Reserved (set to 1) - b2 LVDAS - Choose to enable/disable Voltage Detection 0 Circuit after a reset (0=enable, 1=disable) - b1:b0 Reserved (set to 1) */ - 0xFFFFFFFF, //Both are disabled. - /* Configure WDT and IWDT settings. - OFS0 - Option Function Select Register 0 - b31:b29 Reserved (set to 1) - b28 WDTRSTIRQS - WDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU) - b27:b26 WDTRPSS - WDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use) - b25:b24 WDTRPES - WDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use) - b23:b20 WDTCKS - WDT Clock Frequency Division Ratio - (1=/4, 4=/64, 0xF=/128, 6=/512, 7=/2048, 8=/8192) - b19:b18 WDTTOPS - WDT Timeout Period Select - (0=1024 cycles, 1=4096, 2=8192, 3=16384) - b17 WDTSTRT - WDT Start Mode Select - (0=auto-start after reset, halt after reset) - b16:b15 Reserved (set to 1) - b14 IWDTSLCSTP - IWDT Sleep Mode Count Stop Control - (0=can't stop count, 1=stop w/some low power modes) - b13 Reserved (set to 1) - b12 IWDTRSTIRQS - IWDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU) - b11:b10 IWDTRPSS - IWDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use) - b9:b8 IWDTRPES - IWDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use) - b7:b4 IWDTCKS - IWDT Clock Frequency Division Ratio - (0=none, 2=/16, 3 = /32, 4=/64, 0xF=/128, 5=/256) - b3:b2 IWDTTOPS - IWDT Timeout Period Select - (0=1024 cycles, 1=4096, 2=8192, 3=16384) - b1 IWDTSTRT - IWDT Start Mode Select - (0=auto-start after reset, halt after reset) - b0 Reserved (set to 1) */ - 0xFFFFFFFF -}; - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.c deleted file mode 100644 index a72bd3fdd..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.c +++ /dev/null @@ -1,161 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : hwsetup.c -* Device(s) : RX -* H/W Platform : RSK+RX63N -* Description : Defines the initialisation routines used each time the MCU is restarted. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 22.11.2011 1.00 First Release -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -Includes , "Project Includes" -***********************************************************************************************************************/ -/* I/O Register and board definitions */ -#include "platform.h" -/* Contains delcarations for the functions defined in this file */ -#include "hwsetup.h" - -/*********************************************************************************************************************** -Private global variables and functions -***********************************************************************************************************************/ -/* MCU I/O port configuration function delcaration */ -static void output_ports_configure(void); - -/* Interrupt configuration function delcaration */ -static void interrupts_configure(void); - -/* MCU peripheral module configuration function declaration */ -static void peripheral_modules_enable(void); - - -/*********************************************************************************************************************** -* Function name: hardware_setup -* Description : Contains setup functions called at device restart -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -void hardware_setup(void) -{ - output_ports_configure(); - interrupts_configure(); - peripheral_modules_enable(); -} - -/*********************************************************************************************************************** -* Function name: output_ports_configure -* Description : Configures the port and pin direction settings, and sets the pin outputs to a safe level. -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -void output_ports_configure(void) -{ - SYSTEM.PRCR.WORD = 0xA50B; /* Protect off */ - MPC.PWPR.BIT.B0WI = 0 ; /* Unlock protection register */ - MPC.PWPR.BIT.PFSWE = 1 ; /* Unlock MPC registers */ - - /* Enable LEDs. */ - /* Start with LEDs off. */ - LED0 = LED_OFF; - LED1 = LED_OFF; - LED2 = LED_OFF; - LED3 = LED_OFF; - - /* Set LED pins as outputs. */ - LED0_PDR = 1; - LED1_PDR = 1; - LED2_PDR = 1; - LED3_PDR = 1; - - /* Enable switches. */ - /* Set pins as inputs. */ - SW1_PDR = 0; - SW2_PDR = 0; - SW3_PDR = 0; - - /* Set port mode registers for switches. */ - SW1_PMR = 0; - SW2_PMR = 0; - SW3_PMR = 0; - - /* Initialize RSPI pins that are used with on-board SPI flash. */ - /* Set pin outputs to low to begin with. */ - PORT2.PODR.BIT.B7 = 0x00; /* RSPCKB */ - PORT2.PODR.BIT.B6 = 0x00; /* MOSIB */ - PORT3.PODR.BIT.B0 = 0x00; /* MISOB */ - PORT3.PODR.BIT.B1 = 0x00; /* SSLB0 */ - - /* All GPIO for now */ - PORT2.PMR.BIT.B7 = 0x00; - PORT2.PMR.BIT.B6 = 0x00; - PORT3.PMR.BIT.B0 = 0x00; - PORT3.PMR.BIT.B1 = 0x00; - - /* Unlock MPC registers to enable writing to them. */ - MPC.PWPR.BIT.B0WI = 0 ; /* Unlock protection register */ - MPC.PWPR.BIT.PFSWE = 1 ; /* Unlock MPC registers */ - - /* Set MPC for RSPI pins */ - MPC.P27PFS.BYTE = 0x0D; - MPC.P26PFS.BYTE = 0x0D; - MPC.P30PFS.BYTE = 0x0D; - - /* RSPI pins assigned to RSPI peripheral. */ - PORT2.PMR.BIT.B7 = 1; - PORT2.PMR.BIT.B6 = 1; - PORT3.PMR.BIT.B0 = 1; - PORT3.PMR.BIT.B1 = 1; - - /* RSPCKB is output. */ - PORT2.PDR.BIT.B7 = 1; - /* MOSIB is output. */ - PORT2.PDR.BIT.B6 = 1; - /* MISOB is input. */ - PORT3.PDR.BIT.B0 = 0; - /* SSLB0 is output. */ - PORT3.PDR.BIT.B1 = 1; - - /* Configure the pin connected to the ADC Pot as an input */ - PORT4.PDR.BIT.B0 = 0; -} - -/*********************************************************************************************************************** -* Function name: interrupts_configure -* Description : Configures interrupts used -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -void interrupts_configure(void) -{ - /* Add code here to setup additional interrupts */ -} - -/*********************************************************************************************************************** -* Function name: peripheral_modules_enable -* Description : Enables and configures peripheral devices on the MCU -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -void peripheral_modules_enable(void) -{ - /* Add code here to enable peripherals used by the application */ -} diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.h deleted file mode 100644 index 35e068633..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/hwsetup.h +++ /dev/null @@ -1,42 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : hwsetup.h -* Description : Hardware setup header file. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 26.10.2011 1.00 First Release -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -Macro definitions -***********************************************************************************************************************/ -/* Multiple inclusion prevention macro */ -#ifndef HWSETUP_H -#define HWSETUP_H - -/*********************************************************************************************************************** -Exported global functions (to be accessed by other files) -***********************************************************************************************************************/ -/* Hardware setup funtion declaration */ -void hardware_setup(void); - -/* End of multiple inclusion prevention macro */ -#endif \ No newline at end of file diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowlvl.src b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowlvl.src deleted file mode 100644 index a75845e40..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowlvl.src +++ /dev/null @@ -1,54 +0,0 @@ -;----------------------------------------------------------------------- -; -; FILE :lowlvl.src -; DATE :Wed, Jul 01, 2009 -; DESCRIPTION :Program of Low level -; CPU TYPE :RX -; -;----------------------------------------------------------------------- - .GLB _charput - .GLB _charget - -FC2E0 .EQU 00084080h -FE2C0 .EQU 00084090h -DBGSTAT .EQU 000840C0h -RXFL0EN .EQU 00001000h -TXFL0EN .EQU 00000100h - - .SECTION P,CODE - -;----------------------------------------------------------------------- -; _charput: -;----------------------------------------------------------------------- -_charput: - .STACK _charput = 00000000h -__C2ESTART: MOV.L #TXFL0EN,R3 - MOV.L #DBGSTAT,R4 -__TXLOOP: MOV.L [R4],R5 - AND R3,R5 - BNZ __TXLOOP -__WRITEFC2E0: MOV.L #FC2E0,R2 - MOV.L R1,[R2] -__CHARPUTEXIT: RTS - -;----------------------------------------------------------------------- -; _charget: -;----------------------------------------------------------------------- -_charget: - .STACK _charget = 00000000h -__E2CSTART: MOV.L #RXFL0EN,R3 - MOV.L #DBGSTAT,R4 -__RXLOOP: MOV.L [R4],R5 - AND R3,R5 - BZ __RXLOOP -__READFE2C0: MOV.L #FE2C0,R2 - MOV.L [R2],R1 -__CHARGETEXIT: RTS - -;----------------------------------------------------------------------- - -; End of conditional code - .END - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowsrc.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowsrc.c deleted file mode 100644 index ad9f32ce4..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/lowsrc.c +++ /dev/null @@ -1,332 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : lowsrc.c -* Description : Functions to support stream I/O -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 26.10.2011 1.00 First Release -***********************************************************************************************************************/ -/*********************************************************************************************************************** -Includes , "Project Includes" -***********************************************************************************************************************/ -#include -#include -#include - -/*********************************************************************************************************************** -Macro definitions -***********************************************************************************************************************/ -/*Number of I/O Stream*/ -#define IOSTREAM 20 - -/* file number */ -#define STDIN 0 /* Standard input (console) */ -#define STDOUT 1 /* Standard output (console) */ -#define STDERR 2 /* Standard error output (console) */ - -#define FLMIN 0 /* Minimum file number */ -#define _MOPENR 0x1 -#define _MOPENW 0x2 -#define _MOPENA 0x4 -#define _MTRUNC 0x8 -#define _MCREAT 0x10 -#define _MBIN 0x20 -#define _MEXCL 0x40 -#define _MALBUF 0x40 -#define _MALFIL 0x80 -#define _MEOF 0x100 -#define _MERR 0x200 -#define _MLBF 0x400 -#define _MNBF 0x800 -#define _MREAD 0x1000 -#define _MWRITE 0x2000 -#define _MBYTE 0x4000 -#define _MWIDE 0x8000 -/* File Flags */ -#define O_RDONLY 0x0001 /* Read only */ -#define O_WRONLY 0x0002 /* Write only */ -#define O_RDWR 0x0004 /* Both read and Write */ -#define O_CREAT 0x0008 /* A file is created if it is not existed */ -#define O_TRUNC 0x0010 /* The file size is changed to 0 if it is existed. */ -#define O_APPEND 0x0020 /* The position is set for next reading/writing */ - /* 0: Top of the file 1: End of file */ - -/* Special character code */ -#define CR 0x0d /* Carriage return */ -#define LF 0x0a /* Line feed */ - -#if defined( __RX ) -const long _nfiles = IOSTREAM; /* The number of files for input/output files */ -#else -const int _nfiles = IOSTREAM; /* The number of files for input/output files */ -#endif -char flmod[IOSTREAM]; /* The location for the mode of opened file. */ - -unsigned char sml_buf[IOSTREAM]; - -#define FPATH_STDIN "C:\\stdin" -#define FPATH_STDOUT "C:\\stdout" -#define FPATH_STDERR "C:\\stderr" - -/* H8 Normal mode ,SH and RX */ -#if defined( __2000N__ ) || defined( __2600N__ ) || defined( __300HN__ ) || defined( _SH ) -/* Output one character to standard output */ -extern void charput(char); -/* Input one character from standard input */ -extern char charget(void); -/* Output one character to the file */ -extern char fcharput(char, unsigned char); -/* Input one character from the file */ -extern char fcharget(char*, unsigned char); -/* Open the file */ -extern char fileopen(char*, unsigned char, unsigned char*); -/* Close the file */ -extern char fileclose(unsigned char); -/* Move the file offset */ -extern char fpseek(unsigned char, long, unsigned char); -/* Get the file offset */ -extern char fptell(unsigned char, long*); - -/* RX */ -#elif defined( __RX ) -/* Output one character to standard output */ -extern void charput(unsigned char); -/* Input one character from standard input */ -extern unsigned char charget(void); - -/* H8 Advanced mode */ -#elif defined( __2000A__ ) || defined( __2600A__ ) || defined( __300HA__ ) || defined( __H8SXN__ ) || defined( __H8SXA__ ) || defined( __H8SXM__ ) || defined( __H8SXX__ ) -/* Output one character to standard output */ -extern void charput(char); -/* Input one character from standard input */ -extern char charget(void); -/* Output one character to the file */ -extern char fcharput(char, unsigned char); -/* Input one character from the file */ -extern char fcharget(char*, unsigned char); -/* Open the file */ -/* Specified as the number of register which stored paramter is 3 */ -extern char __regparam3 fileopen(char*, unsigned char, unsigned char*); -/* Close the file */ -extern char fileclose(unsigned char); -/* Move the file offset */ -extern char fpseek(unsigned char, long, unsigned char); -/* Get the file offset */ -extern char fptell(unsigned char, long*); - -/* H8300 and H8300L */ -#elif defined( __300__ ) || defined( __300L__ ) -/* Output one character to standard output */ -extern void charput(char); -/* Input one character from standard input */ -extern char charget(void); -/* Output one character to the file */ -extern char fcharput(char, unsigned char); -/* Input one character from the file */ -extern char fcharget(char*, unsigned char); -/* Open the file */ -/* Specified as the number of register which stored paramter is 3 */ -extern char __regparam3 fileopen(char*, unsigned char, unsigned char*); -/* Close the file */ -extern char fileclose(unsigned char); -/* Move the file offset */ -/* Move the file offset */ -extern char __regparam3 fpseek(unsigned char, long, unsigned char); -/* Get the file offset */ -extern char fptell(unsigned char, long*); -#endif - -#include -FILE *_Files[IOSTREAM]; // structure for FILE -char *env_list[] = { // Array for environment variables(**environ) - "ENV1=temp01", - "ENV2=temp02", - "ENV9=end", - '\0' // Terminal for environment variables -}; - -char **environ = env_list; - -/****************************************************************************/ -/* _INIT_IOLIB */ -/* Initialize C library Functions, if necessary. */ -/* Define USES_SIMIO on Assembler Option. */ -/****************************************************************************/ -void _INIT_IOLIB( void ) -{ - /* A file for standard input/output is opened or created. Each FILE */ - /* structure members are initialized by the library. Each _Buf member */ - /* in it is re-set the end of buffer pointer. */ - - /* Standard Input File */ - if( freopen( FPATH_STDIN, "r", stdin ) == NULL ) - stdin->_Mode = 0xffff; /* Not allow the access if it fails to open */ - stdin->_Mode = _MOPENR; /* Read only attribute */ - stdin->_Mode |= _MNBF; /* Non-buffering for data */ - stdin->_Bend = stdin->_Buf + 1; /* Re-set pointer to the end of buffer */ - - /* Standard Output File */ - if( freopen( FPATH_STDOUT, "w", stdout ) == NULL ) - stdout->_Mode = 0xffff; /* Not allow the access if it fails to open */ - stdout->_Mode |= _MNBF; /* Non-buffering for data */ - stdout->_Bend = stdout->_Buf + 1;/* Re-set pointer to the end of buffer */ - - /* Standard Error File */ - if( freopen( FPATH_STDERR, "w", stderr ) == NULL ) - stderr->_Mode = 0xffff; /* Not allow the access if it fails to open */ - stderr->_Mode |= _MNBF; /* Non-buffering for data */ - stderr->_Bend = stderr->_Buf + 1;/* Re-set pointer to the end of buffer */ -} - -/****************************************************************************/ -/* _CLOSEALL */ -/****************************************************************************/ -void _CLOSEALL( void ) -{ - long i; - - for( i=0; i < _nfiles; i++ ) - { - /* Checks if the file is opened or not */ - if( _Files[i]->_Mode & (_MOPENR | _MOPENW | _MOPENA ) ) - fclose( _Files[i] ); /* Closes the file */ - } -} - -/**************************************************************************/ -/* open:file open */ -/* Return value:File number (Pass) */ -/* -1 (Failure) */ -/**************************************************************************/ -#if defined( __RX ) -long open(const char *name, /* File name */ - long mode, /* Open mode */ - long flg) /* Open flag */ -#else -int open(char *name, /* File name */ - int mode, /* Open mode */ - int flg) /* Open flag */ -#endif -{ - - - if( strcmp( name, FPATH_STDIN ) == 0 ) /* Standard Input file? */ - { - if( ( mode & O_RDONLY ) == 0 ) return -1; - flmod[STDIN] = mode; - return STDIN; - } - else if( strcmp( name, FPATH_STDOUT ) == 0 )/* Standard Output file? */ - { - if( ( mode & O_WRONLY ) == 0 ) return -1; - flmod[STDOUT] = mode; - return STDOUT; - } - else if(strcmp(name, FPATH_STDERR ) == 0 ) /* Standard Error file? */ - { - if( ( mode & O_WRONLY ) == 0 ) return -1; - flmod[STDERR] = mode; - return STDERR; - } - else return -1; /*Others */ -} - -#if defined( __RX ) -long close( long fileno ) -#else -int close( int fileno ) -#endif -{ - return 1; -} - -/**************************************************************************/ -/* write:Data write */ -/* Return value:Number of write characters (Pass) */ -/* -1 (Failure) */ -/**************************************************************************/ -#if defined( __RX ) -long write(long fileno, /* File number */ - const unsigned char *buf, /* The address of destination buffer */ - long count) /* The number of chacter to write */ -#else -int write(int fileno, /* File number */ - char *buf, /* The address of destination buffer */ - int count) /* The number of chacter to write */ -#endif -{ - long i; /* A variable for counter */ - unsigned char c; /* An output character */ - - /* Checking the mode of file , output each character */ - /* Checking the attribute for Write-Only, Read-Only or Read-Write */ - if(flmod[fileno]&O_WRONLY || flmod[fileno]&O_RDWR) - { - if( fileno == STDIN ) return -1; /* Standard Input */ - else if( (fileno == STDOUT) || (fileno == STDERR) ) - /* Standard Error/output */ - { - for( i = count; i > 0; --i ) - { - c = *buf++; - charput(c); - } - return count; /*Return the number of written characters */ - } - else return -1; /* Incorrect file number */ - } - else return -1; /* An error */ -} - -#if defined( __RX ) -long read( long fileno, unsigned char *buf, long count ) -#else -int read( int fileno, char *buf, unsigned int count ) -#endif -{ - long i; - - /* Checking the file mode with the file number, each character is input and stored the buffer */ - - if((flmod[fileno]&_MOPENR) || (flmod[fileno]&O_RDWR)){ - for(i = count; i > 0; i--){ - *buf = charget(); - if(*buf==CR){ /* Replace the new line character */ - *buf = LF; - } - buf++; - } - return count; - } - else { - return -1; - } -} - -#if defined( __RX ) -long lseek( long fileno, long offset, long base ) -#else -long lseek( int fileno, long offset, int base ) -#endif -{ - return -1L; -} - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/mcu_info.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/mcu_info.h deleted file mode 100644 index bf33ebcde..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/mcu_info.h +++ /dev/null @@ -1,59 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : mcu_info.h -* Device(s) : RX -* H/W Platform : RSK+RX63N -* Description : Information about the MCU on this board. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 28.11.2011 1.00 First Release -* : 13.03.2012 1.10 System clock speeds are now calculated from macros in r_bsp_config.h. -***********************************************************************************************************************/ - -#ifndef _MCU_INFO -#define _MCU_INFO - -/* MCU that is used. */ -#define MCU_RX63N (1) - -/* Package. */ -#define PACKAGE_LQFP176 (1) - -/* Memory size of your MCU. */ -#define ROM_SIZE_BYTES (1048576) -#define RAM_SIZE_BYTES (131072) -#define DF_SIZE_BYTES (32768) - -/* System clock speed in Hz. */ -#define ICLK_HZ (((XTAL_HZ/PLL_DIV) * PLL_MUL) / ICK_DIV) -/* Peripheral Module Clock A speed in Hz. Used for ETHERC and EDMAC. */ -#define PCLKA_HZ (((XTAL_HZ/PLL_DIV) * PLL_MUL) / PCKA_DIV) -/* Peripheral Module Clock B speed in Hz. */ -#define PCLKB_HZ (((XTAL_HZ/PLL_DIV) * PLL_MUL) / PCKB_DIV) -/* External bus clock speed in Hz. */ -#define BCLK_HZ (((XTAL_HZ/PLL_DIV) * PLL_MUL) / BCK_DIV) -/* FlashIF clock speed in Hz. */ -#define FCLK_HZ (((XTAL_HZ/PLL_DIV) * PLL_MUL) / FCK_DIV) -/* USB clock speed in Hz. */ -#define UCLK_HZ (((XTAL_HZ/PLL_DIV) * PLL_MUL) / UCK_DIV) - -#endif /* _MCU_INFO */ - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp.h deleted file mode 100644 index dbb95f4a1..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp.h +++ /dev/null @@ -1,54 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : r_bsp.h -* H/W Platform : RSK+RX63N -* Description : Has the header files that should be included for this platform. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 13.01.2012 1.00 First Release -* : 13.03.2012 1.10 Added locking.h and r_bsp_config.h #includes. Removed sbrk.h since heap size is not -* defined in r_bsp_config.h. -***********************************************************************************************************************/ - -#ifndef PLATFORM_BOARD_RSKRX63N -#define PLATFORM_BOARD_RSKRX63N - -/* Make sure that no other platforms have already been defined. Do not touch this! */ -#ifdef PLATFORM_DEFINED -#error "Error - Multiple platforms defined in platform.h!" -#else -#define PLATFORM_DEFINED -#endif - -/*********************************************************************************************************************** -INCLUDE APPROPRIATE MCU AND BOARD FILES -***********************************************************************************************************************/ -#include "r_bsp_config.h" -#include ".\mcu\rx63n\iodefine.h" -#include ".\board\rskrx63n\rskrx63n.h" -#include ".\board\rskrx63n\mcu_info.h" -#include ".\board\rskrx63n\hwsetup.h" -/*#include ".\board\rskrx63n\lcd.h" Not currently used. */ -/* #include ".\board\rskrx63n\locking.h" Not currently used. */ - -#endif /* PLATFORM_BOARD_RSKRX63N */ - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp_config_reference.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp_config_reference.h deleted file mode 100644 index 0b00618ef..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/r_bsp_config_reference.h +++ /dev/null @@ -1,149 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : r_bsp_config_reference.c -* Device(s) : RX63x -* Description : The file r_bsp_config.h is used to configure your BSP. r_bsp_config.h should be included -* somewhere in your package so that the r_bsp code has access to it. This file (r_bsp_config_reference.h) -* is just a reference file that the user can use to make their own r_bsp_config.h file. -************************************************************************************************************************ -* History : DD.MM.YYYY Version Description -* : 13.03.2012 1.00 First Release -***********************************************************************************************************************/ -#ifndef R_BSP_CONFIG_REF_HEADER_FILE -#define R_BSP_CONFIG_REF_HEADER_FILE - -/*********************************************************************************************************************** -Configuration Options -***********************************************************************************************************************/ -/* The 'BSP_DECLARE_STACK' macro is checked so that the stack is only declared in one place (resetprg.c). Every time a - '#pragma stacksize' is encountered, the stack size is increased. This prevents multiplication of stack size. */ -#if defined(BSP_DECLARE_STACK) -/* User Stack size in bytes. The Renesas RX toolchain sets the stack size using the #pragma stacksize directive. */ -#pragma stacksize su=0x1000 -/* Interrupt Stack size in bytes. The Renesas RX toolchain sets the stack size using the #pragma stacksize directive. */ -#pragma stacksize si=0x400 -#endif - -/* Heap size in bytes. */ -#define HEAP_BYTES (0x400) - -/* After reset MCU will operate in Supervisor mode. To switch to User mode, set this macro to '1'. For more information - on the differences between these 2 modes see the CPU >> Processor Mode section of your MCU's hardware manual. - 0 = Stay in Supervisor mode. - 1 = Switch to User mode. -*/ -#define RUN_IN_USER_MODE (0) - -/* To get into User Boot Mode the user must control some pins on the MCU and also set some values in ROM. These values - in ROM are described in the Option-Setting Memory section of the hardware manual. This macro sets these values so - that User Boot Mode can be used. The user is still responsible for setting the MCU pins appropriately. - 0 = Single-Chip or USB Boot Mode - 1 = User Boot Mode -*/ -#define USER_BOOT_ENABLE (0) - -/* Set your desired ID code. NOTE, leave at the default (all 0xFF's) if you do not wish to use an ID code. If you set - this value and program it into the MCU then you will need to remember the ID code because the debugger will ask for - it when trying to connect. Note that the E1/E20 will ignore the ID code when programming the MCU during debugging. - If you set this value and then forget it then you can clear the ID code by connecting up in serial boot mode using - FDT. The ID Code is 16 bytes long. The macro below define the ID Code in 4-byte sections. */ -/* Lowest 4-byte section, address 0xFFFFFFA0. From MSB to LSB: Control Code, ID code 1, ID code 2, ID code 3. */ -#define ID_CODE_LONG_1 (0xFFFFFFFF) -/* 2nd ID Code section, address 0xFFFFFFA4. From MSB to LSB: ID code 4, ID code 5, ID code 6, ID code 7. */ -#define ID_CODE_LONG_2 (0xFFFFFFFF) -/* 3rd ID Code section, address 0xFFFFFFA8. From MSB to LSB: ID code 8, ID code 9, ID code 10, ID code 11. */ -#define ID_CODE_LONG_3 (0xFFFFFFFF) -/* 4th ID Code section, address 0xFFFFFFAC. From MSB to LSB: ID code 12, ID code 13, ID code 14, ID code 15. */ -#define ID_CODE_LONG_4 (0xFFFFFFFF) - -/* This macro lets other modules no if a RTOS is being used. - 0 = RTOS is not used. - 1 = RTOS is used. -*/ -#define RTOS_USED (0) - -/* Clock source select (CKSEL). - 0 = Low Speed On-Chip Oscillator (LOCO) - 1 = High Speed On-Chip Oscillator (HOCO) - 2 = Main Clock Oscillator - 3 = Sub-Clock Oscillator - 4 = PLL Circuit -*/ -#define CLOCK_SOURCE (4) - -/* Clock configuration options. - The input clock frequency is specified and then the system clocks are set by specifying the multipliers used. The - multiplier settings are used to set the clock registers in resetprg.c. If a 12MHz clock is used and the - ICLK is 96MHz, PCLKA is 48MHz, PCLKB is 48MHz, FCLK is 48MHz, USB Clock is 48MHz, and BCLK is 12MHz then the - settings would be: - - XTAL_HZ = 12000000 - PLL_DIV = 1 (no division) - PLL_MUL = 16 (12MHz x 16 = 192MHz) - ICK_DIV = 2 : System Clock (ICLK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / ICK_DIV) = 96MHz - PCKA_DIV = 4 : Peripheral Clock A (PCLKA) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / PCKA_DIV) = 48MHz - PCKB_DIV = 4 : Peripheral Clock B (PCLKB) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / PCKB_DIV) = 48MHz - FCK_DIV = 4 : Flash IF Clock (FCLK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / FCK_DIV) = 48MHz - BCK_DIV = 8 : External Bus Clock (BCK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / BCK_DIV) = 24MHz - UCK_DIV = 4 : USB Clock (UCLK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / UCK_DIV) = 48MHz -*/ -/* XTAL - Input clock frequency in Hz */ -#define XTAL_HZ (12000000) -/* PLL Input Frequency Divider Select (PLIDIV). - Available divisors = /1 (no division), /2, /4 -*/ -#define PLL_DIV (1) -/* PLL Frequency Multiplication Factor Select (STC). - Available multipliers = x8, x10, x12, x16, x20, x24, x25, x50 -*/ -#define PLL_MUL (16) -/* System Clock Divider (ICK). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define ICK_DIV (2) -/* Peripheral Module Clock A Divider (PCKA). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define PCKA_DIV (4) -/* Peripheral Module Clock B Divider (PCKB). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define PCKB_DIV (4) -/* External Bus Clock Divider (BCK). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define BCK_DIV (8) -/* Flash IF Clock Divider (FCK). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define FCK_DIV (4) -/* IEBUS Clock Divider Select. - Available divisors = /1 (no division), /2, /4, /6, /8, /16, /32, /64 -*/ -#define IEBCK_DIV (8) -/* USB Clock Divider Select. - Available divisors = /3, /4 -*/ -#define UCK_DIV (4) - -#endif /* R_BSP_CONFIG_REF_HEADER_FILE */ - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/resetprg.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/resetprg.c deleted file mode 100644 index a8d08b9c0..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/resetprg.c +++ /dev/null @@ -1,409 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : resetprg.c -* Device(s) : RX63x -* Description : Defines post-reset routines that are used to configure the MCU prior to the main program starting. -* This is were the program counter starts on power-up or reset. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 26.10.2011 1.00 First Release -* : 13.03.2012 1.10 Stack sizes are now defined in r_bsp_config.h. Because of this the #include for -* stacksct.h was removed. Settings for SCKCR are now set in r_bsp_config.h and used here -* to setup clocks based on user settings. -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -Includes , "Project Includes" -***********************************************************************************************************************/ -/* Defines machine level functions used in this file */ -#include -/* Defines MCU configuration functions used in this file */ -#include <_h_c_lib.h> -/* Defines standard variable types used in this file */ -#include -#include - -/* This macro is here so that the stack will be declared here. This is used to prevent multiplication of stack size. */ -#define BSP_DECLARE_STACK -/* Define the target platform */ -#include "platform.h" - -/*********************************************************************************************************************** -Macro definitions -***********************************************************************************************************************/ -#define PSW_init (0x00030000) -#define FPSW_init (0x00000100) - -/*********************************************************************************************************************** -Pre-processor Directives -***********************************************************************************************************************/ -/* Declare the contents of the function 'Change_PSW_PM_to_UserMode' as - assembler to the compiler */ -#pragma inline_asm Change_PSW_PM_to_UserMode - -/* Set this as the entry point from a power-on reset */ -#pragma entry PowerON_Reset_PC - -/*********************************************************************************************************************** -External function Prototypes -***********************************************************************************************************************/ -/* Functions to setup I/O library */ -extern void _INIT_IOLIB(void); -extern void _CLOSEALL(void); - -/*********************************************************************************************************************** -Private global variables and functions -***********************************************************************************************************************/ -/* Power-on reset function declaration */ -void PowerON_Reset_PC(void); - -#if RUN_IN_USER_MODE==1 - #if __RENESAS_VERSION__ < 0x01010000 - /* MCU usermode switcher function declaration */ - static void Change_PSW_PM_to_UserMode(void); - #endif -#endif - -/* Main program function delcaration */ -void main(void); -static void operating_frequency_set(void); - -/*********************************************************************************************************************** -* Function name: PowerON_Reset_PC -* Description : This function is the MCU's entry point from a power-on reset. -* The following steps are taken in the startup code: -* 1. The User Stack Pointer (USP) and Interrupt Stack Pointer (ISP) are both set immediately after entry -* to this function. The USP and ISP stack sizes are set in the file stacksct.h. -* Default sizes are USP=4K and ISP=1K. -* 2. The interrupt vector base register is set to point to the beginning of the relocatable interrupt -* vector table. -* 3. The MCU is setup for floating point operations by setting the initial value of the Floating Point -* Status Word (FPSW). -* 4. The MCU operating frequency is set by configuring the Clock Generation Circuit (CGC) in -* operating_frequency_set. -* 5. Calls are made to functions to setup the C runtime environment which involves initializing all -* initialed data, zeroing all uninitialized variables, and configuring STDIO if used -* (calls to _INITSCT and _INIT_IOLIB). -* 6. Board-specific hardware setup, including configuring I/O pins on the MCU, in hardware_setup. -* 7. Global interrupts are enabled by setting the I bit in the Program Status Word (PSW), and the stack -* is switched from the ISP to the USP. The initial Interrupt Priority Level is set to zero, enabling -* any interrupts with a priority greater than zero to be serviced. -* 8. The processor is optionally switched to user mode. To run in user mode, set the macro -* RUN_IN_USER_MODE above to a 1. -* 9. The bus error interrupt is enabled to catch any accesses to invalid or reserved areas of memory. -* -* Once this initialization is complete, the user's main() function is called. It should not return. -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -void PowerON_Reset_PC(void) -{ - /* Stack pointers are setup prior to calling this function - see comments above */ - - /* Initialise the MCU processor word */ -#if __RENESAS_VERSION__ >= 0x01010000 - set_intb((void *)__sectop("C$VECT")); -#else - set_intb((unsigned long)__sectop("C$VECT")); -#endif - - /* Initialize FPSW for floating-point operations */ -#ifdef __ROZ -#define _ROUND 0x00000001 /* Let FPSW RMbits=01 (round to zero) */ -#else -#define _ROUND 0x00000000 /* Let FPSW RMbits=00 (round to nearest) */ -#endif -#ifdef __DOFF -#define _DENOM 0x00000100 /* Let FPSW DNbit=1 (denormal as zero) */ -#else -#define _DENOM 0x00000000 /* Let FPSW DNbit=0 (denormal as is) */ -#endif - set_fpsw(FPSW_init | _ROUND | _DENOM); - - /* Switch to high-speed operation */ - operating_frequency_set(); - - /* Initialize C runtime environment */ - _INITSCT(); - - /* Comment this out if not using I/O lib - _INIT_IOLIB(); */ - - /* Configure the MCU and YRDK hardware */ - hardware_setup(); - - /* Change the MCU's usermode from supervisor to user */ - nop(); - set_psw(PSW_init); -#if RUN_IN_USER_MODE==1 - /* Use chg_pmusr() intrinsic if possible. */ - #if __RENESAS_VERSION__ >= 0x01010000 - chg_pmusr() ; - #else - Change_PSW_PM_to_UserMode(); - #endif -#endif - - - /* Enable the bus error interrupt to catch accesses to illegal/reserved areas of memory */ - /* The ISR for this interrupt can be found in vecttbl.c in the function "bus_error_isr" */ - /* Clear any pending interrupts */ - IR(BSC,BUSERR) = 0; - /* Make this the highest priority interrupt (adjust as necessary for your application */ - IPR(BSC,BUSERR) = 0x0F; - /* Enable the interrupt in the ICU*/ - IEN(BSC,BUSERR) = 1; - /* Enable illegal address interrupt in the BSC */ - BSC.BEREN.BIT.IGAEN = 1; - - /* Call the main program function (should not return) */ - main(); - - /* Comment this out if not using I/O lib - cleans up open files */ - _CLOSEALL(); - - while(1) - { - /* Infinite loop. Put a breakpoint here if you want to catch an exit of main(). */ - } -} - -/*********************************************************************************************************************** -* Function name: operating_frequency_set -* Description : Configures the clock settings for each of the device clocks -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -void operating_frequency_set(void) -{ - /* Used for constructing value to write to SCKCR register. */ - uint32_t temp_clock = 0; - - /* - Clock Description Frequency - ---------------------------------------- - Input Clock Frequency............ 12 MHz - PLL frequency (x16).............. 192 MHz - Internal Clock Frequency......... 96 MHz - Peripheral Clock Frequency....... 48 MHz - USB Clock Frequency.............. 48 MHz - External Bus Clock Frequency..... 24 MHz */ - - volatile unsigned int i; - - /* Protect off. */ - SYSTEM.PRCR.WORD = 0xA50B; - - /* Uncomment if not using sub-clock */ - //SYSTEM.SOSCCR.BYTE = 0x01; /* stop sub-clock */ - SYSTEM.SOSCCR.BYTE = 0x00; /* Enable sub-clock for RTC */ - - /* Wait 131,072 cycles * 12 MHz = 10.9 ms */ - SYSTEM.MOSCWTCR.BYTE = 0x0D; - - /* PLL wait is 4,194,304 cycles (default) * 192 MHz (12 MHz * 16) = 20.1 ms*/ - SYSTEM.PLLWTCR.BYTE = 0x0F; - - /* Set PLL Input Divisor. */ - SYSTEM.PLLCR.BIT.PLIDIV = PLL_DIV >> 1; - - /* Set PLL Multiplier. */ - SYSTEM.PLLCR.BIT.STC = PLL_MUL - 1; - - /* EXTAL ON */ - SYSTEM.MOSCCR.BYTE = 0x00; - - /* PLL ON */ - SYSTEM.PLLCR2.BYTE = 0x00; - - for(i = 0;i< 0x168;i++) - { - /* Wait over 12ms */ - nop() ; - } - - /* Figure out setting for FCK bits. */ -#if FCK_DIV == 1 - /* Do nothing since FCK bits should be 0. */ -#elif FCK_DIV == 2 - temp_clock |= 0x10000000; -#elif FCK_DIV == 4 - temp_clock |= 0x20000000; -#elif FCK_DIV == 8 - temp_clock |= 0x30000000; -#elif FCK_DIV == 16 - temp_clock |= 0x40000000; -#elif FCK_DIV == 32 - temp_clock |= 0x50000000; -#elif FCK_DIV == 64 - temp_clock |= 0x60000000; -#else - #error "Error! Invalid setting for FCK_DIV in r_bsp_config.h" -#endif - - /* Figure out setting for ICK bits. */ -#if ICK_DIV == 1 - /* Do nothing since ICK bits should be 0. */ -#elif ICK_DIV == 2 - temp_clock |= 0x01000000; -#elif ICK_DIV == 4 - temp_clock |= 0x02000000; -#elif ICK_DIV == 8 - temp_clock |= 0x03000000; -#elif ICK_DIV == 16 - temp_clock |= 0x04000000; -#elif ICK_DIV == 32 - temp_clock |= 0x05000000; -#elif ICK_DIV == 64 - temp_clock |= 0x06000000; -#else - #error "Error! Invalid setting for ICK_DIV in r_bsp_config.h" -#endif - - /* SDCLK Pin Output and BCLK Pin Output are disabled by default. */ - temp_clock |= 0x00C00000; - - /* Figure out setting for BCK bits. */ -#if BCK_DIV == 1 - /* Do nothing since BCK bits should be 0. */ -#elif BCK_DIV == 2 - temp_clock |= 0x00010000; -#elif BCK_DIV == 4 - temp_clock |= 0x00020000; -#elif BCK_DIV == 8 - temp_clock |= 0x00030000; -#elif BCK_DIV == 16 - temp_clock |= 0x00040000; -#elif BCK_DIV == 32 - temp_clock |= 0x00050000; -#elif BCK_DIV == 64 - temp_clock |= 0x00060000; -#else - #error "Error! Invalid setting for BCK_DIV in r_bsp_config.h" -#endif - - /* Figure out setting for PCKA bits. */ -#if PCKA_DIV == 1 - /* Do nothing since PCKA bits should be 0. */ -#elif PCKA_DIV == 2 - temp_clock |= 0x00001000; -#elif PCKA_DIV == 4 - temp_clock |= 0x00002000; -#elif PCKA_DIV == 8 - temp_clock |= 0x00003000; -#elif PCKA_DIV == 16 - temp_clock |= 0x00004000; -#elif PCKA_DIV == 32 - temp_clock |= 0x00005000; -#elif PCKA_DIV == 64 - temp_clock |= 0x00006000; -#else - #error "Error! Invalid setting for PCKA_DIV in r_bsp_config.h" -#endif - - /* Figure out setting for PCKB bits. */ -#if PCKB_DIV == 1 - /* Do nothing since PCKB bits should be 0. */ -#elif PCKB_DIV == 2 - temp_clock |= 0x00000100; -#elif PCKB_DIV == 4 - temp_clock |= 0x00000200; -#elif PCKB_DIV == 8 - temp_clock |= 0x00000300; -#elif PCKB_DIV == 16 - temp_clock |= 0x00000400; -#elif PCKB_DIV == 32 - temp_clock |= 0x00000500; -#elif PCKB_DIV == 64 - temp_clock |= 0x00000600; -#else - #error "Error! Invalid setting for PCKB_DIV in r_bsp_config.h" -#endif - - /* Bottom byte of SCKCR register must be set to 0x11 */ - temp_clock |= 0x00000011; - - /* Set SCKCR register. */ - SYSTEM.SCKCR.LONG = temp_clock; - - /* Re-init temp_clock to use to set SCKCR2. */ - temp_clock = 0; - - /* Figure out setting for IEBCK bits. */ -#if IEBCK_DIV == 2 - temp_clock |= 0x00000001; -#elif IEBCK_DIV == 4 - temp_clock |= 0x00000002; -#elif IEBCK_DIV == 6 - temp_clock |= 0x0000000C; -#elif IEBCK_DIV == 8 - temp_clock |= 0x00000003; -#elif IEBCK_DIV == 16 - temp_clock |= 0x00000004; -#elif IEBCK_DIV == 32 - temp_clock |= 0x00000005; -#elif IEBCK_DIV == 64 - temp_clock |= 0x00000006; -#else - #error "Error! Invalid setting for IEBCK_DIV in r_bsp_config.h" -#endif - - /* Figure out setting for UCK bits. */ -#if UCK_DIV == 3 - temp_clock |= 0x00000020; -#elif UCK_DIV == 4 - temp_clock |= 0x00000030; -#else - #error "Error! Invalid setting for UCK_DIV in r_bsp_config.h" -#endif - - /* Set SCKCR2 register. */ - SYSTEM.SCKCR2.WORD = (uint16_t)temp_clock; - - /* Choose clock source. Default for r_bsp_config.h is PLL. */ - SYSTEM.SCKCR3.WORD = ((uint16_t)CLOCK_SOURCE) << 8; - - /* Protect on. */ - SYSTEM.PRCR.WORD = 0xA500; -} - -/*********************************************************************************************************************** -* Function name: Change_PSW_PM_to_UserMode -* Description : Assembler function, used to change the MCU's usermode from supervisor to user. -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -#if RUN_IN_USER_MODE==1 - #if __RENESAS_VERSION__ < 0x01010000 -static void Change_PSW_PM_to_UserMode(void) -{ - MVFC PSW,R1 - OR #00100000h,R1 - PUSH.L R1 - MVFC PC,R1 - ADD #10,R1 - PUSH.L R1 - RTE - NOP - NOP -} - #endif -#endif \ No newline at end of file diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/rskrx63n.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/rskrx63n.h deleted file mode 100644 index 669973416..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/rskrx63n.h +++ /dev/null @@ -1,65 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : rskrx63n.h -* H/W Platform : RSK+RX63N -* Description : Board specific definitions for the RSKRX630. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 28.11.2011 1.00 First Release -***********************************************************************************************************************/ - -#ifndef RSKRX63N_H -#define RSKRX63N_H - -/* Local defines */ -#define LED_ON (0) -#define LED_OFF (1) -#define SET_BIT_HIGH (1) -#define SET_BIT_LOW (0) -#define SET_BYTE_HIGH (0xFF) -#define SET_BYTE_LOW (0x00) - -/* Switches */ -#define SW_ACTIVE 0 -#define SW1 PORT3.PIDR.BIT.B2 -#define SW2 PORT0.PIDR.BIT.B0 -#define SW3 PORT0.PIDR.BIT.B7 -#define SW1_PDR PORT3.PDR.BIT.B2 -#define SW2_PDR PORT0.PDR.BIT.B0 -#define SW3_PDR PORT0.PDR.BIT.B7 -#define SW1_PMR PORT3.PMR.BIT.B2 -#define SW2_PMR PORT0.PMR.BIT.B0 -#define SW3_PMR PORT0.PMR.BIT.B7 - -/* LEDs */ -#define LED0 PORT0.PODR.BIT.B3 -#define LED1 PORT0.PODR.BIT.B5 -#define LED2 PORT1.PODR.BIT.B0 -#define LED3 PORT1.PODR.BIT.B1 -#define LED0_PDR PORT0.PDR.BIT.B3 -#define LED1_PDR PORT0.PDR.BIT.B5 -#define LED2_PDR PORT1.PDR.BIT.B0 -#define LED3_PDR PORT1.PDR.BIT.B1 - -/* Slave select. */ -#define FLASH_CS PORT3.PDR.BIT.B1 // SSLB0 - -#endif /* RSKRX63N_H */ diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/sbrk.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/sbrk.c deleted file mode 100644 index ef29b3190..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/sbrk.c +++ /dev/null @@ -1,96 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : sbrk.c -* Device(s) : RX -* Description : Configures the MCU heap memory. The size of the heap is defined by the macro HEAPSIZE below. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 26.10.2011 1.00 First Release -* : 12.03.2012 1.10 Heap size is now defined in r_bsp_config.h, not sbrk.h. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -Includes , "Project Includes" -***********************************************************************************************************************/ -/* Provides standard definitions used in this file */ -#include -/* Defines standard input/output functions used in this file */ -#include -/* Defines standard variable types used in this file */ -#include -/* Used for getting HEAP_BYTES macro. */ -#include "platform.h" - -/*********************************************************************************************************************** -Macro definitions -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -Function Prototypes -***********************************************************************************************************************/ -/* Memory allocation function prototype declaration */ -int8_t *sbrk(size_t size); - -/*********************************************************************************************************************** -Global Variables -***********************************************************************************************************************/ -//const size_t _sbrk_size= /* Specifies the minimum unit of */ -/* the defined heap area */ -extern int8_t *_s1ptr; - -union HEAP_TYPE -{ - int32_t dummy; /* Dummy for 4-byte boundary */ - int8_t heap[HEAP_BYTES]; /* Declaration of the area managed by sbrk*/ -}; -/* Declare memory heap area */ -static union HEAP_TYPE heap_area; -/* End address allocated by sbrk */ -static int8_t *brk=(int8_t *)&heap_area; - -/*********************************************************************************************************************** -* Function name: sbrk -* Description : This function configures MCU memory area allocation. -* Arguments : size - -* assigned area size -* Return value : Start address of allocated area (pass) -* -1 (failure) -***********************************************************************************************************************/ -int8_t *sbrk(size_t size) -{ - int8_t *p; - - if (brk+size > heap_area.heap+HEAP_BYTES) - { - /* Empty area size */ - p = (int8_t *)-1; - } - else - { - /* Area assignment */ - p = brk; - - /* End address update */ - brk += size; - } - - /* Return result */ - return p; -} diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/vecttbl.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/vecttbl.c deleted file mode 100644 index e528b1fd5..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/vecttbl.c +++ /dev/null @@ -1,186 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : vecttbl.c -* Device(s) : RX -* Description : Definition of the fixed vector table -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 26.10.2011 1.00 First Release -* : 17.02.2012 1.10 Made function names compliant with CS v4.0 -* : 13.03.2012 1.20 ID Code is now specified in r_bsp_config.h. It is still used here in Fixed_Vectors[]. -***********************************************************************************************************************/ - -/*********************************************************************************************************************** -Includes , "Project Includes" -***********************************************************************************************************************/ -#include -#include -#include "platform.h" - -/*********************************************************************************************************************** -* Function name: PowerON_Reset_PC -* Description : The reset vector points to this function. Code execution starts in this function after reset. -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -extern void PowerON_Reset_PC(void); - -/*********************************************************************************************************************** -* Function name: excep_supervisor_inst_isr -* Description : Supervisor Instruction Violation ISR -* Arguments : none -* Return Value : none -***********************************************************************************************************************/ -#pragma interrupt (excep_supervisor_inst_isr) -void excep_supervisor_inst_isr(void) -{ - /* Add your own code here to handle this exception */ - nop(); -} - -/*********************************************************************************************************************** -* Function name: excep_undefined_inst_isr -* Description : Undefined instruction exception ISR -* Arguments : none -* Return Value : none -***********************************************************************************************************************/ -#pragma interrupt (excep_undefined_inst_isr) -void excep_undefined_inst_isr(void) -{ - /* Add your own code here to handle this exception */ - nop(); -} - -/*********************************************************************************************************************** -* Function name: excep_floating_point_isr -* Description : Floating point exception ISR -* Arguments : none -* Return Value : none -***********************************************************************************************************************/ -#pragma interrupt (excep_floating_point_isr) -void excep_floating_point_isr(void) -{ - /* Add your own code here to handle this exception */ - nop(); -} - -/*********************************************************************************************************************** -* Function name: non_maskable_isr -* Description : Non-maskable interrupt ISR -* Arguments : none -* Return Value : none -***********************************************************************************************************************/ -#pragma interrupt (non_maskable_isr) -void non_maskable_isr(void) -{ - /* Add your own code here to handle this exception */ - nop(); -} - -/*********************************************************************************************************************** -* Function name: undefined_interrupt_source_isr -* Description : All undefined interrupt vectors point to this function. -* Set a breakpoint in this function to determine which source is creating unwanted interrupts. -* Arguments : none -* Return Value : none -***********************************************************************************************************************/ -#pragma interrupt (undefined_interrupt_source_isr) -void undefined_interrupt_source_isr(void) -{ - /* Add your own code here to handle this exception */ - nop(); -} - -/*********************************************************************************************************************** -* Function name: bus_error_isr -* Description : By default, this demo code enables the Bus Error Interrupt. This interrupt will fire if the user tries -* to access code or data from one of the reserved areas in the memory map, including the areas covered -* by disabled chip selects. A nop() statement is included here as a convenient place to set a breakpoint -* during debugging and development, and further handling should be added by the user for their -* application. -* Arguments : none -* Return value : none -***********************************************************************************************************************/ -#pragma interrupt (bus_error_isr(vect=VECT(BSC,BUSERR))) -void bus_error_isr (void) -{ - /* - To find the address that was accessed when the bus error occured, read the register BSC.BERSR2.WORD. The upper - 13 bits of this register contain the upper 13-bits of the offending address (in 512K byte units) - */ - - /* Add your own code here to handle this interrupt */ - nop(); -} - -/*********************************************************************************************************************** -* The following array fills in the fixed vector table and the code -* protecction ID bytes. -***********************************************************************************************************************/ -#pragma section C FIXEDVECT - -void* const Fixed_Vectors[] = { - -/* 0xffffff90 through 0xffffff9f: Reserved area - must be all 0xFF */ - (void *)0xFFFFFFFF, /* 0xffffff90 - Reserved */ - (void *)0xFFFFFFFF, /* 0xffffff94 - Reserved */ - (void *)0xFFFFFFFF, /* 0xffffff98 - Reserved */ - -/* The 32-bit area immediately below (0xffffff9c through 0xffffff9f) is a special area that allows the ROM to be - protected from reading or writing by a parallel programmer. Please refer to the HW manual for appropriate settings. - The default (all 0xff) places no restrictions and therefore allows reads and writes by a parallel programmer. */ - (void *)0xFFFFFFFF, /* 0xffffff9C - ROM Code Protection */ - -/* The memory are immediately below (0xffffffa0 through 0xffffffaf) is a special area that allows the on-chip firmware - to be protected. See the section "ID Code Protection" in the HW manual for details on how to enable protection. - Setting the four long words below to non-0xFF values will enable protection. Do this only after carefully review - the HW manual */ - -/* 0xffffffA0 through 0xffffffaf: ID Code Protection. The ID code is specified using macros in r_bsp_config.h. */ - (void *) ID_CODE_LONG_1, /* 0xffffffA0 - Control code and ID code */ - (void *) ID_CODE_LONG_2, /* 0xffffffA4 - ID code (cont.) */ - (void *) ID_CODE_LONG_3, /* 0xffffffA8 - ID code (cont.) */ - (void *) ID_CODE_LONG_4, /* 0xffffffAC - ID code (cont.) */ - -/* 0xffffffB0 through 0xffffffcf: Reserved area */ - (void *) 0xFFFFFFFF, /* 0xffffffB0 - Reserved */ - (void *) 0xFFFFFFFF, /* 0xffffffB4 - Reserved */ - (void *) 0xFFFFFFFF, /* 0xffffffB8 - Reserved */ - (void *) 0xFFFFFFFF, /* 0xffffffBC - Reserved */ - (void *) 0xFFFFFFFF, /* 0xffffffC0 - Reserved */ - (void *) 0xFFFFFFFF, /* 0xffffffC4 - Reserved */ - (void *) 0xFFFFFFFF, /* 0xffffffC8 - Reserved */ - (void *) 0xFFFFFFFF, /* 0xffffffCC - Reserved */ - -/* Fixed vector table */ - (void *) excep_supervisor_inst_isr, /* 0xffffffd0 Exception(Supervisor Instruction) */ - (void *) undefined_interrupt_source_isr, /* 0xffffffd4 Reserved */ - (void *) undefined_interrupt_source_isr, /* 0xffffffd8 Reserved */ - (void *) excep_undefined_inst_isr, /* 0xffffffdc Exception(Undefined Instruction) */ - (void *) undefined_interrupt_source_isr, /* 0xffffffe0 Reserved */ - (void *) excep_floating_point_isr, /* 0xffffffe4 Exception(Floating Point) */ - (void *) undefined_interrupt_source_isr, /* 0xffffffe8 Reserved */ - (void *) undefined_interrupt_source_isr, /* 0xffffffec Reserved */ - (void *) undefined_interrupt_source_isr, /* 0xfffffff0 Reserved */ - (void *) undefined_interrupt_source_isr, /* 0xfffffff4 Reserved */ - (void *) non_maskable_isr, /* 0xfffffff8 NMI */ - (void *) PowerON_Reset_PC /* 0xfffffffc RESET */ -}; diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h deleted file mode 100644 index a543fba63..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h +++ /dev/null @@ -1,12106 +0,0 @@ -/***********************************************************************/ -/* */ -/* FILE :iodefine.h */ -/* DATE :Mon, Jul 11, 2011 */ -/* DESCRIPTION :Definition of I/O Register */ -/* CPU TYPE :RX63N */ -/* */ -/* This file is generated by Renesas Project Generator (Ver.4.52). */ -/* NOTE:THIS IS A TYPICAL EXAMPLE. */ -/* */ -/***********************************************************************/ -/************************************************************************ -* -* Device : RX/RX600/RX63N -* -* File Name : ioedfine.h -* -* Abstract : Definition of I/O Register. -* -* History : 0.50 (2011-03-28) [Hardware Manual Revision : 0.50] -* : 0.02 (2010-11-01) [Hardware Manual Revision : 0.01] -* -* NOTE : THIS IS A TYPICAL EXAMPLE. -* -* Copyright (C) 2010(2011) Renesas Electronics Corporation -* and Renesas Solutions Corp. -* -************************************************************************/ -/********************************************************************************/ -/* */ -/* DESCRIPTION : Definition of ICU Register */ -/* CPU TYPE : RX63N */ -/* */ -/* Usage : IR,DTCER,IER,IPR of ICU Register */ -/* The following IR, DTCE, IEN, IPR macro functions simplify usage. */ -/* The bit access operation is "Bit_Name(interrupt source,name)". */ -/* A part of the name can be omitted. */ -/* for example : */ -/* IR(TPU0,TGI0A) = 0; expands to : */ -/* ICU.IR[126].BIT.IR = 0; */ -/* */ -/* DTCE(ICU,IRQ0) = 1; expands to : */ -/* ICU.DTCER[64].BIT.DTCE = 1; */ -/* */ -/* IEN(CMT0,CMI0) = 1; expands to : */ -/* ICU.IER[0x03].BIT.IEN4 = 1; */ -/* */ -/* IPR(TPU0,TGI0A) = 2; expands to : */ -/* IPR(TPU0,TGI ) = 2; // TGI0A,TGI0B,TGI0C,TGI0D share IPR level. */ -/* ICU.IPR[126].BIT.IPR = 2; */ -/* */ -/* IPR(SCI0,RXI0) = 3; expands to : */ -/* IPR(SCI0, ) = 3; // SCI0 uses single IPR for all sources. */ -/* ICU.IPR[214].BIT.IPR = 3; */ -/* */ -/* Usage : #pragma interrupt Function_Identifier(vect=**) */ -/* The number of vector is "(interrupt source, name)". */ -/* for example : */ -/* #pragma interrupt INT_IRQ0(vect=VECT(ICU,IRQ0)) expands to : */ -/* #pragma interrupt INT_IRQ0(vect=64) */ -/* #pragma interrupt INT_CMT0_CMI0(vect=VECT(CMT0,CMI0)) expands to : */ -/* #pragma interrupt INT_CMT0_CMI0(vect=28) */ -/* #pragma interrupt INT_MTU0_TGIA0(vect=VECT(MTU0,TGIA0)) expands to : */ -/* #pragma interrupt INT_MTU0_TGIA0(vect=142) */ -/* #pragma interrupt INT_TPU0_TGI0A(vect=VECT(TPU0,TGI0A)) expands to : */ -/* #pragma interrupt INT_TPU0_TGI0A(vect=126) */ -/* */ -/* Usage : MSTPCRA,MSTPCRB,MSTPCRC of SYSTEM Register */ -/* The bit access operation is "MSTP(name)". */ -/* The name that can be used is a macro name defined with "iodefine.h". */ -/* for example : */ -/* MSTP(TMR2) = 0; // TMR2,TMR3,TMR23 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA4 = 0; */ -/* MSTP(SCI0) = 0; // SCI0,SMCI0 expands to : */ -/* SYSTEM.MSTPCRB.BIT.MSTPB31 = 0; */ -/* MSTP(MTU4) = 0; // MTU,MTU0,MTU1,MTU2,MTU3,MTU4,MTU5 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA9 = 0; */ -/* MSTP(TPU4) = 0; // TPU0,TPU1,TPU2,TPU3,TPU4,TPU5 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA13 = 0; */ -/* MSTP(CMT3) = 0; // CMT2,CMT3 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA14 = 0; */ -/* */ -/* */ -/********************************************************************************/ -#ifndef __RX63NIODEFINE_HEADER__ -#define __RX63NIODEFINE_HEADER__ -#pragma bit_order left -#pragma unpack -struct st_ad { - unsigned short ADDRA; - unsigned short ADDRB; - unsigned short ADDRC; - unsigned short ADDRD; - unsigned short ADDRE; - unsigned short ADDRF; - unsigned short ADDRG; - unsigned short ADDRH; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ADIE:1; - unsigned char ADST:1; - unsigned char :2; - unsigned char CH:3; - } BIT; - } ADCSR; - union { - unsigned char BYTE; - struct { - unsigned char TRGS:3; - unsigned char :1; - unsigned char CKS:2; - unsigned char MODE:2; - } BIT; - } ADCR; - union { - unsigned char BYTE; - struct { - unsigned char DPSEL:1; - unsigned char EXOEN:1; - unsigned char EXSEL:2; - } BIT; - } ADCR2; - unsigned char ADSSTR; - char wk0[11]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char DIAG:2; - } BIT; - } ADDIAGR; -}; - -struct st_bsc { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char STSCLR:1; - } BIT; - } BERCLR; - char wk0[3]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TOEN:1; - unsigned char IGAEN:1; - } BIT; - } BEREN; - char wk1[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MST:3; - unsigned char :2; - unsigned char TO:1; - unsigned char IA:1; - } BIT; - } BERSR1; - char wk2[1]; - union { - unsigned short WORD; - struct { - unsigned short ADDR:13; - } BIT; - } BERSR2; - char wk3[4]; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short BPEB:2; - unsigned short BPFB:2; - unsigned short BPHB:2; - unsigned short BPGB:2; - unsigned short BPIB:2; - unsigned short BPRO:2; - unsigned short BPRA:2; - } BIT; - } BUSPRI; - char wk4[7408]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS0MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS0WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS0WCR2; - char wk5[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS1MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS1WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS1WCR2; - char wk6[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS2MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS2WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS2WCR2; - char wk7[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS3MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS3WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS3WCR2; - char wk8[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS4MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS4WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS4WCR2; - char wk9[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS5MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS5WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS5WCR2; - char wk10[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS6MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS6WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS6WCR2; - char wk11[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS7MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS7WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS7WCR2; - char wk12[1926]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS0CR; - char wk13[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS0REC; - char wk14[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS1CR; - char wk15[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS1REC; - char wk16[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS2CR; - char wk17[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS2REC; - char wk18[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS3CR; - char wk19[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS3REC; - char wk20[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS4CR; - char wk21[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS4REC; - char wk22[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS5CR; - char wk23[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS5REC; - char wk24[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS6CR; - char wk25[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS6REC; - char wk26[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS7CR; - char wk27[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS7REC; - char wk28[4]; - union { - unsigned short WORD; - struct { - unsigned short RCVENM7:1; - unsigned short RCVENM6:1; - unsigned short RCVENM5:1; - unsigned short RCVENM4:1; - unsigned short RCVENM3:1; - unsigned short RCVENM2:1; - unsigned short RCVENM1:1; - unsigned short RCVENM0:1; - unsigned short RCVEN7:1; - unsigned short RCVEN6:1; - unsigned short RCVEN5:1; - unsigned short RCVEN4:1; - unsigned short RCVEN3:1; - unsigned short RCVEN2:1; - unsigned short RCVEN1:1; - unsigned short RCVEN0:1; - } BIT; - } CSRECEN; - char wk29[894]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char BSIZE:2; - unsigned char :3; - unsigned char EXENB:1; - } BIT; - } SDCCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char EMODE:1; - } BIT; - } SDCMOD; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char BE:1; - } BIT; - } SDAMOD; - char wk30[13]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SFEN:1; - } BIT; - } SDSELF; - char wk31[3]; - union { - unsigned short WORD; - struct { - unsigned short REFW:4; - unsigned short RFC:12; - } BIT; - } SDRFCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RFEN:1; - } BIT; - } SDRFEN; - char wk32[9]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char INIRQ:1; - } BIT; - } SDICR; - char wk33[3]; - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short PRC:3; - unsigned short ARFC:4; - unsigned short ARFI:4; - } BIT; - } SDIR; - char wk34[26]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char MXC:2; - } BIT; - } SDADR; - char wk35[3]; - union { - unsigned long LONG; - struct { - unsigned long :13; - unsigned long RAS:3; - unsigned long :2; - unsigned long RCD:2; - unsigned long RP:3; - unsigned long WR:1; - unsigned long :5; - unsigned long CL:3; - } BIT; - } SDTR; - union { - unsigned short WORD; - struct { - unsigned short :1; - unsigned short MR:15; - } BIT; - } SDMOD; - char wk36[6]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char SRFST:1; - unsigned char INIST:1; - unsigned char :2; - unsigned char MRSST:1; - } BIT; - } SDSR; -}; - -struct st_can { - struct { - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long IDE:1; - unsigned long RTR:1; - unsigned long :1; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } ID; - unsigned short DLC; - unsigned char DATA[8]; - unsigned short TS; - } MB[32]; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long :3; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } MKR[8]; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long IDE:1; - unsigned long RTR:1; - unsigned long :1; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } FIDCR0; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long IDE:1; - unsigned long RTR:1; - unsigned long :1; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } FIDCR1; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned char MB31:1; - unsigned char MB30:1; - unsigned char MB29:1; - unsigned char MB28:1; - unsigned char MB27:1; - unsigned char MB26:1; - unsigned char MB25:1; - unsigned char MB24:1; - unsigned char MB23:1; - unsigned char MB22:1; - unsigned char MB21:1; - unsigned char MB20:1; - unsigned char MB19:1; - unsigned char MB18:1; - unsigned char MB17:1; - unsigned char MB16:1; - unsigned char MB15:1; - unsigned char MB14:1; - unsigned char MB13:1; - unsigned char MB12:1; - unsigned char MB11:1; - unsigned char MB10:1; - unsigned char MB9:1; - unsigned char MB8:1; - unsigned char MB7:1; - unsigned char MB6:1; - unsigned char MB5:1; - unsigned char MB4:1; - unsigned char MB3:1; - unsigned char MB2:1; - unsigned char MB1:1; - unsigned char MB0:1; - } BIT; - } MKIVLR; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned char MB31:1; - unsigned char MB30:1; - unsigned char MB29:1; - unsigned char MB28:1; - unsigned char MB27:1; - unsigned char MB26:1; - unsigned char MB25:1; - unsigned char MB24:1; - unsigned char MB23:1; - unsigned char MB22:1; - unsigned char MB21:1; - unsigned char MB20:1; - unsigned char MB19:1; - unsigned char MB18:1; - unsigned char MB17:1; - unsigned char MB16:1; - unsigned char MB15:1; - unsigned char MB14:1; - unsigned char MB13:1; - unsigned char MB12:1; - unsigned char MB11:1; - unsigned char MB10:1; - unsigned char MB9:1; - unsigned char MB8:1; - unsigned char MB7:1; - unsigned char MB6:1; - unsigned char MB5:1; - unsigned char MB4:1; - unsigned char MB3:1; - unsigned char MB2:1; - unsigned char MB1:1; - unsigned char MB0:1; - } BIT; - } MIER; - char wk0[1008]; - union { - unsigned char BYTE; - union { - struct { - unsigned char TRMREQ:1; - unsigned char RECREQ:1; - unsigned char :1; - unsigned char ONESHOT:1; - unsigned char :1; - unsigned char TRMABT:1; - unsigned char TRMACTIVE:1; - unsigned char SENTDATA:1; - } TX; - struct { - unsigned char TRMREQ:1; - unsigned char RECREQ:1; - unsigned char :1; - unsigned char ONESHOT:1; - unsigned char :1; - unsigned char MSGLOST:1; - unsigned char INVALDATA:1; - unsigned char NEWDATA:1; - } RX; - } BIT; - } MCTL[32]; - union { - unsigned short WORD; - struct { - unsigned char H; - unsigned char L; - } BYTE; - struct { - unsigned char :2; - unsigned char RBOC:1; - unsigned char BOM:2; - unsigned char SLPM:1; - unsigned char CANM:2; - unsigned char TSPS:2; - unsigned char TSRC:1; - unsigned char TPM:1; - unsigned char MLM:1; - unsigned char IDFM:2; - unsigned char MBM:1; - } BIT; - } CTLR; - union { - unsigned short WORD; - struct { - unsigned char H; - unsigned char L; - } BYTE; - struct { - unsigned char :1; - unsigned char RECST:1; - unsigned char TRMST:1; - unsigned char BOST:1; - unsigned char EPST:1; - unsigned char SLPST:1; - unsigned char HLTST:1; - unsigned char RSTST:1; - unsigned char EST:1; - unsigned char TABST:1; - unsigned char FMLST:1; - unsigned char NMLST:1; - unsigned char TFST:1; - unsigned char RFST:1; - unsigned char SDST:1; - unsigned char NDST:1; - } BIT; - } STR; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long TSEG1:4; - unsigned long :2; - unsigned long BRP:10; - unsigned long :2; - unsigned long SJW:2; - unsigned long :1; - unsigned long TSEG2:3; - unsigned long :7; - unsigned long CCLKS:1; - } BIT; - } BCR; - union { - unsigned char BYTE; - struct { - unsigned char RFEST:1; - unsigned char RFWST:1; - unsigned char RFFST:1; - unsigned char RFMLF:1; - unsigned char RFUST:3; - unsigned char RFE:1; - } BIT; - } RFCR; - unsigned char RFPCR; - union { - unsigned char BYTE; - struct { - unsigned char TFEST:1; - unsigned char TFFST:1; - unsigned char :2; - unsigned char TFUST:3; - unsigned char TFE:1; - } BIT; - } TFCR; - unsigned char TFPCR; - union { - unsigned char BYTE; - struct { - unsigned char BLIE:1; - unsigned char OLIE:1; - unsigned char ORIE:1; - unsigned char BORIE:1; - unsigned char BOEIE:1; - unsigned char EPIE:1; - unsigned char EWIE:1; - unsigned char BEIE:1; - } BIT; - } EIER; - union { - unsigned char BYTE; - struct { - unsigned char BLIF:1; - unsigned char OLIF:1; - unsigned char ORIF:1; - unsigned char BORIF:1; - unsigned char BOEIF:1; - unsigned char EPIF:1; - unsigned char EWIF:1; - unsigned char BEIF:1; - } BIT; - } EIFR; - unsigned char RECR; - unsigned char TECR; - union { - unsigned char BYTE; - struct { - unsigned char EDPM:1; - unsigned char ADEF:1; - unsigned char BE0F:1; - unsigned char BE1F:1; - unsigned char CEF:1; - unsigned char AEF:1; - unsigned char FEF:1; - unsigned char SEF:1; - } BIT; - } ECSR; - unsigned char CSSR; - union { - unsigned char BYTE; - struct { - unsigned char SEST:1; - unsigned char :2; - unsigned char MBNST:5; - } BIT; - } MSSR; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char MBSM:2; - } BIT; - } MSMR; - unsigned short TSR; - unsigned short AFSR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TSTM:2; - unsigned char TSTE:1; - } BIT; - } TCR; -}; - -struct st_cmt { - union { - unsigned short WORD; - struct { - unsigned short :14; - unsigned short STR1:1; - unsigned short STR0:1; - } BIT; - } CMSTR0; - char wk0[14]; - union { - unsigned short WORD; - struct { - unsigned short :14; - unsigned short STR3:1; - unsigned short STR2:1; - } BIT; - } CMSTR1; -}; - -struct st_cmt0 { - union { - unsigned short WORD; - struct { - unsigned short :9; - unsigned short CMIE:1; - unsigned short :4; - unsigned short CKS:2; - } BIT; - } CMCR; - unsigned short CMCNT; - unsigned short CMCOR; -}; - -struct st_crc { - union { - unsigned char BYTE; - struct { - unsigned char DORCLR:1; - unsigned char :4; - unsigned char LMS:1; - unsigned char GPS:2; - } BIT; - } CRCCR; - unsigned char CRCDIR; - unsigned short CRCDOR; -}; - -struct st_da { - unsigned short DADR0; - unsigned short DADR1; - union { - unsigned char BYTE; - struct { - unsigned char DAOE1:1; - unsigned char DAOE0:1; - unsigned char DAE:1; - } BIT; - } DACR; - union { - unsigned char BYTE; - struct { - unsigned char DPSEL:1; - } BIT; - } DADPR; - union { - unsigned char BYTE; - struct { - unsigned char DAADST:1; - } BIT; - } DAADSCR; -}; - -struct st_dmac { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DMST:1; - } BIT; - } DMAST; -}; - -struct st_dmac0 { - unsigned long DMSAR; - unsigned long DMDAR; - unsigned long DMCRA; - unsigned short DMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } DMTMD; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } DMINT; - union { - unsigned short WORD; - struct { - unsigned short SM:2; - unsigned short :1; - unsigned short SARA:5; - unsigned short DM:2; - unsigned short :1; - unsigned short DARA:5; - } BIT; - } DMAMD; - char wk2[2]; - unsigned long DMOFR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } DMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } DMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } DMSTS; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DISEL:1; - } BIT; - } DMCSL; -}; - -struct st_dmac1 { - unsigned long DMSAR; - unsigned long DMDAR; - unsigned long DMCRA; - unsigned short DMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } DMTMD; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } DMINT; - union { - unsigned short WORD; - struct { - unsigned short SM:2; - unsigned short :1; - unsigned short SARA:5; - unsigned short DM:2; - unsigned short :1; - unsigned short DARA:5; - } BIT; - } DMAMD; - char wk2[6]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } DMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } DMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } DMSTS; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DISEL:1; - } BIT; - } DMCSL; -}; - -struct st_dtc { - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char RRS:1; - } BIT; - } DTCCR; - char wk0[3]; - unsigned long DTCVBR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SHORT:1; - } BIT; - } DTCADMOD; - char wk1[3]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTCST:1; - } BIT; - } DTCST; - char wk2[1]; - union { - unsigned short WORD; - struct { - unsigned short ACT:1; - unsigned short :7; - unsigned short VECN:8; - } BIT; - } DTCSTS; -}; - -struct st_edmac { - union { - unsigned long LONG; - struct { - unsigned long :25; - unsigned long DE:1; - unsigned long DL:2; - unsigned long :3; - unsigned long SWR:1; - } BIT; - } EDMR; - char wk0[4]; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long TR:1; - } BIT; - } EDTRR; - char wk1[4]; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long RR:1; - } BIT; - } EDRRR; - char wk2[4]; - unsigned long TDLAR; - char wk3[4]; - unsigned long RDLAR; - char wk4[4]; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long TWB:1; - unsigned long :3; - unsigned long TABT:1; - unsigned long RABT:1; - unsigned long RFCOF:1; - unsigned long ADE:1; - unsigned long ECI:1; - unsigned long TC:1; - unsigned long TDE:1; - unsigned long TFUF:1; - unsigned long FR:1; - unsigned long RDE:1; - unsigned long RFOF:1; - unsigned long :4; - unsigned long CND:1; - unsigned long DLC:1; - unsigned long CD:1; - unsigned long TRO:1; - unsigned long RMAF:1; - unsigned long :2; - unsigned long RRF:1; - unsigned long RTLF:1; - unsigned long RTSF:1; - unsigned long PRE:1; - unsigned long CERF:1; - } BIT; - } EESR; - char wk5[4]; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long TWBIP:1; - unsigned long :3; - unsigned long TABTIP:1; - unsigned long RABTIP:1; - unsigned long RFCOFIP:1; - unsigned long ADEIP:1; - unsigned long ECIIP:1; - unsigned long TCIP:1; - unsigned long TDEIP:1; - unsigned long TFUFIP:1; - unsigned long FRIP:1; - unsigned long RDEIP:1; - unsigned long RFOFIP:1; - unsigned long :4; - unsigned long CNDIP:1; - unsigned long DLCIP:1; - unsigned long CDIP:1; - unsigned long TROIP:1; - unsigned long RMAFIP:1; - unsigned long :2; - unsigned long RRFIP:1; - unsigned long RTLFIP:1; - unsigned long RTSFIP:1; - unsigned long PREIP:1; - unsigned long CERFIP:1; - } BIT; - } EESIPR; - char wk6[4]; - union { - unsigned long LONG; - struct { - unsigned long :20; - unsigned long CNDCE:1; - unsigned long DLCCE:1; - unsigned long CDCE:1; - unsigned long TROCE:1; - unsigned long RMAFCE:1; - unsigned long :2; - unsigned long RRFCE:1; - unsigned long RTLFCE:1; - unsigned long RTSFCE:1; - unsigned long PRECE:1; - unsigned long CERFCE:1; - } BIT; - } TRSCER; - char wk7[4]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long MFC:16; - } BIT; - } RMFCR; - char wk8[4]; - union { - unsigned long LONG; - struct { - unsigned long :21; - unsigned long TFT:11; - } BIT; - } TFTR; - char wk9[4]; - union { - unsigned long LONG; - struct { - unsigned long :19; - unsigned long TFD:5; - unsigned long :3; - unsigned long RFD:5; - } BIT; - } FDR; - char wk10[4]; - union { - unsigned long LONG; - struct { - unsigned long :30; - unsigned long RNC:1; - unsigned long RNR:1; - } BIT; - } RMCR; - char wk11[8]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long UNDER:16; - } BIT; - } TFUCR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long OVER:16; - } BIT; - } RFOCR; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long ELB:1; - } BIT; - } IOSR; - union { - unsigned long LONG; - struct { - unsigned long :13; - unsigned long RFFO:3; - unsigned long :13; - unsigned long RFDO:3; - } BIT; - } FCFTR; - char wk12[4]; - union { - unsigned long LONG; - struct { - unsigned long :14; - unsigned long PADS:2; - unsigned long :10; - unsigned long PADR:6; - } BIT; - } RPADIR; - union { - unsigned long LONG; - struct { - unsigned long :27; - unsigned long TIM:1; - unsigned long :3; - unsigned long TIS:1; - } BIT; - } TRIMD; - char wk13[72]; - unsigned long RBWAR; - unsigned long RDFAR; - char wk14[4]; - unsigned long TBRAR; - unsigned long TDFAR; -}; - -struct st_etherc { - union { - unsigned long LONG; - struct { - unsigned long :11; - unsigned long TPC:1; - unsigned long ZPE:1; - unsigned long PFR:1; - unsigned long RXF:1; - unsigned long TXF:1; - unsigned long :3; - unsigned long PRCEF:1; - unsigned long :2; - unsigned long MPDE:1; - unsigned long :2; - unsigned long RE:1; - unsigned long TE:1; - unsigned long :1; - unsigned long ILB:1; - unsigned long RTM:1; - unsigned long DM:1; - unsigned long PRM:1; - } BIT; - } ECMR; - char wk0[4]; - union { - unsigned long LONG; - struct { - unsigned long :20; - unsigned long RFL:12; - } BIT; - } RFLR; - char wk1[4]; - union { - unsigned long LONG; - struct { - unsigned long :26; - unsigned long BFR:1; - unsigned long PSRTO:1; - unsigned long :1; - unsigned long LCHNG:1; - unsigned long MPD:1; - unsigned long ICD:1; - } BIT; - } ECSR; - char wk2[4]; - union { - unsigned long LONG; - struct { - unsigned long :26; - unsigned long BFSIPR:1; - unsigned long PSRTOIP:1; - unsigned long :1; - unsigned long LCHNGIP:1; - unsigned long MPDIP:1; - unsigned long ICDIP:1; - } BIT; - } ECSIPR; - char wk3[4]; - union { - unsigned long LONG; - struct { - unsigned long :28; - unsigned long MDI:1; - unsigned long MDO:1; - unsigned long MMD:1; - unsigned long MDC:1; - } BIT; - } PIR; - char wk4[4]; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long LMON:1; - } BIT; - } PSR; - char wk5[20]; - union { - unsigned long LONG; - struct { - unsigned long :12; - unsigned long RMD:20; - } BIT; - } RDMLR; - char wk6[12]; - union { - unsigned long LONG; - struct { - unsigned long :27; - unsigned long IPG:5; - } BIT; - } IPGR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long AP:16; - } BIT; - } APR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long MP:16; - } BIT; - } MPR; - char wk7[4]; - union { - unsigned long LONG; - struct { - unsigned long :24; - unsigned long RPAUSE:8; - } BIT; - } RFCF; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long TPAUSE:16; - } BIT; - } TPAUSER; - union { - unsigned long LONG; - struct { - unsigned long :24; - unsigned long TXP:8; - } BIT; - } TPAUSECR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long BCF:16; - } BIT; - } BCFRR; - char wk8[80]; - unsigned long MAHR; - char wk9[4]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long MA:16; - } BIT; - } MALR; - char wk10[4]; - unsigned long TROCR; - unsigned long CDCR; - unsigned long LCCR; - unsigned long CNDCR; - char wk11[4]; - unsigned long CEFCR; - unsigned long FRECR; - unsigned long TSFRCR; - unsigned long TLFRCR; - unsigned long RFCR; - unsigned long MAFCR; -}; - -struct st_exdmac { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DMST:1; - } BIT; - } EDMAST; - char wk0[479]; - unsigned long CLSBR0; - unsigned long CLSBR1; - unsigned long CLSBR2; - unsigned long CLSBR3; - unsigned long CLSBR4; - unsigned long CLSBR5; - unsigned long CLSBR6; - unsigned long CLSBR7; -}; - -struct st_exdmac0 { - unsigned long EDMSAR; - unsigned long EDMDAR; - unsigned long EDMCRA; - unsigned short EDMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } EDMTMD; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char DACKS:1; - unsigned char DACKE:1; - unsigned char DACKW:1; - } BIT; - } EDMOMD; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } EDMINT; - union { - unsigned long LONG; - struct { - unsigned long :14; - unsigned long AMS:1; - unsigned long DIR:1; - unsigned long SM:2; - unsigned long :1; - unsigned long SARA:5; - unsigned long DM:2; - unsigned long :1; - unsigned long DARA:5; - } BIT; - } EDMAMD; - unsigned long EDMOFR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } EDMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } EDMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } EDMSTS; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char DREQS:2; - } BIT; - } EDMRMD; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char EREQ:1; - } BIT; - } EDMERF; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PREQ:1; - } BIT; - } EDMPRF; -}; - -struct st_exdmac1 { - unsigned long EDMSAR; - unsigned long EDMDAR; - unsigned long EDMCRA; - unsigned short EDMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } EDMTMD; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char DACKS:1; - unsigned char DACKE:1; - unsigned char DACKW:1; - } BIT; - } EDMOMD; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } EDMINT; - union { - unsigned long LONG; - struct { - unsigned long :14; - unsigned long AMS:1; - unsigned long DIR:1; - unsigned long SM:2; - unsigned long :1; - unsigned long SARA:5; - unsigned long DM:2; - unsigned long :1; - unsigned long DARA:5; - } BIT; - } EDMAMD; - char wk1[4]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } EDMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } EDMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } EDMSTS; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char DREQS:2; - } BIT; - } EDMRMD; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char EREQ:1; - } BIT; - } EDMERF; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PREQ:1; - } BIT; - } EDMPRF; -}; - -struct st_flash { - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char FLWE:2; - } BIT; - } FWEPROR; - char wk0[7799147]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char FRDMD:1; - } BIT; - } FMODR; - char wk1[13]; - union { - unsigned char BYTE; - struct { - unsigned char ROMAE:1; - unsigned char :2; - unsigned char CMDLK:1; - unsigned char DFLAE:1; - unsigned char :1; - unsigned char DFLRPE:1; - unsigned char DFLWPE:1; - } BIT; - } FASTAT; - union { - unsigned char BYTE; - struct { - unsigned char ROMAEIE:1; - unsigned char :2; - unsigned char CMDLKIE:1; - unsigned char DFLAEIE:1; - unsigned char :1; - unsigned char DFLRPEIE:1; - unsigned char DFLWPEIE:1; - } BIT; - } FAEINT; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char FRDYIE:1; - } BIT; - } FRDYIE; - char wk2[45]; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBRE07:1; - unsigned short DBRE06:1; - unsigned short DBRE05:1; - unsigned short DBRE04:1; - unsigned short DBRE03:1; - unsigned short DBRE02:1; - unsigned short DBRE01:1; - unsigned short DBRE00:1; - } BIT; - } DFLRE0; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBRE15:1; - unsigned short DBRE14:1; - unsigned short DBRE13:1; - unsigned short DBRE12:1; - unsigned short DBRE11:1; - unsigned short DBRE10:1; - unsigned short DBRE09:1; - unsigned short DBRE08:1; - } BIT; - } DFLRE1; - char wk3[12]; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBWE07:1; - unsigned short DBW006:1; - unsigned short DBWE05:1; - unsigned short DBWE04:1; - unsigned short DBWE03:1; - unsigned short DBWE02:1; - unsigned short DBWE01:1; - unsigned short DBWE00:1; - } BIT; - } DFLWE0; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBWE15:1; - unsigned short DBWE14:1; - unsigned short DBWE13:1; - unsigned short DBWE12:1; - unsigned short DBWE11:1; - unsigned short DBWE10:1; - unsigned short DBWE09:1; - unsigned short DBWE08:1; - } BIT; - } DFLWE1; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short :7; - unsigned short FCRME:1; - } BIT; - } FCURAME; - char wk4[15194]; - union { - unsigned char BYTE; - struct { - unsigned char FRDY:1; - unsigned char ILGLERR:1; - unsigned char ERSERR:1; - unsigned char PRGERR:1; - unsigned char SUSRDY:1; - unsigned char :1; - unsigned char ERSSPD:1; - unsigned char PRGSPD:1; - } BIT; - } FSTATR0; - union { - unsigned char BYTE; - struct { - unsigned char FCUERR:1; - unsigned char :2; - unsigned char FLOCKST:1; - } BIT; - } FSTATR1; - union { - unsigned short WORD; - struct { - unsigned short FEKEY:8; - unsigned short FENTRYD:1; - unsigned short :3; - unsigned short FENTRY3:1; - unsigned short FENTRY2:1; - unsigned short FENTRY1:1; - unsigned short FENTRY0:1; - } BIT; - } FENTRYR; - union { - unsigned short WORD; - struct { - unsigned short FPKEY:8; - unsigned short :7; - unsigned short FPROTCN:1; - } BIT; - } FPROTR; - union { - unsigned short WORD; - struct { - unsigned short FRKEY:8; - unsigned short :7; - unsigned short FRESET:1; - } BIT; - } FRESETR; - char wk5[2]; - union { - unsigned short WORD; - struct { - unsigned short CMDR:8; - unsigned short PCMDR:8; - } BIT; - } FCMDR; - char wk6[12]; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short ESUSPMD:1; - } BIT; - } FCPSR; - union { - unsigned short WORD; - struct { - unsigned short BCSIZE:1; - unsigned short :4; - unsigned short BCADR:11; - } BIT; - } DFLBCCNT; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short PEERRST:8; - } BIT; - } FPESTAT; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short BCST:1; - } BIT; - } DFLBCSTAT; - char wk7[24]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short PCKA:8; - } BIT; - } PCKAR; -}; - -struct st_icu { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IR:1; - } BIT; - } IR[254]; - char wk0[2]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTCE:1; - } BIT; - } DTCER[252]; - char wk1[4]; - union { - unsigned char BYTE; - struct { - unsigned char IEN7:1; - unsigned char IEN6:1; - unsigned char IEN5:1; - unsigned char IEN4:1; - unsigned char IEN3:1; - unsigned char IEN2:1; - unsigned char IEN1:1; - unsigned char IEN0:1; - } BIT; - } IER[32]; - char wk2[192]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SWINT:1; - } BIT; - } SWINTR; - char wk3[15]; - union { - unsigned short WORD; - struct { - unsigned short FIEN:1; - unsigned short :7; - unsigned short FVCT:8; - } BIT; - } FIR; - char wk4[14]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char IPR:4; - } BIT; - } IPR[254]; - char wk5[2]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR0; - char wk6[3]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR1; - char wk7[3]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR2; - char wk8[3]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR3; - char wk9[243]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char IRQMD:2; - } BIT; - } IRQCR[16]; - union { - unsigned char BYTE; - struct { - unsigned char FLTEN7:1; - unsigned char FLTEN6:1; - unsigned char FLTEN5:1; - unsigned char FLTEN4:1; - unsigned char FLTEN3:1; - unsigned char FLTEN2:1; - unsigned char FLTEN1:1; - unsigned char FLTEN0:1; - } BIT; - } IRQFLTE0; - union { - unsigned char BYTE; - struct { - unsigned char FLTEN15:1; - unsigned char FLTEN14:1; - unsigned char FLTEN13:1; - unsigned char FLTEN12:1; - unsigned char FLTEN11:1; - unsigned char FLTEN10:1; - unsigned char FLTEN9:1; - unsigned char FLTEN8:1; - } BIT; - } IRQFLTE1; - char wk10[2]; - union { - unsigned short WORD; - struct { - unsigned short FCLKSEL7:2; - unsigned short FCLKSEL6:2; - unsigned short FCLKSEL5:2; - unsigned short FCLKSEL4:2; - unsigned short FCLKSEL3:2; - unsigned short FCLKSEL2:2; - unsigned short FCLKSEL1:2; - unsigned short FCLKSEL0:2; - } BIT; - } IRQFLTC0; - union { - unsigned short WORD; - struct { - unsigned short FCLKSEL15:2; - unsigned short FCLKSEL14:2; - unsigned short FCLKSEL13:2; - unsigned short FCLKSEL12:2; - unsigned short FCLKSEL11:2; - unsigned short FCLKSEL10:2; - unsigned short FCLKSEL9:2; - unsigned short FCLKSEL8:2; - } BIT; - } IRQFLTC1; - char wk11[104]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char LVD2ST:1; - unsigned char LVD1ST:1; - unsigned char IWDTST:1; - unsigned char WDTST:1; - unsigned char OSTST:1; - unsigned char NMIST:1; - } BIT; - } NMISR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char LVD2EN:1; - unsigned char LVD1EN:1; - unsigned char IWDTEN:1; - unsigned char WDTEN:1; - unsigned char OSTEN:1; - unsigned char NMIEN:1; - } BIT; - } NMIER; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char LVD2CLR:1; - unsigned char LVD1CLR:1; - unsigned char IWDTCLR:1; - unsigned char WDTCLR:1; - unsigned char OSTCLR:1; - unsigned char NMICLR:1; - } BIT; - } NMICLR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NMIMD:1; - } BIT; - } NMICR; - char wk12[12]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char NFLTEN:1; - } BIT; - } NMIFLTE; - char wk13[3]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char NFCLKSEL:2; - } BIT; - } NMIFLTC; - char wk14[19819]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long IS15:1; - unsigned long IS14:1; - unsigned long IS13:1; - unsigned long IS12:1; - unsigned long IS11:1; - unsigned long IS10:1; - unsigned long IS9:1; - unsigned long IS8:1; - unsigned long IS7:1; - unsigned long IS6:1; - unsigned long IS5:1; - unsigned long IS4:1; - unsigned long IS3:1; - unsigned long IS2:1; - unsigned long IS1:1; - unsigned long IS0:1; - } BIT; - } GRP[13]; - char wk15[12]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long EN15:1; - unsigned long EN14:1; - unsigned long EN13:1; - unsigned long EN12:1; - unsigned long EN11:1; - unsigned long EN10:1; - unsigned long EN9:1; - unsigned long EN8:1; - unsigned long EN7:1; - unsigned long EN6:1; - unsigned long EN5:1; - unsigned long EN4:1; - unsigned long EN3:1; - unsigned long EN2:1; - unsigned long EN1:1; - unsigned long EN0:1; - } BIT; - } GEN[13]; - char wk16[12]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long CLR15:1; - unsigned long CLR14:1; - unsigned long CLR13:1; - unsigned long CLR12:1; - unsigned long CLR11:1; - unsigned long CLR10:1; - unsigned long CLR9:1; - unsigned long CLR8:1; - unsigned long CLR7:1; - unsigned long CLR6:1; - unsigned long CLR5:1; - unsigned long CLR4:1; - unsigned long CLR3:1; - unsigned long CLR2:1; - unsigned long CLR1:1; - unsigned long CLR0:1; - } BIT; - } GCR[13]; - char wk17[12]; - union { - unsigned long LONG; - struct { - unsigned long :26; - unsigned long CN5:1; - unsigned long CN4:1; - unsigned long CN3:1; - unsigned long CN2:1; - unsigned long CN1:1; - unsigned long CN0:1; - } BIT; - } SEL; -}; - -struct st_ieb { - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char IOL:1; - unsigned char DEE:1; - unsigned char :1; - unsigned char RE:1; - } BIT; - } IECTR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char CMD:3; - } BIT; - } IECMR; - union { - unsigned char BYTE; - struct { - unsigned char SS:1; - unsigned char RN:3; - unsigned char CTL:4; - } BIT; - } IEMCR; - union { - unsigned char BYTE; - struct { - unsigned char IARL4:4; - unsigned char IMD:2; - unsigned char :1; - unsigned char STE:1; - } BIT; - } IEAR1; - union { - unsigned char BYTE; - struct { - unsigned char IARU8:8; - } BIT; - } IEAR2; - union { - unsigned char BYTE; - struct { - unsigned char ISAL4:4; - } BIT; - } IESA1; - union { - unsigned char BYTE; - struct { - unsigned char ISAU8:8; - } BIT; - } IESA2; - union { - unsigned char BYTE; - struct { - unsigned char IBFL:8; - } BIT; - } IETBFL; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char ISAL4:4; - } BIT; - } IEMA1; - union { - unsigned char BYTE; - struct { - unsigned char IMAU8:8; - } BIT; - } IEMA2; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char RCTL:4; - } BIT; - } IERCTL; - union { - unsigned char BYTE; - struct { - unsigned char RBFL:8; - } BIT; - } IERBFL; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char ILAL8:8; - } BIT; - } IELA1; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char ILAU4:4; - } BIT; - } IELA2; - union { - unsigned char BYTE; - struct { - unsigned char CMX:1; - unsigned char MRQ:1; - unsigned char SRQ:1; - unsigned char SRE:1; - unsigned char LCK:1; - unsigned char :1; - unsigned char RSS:1; - unsigned char GG:1; - } BIT; - } IEFLG; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char TXS:1; - unsigned char TXF:1; - unsigned char :1; - unsigned char TXEAL:1; - unsigned char TXETTME:1; - unsigned char TXERO:1; - unsigned char TXEACK:1; - } BIT; - } IETSR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char TXSE:1; - unsigned char TXFE:1; - unsigned char :1; - unsigned char TXEALE:1; - unsigned char TXETTMEE:1; - unsigned char TXEROE:1; - unsigned char TXEACKE:1; - } BIT; - } IEIET; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char RXBSY:1; - unsigned char RXS:1; - unsigned char RXF:1; - unsigned char RXEDE:1; - unsigned char RXEOVE:1; - unsigned char RXERTME:1; - unsigned char RXEDLE:1; - unsigned char RXEPE:1; - } BIT; - } IERSR; - union { - unsigned char BYTE; - struct { - unsigned char RXBSYE:1; - unsigned char RXSE:1; - unsigned char RXFE:1; - unsigned char RXEDEE:1; - unsigned char RXEOVEE:1; - unsigned char RXERTMEE:1; - unsigned char RXEDLEE:1; - unsigned char RXEPEE:1; - } BIT; - } IEIER; - char wk3[2]; - union { - unsigned char BYTE; - struct { - unsigned char FLT:1; - unsigned char FCKS:2; - unsigned char CKS3:1; - unsigned char SRSTP:1; - unsigned char CKS:3; - } BIT; - } IECKSR; - char wk4[230]; - unsigned char IETB[33]; - char wk5[223]; - unsigned char IERB[33]; -}; - -struct st_iwdt { - unsigned char IWDTRR; - char wk0[1]; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short RPSS:2; - unsigned short :2; - unsigned short RPES:2; - unsigned short CKS:4; - unsigned short :2; - unsigned short TOPS:2; - } BIT; - } IWDTCR; - union { - unsigned short WORD; - struct { - unsigned short REFEF:1; - unsigned short UNDFF:1; - unsigned short CNTVAL:14; - } BIT; - } IWDTSR; - union { - unsigned char BYTE; - struct { - unsigned char RSTIRQS:1; - } BIT; - } IWDTRCR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char SLCSTP:1; - } BIT; - } IWDTCSTPR; -}; - -struct st_mpc { - union { - unsigned char BYTE; - struct { - unsigned char CS7E:1; - unsigned char CS6E:1; - unsigned char CS5E:1; - unsigned char CS4E:1; - unsigned char CS3E:1; - unsigned char CS2E:1; - unsigned char CS1E:1; - unsigned char CS0E:1; - } BIT; - } PFCSE; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char CS3S:2; - unsigned char CS2S:2; - unsigned char CS1S:2; - unsigned char :1; - unsigned char CS0S:1; - } BIT; - } PFCSS0; - union { - unsigned char BYTE; - struct { - unsigned char CS7S:2; - unsigned char CS6S:2; - unsigned char CS5S:2; - unsigned char CS4S:2; - } BIT; - } PFCSS1; - union { - unsigned char BYTE; - struct { - unsigned char A15E:1; - unsigned char A14E:1; - unsigned char A13E:1; - unsigned char A12E:1; - unsigned char A11E:1; - unsigned char A10E:1; - unsigned char A9E:1; - unsigned char A8E:1; - } BIT; - } PFAOE0; - union { - unsigned char BYTE; - struct { - unsigned char A23E:1; - unsigned char A22E:1; - unsigned char A21E:1; - unsigned char A20E:1; - unsigned char A19E:1; - unsigned char A18E:1; - unsigned char A17E:1; - unsigned char A16E:1; - } BIT; - } PFAOE1; - union { - unsigned char BYTE; - struct { - unsigned char WR32BC32E:1; - unsigned char WR1BC1E:1; - unsigned char DH32E:1; - unsigned char DHE:1; - unsigned char :2; - unsigned char ADRHMS:1; - unsigned char ADRLE:1; - } BIT; - } PFBCR0; - union { - unsigned char BYTE; - struct { - unsigned char SDCLKE:1; - unsigned char DQM1E:1; - unsigned char :1; - unsigned char MDSDE:1; - unsigned char :1; - unsigned char ALEOE:1; - unsigned char WAITS:2; - } BIT; - } PFBCR1; - char wk1[6]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PHYMODE:1; - } BIT; - } PFENET; - char wk2[5]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char PUPHZS:1; - } BIT; - } PFUSB0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char PUPHZS:1; - } BIT; - } PFUSB1; - char wk3[9]; - union { - unsigned char BYTE; - struct { - unsigned char B0WI:1; - unsigned char PFSWE:1; - } BIT; - } PWPR; - char wk4[32]; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P00PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P01PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P02PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P03PFS; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P05PFS; - char wk6[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P07PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P10PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P11PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P12PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P13PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P14PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P15PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P16PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P17PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P20PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P21PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P22PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P23PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P24PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P25PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P26PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P27PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P30PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P31PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P32PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P33PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P34PFS; - char wk7[3]; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P40PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P41PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P42PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P43PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P44PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P45PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P46PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P47PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P50PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P51PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P52PFS; - char wk8[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P54PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P55PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P56PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P57PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P60PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P61PFS; - char wk9[4]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P66PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P67PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P70PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P71PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P72PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P73PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P74PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P75PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P76PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P77PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P80PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P81PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P82PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P83PFS; - char wk10[2]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P86PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P87PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P90PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P91PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P92PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P93PFS; - char wk11[4]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PA1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA2PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PA3PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PA4PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA5PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA6PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA7PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PB0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PB1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB2PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB3PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB4PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB5PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB6PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB7PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC2PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC3PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC4PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC5PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC6PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC7PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD0PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD1PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD2PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD3PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD4PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD5PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD6PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD7PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE0PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE1PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE2PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE3PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE4PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE5PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE6PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE7PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PF0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PF1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PF2PFS; - char wk12[2]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PF5PFS; - char wk13[21]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PJ3PFS; -}; - -struct st_mtu { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char OE4D:1; - unsigned char OE4C:1; - unsigned char OE3D:1; - unsigned char OE4B:1; - unsigned char OE4A:1; - unsigned char OE3B:1; - } BIT; - } TOER; - char wk0[2]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char BDC:1; - unsigned char N:1; - unsigned char P:1; - unsigned char FB:1; - unsigned char WF:1; - unsigned char VF:1; - unsigned char UF:1; - } BIT; - } TGCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PSYE:1; - unsigned char :2; - unsigned char TOCL:1; - unsigned char TOCS:1; - unsigned char OLSN:1; - unsigned char OLSP:1; - } BIT; - } TOCR1; - union { - unsigned char BYTE; - struct { - unsigned char BF:2; - unsigned char OLS3N:1; - unsigned char OLS3P:1; - unsigned char OLS2N:1; - unsigned char OLS2P:1; - unsigned char OLS1N:1; - unsigned char OLS1P:1; - } BIT; - } TOCR2; - char wk1[4]; - unsigned short TCDR; - unsigned short TDDR; - char wk2[8]; - unsigned short TCNTS; - unsigned short TCBR; - char wk3[12]; - union { - unsigned char BYTE; - struct { - unsigned char T3AEN:1; - unsigned char T3ACOR:3; - unsigned char T4VEN:1; - unsigned char T4VCOR:3; - } BIT; - } TITCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char T3ACNT:3; - unsigned char :1; - unsigned char T4VCNT:3; - } BIT; - } TITCNT; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char BTE:2; - } BIT; - } TBTER; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char TDER:1; - } BIT; - } TDER; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char OLS3N:1; - unsigned char OLS3P:1; - unsigned char OLS2N:1; - unsigned char OLS2P:1; - unsigned char OLS1N:1; - unsigned char OLS1P:1; - } BIT; - } TOLBR; - char wk6[41]; - union { - unsigned char BYTE; - struct { - unsigned char CCE:1; - unsigned char :6; - unsigned char WRE:1; - } BIT; - } TWCR; - char wk7[31]; - union { - unsigned char BYTE; - struct { - unsigned char CST4:1; - unsigned char CST3:1; - unsigned char :3; - unsigned char CST2:1; - unsigned char CST1:1; - unsigned char CST0:1; - } BIT; - } TSTR; - union { - unsigned char BYTE; - struct { - unsigned char SYNC4:1; - unsigned char SYNC3:1; - unsigned char :3; - unsigned char SYNC2:1; - unsigned char SYNC1:1; - unsigned char SYNC0:1; - } BIT; - } TSYR; - char wk8[2]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RWE:1; - } BIT; - } TRWER; -}; - -struct st_mtu0 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[111]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char BFE:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :2; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - unsigned short TGRC; - unsigned short TGRD; - char wk1[16]; - unsigned short TGRE; - unsigned short TGRF; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TGIEF:1; - unsigned char TGIEE:1; - } BIT; - } TIER2; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TTSE:1; - unsigned char TTSB:1; - unsigned char TTSA:1; - } BIT; - } TBTM; -}; - -struct st_mtu1 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[238]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char CCLR:2; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char :2; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - char wk3[4]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char I2BE:1; - unsigned char I2AE:1; - unsigned char I1BE:1; - unsigned char I1AE:1; - } BIT; - } TICCR; -}; - -struct st_mtu2 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[365]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char CCLR:2; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char :2; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_mtu3 { - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - char wk2[2]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :2; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - char wk3[7]; - unsigned short TCNT; - char wk4[6]; - unsigned short TGRA; - unsigned short TGRB; - char wk5[8]; - unsigned short TGRC; - unsigned short TGRD; - char wk6[4]; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - char wk7[11]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TTSE:1; - unsigned char TTSB:1; - unsigned char TTSA:1; - } BIT; - } TBTM; - char wk8[90]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; -}; - -struct st_mtu4 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - char wk2[2]; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - char wk3[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char TTGE2:1; - unsigned char :1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - char wk4[8]; - unsigned short TCNT; - char wk5[8]; - unsigned short TGRA; - unsigned short TGRB; - char wk6[8]; - unsigned short TGRC; - unsigned short TGRD; - char wk7[1]; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - char wk8[11]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TTSE:1; - unsigned char TTSB:1; - unsigned char TTSA:1; - } BIT; - } TBTM; - char wk9[6]; - union { - unsigned short WORD; - struct { - unsigned short BF:2; - unsigned short :6; - unsigned short UT4AE:1; - unsigned short DT4AE:1; - unsigned short UT4BE:1; - unsigned short DT4BE:1; - unsigned short ITA3AE:1; - unsigned short ITA4VE:1; - unsigned short ITB3AE:1; - unsigned short ITB4VE:1; - } BIT; - } TADCR; - char wk10[2]; - unsigned short TADCORA; - unsigned short TADCORB; - unsigned short TADCOBRA; - unsigned short TADCOBRB; - char wk11[72]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; -}; - -struct st_mtu5 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char :1; - unsigned char NFWEN:1; - unsigned char NFVEN:1; - unsigned char NFUEN:1; - } BIT; - } NFCR; - char wk1[490]; - unsigned short TCNTU; - unsigned short TGRU; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TPSC:2; - } BIT; - } TCRU; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char IOC:5; - } BIT; - } TIORU; - char wk3[9]; - unsigned short TCNTV; - unsigned short TGRV; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TPSC:2; - } BIT; - } TCRV; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char IOC:5; - } BIT; - } TIORV; - char wk5[9]; - unsigned short TCNTW; - unsigned short TGRW; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TPSC:2; - } BIT; - } TCRW; - char wk6[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char IOC:5; - } BIT; - } TIORW; - char wk7[11]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TGIE5U:1; - unsigned char TGIE5V:1; - unsigned char TGIE5W:1; - } BIT; - } TIER; - char wk8[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char CSTU5:1; - unsigned char CSTV5:1; - unsigned char CSTW5:1; - } BIT; - } TSTR; - char wk9[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char CMPCLR5U:1; - unsigned char CMPCLR5V:1; - unsigned char CMPCLR5W:1; - } BIT; - } TCNTCMPCLR; -}; - -struct st_poe { - union { - unsigned short WORD; - struct { - unsigned short POE3F:1; - unsigned short POE2F:1; - unsigned short POE1F:1; - unsigned short POE0F:1; - unsigned short :3; - unsigned short PIE1:1; - unsigned short POE3M:2; - unsigned short POE2M:2; - unsigned short POE1M:2; - unsigned short POE0M:2; - } BIT; - } ICSR1; - union { - unsigned short WORD; - struct { - unsigned short OSF1:1; - unsigned short :5; - unsigned short OCE1:1; - unsigned short OIE1:1; - } BIT; - } OCSR1; - char wk0[4]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short POE8F:1; - unsigned short :2; - unsigned short POE8E:1; - unsigned short PIE2:1; - unsigned short :6; - unsigned short POE8M:2; - } BIT; - } ICSR2; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char CH0HIZ:1; - unsigned char CH34HIZ:1; - } BIT; - } SPOER; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char PE3ZE:1; - unsigned char PE2ZE:1; - unsigned char PE1ZE:1; - unsigned char PE0ZE:1; - } BIT; - } POECR1; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char P1CZEA:1; - unsigned char P2CZEA:1; - unsigned char P3CZEA:1; - } BIT; - } POECR2; - char wk1[1]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short OSTSTF:1; - unsigned short :2; - unsigned short OSTSTE:1; - } BIT; - } ICSR3; -}; - -struct st_port0 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[31]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :3; - unsigned char B2:1; - } BIT; - } ODR1; - char wk4[62]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_port1 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[32]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[61]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port2 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[33]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[60]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - } BIT; - } DSCR; -}; - -struct st_port3 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[34]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[59]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port4 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[35]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[58]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port5 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[36]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[57]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char :3; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_port6 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[37]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[56]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port7 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[38]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[55]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port8 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[39]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[54]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port9 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[40]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[53]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_porta { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[41]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[52]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portb { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[42]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[51]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portc { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[43]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[50]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portd { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[44]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[49]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_porte { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[45]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[48]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portf { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[46]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[47]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_portg { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[47]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[46]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_porth { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_portj { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PMR; - char wk3[49]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char B2:1; - } BIT; - } ODR1; - char wk4[44]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PCR; -}; - -struct st_ppg0 { - union { - unsigned char BYTE; - struct { - unsigned char G3CMS:2; - unsigned char G2CMS:2; - unsigned char G1CMS:2; - unsigned char G0CMS:2; - } BIT; - } PCR; - union { - unsigned char BYTE; - struct { - unsigned char G3INV:1; - unsigned char G2INV:1; - unsigned char G1INV:1; - unsigned char G0INV:1; - unsigned char G3NOV:1; - unsigned char G2NOV:1; - unsigned char G1NOV:1; - unsigned char G0NOV:1; - } BIT; - } PMR; - union { - unsigned char BYTE; - struct { - unsigned char NDER15:1; - unsigned char NDER14:1; - unsigned char NDER13:1; - unsigned char NDER12:1; - unsigned char NDER11:1; - unsigned char NDER10:1; - unsigned char NDER9:1; - unsigned char NDER8:1; - } BIT; - } NDERH; - union { - unsigned char BYTE; - struct { - unsigned char NDER7:1; - unsigned char NDER6:1; - unsigned char NDER5:1; - unsigned char NDER4:1; - unsigned char NDER3:1; - unsigned char NDER2:1; - unsigned char NDER1:1; - unsigned char NDER0:1; - } BIT; - } NDERL; - union { - unsigned char BYTE; - struct { - unsigned char POD15:1; - unsigned char POD14:1; - unsigned char POD13:1; - unsigned char POD12:1; - unsigned char POD11:1; - unsigned char POD10:1; - unsigned char POD9:1; - unsigned char POD8:1; - } BIT; - } PODRH; - union { - unsigned char BYTE; - struct { - unsigned char POD7:1; - unsigned char POD6:1; - unsigned char POD5:1; - unsigned char POD4:1; - unsigned char POD3:1; - unsigned char POD2:1; - unsigned char POD1:1; - unsigned char POD0:1; - } BIT; - } PODRL; - union { - unsigned char BYTE; - struct { - unsigned char NDR15:1; - unsigned char NDR14:1; - unsigned char NDR13:1; - unsigned char NDR12:1; - unsigned char NDR11:1; - unsigned char NDR10:1; - unsigned char NDR9:1; - unsigned char NDR8:1; - } BIT; - } NDRH; - union { - unsigned char BYTE; - struct { - unsigned char NDR7:1; - unsigned char NDR6:1; - unsigned char NDR5:1; - unsigned char NDR4:1; - unsigned char NDR3:1; - unsigned char NDR2:1; - unsigned char NDR1:1; - unsigned char NDR0:1; - } BIT; - } NDRL; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR11:1; - unsigned char NDR10:1; - unsigned char NDR9:1; - unsigned char NDR8:1; - } BIT; - } NDRH2; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR3:1; - unsigned char NDR2:1; - unsigned char NDR1:1; - unsigned char NDR0:1; - } BIT; - } NDRL2; -}; - -struct st_ppg1 { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PTRSL:1; - } BIT; - } PTRSLR; - char wk0[5]; - union { - unsigned char BYTE; - struct { - unsigned char G3CMS:2; - unsigned char G2CMS:2; - unsigned char G1CMS:2; - unsigned char G0CMS:2; - } BIT; - } PCR; - union { - unsigned char BYTE; - struct { - unsigned char G3INV:1; - unsigned char G2INV:1; - unsigned char G1INV:1; - unsigned char G0INV:1; - unsigned char G3NOV:1; - unsigned char G2NOV:1; - unsigned char G1NOV:1; - unsigned char G0NOV:1; - } BIT; - } PMR; - union { - unsigned char BYTE; - struct { - unsigned char NDER31:1; - unsigned char NDER30:1; - unsigned char NDER29:1; - unsigned char NDER28:1; - unsigned char NDER27:1; - unsigned char NDER26:1; - unsigned char NDER25:1; - unsigned char NDER24:1; - } BIT; - } NDERH; - union { - unsigned char BYTE; - struct { - unsigned char NDER23:1; - unsigned char NDER22:1; - unsigned char NDER21:1; - unsigned char NDER20:1; - unsigned char NDER19:1; - unsigned char NDER18:1; - unsigned char NDER17:1; - unsigned char NDER16:1; - } BIT; - } NDERL; - union { - unsigned char BYTE; - struct { - unsigned char POD31:1; - unsigned char POD30:1; - unsigned char POD29:1; - unsigned char POD28:1; - unsigned char POD27:1; - unsigned char POD26:1; - unsigned char POD25:1; - unsigned char POD24:1; - } BIT; - } PODRH; - union { - unsigned char BYTE; - struct { - unsigned char POD23:1; - unsigned char POD22:1; - unsigned char POD21:1; - unsigned char POD20:1; - unsigned char POD19:1; - unsigned char POD18:1; - unsigned char POD17:1; - unsigned char POD16:1; - } BIT; - } PODRL; - union { - unsigned char BYTE; - struct { - unsigned char NDR31:1; - unsigned char NDR30:1; - unsigned char NDR29:1; - unsigned char NDR28:1; - unsigned char NDR27:1; - unsigned char NDR26:1; - unsigned char NDR25:1; - unsigned char NDR24:1; - } BIT; - } NDRH; - union { - unsigned char BYTE; - struct { - unsigned char NDR23:1; - unsigned char NDR22:1; - unsigned char NDR21:1; - unsigned char NDR20:1; - unsigned char NDR19:1; - unsigned char NDR18:1; - unsigned char NDR17:1; - unsigned char NDR16:1; - } BIT; - } NDRL; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR27:1; - unsigned char NDR26:1; - unsigned char NDR25:1; - unsigned char NDR24:1; - } BIT; - } NDRH2; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR19:1; - unsigned char NDR18:1; - unsigned char NDR17:1; - unsigned char NDR16:1; - } BIT; - } NDRL2; -}; - -struct st_riic0 { - union { - unsigned char BYTE; - struct { - unsigned char ICE:1; - unsigned char IICRST:1; - unsigned char CLO:1; - unsigned char SOWP:1; - unsigned char SCLO:1; - unsigned char SDAO:1; - unsigned char SCLI:1; - unsigned char SDAI:1; - } BIT; - } ICCR1; - union { - unsigned char BYTE; - struct { - unsigned char BBSY:1; - unsigned char MST:1; - unsigned char TRS:1; - unsigned char :1; - unsigned char SP:1; - unsigned char RS:1; - unsigned char ST:1; - } BIT; - } ICCR2; - union { - unsigned char BYTE; - struct { - unsigned char MTWP:1; - unsigned char CKS:3; - unsigned char BCWP:1; - unsigned char BC:3; - } BIT; - } ICMR1; - union { - unsigned char BYTE; - struct { - unsigned char DLCS:1; - unsigned char SDDL:3; - unsigned char :1; - unsigned char TMOH:1; - unsigned char TMOL:1; - unsigned char TMOS:1; - } BIT; - } ICMR2; - union { - unsigned char BYTE; - struct { - unsigned char SMBS:1; - unsigned char WAIT:1; - unsigned char RDRFS:1; - unsigned char ACKWP:1; - unsigned char ACKBT:1; - unsigned char ACKBR:1; - unsigned char NF:2; - } BIT; - } ICMR3; - union { - unsigned char BYTE; - struct { - unsigned char FMPE:1; - unsigned char SCLE:1; - unsigned char NFE:1; - unsigned char NACKE:1; - unsigned char SALE:1; - unsigned char NALE:1; - unsigned char MALE:1; - unsigned char TMOE:1; - } BIT; - } ICFER; - union { - unsigned char BYTE; - struct { - unsigned char HOAE:1; - unsigned char :1; - unsigned char DIDE:1; - unsigned char :1; - unsigned char GCAE:1; - unsigned char SAR2E:1; - unsigned char SAR1E:1; - unsigned char SAR0E:1; - } BIT; - } ICSER; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char TEIE:1; - unsigned char RIE:1; - unsigned char NAKIE:1; - unsigned char SPIE:1; - unsigned char STIE:1; - unsigned char ALIE:1; - unsigned char TMOIE:1; - } BIT; - } ICIER; - union { - unsigned char BYTE; - struct { - unsigned char HOA:1; - unsigned char :1; - unsigned char DID:1; - unsigned char :1; - unsigned char GCA:1; - unsigned char AAS2:1; - unsigned char AAS1:1; - unsigned char AAS0:1; - } BIT; - } ICSR1; - union { - unsigned char BYTE; - struct { - unsigned char TDRE:1; - unsigned char TEND:1; - unsigned char RDRF:1; - unsigned char NACKF:1; - unsigned char STOP:1; - unsigned char START:1; - unsigned char AL:1; - unsigned char TMOF:1; - } BIT; - } ICSR2; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU0; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL1; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU1; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL2; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU2; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRL:5; - } BIT; - } ICBRL; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRH:5; - } BIT; - } ICBRH; - unsigned char ICDRT; - unsigned char ICDRR; -}; - -struct st_riic1 { - union { - unsigned char BYTE; - struct { - unsigned char ICE:1; - unsigned char IICRST:1; - unsigned char CLO:1; - unsigned char SOWP:1; - unsigned char SCLO:1; - unsigned char SDAO:1; - unsigned char SCLI:1; - unsigned char SDAI:1; - } BIT; - } ICCR1; - union { - unsigned char BYTE; - struct { - unsigned char BBSY:1; - unsigned char MST:1; - unsigned char TRS:1; - unsigned char :1; - unsigned char SP:1; - unsigned char RS:1; - unsigned char ST:1; - } BIT; - } ICCR2; - union { - unsigned char BYTE; - struct { - unsigned char MTWP:1; - unsigned char CKS:3; - unsigned char BCWP:1; - unsigned char BC:3; - } BIT; - } ICMR1; - union { - unsigned char BYTE; - struct { - unsigned char DLCS:1; - unsigned char SDDL:3; - unsigned char :1; - unsigned char TMOH:1; - unsigned char TMOL:1; - unsigned char TMOS:1; - } BIT; - } ICMR2; - union { - unsigned char BYTE; - struct { - unsigned char SMBS:1; - unsigned char WAIT:1; - unsigned char RDRFS:1; - unsigned char ACKWP:1; - unsigned char ACKBT:1; - unsigned char ACKBR:1; - unsigned char NF:2; - } BIT; - } ICMR3; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SCLE:1; - unsigned char NFE:1; - unsigned char NACKE:1; - unsigned char SALE:1; - unsigned char NALE:1; - unsigned char MALE:1; - unsigned char TMOE:1; - } BIT; - } ICFER; - union { - unsigned char BYTE; - struct { - unsigned char HOAE:1; - unsigned char :1; - unsigned char DIDE:1; - unsigned char :1; - unsigned char GCAE:1; - unsigned char SAR2E:1; - unsigned char SAR1E:1; - unsigned char SAR0E:1; - } BIT; - } ICSER; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char TEIE:1; - unsigned char RIE:1; - unsigned char NAKIE:1; - unsigned char SPIE:1; - unsigned char STIE:1; - unsigned char ALIE:1; - unsigned char TMOIE:1; - } BIT; - } ICIER; - union { - unsigned char BYTE; - struct { - unsigned char HOA:1; - unsigned char :1; - unsigned char DID:1; - unsigned char :1; - unsigned char GCA:1; - unsigned char AAS2:1; - unsigned char AAS1:1; - unsigned char AAS0:1; - } BIT; - } ICSR1; - union { - unsigned char BYTE; - struct { - unsigned char TDRE:1; - unsigned char TEND:1; - unsigned char RDRF:1; - unsigned char NACKF:1; - unsigned char STOP:1; - unsigned char START:1; - unsigned char AL:1; - unsigned char TMOF:1; - } BIT; - } ICSR2; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU0; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL1; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU1; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL2; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU2; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRL:5; - } BIT; - } ICBRL; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRH:5; - } BIT; - } ICBRH; - unsigned char ICDRT; - unsigned char ICDRR; -}; - -struct st_rspi { - union { - unsigned char BYTE; - struct { - unsigned char SPRIE:1; - unsigned char SPE:1; - unsigned char SPTIE:1; - unsigned char SPEIE:1; - unsigned char MSTR:1; - unsigned char MODFEN:1; - unsigned char TXMD:1; - unsigned char SPMS:1; - } BIT; - } SPCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char SSL3P:1; - unsigned char SSL2P:1; - unsigned char SSL1P:1; - unsigned char SSL0P:1; - } BIT; - } SSLP; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char MOIFE:1; - unsigned char MOIFV:1; - unsigned char :1; - unsigned char SPOM:1; - unsigned char SPLP2:1; - unsigned char SPLP:1; - } BIT; - } SPPCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char PERF:1; - unsigned char MODF:1; - unsigned char IDLNF:1; - unsigned char OVRF:1; - } BIT; - } SPSR; - //unsigned long SPDR; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - } SPDR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SPSLN:3; - } BIT; - } SPSCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SPECM:3; - unsigned char :1; - unsigned char SPCP:3; - } BIT; - } SPSSR; - union { - unsigned char BYTE; - struct { - unsigned char SPR7:1; - unsigned char SPR6:1; - unsigned char SPR5:1; - unsigned char SPR4:1; - unsigned char SPR3:1; - unsigned char SPR2:1; - unsigned char SPR1:1; - unsigned char SPR0:1; - } BIT; - } SPBR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char SPLW:1; - unsigned char SPRDTD:1; - unsigned char SLSEL:2; - unsigned char SPFC:2; - } BIT; - } SPDCR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SCKDL:3; - } BIT; - } SPCKD; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SLNDL:3; - } BIT; - } SSLND; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SPNDL:3; - } BIT; - } SPND; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char PTE:1; - unsigned char SPIIE:1; - unsigned char SPOE:1; - unsigned char SPPE:1; - } BIT; - } SPCR2; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD0; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD1; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD2; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD3; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD4; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD5; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD6; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD7; -}; - -struct st_rtc { - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char F1HZ:1; - unsigned char F2HZ:1; - unsigned char F4HZ:1; - unsigned char F8HZ:1; - unsigned char F16HZ:1; - unsigned char F32HZ:1; - unsigned char F64HZ:1; - } BIT; - } R64CNT; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCNT; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCNT; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCNT; - char wk3[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char DAYW:3; - } BIT; - } RWKCNT; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char DATE10:2; - unsigned char DATE1:4; - } BIT; - } RDAYCNT; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCNT; - char wk6[1]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short YR10:4; - unsigned short YR1:4; - } BIT; - } RYRCNT; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECAR; - char wk7[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINAR; - char wk8[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRAR; - char wk9[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char :4; - unsigned char DAYW:3; - } BIT; - } RWKAR; - char wk10[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char :1; - unsigned char DATE10:2; - unsigned char DATE1:4; - } BIT; - } RDAYAR; - char wk11[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char :2; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONAR; - char wk12[1]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short YR10:4; - unsigned short YR1:4; - } BIT; - } RYRAR; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - } BIT; - } RYRAREN; - char wk13[3]; - union { - unsigned char BYTE; - struct { - unsigned char PES:4; - unsigned char :1; - unsigned char PIE:1; - unsigned char CIE:1; - unsigned char AIE:1; - } BIT; - } RCR1; - char wk14[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char HR24:1; - unsigned char AADJP:1; - unsigned char AADJE:1; - unsigned char RTCOE:1; - unsigned char ADJ30:1; - unsigned char RESET:1; - unsigned char START:1; - } BIT; - } RCR2; - char wk15[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RTCEN:1; - } BIT; - } RCR3; - char wk16[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RCKSEL:1; - } BIT; - } RCR4; - char wk17[1]; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short RFC:1; - } BIT; - } RFRH; - union { - unsigned short WORD; - struct { - unsigned short RFC:16; - } BIT; - } RFRL; - union { - unsigned char BYTE; - struct { - unsigned char PMADJ:2; - unsigned char ADJ:6; - } BIT; - } RADJ; - char wk18[17]; - union { - unsigned char BYTE; - struct { - unsigned char TCEN:1; - unsigned char :1; - unsigned char TCNF:2; - unsigned char :1; - unsigned char TCST:1; - unsigned char TCCT:2; - } BIT; - } RTCCR0; - char wk19[1]; - union { - unsigned char BYTE; - struct { - unsigned char TCEN:1; - unsigned char :1; - unsigned char TCNF:2; - unsigned char :1; - unsigned char TCST:1; - unsigned char TCCT:2; - } BIT; - } RTCCR1; - char wk20[1]; - union { - unsigned char BYTE; - struct { - unsigned char TCEN:1; - unsigned char :1; - unsigned char TCNF:2; - unsigned char :1; - unsigned char TCST:1; - unsigned char TCCT:2; - } BIT; - } RTCCR2; - char wk21[13]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCP0; - char wk22[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCP0; - char wk23[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCP0; - char wk24[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DATE10:3; - unsigned char DATE1:4; - } BIT; - } RDAYCP0; - char wk25[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCP0; - char wk26[5]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCP1; - char wk27[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCP1; - char wk28[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCP1; - char wk29[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DATE10:3; - unsigned char DATE1:4; - } BIT; - } RDAYCP1; - char wk30[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCP1; - char wk31[5]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCP2; - char wk32[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCP2; - char wk33[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCP2; - char wk34[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DATE10:3; - unsigned char DATE1:4; - } BIT; - } RDAYCP2; - char wk35[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCP2; -}; - -struct st_s12ad { - union { - unsigned char BYTE; - struct { - unsigned char ADST:1; - unsigned char ADCS:1; - unsigned char :1; - unsigned char ADIE:1; - unsigned char CKS:2; - unsigned char TRGE:1; - unsigned char EXTRG:1; - } BIT; - } ADCSR; - char wk0[3]; - union { - unsigned short WORD; - struct { - unsigned short ANS0:16; - } BIT; - } ADANS0; - union { - unsigned short WORD; - struct { - unsigned short :11; - unsigned short ANS1:5; - } BIT; - } ADANS1; - union { - unsigned short WORD; - struct { - unsigned short ADS0:16; - } BIT; - } ADADS0; - union { - unsigned short WORD; - struct { - unsigned short :11; - unsigned short ADS1:5; - } BIT; - } ADADS1; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char ADC:2; - } BIT; - } ADADC; - char wk1[1]; - union { - unsigned short WORD; - struct { - unsigned short ADRFMT:1; - unsigned short :9; - unsigned short ACE:1; - } BIT; - } ADCER; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char ADSTRS:4; - } BIT; - } ADSTRGR; - char wk2[1]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short OCS:1; - unsigned short TSS:1; - unsigned short :6; - unsigned short OCSAD:1; - unsigned short TSSAD:1; - } BIT; - } ADEXICR; - char wk3[6]; - unsigned short ADTSDR; - unsigned short ADOCDR; - char wk4[2]; - unsigned short ADDR0; - unsigned short ADDR1; - unsigned short ADDR2; - unsigned short ADDR3; - unsigned short ADDR4; - unsigned short ADDR5; - unsigned short ADDR6; - unsigned short ADDR7; - unsigned short ADDR8; - unsigned short ADDR9; - unsigned short ADDR10; - unsigned short ADDR11; - unsigned short ADDR12; - unsigned short ADDR13; - unsigned short ADDR14; - unsigned short ADDR15; - unsigned short ADDR16; - unsigned short ADDR17; - unsigned short ADDR18; - unsigned short ADDR19; - unsigned short ADDR20; - char wk5[38]; - union { - unsigned short WORD; - struct { - unsigned short SST2:8; - } BIT; - } ADSSTR23; -}; - -struct st_sci0 { - union { - unsigned char BYTE; - struct { - unsigned char CM:1; - unsigned char CHR:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char STOP:1; - unsigned char MP:1; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char FER:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFEN:1; - unsigned char ABCS:1; - unsigned char :3; - unsigned char ACS0:1; - } BIT; - } SEMR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char NFCS:3; - } BIT; - } SNFR; - union { - unsigned char BYTE; - struct { - unsigned char IICDL:5; - unsigned char :2; - unsigned char IICM:1; - } BIT; - } SIMR1; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char IICACKT:1; - unsigned char :3; - unsigned char IICCSC:1; - unsigned char IICINTM:1; - } BIT; - } SIMR2; - union { - unsigned char BYTE; - struct { - unsigned char IICSCLS:2; - unsigned char IICSDAS:2; - unsigned char IICSTIF:1; - unsigned char IICSTPREQ:1; - unsigned char IICRSTAREQ:1; - unsigned char IICSTAREQ:1; - } BIT; - } SIMR3; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IICACKR:1; - } BIT; - } SISR; - union { - unsigned char BYTE; - struct { - unsigned char CKPH:1; - unsigned char CKPOL:1; - unsigned char :1; - unsigned char MFF:1; - unsigned char :1; - unsigned char MSS:1; - unsigned char CTSE:1; - unsigned char SSE:1; - } BIT; - } SPMR; -}; - -struct st_sci7 { - union { - unsigned char BYTE; - struct { - unsigned char CM:1; - unsigned char CHR:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char STOP:1; - unsigned char MP:1; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char FER:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFEN:1; - unsigned char ABCS:1; - unsigned char :3; - unsigned char ACS0:1; - } BIT; - } SEMR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char NFCS:3; - } BIT; - } SNFR; - union { - unsigned char BYTE; - struct { - unsigned char IICDL:5; - unsigned char :2; - unsigned char IICM:1; - } BIT; - } SIMR1; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char IICACKT:1; - unsigned char :3; - unsigned char IICCSC:1; - unsigned char IICINTM:1; - } BIT; - } SIMR2; - union { - unsigned char BYTE; - struct { - unsigned char IICSCLS:2; - unsigned char IICSDAS:2; - unsigned char IICSTIF:1; - unsigned char IICSTPREQ:1; - unsigned char IICRSTAREQ:1; - unsigned char IICSTAREQ:1; - } BIT; - } SIMR3; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IICACKR:1; - } BIT; - } SISR; - union { - unsigned char BYTE; - struct { - unsigned char CKPH:1; - unsigned char CKPOL:1; - unsigned char :1; - unsigned char MFF:1; - unsigned char :1; - unsigned char MSS:1; - unsigned char CTSE:1; - unsigned char SSE:1; - } BIT; - } SPMR; -}; - -struct st_sci12 { - union { - unsigned char BYTE; - struct { - unsigned char CM:1; - unsigned char CHR:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char STOP:1; - unsigned char MP:1; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char FER:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFEN:1; - unsigned char ABCS:1; - unsigned char :3; - unsigned char ACS0:1; - } BIT; - } SEMR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char NFCS:3; - } BIT; - } SNFR; - union { - unsigned char BYTE; - struct { - unsigned char IICDL:5; - unsigned char :2; - unsigned char IICM:1; - } BIT; - } SIMR1; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char IICACKT:1; - unsigned char :3; - unsigned char IICCSC:1; - unsigned char IICINTM:1; - } BIT; - } SIMR2; - union { - unsigned char BYTE; - struct { - unsigned char IICSCLS:2; - unsigned char IICSDAS:2; - unsigned char IICSTIF:1; - unsigned char IICSTPREQ:1; - unsigned char IICRSTAREQ:1; - unsigned char IICSTAREQ:1; - } BIT; - } SIMR3; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IICACKR:1; - } BIT; - } SISR; - union { - unsigned char BYTE; - struct { - unsigned char CKPH:1; - unsigned char CKPOL:1; - unsigned char :1; - unsigned char MFF:1; - unsigned char :1; - unsigned char MSS:1; - unsigned char CTSE:1; - unsigned char SSE:1; - } BIT; - } SPMR; - char wk0[18]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char ESME:1; - } BIT; - } ESMER; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char BRME:1; - unsigned char RXDSF:1; - unsigned char SFSF:1; - } BIT; - } CR0; - union { - unsigned char BYTE; - struct { - unsigned char PIBS:3; - unsigned char PIBE:1; - unsigned char CF1DS:2; - unsigned char CF0RE:1; - unsigned char BFE:1; - } BIT; - } CR1; - union { - unsigned char BYTE; - struct { - unsigned char RTS:2; - unsigned char BCCS:2; - unsigned char :1; - unsigned char DFCS:3; - } BIT; - } CR2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SDST:1; - } BIT; - } CR3; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char SHARPS:1; - unsigned char :2; - unsigned char RXDXPS:1; - unsigned char TXDXPS:1; - } BIT; - } PCR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char AEDIE:1; - unsigned char BCDIE:1; - unsigned char PIBDIE:1; - unsigned char CF1MIE:1; - unsigned char CF0MIE:1; - unsigned char BFDIE:1; - } BIT; - } ICR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char AEDF:1; - unsigned char BCDF:1; - unsigned char PIBDF:1; - unsigned char CF1MF:1; - unsigned char CF0MF:1; - unsigned char BFDF:1; - } BIT; - } STR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char AEDCL:1; - unsigned char BCDCL:1; - unsigned char PIBDCL:1; - unsigned char CF1MCL:1; - unsigned char CF0MCL:1; - unsigned char BFDCL:1; - } BIT; - } STCR; - unsigned char CF0DR; - union { - unsigned char BYTE; - struct { - unsigned char CF0CE7:1; - unsigned char CF0CE6:1; - unsigned char CF0CE5:1; - unsigned char CF0CE4:1; - unsigned char CF0CE3:1; - unsigned char CF0CE2:1; - unsigned char CF0CE1:1; - unsigned char CF0CE0:1; - } BIT; - } CF0CR; - unsigned char CF0RR; - unsigned char PCF1DR; - unsigned char SCF1DR; - union { - unsigned char BYTE; - struct { - unsigned char CF1CE7:1; - unsigned char CF1CE6:1; - unsigned char CF1CE5:1; - unsigned char CF1CE4:1; - unsigned char CF1CE3:1; - unsigned char CF1CE2:1; - unsigned char CF1CE1:1; - unsigned char CF1CE0:1; - } BIT; - } CF1CR; - unsigned char CF1RR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char TCST:1; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char TCSS:3; - unsigned char TWRC:1; - unsigned char :1; - unsigned char TOMS:2; - } BIT; - } TMR; - unsigned char TPRE; - unsigned char TCNT; -}; - -struct st_smci0 { - union { - unsigned char BYTE; - struct { - unsigned char GM:1; - unsigned char BCLK:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char BCP:2; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char ERS:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; -}; - -struct st_smci7 { - union { - unsigned char BYTE; - struct { - unsigned char GM:1; - unsigned char BCLK:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char BCP:2; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char ERS:1; - unsigned char PER:1; - unsigned char TEND:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; -}; - -struct st_system { - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short MD:1; - } BIT; - } MDMONR; - union { - unsigned short WORD; - struct { - unsigned short :10; - unsigned short UBTS:1; - unsigned short BOTS:1; - unsigned short :2; - unsigned short EXB:1; - unsigned short IROM:1; - } BIT; - } MDSR; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short :6; - unsigned short EXBE:1; - unsigned short ROME:1; - } BIT; - } SYSCR0; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short RAME:1; - } BIT; - } SYSCR1; - char wk1[2]; - union { - unsigned short WORD; - struct { - unsigned short SSBY:1; - unsigned short OPE:1; - } BIT; - } SBYCR; - char wk2[2]; - union { - unsigned long LONG; - struct { - unsigned long ACSE:1; - unsigned long :1; - unsigned long MSTPA29:1; - unsigned long MSTPA28:1; - unsigned long MSTPA27:1; - unsigned long :2; - unsigned long MSTPA24:1; - unsigned long MSTPA23:1; - unsigned long :3; - unsigned long MSTPA19:1; - unsigned long :1; - unsigned long MSTPA17:1; - unsigned long :1; - unsigned long MSTPA15:1; - unsigned long MSTPA14:1; - unsigned long MSTPA13:1; - unsigned long MSTPA12:1; - unsigned long MSTPA11:1; - unsigned long MSTPA10:1; - unsigned long MSTPA9:1; - unsigned long :3; - unsigned long MSTPA5:1; - unsigned long MSTPA4:1; - } BIT; - } MSTPCRA; - union { - unsigned long LONG; - struct { - unsigned long MSTPB31:1; - unsigned long MSTPB30:1; - unsigned long MSTPB29:1; - unsigned long MSTPB28:1; - unsigned long MSTPB27:1; - unsigned long MSTPB26:1; - unsigned long MSTPB25:1; - unsigned long MSTPB24:1; - unsigned long MSTPB23:1; - unsigned long :1; - unsigned long MSTPB21:1; - unsigned long MSTPB20:1; - unsigned long MSTPB19:1; - unsigned long MSTPB18:1; - unsigned long MSTPB17:1; - unsigned long MSTPB16:1; - unsigned long MSTPB15:1; - unsigned long :6; - unsigned long MSTPB8:1; - unsigned long :3; - unsigned long MSTPB4:1; - unsigned long :1; - unsigned long MSTPB2:1; - unsigned long MSTPB1:1; - unsigned long MSTPB0:1; - } BIT; - } MSTPCRB; - union { - unsigned long LONG; - struct { - unsigned long :4; - unsigned long MSTPC27:1; - unsigned long MSTPC26:1; - unsigned long MSTPC25:1; - unsigned long MSTPC24:1; - unsigned long :1; - unsigned long MSTPC22:1; - unsigned long :2; - unsigned long MSTPC19:1; - unsigned long MSTPC18:1; - unsigned long MSTPC17:1; - unsigned long MSTPC16:1; - unsigned long :14; - unsigned long MSTPC1:1; - unsigned long MSTPC0:1; - } BIT; - } MSTPCRC; - char wk3[4]; - union { - unsigned long LONG; - struct { - unsigned long FCK:4; - unsigned long ICK:4; - unsigned long PSTOP1:1; - unsigned long PSTOP0:1; - unsigned long :2; - unsigned long BCK:4; - unsigned long PCKA:4; - unsigned long PCKB:4; - } BIT; - } SCKCR; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short UCK:4; - unsigned short IEBCK:4; - } BIT; - } SCKCR2; - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short CKSEL:3; - } BIT; - } SCKCR3; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short STC:6; - unsigned short :6; - unsigned short PLIDIV:2; - } BIT; - } PLLCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PLLEN:1; - } BIT; - } PLLCR2; - char wk4[5]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char BCLKDIV:1; - } BIT; - } BCKCR; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char MOSTP:1; - } BIT; - } MOSCCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SOSTP:1; - } BIT; - } SOSCCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char LCSTP:1; - } BIT; - } LOCOCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char ILCSTP:1; - } BIT; - } ILOCOCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char HCSTP:1; - } BIT; - } HOCOCR; - char wk6[9]; - union { - unsigned char BYTE; - struct { - unsigned char OSTDE:1; - unsigned char :6; - unsigned char OSTDIE:1; - } BIT; - } OSTDCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char OSTDF:1; - } BIT; - } OSTDSR; - char wk7[94]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char OPCMTSF:1; - unsigned char :1; - unsigned char OPCM:3; - } BIT; - } OPCCR; - union { - unsigned char BYTE; - struct { - unsigned char RSTCKEN:1; - unsigned char :4; - unsigned char RSTCKSEL:3; - } BIT; - } RSTCKCR; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MSTS:5; - } BIT; - } MOSCWTCR; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char SSTS:5; - } BIT; - } SOSCWTCR; - char wk8[2]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSTS:5; - } BIT; - } PLLWTCR; - char wk9[25]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SWRF:1; - unsigned char WDTRF:1; - unsigned char IWTDRF:1; - } BIT; - } RSTSR2; - char wk10[1]; - unsigned short SWRR; - char wk11[28]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD1IDTSEL:2; - } BIT; - } LVD1CR1; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD1MON:1; - unsigned char LVD1DET:1; - } BIT; - } LVD1SR; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD2IDTSEL:2; - } BIT; - } LVD2CR1; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD2MON:1; - unsigned char LVD2DET:1; - } BIT; - } LVD2SR; - char wk12[794]; - union { - unsigned short WORD; - struct { - unsigned short PRKEY:8; - unsigned short :4; - unsigned short PRC3:1; - unsigned short :1; - unsigned short PRC1:1; - unsigned short PRC0:1; - } BIT; - } PRCR; - char wk13[48768]; - union { - unsigned char BYTE; - struct { - unsigned char DPSBY:1; - unsigned char IOKEEP:1; - unsigned char :4; - unsigned char DEEPCUT:2; - } BIT; - } DPSBYCR; - char wk14[1]; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ7E:1; - unsigned char DIRQ6E:1; - unsigned char DIRQ5E:1; - unsigned char DIRQ4E:1; - unsigned char DIRQ3E:1; - unsigned char DIRQ2E:1; - unsigned char DIRQ1E:1; - unsigned char DIRQ0E:1; - } BIT; - } DPSIER0; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ15E:1; - unsigned char DIRQ14E:1; - unsigned char DIRQ13E:1; - unsigned char DIRQ12E:1; - unsigned char DIRQ11E:1; - unsigned char DIRQ10E:1; - unsigned char DIRQ9E:1; - unsigned char DIRQ8E:1; - } BIT; - } DPSIER1; - union { - unsigned char BYTE; - struct { - unsigned char DUSBIE:1; - unsigned char DIICCIE:1; - unsigned char DIICDIE:1; - unsigned char DNMIE:1; - unsigned char DRTCAIE:1; - unsigned char DRTCIIE:1; - unsigned char DLVD2IE:1; - unsigned char DLVD1IE:1; - } BIT; - } DPSIER2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DCANIE:1; - } BIT; - } DPSIER3; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ7F:1; - unsigned char DIRQ6F:1; - unsigned char DIRQ5F:1; - unsigned char DIRQ4F:1; - unsigned char DIRQ3F:1; - unsigned char DIRQ2F:1; - unsigned char DIRQ1F:1; - unsigned char DIRQ0F:1; - } BIT; - } DPSIFR0; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ15F:1; - unsigned char DIRQ14F:1; - unsigned char DIRQ13F:1; - unsigned char DIRQ12F:1; - unsigned char DIRQ11F:1; - unsigned char DIRQ10F:1; - unsigned char DIRQ9F:1; - unsigned char DIRQ8F:1; - } BIT; - } DPSIFR1; - union { - unsigned char BYTE; - struct { - unsigned char DUSBIF:1; - unsigned char DIICCIF:1; - unsigned char DIICDIF:1; - unsigned char DNMIF:1; - unsigned char DRTCAIF:1; - unsigned char DRTCIIF:1; - unsigned char DLVD2IF:1; - unsigned char DLVD1IF:1; - } BIT; - } DPSIFR2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DCANIF:1; - } BIT; - } DPSIFR3; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ7EG:1; - unsigned char DIRQ6EG:1; - unsigned char DIRQ5EG:1; - unsigned char DIRQ4EG:1; - unsigned char DIRQ3EG:1; - unsigned char DIRQ2EG:1; - unsigned char DIRQ1EG:1; - unsigned char DIRQ0EG:1; - } BIT; - } DPSIEGR0; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ15EG:1; - unsigned char DIRQ14EG:1; - unsigned char DIRQ13EG:1; - unsigned char DIRQ12EG:1; - unsigned char DIRQ11EG:1; - unsigned char DIRQ10EG:1; - unsigned char DIRQ9EG:1; - unsigned char DIRQ8EG:1; - } BIT; - } DPSIEGR1; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DIICCEG:1; - unsigned char DIICDEG:1; - unsigned char DNMIEG:1; - unsigned char :2; - unsigned char DLVD2EG:1; - unsigned char DLVD1EG:1; - } BIT; - } DPSIEGR2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DCANIEG:1; - } BIT; - } DPSIEGR3; - char wk15[2]; - union { - unsigned char BYTE; - struct { - unsigned char DPSRSTF:1; - unsigned char :3; - unsigned char LVD2RF:1; - unsigned char LVD1RF:1; - unsigned char LVD0RF:1; - unsigned char PORF:1; - } BIT; - } RSTSR0; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char CWSF:1; - } BIT; - } RSTSR1; - char wk16[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char MOFXIN:1; - } BIT; - } MOFCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char HOCOPCNT:1; - } BIT; - } HOCOPCR; - char wk17[2]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char LVD2E:1; - unsigned char LVD1E:1; - } BIT; - } LVCMPCR; - union { - unsigned char BYTE; - struct { - unsigned char LVD2LVL:4; - unsigned char LVD1LVL:4; - } BIT; - } LVDLVLR; - char wk18[1]; - union { - unsigned char BYTE; - struct { - unsigned char LVD1RN:1; - unsigned char LVD1RI:1; - unsigned char LVD1FSAMP:2; - unsigned char :1; - unsigned char LVD1CMPE:1; - unsigned char LVD1DFDIS:1; - unsigned char LVD1RIE:1; - } BIT; - } LVD1CR0; - union { - unsigned char BYTE; - struct { - unsigned char LVD2RN:1; - unsigned char LVD2RI:1; - unsigned char LVD2FSAMP:2; - unsigned char :1; - unsigned char LVD2CMPE:1; - unsigned char LVD2DFDIS:1; - unsigned char LVD2RIE:1; - } BIT; - } LVD2CR0; - char wk19[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char VBATTMNSEL:1; - } BIT; - } VBATTMNSELR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char VBATTMON:1; - } BIT; - } VBATTMONR; - char wk20[1]; - unsigned char DPSBKR[32]; - char wk21[1472]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char SCK:2; - } BIT; - } SCK1; - char wk22[15]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char SCK:2; - } BIT; - } SCK2; -}; - -struct st_temps { - union { - unsigned char BYTE; - struct { - unsigned char TSEN:1; - unsigned char :2; - unsigned char TSOE:1; - } BIT; - } TSCR; -}; - -struct st_tmr0 { - union { - unsigned char BYTE; - struct { - unsigned char CMIEB:1; - unsigned char CMIEA:1; - unsigned char OVIE:1; - unsigned char CCLR:2; - } BIT; - } TCR; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char ADTE:1; - unsigned char OSB:2; - unsigned char OSA:2; - } BIT; - } TCSR; - char wk1[1]; - unsigned char TCORA; - char wk2[1]; - unsigned char TCORB; - char wk3[1]; - unsigned char TCNT; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char TMRIS:1; - unsigned char :2; - unsigned char CSS:2; - unsigned char CKS:3; - } BIT; - } TCCR; -}; - -struct st_tmr1 { - union { - unsigned char BYTE; - struct { - unsigned char CMIEB:1; - unsigned char CMIEA:1; - unsigned char OVIE:1; - unsigned char CCLR:2; - } BIT; - } TCR; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char OSB:2; - unsigned char OSA:2; - } BIT; - } TCSR; - char wk1[1]; - unsigned char TCORA; - char wk2[1]; - unsigned char TCORB; - char wk3[1]; - unsigned char TCNT; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char TMRIS:1; - unsigned char :2; - unsigned char CSS:2; - unsigned char CKS:3; - } BIT; - } TCCR; -}; - -struct st_tmr01 { - unsigned short TCORA; - unsigned short TCORB; - unsigned short TCNT; - unsigned short TCCR; -}; - -struct st_tpu0 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[7]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - unsigned short TGRC; - unsigned short TGRD; -}; - -struct st_tpu1 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[22]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpu2 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[37]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpu3 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[52]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - unsigned short TGRC; - unsigned short TGRD; -}; - -struct st_tpu4 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[67]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpu5 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[82]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpua { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char CST5:1; - unsigned char CST4:1; - unsigned char CST3:1; - unsigned char CST2:1; - unsigned char CST1:1; - unsigned char CST0:1; - } BIT; - } TSTR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char SYNC5:1; - unsigned char SYNC4:1; - unsigned char SYNC3:1; - unsigned char SYNC2:1; - unsigned char SYNC1:1; - unsigned char SYNC0:1; - } BIT; - } TSYR; -}; - -struct st_tpub { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char CST11:1; - unsigned char CST10:1; - unsigned char CST9:1; - unsigned char CST8:1; - unsigned char CST7:1; - unsigned char CST6:1; - } BIT; - } TSTR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char SYNC11:1; - unsigned char SYNC10:1; - unsigned char SYNC9:1; - unsigned char SYNC8:1; - unsigned char SYNC7:1; - unsigned char SYNC6:1; - } BIT; - } TSYR; -}; - -struct st_usb { - union { - unsigned long LONG; - struct { - unsigned long DVSTS1:1; - unsigned long :5; - unsigned long DM1:1; - unsigned long DP1:1; - unsigned long DVBSTS0:1; - unsigned long :1; - unsigned long DOVCB0:1; - unsigned long DOVCA0:1; - unsigned long :2; - unsigned long DM0:1; - unsigned long DP0:1; - unsigned long :3; - unsigned long FIXPHY1:1; - unsigned long :3; - unsigned long SRPC1:1; - unsigned long :3; - unsigned long FIXPHY0:1; - unsigned long :3; - unsigned long SRPC0:1; - } BIT; - } DPUSR0R; - union { - unsigned long LONG; - struct { - unsigned long DVBINT1:1; - unsigned long :5; - unsigned long DMINT1:1; - unsigned long DPINT1:1; - unsigned long DVBINT0:1; - unsigned long :1; - unsigned long DOVRCRB0:1; - unsigned long DOVRCRA0:1; - unsigned long :2; - unsigned long DMINT0:1; - unsigned long DPINT0:1; - unsigned long DVBSE1:1; - unsigned long :5; - unsigned long DMINTE1:1; - unsigned long DPINTE1:1; - unsigned long DVBSE0:1; - unsigned long :1; - unsigned long DOVRCRBE0:1; - unsigned long DOVRCRAE0:1; - unsigned long :2; - unsigned long DMINTE0:1; - unsigned long DPINTE0:1; - } BIT; - } DPUSR1R; -}; - -struct st_usb0 { - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short SCKE:1; - unsigned short :3; - unsigned short DCFM:1; - unsigned short DRPD:1; - unsigned short DPRPU:1; - unsigned short :3; - unsigned short USBE:1; - } BIT; - } SYSCFG; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short OVCMON:2; - unsigned short :7; - unsigned short HTACT:1; - unsigned short :3; - unsigned short IDMON:1; - unsigned short LNST:2; - } BIT; - } SYSSTS0; - char wk1[2]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short HNPBTOA:1; - unsigned short EXICEN:1; - unsigned short VBUSEN:1; - unsigned short WKUP:1; - unsigned short RWUPE:1; - unsigned short USBRST:1; - unsigned short RESUME:1; - unsigned short UACT:1; - unsigned short :1; - unsigned short RHST:3; - } BIT; - } DVSTCTR0; - char wk2[10]; - //ORIG: unsigned short CFIFO; - union { - unsigned short WORD; - struct { - unsigned char L; - unsigned char H; - } BYTE; - } CFIFO; - //ENDORIG - char wk3[2]; - //ORIG: unsigned short D0FIFO; - union { - unsigned short WORD; - struct { - unsigned char L; - unsigned char H; - } BYTE; - } D0FIFO; - //ENDORIG - char wk4[2]; - //ORIG: unsigned short D1FIFO; - union { - unsigned short WORD; - struct { - unsigned char L; - unsigned char H; - } BYTE; - } D1FIFO; - //ENDORIG - char wk5[2]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short :3; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :2; - unsigned short ISEL:1; - unsigned short :1; - unsigned short CURPIPE:4; - } BIT; - } CFIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } CFIFOCTR; - char wk6[4]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D0FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D0FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D1FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D1FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short VBSE:1; - unsigned short RSME:1; - unsigned short SOFE:1; - unsigned short DVSE:1; - unsigned short CTRE:1; - unsigned short BEMPE:1; - unsigned short NRDYE:1; - unsigned short BRDYE:1; - } BIT; - } INTENB0; - union { - unsigned short WORD; - struct { - unsigned short OVRCRE:1; - unsigned short BCHGE:1; - unsigned short :1; - unsigned short DTCHE:1; - unsigned short ATTCHE:1; - unsigned short :4; - unsigned short EOFERRE:1; - unsigned short SIGNE:1; - unsigned short SACKE:1; - } BIT; - } INTENB1; - char wk7[2]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDYE:1; - unsigned short PIPE8BRDYE:1; - unsigned short PIPE7BRDYE:1; - unsigned short PIPE6BRDYE:1; - unsigned short PIPE5BRDYE:1; - unsigned short PIPE4BRDYE:1; - unsigned short PIPE3BRDYE:1; - unsigned short PIPE2BRDYE:1; - unsigned short PIPE1BRDYE:1; - unsigned short PIPE0BRDYE:1; - } BIT; - } BRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BEMPE:1; - unsigned short PIPE6BEMPE:1; - unsigned short PIPE5BEMPE:1; - unsigned short PIPE4BEMPE:1; - unsigned short PIPE3BEMPE:1; - unsigned short PIPE2BEMPE:1; - unsigned short PIPE1BEMPE:1; - unsigned short PIPE0BEMPE:1; - } BIT; - } BEMPENB; - union { - unsigned short WORD; - struct { - unsigned short :7; - unsigned short TRNENSEL:1; - unsigned short :1; - unsigned short BRDYM:1; - unsigned short :1; - unsigned short EDGESTS:1; - } BIT; - } SOFCFG; - char wk8[2]; - union { - unsigned short WORD; - struct { - unsigned short VBINT:1; - unsigned short RESM:1; - unsigned short SOFR:1; - unsigned short DVST:1; - unsigned short CTRT:1; - unsigned short BEMP:1; - unsigned short NRDY:1; - unsigned short BRDY:1; - unsigned short VBSTS:1; - unsigned short DVSQ:3; - unsigned short VALID:1; - unsigned short CTSQ:3; - } BIT; - } INTSTS0; - union { - unsigned short WORD; - struct { - unsigned short OVRCR:1; - unsigned short BCHG:1; - unsigned short :1; - unsigned short DTCH:1; - unsigned short ATTCH:1; - unsigned short :4; - unsigned short EOFERR:1; - unsigned short SIGN:1; - unsigned short SACK:1; - } BIT; - } INTSTS1; - char wk9[2]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDY:1; - unsigned short PIPE8BRDY:1; - unsigned short PIPE7BRDY:1; - unsigned short PIPE6BRDY:1; - unsigned short PIPE5BRDY:1; - unsigned short PIPE4BRDY:1; - unsigned short PIPE3BRDY:1; - unsigned short PIPE2BRDY:1; - unsigned short PIPE1BRDY:1; - unsigned short PIPE0BRDY:1; - } BIT; - } BRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BENP:1; - unsigned short PIPE6BENP:1; - unsigned short PIPE5BENP:1; - unsigned short PIPE4BENP:1; - unsigned short PIPE3BENP:1; - unsigned short PIPE2BENP:1; - unsigned short PIPE1BENP:1; - unsigned short PIPE0BENP:1; - } BIT; - } BEMPSTS; - union { - unsigned short WORD; - struct { - unsigned short OVRN:1; - unsigned short CRCE:1; - unsigned short :3; - unsigned short FRNM:11; - } BIT; - } FRMNUM; - union { - unsigned short WORD; - struct { - unsigned short DVCHG:1; - } BIT; - } DVCHGR; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short STSRECOV:4; - unsigned short :1; - unsigned short USBADDR:7; - } BIT; - } USBADDR; - char wk10[2]; - union { - unsigned short WORD; - struct { - unsigned short BREQUEST:8; - unsigned short BMREQUESTTYPE:8; - } BIT; - } USBREQ; - unsigned short USBVAL; - unsigned short USBINDX; - unsigned short USBLENG; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - } BIT; - } DCPCFG; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :5; - unsigned short MXPS:7; - } BIT; - } DCPMAXP; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short SUREQ:1; - unsigned short :2; - unsigned short SUREQCLR:1; - unsigned short :2; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :2; - unsigned short CCPL:1; - unsigned short PID:2; - } BIT; - } DCPCTR; - char wk11[2]; - union { - unsigned short WORD; - struct { - unsigned short :12; - unsigned short PIPESEL:4; - } BIT; - } PIPESEL; - char wk12[2]; - union { - unsigned short WORD; - struct { - unsigned short TYPE:2; - unsigned short :3; - unsigned short BFRE:1; - unsigned short DBLB:1; - unsigned short :1; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - unsigned short EPNUM:4; - } BIT; - } PIPECFG; - char wk13[2]; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :3; - unsigned short MXPS:9; - } BIT; - } PIPEMAXP; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short IFIS:1; - unsigned short :9; - unsigned short IITV:3; - } BIT; - } PIPEPERI; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE1CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE2CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE3CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE4CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE5CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE6CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE7CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE8CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE9CTR; - char wk14[14]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE1TRE; - unsigned short PIPE1TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE2TRE; - unsigned short PIPE2TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE3TRE; - unsigned short PIPE3TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE4TRE; - unsigned short PIPE4TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE5TRE; - unsigned short PIPE5TRN; - char wk15[44]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD0; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD1; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD2; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD3; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD4; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD5; -}; - -struct st_usb1 { - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short SCKE:1; - unsigned short :3; - unsigned short DCFM:1; - unsigned short DRPD:1; - unsigned short DPRPU:1; - unsigned short :3; - unsigned short USBE:1; - } BIT; - } SYSCFG; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short OVCMON:2; - unsigned short :7; - unsigned short HTACT:1; - unsigned short :3; - unsigned short IDMON:1; - unsigned short LNST:2; - } BIT; - } SYSSTS0; - char wk1[2]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short HNPBTOA:1; - unsigned short EXICEN:1; - unsigned short VBUSEN:1; - unsigned short WKUP:1; - unsigned short RWUPE:1; - unsigned short USBRST:1; - unsigned short RESUME:1; - unsigned short UACT:1; - unsigned short :1; - unsigned short RHST:3; - } BIT; - } DVSTCTR0; - char wk2[10]; - unsigned short CFIFO; - char wk3[2]; - unsigned short D0FIFO; - char wk4[2]; - unsigned short D1FIFO; - char wk5[2]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short :3; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :2; - unsigned short ISEL:1; - unsigned short :1; - unsigned short CURPIPE:4; - } BIT; - } CFIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } CFIFOCTR; - char wk6[4]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D0FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D0FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D1FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D1FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short VBSE:1; - unsigned short RSME:1; - unsigned short SOFE:1; - unsigned short DVSE:1; - unsigned short CTRE:1; - unsigned short BEMPE:1; - unsigned short NRDYE:1; - unsigned short BRDYE:1; - } BIT; - } INTENB0; - char wk7[4]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDYE:1; - unsigned short PIPE8BRDYE:1; - unsigned short PIPE7BRDYE:1; - unsigned short PIPE6BRDYE:1; - unsigned short PIPE5BRDYE:1; - unsigned short PIPE4BRDYE:1; - unsigned short PIPE3BRDYE:1; - unsigned short PIPE2BRDYE:1; - unsigned short PIPE1BRDYE:1; - unsigned short PIPE0BRDYE:1; - } BIT; - } BRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BEMPE:1; - unsigned short PIPE6BEMPE:1; - unsigned short PIPE5BEMPE:1; - unsigned short PIPE4BEMPE:1; - unsigned short PIPE3BEMPE:1; - unsigned short PIPE2BEMPE:1; - unsigned short PIPE1BEMPE:1; - unsigned short PIPE0BEMPE:1; - } BIT; - } BEMPENB; - union { - unsigned short WORD; - struct { - unsigned short :9; - unsigned short BRDYM:1; - unsigned short :1; - unsigned short EDGESTS:1; - } BIT; - } SOFCFG; - char wk8[2]; - union { - unsigned short WORD; - struct { - unsigned short VBINT:1; - unsigned short RESM:1; - unsigned short SOFR:1; - unsigned short DVST:1; - unsigned short CTRT:1; - unsigned short BEMP:1; - unsigned short NRDY:1; - unsigned short BRDY:1; - unsigned short VBSTS:1; - unsigned short DVSQ:3; - unsigned short VALID:1; - unsigned short CTSQ:3; - } BIT; - } INTSTS0; - char wk9[4]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDY:1; - unsigned short PIPE8BRDY:1; - unsigned short PIPE7BRDY:1; - unsigned short PIPE6BRDY:1; - unsigned short PIPE5BRDY:1; - unsigned short PIPE4BRDY:1; - unsigned short PIPE3BRDY:1; - unsigned short PIPE2BRDY:1; - unsigned short PIPE1BRDY:1; - unsigned short PIPE0BRDY:1; - } BIT; - } BRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BENP:1; - unsigned short PIPE6BENP:1; - unsigned short PIPE5BENP:1; - unsigned short PIPE4BENP:1; - unsigned short PIPE3BENP:1; - unsigned short PIPE2BENP:1; - unsigned short PIPE1BENP:1; - unsigned short PIPE0BENP:1; - } BIT; - } BEMPSTS; - union { - unsigned short WORD; - struct { - unsigned short OVRN:1; - unsigned short CRCE:1; - unsigned short :3; - unsigned short FRNM:11; - } BIT; - } FRMNUM; - union { - unsigned short WORD; - struct { - unsigned short DVCHG:1; - } BIT; - } DVCHGR; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short STSRECOV:4; - unsigned short :1; - unsigned short USBADDR:7; - } BIT; - } USBADDR; - char wk10[2]; - union { - unsigned short WORD; - struct { - unsigned short BREQUEST:8; - unsigned short BMREQUESTTYPE:8; - } BIT; - } USBREQ; - unsigned short USBVAL; - unsigned short USBINDX; - unsigned short USBLENG; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - } BIT; - } DCPCFG; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :5; - unsigned short MXPS:7; - } BIT; - } DCPMAXP; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short SUREQ:1; - unsigned short :2; - unsigned short SUREQCLR:1; - unsigned short :2; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :2; - unsigned short CCPL:1; - unsigned short PID:2; - } BIT; - } DCPCTR; - char wk11[2]; - union { - unsigned short WORD; - struct { - unsigned short :12; - unsigned short PIPESEL:4; - } BIT; - } PIPESEL; - char wk12[2]; - union { - unsigned short WORD; - struct { - unsigned short TYPE:2; - unsigned short :3; - unsigned short BFRE:1; - unsigned short DBLB:1; - unsigned short :1; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - unsigned short EPNUM:4; - } BIT; - } PIPECFG; - char wk13[2]; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :3; - unsigned short MXPS:9; - } BIT; - } PIPEMAXP; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short IFIS:1; - unsigned short :9; - unsigned short IITV:3; - } BIT; - } PIPEPERI; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE1CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE2CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE3CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE4CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE5CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE6CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE7CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE8CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE9CTR; - char wk14[14]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE1TRE; - unsigned short PIPE1TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE2TRE; - unsigned short PIPE2TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE3TRE; - unsigned short PIPE3TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE4TRE; - unsigned short PIPE4TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE5TRE; - unsigned short PIPE5TRN; - char wk15[44]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD0; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD1; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD2; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD3; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD4; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD5; -}; - -struct st_wdt { - unsigned char WDTRR; - char wk0[1]; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short RPSS:2; - unsigned short :2; - unsigned short RPES:2; - unsigned short CKS:4; - unsigned short :2; - unsigned short TOPS:2; - } BIT; - } WDTCR; - union { - unsigned short WORD; - struct { - unsigned short REFEF:1; - unsigned short UNDFF:1; - unsigned short CNTVAL:14; - } BIT; - } WDTSR; - union { - unsigned char BYTE; - struct { - unsigned char RSTIRQS:1; - } BIT; - } WDTRCR; -}; - -enum enum_ir { -IR_BSC_BUSERR=16,IR_FCU_FIFERR=21, -IR_ICU_SWINT=27, -IR_CMT0_CMI0, -IR_CMT1_CMI1, -IR_CMT2_CMI2, -IR_CMT3_CMI3, -IR_ETHER_EINT, -IR_USB0_D0FIFO0,IR_USB0_D1FIFO0,IR_USB0_USBI0, -IR_USB1_D0FIFO1,IR_USB1_D1FIFO1,IR_USB1_USBI1, -IR_RSPI0_SPRI0,IR_RSPI0_SPTI0,IR_RSPI0_SPII0, -IR_RSPI1_SPRI1,IR_RSPI1_SPTI1,IR_RSPI1_SPII1, -IR_RSPI2_SPRI2,IR_RSPI2_SPTI2,IR_RSPI2_SPII2, -IR_CAN0_RXF0,IR_CAN0_TXF0,IR_CAN0_RXM0,IR_CAN0_TXM0, -IR_CAN1_RXF1,IR_CAN1_TXF1,IR_CAN1_RXM1,IR_CAN1_TXM1, -IR_CAN2_RXF2,IR_CAN2_TXF2,IR_CAN2_RXM2,IR_CAN2_TXM2, -IR_RTC_COUNTUP=62, -IR_ICU_IRQ0=64,IR_ICU_IRQ1,IR_ICU_IRQ2,IR_ICU_IRQ3,IR_ICU_IRQ4,IR_ICU_IRQ5,IR_ICU_IRQ6,IR_ICU_IRQ7,IR_ICU_IRQ8,IR_ICU_IRQ9,IR_ICU_IRQ10,IR_ICU_IRQ11,IR_ICU_IRQ12,IR_ICU_IRQ13,IR_ICU_IRQ14,IR_ICU_IRQ15, -IR_USB_USBR0=90,IR_USB_USBR1, -IR_RTC_ALARM,IR_RTC_PRD, -IR_AD0_ADI0=98, -IR_S12AD0_S12ADI0=102, -IR_ICU_GROUPE0=106,IR_ICU_GROUPE1,IR_ICU_GROUPE2,IR_ICU_GROUPE3,IR_ICU_GROUPE4,IR_ICU_GROUPE5,IR_ICU_GROUPE6,IR_ICU_GROUPL0=114, -IR_SCIX_SCIX0=122,IR_SCIX_SCIX1,IR_SCIX_SCIX2,IR_SCIX_SCIX3, -IR_TPU0_TGI0A,IR_TPU0_TGI0B,IR_TPU0_TGI0C,IR_TPU0_TGI0D, -IR_TPU1_TGI1A,IR_TPU1_TGI1B, -IR_TPU2_TGI2A,IR_TPU2_TGI2B, -IR_TPU3_TGI3A,IR_TPU3_TGI3B,IR_TPU3_TGI3C,IR_TPU3_TGI3D, -IR_TPU4_TGI4A,IR_TPU4_TGI4B, -IR_TPU5_TGI5A,IR_TPU5_TGI5B, -IR_TPU6_TGI6A,IR_TPU6_TGI6B,IR_TPU6_TGI6C,IR_TPU6_TGI6D, -IR_MTU0_TGIA0=142,IR_MTU0_TGIB0,IR_MTU0_TGIC0,IR_MTU0_TGID0,IR_MTU0_TGIE0,IR_MTU0_TGIF0, -IR_TPU7_TGI7A,IR_TPU7_TGI7B, -IR_MTU1_TGIA1=148,IR_MTU1_TGIB1, -IR_TPU8_TGI8A,IR_TPU8_TGI8B, -IR_MTU2_TGIA2=150,IR_MTU2_TGIB2, -IR_TPU9_TGI9A,IR_TPU9_TGI9B,IR_TPU9_TGI9C,IR_TPU9_TGI9D, -IR_MTU3_TGIA3=152,IR_MTU3_TGIB3,IR_MTU3_TGIC3,IR_MTU3_TGID3, -IR_TPU10_TGI10A,IR_TPU10_TGI10B, -IR_MTU4_TGIA4=156,IR_MTU4_TGIB4,IR_MTU4_TGIC4,IR_MTU4_TGID4,IR_MTU4_TCIV4, -IR_MTU5_TGIU5,IR_MTU5_TGIV5,IR_MTU5_TGIW5, -IR_TPU11_TGI11A,IR_TPU11_TGI11B, -IR_POE_OEI1,IR_POE_OEI2, -IR_TMR0_CMIA0=170,IR_TMR0_CMIB0,IR_TMR0_OVI0, -IR_TMR1_CMIA1,IR_TMR1_CMIB1,IR_TMR1_OVI1, -IR_TMR2_CMIA2,IR_TMR2_CMIB2,IR_TMR2_OVI2, -IR_TMR3_CMIA3,IR_TMR3_CMIB3,IR_TMR3_OVI3, -IR_RIIC0_EEI0,IR_RIIC0_RXI0,IR_RIIC0_TXI0,IR_RIIC0_TEI0, -IR_RIIC1_EEI1,IR_RIIC1_RXI1,IR_RIIC1_TXI1,IR_RIIC1_TEI1, -IR_RIIC2_EEI2,IR_RIIC2_RXI2,IR_RIIC2_TXI2,IR_RIIC2_TEI2, -IR_RIIC3_EEI3,IR_RIIC3_RXI3,IR_RIIC3_TXI3,IR_RIIC3_TEI3, -IR_DMAC_DMAC0I,IR_DMAC_DMAC1I,IR_DMAC_DMAC2I,IR_DMAC_DMAC3I, -IR_EXDMAC_EXDMAC0I,IR_EXDMAC_EXDMAC1I, -IR_SCI0_RXI0=214,IR_SCI0_TXI0,IR_SCI0_TEI0, -IR_SCI1_RXI1,IR_SCI1_TXI1,IR_SCI1_TEI1, -IR_SCI2_RXI2,IR_SCI2_TXI2,IR_SCI2_TEI2, -IR_SCI3_RXI3,IR_SCI3_TXI3,IR_SCI3_TEI3, -IR_SCI4_RXI4,IR_SCI4_TXI4,IR_SCI4_TEI4, -IR_SCI5_RXI5,IR_SCI5_TXI5,IR_SCI5_TEI5, -IR_SCI6_RXI6,IR_SCI6_TXI6,IR_SCI6_TEI6, -IR_SCI7_RXI7,IR_SCI7_TXI7,IR_SCI7_TEI7, -IR_SCI8_RXI8,IR_SCI8_TXI8,IR_SCI8_TEI8, -IR_SCI9_RXI9,IR_SCI9_TXI9,IR_SCI9_TEI9, -IR_SCI10_RXI10,IR_SCI10_TXI10,IR_SCI10_TEI10, -IR_SCI11_RXI11,IR_SCI11_TXI11,IR_SCI11_TEI11, -IR_SCI12_RXI12,IR_SCI12_TXI12,IR_SCI12_TEI12, -IR_IEB_IEBINT -}; - -enum enum_dtce { -DTCE_ICU_SWINT=27, -DTCE_CMT0_CMI0, -DTCE_CMT1_CMI1, -DTCE_CMT2_CMI2, -DTCE_CMT3_CMI3, -DTCE_USB0_D0FIFO0=33,DTCE_USB0_D1FIFO0, -DTCE_USB1_D0FIFO1=36,DTCE_USB1_D1FIFO1, -DTCE_RSPI0_SPRI0=39,DTCE_RSPI0_SPTI0, -DTCE_RSPI1_SPRI1=42,DTCE_RSPI1_SPTI1, -DTCE_RSPI2_SPRI2=45,DTCE_RSPI2_SPTI2, -DTCE_ICU_IRQ0=64,DTCE_ICU_IRQ1,DTCE_ICU_IRQ2,DTCE_ICU_IRQ3,DTCE_ICU_IRQ4,DTCE_ICU_IRQ5,DTCE_ICU_IRQ6,DTCE_ICU_IRQ7,DTCE_ICU_IRQ8,DTCE_ICU_IRQ9,DTCE_ICU_IRQ10,DTCE_ICU_IRQ11,DTCE_ICU_IRQ12,DTCE_ICU_IRQ13,DTCE_ICU_IRQ14,DTCE_ICU_IRQ15, -DTCE_AD0_ADI0=98, -DTCE_S12AD0_S12ADI0=102, -DTCE_TPU0_TGI0A=126,DTCE_TPU0_TGI0B,DTCE_TPU0_TGI0C,DTCE_TPU0_TGI0D, -DTCE_TPU1_TGI1A,DTCE_TPU1_TGI1B, -DTCE_TPU2_TGI2A,DTCE_TPU2_TGI2B, -DTCE_TPU3_TGI3A,DTCE_TPU3_TGI3B,DTCE_TPU3_TGI3C,DTCE_TPU3_TGI3D, -DTCE_TPU4_TGI4A,DTCE_TPU4_TGI4B, -DTCE_TPU5_TGI5A,DTCE_TPU5_TGI5B, -DTCE_TPU6_TGI6A,DTCE_TPU6_TGI6B,DTCE_TPU6_TGI6C,DTCE_TPU6_TGI6D, -DTCE_MTU0_TGIA0=142,DTCE_MTU0_TGIB0,DTCE_MTU0_TGIC0,DTCE_MTU0_TGID0, -DTCE_TPU7_TGI7A=148,DTCE_TPU7_TGI7B, -DTCE_MTU1_TGIA1=148,DTCE_MTU1_TGIB1, -DTCE_TPU8_TGI8A,DTCE_TPU8_TGI8B, -DTCE_MTU2_TGIA2=150,DTCE_MTU2_TGIB2, -DTCE_TPU9_TGI9A,DTCE_TPU9_TGI9B,DTCE_TPU9_TGI9C,DTCE_TPU9_TGI9D, -DTCE_MTU3_TGIA3=152,DTCE_MTU3_TGIB3,DTCE_MTU3_TGIC3,DTCE_MTU3_TGID3, -DTCE_TPU10_TGI10A,DTCE_TPU10_TGI10B, -DTCE_MTU4_TGIA4=156,DTCE_MTU4_TGIB4,DTCE_MTU4_TGIC4,DTCE_MTU4_TGID4,DTCE_MTU4_TCIV4, -DTCE_MTU5_TGIU5,DTCE_MTU5_TGIV5,DTCE_MTU5_TGIW5, -DTCE_TPU11_TGI11A,DTCE_TPU11_TGI11B, -DTCE_TMR0_CMIA0=170,DTCE_TMR0_CMIB0, -DTCE_TMR1_CMIA1=173,DTCE_TMR1_CMIB1, -DTCE_TMR2_CMIA2=176,DTCE_TMR2_CMIB2, -DTCE_TMR3_CMIA3=179,DTCE_TMR3_CMIB3, -DTCE_RIIC0_RXI0=183,DTCE_RIIC0_TXI0, -DTCE_RIIC1_RXI1=187,DTCE_RIIC1_TXI1, -DTCE_RIIC2_RXI2=191,DTCE_RIIC2_TXI2, -DTCE_RIIC3_RXI3=195,DTCE_RIIC3_TXI3, -DTCE_DMAC_DMAC0I=198,DTCE_DMAC_DMAC1I,DTCE_DMAC_DMAC2I,DTCE_DMAC_DMAC3I, -DTCE_EXDMAC_EXDMAC0I,DTCE_EXDMAC_EXDMAC1I, -DTCE_SCI0_RXI0=214,DTCE_SCI0_TXI0, -DTCE_SCI1_RXI1=217,DTCE_SCI1_TXI1, -DTCE_SCI2_RXI2=220,DTCE_SCI2_TXI2, -DTCE_SCI3_RXI3=223,DTCE_SCI3_TXI3, -DTCE_SCI4_RXI4=226,DTCE_SCI4_TXI4, -DTCE_SCI5_RXI5=229,DTCE_SCI5_TXI5, -DTCE_SCI6_RXI6=232,DTCE_SCI6_TXI6, -DTCE_SCI7_RXI7=235,DTCE_SCI7_TXI7, -DTCE_SCI8_RXI8=238,DTCE_SCI8_TXI8, -DTCE_SCI9_RXI9=241,DTCE_SCI9_TXI9, -DTCE_SCI10_RXI10=244,DTCE_SCI10_TXI10, -DTCE_SCI11_RXI11=247,DTCE_SCI11_TXI11, -DTCE_SCI12_RXI12=250,DTCE_SCI12_TXI12 -}; - -enum enum_ier { -IER_BSC_BUSERR=0x02, -IER_FCU_FIFERR=0x02,IER_FCU_FRDYI=0x02, -IER_ICU_SWINT=0x03, -IER_CMT0_CMI0=0x03, -IER_CMT1_CMI1=0x03, -IER_CMT2_CMI2=0x03, -IER_CMT3_CMI3=0x03, -IER_ETHER_EINT=0x04, -IER_USB0_D0FIFO0=0x04,IER_USB0_D1FIFO0=0x04,IER_USB0_USBI0=0x04, -IER_USB1_D0FIFO1=0x04,IER_USB1_D1FIFO1=0x04,IER_USB1_USBI1=0x04, -IER_RSPI0_SPRI0=0x04,IER_RSPI0_SPTI0=0x05,IER_RSPI0_SPII0=0x05, -IER_RSPI1_SPRI1=0x05,IER_RSPI1_SPTI1=0x05,IER_RSPI1_SPII1=0x05, -IER_RSPI2_SPRI2=0x05,IER_RSPI2_SPTI2=0x05,IER_RSPI2_SPII2=0x05, -IER_CAN0_RXF0=0x06,IER_CAN0_TXF0=0x06,IER_CAN0_RXM0=0x06,IER_CAN0_TXM0=0x06, -IER_CAN1_RXF1=0x06,IER_CAN1_TXF1=0x06,IER_CAN1_RXM1=0x06,IER_CAN1_TXM1=0x06, -IER_CAN2_RXF2=0x07,IER_CAN2_TXF2=0x07,IER_CAN2_RXM2=0x07,IER_CAN2_TXM2=0x07, -IER_RTC_COUNTUP=0x07, -IER_ICU_IRQ0=0x08,IER_ICU_IRQ1=0x08,IER_ICU_IRQ2=0x08,IER_ICU_IRQ3=0x08,IER_ICU_IRQ4=0x08,IER_ICU_IRQ5=0x08,IER_ICU_IRQ6=0x08,IER_ICU_IRQ7=0x08,IER_ICU_IRQ8=0x09,IER_ICU_IRQ9=0x09,IER_ICU_IRQ10=0x09,IER_ICU_IRQ11=0x09,IER_ICU_IRQ12=0x09,IER_ICU_IRQ13=0x09,IER_ICU_IRQ14=0x09,IER_ICU_IRQ15=0x09, -IER_USB_USBR0=0x0B,IER_USB_USBR1=0x0B, -IER_RTC_ALARM=0x0B,IER_RTC_PRD=0x0B, -IER_AD0_ADI0=0x0C, -IER_S12AD0_S12ADI0=0x0C, -IER_ICU_GROUPE0=0x0D,IER_ICU_GROUPE1=0x0D,IER_ICU_GROUPE2=0x0D,IER_ICU_GROUPE3=0x0D,IER_ICU_GROUPE4=0x0D,IER_ICU_GROUPE5=0x0D,IER_ICU_GROUPE6=0x0E,IER_ICU_GROUPL0=0x0E, -IER_SCIX_SCIX0=0x0F,IER_SCIX_SCIX1=0x0F,IER_SCIX_SCIX2=0x0F,IER_SCIX_SCIX3=0x0F, -IER_TPU0_TGI0A=0x0F,IER_TPU0_TGI0B=0x0F,IER_TPU0_TGI0C=0x10,IER_TPU0_TGI0D=0x10, -IER_TPU1_TGI1A=0x10,IER_TPU1_TGI1B=0x10, -IER_TPU2_TGI2A=0x10,IER_TPU2_TGI2B=0x10, -IER_TPU3_TGI3A=0x10,IER_TPU3_TGI3B=0x10,IER_TPU3_TGI3C=0x11,IER_TPU3_TGI3D=0x11, -IER_TPU4_TGI4A=0x11,IER_TPU4_TGI4B=0x11, -IER_TPU5_TGI5A=0x11,IER_TPU5_TGI5B=0x11, -IER_TPU6_TGI6A=0x11,IER_TPU6_TGI6B=0x11,IER_TPU6_TGI6C=0x12,IER_TPU6_TGI6D=0x12, -IER_MTU0_TGIA0=0x11,IER_MTU0_TGIB0=0x11,IER_MTU0_TGIC0=0x12,IER_MTU0_TGID0=0x12,IER_MTU0_TGIE0=0x12,IER_MTU0_TGIF0=0x12, -IER_TPU7_TGI7A=0x12,IER_TPU7_TGI7B=0x12, -IER_MTU1_TGIA1=0x12,IER_MTU1_TGIB1=0x12, -IER_TPU8_TGI8A=0x12,IER_TPU8_TGI8B=0x12, -IER_MTU2_TGIA2=0x12,IER_MTU2_TGIB2=0x12, -IER_TPU9_TGI9A=0x13,IER_TPU9_TGI9B=0x13,IER_TPU9_TGI9C=0x13,IER_TPU9_TGI9D=0x13, -IER_MTU3_TGIA3=0x13,IER_MTU3_TGIB3=0x13,IER_MTU3_TGIC3=0x13,IER_MTU3_TGID3=0x13, -IER_TPU10_TGI10A=0x13,IER_TPU10_TGI10B=0x13, -IER_MTU4_TGIA4=0x13,IER_MTU4_TGIB4=0x13,IER_MTU4_TGIC4=0x13,IER_MTU4_TGID4=0x13,IER_MTU4_TCIV4=0x14, -IER_MTU5_TGIU5=0x14,IER_MTU5_TGIV5=0x14,IER_MTU5_TGIW5=0x14, -IER_TPU11_TGI11A=0x14,IER_TPU11_TGI11B=0x14, -IER_POE_OEI1=0x14,IER_POE_OEI2=0x14, -IER_TMR0_CMIA0=0x15,IER_TMR0_CMIB0=0x15,IER_TMR0_OVI0=0x15, -IER_TMR1_CMIA1=0x15,IER_TMR1_CMIB1=0x15,IER_TMR1_OVI1=0x15, -IER_TMR2_CMIA2=0x16,IER_TMR2_CMIB2=0x16,IER_TMR2_OVI2=0x16, -IER_TMR3_CMIA3=0x16,IER_TMR3_CMIB3=0x16,IER_TMR3_OVI3=0x16, -IER_RIIC0_EEI0=0x16,IER_RIIC0_RXI0=0x16,IER_RIIC0_TXI0=0x17,IER_RIIC0_TEI0=0x17, -IER_RIIC1_EEI1=0x17,IER_RIIC1_RXI1=0x17,IER_RIIC1_TXI1=0x17,IER_RIIC1_TEI1=0x17, -IER_RIIC2_EEI2=0x17,IER_RIIC2_RXI2=0x17,IER_RIIC2_TXI2=0x18,IER_RIIC2_TEI2=0x18, -IER_RIIC3_EEI3=0x18,IER_RIIC3_RXI3=0x18,IER_RIIC3_TXI3=0x18,IER_RIIC3_TEI3=0x18, -IER_DMAC_DMAC0I=0x18,IER_DMAC_DMAC1I=0x18,IER_DMAC_DMAC2I=0x19,IER_DMAC_DMAC3I=0x19, -IER_EXDMAC_EXDMAC0I=0x19,IER_EXDMAC_EXDMAC1I=0x19, -IER_SCI0_RXI0=0x1A,IER_SCI0_TXI0=0x1A,IER_SCI0_TEI0=0x1B, -IER_SCI1_RXI1=0x1B,IER_SCI1_TXI1=0x1B,IER_SCI1_TEI1=0x1B, -IER_SCI2_RXI2=0x1B,IER_SCI2_TXI2=0x1B,IER_SCI2_TEI2=0x1B, -IER_SCI3_RXI3=0x1B,IER_SCI3_TXI3=0x1C,IER_SCI3_TEI3=0x1C, -IER_SCI4_RXI4=0x1C,IER_SCI4_TXI4=0x1C,IER_SCI4_TEI4=0x1C, -IER_SCI5_RXI5=0x1C,IER_SCI5_TXI5=0x1C,IER_SCI5_TEI5=0x1C, -IER_SCI6_RXI6=0x1D,IER_SCI6_TXI6=0x1D,IER_SCI6_TEI6=0x1D, -IER_SCI7_RXI7=0x1D,IER_SCI7_TXI7=0x1D,IER_SCI7_TEI7=0x1D, -IER_SCI8_RXI8=0x1D,IER_SCI8_TXI8=0x1D,IER_SCI8_TEI8=0x1E, -IER_SCI9_RXI9=0x1E,IER_SCI9_TXI9=0x1E,IER_SCI9_TEI9=0x1E, -IER_SCI10_RXI10=0x1E,IER_SCI10_TXI10=0x1E,IER_SCI10_TEI10=0x1E, -IER_SCI11_RXI11=0x1E,IER_SCI11_TXI11=0x1F,IER_SCI11_TEI11=0x1F, -IER_SCI12_RXI12=0x1F,IER_SCI12_TXI12=0x1F,IER_SCI12_TEI12=0x1F, -IER_IEB_IEBINT=0x1F -}; - -enum enum_ipr { -IPR_BSC_BUSERR=0, -IPR_FCU_FIFERR=1,IPR_FCU_FRDYI=2, -IPR_ICU_SWINT=3, -IPR_CMT0_CMI0=4, -IPR_CMT1_CMI1=5, -IPR_CMT2_CMI2=6, -IPR_CMT3_CMI3=7, -IPR_ETHER_EINT=32, -IPR_USB0_D0FIFO0=33,IPR_USB0_D1FIFO0=34,IPR_USB0_USBI0=35, -IPR_USB1_D0FIFO1=36,IPR_USB1_D1FIFO1=37,IPR_USB1_USBI1=38, -IPR_RSPI0_SPRI0=39,IPR_RSPI0_SPTI0=39,IPR_RSPI0_SPII0=39, -IPR_RSPI1_SPRI1=42,IPR_RSPI1_SPTI1=42,IPR_RSPI1_SPII1=42, -IPR_RSPI2_SPRI2=45,IPR_RSPI2_SPTI2=45,IPR_RSPI2_SPII2=45, -IPR_CAN0_RXF0=48,IPR_CAN0_TXF0=48,IPR_CAN0_RXM0=48,IPR_CAN0_TXM0=48, -IPR_CAN1_RXF1=52,IPR_CAN1_TXF1=52,IPR_CAN1_RXM1=52,IPR_CAN1_TXM1=52, -IPR_CAN2_RXF2=56,IPR_CAN2_TXF2=56,IPR_CAN2_RXM2=56,IPR_CAN2_TXM2=56, -IPR_RTC_COUNTUP=62, -IPR_ICU_IRQ0=64,IPR_ICU_IRQ1=65,IPR_ICU_IRQ2=66,IPR_ICU_IRQ3=67,IPR_ICU_IRQ4=68,IPR_ICU_IRQ5=69,IPR_ICU_IRQ6=70,IPR_ICU_IRQ7=71,IPR_ICU_IRQ8=72,IPR_ICU_IRQ9=73,IPR_ICU_IRQ10=74,IPR_ICU_IRQ11=75,IPR_ICU_IRQ12=76,IPR_ICU_IRQ13=77,IPR_ICU_IRQ14=78,IPR_ICU_IRQ15=79, -IPR_USB_USBR0=90,IPR_USB_USBR1=91, -IPR_RTC_ALARM=92,IPR_RTC_PRD=93, -IPR_AD0_ADI0=98, -IPR_S12AD0_S12ADI0=102, -IPR_ICU_GROUPE0=106,IPR_ICU_GROUPE1=107,IPR_ICU_GROUPE2=108,IPR_ICU_GROUPE3=109,IPR_ICU_GROUPE4=110,IPR_ICU_GROUPE5=111,IPR_ICU_GROUPE6=112,IPR_ICU_GROUPL0=114, -IPR_SCIX_SCIX0=122,IPR_SCIX_SCIX1=122,IPR_SCIX_SCIX2=122,IPR_SCIX_SCIX3=122, -IPR_TPU0_TGI0A=126,IPR_TPU0_TGI0B=126,IPR_TPU0_TGI0C=126,IPR_TPU0_TGI0D=126, -IPR_TPU1_TGI1A=130,IPR_TPU1_TGI1B=130, -IPR_TPU2_TGI2A=132,IPR_TPU2_TGI2B=132, -IPR_TPU3_TGI3A=134,IPR_TPU3_TGI3B=134,IPR_TPU3_TGI3C=134,IPR_TPU3_TGI3D=134, -IPR_TPU4_TGI4A=138,IPR_TPU4_TGI4B=138, -IPR_TPU5_TGI5A=140,IPR_TPU5_TGI5B=140, -IPR_TPU6_TGI6A=142,IPR_TPU6_TGI6B=142,IPR_TPU6_TGI6C=142,IPR_TPU6_TGI6D=142, -IPR_MTU0_TGIA0=142,IPR_MTU0_TGIB0=142,IPR_MTU0_TGIC0=142,IPR_MTU0_TGID0=142,IPR_MTU0_TGIE0=146,IPR_MTU0_TGIF0=146, -IPR_TPU7_TGI7A=148,IPR_TPU7_TGI7B=148, -IPR_MTU1_TGIA1=148,IPR_MTU1_TGIB1=148, -IPR_TPU8_TGI8A=150,IPR_TPU8_TGI8B=150, -IPR_MTU2_TGIA2=150,IPR_MTU2_TGIB2=150, -IPR_TPU9_TGI9A=152,IPR_TPU9_TGI9B=152,IPR_TPU9_TGI9C=152,IPR_TPU9_TGI9D=152, -IPR_MTU3_TGIA3=152,IPR_MTU3_TGIB3=152,IPR_MTU3_TGIC3=152,IPR_MTU3_TGID3=152, -IPR_TPU10_TGI10A=156,IPR_TPU10_TGI10B=156, -IPR_MTU4_TGIA4=156,IPR_MTU4_TGIB4=156,IPR_MTU4_TGIC4=156,IPR_MTU4_TGID4=156,IPR_MTU4_TCIV4=160, -IPR_MTU5_TGIU5=161,IPR_MTU5_TGIV5=161,IPR_MTU5_TGIW5=161, -IPR_TPU11_TGI11A=164,IPR_TPU11_TGI11B=164, -IPR_POE_OEI1=166,IPR_POE_OEI2=166, -IPR_TMR0_CMIA0=170,IPR_TMR0_CMIB0=170,IPR_TMR0_OVI0=170, -IPR_TMR1_CMIA1=173,IPR_TMR1_CMIB1=173,IPR_TMR1_OVI1=173, -IPR_TMR2_CMIA2=176,IPR_TMR2_CMIB2=176,IPR_TMR2_OVI2=176, -IPR_TMR3_CMIA3=179,IPR_TMR3_CMIB3=179,IPR_TMR3_OVI3=179, -IPR_RIIC0_EEI0=182,IPR_RIIC0_RXI0=183,IPR_RIIC0_TXI0=184,IPR_RIIC0_TEI0=185, -IPR_RIIC1_EEI1=186,IPR_RIIC1_RXI1=187,IPR_RIIC1_TXI1=188,IPR_RIIC1_TEI1=189, -IPR_RIIC2_EEI2=190,IPR_RIIC2_RXI2=191,IPR_RIIC2_TXI2=192,IPR_RIIC2_TEI2=193, -IPR_RIIC3_EEI3=194,IPR_RIIC3_RXI3=195,IPR_RIIC3_TXI3=196,IPR_RIIC3_TEI3=197, -IPR_DMAC_DMAC0I=198,IPR_DMAC_DMAC1I=199,IPR_DMAC_DMAC2I=200,IPR_DMAC_DMAC3I=201, -IPR_EXDMAC_EXDMAC0I=202,IPR_EXDMAC_EXDMAC1I=203, -IPR_SCI0_RXI0=214,IPR_SCI0_TXI0=214,IPR_SCI0_TEI0=214, -IPR_SCI1_RXI1=217,IPR_SCI1_TXI1=217,IPR_SCI1_TEI1=217, -IPR_SCI2_RXI2=220,IPR_SCI2_TXI2=220,IPR_SCI2_TEI2=220, -IPR_SCI3_RXI3=223,IPR_SCI3_TXI3=223,IPR_SCI3_TEI3=223, -IPR_SCI4_RXI4=226,IPR_SCI4_TXI4=226,IPR_SCI4_TEI4=226, -IPR_SCI5_RXI5=229,IPR_SCI5_TXI5=229,IPR_SCI5_TEI5=229, -IPR_SCI6_RXI6=232,IPR_SCI6_TXI6=232,IPR_SCI6_TEI6=232, -IPR_SCI7_RXI7=235,IPR_SCI7_TXI7=235,IPR_SCI7_TEI7=235, -IPR_SCI8_RXI8=238,IPR_SCI8_TXI8=238,IPR_SCI8_TEI8=238, -IPR_SCI9_RXI9=241,IPR_SCI9_TXI9=241,IPR_SCI9_TEI9=241, -IPR_SCI10_RXI10=244,IPR_SCI10_TXI10=244,IPR_SCI10_TEI10=244, -IPR_SCI11_RXI11=247,IPR_SCI11_TXI11=247,IPR_SCI11_TEI11=247, -IPR_SCI12_RXI12=250,IPR_SCI12_TXI12=250,IPR_SCI12_TEI12=250, -IPR_IEB_IEBINT=253, -IPR_BSC_=0, -IPR_CMT0_=4, -IPR_CMT1_=5, -IPR_CMT2_=6, -IPR_CMT3_=7, -IPR_ETHER_=32, -IPR_RSPI0_=39, -IPR_RSPI1_=42, -IPR_RSPI2_=45, -IPR_CAN0_=48, -IPR_CAN1_=52, -IPR_CAN2_=56, -IPR_AD0_=98, -IPR_S12AD0_=102, -IPR_SCIX_=122, -IPR_SCIX_SCI=122, -IPR_TPU0_=126, -IPR_TPU0_TGI=126, -IPR_TPU1_=130, -IPR_TPU1_TGI=130, -IPR_TPU2_=132, -IPR_TPU2_TGI=132, -IPR_TPU3_=134, -IPR_TPU3_TGI=134, -IPR_TPU4_=138, -IPR_TPU4_TGI=138, -IPR_TPU5_=140, -IPR_TPU5_TGI=140, -IPR_MTU5_=161, -IPR_MTU5_TGI=161, -IPR_TPU11_=164, -IPR_TPU11_TGI=164, -IPR_POE_=166, -IPR_POE_OEI=166, -IPR_TMR0_=170, -IPR_TMR1_=173, -IPR_TMR2_=176, -IPR_TMR3_=179, -IPR_SCI0_=214, -IPR_SCI1_=217, -IPR_SCI2_=220, -IPR_SCI3_=223, -IPR_SCI4_=226, -IPR_SCI5_=229, -IPR_SCI6_=232, -IPR_SCI7_=235, -IPR_SCI8_=238, -IPR_SCI9_=241, -IPR_SCI10_=244, -IPR_SCI11_=247, -IPR_SCI12_=250, -IPR_IEB_=253 -}; - -enum enum_grp { -GRP_CAN0_ERS0=0,GRP_CAN1_ERS1=0,GRP_CAN2_ERS2=0, -GRP_MTU0_TCIV0=1,GRP_MTU1_TCIV1=1,GRP_MTU1_TCIU1=1, -GRP_MTU2_TCIV2=2,GRP_MTU2_TCIU2=2,GRP_MTU3_TCIV3=2, -GRP_TPU0_TCI0V=3,GRP_TPU1_TCI1V=3,GRP_TPU1_TCI1U=3,GRP_TPU5_TCI5V=3,GRP_TPU5_TCI5U=3, -GRP_TPU2_TCI2V=4,GRP_TPU2_TCI2U=4,GRP_TPU3_TCI3V=4,GRP_TPU4_TCI4V=4,GRP_TPU4_TCI4U=4, -GRP_TPU6_TCI6V=5,GRP_TPU7_TCI7V=5,GRP_TPU7_TCI7U=5,GRP_TPU11_TCI11V=5,GRP_TPU11_TCI11U=5, -GRP_TPU8_TCI8V=6,GRP_TPU8_TCI8U=6,GRP_TPU9_TCI9V=6,GRP_TPU10_TCI10V=6,GRP_TPU10_TCI10U=6, -GRP_SCI0_ERI0=12,GRP_SCI1_ERI1=12,GRP_SCI2_ERI2=12,GRP_SCI3_ERI3=12,GRP_SCI4_ERI4=12,GRP_SCI5_ERI5=12,GRP_SCI6_ERI6=12, -GRP_SCI7_ERI7=12,GRP_SCI8_ERI8=12,GRP_SCI9_ERI9=12,GRP_SCI10_ERI10=12,GRP_SCI11_ERI11=12,GRP_SCI12_ERI12=12, -GRP_RSPI0_SPEI0=12,GRP_RSPI1_SPEI1=12,GRP_RSPI2_SPEI2=12 -}; - -enum enum_gen { -GEN_CAN0_ERS0=0,GEN_CAN1_ERS1=0,GEN_CAN2_ERS2=0, -GEN_MTU0_TCIV0=1,GEN_MTU1_TCIV1=1,GEN_MTU1_TCIU1=1, -GEN_MTU2_TCIV2=2,GEN_MTU2_TCIU2=2,GEN_MTU3_TCIV3=2, -GEN_TPU0_TCI0V=3,GEN_TPU1_TCI1V=3,GEN_TPU1_TCI1U=3,GEN_TPU5_TCI5V=3,GEN_TPU5_TCI5U=3, -GEN_TPU2_TCI2V=4,GEN_TPU2_TCI2U=4,GEN_TPU3_TCI3V=4,GEN_TPU4_TCI4V=4,GEN_TPU4_TCI4U=4, -GEN_TPU6_TCI6V=5,GEN_TPU7_TCI7V=5,GEN_TPU7_TCI7U=5,GEN_TPU11_TCI11V=5,GEN_TPU11_TCI11U=5, -GEN_TPU8_TCI8V=6,GEN_TPU8_TCI8U=6,GEN_TPU9_TCI9V=6,GEN_TPU10_TCI10V=6,GEN_TPU10_TCI10U=6, -GEN_SCI0_ERI0=12,GEN_SCI1_ERI1=12,GEN_SCI2_ERI2=12,GEN_SCI3_ERI3=12,GEN_SCI4_ERI4=12,GEN_SCI5_ERI5=12,GEN_SCI6_ERI6=12, -GEN_SCI7_ERI7=12,GEN_SCI8_ERI8=12,GEN_SCI9_ERI9=12,GEN_SCI10_ERI10=12,GEN_SCI11_ERI11=12,GEN_SCI12_ERI12=12, -GEN_RSPI0_SPEI0=12,GEN_RSPI1_SPEI1=12,GEN_RSPI2_SPEI2=12 -}; - -enum enum_gcr { -GCR_CAN0_ERS0=0,GCR_CAN1_ERS1=0,GCR_CAN2_ERS2=0, -GCR_MTU0_TCIV0=1,GCR_MTU1_TCIV1=1,GCR_MTU1_TCIU1=1, -GCR_MTU2_TCIV2=2,GCR_MTU2_TCIU2=2,GCR_MTU3_TCIV3=2, -GCR_TPU0_TCI0V=3,GCR_TPU1_TCI1V=3,GCR_TPU1_TCI1U=3,GCR_TPU5_TCI5V=3,GCR_TPU5_TCI5U=3, -GCR_TPU2_TCI2V=4,GCR_TPU2_TCI2U=4,GCR_TPU3_TCI3V=4,GCR_TPU4_TCI4V=4,GCR_TPU4_TCI4U=4, -GCR_TPU6_TCI6V=5,GCR_TPU7_TCI7V=5,GCR_TPU7_TCI7U=5,GCR_TPU11_TCI11V=5,GCR_TPU11_TCI11U=5, -GCR_TPU8_TCI8V=6,GCR_TPU8_TCI8U=6,GCR_TPU9_TCI9V=6,GCR_TPU10_TCI10V=6,GCR_TPU10_TCI10U=6, -GCR_SCI0_ERI0=12,GCR_SCI1_ERI1=12,GCR_SCI2_ERI2=12,GCR_SCI3_ERI3=12,GCR_SCI4_ERI4=12,GCR_SCI5_ERI5=12,GCR_SCI6_ERI6=12, -GCR_SCI7_ERI7=12,GCR_SCI8_ERI8=12,GCR_SCI9_ERI9=12,GCR_SCI10_ERI10=12,GCR_SCI11_ERI11=12,GCR_SCI12_ERI12=12, -GCR_RSPI0_SPEI0=12,GCR_RSPI1_SPEI1=12,GCR_RSPI2_SPEI2=12 -}; - -#define IEN_BSC_BUSERR IEN0 -#define IEN_FCU_FIFERR IEN5 -#define IEN_FCU_FRDYI IEN7 -#define IEN_ICU_SWINT IEN3 -#define IEN_CMT0_CMI0 IEN4 -#define IEN_CMT1_CMI1 IEN5 -#define IEN_CMT2_CMI2 IEN6 -#define IEN_CMT3_CMI3 IEN7 -#define IEN_ETHER_EINT IEN0 -#define IEN_USB0_D0FIFO0 IEN1 -#define IEN_USB0_D1FIFO0 IEN2 -#define IEN_USB0_USBI0 IEN3 -#define IEN_USB1_D0FIFO1 IEN4 -#define IEN_USB1_D1FIFO1 IEN5 -#define IEN_USB1_USBI1 IEN6 -#define IEN_RSPI0_SPRI0 IEN7 -#define IEN_RSPI0_SPTI0 IEN0 -#define IEN_RSPI0_SPII0 IEN1 -#define IEN_RSPI1_SPRI1 IEN2 -#define IEN_RSPI1_SPTI1 IEN3 -#define IEN_RSPI1_SPII1 IEN4 -#define IEN_RSPI2_SPRI2 IEN5 -#define IEN_RSPI2_SPTI2 IEN6 -#define IEN_RSPI2_SPII2 IEN7 -#define IEN_CAN0_RXF0 IEN0 -#define IEN_CAN0_TXF0 IEN1 -#define IEN_CAN0_RXM0 IEN2 -#define IEN_CAN0_TXM0 IEN3 -#define IEN_CAN1_RXF1 IEN4 -#define IEN_CAN1_TXF1 IEN5 -#define IEN_CAN1_RXM1 IEN6 -#define IEN_CAN1_TXM1 IEN7 -#define IEN_CAN2_RXF2 IEN0 -#define IEN_CAN2_TXF2 IEN1 -#define IEN_CAN2_RXM2 IEN2 -#define IEN_CAN2_TXM2 IEN3 -#define IEN_RTC_COUNTUP IEN6 -#define IEN_ICU_IRQ0 IEN0 -#define IEN_ICU_IRQ1 IEN1 -#define IEN_ICU_IRQ2 IEN2 -#define IEN_ICU_IRQ3 IEN3 -#define IEN_ICU_IRQ4 IEN4 -#define IEN_ICU_IRQ5 IEN5 -#define IEN_ICU_IRQ6 IEN6 -#define IEN_ICU_IRQ7 IEN7 -#define IEN_ICU_IRQ8 IEN0 -#define IEN_ICU_IRQ9 IEN1 -#define IEN_ICU_IRQ10 IEN2 -#define IEN_ICU_IRQ11 IEN3 -#define IEN_ICU_IRQ12 IEN4 -#define IEN_ICU_IRQ13 IEN5 -#define IEN_ICU_IRQ14 IEN6 -#define IEN_ICU_IRQ15 IEN7 -#define IEN_USB_USBR0 IEN2 -#define IEN_USB_USBR1 IEN3 -#define IEN_RTC_ALARM IEN4 -#define IEN_RTC_PRD IEN5 -#define IEN_AD0_ADI0 IEN2 -#define IEN_S12AD0_S12ADI0 IEN6 -#define IEN_ICU_GROUPE0 IEN2 -#define IEN_ICU_GROUPE1 IEN3 -#define IEN_ICU_GROUPE2 IEN4 -#define IEN_ICU_GROUPE3 IEN5 -#define IEN_ICU_GROUPE4 IEN6 -#define IEN_ICU_GROUPE5 IEN7 -#define IEN_ICU_GROUPE6 IEN0 -#define IEN_ICU_GROUPL0 IEN2 -#define IEN_SCIX_SCIX0 IEN2 -#define IEN_SCIX_SCIX1 IEN3 -#define IEN_SCIX_SCIX2 IEN4 -#define IEN_SCIX_SCIX3 IEN5 -#define IEN_TPU0_TGI0A IEN6 -#define IEN_TPU0_TGI0B IEN7 -#define IEN_TPU0_TGI0C IEN0 -#define IEN_TPU0_TGI0D IEN1 -#define IEN_TPU1_TGI1A IEN2 -#define IEN_TPU1_TGI1B IEN3 -#define IEN_TPU2_TGI2A IEN4 -#define IEN_TPU2_TGI2B IEN5 -#define IEN_TPU3_TGI3A IEN6 -#define IEN_TPU3_TGI3B IEN7 -#define IEN_TPU3_TGI3C IEN0 -#define IEN_TPU3_TGI3D IEN1 -#define IEN_TPU4_TGI4A IEN2 -#define IEN_TPU4_TGI4B IEN3 -#define IEN_TPU5_TGI5A IEN4 -#define IEN_TPU5_TGI5B IEN5 -#define IEN_TPU6_TGI6A IEN6 -#define IEN_TPU6_TGI6B IEN7 -#define IEN_TPU6_TGI6C IEN0 -#define IEN_TPU6_TGI6D IEN1 -#define IEN_MTU0_TGIA0 IEN6 -#define IEN_MTU0_TGIB0 IEN7 -#define IEN_MTU0_TGIC0 IEN0 -#define IEN_MTU0_TGID0 IEN1 -#define IEN_MTU0_TGIE0 IEN2 -#define IEN_MTU0_TGIF0 IEN3 -#define IEN_TPU7_TGI7A IEN4 -#define IEN_TPU7_TGI7B IEN5 -#define IEN_MTU1_TGIA1 IEN4 -#define IEN_MTU1_TGIB1 IEN5 -#define IEN_TPU8_TGI8A IEN6 -#define IEN_TPU8_TGI8B IEN7 -#define IEN_MTU2_TGIA2 IEN6 -#define IEN_MTU2_TGIB2 IEN7 -#define IEN_TPU9_TGI9A IEN0 -#define IEN_TPU9_TGI9B IEN1 -#define IEN_TPU9_TGI9C IEN2 -#define IEN_TPU9_TGI9D IEN3 -#define IEN_MTU3_TGIA3 IEN0 -#define IEN_MTU3_TGIB3 IEN1 -#define IEN_MTU3_TGIC3 IEN2 -#define IEN_MTU3_TGID3 IEN3 -#define IEN_TPU10_TGI10A IEN4 -#define IEN_TPU10_TGI10B IEN5 -#define IEN_MTU4_TGIA4 IEN4 -#define IEN_MTU4_TGIB4 IEN5 -#define IEN_MTU4_TGIC4 IEN6 -#define IEN_MTU4_TGID4 IEN7 -#define IEN_MTU4_TCIV4 IEN0 -#define IEN_MTU5_TGIU5 IEN1 -#define IEN_MTU5_TGIV5 IEN2 -#define IEN_MTU5_TGIW5 IEN3 -#define IEN_TPU11_TGI11A IEN4 -#define IEN_TPU11_TGI11B IEN5 -#define IEN_POE_OEI1 IEN6 -#define IEN_POE_OEI2 IEN7 -#define IEN_TMR0_CMIA0 IEN2 -#define IEN_TMR0_CMIB0 IEN3 -#define IEN_TMR0_OVI0 IEN4 -#define IEN_TMR1_CMIA1 IEN5 -#define IEN_TMR1_CMIB1 IEN6 -#define IEN_TMR1_OVI1 IEN7 -#define IEN_TMR2_CMIA2 IEN0 -#define IEN_TMR2_CMIB2 IEN1 -#define IEN_TMR2_OVI2 IEN2 -#define IEN_TMR3_CMIA3 IEN3 -#define IEN_TMR3_CMIB3 IEN4 -#define IEN_TMR3_OVI3 IEN5 -#define IEN_RIIC0_EEI0 IEN6 -#define IEN_RIIC0_RXI0 IEN7 -#define IEN_RIIC0_TXI0 IEN0 -#define IEN_RIIC0_TEI0 IEN1 -#define IEN_RIIC1_EEI1 IEN2 -#define IEN_RIIC1_RXI1 IEN3 -#define IEN_RIIC1_TXI1 IEN4 -#define IEN_RIIC1_TEI1 IEN5 -#define IEN_RIIC2_EEI2 IEN6 -#define IEN_RIIC2_RXI2 IEN7 -#define IEN_RIIC2_TXI2 IEN0 -#define IEN_RIIC2_TEI2 IEN1 -#define IEN_RIIC3_EEI3 IEN2 -#define IEN_RIIC3_RXI3 IEN3 -#define IEN_RIIC3_TXI3 IEN4 -#define IEN_RIIC3_TEI3 IEN5 -#define IEN_DMAC_DMAC0I IEN6 -#define IEN_DMAC_DMAC1I IEN7 -#define IEN_DMAC_DMAC2I IEN0 -#define IEN_DMAC_DMAC3I IEN1 -#define IEN_EXDMAC_EXDMAC0I IEN2 -#define IEN_EXDMAC_EXDMAC1I IEN3 -#define IEN_SCI0_RXI0 IEN6 -#define IEN_SCI0_TXI0 IEN7 -#define IEN_SCI0_TEI0 IEN0 -#define IEN_SCI1_RXI1 IEN1 -#define IEN_SCI1_TXI1 IEN2 -#define IEN_SCI1_TEI1 IEN3 -#define IEN_SCI2_RXI2 IEN4 -#define IEN_SCI2_TXI2 IEN5 -#define IEN_SCI2_TEI2 IEN6 -#define IEN_SCI3_RXI3 IEN7 -#define IEN_SCI3_TXI3 IEN0 -#define IEN_SCI3_TEI3 IEN1 -#define IEN_SCI4_RXI4 IEN2 -#define IEN_SCI4_TXI4 IEN3 -#define IEN_SCI4_TEI4 IEN4 -#define IEN_SCI5_RXI5 IEN5 -#define IEN_SCI5_TXI5 IEN6 -#define IEN_SCI5_TEI5 IEN7 -#define IEN_SCI6_RXI6 IEN0 -#define IEN_SCI6_TXI6 IEN1 -#define IEN_SCI6_TEI6 IEN2 -#define IEN_SCI7_RXI7 IEN3 -#define IEN_SCI7_TXI7 IEN4 -#define IEN_SCI7_TEI7 IEN5 -#define IEN_SCI8_RXI8 IEN6 -#define IEN_SCI8_TXI8 IEN7 -#define IEN_SCI8_TEI8 IEN0 -#define IEN_SCI9_RXI9 IEN1 -#define IEN_SCI9_TXI9 IEN2 -#define IEN_SCI9_TEI9 IEN3 -#define IEN_SCI10_RXI10 IEN4 -#define IEN_SCI10_TXI10 IEN5 -#define IEN_SCI10_TEI10 IEN6 -#define IEN_SCI11_RXI11 IEN7 -#define IEN_SCI11_TXI11 IEN0 -#define IEN_SCI11_TEI11 IEN1 -#define IEN_SCI12_RXI12 IEN2 -#define IEN_SCI12_TXI12 IEN3 -#define IEN_SCI12_TEI12 IEN4 -#define IEN_IEB_IEBINT IEN5 - -#define VECT_BSC_BUSERR 16 -#define VECT_FCU_FIFERR 21 -#define VECT_FCU_FRDYI 23 -#define VECT_ICU_SWINT 27 -#define VECT_CMT0_CMI0 28 -#define VECT_CMT1_CMI1 29 -#define VECT_CMT2_CMI2 30 -#define VECT_CMT3_CMI3 31 -#define VECT_ETHER_EINT 32 -#define VECT_USB0_D0FIFO0 33 -#define VECT_USB0_D1FIFO0 34 -#define VECT_USB0_USBI0 35 -#define VECT_USB1_D0FIFO1 36 -#define VECT_USB1_D1FIFO1 37 -#define VECT_USB1_USBI1 38 -#define VECT_RSPI0_SPRI0 39 -#define VECT_RSPI0_SPTI0 40 -#define VECT_RSPI0_SPII0 41 -#define VECT_RSPI1_SPRI1 42 -#define VECT_RSPI1_SPTI1 43 -#define VECT_RSPI1_SPII1 44 -#define VECT_RSPI2_SPRI2 45 -#define VECT_RSPI2_SPTI2 46 -#define VECT_RSPI2_SPII2 47 -#define VECT_CAN0_RXF0 48 -#define VECT_CAN0_TXF0 49 -#define VECT_CAN0_RXM0 50 -#define VECT_CAN0_TXM0 51 -#define VECT_CAN1_RXF1 52 -#define VECT_CAN1_TXF1 53 -#define VECT_CAN1_RXM1 54 -#define VECT_CAN1_TXM1 55 -#define VECT_CAN2_RXF2 56 -#define VECT_CAN2_TXF2 57 -#define VECT_CAN2_RXM2 58 -#define VECT_CAN2_TXM2 59 -#define VECT_RTC_COUNTUP 62 -#define VECT_ICU_IRQ0 64 -#define VECT_ICU_IRQ1 65 -#define VECT_ICU_IRQ2 66 -#define VECT_ICU_IRQ3 67 -#define VECT_ICU_IRQ4 68 -#define VECT_ICU_IRQ5 69 -#define VECT_ICU_IRQ6 70 -#define VECT_ICU_IRQ7 71 -#define VECT_ICU_IRQ8 72 -#define VECT_ICU_IRQ9 73 -#define VECT_ICU_IRQ10 74 -#define VECT_ICU_IRQ11 75 -#define VECT_ICU_IRQ12 76 -#define VECT_ICU_IRQ13 77 -#define VECT_ICU_IRQ14 78 -#define VECT_ICU_IRQ15 79 -#define VECT_USB_USBR0 90 -#define VECT_USB_USBR1 91 -#define VECT_RTC_ALARM 92 -#define VECT_RTC_PRD 93 -#define VECT_AD0_ADI0 98 -#define VECT_S12AD0_S12ADI0 102 -#define VECT_ICU_GROUPE0 106 -#define VECT_ICU_GROUPE1 107 -#define VECT_ICU_GROUPE2 108 -#define VECT_ICU_GROUPE3 109 -#define VECT_ICU_GROUPE4 110 -#define VECT_ICU_GROUPE5 111 -#define VECT_ICU_GROUPE6 112 -#define VECT_ICU_GROUPL0 114 -#define VECT_SCIX_SCIX0 122 -#define VECT_SCIX_SCIX1 123 -#define VECT_SCIX_SCIX2 124 -#define VECT_SCIX_SCIX3 125 -#define VECT_TPU0_TGI0A 126 -#define VECT_TPU0_TGI0B 127 -#define VECT_TPU0_TGI0C 128 -#define VECT_TPU0_TGI0D 129 -#define VECT_TPU1_TGI1A 130 -#define VECT_TPU1_TGI1B 131 -#define VECT_TPU2_TGI2A 132 -#define VECT_TPU2_TGI2B 133 -#define VECT_TPU3_TGI3A 134 -#define VECT_TPU3_TGI3B 135 -#define VECT_TPU3_TGI3C 136 -#define VECT_TPU3_TGI3D 137 -#define VECT_TPU4_TGI4A 138 -#define VECT_TPU4_TGI4B 139 -#define VECT_TPU5_TGI5A 140 -#define VECT_TPU5_TGI5B 141 -#define VECT_TPU6_TGI6A 142 -#define VECT_TPU6_TGI6B 143 -#define VECT_TPU6_TGI6C 144 -#define VECT_TPU6_TGI6D 145 -#define VECT_MTU0_TGIA0 142 -#define VECT_MTU0_TGIB0 143 -#define VECT_MTU0_TGIC0 144 -#define VECT_MTU0_TGID0 145 -#define VECT_MTU0_TGIE0 146 -#define VECT_MTU0_TGIF0 147 -#define VECT_TPU7_TGI7A 148 -#define VECT_TPU7_TGI7B 149 -#define VECT_MTU1_TGIA1 148 -#define VECT_MTU1_TGIB1 149 -#define VECT_TPU8_TGI8A 150 -#define VECT_TPU8_TGI8B 151 -#define VECT_MTU2_TGIA2 150 -#define VECT_MTU2_TGIB2 151 -#define VECT_TPU9_TGI9A 152 -#define VECT_TPU9_TGI9B 153 -#define VECT_TPU9_TGI9C 154 -#define VECT_TPU9_TGI9D 155 -#define VECT_MTU3_TGIA3 152 -#define VECT_MTU3_TGIB3 153 -#define VECT_MTU3_TGIC3 154 -#define VECT_MTU3_TGID3 155 -#define VECT_TPU10_TGI10A 156 -#define VECT_TPU10_TGI10B 157 -#define VECT_MTU4_TGIA4 156 -#define VECT_MTU4_TGIB4 157 -#define VECT_MTU4_TGIC4 158 -#define VECT_MTU4_TGID4 159 -#define VECT_MTU4_TCIV4 160 -#define VECT_MTU5_TGIU5 161 -#define VECT_MTU5_TGIV5 162 -#define VECT_MTU5_TGIW5 163 -#define VECT_TPU11_TGI11A 164 -#define VECT_TPU11_TGI11B 165 -#define VECT_POE_OEI1 166 -#define VECT_POE_OEI2 167 -#define VECT_TMR0_CMIA0 170 -#define VECT_TMR0_CMIB0 171 -#define VECT_TMR0_OVI0 172 -#define VECT_TMR1_CMIA1 173 -#define VECT_TMR1_CMIB1 174 -#define VECT_TMR1_OVI1 175 -#define VECT_TMR2_CMIA2 176 -#define VECT_TMR2_CMIB2 177 -#define VECT_TMR2_OVI2 178 -#define VECT_TMR3_CMIA3 179 -#define VECT_TMR3_CMIB3 180 -#define VECT_TMR3_OVI3 181 -#define VECT_RIIC0_EEI0 182 -#define VECT_RIIC0_RXI0 183 -#define VECT_RIIC0_TXI0 184 -#define VECT_RIIC0_TEI0 185 -#define VECT_RIIC1_EEI1 186 -#define VECT_RIIC1_RXI1 187 -#define VECT_RIIC1_TXI1 188 -#define VECT_RIIC1_TEI1 189 -#define VECT_RIIC2_EEI2 190 -#define VECT_RIIC2_RXI2 191 -#define VECT_RIIC2_TXI2 192 -#define VECT_RIIC2_TEI2 193 -#define VECT_RIIC3_EEI3 194 -#define VECT_RIIC3_RXI3 195 -#define VECT_RIIC3_TXI3 196 -#define VECT_RIIC3_TEI3 197 -#define VECT_DMAC_DMAC0I 198 -#define VECT_DMAC_DMAC1I 199 -#define VECT_DMAC_DMAC2I 200 -#define VECT_DMAC_DMAC3I 201 -#define VECT_EXDMAC_EXDMAC0I 202 -#define VECT_EXDMAC_EXDMAC1I 203 -#define VECT_SCI0_RXI0 214 -#define VECT_SCI0_TXI0 215 -#define VECT_SCI0_TEI0 216 -#define VECT_SCI1_RXI1 217 -#define VECT_SCI1_TXI1 218 -#define VECT_SCI1_TEI1 219 -#define VECT_SCI2_RXI2 220 -#define VECT_SCI2_TXI2 221 -#define VECT_SCI2_TEI2 222 -#define VECT_SCI3_RXI3 223 -#define VECT_SCI3_TXI3 224 -#define VECT_SCI3_TEI3 225 -#define VECT_SCI4_RXI4 226 -#define VECT_SCI4_TXI4 227 -#define VECT_SCI4_TEI4 228 -#define VECT_SCI5_RXI5 229 -#define VECT_SCI5_TXI5 230 -#define VECT_SCI5_TEI5 231 -#define VECT_SCI6_RXI6 232 -#define VECT_SCI6_TXI6 233 -#define VECT_SCI6_TEI6 234 -#define VECT_SCI7_RXI7 235 -#define VECT_SCI7_TXI7 236 -#define VECT_SCI7_TEI7 237 -#define VECT_SCI8_RXI8 238 -#define VECT_SCI8_TXI8 239 -#define VECT_SCI8_TEI8 240 -#define VECT_SCI9_RXI9 241 -#define VECT_SCI9_TXI9 242 -#define VECT_SCI9_TEI9 243 -#define VECT_SCI10_RXI10 244 -#define VECT_SCI10_TXI10 245 -#define VECT_SCI10_TEI10 246 -#define VECT_SCI11_RXI11 247 -#define VECT_SCI11_TXI11 248 -#define VECT_SCI11_TEI11 249 -#define VECT_SCI12_RXI12 250 -#define VECT_SCI12_TXI12 251 -#define VECT_SCI12_TEI12 252 -#define VECT_IEB_IEBINT 253 - -#define MSTP_DMAC SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC0 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC1 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC2 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC3 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DTC SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_AD SYSTEM.MSTPCRA.BIT.MSTPA23 -#define MSTP_DA SYSTEM.MSTPCRA.BIT.MSTPA19 -#define MSTP_S12AD SYSTEM.MSTPCRA.BIT.MSTPA17 -#define MSTP_CMT0 SYSTEM.MSTPCRA.BIT.MSTPA15 -#define MSTP_CMT1 SYSTEM.MSTPCRA.BIT.MSTPA15 -#define MSTP_CMT2 SYSTEM.MSTPCRA.BIT.MSTPA14 -#define MSTP_CMT3 SYSTEM.MSTPCRA.BIT.MSTPA14 -#define MSTP_TPU0 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU1 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU2 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU3 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU4 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU5 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU6 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU7 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU8 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU9 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU10 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU11 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_PPG0 SYSTEM.MSTPCRA.BIT.MSTPA11 -#define MSTP_PPG1 SYSTEM.MSTPCRA.BIT.MSTPA10 -#define MSTP_MTU SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU0 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU1 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU2 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU3 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU4 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU5 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_TMR0 SYSTEM.MSTPCRA.BIT.MSTPA5 -#define MSTP_TMR1 SYSTEM.MSTPCRA.BIT.MSTPA5 -#define MSTP_TMR01 SYSTEM.MSTPCRA.BIT.MSTPA5 -#define MSTP_TMR2 SYSTEM.MSTPCRA.BIT.MSTPA4 -#define MSTP_TMR3 SYSTEM.MSTPCRA.BIT.MSTPA4 -#define MSTP_TMR23 SYSTEM.MSTPCRA.BIT.MSTPA4 -#define MSTP_SCI0 SYSTEM.MSTPCRB.BIT.MSTPB31 -#define MSTP_SMCI0 SYSTEM.MSTPCRB.BIT.MSTPB31 -#define MSTP_SCI1 SYSTEM.MSTPCRB.BIT.MSTPB30 -#define MSTP_SMCI1 SYSTEM.MSTPCRB.BIT.MSTPB30 -#define MSTP_SCI2 SYSTEM.MSTPCRB.BIT.MSTPB29 -#define MSTP_SMCI2 SYSTEM.MSTPCRB.BIT.MSTPB29 -#define MSTP_SCI3 SYSTEM.MSTPCRB.BIT.MSTPB28 -#define MSTP_SMCI3 SYSTEM.MSTPCRB.BIT.MSTPB28 -#define MSTP_SCI4 SYSTEM.MSTPCRB.BIT.MSTPB27 -#define MSTP_SMCI4 SYSTEM.MSTPCRB.BIT.MSTPB27 -#define MSTP_SCI5 SYSTEM.MSTPCRB.BIT.MSTPB26 -#define MSTP_SMCI5 SYSTEM.MSTPCRB.BIT.MSTPB26 -#define MSTP_SCI6 SYSTEM.MSTPCRB.BIT.MSTPB25 -#define MSTP_SMCI6 SYSTEM.MSTPCRB.BIT.MSTPB25 -#define MSTP_SCI7 SYSTEM.MSTPCRB.BIT.MSTPB24 -#define MSTP_SMCI7 SYSTEM.MSTPCRB.BIT.MSTPB24 -#define MSTP_CRC SYSTEM.MSTPCRB.BIT.MSTPB23 -#define MSTP_RIIC0 SYSTEM.MSTPCRB.BIT.MSTPB21 -#define MSTP_RIIC1 SYSTEM.MSTPCRB.BIT.MSTPB20 -#define MSTP_USB0 SYSTEM.MSTPCRB.BIT.MSTPB19 -#define MSTP_RSPI0 SYSTEM.MSTPCRB.BIT.MSTPB17 -#define MSTP_RSPI1 SYSTEM.MSTPCRB.BIT.MSTPB16 -#define MSTP_EDMAC SYSTEM.MSTPCRB.BIT.MSTPB15 -#define MSTP_TEMPS SYSTEM.MSTPCRB.BIT.MSTPB8 -#define MSTP_SCI12 SYSTEM.MSTPCRB.BIT.MSTPB4 -#define MSTP_SMCI12 SYSTEM.MSTPCRB.BIT.MSTPB4 -#define MSTP_CAN2 SYSTEM.MSTPCRB.BIT.MSTPB2 -#define MSTP_CAN1 SYSTEM.MSTPCRB.BIT.MSTPB1 -#define MSTP_CAN0 SYSTEM.MSTPCRB.BIT.MSTPB0 -#define MSTP_SCI8 SYSTEM.MSTPCRC.BIT.MSTPC27 -#define MSTP_SMCI8 SYSTEM.MSTPCRC.BIT.MSTPC27 -#define MSTP_SCI9 SYSTEM.MSTPCRC.BIT.MSTPC26 -#define MSTP_SMCI9 SYSTEM.MSTPCRC.BIT.MSTPC26 -#define MSTP_SCI10 SYSTEM.MSTPCRC.BIT.MSTPC25 -#define MSTP_SMCI10 SYSTEM.MSTPCRC.BIT.MSTPC25 -#define MSTP_SCI11 SYSTEM.MSTPCRC.BIT.MSTPC24 -#define MSTP_SMCI11 SYSTEM.MSTPCRC.BIT.MSTPC24 -#define MSTP_RSPI2 SYSTEM.MSTPCRC.BIT.MSTPC22 -#define MSTP_LVD SYSTEM.MSTPCRC.BIT.MSTPC20 -#define MSTP_IEB SYSTEM.MSTPCRC.BIT.MSTPC18 -#define MSTP_RIIC2 SYSTEM.MSTPCRC.BIT.MSTPC17 -#define MSTP_RIIC3 SYSTEM.MSTPCRC.BIT.MSTPC16 -#define MSTP_RAM1 SYSTEM.MSTPCRC.BIT.MSTPC1 -#define MSTP_RAM0 SYSTEM.MSTPCRC.BIT.MSTPC0 - -#define IS_CAN0_ERS0 IS0 -#define IS_CAN1_ERS1 IS1 -#define IS_CAN2_ERS2 IS2 -#define IS_MTU0_TCIV0 IS0 -#define IS_MTU1_TCIV1 IS1 -#define IS_MTU1_TCIU1 IS2 -#define IS_MTU2_TCIV2 IS0 -#define IS_MTU2_TCIU2 IS1 -#define IS_MTU3_TCIV3 IS2 -#define IS_TPU0_TCI0V IS0 -#define IS_TPU1_TCI1V IS1 -#define IS_TPU1_TCI1U IS2 -#define IS_TPU5_TCI5V IS3 -#define IS_TPU5_TCI5U IS4 -#define IS_TPU2_TCI2V IS0 -#define IS_TPU2_TCI2U IS1 -#define IS_TPU3_TCI3V IS2 -#define IS_TPU4_TCI4V IS3 -#define IS_TPU4_TCI4U IS4 -#define IS_TPU6_TCI6V IS0 -#define IS_TPU7_TCI7V IS1 -#define IS_TPU7_TCI7U IS2 -#define IS_TPU11_TCI11V IS3 -#define IS_TPU11_TCI11U IS4 -#define IS_TPU8_TCI8V IS0 -#define IS_TPU8_TCI8U IS1 -#define IS_TPU9_TCI9V IS2 -#define IS_TPU10_TCI10V IS3 -#define IS_TPU10_TCI10U IS4 -#define IS_SCI0_ERI0 IS0 -#define IS_SCI1_ERI1 IS1 -#define IS_SCI2_ERI2 IS2 -#define IS_SCI3_ERI3 IS3 -#define IS_SCI4_ERI4 IS4 -#define IS_SCI5_ERI5 IS5 -#define IS_SCI6_ERI6 IS6 -#define IS_SCI7_ERI7 IS7 -#define IS_SCI8_ERI8 IS8 -#define IS_SCI9_ERI9 IS9 -#define IS_SCI10_ERI10 IS10 -#define IS_SCI11_ERI11 IS11 -#define IS_SCI12_ERI12 IS12 -#define IS_RSPI0_SPEI0 IS13 -#define IS_RSPI1_SPEI1 IS14 -#define IS_RSPI2_SPEI2 IS15 - -#define EN_CAN0_ERS0 EN0 -#define EN_CAN1_ERS1 EN1 -#define EN_CAN2_ERS2 EN2 -#define EN_MTU0_TCIV0 EN0 -#define EN_MTU1_TCIV1 EN1 -#define EN_MTU1_TCIU1 EN2 -#define EN_MTU2_TCIV2 EN0 -#define EN_MTU2_TCIU2 EN1 -#define EN_MTU3_TCIV3 EN2 -#define EN_TPU0_TCI0V EN0 -#define EN_TPU1_TCI1V EN1 -#define EN_TPU1_TCI1U EN2 -#define EN_TPU5_TCI5V EN3 -#define EN_TPU5_TCI5U EN4 -#define EN_TPU2_TCI2V EN0 -#define EN_TPU2_TCI2U EN1 -#define EN_TPU3_TCI3V EN2 -#define EN_TPU4_TCI4V EN3 -#define EN_TPU4_TCI4U EN4 -#define EN_TPU6_TCI6V EN0 -#define EN_TPU7_TCI7V EN1 -#define EN_TPU7_TCI7U EN2 -#define EN_TPU11_TCI11V EN3 -#define EN_TPU11_TCI11U EN4 -#define EN_TPU8_TCI8V EN0 -#define EN_TPU8_TCI8U EN1 -#define EN_TPU9_TCI9V EN2 -#define EN_TPU10_TCI10V EN3 -#define EN_TPU10_TCI10U EN4 -#define EN_SCI0_ERI0 EN0 -#define EN_SCI1_ERI1 EN1 -#define EN_SCI2_ERI2 EN2 -#define EN_SCI3_ERI3 EN3 -#define EN_SCI4_ERI4 EN4 -#define EN_SCI5_ERI5 EN5 -#define EN_SCI6_ERI6 EN6 -#define EN_SCI7_ERI7 EN7 -#define EN_SCI8_ERI8 EN8 -#define EN_SCI9_ERI9 EN9 -#define EN_SCI10_ERI10 EN10 -#define EN_SCI11_ERI11 EN11 -#define EN_SCI12_ERI12 EN12 -#define EN_RSPI0_SPEI0 EN13 -#define EN_RSPI1_SPEI1 EN14 -#define EN_RSPI2_SPEI2 EN15 - -#define CLR_CAN0_ERS0 CLR0 -#define CLR_CAN1_ERS1 CLR1 -#define CLR_CAN2_ERS2 CLR2 -#define CLR_MTU0_TCIV0 CLR0 -#define CLR_MTU1_TCIV1 CLR1 -#define CLR_MTU1_TCIU1 CLR2 -#define CLR_MTU2_TCIV2 CLR0 -#define CLR_MTU2_TCIU2 CLR1 -#define CLR_MTU3_TCIV3 CLR2 -#define CLR_TPU0_TCI0V CLR0 -#define CLR_TPU1_TCI1V CLR1 -#define CLR_TPU1_TCI1U CLR2 -#define CLR_TPU5_TCI5V CLR3 -#define CLR_TPU5_TCI5U CLR4 -#define CLR_TPU2_TCI2V CLR0 -#define CLR_TPU2_TCI2U CLR1 -#define CLR_TPU3_TCI3V CLR2 -#define CLR_TPU4_TCI4V CLR3 -#define CLR_TPU4_TCI4U CLR4 -#define CLR_TPU6_TCI6V CLR0 -#define CLR_TPU7_TCI7V CLR1 -#define CLR_TPU7_TCI7U CLR2 -#define CLR_TPU11_TCI11V CLR3 -#define CLR_TPU11_TCI11U CLR4 -#define CLR_TPU8_TCI8V CLR0 -#define CLR_TPU8_TCI8U CLR1 -#define CLR_TPU9_TCI9V CLR2 -#define CLR_TPU10_TCI10V CLR3 -#define CLR_TPU10_TCI10U CLR4 -#define CLR_SCI0_ERI0 CLR0 -#define CLR_SCI1_ERI1 CLR1 -#define CLR_SCI2_ERI2 CLR2 -#define CLR_SCI3_ERI3 CLR3 -#define CLR_SCI4_ERI4 CLR4 -#define CLR_SCI5_ERI5 CLR5 -#define CLR_SCI6_ERI6 CLR6 -#define CLR_SCI7_ERI7 CLR7 -#define CLR_SCI8_ERI8 CLR8 -#define CLR_SCI9_ERI9 CLR9 -#define CLR_SCI10_ERI10 CLR10 -#define CLR_SCI11_ERI11 CLR11 -#define CLR_SCI12_ERI12 CLR12 -#define CLR_RSPI0_SPEI0 CLR13 -#define CLR_RSPI1_SPEI1 CLR14 -#define CLR_RSPI2_SPEI2 CLR15 - -#define CN_TPU6_TGI6A CN0 -#define CN_TPU6_TGI6B CN0 -#define CN_TPU6_TGI6C CN0 -#define CN_TPU6_TGI6D CN0 -#define CN_MTU0_TGIA0 CN0 -#define CN_MTU0_TGIB0 CN0 -#define CN_MTU0_TGIC0 CN0 -#define CN_MTU0_TGID0 CN0 -#define CN_MTU0_TGIE0 CN0 -#define CN_MTU0_TGIF0 CN0 -#define CN_TPU7_TGI7A CN1 -#define CN_TPU7_TGI7B CN1 -#define CN_MTU1_TGIA1 CN1 -#define CN_MTU1_TGIB1 CN1 -#define CN_TPU8_TGI8A CN2 -#define CN_TPU8_TGI8B CN2 -#define CN_MTU2_TGIA2 CN2 -#define CN_MTU2_TGIB2 CN2 -#define CN_TPU9_TGI9A CN3 -#define CN_TPU9_TGI9B CN3 -#define CN_TPU9_TGI9C CN3 -#define CN_TPU9_TGI9D CN3 -#define CN_MTU3_TGIA3 CN3 -#define CN_MTU3_TGIB3 CN3 -#define CN_MTU3_TGIC3 CN3 -#define CN_MTU3_TGID3 CN3 -#define CN_TPU10_TGI10A CN4 -#define CN_TPU10_TGI10B CN4 -#define CN_MTU4_TGIA4 CN4 -#define CN_MTU4_TGIB4 CN4 -#define CN_MTU4_TGIC4 CN4 -#define CN_MTU4_TGID4 CN4 -#define CN_MTU4_TGIV4 CN4 -#define CN_TPU11_TGI11A CN5 -#define CN_TPU11_TGI11B CN5 -#define CN_MTU5_TGIU5 CN5 -#define CN_MTU5_TGIV5 CN5 -#define CN_MTU5_TGIW5 CN5 -#define CN_TPU6_ CN0 -#define CN_MTU0_ CN0 -#define CN_TPU7_ CN1 -#define CN_MTU1_ CN1 -#define CN_TPU8_ CN2 -#define CN_MTU2_ CN2 -#define CN_TPU9_ CN3 -#define CN_MTU3_ CN3 -#define CN_TPU10_ CN4 -#define CN_MTU4_ CN4 -#define CN_TPU11_ CN5 -#define CN_MTU5_ CN5 - -#define __IR( x ) ICU.IR[ IR ## x ].BIT.IR -#define _IR( x ) __IR( x ) -#define IR( x , y ) _IR( _ ## x ## _ ## y ) -#define __DTCE( x ) ICU.DTCER[ DTCE ## x ].BIT.DTCE -#define _DTCE( x ) __DTCE( x ) -#define DTCE( x , y ) _DTCE( _ ## x ## _ ## y ) -#define __IEN( x ) ICU.IER[ IER ## x ].BIT.IEN ## x -#define _IEN( x ) __IEN( x ) -#define IEN( x , y ) _IEN( _ ## x ## _ ## y ) -#define __IPR( x ) ICU.IPR[ IPR ## x ].BIT.IPR -#define _IPR( x ) __IPR( x ) -#define IPR( x , y ) _IPR( _ ## x ## _ ## y ) -#define __VECT( x ) VECT ## x -#define _VECT( x ) __VECT( x ) -#define VECT( x , y ) _VECT( _ ## x ## _ ## y ) -#define __MSTP( x ) MSTP ## x -#define _MSTP( x ) __MSTP( x ) -#define MSTP( x ) _MSTP( _ ## x ) - -#define __IS( x ) ICU.GRP[ GRP ## x ].BIT.IS ## x -#define _IS( x ) __IS( x ) -#define IS( x , y ) _IS( _ ## x ## _ ## y ) -#define __EN( x ) ICU.GEN[ GEN ## x ].BIT.EN ## x -#define _EN( x ) __EN( x ) -#define EN( x , y ) _EN( _ ## x ## _ ## y ) -#define __CLR( x ) ICU.GCR[ GCR ## x ].BIT.CLR ## x -#define _CLR( x ) __CLR( x ) -#define CLR( x , y ) _CLR( _ ## x ## _ ## y ) -#define __CN( x ) ICU.SEL.BIT.CN ## x -#define _CN( x ) __CN( x ) -#define CN( x , y ) _CN( _ ## x ## _ ## y ) - -#define AD (*(volatile struct st_ad __evenaccess *)0x89800) -#define BSC (*(volatile struct st_bsc __evenaccess *)0x81300) -#define CAN0 (*(volatile struct st_can __evenaccess *)0x90200) -#define CAN1 (*(volatile struct st_can __evenaccess *)0x91200) -#define CAN2 (*(volatile struct st_can __evenaccess *)0x92200) -#define CMT (*(volatile struct st_cmt __evenaccess *)0x88000) -#define CMT0 (*(volatile struct st_cmt0 __evenaccess *)0x88002) -#define CMT1 (*(volatile struct st_cmt0 __evenaccess *)0x88008) -#define CMT2 (*(volatile struct st_cmt0 __evenaccess *)0x88012) -#define CMT3 (*(volatile struct st_cmt0 __evenaccess *)0x88018) -#define CRC (*(volatile struct st_crc __evenaccess *)0x88280) -#define DA (*(volatile struct st_da __evenaccess *)0x880C0) -#define DMAC (*(volatile struct st_dmac __evenaccess *)0x82200) -#define DMAC0 (*(volatile struct st_dmac0 __evenaccess *)0x82000) -#define DMAC1 (*(volatile struct st_dmac1 __evenaccess *)0x82040) -#define DMAC2 (*(volatile struct st_dmac1 __evenaccess *)0x82080) -#define DMAC3 (*(volatile struct st_dmac1 __evenaccess *)0x820C0) -#define DTC (*(volatile struct st_dtc __evenaccess *)0x82400) -#define EDMAC (*(volatile struct st_edmac __evenaccess *)0xC0000) -#define ETHERC (*(volatile struct st_etherc __evenaccess *)0xC0100) -#define EXDMAC (*(volatile struct st_exdmac __evenaccess *)0x82A00) -#define EXDMAC0 (*(volatile struct st_exdmac0 __evenaccess *)0x82800) -#define EXDMAC1 (*(volatile struct st_exdmac1 __evenaccess *)0x82840) -#define FLASH (*(volatile struct st_flash __evenaccess *)0x8C296) -#define ICU (*(volatile struct st_icu __evenaccess *)0x87000) -#define IEB (*(volatile struct st_ieb __evenaccess *)0x8A800) -#define IWDT (*(volatile struct st_iwdt __evenaccess *)0x88030) -#define MPC (*(volatile struct st_mpc __evenaccess *)0x8C100) -#define MTU (*(volatile struct st_mtu __evenaccess *)0x8860A) -#define MTU0 (*(volatile struct st_mtu0 __evenaccess *)0x88690) -#define MTU1 (*(volatile struct st_mtu1 __evenaccess *)0x88690) -#define MTU2 (*(volatile struct st_mtu2 __evenaccess *)0x88692) -#define MTU3 (*(volatile struct st_mtu3 __evenaccess *)0x88600) -#define MTU4 (*(volatile struct st_mtu4 __evenaccess *)0x88600) -#define MTU5 (*(volatile struct st_mtu5 __evenaccess *)0x88694) -#define POE (*(volatile struct st_poe __evenaccess *)0x88900) -#define PORT0 (*(volatile struct st_port0 __evenaccess *)0x8C000) -#define PORT1 (*(volatile struct st_port1 __evenaccess *)0x8C001) -#define PORT2 (*(volatile struct st_port2 __evenaccess *)0x8C002) -#define PORT3 (*(volatile struct st_port3 __evenaccess *)0x8C003) -#define PORT4 (*(volatile struct st_port4 __evenaccess *)0x8C004) -#define PORT5 (*(volatile struct st_port5 __evenaccess *)0x8C005) -#define PORT6 (*(volatile struct st_port6 __evenaccess *)0x8C006) -#define PORT7 (*(volatile struct st_port7 __evenaccess *)0x8C007) -#define PORT8 (*(volatile struct st_port8 __evenaccess *)0x8C008) -#define PORT9 (*(volatile struct st_port9 __evenaccess *)0x8C009) -#define PORTA (*(volatile struct st_porta __evenaccess *)0x8C00A) -#define PORTB (*(volatile struct st_portb __evenaccess *)0x8C00B) -#define PORTC (*(volatile struct st_portc __evenaccess *)0x8C00C) -#define PORTD (*(volatile struct st_portd __evenaccess *)0x8C00D) -#define PORTE (*(volatile struct st_porte __evenaccess *)0x8C00E) -#define PORTF (*(volatile struct st_portf __evenaccess *)0x8C00F) -#define PORTG (*(volatile struct st_portg __evenaccess *)0x8C010) -#define PORTH (*(volatile struct st_porth __evenaccess *)0x8C0D1) -#define PORTJ (*(volatile struct st_portj __evenaccess *)0x8C012) -#define PPG0 (*(volatile struct st_ppg0 __evenaccess *)0x881E6) -#define PPG1 (*(volatile struct st_ppg1 __evenaccess *)0x881F0) -#define RIIC0 (*(volatile struct st_riic0 __evenaccess *)0x88300) -#define RIIC1 (*(volatile struct st_riic1 __evenaccess *)0x88320) -#define RIIC2 (*(volatile struct st_riic1 __evenaccess *)0x88340) -#define RIIC3 (*(volatile struct st_riic1 __evenaccess *)0x88360) -#define RSPI0 (*(volatile struct st_rspi __evenaccess *)0x88380) -#define RSPI1 (*(volatile struct st_rspi __evenaccess *)0x883A0) -#define RSPI2 (*(volatile struct st_rspi __evenaccess *)0x883C0) -#define RTC (*(volatile struct st_rtc __evenaccess *)0x8C400) -#define S12AD (*(volatile struct st_s12ad __evenaccess *)0x89000) -#define SCI0 (*(volatile struct st_sci0 __evenaccess *)0x8A000) -#define SCI1 (*(volatile struct st_sci0 __evenaccess *)0x8A020) -#define SCI2 (*(volatile struct st_sci0 __evenaccess *)0x8A040) -#define SCI3 (*(volatile struct st_sci0 __evenaccess *)0x8A060) -#define SCI4 (*(volatile struct st_sci0 __evenaccess *)0x8A080) -#define SCI5 (*(volatile struct st_sci0 __evenaccess *)0x8A0A0) -#define SCI6 (*(volatile struct st_sci0 __evenaccess *)0x8A0C0) -#define SCI7 (*(volatile struct st_sci7 __evenaccess *)0x8A0E0) -#define SCI8 (*(volatile struct st_sci0 __evenaccess *)0x8A100) -#define SCI9 (*(volatile struct st_sci0 __evenaccess *)0x8A120) -#define SCI10 (*(volatile struct st_sci0 __evenaccess *)0x8A140) -#define SCI11 (*(volatile struct st_sci0 __evenaccess *)0x8A160) -#define SCI12 (*(volatile struct st_sci12 __evenaccess *)0x8B300) -#define SMCI0 (*(volatile struct st_smci0 __evenaccess *)0x8A000) -#define SMCI1 (*(volatile struct st_smci0 __evenaccess *)0x8A020) -#define SMCI2 (*(volatile struct st_smci0 __evenaccess *)0x8A040) -#define SMCI3 (*(volatile struct st_smci0 __evenaccess *)0x8A060) -#define SMCI4 (*(volatile struct st_smci0 __evenaccess *)0x8A080) -#define SMCI5 (*(volatile struct st_smci0 __evenaccess *)0x8A0A0) -#define SMCI6 (*(volatile struct st_smci0 __evenaccess *)0x8A0C0) -#define SMCI7 (*(volatile struct st_smci7 __evenaccess *)0x8A0E0) -#define SMCI8 (*(volatile struct st_smci0 __evenaccess *)0x8A100) -#define SMCI9 (*(volatile struct st_smci0 __evenaccess *)0x8A120) -#define SMCI10 (*(volatile struct st_smci0 __evenaccess *)0x8A140) -#define SMCI11 (*(volatile struct st_smci0 __evenaccess *)0x8A160) -#define SMCI12 (*(volatile struct st_smci0 __evenaccess *)0x8B300) -#define SYSTEM (*(volatile struct st_system __evenaccess *)0x80000) -#define TEMPS (*(volatile struct st_temps __evenaccess *)0x8C500) -#define TMR0 (*(volatile struct st_tmr0 __evenaccess *)0x88200) -#define TMR1 (*(volatile struct st_tmr1 __evenaccess *)0x88201) -#define TMR2 (*(volatile struct st_tmr0 __evenaccess *)0x88210) -#define TMR3 (*(volatile struct st_tmr1 __evenaccess *)0x88211) -#define TMR01 (*(volatile struct st_tmr01 __evenaccess *)0x88204) -#define TMR23 (*(volatile struct st_tmr01 __evenaccess *)0x88214) -#define TPU0 (*(volatile struct st_tpu0 __evenaccess *)0x88108) -#define TPU1 (*(volatile struct st_tpu1 __evenaccess *)0x88108) -#define TPU2 (*(volatile struct st_tpu2 __evenaccess *)0x8810A) -#define TPU3 (*(volatile struct st_tpu3 __evenaccess *)0x8810A) -#define TPU4 (*(volatile struct st_tpu4 __evenaccess *)0x8810C) -#define TPU5 (*(volatile struct st_tpu5 __evenaccess *)0x8810C) -#define TPU6 (*(volatile struct st_tpu0 __evenaccess *)0x88178) -#define TPU7 (*(volatile struct st_tpu1 __evenaccess *)0x88178) -#define TPU8 (*(volatile struct st_tpu2 __evenaccess *)0x8817A) -#define TPU9 (*(volatile struct st_tpu3 __evenaccess *)0x8817A) -#define TPU10 (*(volatile struct st_tpu4 __evenaccess *)0x8817C) -#define TPU11 (*(volatile struct st_tpu5 __evenaccess *)0x8817C) -#define TPUA (*(volatile struct st_tpua __evenaccess *)0x88100) -#define TPUB (*(volatile struct st_tpub __evenaccess *)0x88170) -#define USB (*(volatile struct st_usb __evenaccess *)0xA0400) -#define USB0 (*(volatile struct st_usb0 __evenaccess *)0xA0000) -#define USB1 (*(volatile struct st_usb1 __evenaccess *)0xA0200) -#define WDT (*(volatile struct st_wdt __evenaccess *)0x88020) -#pragma bit_order -#pragma packoption -#endif diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h_from_toolchain b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h_from_toolchain deleted file mode 100644 index d1f3cfc4d..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/mcu/rx63n/iodefine.h_from_toolchain +++ /dev/null @@ -1,12063 +0,0 @@ -/************************************************************************ -* -* Device : RX/RX600/RX63N -* -* File Name : ioedfine.h -* -* Abstract : Definition of I/O Register. -* -* History : 0.50 (2011-03-28) [Hardware Manual Revision : 0.50] -* : 0.02 (2010-11-01) [Hardware Manual Revision : 0.01] -* -* NOTE : THIS IS A TYPICAL EXAMPLE. -* -* Copyright (C) 2010(2011) Renesas Electronics Corporation -* and Renesas Solutions Corp. -* -************************************************************************/ -/********************************************************************************/ -/* */ -/* DESCRIPTION : Definition of ICU Register */ -/* CPU TYPE : RX63N */ -/* */ -/* Usage : IR,DTCER,IER,IPR of ICU Register */ -/* The following IR, DTCE, IEN, IPR macro functions simplify usage. */ -/* The bit access operation is "Bit_Name(interrupt source,name)". */ -/* A part of the name can be omitted. */ -/* for example : */ -/* IR(TPU0,TGI0A) = 0; expands to : */ -/* ICU.IR[126].BIT.IR = 0; */ -/* */ -/* DTCE(ICU,IRQ0) = 1; expands to : */ -/* ICU.DTCER[64].BIT.DTCE = 1; */ -/* */ -/* IEN(CMT0,CMI0) = 1; expands to : */ -/* ICU.IER[0x03].BIT.IEN4 = 1; */ -/* */ -/* IPR(TPU0,TGI0A) = 2; expands to : */ -/* IPR(TPU0,TGI ) = 2; // TGI0A,TGI0B,TGI0C,TGI0D share IPR level. */ -/* ICU.IPR[126].BIT.IPR = 2; */ -/* */ -/* IPR(SCI0,RXI0) = 3; expands to : */ -/* IPR(SCI0, ) = 3; // SCI0 uses single IPR for all sources. */ -/* ICU.IPR[214].BIT.IPR = 3; */ -/* */ -/* Usage : #pragma interrupt Function_Identifier(vect=**) */ -/* The number of vector is "(interrupt source, name)". */ -/* for example : */ -/* #pragma interrupt INT_IRQ0(vect=VECT(ICU,IRQ0)) expands to : */ -/* #pragma interrupt INT_IRQ0(vect=64) */ -/* #pragma interrupt INT_CMT0_CMI0(vect=VECT(CMT0,CMI0)) expands to : */ -/* #pragma interrupt INT_CMT0_CMI0(vect=28) */ -/* #pragma interrupt INT_MTU0_TGIA0(vect=VECT(MTU0,TGIA0)) expands to : */ -/* #pragma interrupt INT_MTU0_TGIA0(vect=142) */ -/* #pragma interrupt INT_TPU0_TGI0A(vect=VECT(TPU0,TGI0A)) expands to : */ -/* #pragma interrupt INT_TPU0_TGI0A(vect=126) */ -/* */ -/* Usage : MSTPCRA,MSTPCRB,MSTPCRC of SYSTEM Register */ -/* The bit access operation is "MSTP(name)". */ -/* The name that can be used is a macro name defined with "iodefine.h". */ -/* for example : */ -/* MSTP(TMR2) = 0; // TMR2,TMR3,TMR23 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA4 = 0; */ -/* MSTP(SCI0) = 0; // SCI0,SMCI0 expands to : */ -/* SYSTEM.MSTPCRB.BIT.MSTPB31 = 0; */ -/* MSTP(MTU4) = 0; // MTU,MTU0,MTU1,MTU2,MTU3,MTU4,MTU5 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA9 = 0; */ -/* MSTP(TPU4) = 0; // TPU0,TPU1,TPU2,TPU3,TPU4,TPU5 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA13 = 0; */ -/* MSTP(CMT3) = 0; // CMT2,CMT3 expands to : */ -/* SYSTEM.MSTPCRA.BIT.MSTPA14 = 0; */ -/* */ -/* */ -/********************************************************************************/ -#ifndef __RX63NIODEFINE_HEADER__ -#define __RX63NIODEFINE_HEADER__ -#pragma bit_order left -#pragma unpack -struct st_ad { - unsigned short ADDRA; - unsigned short ADDRB; - unsigned short ADDRC; - unsigned short ADDRD; - unsigned short ADDRE; - unsigned short ADDRF; - unsigned short ADDRG; - unsigned short ADDRH; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ADIE:1; - unsigned char ADST:1; - unsigned char :2; - unsigned char CH:3; - } BIT; - } ADCSR; - union { - unsigned char BYTE; - struct { - unsigned char TRGS:3; - unsigned char :1; - unsigned char CKS:2; - unsigned char MODE:2; - } BIT; - } ADCR; - union { - unsigned char BYTE; - struct { - unsigned char DPSEL:1; - unsigned char EXOEN:1; - unsigned char EXSEL:2; - } BIT; - } ADCR2; - unsigned char ADSSTR; - char wk0[11]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char DIAG:2; - } BIT; - } ADDIAGR; -}; - -struct st_bsc { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char STSCLR:1; - } BIT; - } BERCLR; - char wk0[3]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TOEN:1; - unsigned char IGAEN:1; - } BIT; - } BEREN; - char wk1[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MST:3; - unsigned char :2; - unsigned char TO:1; - unsigned char IA:1; - } BIT; - } BERSR1; - char wk2[1]; - union { - unsigned short WORD; - struct { - unsigned short ADDR:13; - } BIT; - } BERSR2; - char wk3[4]; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short BPEB:2; - unsigned short BPFB:2; - unsigned short BPHB:2; - unsigned short BPGB:2; - unsigned short BPIB:2; - unsigned short BPRO:2; - unsigned short BPRA:2; - } BIT; - } BUSPRI; - char wk4[7408]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS0MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS0WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS0WCR2; - char wk5[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS1MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS1WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS1WCR2; - char wk6[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS2MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS2WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS2WCR2; - char wk7[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS3MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS3WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS3WCR2; - char wk8[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS4MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS4WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS4WCR2; - char wk9[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS5MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS5WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS5WCR2; - char wk10[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS6MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS6WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS6WCR2; - char wk11[6]; - union { - unsigned short WORD; - struct { - unsigned short PRMOD:1; - unsigned short :5; - unsigned short PWENB:1; - unsigned short PRENB:1; - unsigned short :4; - unsigned short EWENB:1; - unsigned short :2; - unsigned short WRMOD:1; - } BIT; - } CS7MOD; - union { - unsigned long LONG; - struct { - unsigned long :3; - unsigned long CSRWAIT:5; - unsigned long :3; - unsigned long CSWWAIT:5; - unsigned long :5; - unsigned long CSPRWAIT:3; - unsigned long :5; - unsigned long CSPWWAIT:3; - } BIT; - } CS7WCR1; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long CSON:3; - unsigned long :1; - unsigned long WDON:3; - unsigned long :1; - unsigned long WRON:3; - unsigned long :1; - unsigned long RDON:3; - unsigned long :2; - unsigned long AWAIT:2; - unsigned long :1; - unsigned long WDOFF:3; - unsigned long :1; - unsigned long CSWOFF:3; - unsigned long :1; - unsigned long CSROFF:3; - } BIT; - } CS7WCR2; - char wk12[1926]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS0CR; - char wk13[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS0REC; - char wk14[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS1CR; - char wk15[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS1REC; - char wk16[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS2CR; - char wk17[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS2REC; - char wk18[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS3CR; - char wk19[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS3REC; - char wk20[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS4CR; - char wk21[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS4REC; - char wk22[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS5CR; - char wk23[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS5REC; - char wk24[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS6CR; - char wk25[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS6REC; - char wk26[6]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short MPXEN:1; - unsigned short :3; - unsigned short EMODE:1; - unsigned short :2; - unsigned short BSIZE:2; - unsigned short :3; - unsigned short EXENB:1; - } BIT; - } CS7CR; - char wk27[6]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short WRCV:4; - unsigned short :4; - unsigned short RRCV:4; - } BIT; - } CS7REC; - char wk28[4]; - union { - unsigned short WORD; - struct { - unsigned short RCVENM7:1; - unsigned short RCVENM6:1; - unsigned short RCVENM5:1; - unsigned short RCVENM4:1; - unsigned short RCVENM3:1; - unsigned short RCVENM2:1; - unsigned short RCVENM1:1; - unsigned short RCVENM0:1; - unsigned short RCVEN7:1; - unsigned short RCVEN6:1; - unsigned short RCVEN5:1; - unsigned short RCVEN4:1; - unsigned short RCVEN3:1; - unsigned short RCVEN2:1; - unsigned short RCVEN1:1; - unsigned short RCVEN0:1; - } BIT; - } CSRECEN; - char wk29[894]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char BSIZE:2; - unsigned char :3; - unsigned char EXENB:1; - } BIT; - } SDCCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char EMODE:1; - } BIT; - } SDCMOD; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char BE:1; - } BIT; - } SDAMOD; - char wk30[13]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SFEN:1; - } BIT; - } SDSELF; - char wk31[3]; - union { - unsigned short WORD; - struct { - unsigned short REFW:4; - unsigned short RFC:12; - } BIT; - } SDRFCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RFEN:1; - } BIT; - } SDRFEN; - char wk32[9]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char INIRQ:1; - } BIT; - } SDICR; - char wk33[3]; - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short PRC:3; - unsigned short ARFC:4; - unsigned short ARFI:4; - } BIT; - } SDIR; - char wk34[26]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char MXC:2; - } BIT; - } SDADR; - char wk35[3]; - union { - unsigned long LONG; - struct { - unsigned long :13; - unsigned long RAS:3; - unsigned long :2; - unsigned long RCD:2; - unsigned long RP:3; - unsigned long WR:1; - unsigned long :5; - unsigned long CL:3; - } BIT; - } SDTR; - union { - unsigned short WORD; - struct { - unsigned short :1; - unsigned short MR:15; - } BIT; - } SDMOD; - char wk36[6]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char SRFST:1; - unsigned char INIST:1; - unsigned char :2; - unsigned char MRSST:1; - } BIT; - } SDSR; -}; - -struct st_can { - struct { - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long IDE:1; - unsigned long RTR:1; - unsigned long :1; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } ID; - unsigned short DLC; - unsigned char DATA[8]; - unsigned short TS; - } MB[32]; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long :3; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } MKR[8]; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long IDE:1; - unsigned long RTR:1; - unsigned long :1; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } FIDCR0; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long IDE:1; - unsigned long RTR:1; - unsigned long :1; - unsigned long SID:11; - unsigned long EID:18; - } BIT; - } FIDCR1; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned char MB31:1; - unsigned char MB30:1; - unsigned char MB29:1; - unsigned char MB28:1; - unsigned char MB27:1; - unsigned char MB26:1; - unsigned char MB25:1; - unsigned char MB24:1; - unsigned char MB23:1; - unsigned char MB22:1; - unsigned char MB21:1; - unsigned char MB20:1; - unsigned char MB19:1; - unsigned char MB18:1; - unsigned char MB17:1; - unsigned char MB16:1; - unsigned char MB15:1; - unsigned char MB14:1; - unsigned char MB13:1; - unsigned char MB12:1; - unsigned char MB11:1; - unsigned char MB10:1; - unsigned char MB9:1; - unsigned char MB8:1; - unsigned char MB7:1; - unsigned char MB6:1; - unsigned char MB5:1; - unsigned char MB4:1; - unsigned char MB3:1; - unsigned char MB2:1; - unsigned char MB1:1; - unsigned char MB0:1; - } BIT; - } MKIVLR; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned char MB31:1; - unsigned char MB30:1; - unsigned char MB29:1; - unsigned char MB28:1; - unsigned char MB27:1; - unsigned char MB26:1; - unsigned char MB25:1; - unsigned char MB24:1; - unsigned char MB23:1; - unsigned char MB22:1; - unsigned char MB21:1; - unsigned char MB20:1; - unsigned char MB19:1; - unsigned char MB18:1; - unsigned char MB17:1; - unsigned char MB16:1; - unsigned char MB15:1; - unsigned char MB14:1; - unsigned char MB13:1; - unsigned char MB12:1; - unsigned char MB11:1; - unsigned char MB10:1; - unsigned char MB9:1; - unsigned char MB8:1; - unsigned char MB7:1; - unsigned char MB6:1; - unsigned char MB5:1; - unsigned char MB4:1; - unsigned char MB3:1; - unsigned char MB2:1; - unsigned char MB1:1; - unsigned char MB0:1; - } BIT; - } MIER; - char wk0[1008]; - union { - unsigned char BYTE; - union { - struct { - unsigned char TRMREQ:1; - unsigned char RECREQ:1; - unsigned char :1; - unsigned char ONESHOT:1; - unsigned char :1; - unsigned char TRMABT:1; - unsigned char TRMACTIVE:1; - unsigned char SENTDATA:1; - } TX; - struct { - unsigned char TRMREQ:1; - unsigned char RECREQ:1; - unsigned char :1; - unsigned char ONESHOT:1; - unsigned char :1; - unsigned char MSGLOST:1; - unsigned char INVALDATA:1; - unsigned char NEWDATA:1; - } RX; - } BIT; - } MCTL[32]; - union { - unsigned short WORD; - struct { - unsigned char H; - unsigned char L; - } BYTE; - struct { - unsigned char :2; - unsigned char RBOC:1; - unsigned char BOM:2; - unsigned char SLPM:1; - unsigned char CANM:2; - unsigned char TSPS:2; - unsigned char TSRC:1; - unsigned char TPM:1; - unsigned char MLM:1; - unsigned char IDFM:2; - unsigned char MBM:1; - } BIT; - } CTLR; - union { - unsigned short WORD; - struct { - unsigned char H; - unsigned char L; - } BYTE; - struct { - unsigned char :1; - unsigned char RECST:1; - unsigned char TRMST:1; - unsigned char BOST:1; - unsigned char EPST:1; - unsigned char SLPST:1; - unsigned char HLTST:1; - unsigned char RSTST:1; - unsigned char EST:1; - unsigned char TABST:1; - unsigned char FMLST:1; - unsigned char NMLST:1; - unsigned char TFST:1; - unsigned char RFST:1; - unsigned char SDST:1; - unsigned char NDST:1; - } BIT; - } STR; - union { - unsigned long LONG; - struct { - unsigned short H; - unsigned short L; - } WORD; - struct { - unsigned char HH; - unsigned char HL; - unsigned char LH; - unsigned char LL; - } BYTE; - struct { - unsigned long TSEG1:4; - unsigned long :2; - unsigned long BRP:10; - unsigned long :2; - unsigned long SJW:2; - unsigned long :1; - unsigned long TSEG2:3; - unsigned long :7; - unsigned long CCLKS:1; - } BIT; - } BCR; - union { - unsigned char BYTE; - struct { - unsigned char RFEST:1; - unsigned char RFWST:1; - unsigned char RFFST:1; - unsigned char RFMLF:1; - unsigned char RFUST:3; - unsigned char RFE:1; - } BIT; - } RFCR; - unsigned char RFPCR; - union { - unsigned char BYTE; - struct { - unsigned char TFEST:1; - unsigned char TFFST:1; - unsigned char :2; - unsigned char TFUST:3; - unsigned char TFE:1; - } BIT; - } TFCR; - unsigned char TFPCR; - union { - unsigned char BYTE; - struct { - unsigned char BLIE:1; - unsigned char OLIE:1; - unsigned char ORIE:1; - unsigned char BORIE:1; - unsigned char BOEIE:1; - unsigned char EPIE:1; - unsigned char EWIE:1; - unsigned char BEIE:1; - } BIT; - } EIER; - union { - unsigned char BYTE; - struct { - unsigned char BLIF:1; - unsigned char OLIF:1; - unsigned char ORIF:1; - unsigned char BORIF:1; - unsigned char BOEIF:1; - unsigned char EPIF:1; - unsigned char EWIF:1; - unsigned char BEIF:1; - } BIT; - } EIFR; - unsigned char RECR; - unsigned char TECR; - union { - unsigned char BYTE; - struct { - unsigned char EDPM:1; - unsigned char ADEF:1; - unsigned char BE0F:1; - unsigned char BE1F:1; - unsigned char CEF:1; - unsigned char AEF:1; - unsigned char FEF:1; - unsigned char SEF:1; - } BIT; - } ECSR; - unsigned char CSSR; - union { - unsigned char BYTE; - struct { - unsigned char SEST:1; - unsigned char :2; - unsigned char MBNST:5; - } BIT; - } MSSR; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char MBSM:2; - } BIT; - } MSMR; - unsigned short TSR; - unsigned short AFSR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TSTM:2; - unsigned char TSTE:1; - } BIT; - } TCR; -}; - -struct st_cmt { - union { - unsigned short WORD; - struct { - unsigned short :14; - unsigned short STR1:1; - unsigned short STR0:1; - } BIT; - } CMSTR0; - char wk0[14]; - union { - unsigned short WORD; - struct { - unsigned short :14; - unsigned short STR3:1; - unsigned short STR2:1; - } BIT; - } CMSTR1; -}; - -struct st_cmt0 { - union { - unsigned short WORD; - struct { - unsigned short :9; - unsigned short CMIE:1; - unsigned short :4; - unsigned short CKS:2; - } BIT; - } CMCR; - unsigned short CMCNT; - unsigned short CMCOR; -}; - -struct st_crc { - union { - unsigned char BYTE; - struct { - unsigned char DORCLR:1; - unsigned char :4; - unsigned char LMS:1; - unsigned char GPS:2; - } BIT; - } CRCCR; - unsigned char CRCDIR; - unsigned short CRCDOR; -}; - -struct st_da { - unsigned short DADR0; - unsigned short DADR1; - union { - unsigned char BYTE; - struct { - unsigned char DAOE1:1; - unsigned char DAOE0:1; - unsigned char DAE:1; - } BIT; - } DACR; - union { - unsigned char BYTE; - struct { - unsigned char DPSEL:1; - } BIT; - } DADPR; - union { - unsigned char BYTE; - struct { - unsigned char DAADST:1; - } BIT; - } DAADSCR; -}; - -struct st_dmac { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DMST:1; - } BIT; - } DMAST; -}; - -struct st_dmac0 { - unsigned long DMSAR; - unsigned long DMDAR; - unsigned long DMCRA; - unsigned short DMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } DMTMD; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } DMINT; - union { - unsigned short WORD; - struct { - unsigned short SM:2; - unsigned short :1; - unsigned short SARA:5; - unsigned short DM:2; - unsigned short :1; - unsigned short DARA:5; - } BIT; - } DMAMD; - char wk2[2]; - unsigned long DMOFR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } DMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } DMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } DMSTS; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DISEL:1; - } BIT; - } DMCSL; -}; - -struct st_dmac1 { - unsigned long DMSAR; - unsigned long DMDAR; - unsigned long DMCRA; - unsigned short DMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } DMTMD; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } DMINT; - union { - unsigned short WORD; - struct { - unsigned short SM:2; - unsigned short :1; - unsigned short SARA:5; - unsigned short DM:2; - unsigned short :1; - unsigned short DARA:5; - } BIT; - } DMAMD; - char wk2[6]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } DMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } DMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } DMSTS; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DISEL:1; - } BIT; - } DMCSL; -}; - -struct st_dtc { - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char RRS:1; - } BIT; - } DTCCR; - char wk0[3]; - unsigned long DTCVBR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SHORT:1; - } BIT; - } DTCADMOD; - char wk1[3]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTCST:1; - } BIT; - } DTCST; - char wk2[1]; - union { - unsigned short WORD; - struct { - unsigned short ACT:1; - unsigned short :7; - unsigned short VECN:8; - } BIT; - } DTCSTS; -}; - -struct st_edmac { - union { - unsigned long LONG; - struct { - unsigned long :25; - unsigned long DE:1; - unsigned long DL:2; - unsigned long :3; - unsigned long SWR:1; - } BIT; - } EDMR; - char wk0[4]; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long TR:1; - } BIT; - } EDTRR; - char wk1[4]; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long RR:1; - } BIT; - } EDRRR; - char wk2[4]; - unsigned long TDLAR; - char wk3[4]; - unsigned long RDLAR; - char wk4[4]; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long TWB:1; - unsigned long :3; - unsigned long TABT:1; - unsigned long RABT:1; - unsigned long RFCOF:1; - unsigned long ADE:1; - unsigned long ECI:1; - unsigned long TC:1; - unsigned long TDE:1; - unsigned long TFUF:1; - unsigned long FR:1; - unsigned long RDE:1; - unsigned long RFOF:1; - unsigned long :4; - unsigned long CND:1; - unsigned long DLC:1; - unsigned long CD:1; - unsigned long TRO:1; - unsigned long RMAF:1; - unsigned long :2; - unsigned long RRF:1; - unsigned long RTLF:1; - unsigned long RTSF:1; - unsigned long PRE:1; - unsigned long CERF:1; - } BIT; - } EESR; - char wk5[4]; - union { - unsigned long LONG; - struct { - unsigned long :1; - unsigned long TWBIP:1; - unsigned long :3; - unsigned long TABTIP:1; - unsigned long RABTIP:1; - unsigned long RFCOFIP:1; - unsigned long ADEIP:1; - unsigned long ECIIP:1; - unsigned long TCIP:1; - unsigned long TDEIP:1; - unsigned long TFUFIP:1; - unsigned long FRIP:1; - unsigned long RDEIP:1; - unsigned long RFOFIP:1; - unsigned long :4; - unsigned long CNDIP:1; - unsigned long DLCIP:1; - unsigned long CDIP:1; - unsigned long TROIP:1; - unsigned long RMAFIP:1; - unsigned long :2; - unsigned long RRFIP:1; - unsigned long RTLFIP:1; - unsigned long RTSFIP:1; - unsigned long PREIP:1; - unsigned long CERFIP:1; - } BIT; - } EESIPR; - char wk6[4]; - union { - unsigned long LONG; - struct { - unsigned long :20; - unsigned long CNDCE:1; - unsigned long DLCCE:1; - unsigned long CDCE:1; - unsigned long TROCE:1; - unsigned long RMAFCE:1; - unsigned long :2; - unsigned long RRFCE:1; - unsigned long RTLFCE:1; - unsigned long RTSFCE:1; - unsigned long PRECE:1; - unsigned long CERFCE:1; - } BIT; - } TRSCER; - char wk7[4]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long MFC:16; - } BIT; - } RMFCR; - char wk8[4]; - union { - unsigned long LONG; - struct { - unsigned long :21; - unsigned long TFT:11; - } BIT; - } TFTR; - char wk9[4]; - union { - unsigned long LONG; - struct { - unsigned long :19; - unsigned long TFD:5; - unsigned long :3; - unsigned long RFD:5; - } BIT; - } FDR; - char wk10[4]; - union { - unsigned long LONG; - struct { - unsigned long :30; - unsigned long RNC:1; - unsigned long RNR:1; - } BIT; - } RMCR; - char wk11[8]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long UNDER:16; - } BIT; - } TFUCR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long OVER:16; - } BIT; - } RFOCR; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long ELB:1; - } BIT; - } IOSR; - union { - unsigned long LONG; - struct { - unsigned long :13; - unsigned long RFFO:3; - unsigned long :13; - unsigned long RFDO:3; - } BIT; - } FCFTR; - char wk12[4]; - union { - unsigned long LONG; - struct { - unsigned long :14; - unsigned long PADS:2; - unsigned long :10; - unsigned long PADR:6; - } BIT; - } RPADIR; - union { - unsigned long LONG; - struct { - unsigned long :27; - unsigned long TIM:1; - unsigned long :3; - unsigned long TIS:1; - } BIT; - } TRIMD; - char wk13[72]; - unsigned long RBWAR; - unsigned long RDFAR; - char wk14[4]; - unsigned long TBRAR; - unsigned long TDFAR; -}; - -struct st_etherc { - union { - unsigned long LONG; - struct { - unsigned long :11; - unsigned long TPC:1; - unsigned long ZPE:1; - unsigned long PFR:1; - unsigned long RXF:1; - unsigned long TXF:1; - unsigned long :3; - unsigned long PRCEF:1; - unsigned long :2; - unsigned long MPDE:1; - unsigned long :2; - unsigned long RE:1; - unsigned long TE:1; - unsigned long :1; - unsigned long ILB:1; - unsigned long RTM:1; - unsigned long DM:1; - unsigned long PRM:1; - } BIT; - } ECMR; - char wk0[4]; - union { - unsigned long LONG; - struct { - unsigned long :20; - unsigned long RFL:12; - } BIT; - } RFLR; - char wk1[4]; - union { - unsigned long LONG; - struct { - unsigned long :26; - unsigned long BFR:1; - unsigned long PSRTO:1; - unsigned long :1; - unsigned long LCHNG:1; - unsigned long MPD:1; - unsigned long ICD:1; - } BIT; - } ECSR; - char wk2[4]; - union { - unsigned long LONG; - struct { - unsigned long :26; - unsigned long BFSIPR:1; - unsigned long PSRTOIP:1; - unsigned long :1; - unsigned long LCHNGIP:1; - unsigned long MPDIP:1; - unsigned long ICDIP:1; - } BIT; - } ECSIPR; - char wk3[4]; - union { - unsigned long LONG; - struct { - unsigned long :28; - unsigned long MDI:1; - unsigned long MDO:1; - unsigned long MMD:1; - unsigned long MDC:1; - } BIT; - } PIR; - char wk4[4]; - union { - unsigned long LONG; - struct { - unsigned long :31; - unsigned long LMON:1; - } BIT; - } PSR; - char wk5[20]; - union { - unsigned long LONG; - struct { - unsigned long :12; - unsigned long RMD:20; - } BIT; - } RDMLR; - char wk6[12]; - union { - unsigned long LONG; - struct { - unsigned long :27; - unsigned long IPG:5; - } BIT; - } IPGR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long AP:16; - } BIT; - } APR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long MP:16; - } BIT; - } MPR; - char wk7[4]; - union { - unsigned long LONG; - struct { - unsigned long :24; - unsigned long RPAUSE:8; - } BIT; - } RFCF; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long TPAUSE:16; - } BIT; - } TPAUSER; - union { - unsigned long LONG; - struct { - unsigned long :24; - unsigned long TXP:8; - } BIT; - } TPAUSECR; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long BCF:16; - } BIT; - } BCFRR; - char wk8[80]; - unsigned long MAHR; - char wk9[4]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long MA:16; - } BIT; - } MALR; - char wk10[4]; - unsigned long TROCR; - unsigned long CDCR; - unsigned long LCCR; - unsigned long CNDCR; - char wk11[4]; - unsigned long CEFCR; - unsigned long FRECR; - unsigned long TSFRCR; - unsigned long TLFRCR; - unsigned long RFCR; - unsigned long MAFCR; -}; - -struct st_exdmac { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DMST:1; - } BIT; - } EDMAST; - char wk0[479]; - unsigned long CLSBR0; - unsigned long CLSBR1; - unsigned long CLSBR2; - unsigned long CLSBR3; - unsigned long CLSBR4; - unsigned long CLSBR5; - unsigned long CLSBR6; - unsigned long CLSBR7; -}; - -struct st_exdmac0 { - unsigned long EDMSAR; - unsigned long EDMDAR; - unsigned long EDMCRA; - unsigned short EDMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } EDMTMD; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char DACKS:1; - unsigned char DACKE:1; - unsigned char DACKW:1; - } BIT; - } EDMOMD; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } EDMINT; - union { - unsigned long LONG; - struct { - unsigned long :14; - unsigned long AMS:1; - unsigned long DIR:1; - unsigned long SM:2; - unsigned long :1; - unsigned long SARA:5; - unsigned long DM:2; - unsigned long :1; - unsigned long DARA:5; - } BIT; - } EDMAMD; - unsigned long EDMOFR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } EDMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } EDMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } EDMSTS; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char DREQS:2; - } BIT; - } EDMRMD; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char EREQ:1; - } BIT; - } EDMERF; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PREQ:1; - } BIT; - } EDMPRF; -}; - -struct st_exdmac1 { - unsigned long EDMSAR; - unsigned long EDMDAR; - unsigned long EDMCRA; - unsigned short EDMCRB; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short MD:2; - unsigned short DTS:2; - unsigned short :2; - unsigned short SZ:2; - unsigned short :6; - unsigned short DCTG:2; - } BIT; - } EDMTMD; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char DACKS:1; - unsigned char DACKE:1; - unsigned char DACKW:1; - } BIT; - } EDMOMD; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char DTIE:1; - unsigned char ESIE:1; - unsigned char RPTIE:1; - unsigned char SARIE:1; - unsigned char DARIE:1; - } BIT; - } EDMINT; - union { - unsigned long LONG; - struct { - unsigned long :14; - unsigned long AMS:1; - unsigned long DIR:1; - unsigned long SM:2; - unsigned long :1; - unsigned long SARA:5; - unsigned long DM:2; - unsigned long :1; - unsigned long DARA:5; - } BIT; - } EDMAMD; - char wk1[4]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTE:1; - } BIT; - } EDMCNT; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char CLRS:1; - unsigned char :3; - unsigned char SWREQ:1; - } BIT; - } EDMREQ; - union { - unsigned char BYTE; - struct { - unsigned char ACT:1; - unsigned char :2; - unsigned char DTIF:1; - unsigned char :3; - unsigned char ESIF:1; - } BIT; - } EDMSTS; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char DREQS:2; - } BIT; - } EDMRMD; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char EREQ:1; - } BIT; - } EDMERF; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PREQ:1; - } BIT; - } EDMPRF; -}; - -struct st_flash { - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char FLWE:2; - } BIT; - } FWEPROR; - char wk0[7799147]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char FRDMD:1; - } BIT; - } FMODR; - char wk1[13]; - union { - unsigned char BYTE; - struct { - unsigned char ROMAE:1; - unsigned char :2; - unsigned char CMDLK:1; - unsigned char DFLAE:1; - unsigned char :1; - unsigned char DFLRPE:1; - unsigned char DFLWPE:1; - } BIT; - } FASTAT; - union { - unsigned char BYTE; - struct { - unsigned char ROMAEIE:1; - unsigned char :2; - unsigned char CMDLKIE:1; - unsigned char DFLAEIE:1; - unsigned char :1; - unsigned char DFLRPEIE:1; - unsigned char DFLWPEIE:1; - } BIT; - } FAEINT; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char FRDYIE:1; - } BIT; - } FRDYIE; - char wk2[45]; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBRE07:1; - unsigned short DBRE06:1; - unsigned short DBRE05:1; - unsigned short DBRE04:1; - unsigned short DBRE03:1; - unsigned short DBRE02:1; - unsigned short DBRE01:1; - unsigned short DBRE00:1; - } BIT; - } DFLRE0; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBRE15:1; - unsigned short DBRE14:1; - unsigned short DBRE13:1; - unsigned short DBRE12:1; - unsigned short DBRE11:1; - unsigned short DBRE10:1; - unsigned short DBRE09:1; - unsigned short DBRE08:1; - } BIT; - } DFLRE1; - char wk3[12]; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBWE07:1; - unsigned short DBW006:1; - unsigned short DBWE05:1; - unsigned short DBWE04:1; - unsigned short DBWE03:1; - unsigned short DBWE02:1; - unsigned short DBWE01:1; - unsigned short DBWE00:1; - } BIT; - } DFLWE0; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short DBWE15:1; - unsigned short DBWE14:1; - unsigned short DBWE13:1; - unsigned short DBWE12:1; - unsigned short DBWE11:1; - unsigned short DBWE10:1; - unsigned short DBWE09:1; - unsigned short DBWE08:1; - } BIT; - } DFLWE1; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short :7; - unsigned short FCRME:1; - } BIT; - } FCURAME; - char wk4[15194]; - union { - unsigned char BYTE; - struct { - unsigned char FRDY:1; - unsigned char ILGLERR:1; - unsigned char ERSERR:1; - unsigned char PRGERR:1; - unsigned char SUSRDY:1; - unsigned char :1; - unsigned char ERSSPD:1; - unsigned char PRGSPD:1; - } BIT; - } FSTATR0; - union { - unsigned char BYTE; - struct { - unsigned char FCUERR:1; - unsigned char :2; - unsigned char FLOCKST:1; - } BIT; - } FSTATR1; - union { - unsigned short WORD; - struct { - unsigned short FEKEY:8; - unsigned short FENTRYD:1; - unsigned short :3; - unsigned short FENTRY3:1; - unsigned short FENTRY2:1; - unsigned short FENTRY1:1; - unsigned short FENTRY0:1; - } BIT; - } FENTRYR; - union { - unsigned short WORD; - struct { - unsigned short FPKEY:8; - unsigned short :7; - unsigned short FPROTCN:1; - } BIT; - } FPROTR; - union { - unsigned short WORD; - struct { - unsigned short FRKEY:8; - unsigned short :7; - unsigned short FRESET:1; - } BIT; - } FRESETR; - char wk5[2]; - union { - unsigned short WORD; - struct { - unsigned short CMDR:8; - unsigned short PCMDR:8; - } BIT; - } FCMDR; - char wk6[12]; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short ESUSPMD:1; - } BIT; - } FCPSR; - union { - unsigned short WORD; - struct { - unsigned short BCSIZE:1; - unsigned short :4; - unsigned short BCADR:11; - } BIT; - } DFLBCCNT; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short PEERRST:8; - } BIT; - } FPESTAT; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short BCST:1; - } BIT; - } DFLBCSTAT; - char wk7[24]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short PCKA:8; - } BIT; - } PCKAR; -}; - -struct st_icu { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IR:1; - } BIT; - } IR[254]; - char wk0[2]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DTCE:1; - } BIT; - } DTCER[252]; - char wk1[4]; - union { - unsigned char BYTE; - struct { - unsigned char IEN7:1; - unsigned char IEN6:1; - unsigned char IEN5:1; - unsigned char IEN4:1; - unsigned char IEN3:1; - unsigned char IEN2:1; - unsigned char IEN1:1; - unsigned char IEN0:1; - } BIT; - } IER[32]; - char wk2[192]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SWINT:1; - } BIT; - } SWINTR; - char wk3[15]; - union { - unsigned short WORD; - struct { - unsigned short FIEN:1; - unsigned short :7; - unsigned short FVCT:8; - } BIT; - } FIR; - char wk4[14]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char IPR:4; - } BIT; - } IPR[254]; - char wk5[2]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR0; - char wk6[3]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR1; - char wk7[3]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR2; - char wk8[3]; - union { - unsigned char BYTE; - struct { - unsigned char DMRS:8; - } BIT; - } DMRSR3; - char wk9[243]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char IRQMD:2; - } BIT; - } IRQCR[16]; - union { - unsigned char BYTE; - struct { - unsigned char FLTEN7:1; - unsigned char FLTEN6:1; - unsigned char FLTEN5:1; - unsigned char FLTEN4:1; - unsigned char FLTEN3:1; - unsigned char FLTEN2:1; - unsigned char FLTEN1:1; - unsigned char FLTEN0:1; - } BIT; - } IRQFLTE0; - union { - unsigned char BYTE; - struct { - unsigned char FLTEN15:1; - unsigned char FLTEN14:1; - unsigned char FLTEN13:1; - unsigned char FLTEN12:1; - unsigned char FLTEN11:1; - unsigned char FLTEN10:1; - unsigned char FLTEN9:1; - unsigned char FLTEN8:1; - } BIT; - } IRQFLTE1; - char wk10[2]; - union { - unsigned short WORD; - struct { - unsigned short FCLKSEL7:2; - unsigned short FCLKSEL6:2; - unsigned short FCLKSEL5:2; - unsigned short FCLKSEL4:2; - unsigned short FCLKSEL3:2; - unsigned short FCLKSEL2:2; - unsigned short FCLKSEL1:2; - unsigned short FCLKSEL0:2; - } BIT; - } IRQFLTC0; - union { - unsigned short WORD; - struct { - unsigned short FCLKSEL15:2; - unsigned short FCLKSEL14:2; - unsigned short FCLKSEL13:2; - unsigned short FCLKSEL12:2; - unsigned short FCLKSEL11:2; - unsigned short FCLKSEL10:2; - unsigned short FCLKSEL9:2; - unsigned short FCLKSEL8:2; - } BIT; - } IRQFLTC1; - char wk11[104]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char LVD2ST:1; - unsigned char LVD1ST:1; - unsigned char IWDTST:1; - unsigned char WDTST:1; - unsigned char OSTST:1; - unsigned char NMIST:1; - } BIT; - } NMISR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char LVD2EN:1; - unsigned char LVD1EN:1; - unsigned char IWDTEN:1; - unsigned char WDTEN:1; - unsigned char OSTEN:1; - unsigned char NMIEN:1; - } BIT; - } NMIER; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char LVD2CLR:1; - unsigned char LVD1CLR:1; - unsigned char IWDTCLR:1; - unsigned char WDTCLR:1; - unsigned char OSTCLR:1; - unsigned char NMICLR:1; - } BIT; - } NMICLR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NMIMD:1; - } BIT; - } NMICR; - char wk12[12]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char NFLTEN:1; - } BIT; - } NMIFLTE; - char wk13[3]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char NFCLKSEL:2; - } BIT; - } NMIFLTC; - char wk14[19819]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long IS15:1; - unsigned long IS14:1; - unsigned long IS13:1; - unsigned long IS12:1; - unsigned long IS11:1; - unsigned long IS10:1; - unsigned long IS9:1; - unsigned long IS8:1; - unsigned long IS7:1; - unsigned long IS6:1; - unsigned long IS5:1; - unsigned long IS4:1; - unsigned long IS3:1; - unsigned long IS2:1; - unsigned long IS1:1; - unsigned long IS0:1; - } BIT; - } GRP[13]; - char wk15[12]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long EN15:1; - unsigned long EN14:1; - unsigned long EN13:1; - unsigned long EN12:1; - unsigned long EN11:1; - unsigned long EN10:1; - unsigned long EN9:1; - unsigned long EN8:1; - unsigned long EN7:1; - unsigned long EN6:1; - unsigned long EN5:1; - unsigned long EN4:1; - unsigned long EN3:1; - unsigned long EN2:1; - unsigned long EN1:1; - unsigned long EN0:1; - } BIT; - } GEN[13]; - char wk16[12]; - union { - unsigned long LONG; - struct { - unsigned long :16; - unsigned long CLR15:1; - unsigned long CLR14:1; - unsigned long CLR13:1; - unsigned long CLR12:1; - unsigned long CLR11:1; - unsigned long CLR10:1; - unsigned long CLR9:1; - unsigned long CLR8:1; - unsigned long CLR7:1; - unsigned long CLR6:1; - unsigned long CLR5:1; - unsigned long CLR4:1; - unsigned long CLR3:1; - unsigned long CLR2:1; - unsigned long CLR1:1; - unsigned long CLR0:1; - } BIT; - } GCR[13]; - char wk17[12]; - union { - unsigned long LONG; - struct { - unsigned long :26; - unsigned long CN5:1; - unsigned long CN4:1; - unsigned long CN3:1; - unsigned long CN2:1; - unsigned long CN1:1; - unsigned long CN0:1; - } BIT; - } SEL; -}; - -struct st_ieb { - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char IOL:1; - unsigned char DEE:1; - unsigned char :1; - unsigned char RE:1; - } BIT; - } IECTR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char CMD:3; - } BIT; - } IECMR; - union { - unsigned char BYTE; - struct { - unsigned char SS:1; - unsigned char RN:3; - unsigned char CTL:4; - } BIT; - } IEMCR; - union { - unsigned char BYTE; - struct { - unsigned char IARL4:4; - unsigned char IMD:2; - unsigned char :1; - unsigned char STE:1; - } BIT; - } IEAR1; - union { - unsigned char BYTE; - struct { - unsigned char IARU8:8; - } BIT; - } IEAR2; - union { - unsigned char BYTE; - struct { - unsigned char ISAL4:4; - } BIT; - } IESA1; - union { - unsigned char BYTE; - struct { - unsigned char ISAU8:8; - } BIT; - } IESA2; - union { - unsigned char BYTE; - struct { - unsigned char IBFL:8; - } BIT; - } IETBFL; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char ISAL4:4; - } BIT; - } IEMA1; - union { - unsigned char BYTE; - struct { - unsigned char IMAU8:8; - } BIT; - } IEMA2; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char RCTL:4; - } BIT; - } IERCTL; - union { - unsigned char BYTE; - struct { - unsigned char RBFL:8; - } BIT; - } IERBFL; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char ILAL8:8; - } BIT; - } IELA1; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char ILAU4:4; - } BIT; - } IELA2; - union { - unsigned char BYTE; - struct { - unsigned char CMX:1; - unsigned char MRQ:1; - unsigned char SRQ:1; - unsigned char SRE:1; - unsigned char LCK:1; - unsigned char :1; - unsigned char RSS:1; - unsigned char GG:1; - } BIT; - } IEFLG; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char TXS:1; - unsigned char TXF:1; - unsigned char :1; - unsigned char TXEAL:1; - unsigned char TXETTME:1; - unsigned char TXERO:1; - unsigned char TXEACK:1; - } BIT; - } IETSR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char TXSE:1; - unsigned char TXFE:1; - unsigned char :1; - unsigned char TXEALE:1; - unsigned char TXETTMEE:1; - unsigned char TXEROE:1; - unsigned char TXEACKE:1; - } BIT; - } IEIET; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char RXBSY:1; - unsigned char RXS:1; - unsigned char RXF:1; - unsigned char RXEDE:1; - unsigned char RXEOVE:1; - unsigned char RXERTME:1; - unsigned char RXEDLE:1; - unsigned char RXEPE:1; - } BIT; - } IERSR; - union { - unsigned char BYTE; - struct { - unsigned char RXBSYE:1; - unsigned char RXSE:1; - unsigned char RXFE:1; - unsigned char RXEDEE:1; - unsigned char RXEOVEE:1; - unsigned char RXERTMEE:1; - unsigned char RXEDLEE:1; - unsigned char RXEPEE:1; - } BIT; - } IEIER; - char wk3[2]; - union { - unsigned char BYTE; - struct { - unsigned char FLT:1; - unsigned char FCKS:2; - unsigned char CKS3:1; - unsigned char SRSTP:1; - unsigned char CKS:3; - } BIT; - } IECKSR; - char wk4[230]; - unsigned char IETB[33]; - char wk5[223]; - unsigned char IERB[33]; -}; - -struct st_iwdt { - unsigned char IWDTRR; - char wk0[1]; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short RPSS:2; - unsigned short :2; - unsigned short RPES:2; - unsigned short CKS:4; - unsigned short :2; - unsigned short TOPS:2; - } BIT; - } IWDTCR; - union { - unsigned short WORD; - struct { - unsigned short REFEF:1; - unsigned short UNDFF:1; - unsigned short CNTVAL:14; - } BIT; - } IWDTSR; - union { - unsigned char BYTE; - struct { - unsigned char RSTIRQS:1; - } BIT; - } IWDTRCR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char SLCSTP:1; - } BIT; - } IWDTCSTPR; -}; - -struct st_mpc { - union { - unsigned char BYTE; - struct { - unsigned char CS7E:1; - unsigned char CS6E:1; - unsigned char CS5E:1; - unsigned char CS4E:1; - unsigned char CS3E:1; - unsigned char CS2E:1; - unsigned char CS1E:1; - unsigned char CS0E:1; - } BIT; - } PFCSE; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char CS3S:2; - unsigned char CS2S:2; - unsigned char CS1S:2; - unsigned char :1; - unsigned char CS0S:1; - } BIT; - } PFCSS0; - union { - unsigned char BYTE; - struct { - unsigned char CS7S:2; - unsigned char CS6S:2; - unsigned char CS5S:2; - unsigned char CS4S:2; - } BIT; - } PFCSS1; - union { - unsigned char BYTE; - struct { - unsigned char A15E:1; - unsigned char A14E:1; - unsigned char A13E:1; - unsigned char A12E:1; - unsigned char A11E:1; - unsigned char A10E:1; - unsigned char A9E:1; - unsigned char A8E:1; - } BIT; - } PFAOE0; - union { - unsigned char BYTE; - struct { - unsigned char A23E:1; - unsigned char A22E:1; - unsigned char A21E:1; - unsigned char A20E:1; - unsigned char A19E:1; - unsigned char A18E:1; - unsigned char A17E:1; - unsigned char A16E:1; - } BIT; - } PFAOE1; - union { - unsigned char BYTE; - struct { - unsigned char WR32BC32E:1; - unsigned char WR1BC1E:1; - unsigned char DH32E:1; - unsigned char DHE:1; - unsigned char :2; - unsigned char ADRHMS:1; - unsigned char ADRLE:1; - } BIT; - } PFBCR0; - union { - unsigned char BYTE; - struct { - unsigned char SDCLKE:1; - unsigned char DQM1E:1; - unsigned char :1; - unsigned char MDSDE:1; - unsigned char :1; - unsigned char ALEOE:1; - unsigned char WAITS:2; - } BIT; - } PFBCR1; - char wk1[6]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PHYMODE:1; - } BIT; - } PFENET; - char wk2[5]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char PUPHZS:1; - } BIT; - } PFUSB0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char PUPHZS:1; - } BIT; - } PFUSB1; - char wk3[9]; - union { - unsigned char BYTE; - struct { - unsigned char B0WI:1; - unsigned char PFSWE:1; - } BIT; - } PWPR; - char wk4[32]; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P00PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P01PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P02PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P03PFS; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P05PFS; - char wk6[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P07PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P10PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P11PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P12PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P13PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P14PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P15PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P16PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P17PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P20PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P21PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P22PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P23PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P24PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P25PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P26PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P27PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P30PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P31PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P32PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P33PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P34PFS; - char wk7[3]; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P40PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P41PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P42PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P43PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P44PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P45PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P46PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - } BIT; - } P47PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P50PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P51PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P52PFS; - char wk8[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P54PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P55PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P56PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P57PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P60PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P61PFS; - char wk9[4]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P66PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } P67PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P70PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P71PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P72PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P73PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P74PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P75PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P76PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P77PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P80PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P81PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P82PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P83PFS; - char wk10[2]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P86PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } P87PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P90PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P91PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P92PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } P93PFS; - char wk11[4]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PA1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA2PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PA3PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PA4PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA5PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA6PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PA7PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PB0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PB1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB2PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB3PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB4PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB5PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB6PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PB7PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC2PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC3PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC4PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PC5PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC6PFS; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PC7PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD0PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD1PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD2PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD3PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD4PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD5PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD6PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PD7PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE0PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE1PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE2PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE3PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char :2; - unsigned char PSEL:5; - } BIT; - } PE4PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE5PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE6PFS; - union { - unsigned char BYTE; - struct { - unsigned char ASEL:1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PE7PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PF0PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PF1PFS; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PF2PFS; - char wk12[2]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char ISEL:1; - unsigned char :1; - unsigned char PSEL:5; - } BIT; - } PF5PFS; - char wk13[21]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSEL:5; - } BIT; - } PJ3PFS; -}; - -struct st_mtu { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char OE4D:1; - unsigned char OE4C:1; - unsigned char OE3D:1; - unsigned char OE4B:1; - unsigned char OE4A:1; - unsigned char OE3B:1; - } BIT; - } TOER; - char wk0[2]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char BDC:1; - unsigned char N:1; - unsigned char P:1; - unsigned char FB:1; - unsigned char WF:1; - unsigned char VF:1; - unsigned char UF:1; - } BIT; - } TGCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PSYE:1; - unsigned char :2; - unsigned char TOCL:1; - unsigned char TOCS:1; - unsigned char OLSN:1; - unsigned char OLSP:1; - } BIT; - } TOCR1; - union { - unsigned char BYTE; - struct { - unsigned char BF:2; - unsigned char OLS3N:1; - unsigned char OLS3P:1; - unsigned char OLS2N:1; - unsigned char OLS2P:1; - unsigned char OLS1N:1; - unsigned char OLS1P:1; - } BIT; - } TOCR2; - char wk1[4]; - unsigned short TCDR; - unsigned short TDDR; - char wk2[8]; - unsigned short TCNTS; - unsigned short TCBR; - char wk3[12]; - union { - unsigned char BYTE; - struct { - unsigned char T3AEN:1; - unsigned char T3ACOR:3; - unsigned char T4VEN:1; - unsigned char T4VCOR:3; - } BIT; - } TITCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char T3ACNT:3; - unsigned char :1; - unsigned char T4VCNT:3; - } BIT; - } TITCNT; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char BTE:2; - } BIT; - } TBTER; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char TDER:1; - } BIT; - } TDER; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char OLS3N:1; - unsigned char OLS3P:1; - unsigned char OLS2N:1; - unsigned char OLS2P:1; - unsigned char OLS1N:1; - unsigned char OLS1P:1; - } BIT; - } TOLBR; - char wk6[41]; - union { - unsigned char BYTE; - struct { - unsigned char CCE:1; - unsigned char :6; - unsigned char WRE:1; - } BIT; - } TWCR; - char wk7[31]; - union { - unsigned char BYTE; - struct { - unsigned char CST4:1; - unsigned char CST3:1; - unsigned char :3; - unsigned char CST2:1; - unsigned char CST1:1; - unsigned char CST0:1; - } BIT; - } TSTR; - union { - unsigned char BYTE; - struct { - unsigned char SYNC4:1; - unsigned char SYNC3:1; - unsigned char :3; - unsigned char SYNC2:1; - unsigned char SYNC1:1; - unsigned char SYNC0:1; - } BIT; - } TSYR; - char wk8[2]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RWE:1; - } BIT; - } TRWER; -}; - -struct st_mtu0 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[111]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char BFE:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :2; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - unsigned short TGRC; - unsigned short TGRD; - char wk1[16]; - unsigned short TGRE; - unsigned short TGRF; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TGIEF:1; - unsigned char TGIEE:1; - } BIT; - } TIER2; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TTSE:1; - unsigned char TTSB:1; - unsigned char TTSA:1; - } BIT; - } TBTM; -}; - -struct st_mtu1 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[238]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char CCLR:2; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char :2; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - char wk3[4]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char I2BE:1; - unsigned char I2AE:1; - unsigned char I1BE:1; - unsigned char I1AE:1; - } BIT; - } TICCR; -}; - -struct st_mtu2 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[365]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char CCLR:2; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char :2; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_mtu3 { - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - char wk2[2]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :2; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - char wk3[7]; - unsigned short TCNT; - char wk4[6]; - unsigned short TGRA; - unsigned short TGRB; - char wk5[8]; - unsigned short TGRC; - unsigned short TGRD; - char wk6[4]; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - char wk7[11]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TTSE:1; - unsigned char TTSB:1; - unsigned char TTSA:1; - } BIT; - } TBTM; - char wk8[90]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; -}; - -struct st_mtu4 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - char wk2[2]; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - char wk3[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char TTGE2:1; - unsigned char :1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - char wk4[8]; - unsigned short TCNT; - char wk5[8]; - unsigned short TGRA; - unsigned short TGRB; - char wk6[8]; - unsigned short TGRC; - unsigned short TGRD; - char wk7[1]; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - } BIT; - } TSR; - char wk8[11]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TTSE:1; - unsigned char TTSB:1; - unsigned char TTSA:1; - } BIT; - } TBTM; - char wk9[6]; - union { - unsigned short WORD; - struct { - unsigned short BF:2; - unsigned short :6; - unsigned short UT4AE:1; - unsigned short DT4AE:1; - unsigned short UT4BE:1; - unsigned short DT4BE:1; - unsigned short ITA3AE:1; - unsigned short ITA4VE:1; - unsigned short ITB3AE:1; - unsigned short ITB4VE:1; - } BIT; - } TADCR; - char wk10[2]; - unsigned short TADCORA; - unsigned short TADCORB; - unsigned short TADCOBRA; - unsigned short TADCOBRB; - char wk11[72]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; -}; - -struct st_mtu5 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char :1; - unsigned char NFWEN:1; - unsigned char NFVEN:1; - unsigned char NFUEN:1; - } BIT; - } NFCR; - char wk1[490]; - unsigned short TCNTU; - unsigned short TGRU; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TPSC:2; - } BIT; - } TCRU; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char IOC:5; - } BIT; - } TIORU; - char wk3[9]; - unsigned short TCNTV; - unsigned short TGRV; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TPSC:2; - } BIT; - } TCRV; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char IOC:5; - } BIT; - } TIORV; - char wk5[9]; - unsigned short TCNTW; - unsigned short TGRW; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char TPSC:2; - } BIT; - } TCRW; - char wk6[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char IOC:5; - } BIT; - } TIORW; - char wk7[11]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char TGIE5U:1; - unsigned char TGIE5V:1; - unsigned char TGIE5W:1; - } BIT; - } TIER; - char wk8[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char CSTU5:1; - unsigned char CSTV5:1; - unsigned char CSTW5:1; - } BIT; - } TSTR; - char wk9[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char CMPCLR5U:1; - unsigned char CMPCLR5V:1; - unsigned char CMPCLR5W:1; - } BIT; - } TCNTCMPCLR; -}; - -struct st_poe { - union { - unsigned short WORD; - struct { - unsigned short POE3F:1; - unsigned short POE2F:1; - unsigned short POE1F:1; - unsigned short POE0F:1; - unsigned short :3; - unsigned short PIE1:1; - unsigned short POE3M:2; - unsigned short POE2M:2; - unsigned short POE1M:2; - unsigned short POE0M:2; - } BIT; - } ICSR1; - union { - unsigned short WORD; - struct { - unsigned short OSF1:1; - unsigned short :5; - unsigned short OCE1:1; - unsigned short OIE1:1; - } BIT; - } OCSR1; - char wk0[4]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short POE8F:1; - unsigned short :2; - unsigned short POE8E:1; - unsigned short PIE2:1; - unsigned short :6; - unsigned short POE8M:2; - } BIT; - } ICSR2; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char CH0HIZ:1; - unsigned char CH34HIZ:1; - } BIT; - } SPOER; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char PE3ZE:1; - unsigned char PE2ZE:1; - unsigned char PE1ZE:1; - unsigned char PE0ZE:1; - } BIT; - } POECR1; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char P1CZEA:1; - unsigned char P2CZEA:1; - unsigned char P3CZEA:1; - } BIT; - } POECR2; - char wk1[1]; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short OSTSTF:1; - unsigned short :2; - unsigned short OSTSTE:1; - } BIT; - } ICSR3; -}; - -struct st_port0 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[31]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :3; - unsigned char B2:1; - } BIT; - } ODR1; - char wk4[62]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char :1; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_port1 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[32]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[61]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port2 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[33]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[60]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - } BIT; - } DSCR; -}; - -struct st_port3 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[34]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[59]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port4 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[35]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[58]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port5 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[36]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[57]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char :3; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_port6 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[37]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[56]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port7 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[38]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[55]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port8 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[39]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[54]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_port9 { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[40]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[53]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_porta { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[41]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[52]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portb { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[42]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[51]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portc { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[43]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[50]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portd { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[44]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[49]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_porte { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[45]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[48]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_portf { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[46]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[47]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_portg { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PMR; - char wk3[47]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - unsigned char :1; - unsigned char B4:1; - unsigned char :1; - unsigned char B2:1; - unsigned char :1; - unsigned char B0:1; - } BIT; - } ODR1; - char wk4[46]; - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; - char wk5[31]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } DSCR; -}; - -struct st_porth { - union { - unsigned char BYTE; - struct { - unsigned char B7:1; - unsigned char B6:1; - unsigned char B5:1; - unsigned char B4:1; - unsigned char B3:1; - unsigned char B2:1; - unsigned char B1:1; - unsigned char B0:1; - } BIT; - } PCR; -}; - -struct st_portj { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PDR; - char wk0[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PODR; - char wk1[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PIDR; - char wk2[31]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PMR; - char wk3[49]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char B6:1; - } BIT; - } ODR0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char B2:1; - } BIT; - } ODR1; - char wk4[44]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char B5:1; - unsigned char :1; - unsigned char B3:1; - } BIT; - } PCR; -}; - -struct st_ppg0 { - union { - unsigned char BYTE; - struct { - unsigned char G3CMS:2; - unsigned char G2CMS:2; - unsigned char G1CMS:2; - unsigned char G0CMS:2; - } BIT; - } PCR; - union { - unsigned char BYTE; - struct { - unsigned char G3INV:1; - unsigned char G2INV:1; - unsigned char G1INV:1; - unsigned char G0INV:1; - unsigned char G3NOV:1; - unsigned char G2NOV:1; - unsigned char G1NOV:1; - unsigned char G0NOV:1; - } BIT; - } PMR; - union { - unsigned char BYTE; - struct { - unsigned char NDER15:1; - unsigned char NDER14:1; - unsigned char NDER13:1; - unsigned char NDER12:1; - unsigned char NDER11:1; - unsigned char NDER10:1; - unsigned char NDER9:1; - unsigned char NDER8:1; - } BIT; - } NDERH; - union { - unsigned char BYTE; - struct { - unsigned char NDER7:1; - unsigned char NDER6:1; - unsigned char NDER5:1; - unsigned char NDER4:1; - unsigned char NDER3:1; - unsigned char NDER2:1; - unsigned char NDER1:1; - unsigned char NDER0:1; - } BIT; - } NDERL; - union { - unsigned char BYTE; - struct { - unsigned char POD15:1; - unsigned char POD14:1; - unsigned char POD13:1; - unsigned char POD12:1; - unsigned char POD11:1; - unsigned char POD10:1; - unsigned char POD9:1; - unsigned char POD8:1; - } BIT; - } PODRH; - union { - unsigned char BYTE; - struct { - unsigned char POD7:1; - unsigned char POD6:1; - unsigned char POD5:1; - unsigned char POD4:1; - unsigned char POD3:1; - unsigned char POD2:1; - unsigned char POD1:1; - unsigned char POD0:1; - } BIT; - } PODRL; - union { - unsigned char BYTE; - struct { - unsigned char NDR15:1; - unsigned char NDR14:1; - unsigned char NDR13:1; - unsigned char NDR12:1; - unsigned char NDR11:1; - unsigned char NDR10:1; - unsigned char NDR9:1; - unsigned char NDR8:1; - } BIT; - } NDRH; - union { - unsigned char BYTE; - struct { - unsigned char NDR7:1; - unsigned char NDR6:1; - unsigned char NDR5:1; - unsigned char NDR4:1; - unsigned char NDR3:1; - unsigned char NDR2:1; - unsigned char NDR1:1; - unsigned char NDR0:1; - } BIT; - } NDRL; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR11:1; - unsigned char NDR10:1; - unsigned char NDR9:1; - unsigned char NDR8:1; - } BIT; - } NDRH2; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR3:1; - unsigned char NDR2:1; - unsigned char NDR1:1; - unsigned char NDR0:1; - } BIT; - } NDRL2; -}; - -struct st_ppg1 { - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PTRSL:1; - } BIT; - } PTRSLR; - char wk0[5]; - union { - unsigned char BYTE; - struct { - unsigned char G3CMS:2; - unsigned char G2CMS:2; - unsigned char G1CMS:2; - unsigned char G0CMS:2; - } BIT; - } PCR; - union { - unsigned char BYTE; - struct { - unsigned char G3INV:1; - unsigned char G2INV:1; - unsigned char G1INV:1; - unsigned char G0INV:1; - unsigned char G3NOV:1; - unsigned char G2NOV:1; - unsigned char G1NOV:1; - unsigned char G0NOV:1; - } BIT; - } PMR; - union { - unsigned char BYTE; - struct { - unsigned char NDER31:1; - unsigned char NDER30:1; - unsigned char NDER29:1; - unsigned char NDER28:1; - unsigned char NDER27:1; - unsigned char NDER26:1; - unsigned char NDER25:1; - unsigned char NDER24:1; - } BIT; - } NDERH; - union { - unsigned char BYTE; - struct { - unsigned char NDER23:1; - unsigned char NDER22:1; - unsigned char NDER21:1; - unsigned char NDER20:1; - unsigned char NDER19:1; - unsigned char NDER18:1; - unsigned char NDER17:1; - unsigned char NDER16:1; - } BIT; - } NDERL; - union { - unsigned char BYTE; - struct { - unsigned char POD31:1; - unsigned char POD30:1; - unsigned char POD29:1; - unsigned char POD28:1; - unsigned char POD27:1; - unsigned char POD26:1; - unsigned char POD25:1; - unsigned char POD24:1; - } BIT; - } PODRH; - union { - unsigned char BYTE; - struct { - unsigned char POD23:1; - unsigned char POD22:1; - unsigned char POD21:1; - unsigned char POD20:1; - unsigned char POD19:1; - unsigned char POD18:1; - unsigned char POD17:1; - unsigned char POD16:1; - } BIT; - } PODRL; - union { - unsigned char BYTE; - struct { - unsigned char NDR31:1; - unsigned char NDR30:1; - unsigned char NDR29:1; - unsigned char NDR28:1; - unsigned char NDR27:1; - unsigned char NDR26:1; - unsigned char NDR25:1; - unsigned char NDR24:1; - } BIT; - } NDRH; - union { - unsigned char BYTE; - struct { - unsigned char NDR23:1; - unsigned char NDR22:1; - unsigned char NDR21:1; - unsigned char NDR20:1; - unsigned char NDR19:1; - unsigned char NDR18:1; - unsigned char NDR17:1; - unsigned char NDR16:1; - } BIT; - } NDRL; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR27:1; - unsigned char NDR26:1; - unsigned char NDR25:1; - unsigned char NDR24:1; - } BIT; - } NDRH2; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char NDR19:1; - unsigned char NDR18:1; - unsigned char NDR17:1; - unsigned char NDR16:1; - } BIT; - } NDRL2; -}; - -struct st_riic0 { - union { - unsigned char BYTE; - struct { - unsigned char ICE:1; - unsigned char IICRST:1; - unsigned char CLO:1; - unsigned char SOWP:1; - unsigned char SCLO:1; - unsigned char SDAO:1; - unsigned char SCLI:1; - unsigned char SDAI:1; - } BIT; - } ICCR1; - union { - unsigned char BYTE; - struct { - unsigned char BBSY:1; - unsigned char MST:1; - unsigned char TRS:1; - unsigned char :1; - unsigned char SP:1; - unsigned char RS:1; - unsigned char ST:1; - } BIT; - } ICCR2; - union { - unsigned char BYTE; - struct { - unsigned char MTWP:1; - unsigned char CKS:3; - unsigned char BCWP:1; - unsigned char BC:3; - } BIT; - } ICMR1; - union { - unsigned char BYTE; - struct { - unsigned char DLCS:1; - unsigned char SDDL:3; - unsigned char :1; - unsigned char TMOH:1; - unsigned char TMOL:1; - unsigned char TMOS:1; - } BIT; - } ICMR2; - union { - unsigned char BYTE; - struct { - unsigned char SMBS:1; - unsigned char WAIT:1; - unsigned char RDRFS:1; - unsigned char ACKWP:1; - unsigned char ACKBT:1; - unsigned char ACKBR:1; - unsigned char NF:2; - } BIT; - } ICMR3; - union { - unsigned char BYTE; - struct { - unsigned char FMPE:1; - unsigned char SCLE:1; - unsigned char NFE:1; - unsigned char NACKE:1; - unsigned char SALE:1; - unsigned char NALE:1; - unsigned char MALE:1; - unsigned char TMOE:1; - } BIT; - } ICFER; - union { - unsigned char BYTE; - struct { - unsigned char HOAE:1; - unsigned char :1; - unsigned char DIDE:1; - unsigned char :1; - unsigned char GCAE:1; - unsigned char SAR2E:1; - unsigned char SAR1E:1; - unsigned char SAR0E:1; - } BIT; - } ICSER; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char TEIE:1; - unsigned char RIE:1; - unsigned char NAKIE:1; - unsigned char SPIE:1; - unsigned char STIE:1; - unsigned char ALIE:1; - unsigned char TMOIE:1; - } BIT; - } ICIER; - union { - unsigned char BYTE; - struct { - unsigned char HOA:1; - unsigned char :1; - unsigned char DID:1; - unsigned char :1; - unsigned char GCA:1; - unsigned char AAS2:1; - unsigned char AAS1:1; - unsigned char AAS0:1; - } BIT; - } ICSR1; - union { - unsigned char BYTE; - struct { - unsigned char TDRE:1; - unsigned char TEND:1; - unsigned char RDRF:1; - unsigned char NACKF:1; - unsigned char STOP:1; - unsigned char START:1; - unsigned char AL:1; - unsigned char TMOF:1; - } BIT; - } ICSR2; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU0; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL1; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU1; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL2; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU2; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRL:5; - } BIT; - } ICBRL; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRH:5; - } BIT; - } ICBRH; - unsigned char ICDRT; - unsigned char ICDRR; -}; - -struct st_riic1 { - union { - unsigned char BYTE; - struct { - unsigned char ICE:1; - unsigned char IICRST:1; - unsigned char CLO:1; - unsigned char SOWP:1; - unsigned char SCLO:1; - unsigned char SDAO:1; - unsigned char SCLI:1; - unsigned char SDAI:1; - } BIT; - } ICCR1; - union { - unsigned char BYTE; - struct { - unsigned char BBSY:1; - unsigned char MST:1; - unsigned char TRS:1; - unsigned char :1; - unsigned char SP:1; - unsigned char RS:1; - unsigned char ST:1; - } BIT; - } ICCR2; - union { - unsigned char BYTE; - struct { - unsigned char MTWP:1; - unsigned char CKS:3; - unsigned char BCWP:1; - unsigned char BC:3; - } BIT; - } ICMR1; - union { - unsigned char BYTE; - struct { - unsigned char DLCS:1; - unsigned char SDDL:3; - unsigned char :1; - unsigned char TMOH:1; - unsigned char TMOL:1; - unsigned char TMOS:1; - } BIT; - } ICMR2; - union { - unsigned char BYTE; - struct { - unsigned char SMBS:1; - unsigned char WAIT:1; - unsigned char RDRFS:1; - unsigned char ACKWP:1; - unsigned char ACKBT:1; - unsigned char ACKBR:1; - unsigned char NF:2; - } BIT; - } ICMR3; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SCLE:1; - unsigned char NFE:1; - unsigned char NACKE:1; - unsigned char SALE:1; - unsigned char NALE:1; - unsigned char MALE:1; - unsigned char TMOE:1; - } BIT; - } ICFER; - union { - unsigned char BYTE; - struct { - unsigned char HOAE:1; - unsigned char :1; - unsigned char DIDE:1; - unsigned char :1; - unsigned char GCAE:1; - unsigned char SAR2E:1; - unsigned char SAR1E:1; - unsigned char SAR0E:1; - } BIT; - } ICSER; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char TEIE:1; - unsigned char RIE:1; - unsigned char NAKIE:1; - unsigned char SPIE:1; - unsigned char STIE:1; - unsigned char ALIE:1; - unsigned char TMOIE:1; - } BIT; - } ICIER; - union { - unsigned char BYTE; - struct { - unsigned char HOA:1; - unsigned char :1; - unsigned char DID:1; - unsigned char :1; - unsigned char GCA:1; - unsigned char AAS2:1; - unsigned char AAS1:1; - unsigned char AAS0:1; - } BIT; - } ICSR1; - union { - unsigned char BYTE; - struct { - unsigned char TDRE:1; - unsigned char TEND:1; - unsigned char RDRF:1; - unsigned char NACKF:1; - unsigned char STOP:1; - unsigned char START:1; - unsigned char AL:1; - unsigned char TMOF:1; - } BIT; - } ICSR2; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL0; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU0; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL1; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU1; - union { - unsigned char BYTE; - struct { - unsigned char SVA:7; - unsigned char SVA0:1; - } BIT; - } SARL2; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SVA:2; - unsigned char FS:1; - } BIT; - } SARU2; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRL:5; - } BIT; - } ICBRL; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char BRH:5; - } BIT; - } ICBRH; - unsigned char ICDRT; - unsigned char ICDRR; -}; - -struct st_rspi { - union { - unsigned char BYTE; - struct { - unsigned char SPRIE:1; - unsigned char SPE:1; - unsigned char SPTIE:1; - unsigned char SPEIE:1; - unsigned char MSTR:1; - unsigned char MODFEN:1; - unsigned char TXMD:1; - unsigned char SPMS:1; - } BIT; - } SPCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char SSL3P:1; - unsigned char SSL2P:1; - unsigned char SSL1P:1; - unsigned char SSL0P:1; - } BIT; - } SSLP; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char MOIFE:1; - unsigned char MOIFV:1; - unsigned char :1; - unsigned char SPOM:1; - unsigned char SPLP2:1; - unsigned char SPLP:1; - } BIT; - } SPPCR; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char PERF:1; - unsigned char MODF:1; - unsigned char IDLNF:1; - unsigned char OVRF:1; - } BIT; - } SPSR; - unsigned long SPDR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SPSLN:3; - } BIT; - } SPSCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SPECM:3; - unsigned char :1; - unsigned char SPCP:3; - } BIT; - } SPSSR; - union { - unsigned char BYTE; - struct { - unsigned char SPR7:1; - unsigned char SPR6:1; - unsigned char SPR5:1; - unsigned char SPR4:1; - unsigned char SPR3:1; - unsigned char SPR2:1; - unsigned char SPR1:1; - unsigned char SPR0:1; - } BIT; - } SPBR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char SPLW:1; - unsigned char SPRDTD:1; - unsigned char SLSEL:2; - unsigned char SPFC:2; - } BIT; - } SPDCR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SCKDL:3; - } BIT; - } SPCKD; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SLNDL:3; - } BIT; - } SSLND; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SPNDL:3; - } BIT; - } SPND; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char PTE:1; - unsigned char SPIIE:1; - unsigned char SPOE:1; - unsigned char SPPE:1; - } BIT; - } SPCR2; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD0; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD1; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD2; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD3; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD4; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD5; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD6; - union { - unsigned short WORD; - struct { - unsigned short SCKDEN:1; - unsigned short SLNDEN:1; - unsigned short SPNDEN:1; - unsigned short LSBF:1; - unsigned short SPB:4; - unsigned short SSLKP:1; - unsigned short SSLA:3; - unsigned short BRDV:2; - unsigned short CPOL:1; - unsigned short CPHA:1; - } BIT; - } SPCMD7; -}; - -struct st_rtc { - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char F1HZ:1; - unsigned char F2HZ:1; - unsigned char F4HZ:1; - unsigned char F8HZ:1; - unsigned char F16HZ:1; - unsigned char F32HZ:1; - unsigned char F64HZ:1; - } BIT; - } R64CNT; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCNT; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCNT; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCNT; - char wk3[1]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char DAYW:3; - } BIT; - } RWKCNT; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char DATE10:2; - unsigned char DATE1:4; - } BIT; - } RDAYCNT; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCNT; - char wk6[1]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short YR10:4; - unsigned short YR1:4; - } BIT; - } RYRCNT; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECAR; - char wk7[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINAR; - char wk8[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRAR; - char wk9[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char :4; - unsigned char DAYW:3; - } BIT; - } RWKAR; - char wk10[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char :1; - unsigned char DATE10:2; - unsigned char DATE1:4; - } BIT; - } RDAYAR; - char wk11[1]; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - unsigned char :2; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONAR; - char wk12[1]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short YR10:4; - unsigned short YR1:4; - } BIT; - } RYRAR; - union { - unsigned char BYTE; - struct { - unsigned char ENB:1; - } BIT; - } RYRAREN; - char wk13[3]; - union { - unsigned char BYTE; - struct { - unsigned char PES:4; - unsigned char :1; - unsigned char PIE:1; - unsigned char CIE:1; - unsigned char AIE:1; - } BIT; - } RCR1; - char wk14[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char HR24:1; - unsigned char AADJP:1; - unsigned char AADJE:1; - unsigned char RTCOE:1; - unsigned char ADJ30:1; - unsigned char RESET:1; - unsigned char START:1; - } BIT; - } RCR2; - char wk15[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RTCEN:1; - } BIT; - } RCR3; - char wk16[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char RCKSEL:1; - } BIT; - } RCR4; - char wk17[1]; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short RFC:1; - } BIT; - } RFRH; - union { - unsigned short WORD; - struct { - unsigned short RFC:16; - } BIT; - } RFRL; - union { - unsigned char BYTE; - struct { - unsigned char PMADJ:2; - unsigned char ADJ:6; - } BIT; - } RADJ; - char wk18[17]; - union { - unsigned char BYTE; - struct { - unsigned char TCEN:1; - unsigned char :1; - unsigned char TCNF:2; - unsigned char :1; - unsigned char TCST:1; - unsigned char TCCT:2; - } BIT; - } RTCCR0; - char wk19[1]; - union { - unsigned char BYTE; - struct { - unsigned char TCEN:1; - unsigned char :1; - unsigned char TCNF:2; - unsigned char :1; - unsigned char TCST:1; - unsigned char TCCT:2; - } BIT; - } RTCCR1; - char wk20[1]; - union { - unsigned char BYTE; - struct { - unsigned char TCEN:1; - unsigned char :1; - unsigned char TCNF:2; - unsigned char :1; - unsigned char TCST:1; - unsigned char TCCT:2; - } BIT; - } RTCCR2; - char wk21[13]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCP0; - char wk22[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCP0; - char wk23[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCP0; - char wk24[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DATE10:3; - unsigned char DATE1:4; - } BIT; - } RDAYCP0; - char wk25[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCP0; - char wk26[5]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCP1; - char wk27[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCP1; - char wk28[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCP1; - char wk29[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DATE10:3; - unsigned char DATE1:4; - } BIT; - } RDAYCP1; - char wk30[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCP1; - char wk31[5]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char SEC10:3; - unsigned char SEC1:4; - } BIT; - } RSECCP2; - char wk32[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char MIN10:3; - unsigned char MIN1:4; - } BIT; - } RMINCP2; - char wk33[1]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char PM:1; - unsigned char HR10:2; - unsigned char HR1:4; - } BIT; - } RHRCP2; - char wk34[3]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DATE10:3; - unsigned char DATE1:4; - } BIT; - } RDAYCP2; - char wk35[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MON10:1; - unsigned char MON1:4; - } BIT; - } RMONCP2; -}; - -struct st_s12ad { - union { - unsigned char BYTE; - struct { - unsigned char ADST:1; - unsigned char ADCS:1; - unsigned char :1; - unsigned char ADIE:1; - unsigned char CKS:2; - unsigned char TRGE:1; - unsigned char EXTRG:1; - } BIT; - } ADCSR; - char wk0[3]; - union { - unsigned short WORD; - struct { - unsigned short ANS0:16; - } BIT; - } ADANS0; - union { - unsigned short WORD; - struct { - unsigned short :11; - unsigned short ANS1:5; - } BIT; - } ADANS1; - union { - unsigned short WORD; - struct { - unsigned short ADS0:16; - } BIT; - } ADADS0; - union { - unsigned short WORD; - struct { - unsigned short :11; - unsigned short ADS1:5; - } BIT; - } ADADS1; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char ADC:2; - } BIT; - } ADADC; - char wk1[1]; - union { - unsigned short WORD; - struct { - unsigned short ADRFMT:1; - unsigned short :9; - unsigned short ACE:1; - } BIT; - } ADCER; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char ADSTRS:4; - } BIT; - } ADSTRGR; - char wk2[1]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short OCS:1; - unsigned short TSS:1; - unsigned short :6; - unsigned short OCSAD:1; - unsigned short TSSAD:1; - } BIT; - } ADEXICR; - char wk3[6]; - unsigned short ADTSDR; - unsigned short ADOCDR; - char wk4[2]; - unsigned short ADDR0; - unsigned short ADDR1; - unsigned short ADDR2; - unsigned short ADDR3; - unsigned short ADDR4; - unsigned short ADDR5; - unsigned short ADDR6; - unsigned short ADDR7; - unsigned short ADDR8; - unsigned short ADDR9; - unsigned short ADDR10; - unsigned short ADDR11; - unsigned short ADDR12; - unsigned short ADDR13; - unsigned short ADDR14; - unsigned short ADDR15; - unsigned short ADDR16; - unsigned short ADDR17; - unsigned short ADDR18; - unsigned short ADDR19; - unsigned short ADDR20; - char wk5[38]; - union { - unsigned short WORD; - struct { - unsigned short SST2:8; - } BIT; - } ADSSTR23; -}; - -struct st_sci0 { - union { - unsigned char BYTE; - struct { - unsigned char CM:1; - unsigned char CHR:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char STOP:1; - unsigned char MP:1; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char FER:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFEN:1; - unsigned char ABCS:1; - unsigned char :3; - unsigned char ACS0:1; - } BIT; - } SEMR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char NFCS:3; - } BIT; - } SNFR; - union { - unsigned char BYTE; - struct { - unsigned char IICDL:5; - unsigned char :2; - unsigned char IICM:1; - } BIT; - } SIMR1; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char IICACKT:1; - unsigned char :3; - unsigned char IICCSC:1; - unsigned char IICINTM:1; - } BIT; - } SIMR2; - union { - unsigned char BYTE; - struct { - unsigned char IICSCLS:2; - unsigned char IICSDAS:2; - unsigned char IICSTIF:1; - unsigned char IICSTPREQ:1; - unsigned char IICRSTAREQ:1; - unsigned char IICSTAREQ:1; - } BIT; - } SIMR3; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IICACKR:1; - } BIT; - } SISR; - union { - unsigned char BYTE; - struct { - unsigned char CKPH:1; - unsigned char CKPOL:1; - unsigned char :1; - unsigned char MFF:1; - unsigned char :1; - unsigned char MSS:1; - unsigned char CTSE:1; - unsigned char SSE:1; - } BIT; - } SPMR; -}; - -struct st_sci7 { - union { - unsigned char BYTE; - struct { - unsigned char CM:1; - unsigned char CHR:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char STOP:1; - unsigned char MP:1; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char FER:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFEN:1; - unsigned char ABCS:1; - unsigned char :3; - unsigned char ACS0:1; - } BIT; - } SEMR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char NFCS:3; - } BIT; - } SNFR; - union { - unsigned char BYTE; - struct { - unsigned char IICDL:5; - unsigned char :2; - unsigned char IICM:1; - } BIT; - } SIMR1; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char IICACKT:1; - unsigned char :3; - unsigned char IICCSC:1; - unsigned char IICINTM:1; - } BIT; - } SIMR2; - union { - unsigned char BYTE; - struct { - unsigned char IICSCLS:2; - unsigned char IICSDAS:2; - unsigned char IICSTIF:1; - unsigned char IICSTPREQ:1; - unsigned char IICRSTAREQ:1; - unsigned char IICSTAREQ:1; - } BIT; - } SIMR3; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IICACKR:1; - } BIT; - } SISR; - union { - unsigned char BYTE; - struct { - unsigned char CKPH:1; - unsigned char CKPOL:1; - unsigned char :1; - unsigned char MFF:1; - unsigned char :1; - unsigned char MSS:1; - unsigned char CTSE:1; - unsigned char SSE:1; - } BIT; - } SPMR; -}; - -struct st_sci12 { - union { - unsigned char BYTE; - struct { - unsigned char CM:1; - unsigned char CHR:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char STOP:1; - unsigned char MP:1; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char FER:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFEN:1; - unsigned char ABCS:1; - unsigned char :3; - unsigned char ACS0:1; - } BIT; - } SEMR; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char NFCS:3; - } BIT; - } SNFR; - union { - unsigned char BYTE; - struct { - unsigned char IICDL:5; - unsigned char :2; - unsigned char IICM:1; - } BIT; - } SIMR1; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char IICACKT:1; - unsigned char :3; - unsigned char IICCSC:1; - unsigned char IICINTM:1; - } BIT; - } SIMR2; - union { - unsigned char BYTE; - struct { - unsigned char IICSCLS:2; - unsigned char IICSDAS:2; - unsigned char IICSTIF:1; - unsigned char IICSTPREQ:1; - unsigned char IICRSTAREQ:1; - unsigned char IICSTAREQ:1; - } BIT; - } SIMR3; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char IICACKR:1; - } BIT; - } SISR; - union { - unsigned char BYTE; - struct { - unsigned char CKPH:1; - unsigned char CKPOL:1; - unsigned char :1; - unsigned char MFF:1; - unsigned char :1; - unsigned char MSS:1; - unsigned char CTSE:1; - unsigned char SSE:1; - } BIT; - } SPMR; - char wk0[18]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char ESME:1; - } BIT; - } ESMER; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char BRME:1; - unsigned char RXDSF:1; - unsigned char SFSF:1; - } BIT; - } CR0; - union { - unsigned char BYTE; - struct { - unsigned char PIBS:3; - unsigned char PIBE:1; - unsigned char CF1DS:2; - unsigned char CF0RE:1; - unsigned char BFE:1; - } BIT; - } CR1; - union { - unsigned char BYTE; - struct { - unsigned char RTS:2; - unsigned char BCCS:2; - unsigned char :1; - unsigned char DFCS:3; - } BIT; - } CR2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SDST:1; - } BIT; - } CR3; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char SHARPS:1; - unsigned char :2; - unsigned char RXDXPS:1; - unsigned char TXDXPS:1; - } BIT; - } PCR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char AEDIE:1; - unsigned char BCDIE:1; - unsigned char PIBDIE:1; - unsigned char CF1MIE:1; - unsigned char CF0MIE:1; - unsigned char BFDIE:1; - } BIT; - } ICR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char AEDF:1; - unsigned char BCDF:1; - unsigned char PIBDF:1; - unsigned char CF1MF:1; - unsigned char CF0MF:1; - unsigned char BFDF:1; - } BIT; - } STR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char AEDCL:1; - unsigned char BCDCL:1; - unsigned char PIBDCL:1; - unsigned char CF1MCL:1; - unsigned char CF0MCL:1; - unsigned char BFDCL:1; - } BIT; - } STCR; - unsigned char CF0DR; - union { - unsigned char BYTE; - struct { - unsigned char CF0CE7:1; - unsigned char CF0CE6:1; - unsigned char CF0CE5:1; - unsigned char CF0CE4:1; - unsigned char CF0CE3:1; - unsigned char CF0CE2:1; - unsigned char CF0CE1:1; - unsigned char CF0CE0:1; - } BIT; - } CF0CR; - unsigned char CF0RR; - unsigned char PCF1DR; - unsigned char SCF1DR; - union { - unsigned char BYTE; - struct { - unsigned char CF1CE7:1; - unsigned char CF1CE6:1; - unsigned char CF1CE5:1; - unsigned char CF1CE4:1; - unsigned char CF1CE3:1; - unsigned char CF1CE2:1; - unsigned char CF1CE1:1; - unsigned char CF1CE0:1; - } BIT; - } CF1CR; - unsigned char CF1RR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char TCST:1; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char TCSS:3; - unsigned char TWRC:1; - unsigned char :1; - unsigned char TOMS:2; - } BIT; - } TMR; - unsigned char TPRE; - unsigned char TCNT; -}; - -struct st_smci0 { - union { - unsigned char BYTE; - struct { - unsigned char GM:1; - unsigned char BCLK:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char BCP:2; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char ERS:1; - unsigned char PER:1; - unsigned char TEND:1; - unsigned char MPB:1; - unsigned char MPBT:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; -}; - -struct st_smci7 { - union { - unsigned char BYTE; - struct { - unsigned char GM:1; - unsigned char BCLK:1; - unsigned char PE:1; - unsigned char PM:1; - unsigned char BCP:2; - unsigned char CKS:2; - } BIT; - } SMR; - unsigned char BRR; - union { - unsigned char BYTE; - struct { - unsigned char TIE:1; - unsigned char RIE:1; - unsigned char TE:1; - unsigned char RE:1; - unsigned char MPIE:1; - unsigned char TEIE:1; - unsigned char CKE:2; - } BIT; - } SCR; - unsigned char TDR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char ORER:1; - unsigned char ERS:1; - unsigned char PER:1; - unsigned char TEND:1; - } BIT; - } SSR; - unsigned char RDR; - union { - unsigned char BYTE; - struct { - unsigned char BCP2:1; - unsigned char :3; - unsigned char SDIR:1; - unsigned char SINV:1; - unsigned char :1; - unsigned char SMIF:1; - } BIT; - } SCMR; -}; - -struct st_system { - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short MD:1; - } BIT; - } MDMONR; - union { - unsigned short WORD; - struct { - unsigned short :10; - unsigned short UBTS:1; - unsigned short BOTS:1; - unsigned short :2; - unsigned short EXB:1; - unsigned short IROM:1; - } BIT; - } MDSR; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short KEY:8; - unsigned short :6; - unsigned short EXBE:1; - unsigned short ROME:1; - } BIT; - } SYSCR0; - union { - unsigned short WORD; - struct { - unsigned short :15; - unsigned short RAME:1; - } BIT; - } SYSCR1; - char wk1[2]; - union { - unsigned short WORD; - struct { - unsigned short SSBY:1; - unsigned short OPE:1; - } BIT; - } SBYCR; - char wk2[2]; - union { - unsigned long LONG; - struct { - unsigned long ACSE:1; - unsigned long :1; - unsigned long MSTPA29:1; - unsigned long MSTPA28:1; - unsigned long MSTPA27:1; - unsigned long :2; - unsigned long MSTPA24:1; - unsigned long MSTPA23:1; - unsigned long :3; - unsigned long MSTPA19:1; - unsigned long :1; - unsigned long MSTPA17:1; - unsigned long :1; - unsigned long MSTPA15:1; - unsigned long MSTPA14:1; - unsigned long MSTPA13:1; - unsigned long MSTPA12:1; - unsigned long MSTPA11:1; - unsigned long MSTPA10:1; - unsigned long MSTPA9:1; - unsigned long :3; - unsigned long MSTPA5:1; - unsigned long MSTPA4:1; - } BIT; - } MSTPCRA; - union { - unsigned long LONG; - struct { - unsigned long MSTPB31:1; - unsigned long MSTPB30:1; - unsigned long MSTPB29:1; - unsigned long MSTPB28:1; - unsigned long MSTPB27:1; - unsigned long MSTPB26:1; - unsigned long MSTPB25:1; - unsigned long MSTPB24:1; - unsigned long MSTPB23:1; - unsigned long :1; - unsigned long MSTPB21:1; - unsigned long MSTPB20:1; - unsigned long MSTPB19:1; - unsigned long MSTPB18:1; - unsigned long MSTPB17:1; - unsigned long MSTPB16:1; - unsigned long MSTPB15:1; - unsigned long :6; - unsigned long MSTPB8:1; - unsigned long :3; - unsigned long MSTPB4:1; - unsigned long :1; - unsigned long MSTPB2:1; - unsigned long MSTPB1:1; - unsigned long MSTPB0:1; - } BIT; - } MSTPCRB; - union { - unsigned long LONG; - struct { - unsigned long :4; - unsigned long MSTPC27:1; - unsigned long MSTPC26:1; - unsigned long MSTPC25:1; - unsigned long MSTPC24:1; - unsigned long :1; - unsigned long MSTPC22:1; - unsigned long :2; - unsigned long MSTPC19:1; - unsigned long MSTPC18:1; - unsigned long MSTPC17:1; - unsigned long MSTPC16:1; - unsigned long :14; - unsigned long MSTPC1:1; - unsigned long MSTPC0:1; - } BIT; - } MSTPCRC; - char wk3[4]; - union { - unsigned long LONG; - struct { - unsigned long FCK:4; - unsigned long ICK:4; - unsigned long PSTOP1:1; - unsigned long PSTOP0:1; - unsigned long :2; - unsigned long BCK:4; - unsigned long PCKA:4; - unsigned long PCKB:4; - } BIT; - } SCKCR; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short UCK:4; - unsigned short IEBCK:4; - } BIT; - } SCKCR2; - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short CKSEL:3; - } BIT; - } SCKCR3; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short STC:6; - unsigned short :6; - unsigned short PLIDIV:2; - } BIT; - } PLLCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char PLLEN:1; - } BIT; - } PLLCR2; - char wk4[5]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char BCLKDIV:1; - } BIT; - } BCKCR; - char wk5[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char MOSTP:1; - } BIT; - } MOSCCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char SOSTP:1; - } BIT; - } SOSCCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char LCSTP:1; - } BIT; - } LOCOCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char ILCSTP:1; - } BIT; - } ILOCOCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char HCSTP:1; - } BIT; - } HOCOCR; - char wk6[9]; - union { - unsigned char BYTE; - struct { - unsigned char OSTDE:1; - unsigned char :6; - unsigned char OSTDIE:1; - } BIT; - } OSTDCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char OSTDF:1; - } BIT; - } OSTDSR; - char wk7[94]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char OPCMTSF:1; - unsigned char :1; - unsigned char OPCM:3; - } BIT; - } OPCCR; - union { - unsigned char BYTE; - struct { - unsigned char RSTCKEN:1; - unsigned char :4; - unsigned char RSTCKSEL:3; - } BIT; - } RSTCKCR; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char MSTS:5; - } BIT; - } MOSCWTCR; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char SSTS:5; - } BIT; - } SOSCWTCR; - char wk8[2]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char PSTS:5; - } BIT; - } PLLWTCR; - char wk9[25]; - union { - unsigned char BYTE; - struct { - unsigned char :5; - unsigned char SWRF:1; - unsigned char WDTRF:1; - unsigned char IWTDRF:1; - } BIT; - } RSTSR2; - char wk10[1]; - unsigned short SWRR; - char wk11[28]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD1IDTSEL:2; - } BIT; - } LVD1CR1; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD1MON:1; - unsigned char LVD1DET:1; - } BIT; - } LVD1SR; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD2IDTSEL:2; - } BIT; - } LVD2CR1; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char LVD2MON:1; - unsigned char LVD2DET:1; - } BIT; - } LVD2SR; - char wk12[794]; - union { - unsigned short WORD; - struct { - unsigned short PRKEY:8; - unsigned short :4; - unsigned short PRC3:1; - unsigned short :1; - unsigned short PRC1:1; - unsigned short PRC0:1; - } BIT; - } PRCR; - char wk13[48768]; - union { - unsigned char BYTE; - struct { - unsigned char DPSBY:1; - unsigned char IOKEEP:1; - unsigned char :4; - unsigned char DEEPCUT:2; - } BIT; - } DPSBYCR; - char wk14[1]; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ7E:1; - unsigned char DIRQ6E:1; - unsigned char DIRQ5E:1; - unsigned char DIRQ4E:1; - unsigned char DIRQ3E:1; - unsigned char DIRQ2E:1; - unsigned char DIRQ1E:1; - unsigned char DIRQ0E:1; - } BIT; - } DPSIER0; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ15E:1; - unsigned char DIRQ14E:1; - unsigned char DIRQ13E:1; - unsigned char DIRQ12E:1; - unsigned char DIRQ11E:1; - unsigned char DIRQ10E:1; - unsigned char DIRQ9E:1; - unsigned char DIRQ8E:1; - } BIT; - } DPSIER1; - union { - unsigned char BYTE; - struct { - unsigned char DUSBIE:1; - unsigned char DIICCIE:1; - unsigned char DIICDIE:1; - unsigned char DNMIE:1; - unsigned char DRTCAIE:1; - unsigned char DRTCIIE:1; - unsigned char DLVD2IE:1; - unsigned char DLVD1IE:1; - } BIT; - } DPSIER2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DCANIE:1; - } BIT; - } DPSIER3; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ7F:1; - unsigned char DIRQ6F:1; - unsigned char DIRQ5F:1; - unsigned char DIRQ4F:1; - unsigned char DIRQ3F:1; - unsigned char DIRQ2F:1; - unsigned char DIRQ1F:1; - unsigned char DIRQ0F:1; - } BIT; - } DPSIFR0; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ15F:1; - unsigned char DIRQ14F:1; - unsigned char DIRQ13F:1; - unsigned char DIRQ12F:1; - unsigned char DIRQ11F:1; - unsigned char DIRQ10F:1; - unsigned char DIRQ9F:1; - unsigned char DIRQ8F:1; - } BIT; - } DPSIFR1; - union { - unsigned char BYTE; - struct { - unsigned char DUSBIF:1; - unsigned char DIICCIF:1; - unsigned char DIICDIF:1; - unsigned char DNMIF:1; - unsigned char DRTCAIF:1; - unsigned char DRTCIIF:1; - unsigned char DLVD2IF:1; - unsigned char DLVD1IF:1; - } BIT; - } DPSIFR2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DCANIF:1; - } BIT; - } DPSIFR3; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ7EG:1; - unsigned char DIRQ6EG:1; - unsigned char DIRQ5EG:1; - unsigned char DIRQ4EG:1; - unsigned char DIRQ3EG:1; - unsigned char DIRQ2EG:1; - unsigned char DIRQ1EG:1; - unsigned char DIRQ0EG:1; - } BIT; - } DPSIEGR0; - union { - unsigned char BYTE; - struct { - unsigned char DIRQ15EG:1; - unsigned char DIRQ14EG:1; - unsigned char DIRQ13EG:1; - unsigned char DIRQ12EG:1; - unsigned char DIRQ11EG:1; - unsigned char DIRQ10EG:1; - unsigned char DIRQ9EG:1; - unsigned char DIRQ8EG:1; - } BIT; - } DPSIEGR1; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char DIICCEG:1; - unsigned char DIICDEG:1; - unsigned char DNMIEG:1; - unsigned char :2; - unsigned char DLVD2EG:1; - unsigned char DLVD1EG:1; - } BIT; - } DPSIEGR2; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char DCANIEG:1; - } BIT; - } DPSIEGR3; - char wk15[2]; - union { - unsigned char BYTE; - struct { - unsigned char DPSRSTF:1; - unsigned char :3; - unsigned char LVD2RF:1; - unsigned char LVD1RF:1; - unsigned char LVD0RF:1; - unsigned char PORF:1; - } BIT; - } RSTSR0; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char CWSF:1; - } BIT; - } RSTSR1; - char wk16[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char MOFXIN:1; - } BIT; - } MOFCR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char HOCOPCNT:1; - } BIT; - } HOCOPCR; - char wk17[2]; - union { - unsigned char BYTE; - struct { - unsigned char :1; - unsigned char LVD2E:1; - unsigned char LVD1E:1; - } BIT; - } LVCMPCR; - union { - unsigned char BYTE; - struct { - unsigned char LVD2LVL:4; - unsigned char LVD1LVL:4; - } BIT; - } LVDLVLR; - char wk18[1]; - union { - unsigned char BYTE; - struct { - unsigned char LVD1RN:1; - unsigned char LVD1RI:1; - unsigned char LVD1FSAMP:2; - unsigned char :1; - unsigned char LVD1CMPE:1; - unsigned char LVD1DFDIS:1; - unsigned char LVD1RIE:1; - } BIT; - } LVD1CR0; - union { - unsigned char BYTE; - struct { - unsigned char LVD2RN:1; - unsigned char LVD2RI:1; - unsigned char LVD2FSAMP:2; - unsigned char :1; - unsigned char LVD2CMPE:1; - unsigned char LVD2DFDIS:1; - unsigned char LVD2RIE:1; - } BIT; - } LVD2CR0; - char wk19[1]; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char VBATTMNSEL:1; - } BIT; - } VBATTMNSELR; - union { - unsigned char BYTE; - struct { - unsigned char :7; - unsigned char VBATTMON:1; - } BIT; - } VBATTMONR; - char wk20[1]; - unsigned char DPSBKR[32]; - char wk21[1472]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char SCK:2; - } BIT; - } SCK1; - char wk22[15]; - union { - unsigned char BYTE; - struct { - unsigned char :6; - unsigned char SCK:2; - } BIT; - } SCK2; -}; - -struct st_temps { - union { - unsigned char BYTE; - struct { - unsigned char TSEN:1; - unsigned char :2; - unsigned char TSOE:1; - } BIT; - } TSCR; -}; - -struct st_tmr0 { - union { - unsigned char BYTE; - struct { - unsigned char CMIEB:1; - unsigned char CMIEA:1; - unsigned char OVIE:1; - unsigned char CCLR:2; - } BIT; - } TCR; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :3; - unsigned char ADTE:1; - unsigned char OSB:2; - unsigned char OSA:2; - } BIT; - } TCSR; - char wk1[1]; - unsigned char TCORA; - char wk2[1]; - unsigned char TCORB; - char wk3[1]; - unsigned char TCNT; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char TMRIS:1; - unsigned char :2; - unsigned char CSS:2; - unsigned char CKS:3; - } BIT; - } TCCR; -}; - -struct st_tmr1 { - union { - unsigned char BYTE; - struct { - unsigned char CMIEB:1; - unsigned char CMIEA:1; - unsigned char OVIE:1; - unsigned char CCLR:2; - } BIT; - } TCR; - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :4; - unsigned char OSB:2; - unsigned char OSA:2; - } BIT; - } TCSR; - char wk1[1]; - unsigned char TCORA; - char wk2[1]; - unsigned char TCORB; - char wk3[1]; - unsigned char TCNT; - char wk4[1]; - union { - unsigned char BYTE; - struct { - unsigned char TMRIS:1; - unsigned char :2; - unsigned char CSS:2; - unsigned char CKS:3; - } BIT; - } TCCR; -}; - -struct st_tmr01 { - unsigned short TCORA; - unsigned short TCORB; - unsigned short TCNT; - unsigned short TCCR; -}; - -struct st_tpu0 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[7]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - unsigned short TGRC; - unsigned short TGRD; -}; - -struct st_tpu1 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[22]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpu2 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[37]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpu3 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[52]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIORH; - union { - unsigned char BYTE; - struct { - unsigned char IOD:4; - unsigned char IOC:4; - } BIT; - } TIORL; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; - unsigned short TGRC; - unsigned short TGRD; -}; - -struct st_tpu4 { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk0[67]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk1[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpu5 { - char wk0[1]; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char NFCS:2; - unsigned char NFDEN:1; - unsigned char NFCEN:1; - unsigned char NFBEN:1; - unsigned char NFAEN:1; - } BIT; - } NFCR; - char wk1[82]; - union { - unsigned char BYTE; - struct { - unsigned char CCLR:3; - unsigned char CKEG:2; - unsigned char TPSC:3; - } BIT; - } TCR; - union { - unsigned char BYTE; - struct { - unsigned char ICSELD:1; - unsigned char ICSELB:1; - unsigned char BFB:1; - unsigned char BFA:1; - unsigned char MD:4; - } BIT; - } TMDR; - union { - unsigned char BYTE; - struct { - unsigned char IOB:4; - unsigned char IOA:4; - } BIT; - } TIOR; - char wk2[1]; - union { - unsigned char BYTE; - struct { - unsigned char TTGE:1; - unsigned char :1; - unsigned char TCIEU:1; - unsigned char TCIEV:1; - unsigned char TGIED:1; - unsigned char TGIEC:1; - unsigned char TGIEB:1; - unsigned char TGIEA:1; - } BIT; - } TIER; - union { - unsigned char BYTE; - struct { - unsigned char TCFD:1; - unsigned char :1; - unsigned char TCFU:1; - unsigned char TCFV:1; - unsigned char TGFD:1; - unsigned char TGFC:1; - unsigned char TGFB:1; - unsigned char TGFA:1; - } BIT; - } TSR; - unsigned short TCNT; - unsigned short TGRA; - unsigned short TGRB; -}; - -struct st_tpua { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char CST5:1; - unsigned char CST4:1; - unsigned char CST3:1; - unsigned char CST2:1; - unsigned char CST1:1; - unsigned char CST0:1; - } BIT; - } TSTR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char SYNC5:1; - unsigned char SYNC4:1; - unsigned char SYNC3:1; - unsigned char SYNC2:1; - unsigned char SYNC1:1; - unsigned char SYNC0:1; - } BIT; - } TSYR; -}; - -struct st_tpub { - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char CST11:1; - unsigned char CST10:1; - unsigned char CST9:1; - unsigned char CST8:1; - unsigned char CST7:1; - unsigned char CST6:1; - } BIT; - } TSTR; - union { - unsigned char BYTE; - struct { - unsigned char :2; - unsigned char SYNC11:1; - unsigned char SYNC10:1; - unsigned char SYNC9:1; - unsigned char SYNC8:1; - unsigned char SYNC7:1; - unsigned char SYNC6:1; - } BIT; - } TSYR; -}; - -struct st_usb { - union { - unsigned long LONG; - struct { - unsigned long DVSTS1:1; - unsigned long :5; - unsigned long DM1:1; - unsigned long DP1:1; - unsigned long DVBSTS0:1; - unsigned long :1; - unsigned long DOVCB0:1; - unsigned long DOVCA0:1; - unsigned long :2; - unsigned long DM0:1; - unsigned long DP0:1; - unsigned long :3; - unsigned long FIXPHY1:1; - unsigned long :3; - unsigned long SRPC1:1; - unsigned long :3; - unsigned long FIXPHY0:1; - unsigned long :3; - unsigned long SRPC0:1; - } BIT; - } DPUSR0R; - union { - unsigned long LONG; - struct { - unsigned long DVBINT1:1; - unsigned long :5; - unsigned long DMINT1:1; - unsigned long DPINT1:1; - unsigned long DVBINT0:1; - unsigned long :1; - unsigned long DOVRCRB0:1; - unsigned long DOVRCRA0:1; - unsigned long :2; - unsigned long DMINT0:1; - unsigned long DPINT0:1; - unsigned long DVBSE1:1; - unsigned long :5; - unsigned long DMINTE1:1; - unsigned long DPINTE1:1; - unsigned long DVBSE0:1; - unsigned long :1; - unsigned long DOVRCRBE0:1; - unsigned long DOVRCRAE0:1; - unsigned long :2; - unsigned long DMINTE0:1; - unsigned long DPINTE0:1; - } BIT; - } DPUSR1R; -}; - -struct st_usb0 { - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short SCKE:1; - unsigned short :3; - unsigned short DCFM:1; - unsigned short DRPD:1; - unsigned short DPRPU:1; - unsigned short :3; - unsigned short USBE:1; - } BIT; - } SYSCFG; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short OVCMON:2; - unsigned short :7; - unsigned short HTACT:1; - unsigned short :3; - unsigned short IDMON:1; - unsigned short LNST:2; - } BIT; - } SYSSTS0; - char wk1[2]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short HNPBTOA:1; - unsigned short EXICEN:1; - unsigned short VBUSEN:1; - unsigned short WKUP:1; - unsigned short RWUPE:1; - unsigned short USBRST:1; - unsigned short RESUME:1; - unsigned short UACT:1; - unsigned short :1; - unsigned short RHST:3; - } BIT; - } DVSTCTR0; - char wk2[10]; - unsigned short CFIFO; - char wk3[2]; - unsigned short D0FIFO; - char wk4[2]; - unsigned short D1FIFO; - char wk5[2]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short :3; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :2; - unsigned short ISEL:1; - unsigned short :1; - unsigned short CURPIPE:4; - } BIT; - } CFIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } CFIFOCTR; - char wk6[4]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D0FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D0FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D1FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D1FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short VBSE:1; - unsigned short RSME:1; - unsigned short SOFE:1; - unsigned short DVSE:1; - unsigned short CTRE:1; - unsigned short BEMPE:1; - unsigned short NRDYE:1; - unsigned short BRDYE:1; - } BIT; - } INTENB0; - union { - unsigned short WORD; - struct { - unsigned short OVRCRE:1; - unsigned short BCHGE:1; - unsigned short :1; - unsigned short DTCHE:1; - unsigned short ATTCHE:1; - unsigned short :4; - unsigned short EOFERRE:1; - unsigned short SIGNE:1; - unsigned short SACKE:1; - } BIT; - } INTENB1; - char wk7[2]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDYE:1; - unsigned short PIPE8BRDYE:1; - unsigned short PIPE7BRDYE:1; - unsigned short PIPE6BRDYE:1; - unsigned short PIPE5BRDYE:1; - unsigned short PIPE4BRDYE:1; - unsigned short PIPE3BRDYE:1; - unsigned short PIPE2BRDYE:1; - unsigned short PIPE1BRDYE:1; - unsigned short PIPE0BRDYE:1; - } BIT; - } BRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BEMPE:1; - unsigned short PIPE6BEMPE:1; - unsigned short PIPE5BEMPE:1; - unsigned short PIPE4BEMPE:1; - unsigned short PIPE3BEMPE:1; - unsigned short PIPE2BEMPE:1; - unsigned short PIPE1BEMPE:1; - unsigned short PIPE0BEMPE:1; - } BIT; - } BEMPENB; - union { - unsigned short WORD; - struct { - unsigned short :7; - unsigned short TRNENSEL:1; - unsigned short :1; - unsigned short BRDYM:1; - unsigned short :1; - unsigned short EDGESTS:1; - } BIT; - } SOFCFG; - char wk8[2]; - union { - unsigned short WORD; - struct { - unsigned short VBINT:1; - unsigned short RESM:1; - unsigned short SOFR:1; - unsigned short DVST:1; - unsigned short CTRT:1; - unsigned short BEMP:1; - unsigned short NRDY:1; - unsigned short BRDY:1; - unsigned short VBSTS:1; - unsigned short DVSQ:3; - unsigned short VALID:1; - unsigned short CTSQ:3; - } BIT; - } INTSTS0; - union { - unsigned short WORD; - struct { - unsigned short OVRCR:1; - unsigned short BCHG:1; - unsigned short :1; - unsigned short DTCH:1; - unsigned short ATTCH:1; - unsigned short :4; - unsigned short EOFERR:1; - unsigned short SIGN:1; - unsigned short SACK:1; - } BIT; - } INTSTS1; - char wk9[2]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDY:1; - unsigned short PIPE8BRDY:1; - unsigned short PIPE7BRDY:1; - unsigned short PIPE6BRDY:1; - unsigned short PIPE5BRDY:1; - unsigned short PIPE4BRDY:1; - unsigned short PIPE3BRDY:1; - unsigned short PIPE2BRDY:1; - unsigned short PIPE1BRDY:1; - unsigned short PIPE0BRDY:1; - } BIT; - } BRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BENP:1; - unsigned short PIPE6BENP:1; - unsigned short PIPE5BENP:1; - unsigned short PIPE4BENP:1; - unsigned short PIPE3BENP:1; - unsigned short PIPE2BENP:1; - unsigned short PIPE1BENP:1; - unsigned short PIPE0BENP:1; - } BIT; - } BEMPSTS; - union { - unsigned short WORD; - struct { - unsigned short OVRN:1; - unsigned short CRCE:1; - unsigned short :3; - unsigned short FRNM:11; - } BIT; - } FRMNUM; - union { - unsigned short WORD; - struct { - unsigned short DVCHG:1; - } BIT; - } DVCHGR; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short STSRECOV:4; - unsigned short :1; - unsigned short USBADDR:7; - } BIT; - } USBADDR; - char wk10[2]; - union { - unsigned short WORD; - struct { - unsigned short BREQUEST:8; - unsigned short BMREQUESTTYPE:8; - } BIT; - } USBREQ; - unsigned short USBVAL; - unsigned short USBINDX; - unsigned short USBLENG; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - } BIT; - } DCPCFG; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :5; - unsigned short MXPS:7; - } BIT; - } DCPMAXP; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short SUREQ:1; - unsigned short :2; - unsigned short SUREQCLR:1; - unsigned short :2; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :2; - unsigned short CCPL:1; - unsigned short PID:2; - } BIT; - } DCPCTR; - char wk11[2]; - union { - unsigned short WORD; - struct { - unsigned short :12; - unsigned short PIPESEL:4; - } BIT; - } PIPESEL; - char wk12[2]; - union { - unsigned short WORD; - struct { - unsigned short TYPE:2; - unsigned short :3; - unsigned short BFRE:1; - unsigned short DBLB:1; - unsigned short :1; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - unsigned short EPNUM:4; - } BIT; - } PIPECFG; - char wk13[2]; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :3; - unsigned short MXPS:9; - } BIT; - } PIPEMAXP; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short IFIS:1; - unsigned short :9; - unsigned short IITV:3; - } BIT; - } PIPEPERI; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE1CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE2CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE3CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE4CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE5CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE6CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE7CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE8CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE9CTR; - char wk14[14]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE1TRE; - unsigned short PIPE1TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE2TRE; - unsigned short PIPE2TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE3TRE; - unsigned short PIPE3TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE4TRE; - unsigned short PIPE4TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE5TRE; - unsigned short PIPE5TRN; - char wk15[44]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD0; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD1; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD2; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD3; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD4; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD5; -}; - -struct st_usb1 { - union { - unsigned short WORD; - struct { - unsigned short :5; - unsigned short SCKE:1; - unsigned short :3; - unsigned short DCFM:1; - unsigned short DRPD:1; - unsigned short DPRPU:1; - unsigned short :3; - unsigned short USBE:1; - } BIT; - } SYSCFG; - char wk0[2]; - union { - unsigned short WORD; - struct { - unsigned short OVCMON:2; - unsigned short :7; - unsigned short HTACT:1; - unsigned short :3; - unsigned short IDMON:1; - unsigned short LNST:2; - } BIT; - } SYSSTS0; - char wk1[2]; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short HNPBTOA:1; - unsigned short EXICEN:1; - unsigned short VBUSEN:1; - unsigned short WKUP:1; - unsigned short RWUPE:1; - unsigned short USBRST:1; - unsigned short RESUME:1; - unsigned short UACT:1; - unsigned short :1; - unsigned short RHST:3; - } BIT; - } DVSTCTR0; - char wk2[10]; - unsigned short CFIFO; - char wk3[2]; - unsigned short D0FIFO; - char wk4[2]; - unsigned short D1FIFO; - char wk5[2]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short :3; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :2; - unsigned short ISEL:1; - unsigned short :1; - unsigned short CURPIPE:4; - } BIT; - } CFIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } CFIFOCTR; - char wk6[4]; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D0FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D0FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short RCNT:1; - unsigned short REW:1; - unsigned short DCLRM:1; - unsigned short DREQE:1; - unsigned short :1; - unsigned short MBW:1; - unsigned short :1; - unsigned short BIGEND:1; - unsigned short :4; - unsigned short CURPIPE:4; - } BIT; - } D1FIFOSEL; - union { - unsigned short WORD; - struct { - unsigned short BVAL:1; - unsigned short BCLR:1; - unsigned short FRDY:1; - unsigned short :4; - unsigned short DTLN:9; - } BIT; - } D1FIFOCTR; - union { - unsigned short WORD; - struct { - unsigned short VBSE:1; - unsigned short RSME:1; - unsigned short SOFE:1; - unsigned short DVSE:1; - unsigned short CTRE:1; - unsigned short BEMPE:1; - unsigned short NRDYE:1; - unsigned short BRDYE:1; - } BIT; - } INTENB0; - char wk7[4]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDYE:1; - unsigned short PIPE8BRDYE:1; - unsigned short PIPE7BRDYE:1; - unsigned short PIPE6BRDYE:1; - unsigned short PIPE5BRDYE:1; - unsigned short PIPE4BRDYE:1; - unsigned short PIPE3BRDYE:1; - unsigned short PIPE2BRDYE:1; - unsigned short PIPE1BRDYE:1; - unsigned short PIPE0BRDYE:1; - } BIT; - } BRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYENB; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BEMPE:1; - unsigned short PIPE6BEMPE:1; - unsigned short PIPE5BEMPE:1; - unsigned short PIPE4BEMPE:1; - unsigned short PIPE3BEMPE:1; - unsigned short PIPE2BEMPE:1; - unsigned short PIPE1BEMPE:1; - unsigned short PIPE0BEMPE:1; - } BIT; - } BEMPENB; - union { - unsigned short WORD; - struct { - unsigned short :9; - unsigned short BRDYM:1; - unsigned short :1; - unsigned short EDGESTS:1; - } BIT; - } SOFCFG; - char wk8[2]; - union { - unsigned short WORD; - struct { - unsigned short VBINT:1; - unsigned short RESM:1; - unsigned short SOFR:1; - unsigned short DVST:1; - unsigned short CTRT:1; - unsigned short BEMP:1; - unsigned short NRDY:1; - unsigned short BRDY:1; - unsigned short VBSTS:1; - unsigned short DVSQ:3; - unsigned short VALID:1; - unsigned short CTSQ:3; - } BIT; - } INTSTS0; - char wk9[4]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BRDY:1; - unsigned short PIPE8BRDY:1; - unsigned short PIPE7BRDY:1; - unsigned short PIPE6BRDY:1; - unsigned short PIPE5BRDY:1; - unsigned short PIPE4BRDY:1; - unsigned short PIPE3BRDY:1; - unsigned short PIPE2BRDY:1; - unsigned short PIPE1BRDY:1; - unsigned short PIPE0BRDY:1; - } BIT; - } BRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9NRDYE:1; - unsigned short PIPE8NRDYE:1; - unsigned short PIPE7NRDYE:1; - unsigned short PIPE6NRDYE:1; - unsigned short PIPE5NRDYE:1; - unsigned short PIPE4NRDYE:1; - unsigned short PIPE3NRDYE:1; - unsigned short PIPE2NRDYE:1; - unsigned short PIPE1NRDYE:1; - unsigned short PIPE0NRDYE:1; - } BIT; - } NRDYSTS; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short PIPE9BEMPE:1; - unsigned short PIPE8BEMPE:1; - unsigned short PIPE7BENP:1; - unsigned short PIPE6BENP:1; - unsigned short PIPE5BENP:1; - unsigned short PIPE4BENP:1; - unsigned short PIPE3BENP:1; - unsigned short PIPE2BENP:1; - unsigned short PIPE1BENP:1; - unsigned short PIPE0BENP:1; - } BIT; - } BEMPSTS; - union { - unsigned short WORD; - struct { - unsigned short OVRN:1; - unsigned short CRCE:1; - unsigned short :3; - unsigned short FRNM:11; - } BIT; - } FRMNUM; - union { - unsigned short WORD; - struct { - unsigned short DVCHG:1; - } BIT; - } DVCHGR; - union { - unsigned short WORD; - struct { - unsigned short :4; - unsigned short STSRECOV:4; - unsigned short :1; - unsigned short USBADDR:7; - } BIT; - } USBADDR; - char wk10[2]; - union { - unsigned short WORD; - struct { - unsigned short BREQUEST:8; - unsigned short BMREQUESTTYPE:8; - } BIT; - } USBREQ; - unsigned short USBVAL; - unsigned short USBINDX; - unsigned short USBLENG; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - } BIT; - } DCPCFG; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :5; - unsigned short MXPS:7; - } BIT; - } DCPMAXP; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short SUREQ:1; - unsigned short :2; - unsigned short SUREQCLR:1; - unsigned short :2; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :2; - unsigned short CCPL:1; - unsigned short PID:2; - } BIT; - } DCPCTR; - char wk11[2]; - union { - unsigned short WORD; - struct { - unsigned short :12; - unsigned short PIPESEL:4; - } BIT; - } PIPESEL; - char wk12[2]; - union { - unsigned short WORD; - struct { - unsigned short TYPE:2; - unsigned short :3; - unsigned short BFRE:1; - unsigned short DBLB:1; - unsigned short :1; - unsigned short SHTNAK:1; - unsigned short :2; - unsigned short DIR:1; - unsigned short EPNUM:4; - } BIT; - } PIPECFG; - char wk13[2]; - union { - unsigned short WORD; - struct { - unsigned short DEVSEL:4; - unsigned short :3; - unsigned short MXPS:9; - } BIT; - } PIPEMAXP; - union { - unsigned short WORD; - struct { - unsigned short :3; - unsigned short IFIS:1; - unsigned short :9; - unsigned short IITV:3; - } BIT; - } PIPEPERI; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE1CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE2CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE3CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE4CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short INBUFM:1; - unsigned short :3; - unsigned short ATREPM:1; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE5CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE6CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE7CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE8CTR; - union { - unsigned short WORD; - struct { - unsigned short BSTS:1; - unsigned short :5; - unsigned short ACLRM:1; - unsigned short SQCLR:1; - unsigned short SQSET:1; - unsigned short SQMON:1; - unsigned short PBUSY:1; - unsigned short :3; - unsigned short PID:2; - } BIT; - } PIPE9CTR; - char wk14[14]; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE1TRE; - unsigned short PIPE1TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE2TRE; - unsigned short PIPE2TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE3TRE; - unsigned short PIPE3TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE4TRE; - unsigned short PIPE4TRN; - union { - unsigned short WORD; - struct { - unsigned short :6; - unsigned short TRENB:1; - unsigned short TRCLR:1; - } BIT; - } PIPE5TRE; - unsigned short PIPE5TRN; - char wk15[44]; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD0; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD1; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD2; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD3; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD4; - union { - unsigned short WORD; - struct { - unsigned short :8; - unsigned short USBSPD:2; - } BIT; - } DEVADD5; -}; - -struct st_wdt { - unsigned char WDTRR; - char wk0[1]; - union { - unsigned short WORD; - struct { - unsigned short :2; - unsigned short RPSS:2; - unsigned short :2; - unsigned short RPES:2; - unsigned short CKS:4; - unsigned short :2; - unsigned short TOPS:2; - } BIT; - } WDTCR; - union { - unsigned short WORD; - struct { - unsigned short REFEF:1; - unsigned short UNDFF:1; - unsigned short CNTVAL:14; - } BIT; - } WDTSR; - union { - unsigned char BYTE; - struct { - unsigned char RSTIRQS:1; - } BIT; - } WDTRCR; -}; - -enum enum_ir { -IR_BSC_BUSERR=16,IR_FCU_FIFERR=21, -IR_ICU_SWINT=27, -IR_CMT0_CMI0, -IR_CMT1_CMI1, -IR_CMT2_CMI2, -IR_CMT3_CMI3, -IR_ETHER_EINT, -IR_USB0_D0FIFO0,IR_USB0_D1FIFO0,IR_USB0_USBI0, -IR_USB1_D0FIFO1,IR_USB1_D1FIFO1,IR_USB1_USBI1, -IR_RSPI0_SPRI0,IR_RSPI0_SPTI0,IR_RSPI0_SPII0, -IR_RSPI1_SPRI1,IR_RSPI1_SPTI1,IR_RSPI1_SPII1, -IR_RSPI2_SPRI2,IR_RSPI2_SPTI2,IR_RSPI2_SPII2, -IR_CAN0_RXF0,IR_CAN0_TXF0,IR_CAN0_RXM0,IR_CAN0_TXM0, -IR_CAN1_RXF1,IR_CAN1_TXF1,IR_CAN1_RXM1,IR_CAN1_TXM1, -IR_CAN2_RXF2,IR_CAN2_TXF2,IR_CAN2_RXM2,IR_CAN2_TXM2, -IR_RTC_COUNTUP=62, -IR_ICU_IRQ0=64,IR_ICU_IRQ1,IR_ICU_IRQ2,IR_ICU_IRQ3,IR_ICU_IRQ4,IR_ICU_IRQ5,IR_ICU_IRQ6,IR_ICU_IRQ7,IR_ICU_IRQ8,IR_ICU_IRQ9,IR_ICU_IRQ10,IR_ICU_IRQ11,IR_ICU_IRQ12,IR_ICU_IRQ13,IR_ICU_IRQ14,IR_ICU_IRQ15, -IR_USB_USBR0=90,IR_USB_USBR1, -IR_RTC_ALARM,IR_RTC_PRD, -IR_AD0_ADI0=98, -IR_S12AD0_S12ADI0=102, -IR_ICU_GROUPE0=106,IR_ICU_GROUPE1,IR_ICU_GROUPE2,IR_ICU_GROUPE3,IR_ICU_GROUPE4,IR_ICU_GROUPE5,IR_ICU_GROUPE6,IR_ICU_GROUPL0=114, -IR_SCIX_SCIX0=122,IR_SCIX_SCIX1,IR_SCIX_SCIX2,IR_SCIX_SCIX3, -IR_TPU0_TGI0A,IR_TPU0_TGI0B,IR_TPU0_TGI0C,IR_TPU0_TGI0D, -IR_TPU1_TGI1A,IR_TPU1_TGI1B, -IR_TPU2_TGI2A,IR_TPU2_TGI2B, -IR_TPU3_TGI3A,IR_TPU3_TGI3B,IR_TPU3_TGI3C,IR_TPU3_TGI3D, -IR_TPU4_TGI4A,IR_TPU4_TGI4B, -IR_TPU5_TGI5A,IR_TPU5_TGI5B, -IR_TPU6_TGI6A,IR_TPU6_TGI6B,IR_TPU6_TGI6C,IR_TPU6_TGI6D, -IR_MTU0_TGIA0=142,IR_MTU0_TGIB0,IR_MTU0_TGIC0,IR_MTU0_TGID0,IR_MTU0_TGIE0,IR_MTU0_TGIF0, -IR_TPU7_TGI7A,IR_TPU7_TGI7B, -IR_MTU1_TGIA1=148,IR_MTU1_TGIB1, -IR_TPU8_TGI8A,IR_TPU8_TGI8B, -IR_MTU2_TGIA2=150,IR_MTU2_TGIB2, -IR_TPU9_TGI9A,IR_TPU9_TGI9B,IR_TPU9_TGI9C,IR_TPU9_TGI9D, -IR_MTU3_TGIA3=152,IR_MTU3_TGIB3,IR_MTU3_TGIC3,IR_MTU3_TGID3, -IR_TPU10_TGI10A,IR_TPU10_TGI10B, -IR_MTU4_TGIA4=156,IR_MTU4_TGIB4,IR_MTU4_TGIC4,IR_MTU4_TGID4,IR_MTU4_TCIV4, -IR_MTU5_TGIU5,IR_MTU5_TGIV5,IR_MTU5_TGIW5, -IR_TPU11_TGI11A,IR_TPU11_TGI11B, -IR_POE_OEI1,IR_POE_OEI2, -IR_TMR0_CMIA0=170,IR_TMR0_CMIB0,IR_TMR0_OVI0, -IR_TMR1_CMIA1,IR_TMR1_CMIB1,IR_TMR1_OVI1, -IR_TMR2_CMIA2,IR_TMR2_CMIB2,IR_TMR2_OVI2, -IR_TMR3_CMIA3,IR_TMR3_CMIB3,IR_TMR3_OVI3, -IR_RIIC0_EEI0,IR_RIIC0_RXI0,IR_RIIC0_TXI0,IR_RIIC0_TEI0, -IR_RIIC1_EEI1,IR_RIIC1_RXI1,IR_RIIC1_TXI1,IR_RIIC1_TEI1, -IR_RIIC2_EEI2,IR_RIIC2_RXI2,IR_RIIC2_TXI2,IR_RIIC2_TEI2, -IR_RIIC3_EEI3,IR_RIIC3_RXI3,IR_RIIC3_TXI3,IR_RIIC3_TEI3, -IR_DMAC_DMAC0I,IR_DMAC_DMAC1I,IR_DMAC_DMAC2I,IR_DMAC_DMAC3I, -IR_EXDMAC_EXDMAC0I,IR_EXDMAC_EXDMAC1I, -IR_SCI0_RXI0=214,IR_SCI0_TXI0,IR_SCI0_TEI0, -IR_SCI1_RXI1,IR_SCI1_TXI1,IR_SCI1_TEI1, -IR_SCI2_RXI2,IR_SCI2_TXI2,IR_SCI2_TEI2, -IR_SCI3_RXI3,IR_SCI3_TXI3,IR_SCI3_TEI3, -IR_SCI4_RXI4,IR_SCI4_TXI4,IR_SCI4_TEI4, -IR_SCI5_RXI5,IR_SCI5_TXI5,IR_SCI5_TEI5, -IR_SCI6_RXI6,IR_SCI6_TXI6,IR_SCI6_TEI6, -IR_SCI7_RXI7,IR_SCI7_TXI7,IR_SCI7_TEI7, -IR_SCI8_RXI8,IR_SCI8_TXI8,IR_SCI8_TEI8, -IR_SCI9_RXI9,IR_SCI9_TXI9,IR_SCI9_TEI9, -IR_SCI10_RXI10,IR_SCI10_TXI10,IR_SCI10_TEI10, -IR_SCI11_RXI11,IR_SCI11_TXI11,IR_SCI11_TEI11, -IR_SCI12_RXI12,IR_SCI12_TXI12,IR_SCI12_TEI12, -IR_IEB_IEBINT -}; - -enum enum_dtce { -DTCE_ICU_SWINT=27, -DTCE_CMT0_CMI0, -DTCE_CMT1_CMI1, -DTCE_CMT2_CMI2, -DTCE_CMT3_CMI3, -DTCE_USB0_D0FIFO0=33,DTCE_USB0_D1FIFO0, -DTCE_USB1_D0FIFO1=36,DTCE_USB1_D1FIFO1, -DTCE_RSPI0_SPRI0=39,DTCE_RSPI0_SPTI0, -DTCE_RSPI1_SPRI1=42,DTCE_RSPI1_SPTI1, -DTCE_RSPI2_SPRI2=45,DTCE_RSPI2_SPTI2, -DTCE_ICU_IRQ0=64,DTCE_ICU_IRQ1,DTCE_ICU_IRQ2,DTCE_ICU_IRQ3,DTCE_ICU_IRQ4,DTCE_ICU_IRQ5,DTCE_ICU_IRQ6,DTCE_ICU_IRQ7,DTCE_ICU_IRQ8,DTCE_ICU_IRQ9,DTCE_ICU_IRQ10,DTCE_ICU_IRQ11,DTCE_ICU_IRQ12,DTCE_ICU_IRQ13,DTCE_ICU_IRQ14,DTCE_ICU_IRQ15, -DTCE_AD0_ADI0=98, -DTCE_S12AD0_S12ADI0=102, -DTCE_TPU0_TGI0A=126,DTCE_TPU0_TGI0B,DTCE_TPU0_TGI0C,DTCE_TPU0_TGI0D, -DTCE_TPU1_TGI1A,DTCE_TPU1_TGI1B, -DTCE_TPU2_TGI2A,DTCE_TPU2_TGI2B, -DTCE_TPU3_TGI3A,DTCE_TPU3_TGI3B,DTCE_TPU3_TGI3C,DTCE_TPU3_TGI3D, -DTCE_TPU4_TGI4A,DTCE_TPU4_TGI4B, -DTCE_TPU5_TGI5A,DTCE_TPU5_TGI5B, -DTCE_TPU6_TGI6A,DTCE_TPU6_TGI6B,DTCE_TPU6_TGI6C,DTCE_TPU6_TGI6D, -DTCE_MTU0_TGIA0=142,DTCE_MTU0_TGIB0,DTCE_MTU0_TGIC0,DTCE_MTU0_TGID0, -DTCE_TPU7_TGI7A=148,DTCE_TPU7_TGI7B, -DTCE_MTU1_TGIA1=148,DTCE_MTU1_TGIB1, -DTCE_TPU8_TGI8A,DTCE_TPU8_TGI8B, -DTCE_MTU2_TGIA2=150,DTCE_MTU2_TGIB2, -DTCE_TPU9_TGI9A,DTCE_TPU9_TGI9B,DTCE_TPU9_TGI9C,DTCE_TPU9_TGI9D, -DTCE_MTU3_TGIA3=152,DTCE_MTU3_TGIB3,DTCE_MTU3_TGIC3,DTCE_MTU3_TGID3, -DTCE_TPU10_TGI10A,DTCE_TPU10_TGI10B, -DTCE_MTU4_TGIA4=156,DTCE_MTU4_TGIB4,DTCE_MTU4_TGIC4,DTCE_MTU4_TGID4,DTCE_MTU4_TCIV4, -DTCE_MTU5_TGIU5,DTCE_MTU5_TGIV5,DTCE_MTU5_TGIW5, -DTCE_TPU11_TGI11A,DTCE_TPU11_TGI11B, -DTCE_TMR0_CMIA0=170,DTCE_TMR0_CMIB0, -DTCE_TMR1_CMIA1=173,DTCE_TMR1_CMIB1, -DTCE_TMR2_CMIA2=176,DTCE_TMR2_CMIB2, -DTCE_TMR3_CMIA3=179,DTCE_TMR3_CMIB3, -DTCE_RIIC0_RXI0=183,DTCE_RIIC0_TXI0, -DTCE_RIIC1_RXI1=187,DTCE_RIIC1_TXI1, -DTCE_RIIC2_RXI2=191,DTCE_RIIC2_TXI2, -DTCE_RIIC3_RXI3=195,DTCE_RIIC3_TXI3, -DTCE_DMAC_DMAC0I=198,DTCE_DMAC_DMAC1I,DTCE_DMAC_DMAC2I,DTCE_DMAC_DMAC3I, -DTCE_EXDMAC_EXDMAC0I,DTCE_EXDMAC_EXDMAC1I, -DTCE_SCI0_RXI0=214,DTCE_SCI0_TXI0, -DTCE_SCI1_RXI1=217,DTCE_SCI1_TXI1, -DTCE_SCI2_RXI2=220,DTCE_SCI2_TXI2, -DTCE_SCI3_RXI3=223,DTCE_SCI3_TXI3, -DTCE_SCI4_RXI4=226,DTCE_SCI4_TXI4, -DTCE_SCI5_RXI5=229,DTCE_SCI5_TXI5, -DTCE_SCI6_RXI6=232,DTCE_SCI6_TXI6, -DTCE_SCI7_RXI7=235,DTCE_SCI7_TXI7, -DTCE_SCI8_RXI8=238,DTCE_SCI8_TXI8, -DTCE_SCI9_RXI9=241,DTCE_SCI9_TXI9, -DTCE_SCI10_RXI10=244,DTCE_SCI10_TXI10, -DTCE_SCI11_RXI11=247,DTCE_SCI11_TXI11, -DTCE_SCI12_RXI12=250,DTCE_SCI12_TXI12 -}; - -enum enum_ier { -IER_BSC_BUSERR=0x02, -IER_FCU_FIFERR=0x02,IER_FCU_FRDYI=0x02, -IER_ICU_SWINT=0x03, -IER_CMT0_CMI0=0x03, -IER_CMT1_CMI1=0x03, -IER_CMT2_CMI2=0x03, -IER_CMT3_CMI3=0x03, -IER_ETHER_EINT=0x04, -IER_USB0_D0FIFO0=0x04,IER_USB0_D1FIFO0=0x04,IER_USB0_USBI0=0x04, -IER_USB1_D0FIFO1=0x04,IER_USB1_D1FIFO1=0x04,IER_USB1_USBI1=0x04, -IER_RSPI0_SPRI0=0x04,IER_RSPI0_SPTI0=0x05,IER_RSPI0_SPII0=0x05, -IER_RSPI1_SPRI1=0x05,IER_RSPI1_SPTI1=0x05,IER_RSPI1_SPII1=0x05, -IER_RSPI2_SPRI2=0x05,IER_RSPI2_SPTI2=0x05,IER_RSPI2_SPII2=0x05, -IER_CAN0_RXF0=0x06,IER_CAN0_TXF0=0x06,IER_CAN0_RXM0=0x06,IER_CAN0_TXM0=0x06, -IER_CAN1_RXF1=0x06,IER_CAN1_TXF1=0x06,IER_CAN1_RXM1=0x06,IER_CAN1_TXM1=0x06, -IER_CAN2_RXF2=0x07,IER_CAN2_TXF2=0x07,IER_CAN2_RXM2=0x07,IER_CAN2_TXM2=0x07, -IER_RTC_COUNTUP=0x07, -IER_ICU_IRQ0=0x08,IER_ICU_IRQ1=0x08,IER_ICU_IRQ2=0x08,IER_ICU_IRQ3=0x08,IER_ICU_IRQ4=0x08,IER_ICU_IRQ5=0x08,IER_ICU_IRQ6=0x08,IER_ICU_IRQ7=0x08,IER_ICU_IRQ8=0x09,IER_ICU_IRQ9=0x09,IER_ICU_IRQ10=0x09,IER_ICU_IRQ11=0x09,IER_ICU_IRQ12=0x09,IER_ICU_IRQ13=0x09,IER_ICU_IRQ14=0x09,IER_ICU_IRQ15=0x09, -IER_USB_USBR0=0x0B,IER_USB_USBR1=0x0B, -IER_RTC_ALARM=0x0B,IER_RTC_PRD=0x0B, -IER_AD0_ADI0=0x0C, -IER_S12AD0_S12ADI0=0x0C, -IER_ICU_GROUPE0=0x0D,IER_ICU_GROUPE1=0x0D,IER_ICU_GROUPE2=0x0D,IER_ICU_GROUPE3=0x0D,IER_ICU_GROUPE4=0x0D,IER_ICU_GROUPE5=0x0D,IER_ICU_GROUPE6=0x0E,IER_ICU_GROUPL0=0x0E, -IER_SCIX_SCIX0=0x0F,IER_SCIX_SCIX1=0x0F,IER_SCIX_SCIX2=0x0F,IER_SCIX_SCIX3=0x0F, -IER_TPU0_TGI0A=0x0F,IER_TPU0_TGI0B=0x0F,IER_TPU0_TGI0C=0x10,IER_TPU0_TGI0D=0x10, -IER_TPU1_TGI1A=0x10,IER_TPU1_TGI1B=0x10, -IER_TPU2_TGI2A=0x10,IER_TPU2_TGI2B=0x10, -IER_TPU3_TGI3A=0x10,IER_TPU3_TGI3B=0x10,IER_TPU3_TGI3C=0x11,IER_TPU3_TGI3D=0x11, -IER_TPU4_TGI4A=0x11,IER_TPU4_TGI4B=0x11, -IER_TPU5_TGI5A=0x11,IER_TPU5_TGI5B=0x11, -IER_TPU6_TGI6A=0x11,IER_TPU6_TGI6B=0x11,IER_TPU6_TGI6C=0x12,IER_TPU6_TGI6D=0x12, -IER_MTU0_TGIA0=0x11,IER_MTU0_TGIB0=0x11,IER_MTU0_TGIC0=0x12,IER_MTU0_TGID0=0x12,IER_MTU0_TGIE0=0x12,IER_MTU0_TGIF0=0x12, -IER_TPU7_TGI7A=0x12,IER_TPU7_TGI7B=0x12, -IER_MTU1_TGIA1=0x12,IER_MTU1_TGIB1=0x12, -IER_TPU8_TGI8A=0x12,IER_TPU8_TGI8B=0x12, -IER_MTU2_TGIA2=0x12,IER_MTU2_TGIB2=0x12, -IER_TPU9_TGI9A=0x13,IER_TPU9_TGI9B=0x13,IER_TPU9_TGI9C=0x13,IER_TPU9_TGI9D=0x13, -IER_MTU3_TGIA3=0x13,IER_MTU3_TGIB3=0x13,IER_MTU3_TGIC3=0x13,IER_MTU3_TGID3=0x13, -IER_TPU10_TGI10A=0x13,IER_TPU10_TGI10B=0x13, -IER_MTU4_TGIA4=0x13,IER_MTU4_TGIB4=0x13,IER_MTU4_TGIC4=0x13,IER_MTU4_TGID4=0x13,IER_MTU4_TCIV4=0x14, -IER_MTU5_TGIU5=0x14,IER_MTU5_TGIV5=0x14,IER_MTU5_TGIW5=0x14, -IER_TPU11_TGI11A=0x14,IER_TPU11_TGI11B=0x14, -IER_POE_OEI1=0x14,IER_POE_OEI2=0x14, -IER_TMR0_CMIA0=0x15,IER_TMR0_CMIB0=0x15,IER_TMR0_OVI0=0x15, -IER_TMR1_CMIA1=0x15,IER_TMR1_CMIB1=0x15,IER_TMR1_OVI1=0x15, -IER_TMR2_CMIA2=0x16,IER_TMR2_CMIB2=0x16,IER_TMR2_OVI2=0x16, -IER_TMR3_CMIA3=0x16,IER_TMR3_CMIB3=0x16,IER_TMR3_OVI3=0x16, -IER_RIIC0_EEI0=0x16,IER_RIIC0_RXI0=0x16,IER_RIIC0_TXI0=0x17,IER_RIIC0_TEI0=0x17, -IER_RIIC1_EEI1=0x17,IER_RIIC1_RXI1=0x17,IER_RIIC1_TXI1=0x17,IER_RIIC1_TEI1=0x17, -IER_RIIC2_EEI2=0x17,IER_RIIC2_RXI2=0x17,IER_RIIC2_TXI2=0x18,IER_RIIC2_TEI2=0x18, -IER_RIIC3_EEI3=0x18,IER_RIIC3_RXI3=0x18,IER_RIIC3_TXI3=0x18,IER_RIIC3_TEI3=0x18, -IER_DMAC_DMAC0I=0x18,IER_DMAC_DMAC1I=0x18,IER_DMAC_DMAC2I=0x19,IER_DMAC_DMAC3I=0x19, -IER_EXDMAC_EXDMAC0I=0x19,IER_EXDMAC_EXDMAC1I=0x19, -IER_SCI0_RXI0=0x1A,IER_SCI0_TXI0=0x1A,IER_SCI0_TEI0=0x1B, -IER_SCI1_RXI1=0x1B,IER_SCI1_TXI1=0x1B,IER_SCI1_TEI1=0x1B, -IER_SCI2_RXI2=0x1B,IER_SCI2_TXI2=0x1B,IER_SCI2_TEI2=0x1B, -IER_SCI3_RXI3=0x1B,IER_SCI3_TXI3=0x1C,IER_SCI3_TEI3=0x1C, -IER_SCI4_RXI4=0x1C,IER_SCI4_TXI4=0x1C,IER_SCI4_TEI4=0x1C, -IER_SCI5_RXI5=0x1C,IER_SCI5_TXI5=0x1C,IER_SCI5_TEI5=0x1C, -IER_SCI6_RXI6=0x1D,IER_SCI6_TXI6=0x1D,IER_SCI6_TEI6=0x1D, -IER_SCI7_RXI7=0x1D,IER_SCI7_TXI7=0x1D,IER_SCI7_TEI7=0x1D, -IER_SCI8_RXI8=0x1D,IER_SCI8_TXI8=0x1D,IER_SCI8_TEI8=0x1E, -IER_SCI9_RXI9=0x1E,IER_SCI9_TXI9=0x1E,IER_SCI9_TEI9=0x1E, -IER_SCI10_RXI10=0x1E,IER_SCI10_TXI10=0x1E,IER_SCI10_TEI10=0x1E, -IER_SCI11_RXI11=0x1E,IER_SCI11_TXI11=0x1F,IER_SCI11_TEI11=0x1F, -IER_SCI12_RXI12=0x1F,IER_SCI12_TXI12=0x1F,IER_SCI12_TEI12=0x1F, -IER_IEB_IEBINT=0x1F -}; - -enum enum_ipr { -IPR_BSC_BUSERR=0, -IPR_FCU_FIFERR=1,IPR_FCU_FRDYI=2, -IPR_ICU_SWINT=3, -IPR_CMT0_CMI0=4, -IPR_CMT1_CMI1=5, -IPR_CMT2_CMI2=6, -IPR_CMT3_CMI3=7, -IPR_ETHER_EINT=32, -IPR_USB0_D0FIFO0=33,IPR_USB0_D1FIFO0=34,IPR_USB0_USBI0=35, -IPR_USB1_D0FIFO1=36,IPR_USB1_D1FIFO1=37,IPR_USB1_USBI1=38, -IPR_RSPI0_SPRI0=39,IPR_RSPI0_SPTI0=39,IPR_RSPI0_SPII0=39, -IPR_RSPI1_SPRI1=42,IPR_RSPI1_SPTI1=42,IPR_RSPI1_SPII1=42, -IPR_RSPI2_SPRI2=45,IPR_RSPI2_SPTI2=45,IPR_RSPI2_SPII2=45, -IPR_CAN0_RXF0=48,IPR_CAN0_TXF0=48,IPR_CAN0_RXM0=48,IPR_CAN0_TXM0=48, -IPR_CAN1_RXF1=52,IPR_CAN1_TXF1=52,IPR_CAN1_RXM1=52,IPR_CAN1_TXM1=52, -IPR_CAN2_RXF2=56,IPR_CAN2_TXF2=56,IPR_CAN2_RXM2=56,IPR_CAN2_TXM2=56, -IPR_RTC_COUNTUP=62, -IPR_ICU_IRQ0=64,IPR_ICU_IRQ1=65,IPR_ICU_IRQ2=66,IPR_ICU_IRQ3=67,IPR_ICU_IRQ4=68,IPR_ICU_IRQ5=69,IPR_ICU_IRQ6=70,IPR_ICU_IRQ7=71,IPR_ICU_IRQ8=72,IPR_ICU_IRQ9=73,IPR_ICU_IRQ10=74,IPR_ICU_IRQ11=75,IPR_ICU_IRQ12=76,IPR_ICU_IRQ13=77,IPR_ICU_IRQ14=78,IPR_ICU_IRQ15=79, -IPR_USB_USBR0=90,IPR_USB_USBR1=91, -IPR_RTC_ALARM=92,IPR_RTC_PRD=93, -IPR_AD0_ADI0=98, -IPR_S12AD0_S12ADI0=102, -IPR_ICU_GROUPE0=106,IPR_ICU_GROUPE1=107,IPR_ICU_GROUPE2=108,IPR_ICU_GROUPE3=109,IPR_ICU_GROUPE4=110,IPR_ICU_GROUPE5=111,IPR_ICU_GROUPE6=112,IPR_ICU_GROUPL0=114, -IPR_SCIX_SCIX0=122,IPR_SCIX_SCIX1=122,IPR_SCIX_SCIX2=122,IPR_SCIX_SCIX3=122, -IPR_TPU0_TGI0A=126,IPR_TPU0_TGI0B=126,IPR_TPU0_TGI0C=126,IPR_TPU0_TGI0D=126, -IPR_TPU1_TGI1A=130,IPR_TPU1_TGI1B=130, -IPR_TPU2_TGI2A=132,IPR_TPU2_TGI2B=132, -IPR_TPU3_TGI3A=134,IPR_TPU3_TGI3B=134,IPR_TPU3_TGI3C=134,IPR_TPU3_TGI3D=134, -IPR_TPU4_TGI4A=138,IPR_TPU4_TGI4B=138, -IPR_TPU5_TGI5A=140,IPR_TPU5_TGI5B=140, -IPR_TPU6_TGI6A=142,IPR_TPU6_TGI6B=142,IPR_TPU6_TGI6C=142,IPR_TPU6_TGI6D=142, -IPR_MTU0_TGIA0=142,IPR_MTU0_TGIB0=142,IPR_MTU0_TGIC0=142,IPR_MTU0_TGID0=142,IPR_MTU0_TGIE0=146,IPR_MTU0_TGIF0=146, -IPR_TPU7_TGI7A=148,IPR_TPU7_TGI7B=148, -IPR_MTU1_TGIA1=148,IPR_MTU1_TGIB1=148, -IPR_TPU8_TGI8A=150,IPR_TPU8_TGI8B=150, -IPR_MTU2_TGIA2=150,IPR_MTU2_TGIB2=150, -IPR_TPU9_TGI9A=152,IPR_TPU9_TGI9B=152,IPR_TPU9_TGI9C=152,IPR_TPU9_TGI9D=152, -IPR_MTU3_TGIA3=152,IPR_MTU3_TGIB3=152,IPR_MTU3_TGIC3=152,IPR_MTU3_TGID3=152, -IPR_TPU10_TGI10A=156,IPR_TPU10_TGI10B=156, -IPR_MTU4_TGIA4=156,IPR_MTU4_TGIB4=156,IPR_MTU4_TGIC4=156,IPR_MTU4_TGID4=156,IPR_MTU4_TCIV4=160, -IPR_MTU5_TGIU5=161,IPR_MTU5_TGIV5=161,IPR_MTU5_TGIW5=161, -IPR_TPU11_TGI11A=164,IPR_TPU11_TGI11B=164, -IPR_POE_OEI1=166,IPR_POE_OEI2=166, -IPR_TMR0_CMIA0=170,IPR_TMR0_CMIB0=170,IPR_TMR0_OVI0=170, -IPR_TMR1_CMIA1=173,IPR_TMR1_CMIB1=173,IPR_TMR1_OVI1=173, -IPR_TMR2_CMIA2=176,IPR_TMR2_CMIB2=176,IPR_TMR2_OVI2=176, -IPR_TMR3_CMIA3=179,IPR_TMR3_CMIB3=179,IPR_TMR3_OVI3=179, -IPR_RIIC0_EEI0=182,IPR_RIIC0_RXI0=183,IPR_RIIC0_TXI0=184,IPR_RIIC0_TEI0=185, -IPR_RIIC1_EEI1=186,IPR_RIIC1_RXI1=187,IPR_RIIC1_TXI1=188,IPR_RIIC1_TEI1=189, -IPR_RIIC2_EEI2=190,IPR_RIIC2_RXI2=191,IPR_RIIC2_TXI2=192,IPR_RIIC2_TEI2=193, -IPR_RIIC3_EEI3=194,IPR_RIIC3_RXI3=195,IPR_RIIC3_TXI3=196,IPR_RIIC3_TEI3=197, -IPR_DMAC_DMAC0I=198,IPR_DMAC_DMAC1I=199,IPR_DMAC_DMAC2I=200,IPR_DMAC_DMAC3I=201, -IPR_EXDMAC_EXDMAC0I=202,IPR_EXDMAC_EXDMAC1I=203, -IPR_SCI0_RXI0=214,IPR_SCI0_TXI0=214,IPR_SCI0_TEI0=214, -IPR_SCI1_RXI1=217,IPR_SCI1_TXI1=217,IPR_SCI1_TEI1=217, -IPR_SCI2_RXI2=220,IPR_SCI2_TXI2=220,IPR_SCI2_TEI2=220, -IPR_SCI3_RXI3=223,IPR_SCI3_TXI3=223,IPR_SCI3_TEI3=223, -IPR_SCI4_RXI4=226,IPR_SCI4_TXI4=226,IPR_SCI4_TEI4=226, -IPR_SCI5_RXI5=229,IPR_SCI5_TXI5=229,IPR_SCI5_TEI5=229, -IPR_SCI6_RXI6=232,IPR_SCI6_TXI6=232,IPR_SCI6_TEI6=232, -IPR_SCI7_RXI7=235,IPR_SCI7_TXI7=235,IPR_SCI7_TEI7=235, -IPR_SCI8_RXI8=238,IPR_SCI8_TXI8=238,IPR_SCI8_TEI8=238, -IPR_SCI9_RXI9=241,IPR_SCI9_TXI9=241,IPR_SCI9_TEI9=241, -IPR_SCI10_RXI10=244,IPR_SCI10_TXI10=244,IPR_SCI10_TEI10=244, -IPR_SCI11_RXI11=247,IPR_SCI11_TXI11=247,IPR_SCI11_TEI11=247, -IPR_SCI12_RXI12=250,IPR_SCI12_TXI12=250,IPR_SCI12_TEI12=250, -IPR_IEB_IEBINT=253, -IPR_BSC_=0, -IPR_CMT0_=4, -IPR_CMT1_=5, -IPR_CMT2_=6, -IPR_CMT3_=7, -IPR_ETHER_=32, -IPR_RSPI0_=39, -IPR_RSPI1_=42, -IPR_RSPI2_=45, -IPR_CAN0_=48, -IPR_CAN1_=52, -IPR_CAN2_=56, -IPR_AD0_=98, -IPR_S12AD0_=102, -IPR_SCIX_=122, -IPR_SCIX_SCI=122, -IPR_TPU0_=126, -IPR_TPU0_TGI=126, -IPR_TPU1_=130, -IPR_TPU1_TGI=130, -IPR_TPU2_=132, -IPR_TPU2_TGI=132, -IPR_TPU3_=134, -IPR_TPU3_TGI=134, -IPR_TPU4_=138, -IPR_TPU4_TGI=138, -IPR_TPU5_=140, -IPR_TPU5_TGI=140, -IPR_MTU5_=161, -IPR_MTU5_TGI=161, -IPR_TPU11_=164, -IPR_TPU11_TGI=164, -IPR_POE_=166, -IPR_POE_OEI=166, -IPR_TMR0_=170, -IPR_TMR1_=173, -IPR_TMR2_=176, -IPR_TMR3_=179, -IPR_SCI0_=214, -IPR_SCI1_=217, -IPR_SCI2_=220, -IPR_SCI3_=223, -IPR_SCI4_=226, -IPR_SCI5_=229, -IPR_SCI6_=232, -IPR_SCI7_=235, -IPR_SCI8_=238, -IPR_SCI9_=241, -IPR_SCI10_=244, -IPR_SCI11_=247, -IPR_SCI12_=250, -IPR_IEB_=253 -}; - -enum enum_grp { -GRP_CAN0_ERS0=0,GRP_CAN1_ERS1=0,GRP_CAN2_ERS2=0, -GRP_MTU0_TCIV0=1,GRP_MTU1_TCIV1=1,GRP_MTU1_TCIU1=1, -GRP_MTU2_TCIV2=2,GRP_MTU2_TCIU2=2,GRP_MTU3_TCIV3=2, -GRP_TPU0_TCI0V=3,GRP_TPU1_TCI1V=3,GRP_TPU1_TCI1U=3,GRP_TPU5_TCI5V=3,GRP_TPU5_TCI5U=3, -GRP_TPU2_TCI2V=4,GRP_TPU2_TCI2U=4,GRP_TPU3_TCI3V=4,GRP_TPU4_TCI4V=4,GRP_TPU4_TCI4U=4, -GRP_TPU6_TCI6V=5,GRP_TPU7_TCI7V=5,GRP_TPU7_TCI7U=5,GRP_TPU11_TCI11V=5,GRP_TPU11_TCI11U=5, -GRP_TPU8_TCI8V=6,GRP_TPU8_TCI8U=6,GRP_TPU9_TCI9V=6,GRP_TPU10_TCI10V=6,GRP_TPU10_TCI10U=6, -GRP_SCI0_ERI0=12,GRP_SCI1_ERI1=12,GRP_SCI2_ERI2=12,GRP_SCI3_ERI3=12,GRP_SCI4_ERI4=12,GRP_SCI5_ERI5=12,GRP_SCI6_ERI6=12, -GRP_SCI7_ERI7=12,GRP_SCI8_ERI8=12,GRP_SCI9_ERI9=12,GRP_SCI10_ERI10=12,GRP_SCI11_ERI11=12,GRP_SCI12_ERI12=12, -GRP_RSPI0_SPEI0=12,GRP_RSPI1_SPEI1=12,GRP_RSPI2_SPEI2=12 -}; - -enum enum_gen { -GEN_CAN0_ERS0=0,GEN_CAN1_ERS1=0,GEN_CAN2_ERS2=0, -GEN_MTU0_TCIV0=1,GEN_MTU1_TCIV1=1,GEN_MTU1_TCIU1=1, -GEN_MTU2_TCIV2=2,GEN_MTU2_TCIU2=2,GEN_MTU3_TCIV3=2, -GEN_TPU0_TCI0V=3,GEN_TPU1_TCI1V=3,GEN_TPU1_TCI1U=3,GEN_TPU5_TCI5V=3,GEN_TPU5_TCI5U=3, -GEN_TPU2_TCI2V=4,GEN_TPU2_TCI2U=4,GEN_TPU3_TCI3V=4,GEN_TPU4_TCI4V=4,GEN_TPU4_TCI4U=4, -GEN_TPU6_TCI6V=5,GEN_TPU7_TCI7V=5,GEN_TPU7_TCI7U=5,GEN_TPU11_TCI11V=5,GEN_TPU11_TCI11U=5, -GEN_TPU8_TCI8V=6,GEN_TPU8_TCI8U=6,GEN_TPU9_TCI9V=6,GEN_TPU10_TCI10V=6,GEN_TPU10_TCI10U=6, -GEN_SCI0_ERI0=12,GEN_SCI1_ERI1=12,GEN_SCI2_ERI2=12,GEN_SCI3_ERI3=12,GEN_SCI4_ERI4=12,GEN_SCI5_ERI5=12,GEN_SCI6_ERI6=12, -GEN_SCI7_ERI7=12,GEN_SCI8_ERI8=12,GEN_SCI9_ERI9=12,GEN_SCI10_ERI10=12,GEN_SCI11_ERI11=12,GEN_SCI12_ERI12=12, -GEN_RSPI0_SPEI0=12,GEN_RSPI1_SPEI1=12,GEN_RSPI2_SPEI2=12 -}; - -enum enum_gcr { -GCR_CAN0_ERS0=0,GCR_CAN1_ERS1=0,GCR_CAN2_ERS2=0, -GCR_MTU0_TCIV0=1,GCR_MTU1_TCIV1=1,GCR_MTU1_TCIU1=1, -GCR_MTU2_TCIV2=2,GCR_MTU2_TCIU2=2,GCR_MTU3_TCIV3=2, -GCR_TPU0_TCI0V=3,GCR_TPU1_TCI1V=3,GCR_TPU1_TCI1U=3,GCR_TPU5_TCI5V=3,GCR_TPU5_TCI5U=3, -GCR_TPU2_TCI2V=4,GCR_TPU2_TCI2U=4,GCR_TPU3_TCI3V=4,GCR_TPU4_TCI4V=4,GCR_TPU4_TCI4U=4, -GCR_TPU6_TCI6V=5,GCR_TPU7_TCI7V=5,GCR_TPU7_TCI7U=5,GCR_TPU11_TCI11V=5,GCR_TPU11_TCI11U=5, -GCR_TPU8_TCI8V=6,GCR_TPU8_TCI8U=6,GCR_TPU9_TCI9V=6,GCR_TPU10_TCI10V=6,GCR_TPU10_TCI10U=6, -GCR_SCI0_ERI0=12,GCR_SCI1_ERI1=12,GCR_SCI2_ERI2=12,GCR_SCI3_ERI3=12,GCR_SCI4_ERI4=12,GCR_SCI5_ERI5=12,GCR_SCI6_ERI6=12, -GCR_SCI7_ERI7=12,GCR_SCI8_ERI8=12,GCR_SCI9_ERI9=12,GCR_SCI10_ERI10=12,GCR_SCI11_ERI11=12,GCR_SCI12_ERI12=12, -GCR_RSPI0_SPEI0=12,GCR_RSPI1_SPEI1=12,GCR_RSPI2_SPEI2=12 -}; - -#define IEN_BSC_BUSERR IEN0 -#define IEN_FCU_FIFERR IEN5 -#define IEN_FCU_FRDYI IEN7 -#define IEN_ICU_SWINT IEN3 -#define IEN_CMT0_CMI0 IEN4 -#define IEN_CMT1_CMI1 IEN5 -#define IEN_CMT2_CMI2 IEN6 -#define IEN_CMT3_CMI3 IEN7 -#define IEN_ETHER_EINT IEN0 -#define IEN_USB0_D0FIFO0 IEN1 -#define IEN_USB0_D1FIFO0 IEN2 -#define IEN_USB0_USBI0 IEN3 -#define IEN_USB1_D0FIFO1 IEN4 -#define IEN_USB1_D1FIFO1 IEN5 -#define IEN_USB1_USBI1 IEN6 -#define IEN_RSPI0_SPRI0 IEN7 -#define IEN_RSPI0_SPTI0 IEN0 -#define IEN_RSPI0_SPII0 IEN1 -#define IEN_RSPI1_SPRI1 IEN2 -#define IEN_RSPI1_SPTI1 IEN3 -#define IEN_RSPI1_SPII1 IEN4 -#define IEN_RSPI2_SPRI2 IEN5 -#define IEN_RSPI2_SPTI2 IEN6 -#define IEN_RSPI2_SPII2 IEN7 -#define IEN_CAN0_RXF0 IEN0 -#define IEN_CAN0_TXF0 IEN1 -#define IEN_CAN0_RXM0 IEN2 -#define IEN_CAN0_TXM0 IEN3 -#define IEN_CAN1_RXF1 IEN4 -#define IEN_CAN1_TXF1 IEN5 -#define IEN_CAN1_RXM1 IEN6 -#define IEN_CAN1_TXM1 IEN7 -#define IEN_CAN2_RXF2 IEN0 -#define IEN_CAN2_TXF2 IEN1 -#define IEN_CAN2_RXM2 IEN2 -#define IEN_CAN2_TXM2 IEN3 -#define IEN_RTC_COUNTUP IEN6 -#define IEN_ICU_IRQ0 IEN0 -#define IEN_ICU_IRQ1 IEN1 -#define IEN_ICU_IRQ2 IEN2 -#define IEN_ICU_IRQ3 IEN3 -#define IEN_ICU_IRQ4 IEN4 -#define IEN_ICU_IRQ5 IEN5 -#define IEN_ICU_IRQ6 IEN6 -#define IEN_ICU_IRQ7 IEN7 -#define IEN_ICU_IRQ8 IEN0 -#define IEN_ICU_IRQ9 IEN1 -#define IEN_ICU_IRQ10 IEN2 -#define IEN_ICU_IRQ11 IEN3 -#define IEN_ICU_IRQ12 IEN4 -#define IEN_ICU_IRQ13 IEN5 -#define IEN_ICU_IRQ14 IEN6 -#define IEN_ICU_IRQ15 IEN7 -#define IEN_USB_USBR0 IEN2 -#define IEN_USB_USBR1 IEN3 -#define IEN_RTC_ALARM IEN4 -#define IEN_RTC_PRD IEN5 -#define IEN_AD0_ADI0 IEN2 -#define IEN_S12AD0_S12ADI0 IEN6 -#define IEN_ICU_GROUPE0 IEN2 -#define IEN_ICU_GROUPE1 IEN3 -#define IEN_ICU_GROUPE2 IEN4 -#define IEN_ICU_GROUPE3 IEN5 -#define IEN_ICU_GROUPE4 IEN6 -#define IEN_ICU_GROUPE5 IEN7 -#define IEN_ICU_GROUPE6 IEN0 -#define IEN_ICU_GROUPL0 IEN2 -#define IEN_SCIX_SCIX0 IEN2 -#define IEN_SCIX_SCIX1 IEN3 -#define IEN_SCIX_SCIX2 IEN4 -#define IEN_SCIX_SCIX3 IEN5 -#define IEN_TPU0_TGI0A IEN6 -#define IEN_TPU0_TGI0B IEN7 -#define IEN_TPU0_TGI0C IEN0 -#define IEN_TPU0_TGI0D IEN1 -#define IEN_TPU1_TGI1A IEN2 -#define IEN_TPU1_TGI1B IEN3 -#define IEN_TPU2_TGI2A IEN4 -#define IEN_TPU2_TGI2B IEN5 -#define IEN_TPU3_TGI3A IEN6 -#define IEN_TPU3_TGI3B IEN7 -#define IEN_TPU3_TGI3C IEN0 -#define IEN_TPU3_TGI3D IEN1 -#define IEN_TPU4_TGI4A IEN2 -#define IEN_TPU4_TGI4B IEN3 -#define IEN_TPU5_TGI5A IEN4 -#define IEN_TPU5_TGI5B IEN5 -#define IEN_TPU6_TGI6A IEN6 -#define IEN_TPU6_TGI6B IEN7 -#define IEN_TPU6_TGI6C IEN0 -#define IEN_TPU6_TGI6D IEN1 -#define IEN_MTU0_TGIA0 IEN6 -#define IEN_MTU0_TGIB0 IEN7 -#define IEN_MTU0_TGIC0 IEN0 -#define IEN_MTU0_TGID0 IEN1 -#define IEN_MTU0_TGIE0 IEN2 -#define IEN_MTU0_TGIF0 IEN3 -#define IEN_TPU7_TGI7A IEN4 -#define IEN_TPU7_TGI7B IEN5 -#define IEN_MTU1_TGIA1 IEN4 -#define IEN_MTU1_TGIB1 IEN5 -#define IEN_TPU8_TGI8A IEN6 -#define IEN_TPU8_TGI8B IEN7 -#define IEN_MTU2_TGIA2 IEN6 -#define IEN_MTU2_TGIB2 IEN7 -#define IEN_TPU9_TGI9A IEN0 -#define IEN_TPU9_TGI9B IEN1 -#define IEN_TPU9_TGI9C IEN2 -#define IEN_TPU9_TGI9D IEN3 -#define IEN_MTU3_TGIA3 IEN0 -#define IEN_MTU3_TGIB3 IEN1 -#define IEN_MTU3_TGIC3 IEN2 -#define IEN_MTU3_TGID3 IEN3 -#define IEN_TPU10_TGI10A IEN4 -#define IEN_TPU10_TGI10B IEN5 -#define IEN_MTU4_TGIA4 IEN4 -#define IEN_MTU4_TGIB4 IEN5 -#define IEN_MTU4_TGIC4 IEN6 -#define IEN_MTU4_TGID4 IEN7 -#define IEN_MTU4_TCIV4 IEN0 -#define IEN_MTU5_TGIU5 IEN1 -#define IEN_MTU5_TGIV5 IEN2 -#define IEN_MTU5_TGIW5 IEN3 -#define IEN_TPU11_TGI11A IEN4 -#define IEN_TPU11_TGI11B IEN5 -#define IEN_POE_OEI1 IEN6 -#define IEN_POE_OEI2 IEN7 -#define IEN_TMR0_CMIA0 IEN2 -#define IEN_TMR0_CMIB0 IEN3 -#define IEN_TMR0_OVI0 IEN4 -#define IEN_TMR1_CMIA1 IEN5 -#define IEN_TMR1_CMIB1 IEN6 -#define IEN_TMR1_OVI1 IEN7 -#define IEN_TMR2_CMIA2 IEN0 -#define IEN_TMR2_CMIB2 IEN1 -#define IEN_TMR2_OVI2 IEN2 -#define IEN_TMR3_CMIA3 IEN3 -#define IEN_TMR3_CMIB3 IEN4 -#define IEN_TMR3_OVI3 IEN5 -#define IEN_RIIC0_EEI0 IEN6 -#define IEN_RIIC0_RXI0 IEN7 -#define IEN_RIIC0_TXI0 IEN0 -#define IEN_RIIC0_TEI0 IEN1 -#define IEN_RIIC1_EEI1 IEN2 -#define IEN_RIIC1_RXI1 IEN3 -#define IEN_RIIC1_TXI1 IEN4 -#define IEN_RIIC1_TEI1 IEN5 -#define IEN_RIIC2_EEI2 IEN6 -#define IEN_RIIC2_RXI2 IEN7 -#define IEN_RIIC2_TXI2 IEN0 -#define IEN_RIIC2_TEI2 IEN1 -#define IEN_RIIC3_EEI3 IEN2 -#define IEN_RIIC3_RXI3 IEN3 -#define IEN_RIIC3_TXI3 IEN4 -#define IEN_RIIC3_TEI3 IEN5 -#define IEN_DMAC_DMAC0I IEN6 -#define IEN_DMAC_DMAC1I IEN7 -#define IEN_DMAC_DMAC2I IEN0 -#define IEN_DMAC_DMAC3I IEN1 -#define IEN_EXDMAC_EXDMAC0I IEN2 -#define IEN_EXDMAC_EXDMAC1I IEN3 -#define IEN_SCI0_RXI0 IEN6 -#define IEN_SCI0_TXI0 IEN7 -#define IEN_SCI0_TEI0 IEN0 -#define IEN_SCI1_RXI1 IEN1 -#define IEN_SCI1_TXI1 IEN2 -#define IEN_SCI1_TEI1 IEN3 -#define IEN_SCI2_RXI2 IEN4 -#define IEN_SCI2_TXI2 IEN5 -#define IEN_SCI2_TEI2 IEN6 -#define IEN_SCI3_RXI3 IEN7 -#define IEN_SCI3_TXI3 IEN0 -#define IEN_SCI3_TEI3 IEN1 -#define IEN_SCI4_RXI4 IEN2 -#define IEN_SCI4_TXI4 IEN3 -#define IEN_SCI4_TEI4 IEN4 -#define IEN_SCI5_RXI5 IEN5 -#define IEN_SCI5_TXI5 IEN6 -#define IEN_SCI5_TEI5 IEN7 -#define IEN_SCI6_RXI6 IEN0 -#define IEN_SCI6_TXI6 IEN1 -#define IEN_SCI6_TEI6 IEN2 -#define IEN_SCI7_RXI7 IEN3 -#define IEN_SCI7_TXI7 IEN4 -#define IEN_SCI7_TEI7 IEN5 -#define IEN_SCI8_RXI8 IEN6 -#define IEN_SCI8_TXI8 IEN7 -#define IEN_SCI8_TEI8 IEN0 -#define IEN_SCI9_RXI9 IEN1 -#define IEN_SCI9_TXI9 IEN2 -#define IEN_SCI9_TEI9 IEN3 -#define IEN_SCI10_RXI10 IEN4 -#define IEN_SCI10_TXI10 IEN5 -#define IEN_SCI10_TEI10 IEN6 -#define IEN_SCI11_RXI11 IEN7 -#define IEN_SCI11_TXI11 IEN0 -#define IEN_SCI11_TEI11 IEN1 -#define IEN_SCI12_RXI12 IEN2 -#define IEN_SCI12_TXI12 IEN3 -#define IEN_SCI12_TEI12 IEN4 -#define IEN_IEB_IEBINT IEN5 - -#define VECT_BSC_BUSERR 16 -#define VECT_FCU_FIFERR 21 -#define VECT_FCU_FRDYI 23 -#define VECT_ICU_SWINT 27 -#define VECT_CMT0_CMI0 28 -#define VECT_CMT1_CMI1 29 -#define VECT_CMT2_CMI2 30 -#define VECT_CMT3_CMI3 31 -#define VECT_ETHER_EINT 32 -#define VECT_USB0_D0FIFO0 33 -#define VECT_USB0_D1FIFO0 34 -#define VECT_USB0_USBI0 35 -#define VECT_USB1_D0FIFO1 36 -#define VECT_USB1_D1FIFO1 37 -#define VECT_USB1_USBI1 38 -#define VECT_RSPI0_SPRI0 39 -#define VECT_RSPI0_SPTI0 40 -#define VECT_RSPI0_SPII0 41 -#define VECT_RSPI1_SPRI1 42 -#define VECT_RSPI1_SPTI1 43 -#define VECT_RSPI1_SPII1 44 -#define VECT_RSPI2_SPRI2 45 -#define VECT_RSPI2_SPTI2 46 -#define VECT_RSPI2_SPII2 47 -#define VECT_CAN0_RXF0 48 -#define VECT_CAN0_TXF0 49 -#define VECT_CAN0_RXM0 50 -#define VECT_CAN0_TXM0 51 -#define VECT_CAN1_RXF1 52 -#define VECT_CAN1_TXF1 53 -#define VECT_CAN1_RXM1 54 -#define VECT_CAN1_TXM1 55 -#define VECT_CAN2_RXF2 56 -#define VECT_CAN2_TXF2 57 -#define VECT_CAN2_RXM2 58 -#define VECT_CAN2_TXM2 59 -#define VECT_RTC_COUNTUP 62 -#define VECT_ICU_IRQ0 64 -#define VECT_ICU_IRQ1 65 -#define VECT_ICU_IRQ2 66 -#define VECT_ICU_IRQ3 67 -#define VECT_ICU_IRQ4 68 -#define VECT_ICU_IRQ5 69 -#define VECT_ICU_IRQ6 70 -#define VECT_ICU_IRQ7 71 -#define VECT_ICU_IRQ8 72 -#define VECT_ICU_IRQ9 73 -#define VECT_ICU_IRQ10 74 -#define VECT_ICU_IRQ11 75 -#define VECT_ICU_IRQ12 76 -#define VECT_ICU_IRQ13 77 -#define VECT_ICU_IRQ14 78 -#define VECT_ICU_IRQ15 79 -#define VECT_USB_USBR0 90 -#define VECT_USB_USBR1 91 -#define VECT_RTC_ALARM 92 -#define VECT_RTC_PRD 93 -#define VECT_AD0_ADI0 98 -#define VECT_S12AD0_S12ADI0 102 -#define VECT_ICU_GROUPE0 106 -#define VECT_ICU_GROUPE1 107 -#define VECT_ICU_GROUPE2 108 -#define VECT_ICU_GROUPE3 109 -#define VECT_ICU_GROUPE4 110 -#define VECT_ICU_GROUPE5 111 -#define VECT_ICU_GROUPE6 112 -#define VECT_ICU_GROUPL0 114 -#define VECT_SCIX_SCIX0 122 -#define VECT_SCIX_SCIX1 123 -#define VECT_SCIX_SCIX2 124 -#define VECT_SCIX_SCIX3 125 -#define VECT_TPU0_TGI0A 126 -#define VECT_TPU0_TGI0B 127 -#define VECT_TPU0_TGI0C 128 -#define VECT_TPU0_TGI0D 129 -#define VECT_TPU1_TGI1A 130 -#define VECT_TPU1_TGI1B 131 -#define VECT_TPU2_TGI2A 132 -#define VECT_TPU2_TGI2B 133 -#define VECT_TPU3_TGI3A 134 -#define VECT_TPU3_TGI3B 135 -#define VECT_TPU3_TGI3C 136 -#define VECT_TPU3_TGI3D 137 -#define VECT_TPU4_TGI4A 138 -#define VECT_TPU4_TGI4B 139 -#define VECT_TPU5_TGI5A 140 -#define VECT_TPU5_TGI5B 141 -#define VECT_TPU6_TGI6A 142 -#define VECT_TPU6_TGI6B 143 -#define VECT_TPU6_TGI6C 144 -#define VECT_TPU6_TGI6D 145 -#define VECT_MTU0_TGIA0 142 -#define VECT_MTU0_TGIB0 143 -#define VECT_MTU0_TGIC0 144 -#define VECT_MTU0_TGID0 145 -#define VECT_MTU0_TGIE0 146 -#define VECT_MTU0_TGIF0 147 -#define VECT_TPU7_TGI7A 148 -#define VECT_TPU7_TGI7B 149 -#define VECT_MTU1_TGIA1 148 -#define VECT_MTU1_TGIB1 149 -#define VECT_TPU8_TGI8A 150 -#define VECT_TPU8_TGI8B 151 -#define VECT_MTU2_TGIA2 150 -#define VECT_MTU2_TGIB2 151 -#define VECT_TPU9_TGI9A 152 -#define VECT_TPU9_TGI9B 153 -#define VECT_TPU9_TGI9C 154 -#define VECT_TPU9_TGI9D 155 -#define VECT_MTU3_TGIA3 152 -#define VECT_MTU3_TGIB3 153 -#define VECT_MTU3_TGIC3 154 -#define VECT_MTU3_TGID3 155 -#define VECT_TPU10_TGI10A 156 -#define VECT_TPU10_TGI10B 157 -#define VECT_MTU4_TGIA4 156 -#define VECT_MTU4_TGIB4 157 -#define VECT_MTU4_TGIC4 158 -#define VECT_MTU4_TGID4 159 -#define VECT_MTU4_TCIV4 160 -#define VECT_MTU5_TGIU5 161 -#define VECT_MTU5_TGIV5 162 -#define VECT_MTU5_TGIW5 163 -#define VECT_TPU11_TGI11A 164 -#define VECT_TPU11_TGI11B 165 -#define VECT_POE_OEI1 166 -#define VECT_POE_OEI2 167 -#define VECT_TMR0_CMIA0 170 -#define VECT_TMR0_CMIB0 171 -#define VECT_TMR0_OVI0 172 -#define VECT_TMR1_CMIA1 173 -#define VECT_TMR1_CMIB1 174 -#define VECT_TMR1_OVI1 175 -#define VECT_TMR2_CMIA2 176 -#define VECT_TMR2_CMIB2 177 -#define VECT_TMR2_OVI2 178 -#define VECT_TMR3_CMIA3 179 -#define VECT_TMR3_CMIB3 180 -#define VECT_TMR3_OVI3 181 -#define VECT_RIIC0_EEI0 182 -#define VECT_RIIC0_RXI0 183 -#define VECT_RIIC0_TXI0 184 -#define VECT_RIIC0_TEI0 185 -#define VECT_RIIC1_EEI1 186 -#define VECT_RIIC1_RXI1 187 -#define VECT_RIIC1_TXI1 188 -#define VECT_RIIC1_TEI1 189 -#define VECT_RIIC2_EEI2 190 -#define VECT_RIIC2_RXI2 191 -#define VECT_RIIC2_TXI2 192 -#define VECT_RIIC2_TEI2 193 -#define VECT_RIIC3_EEI3 194 -#define VECT_RIIC3_RXI3 195 -#define VECT_RIIC3_TXI3 196 -#define VECT_RIIC3_TEI3 197 -#define VECT_DMAC_DMAC0I 198 -#define VECT_DMAC_DMAC1I 199 -#define VECT_DMAC_DMAC2I 200 -#define VECT_DMAC_DMAC3I 201 -#define VECT_EXDMAC_EXDMAC0I 202 -#define VECT_EXDMAC_EXDMAC1I 203 -#define VECT_SCI0_RXI0 214 -#define VECT_SCI0_TXI0 215 -#define VECT_SCI0_TEI0 216 -#define VECT_SCI1_RXI1 217 -#define VECT_SCI1_TXI1 218 -#define VECT_SCI1_TEI1 219 -#define VECT_SCI2_RXI2 220 -#define VECT_SCI2_TXI2 221 -#define VECT_SCI2_TEI2 222 -#define VECT_SCI3_RXI3 223 -#define VECT_SCI3_TXI3 224 -#define VECT_SCI3_TEI3 225 -#define VECT_SCI4_RXI4 226 -#define VECT_SCI4_TXI4 227 -#define VECT_SCI4_TEI4 228 -#define VECT_SCI5_RXI5 229 -#define VECT_SCI5_TXI5 230 -#define VECT_SCI5_TEI5 231 -#define VECT_SCI6_RXI6 232 -#define VECT_SCI6_TXI6 233 -#define VECT_SCI6_TEI6 234 -#define VECT_SCI7_RXI7 235 -#define VECT_SCI7_TXI7 236 -#define VECT_SCI7_TEI7 237 -#define VECT_SCI8_RXI8 238 -#define VECT_SCI8_TXI8 239 -#define VECT_SCI8_TEI8 240 -#define VECT_SCI9_RXI9 241 -#define VECT_SCI9_TXI9 242 -#define VECT_SCI9_TEI9 243 -#define VECT_SCI10_RXI10 244 -#define VECT_SCI10_TXI10 245 -#define VECT_SCI10_TEI10 246 -#define VECT_SCI11_RXI11 247 -#define VECT_SCI11_TXI11 248 -#define VECT_SCI11_TEI11 249 -#define VECT_SCI12_RXI12 250 -#define VECT_SCI12_TXI12 251 -#define VECT_SCI12_TEI12 252 -#define VECT_IEB_IEBINT 253 - -#define MSTP_DMAC SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC0 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC1 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC2 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DMAC3 SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_DTC SYSTEM.MSTPCRA.BIT.MSTPA28 -#define MSTP_AD SYSTEM.MSTPCRA.BIT.MSTPA23 -#define MSTP_DA SYSTEM.MSTPCRA.BIT.MSTPA19 -#define MSTP_S12AD SYSTEM.MSTPCRA.BIT.MSTPA17 -#define MSTP_CMT0 SYSTEM.MSTPCRA.BIT.MSTPA15 -#define MSTP_CMT1 SYSTEM.MSTPCRA.BIT.MSTPA15 -#define MSTP_CMT2 SYSTEM.MSTPCRA.BIT.MSTPA14 -#define MSTP_CMT3 SYSTEM.MSTPCRA.BIT.MSTPA14 -#define MSTP_TPU0 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU1 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU2 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU3 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU4 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU5 SYSTEM.MSTPCRA.BIT.MSTPA13 -#define MSTP_TPU6 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU7 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU8 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU9 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU10 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_TPU11 SYSTEM.MSTPCRA.BIT.MSTPA12 -#define MSTP_PPG0 SYSTEM.MSTPCRA.BIT.MSTPA11 -#define MSTP_PPG1 SYSTEM.MSTPCRA.BIT.MSTPA10 -#define MSTP_MTU SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU0 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU1 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU2 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU3 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU4 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_MTU5 SYSTEM.MSTPCRA.BIT.MSTPA9 -#define MSTP_TMR0 SYSTEM.MSTPCRA.BIT.MSTPA5 -#define MSTP_TMR1 SYSTEM.MSTPCRA.BIT.MSTPA5 -#define MSTP_TMR01 SYSTEM.MSTPCRA.BIT.MSTPA5 -#define MSTP_TMR2 SYSTEM.MSTPCRA.BIT.MSTPA4 -#define MSTP_TMR3 SYSTEM.MSTPCRA.BIT.MSTPA4 -#define MSTP_TMR23 SYSTEM.MSTPCRA.BIT.MSTPA4 -#define MSTP_SCI0 SYSTEM.MSTPCRB.BIT.MSTPB31 -#define MSTP_SMCI0 SYSTEM.MSTPCRB.BIT.MSTPB31 -#define MSTP_SCI1 SYSTEM.MSTPCRB.BIT.MSTPB30 -#define MSTP_SMCI1 SYSTEM.MSTPCRB.BIT.MSTPB30 -#define MSTP_SCI2 SYSTEM.MSTPCRB.BIT.MSTPB29 -#define MSTP_SMCI2 SYSTEM.MSTPCRB.BIT.MSTPB29 -#define MSTP_SCI3 SYSTEM.MSTPCRB.BIT.MSTPB28 -#define MSTP_SMCI3 SYSTEM.MSTPCRB.BIT.MSTPB28 -#define MSTP_SCI4 SYSTEM.MSTPCRB.BIT.MSTPB27 -#define MSTP_SMCI4 SYSTEM.MSTPCRB.BIT.MSTPB27 -#define MSTP_SCI5 SYSTEM.MSTPCRB.BIT.MSTPB26 -#define MSTP_SMCI5 SYSTEM.MSTPCRB.BIT.MSTPB26 -#define MSTP_SCI6 SYSTEM.MSTPCRB.BIT.MSTPB25 -#define MSTP_SMCI6 SYSTEM.MSTPCRB.BIT.MSTPB25 -#define MSTP_SCI7 SYSTEM.MSTPCRB.BIT.MSTPB24 -#define MSTP_SMCI7 SYSTEM.MSTPCRB.BIT.MSTPB24 -#define MSTP_CRC SYSTEM.MSTPCRB.BIT.MSTPB23 -#define MSTP_RIIC0 SYSTEM.MSTPCRB.BIT.MSTPB21 -#define MSTP_RIIC1 SYSTEM.MSTPCRB.BIT.MSTPB20 -#define MSTP_USB0 SYSTEM.MSTPCRB.BIT.MSTPB19 -#define MSTP_RSPI0 SYSTEM.MSTPCRB.BIT.MSTPB17 -#define MSTP_RSPI1 SYSTEM.MSTPCRB.BIT.MSTPB16 -#define MSTP_TEMPS SYSTEM.MSTPCRB.BIT.MSTPB8 -#define MSTP_SCI12 SYSTEM.MSTPCRB.BIT.MSTPB4 -#define MSTP_SMCI12 SYSTEM.MSTPCRB.BIT.MSTPB4 -#define MSTP_CAN2 SYSTEM.MSTPCRB.BIT.MSTPB2 -#define MSTP_CAN1 SYSTEM.MSTPCRB.BIT.MSTPB1 -#define MSTP_CAN0 SYSTEM.MSTPCRB.BIT.MSTPB0 -#define MSTP_SCI8 SYSTEM.MSTPCRC.BIT.MSTPC27 -#define MSTP_SMCI8 SYSTEM.MSTPCRC.BIT.MSTPC27 -#define MSTP_SCI9 SYSTEM.MSTPCRC.BIT.MSTPC26 -#define MSTP_SMCI9 SYSTEM.MSTPCRC.BIT.MSTPC26 -#define MSTP_SCI10 SYSTEM.MSTPCRC.BIT.MSTPC25 -#define MSTP_SMCI10 SYSTEM.MSTPCRC.BIT.MSTPC25 -#define MSTP_SCI11 SYSTEM.MSTPCRC.BIT.MSTPC24 -#define MSTP_SMCI11 SYSTEM.MSTPCRC.BIT.MSTPC24 -#define MSTP_RSPI2 SYSTEM.MSTPCRC.BIT.MSTPC22 -#define MSTP_LVD SYSTEM.MSTPCRC.BIT.MSTPC20 -#define MSTP_IEB SYSTEM.MSTPCRC.BIT.MSTPC18 -#define MSTP_RIIC2 SYSTEM.MSTPCRC.BIT.MSTPC17 -#define MSTP_RIIC3 SYSTEM.MSTPCRC.BIT.MSTPC16 -#define MSTP_RAM1 SYSTEM.MSTPCRC.BIT.MSTPC1 -#define MSTP_RAM0 SYSTEM.MSTPCRC.BIT.MSTPC0 - -#define IS_CAN0_ERS0 IS0 -#define IS_CAN1_ERS1 IS1 -#define IS_CAN2_ERS2 IS2 -#define IS_MTU0_TCIV0 IS0 -#define IS_MTU1_TCIV1 IS1 -#define IS_MTU1_TCIU1 IS2 -#define IS_MTU2_TCIV2 IS0 -#define IS_MTU2_TCIU2 IS1 -#define IS_MTU3_TCIV3 IS2 -#define IS_TPU0_TCI0V IS0 -#define IS_TPU1_TCI1V IS1 -#define IS_TPU1_TCI1U IS2 -#define IS_TPU5_TCI5V IS3 -#define IS_TPU5_TCI5U IS4 -#define IS_TPU2_TCI2V IS0 -#define IS_TPU2_TCI2U IS1 -#define IS_TPU3_TCI3V IS2 -#define IS_TPU4_TCI4V IS3 -#define IS_TPU4_TCI4U IS4 -#define IS_TPU6_TCI6V IS0 -#define IS_TPU7_TCI7V IS1 -#define IS_TPU7_TCI7U IS2 -#define IS_TPU11_TCI11V IS3 -#define IS_TPU11_TCI11U IS4 -#define IS_TPU8_TCI8V IS0 -#define IS_TPU8_TCI8U IS1 -#define IS_TPU9_TCI9V IS2 -#define IS_TPU10_TCI10V IS3 -#define IS_TPU10_TCI10U IS4 -#define IS_SCI0_ERI0 IS0 -#define IS_SCI1_ERI1 IS1 -#define IS_SCI2_ERI2 IS2 -#define IS_SCI3_ERI3 IS3 -#define IS_SCI4_ERI4 IS4 -#define IS_SCI5_ERI5 IS5 -#define IS_SCI6_ERI6 IS6 -#define IS_SCI7_ERI7 IS7 -#define IS_SCI8_ERI8 IS8 -#define IS_SCI9_ERI9 IS9 -#define IS_SCI10_ERI10 IS10 -#define IS_SCI11_ERI11 IS11 -#define IS_SCI12_ERI12 IS12 -#define IS_RSPI0_SPEI0 IS13 -#define IS_RSPI1_SPEI1 IS14 -#define IS_RSPI2_SPEI2 IS15 - -#define EN_CAN0_ERS0 EN0 -#define EN_CAN1_ERS1 EN1 -#define EN_CAN2_ERS2 EN2 -#define EN_MTU0_TCIV0 EN0 -#define EN_MTU1_TCIV1 EN1 -#define EN_MTU1_TCIU1 EN2 -#define EN_MTU2_TCIV2 EN0 -#define EN_MTU2_TCIU2 EN1 -#define EN_MTU3_TCIV3 EN2 -#define EN_TPU0_TCI0V EN0 -#define EN_TPU1_TCI1V EN1 -#define EN_TPU1_TCI1U EN2 -#define EN_TPU5_TCI5V EN3 -#define EN_TPU5_TCI5U EN4 -#define EN_TPU2_TCI2V EN0 -#define EN_TPU2_TCI2U EN1 -#define EN_TPU3_TCI3V EN2 -#define EN_TPU4_TCI4V EN3 -#define EN_TPU4_TCI4U EN4 -#define EN_TPU6_TCI6V EN0 -#define EN_TPU7_TCI7V EN1 -#define EN_TPU7_TCI7U EN2 -#define EN_TPU11_TCI11V EN3 -#define EN_TPU11_TCI11U EN4 -#define EN_TPU8_TCI8V EN0 -#define EN_TPU8_TCI8U EN1 -#define EN_TPU9_TCI9V EN2 -#define EN_TPU10_TCI10V EN3 -#define EN_TPU10_TCI10U EN4 -#define EN_SCI0_ERI0 EN0 -#define EN_SCI1_ERI1 EN1 -#define EN_SCI2_ERI2 EN2 -#define EN_SCI3_ERI3 EN3 -#define EN_SCI4_ERI4 EN4 -#define EN_SCI5_ERI5 EN5 -#define EN_SCI6_ERI6 EN6 -#define EN_SCI7_ERI7 EN7 -#define EN_SCI8_ERI8 EN8 -#define EN_SCI9_ERI9 EN9 -#define EN_SCI10_ERI10 EN10 -#define EN_SCI11_ERI11 EN11 -#define EN_SCI12_ERI12 EN12 -#define EN_RSPI0_SPEI0 EN13 -#define EN_RSPI1_SPEI1 EN14 -#define EN_RSPI2_SPEI2 EN15 - -#define CLR_CAN0_ERS0 CLR0 -#define CLR_CAN1_ERS1 CLR1 -#define CLR_CAN2_ERS2 CLR2 -#define CLR_MTU0_TCIV0 CLR0 -#define CLR_MTU1_TCIV1 CLR1 -#define CLR_MTU1_TCIU1 CLR2 -#define CLR_MTU2_TCIV2 CLR0 -#define CLR_MTU2_TCIU2 CLR1 -#define CLR_MTU3_TCIV3 CLR2 -#define CLR_TPU0_TCI0V CLR0 -#define CLR_TPU1_TCI1V CLR1 -#define CLR_TPU1_TCI1U CLR2 -#define CLR_TPU5_TCI5V CLR3 -#define CLR_TPU5_TCI5U CLR4 -#define CLR_TPU2_TCI2V CLR0 -#define CLR_TPU2_TCI2U CLR1 -#define CLR_TPU3_TCI3V CLR2 -#define CLR_TPU4_TCI4V CLR3 -#define CLR_TPU4_TCI4U CLR4 -#define CLR_TPU6_TCI6V CLR0 -#define CLR_TPU7_TCI7V CLR1 -#define CLR_TPU7_TCI7U CLR2 -#define CLR_TPU11_TCI11V CLR3 -#define CLR_TPU11_TCI11U CLR4 -#define CLR_TPU8_TCI8V CLR0 -#define CLR_TPU8_TCI8U CLR1 -#define CLR_TPU9_TCI9V CLR2 -#define CLR_TPU10_TCI10V CLR3 -#define CLR_TPU10_TCI10U CLR4 -#define CLR_SCI0_ERI0 CLR0 -#define CLR_SCI1_ERI1 CLR1 -#define CLR_SCI2_ERI2 CLR2 -#define CLR_SCI3_ERI3 CLR3 -#define CLR_SCI4_ERI4 CLR4 -#define CLR_SCI5_ERI5 CLR5 -#define CLR_SCI6_ERI6 CLR6 -#define CLR_SCI7_ERI7 CLR7 -#define CLR_SCI8_ERI8 CLR8 -#define CLR_SCI9_ERI9 CLR9 -#define CLR_SCI10_ERI10 CLR10 -#define CLR_SCI11_ERI11 CLR11 -#define CLR_SCI12_ERI12 CLR12 -#define CLR_RSPI0_SPEI0 CLR13 -#define CLR_RSPI1_SPEI1 CLR14 -#define CLR_RSPI2_SPEI2 CLR15 - -#define CN_TPU6_TGI6A CN0 -#define CN_TPU6_TGI6B CN0 -#define CN_TPU6_TGI6C CN0 -#define CN_TPU6_TGI6D CN0 -#define CN_MTU0_TGIA0 CN0 -#define CN_MTU0_TGIB0 CN0 -#define CN_MTU0_TGIC0 CN0 -#define CN_MTU0_TGID0 CN0 -#define CN_MTU0_TGIE0 CN0 -#define CN_MTU0_TGIF0 CN0 -#define CN_TPU7_TGI7A CN1 -#define CN_TPU7_TGI7B CN1 -#define CN_MTU1_TGIA1 CN1 -#define CN_MTU1_TGIB1 CN1 -#define CN_TPU8_TGI8A CN2 -#define CN_TPU8_TGI8B CN2 -#define CN_MTU2_TGIA2 CN2 -#define CN_MTU2_TGIB2 CN2 -#define CN_TPU9_TGI9A CN3 -#define CN_TPU9_TGI9B CN3 -#define CN_TPU9_TGI9C CN3 -#define CN_TPU9_TGI9D CN3 -#define CN_MTU3_TGIA3 CN3 -#define CN_MTU3_TGIB3 CN3 -#define CN_MTU3_TGIC3 CN3 -#define CN_MTU3_TGID3 CN3 -#define CN_TPU10_TGI10A CN4 -#define CN_TPU10_TGI10B CN4 -#define CN_MTU4_TGIA4 CN4 -#define CN_MTU4_TGIB4 CN4 -#define CN_MTU4_TGIC4 CN4 -#define CN_MTU4_TGID4 CN4 -#define CN_MTU4_TGIV4 CN4 -#define CN_TPU11_TGI11A CN5 -#define CN_TPU11_TGI11B CN5 -#define CN_MTU5_TGIU5 CN5 -#define CN_MTU5_TGIV5 CN5 -#define CN_MTU5_TGIW5 CN5 -#define CN_TPU6_ CN0 -#define CN_MTU0_ CN0 -#define CN_TPU7_ CN1 -#define CN_MTU1_ CN1 -#define CN_TPU8_ CN2 -#define CN_MTU2_ CN2 -#define CN_TPU9_ CN3 -#define CN_MTU3_ CN3 -#define CN_TPU10_ CN4 -#define CN_MTU4_ CN4 -#define CN_TPU11_ CN5 -#define CN_MTU5_ CN5 - -#define __IR( x ) ICU.IR[ IR ## x ].BIT.IR -#define _IR( x ) __IR( x ) -#define IR( x , y ) _IR( _ ## x ## _ ## y ) -#define __DTCE( x ) ICU.DTCER[ DTCE ## x ].BIT.DTCE -#define _DTCE( x ) __DTCE( x ) -#define DTCE( x , y ) _DTCE( _ ## x ## _ ## y ) -#define __IEN( x ) ICU.IER[ IER ## x ].BIT.IEN ## x -#define _IEN( x ) __IEN( x ) -#define IEN( x , y ) _IEN( _ ## x ## _ ## y ) -#define __IPR( x ) ICU.IPR[ IPR ## x ].BIT.IPR -#define _IPR( x ) __IPR( x ) -#define IPR( x , y ) _IPR( _ ## x ## _ ## y ) -#define __VECT( x ) VECT ## x -#define _VECT( x ) __VECT( x ) -#define VECT( x , y ) _VECT( _ ## x ## _ ## y ) -#define __MSTP( x ) MSTP ## x -#define _MSTP( x ) __MSTP( x ) -#define MSTP( x ) _MSTP( _ ## x ) - -#define __IS( x ) ICU.GRP[ GRP ## x ].BIT.IS ## x -#define _IS( x ) __IS( x ) -#define IS( x , y ) _IS( _ ## x ## _ ## y ) -#define __EN( x ) ICU.GEN[ GEN ## x ].BIT.EN ## x -#define _EN( x ) __EN( x ) -#define EN( x , y ) _EN( _ ## x ## _ ## y ) -#define __CLR( x ) ICU.GCR[ GCR ## x ].BIT.CLR ## x -#define _CLR( x ) __CLR( x ) -#define CLR( x , y ) _CLR( _ ## x ## _ ## y ) -#define __CN( x ) ICU.SEL.BIT.CN ## x -#define _CN( x ) __CN( x ) -#define CN( x , y ) _CN( _ ## x ## _ ## y ) - -#define AD (*(volatile struct st_ad __evenaccess *)0x89800) -#define BSC (*(volatile struct st_bsc __evenaccess *)0x81300) -#define CAN0 (*(volatile struct st_can __evenaccess *)0x90200) -#define CAN1 (*(volatile struct st_can __evenaccess *)0x91200) -#define CAN2 (*(volatile struct st_can __evenaccess *)0x92200) -#define CMT (*(volatile struct st_cmt __evenaccess *)0x88000) -#define CMT0 (*(volatile struct st_cmt0 __evenaccess *)0x88002) -#define CMT1 (*(volatile struct st_cmt0 __evenaccess *)0x88008) -#define CMT2 (*(volatile struct st_cmt0 __evenaccess *)0x88012) -#define CMT3 (*(volatile struct st_cmt0 __evenaccess *)0x88018) -#define CRC (*(volatile struct st_crc __evenaccess *)0x88280) -#define DA (*(volatile struct st_da __evenaccess *)0x880C0) -#define DMAC (*(volatile struct st_dmac __evenaccess *)0x82200) -#define DMAC0 (*(volatile struct st_dmac0 __evenaccess *)0x82000) -#define DMAC1 (*(volatile struct st_dmac1 __evenaccess *)0x82040) -#define DMAC2 (*(volatile struct st_dmac1 __evenaccess *)0x82080) -#define DMAC3 (*(volatile struct st_dmac1 __evenaccess *)0x820C0) -#define DTC (*(volatile struct st_dtc __evenaccess *)0x82400) -#define EDMAC (*(volatile struct st_edmac __evenaccess *)0xC0000) -#define ETHERC (*(volatile struct st_etherc __evenaccess *)0xC0100) -#define EXDMAC (*(volatile struct st_exdmac __evenaccess *)0x82A00) -#define EXDMAC0 (*(volatile struct st_exdmac0 __evenaccess *)0x82800) -#define EXDMAC1 (*(volatile struct st_exdmac1 __evenaccess *)0x82840) -#define FLASH (*(volatile struct st_flash __evenaccess *)0x8C296) -#define ICU (*(volatile struct st_icu __evenaccess *)0x87000) -#define IEB (*(volatile struct st_ieb __evenaccess *)0x8A800) -#define IWDT (*(volatile struct st_iwdt __evenaccess *)0x88030) -#define MPC (*(volatile struct st_mpc __evenaccess *)0x8C100) -#define MTU (*(volatile struct st_mtu __evenaccess *)0x8860A) -#define MTU0 (*(volatile struct st_mtu0 __evenaccess *)0x88690) -#define MTU1 (*(volatile struct st_mtu1 __evenaccess *)0x88690) -#define MTU2 (*(volatile struct st_mtu2 __evenaccess *)0x88692) -#define MTU3 (*(volatile struct st_mtu3 __evenaccess *)0x88600) -#define MTU4 (*(volatile struct st_mtu4 __evenaccess *)0x88600) -#define MTU5 (*(volatile struct st_mtu5 __evenaccess *)0x88694) -#define POE (*(volatile struct st_poe __evenaccess *)0x88900) -#define PORT0 (*(volatile struct st_port0 __evenaccess *)0x8C000) -#define PORT1 (*(volatile struct st_port1 __evenaccess *)0x8C001) -#define PORT2 (*(volatile struct st_port2 __evenaccess *)0x8C002) -#define PORT3 (*(volatile struct st_port3 __evenaccess *)0x8C003) -#define PORT4 (*(volatile struct st_port4 __evenaccess *)0x8C004) -#define PORT5 (*(volatile struct st_port5 __evenaccess *)0x8C005) -#define PORT6 (*(volatile struct st_port6 __evenaccess *)0x8C006) -#define PORT7 (*(volatile struct st_port7 __evenaccess *)0x8C007) -#define PORT8 (*(volatile struct st_port8 __evenaccess *)0x8C008) -#define PORT9 (*(volatile struct st_port9 __evenaccess *)0x8C009) -#define PORTA (*(volatile struct st_porta __evenaccess *)0x8C00A) -#define PORTB (*(volatile struct st_portb __evenaccess *)0x8C00B) -#define PORTC (*(volatile struct st_portc __evenaccess *)0x8C00C) -#define PORTD (*(volatile struct st_portd __evenaccess *)0x8C00D) -#define PORTE (*(volatile struct st_porte __evenaccess *)0x8C00E) -#define PORTF (*(volatile struct st_portf __evenaccess *)0x8C00F) -#define PORTG (*(volatile struct st_portg __evenaccess *)0x8C010) -#define PORTH (*(volatile struct st_porth __evenaccess *)0x8C0D1) -#define PORTJ (*(volatile struct st_portj __evenaccess *)0x8C012) -#define PPG0 (*(volatile struct st_ppg0 __evenaccess *)0x881E6) -#define PPG1 (*(volatile struct st_ppg1 __evenaccess *)0x881F0) -#define RIIC0 (*(volatile struct st_riic0 __evenaccess *)0x88300) -#define RIIC1 (*(volatile struct st_riic1 __evenaccess *)0x88320) -#define RIIC2 (*(volatile struct st_riic1 __evenaccess *)0x88340) -#define RIIC3 (*(volatile struct st_riic1 __evenaccess *)0x88360) -#define RSPI0 (*(volatile struct st_rspi __evenaccess *)0x88380) -#define RSPI1 (*(volatile struct st_rspi __evenaccess *)0x883A0) -#define RSPI2 (*(volatile struct st_rspi __evenaccess *)0x883C0) -#define RTC (*(volatile struct st_rtc __evenaccess *)0x8C400) -#define S12AD (*(volatile struct st_s12ad __evenaccess *)0x89000) -#define SCI0 (*(volatile struct st_sci0 __evenaccess *)0x8A000) -#define SCI1 (*(volatile struct st_sci0 __evenaccess *)0x8A020) -#define SCI2 (*(volatile struct st_sci0 __evenaccess *)0x8A040) -#define SCI3 (*(volatile struct st_sci0 __evenaccess *)0x8A060) -#define SCI4 (*(volatile struct st_sci0 __evenaccess *)0x8A080) -#define SCI5 (*(volatile struct st_sci0 __evenaccess *)0x8A0A0) -#define SCI6 (*(volatile struct st_sci0 __evenaccess *)0x8A0C0) -#define SCI7 (*(volatile struct st_sci7 __evenaccess *)0x8A0E0) -#define SCI8 (*(volatile struct st_sci0 __evenaccess *)0x8A100) -#define SCI9 (*(volatile struct st_sci0 __evenaccess *)0x8A120) -#define SCI10 (*(volatile struct st_sci0 __evenaccess *)0x8A140) -#define SCI11 (*(volatile struct st_sci0 __evenaccess *)0x8A160) -#define SCI12 (*(volatile struct st_sci12 __evenaccess *)0x8B300) -#define SMCI0 (*(volatile struct st_smci0 __evenaccess *)0x8A000) -#define SMCI1 (*(volatile struct st_smci0 __evenaccess *)0x8A020) -#define SMCI2 (*(volatile struct st_smci0 __evenaccess *)0x8A040) -#define SMCI3 (*(volatile struct st_smci0 __evenaccess *)0x8A060) -#define SMCI4 (*(volatile struct st_smci0 __evenaccess *)0x8A080) -#define SMCI5 (*(volatile struct st_smci0 __evenaccess *)0x8A0A0) -#define SMCI6 (*(volatile struct st_smci0 __evenaccess *)0x8A0C0) -#define SMCI7 (*(volatile struct st_smci7 __evenaccess *)0x8A0E0) -#define SMCI8 (*(volatile struct st_smci0 __evenaccess *)0x8A100) -#define SMCI9 (*(volatile struct st_smci0 __evenaccess *)0x8A120) -#define SMCI10 (*(volatile struct st_smci0 __evenaccess *)0x8A140) -#define SMCI11 (*(volatile struct st_smci0 __evenaccess *)0x8A160) -#define SMCI12 (*(volatile struct st_smci0 __evenaccess *)0x8B300) -#define SYSTEM (*(volatile struct st_system __evenaccess *)0x80000) -#define TEMPS (*(volatile struct st_temps __evenaccess *)0x8C500) -#define TMR0 (*(volatile struct st_tmr0 __evenaccess *)0x88200) -#define TMR1 (*(volatile struct st_tmr1 __evenaccess *)0x88201) -#define TMR2 (*(volatile struct st_tmr0 __evenaccess *)0x88210) -#define TMR3 (*(volatile struct st_tmr1 __evenaccess *)0x88211) -#define TMR01 (*(volatile struct st_tmr01 __evenaccess *)0x88204) -#define TMR23 (*(volatile struct st_tmr01 __evenaccess *)0x88214) -#define TPU0 (*(volatile struct st_tpu0 __evenaccess *)0x88108) -#define TPU1 (*(volatile struct st_tpu1 __evenaccess *)0x88108) -#define TPU2 (*(volatile struct st_tpu2 __evenaccess *)0x8810A) -#define TPU3 (*(volatile struct st_tpu3 __evenaccess *)0x8810A) -#define TPU4 (*(volatile struct st_tpu4 __evenaccess *)0x8810C) -#define TPU5 (*(volatile struct st_tpu5 __evenaccess *)0x8810C) -#define TPU6 (*(volatile struct st_tpu0 __evenaccess *)0x88178) -#define TPU7 (*(volatile struct st_tpu1 __evenaccess *)0x88178) -#define TPU8 (*(volatile struct st_tpu2 __evenaccess *)0x8817A) -#define TPU9 (*(volatile struct st_tpu3 __evenaccess *)0x8817A) -#define TPU10 (*(volatile struct st_tpu4 __evenaccess *)0x8817C) -#define TPU11 (*(volatile struct st_tpu5 __evenaccess *)0x8817C) -#define TPUA (*(volatile struct st_tpua __evenaccess *)0x88100) -#define TPUB (*(volatile struct st_tpub __evenaccess *)0x88170) -#define USB (*(volatile struct st_usb __evenaccess *)0xA0400) -#define USB0 (*(volatile struct st_usb0 __evenaccess *)0xA0000) -#define USB1 (*(volatile struct st_usb1 __evenaccess *)0xA0200) -#define WDT (*(volatile struct st_wdt __evenaccess *)0x88020) -#pragma bit_order -#pragma packoption -#endif diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/platform.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/platform.h deleted file mode 100644 index 1851bfb3e..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/platform.h +++ /dev/null @@ -1,75 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : platform.h -* Version : 1.20 -* Description : The user chooses which MCU and board they are developing for in this file. If the board you are using -* is not listed below, please add your own or use the default 'User Board'. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* History : DD.MM.YYYY Version Description -* : 30.11.2011 1.00 First Release -* : 13.01.2012 1.10 Moved from having platform defined using macro defintion, to having platform defined -* by choosing an include path. This makes this file simpler and cleans up the issue -* where HEW shows all header files for all platforms under 'Dependencies'. -* : 14.02.2012 1.20 Added RX210 BSP. -***********************************************************************************************************************/ - -#ifndef _PLATFORM_H_ -#define _PLATFORM_H_ - -/*********************************************************************************************************************** -DEFINE YOUR SYSTEM - UNCOMMENT THE INCLUDE PATH FOR THE PLATFORM YOU ARE USING. -***********************************************************************************************************************/ -/* RSKRX610 */ -//#include "./board/rskrx610/r_bsp.h" - -/* RSKRX62N */ -//#include "./board/rskrx62n/r_bsp.h" - -/* RSKRX62T */ -//#include "./board/rskrx62t/r_bsp.h" - -/* RDKRX62N */ -//#include "./board/rdkrx62n/r_bsp.h" - -/* RSKRX630 */ -//#include "./board/rskrx630/r_bsp.h" - -/* RSKRX63N */ -#include "./board/rskrx63n/r_bsp.h" - -/* RDKRX63N */ -//#include "./board/rdkrx63n/r_bsp.h" - -/* RSKRX210 */ -//#include "./board/rskrx210/r_bsp.h" - -/* User Board - Define your own board here. */ -//#include "./board/user/r_bsp.h" - -/*********************************************************************************************************************** -MAKE SURE AT LEAST ONE PLATFORM WAS DEFINED - DO NOT EDIT BELOW THIS POINT -***********************************************************************************************************************/ -#ifndef PLATFORM_DEFINED -#error "Error - No platform defined in platform.h!" -#endif - -#endif /* _PLATFORM_H_ */ - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf deleted file mode 100644 index 498235f19..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf +++ /dev/null @@ -1,584 +0,0 @@ -[HIMDBVersion] -2.0 -[DATABASE_VERSION] -"2.3" -[SESSION_DETAILS] -"" -[INFORMATION] -"" -[GENERAL_DATA] -"FIRST_CONNECTION_TAG" "NO" -"MRULABELS_DATAMANAGER_KEY" "00000000|FFFFFFFF|2a94|f|108a|1054|fff8cd9e|1050|fff8c484|88218|000870B4|000870AE|88204|88208|18b8" -"RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_TRUE_STORE_TAG" -"{228DB593-0AB2-4EBE-A098-A2CABF094E46}RamMonitorCtrlViews" "0" -"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" "" -"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlViews" "0" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}ECXLABEL_ADDDLG_ADDR" "" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}LabelCtrlSymbolFileDir" "" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}LabelCtrlSymbolFileName" "" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}LabelCtrlViews" "0" -"{2BA6A3EF-6488-11D5-80D4-00C04F68EAD7}StatusCtrlViews" "0" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBatchFileName" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointFlag" "-1 " -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointStatus" "-1 " -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBrowseDirectory" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlLogFileName" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlSplitterPosition" "242" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlViews" "1" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "17" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineWndInstanceKey0" "{WK_00000001_CmdLine}" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "2a94" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_END_ADDRESS" "FFFFFFFF" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_START_ADDRESS" "00000000" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_MOVE_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_MOVE_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SEARCH_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SEARCH_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SET_DEST_ADDRESS" "000870B4" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryCtrlViews" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0AutoRefreshEnableTopPane" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0AutoRefreshIntervalTopPane" "100" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DataLength" "4" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispAddressTopPane" "4180" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispCode" "42208" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispColumnCount" "4" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispCode" "1" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispFloat" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispLabel" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispRegister" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsRegFollowEnableTopPane" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0LabelWidth" "96" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0Radix" "16" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0RegFollowRegTblIDTopPane" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0RegisterWidth" "96" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0ScrollEndAddress" "-1" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0ScrollStartAddress" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0StartUpSymbolTopPane" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewAInstanceKey0" "{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0AutoRefreshEnableTopPane" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0AutoRefreshIntervalTopPane" "100" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DataLength" "4" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispAddressTopPane" "4180" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispCode" "42208" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispColumnCount" "4" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispCode" "1" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispFloat" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispLabel" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispRegister" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsRegFollowEnableTopPane" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0LabelWidth" "96" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0Radix" "16" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0RegFollowRegTblIDTopPane" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0RegisterWidth" "96" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0ScrollEndAddress" "-1" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0ScrollStartAddress" "0" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0StartUpSymbolTopPane" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewBInstanceKey0" "{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEMViewB" -"{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlSaveFileDir" "" -"{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlSaveFileName" "" -"{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlViews" "0" -"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlSaveFileDir" "" -"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlSaveFileName" "" -"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlViews" "0" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "16777216" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "768" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000001E28" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "000000000000DEA0" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000001E28" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000000400" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030003" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF839D3" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "000000000000DD44" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF803C8" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_24" "0000000000000100" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_25" "1234567887650000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000001" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000001" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "000000000000DD44" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "26" -"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" -"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" "" -"{743E9BC2-6B9D-44A5-A5B6-F8C3FF2C1CAD}GraphCtrlViews" "0" -"{743E9BC2-6B9D-44A5-A5B6-F8C3FF2C1CAD}GraphWnd_Close_Count" "0" -"{743E9BC2-6B9D-44A5-A5B6-F8C3FF2C1CAD}GraphWnd_Mode" "1" -"{743E9BC2-6B9D-44A5-A5B6-F8C3FF2C1CAD}GraphWnd_Trace_Mode" "0" -"{7943C44E-7D44-422A-9140-4CF55C88F7D3}DifferenceCtrlViews" "0" -"{855C64C3-E49C-4450-9BCA-C9822566D214}OSObjectCtrlViews" "0" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE" "00000000,00000000,0,0" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_ADDRESS_NAME" "" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_COMB_ADDRESS" ",,,," -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_COMB_BUFFER" ",,,," -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_SAMPLING_RATE" "1000" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}WaveformCtrlViews" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersCtrlViews" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ColumnWidth" "47,153,35" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_COUNT" "33" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_DISPLAYED" "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0HideFLAGs" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0HideRadix" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0LastFileName" "" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0RadixList" "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,2,16,16,16,16,16,16,16," -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndInstanceKey0" "{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0ColumnWidth" "47,153,35" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0ECX_REGISTER_COUNT" "33" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0ECX_REGISTER_DISPLAYED" "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0HideFLAGs" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0HideRadix" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0LastFileName" "" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0RadixList" "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,2,16,16,16,16,16,16,16," -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewBInstanceKey0" "{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEMViewB" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_ADDRESS_NAME" "" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_BUFFER" "00000000,00000000,0,0" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_COLOR" "0,0,0,0" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_COMB_ADDRESS" ",,,," -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_COMB_PALETTE" ",,,," -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_PALETTE_NAME" "" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_REDRAW_CONTINUOUSLY" "0,2" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_SAMPLEING_RATE" "1000" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_VIEW" "0,0,0,0,0,0" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ImageCtrlViews" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "4" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth0" "207" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth1" "234" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth12" "116" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth2" "127" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "xTickCount, 2, 0, P, Col, Hex, MN" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Unit,C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c:RTOSDemo.abs" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "pcStatusMessage, 4, 0, P, Col, Hex, MN" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "SwitchQueue, 4, 0, P, Col, Hex, MN" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "CurrentCount, 10, 0, P, Col, Hex, N" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "pos, 10, 0, P, Col, Hex, N" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004_SCOPE" "Current Scope," -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005" "datastring, 6, 0, P, Col, Hex, MN" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0005_SCOPE" "Current Scope," -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006" "next, 4, 0, C0001, Col, Hex, MN" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth2" "120" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth3" "200" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ECX_WATCH_ITEMCnt" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth0" "120" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth1" "150" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth12" "200" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth2" "120" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth3" "200" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ECX_WATCH_ITEMCnt" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth0" "120" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth1" "150" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth12" "200" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth2" "120" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth3" "200" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ECX_WATCH_ITEMCnt" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndInitial_Radix" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndInstanceKey0" "{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchRecord" "" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchSave" "" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndUpdate_Interval" "100" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlDCEnable" "1" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlLocalEchoEnable" "0" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlLogFileName" "" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlPortBaudIndex" "0" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlPortName" "" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlSendDataTimeout" "50" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlViews" "1" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleWndInstanceKey0" "{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" -"{B6AE2E1F-5221-4A44-91C2-8C3097B41A69}StartStopCheckAfter" "0" -"{B6AE2E1F-5221-4A44-91C2-8C3097B41A69}StartStopCheckBefore" "0" -"{B6AE2E1F-5221-4A44-91C2-8C3097B41A69}StartStopExpAfter" "" -"{B6AE2E1F-5221-4A44-91C2-8C3097B41A69}StartStopExpBefore" "" -"{B6AE2E1F-5221-4A44-91C2-8C3097B41A69}T_SESSION_IS_SAVED" "YES" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}ElfDwarf2Objects" "1" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}LoadModule0OBJ_ELFDWARF2_ARRAY_EXPAND_LIMIT" "-1" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}LoadModule0OBJ_ELFDWARF2_STATIC_MEM_EXPAND" "1" -"{EEDC9300-6FBE-11D5-8613-00A024591A38}LocalsCtrlViews" "0" -"{EEDC9301-6FBE-11D5-8613-00A024591A38}StackTraceCtrlViews" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlIOFile" "" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileDir" "$(CONFIGDIR)" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileName" "" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlViews" "1" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOSelection IOWnd0" "" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ColWidth0" "200" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ColWidth1" "100" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ColWidth2" "108" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ColWidth3" "100" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp0" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp1" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp10" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp100" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp101" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp102" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp103" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp104" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp105" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp106" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp107" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp108" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp109" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp11" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp110" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp111" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp112" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp113" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp114" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp115" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp116" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp117" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp118" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp119" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp12" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp120" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp121" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp122" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp123" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp124" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp125" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp126" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp127" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp128" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp129" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp13" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp130" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp131" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp132" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp133" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp134" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp135" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp136" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp137" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp138" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp139" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp14" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp140" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp141" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp142" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp143" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp144" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp145" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp146" "1" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp147" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp148" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp149" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp15" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp150" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp151" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp152" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp153" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp154" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp155" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp156" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp157" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp158" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp159" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp16" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp160" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp161" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp162" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp163" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp164" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp165" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp166" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp167" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp168" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp169" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp17" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp170" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp171" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp172" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp173" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp174" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp175" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp176" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp177" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp178" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp179" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp18" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp180" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp181" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp182" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp183" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp184" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp185" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp186" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp187" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp188" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp189" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp19" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp190" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp191" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp192" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp193" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp194" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp195" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp196" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp197" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp198" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp199" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp2" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp20" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp200" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp201" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp202" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp203" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp204" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp205" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp206" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp207" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp208" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp209" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp21" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp210" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp211" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp212" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp213" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp214" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp215" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp216" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp217" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp218" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp219" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp22" "1" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp220" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp221" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp222" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp223" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp224" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp225" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp226" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp227" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp228" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp229" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp23" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp230" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp231" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp232" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp233" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp234" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp24" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp25" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp26" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp27" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp28" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp29" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp3" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp30" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp31" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp32" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp33" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp34" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp35" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp36" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp37" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp38" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp39" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp4" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp40" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp41" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp42" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp43" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp44" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp45" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp46" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp47" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp48" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp49" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp5" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp50" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp51" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp52" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp53" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp54" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp55" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp56" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp57" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp58" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp59" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp6" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp60" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp61" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp62" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp63" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp64" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp65" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp66" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp67" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp68" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp69" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp7" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp70" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp71" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp72" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp73" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp74" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp75" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp76" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp77" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp78" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp79" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp8" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp80" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp81" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp82" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp83" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp84" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp85" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp86" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp87" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp88" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp89" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp9" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp90" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp91" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp92" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp93" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp94" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp95" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp96" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp97" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp98" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp99" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ScrollHorz" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ScrollVert" "22" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth0" "200" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth1" "100" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth2" "100" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth3" "100" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ScrollHorz" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ScrollVert" "0" -"{F923CED3-3318-4B43-B931-0AE76B289176}TaskTraceCtrlAnalyzeViews" "0" -"{F923CED3-3318-4B43-B931-0AE76B289176}TaskTraceCtrlFileSaveDirectory" "" -"{F923CED3-3318-4B43-B931-0AE76B289176}TaskTraceCtrlTraceViews" "0" -[LANGUAGE] -"English" -[CONFIG_INFO_VD1] -1 -[CONFIG_INFO_VD2] -0 -[CONFIG_INFO_VD3] -0 -[CONFIG_INFO_VD4] -0 -[WINDOW_POSITION_STATE_DATA_VD1] -"Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"QzROM" "TOOLBAR 0" 59419 4 1 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_00000001_CmdLine}ADC_Single_DTC_MTUDefaultSession" "WINDOW" 59422 0 1 "0.50" 230 0 0 350 200 17 0 "32771|32772|32778|<>|32773|32774|<>|32820|<>|32801|32824" "0.0" -"{WK_00000001_CmdLine}" "WINDOW" 59422 0 2 "0.10" 187 0 0 350 200 17 0 "32771|32772|32778|<>|32773|32774|<>|32820|<>|32801|32824" "0.0" -"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 386 0 0 350 200 17 0 "57634|57637|57633|<>|32781|32782|<>|32780|32785|32787" "0.0" -"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 176 176 1120 448 9 0 "" "0.0" -"{WK_00000001_IO}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 1 "0.50" 187 0 0 869 657 17 0 "32817|32826|32819|32820|32821" "0.0" -"{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "1.00" 219 1452 519 1033 219 2053 0 "42202|42203|42204|42233|<>|42206|42205|42230|42229|42207|<>|42208|42209|42210|49076|42228|42227|<>|42231|42232|42234|42235|<>|42211|<>" "0.0" -"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 187 560 340 350 200 18 0 "36756|36757|36758|36759|<>|36746|36747|<>|39531|<>|39500|39534|<>|36687" "0.0" -"{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 300 0 0 350 200 2065 0 "" "0.0" -"{WK_00000001_STACKTRACE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.50" 277 0 0 350 200 2065 0 "" "0.0" -"{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 386 0 0 1040 307 17 0 "32781|32783|<>|32771|32829|32772|32827|32773|<>|32786|<>|32810|32811" "0.0" -"{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 330 560 340 350 200 18 0 "" "0.0" -"{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 3 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000003_BOOKMARKS}" "TOOLBAR 0" 59419 1 1 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000004_TEMPLATES}" "TOOLBAR 0" 59419 1 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000005_SEARCH}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000007_DEBUG}" "TOOLBAR 0" 59419 0 1 "0.00" 0 914 231 0 0 18 0 "" "0.0" -"{WK_TB00000008_DEBUGRUN}" "TOOLBAR 0" 59419 3 0 "0.00" 0 298 189 0 0 18 0 "" "0.0" -"{WK_TB00000009_VERSIONCONTROL}" "TOOLBAR 0" 59419 1 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000011_CPU}" "TOOLBAR 0" 0 0 0 "0.00" 0 427 225 0 0 5 0 "" "0.0" -"{WK_TB00000012_MAP}" "TOOLBAR 0" 59419 1 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000013_SYMBOL}" "TOOLBAR 0" 0 0 0 "0.00" 0 800 233 0 0 5 0 "" "0.0" -"{WK_TB00000014_CODE}" "TOOLBAR 0" 59419 2 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000015_PERFORMANCE}" "TOOLBAR 0" 59419 2 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000016_GRAPHIC}" "TOOLBAR 0" 59419 2 2 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000017_FDT}" "TOOLBAR 0" 59419 4 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000018_DEFAULTWINDOW}" "TOOLBAR 0" 59419 1 2 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000023_RTOS}" "TOOLBAR 0" 59419 2 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000025_HELPSYSTEMTOOL}" "TOOLBAR 0" 59419 0 0 "0.00" 0 788 192 0 0 5 0 "" "0.0" -"{WK_TB00000026_MACRO}" "TOOLBAR 0" 59419 1 6 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000027_EVENT}" "TOOLBAR 0" 59419 2 1 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000028_RTOSDEBUG}" "TOOLBAR 0" 59419 0 0 "0.00" 0 559 254 0 0 5 0 "" "0.0" -"{WK_TB00000029_SYSTEMTOOL}" "TOOLBAR 0" 59419 2 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" -[WINDOW_POSITION_STATE_DATA_VD2] -[WINDOW_POSITION_STATE_DATA_VD3] -[WINDOW_POSITION_STATE_DATA_VD4] -[WINDOW_Z_ORDER] -"{WK_TB00000028_RTOSDEBUG} TOOLBAR 0" -"{WK_TB00000013_SYMBOL} TOOLBAR 0" -"{WK_TB00000011_CPU} TOOLBAR 0" -"{WK_TB00000025_HELPSYSTEMTOOL} TOOLBAR 0" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-blinky.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" -[TARGET_NAME] -"RX E1/E20 SYSTEM" "" 0 -[STATUSBAR_STATEINFO_VD1] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD2] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD3] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD4] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_DEBUGGER_PANESTATE_VD1] -"SBK_TAR_EMUE100|Exception" 1 -"SBK_TAR_EMUE100|BreakCondition" 1 -"SBK_TAR_EMUE100|TaskID" 1 -"SBK_TAR_EMUE100|ExecutionTime" 1 -"SBK_TAR_EMUE100|PC" 1 -[STATUSBAR_DEBUGGER_PANESTATE_VD2] -[STATUSBAR_DEBUGGER_PANESTATE_VD3] -[STATUSBAR_DEBUGGER_PANESTATE_VD4] -[DEBUGGER_OPTIONS] -"" -[DOWNLOAD_MODULES] -"$(CONFIGDIR)\$(PROJECTNAME).abs" 0 "Elf/Dwarf2" 0 0 1 0 -[CONNECT_ON_GO] -"FALSE" -[DOWNLOAD_MODULES_AFTER_BUILD] -"TRUE" -[REMOVE_BREAKPOINTS_ON_DOWNLOAD] -"FALSE" -[DISABLE_MEMORY_ACCESS_PRIOR_TO_COMMAND_FILE_EXECUTION] -"FALSE" -[LIMIT_DISASSEMBLY_MEMORY_ACCESS] -"FALSE" -[DISABLE_MEMORY_ACCESS_DURING_EXECUTION] -"FALSE" -[DEBUGGER_OPTIONS_PROPERTIES] -"1" -[COMMAND_FILES] -[DEFAULT_DEBUG_FORMAT] -"Elf/Dwarf2" -[FLASH_DETAILS] -"0.000000" 0 0 "" 0 "" 0 0 "" 1 1 0 0 0 0 0 "" "" "" "" "" -[BREAKPOINTS] -"c:\e\dev\freertos\workingcopy\demo\rx600_rx63n-rsk_renesas\rtosdemo\renesas-files\resetprg.c" 137 0 1 "{00000000-0000-0000-C000-000000000046}" "" -[END] diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini deleted file mode 100644 index 90ed86b5f..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini +++ /dev/null @@ -1,45 +0,0 @@ -[Init_DeviceSetting] -DebugMode=0 -PowerOut=0 -ResetRelease=0 -EmulatorSerial=E1:_9KM000237 -McuGroup=RX63N Group -Device=R5F563NB_WS2 -McuFileDir=RX63NGr -SupplyVoltage=0 -[Init_CommunicationClock] -JtagClock=16.5 -JtagClockValue=10 -CommunicatonIF=1 -FineClock=2000000 -FineClockValue=2000000 -[Init_EmulatorSetting] -FirstStartUp=0 -HideNext=0 -ConnectionDlgAutoClose=1 -FirstStartUpV10200=0 -[CFG_MCU] -PrevDevice=R5F563NB_WS2 -ProcessorMode=0 -EXTAL=12.0000 -WorkRam=3000 -LittleEndian=1 -EnableClockChange=1 -UseEXTAL=1 -OperatingMode=0 -[CFG_SYSTEM] -CpuReWrite=0 -PerfCounterUser=0 -TraceDebugAs=0 -DataFlashReWrite=0 -[CFG_FLASHCLEAR_R5F562N8_00] -BlockCount=54 -BlockData=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -[Config_Property] -HideNext=0 -[CFG_FLASHCLEAR_R5F52108_00] -AreaCount=0 -[CFG_FLASHCLEAR_R5F563NB_00] -AreaCount=0 -[CFG_FLASHCLEAR_R5F563NB_WS2_00] -AreaCount=0 diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SimSessionRX600.hsf b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SimSessionRX600.hsf deleted file mode 100644 index fc1ca0381..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/SimSessionRX600.hsf +++ /dev/null @@ -1,290 +0,0 @@ -[HIMDBVersion] -2.0 -[DATABASE_VERSION] -"2.3" -[SESSION_DETAILS] -"" -[INFORMATION] -"" -[GENERAL_DATA] -"FIRST_CONNECTION_TAG" "NO" -"RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_FALSE_STORE_TAG" -"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" "" -"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlViews" "0" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}ECXLABEL_ADDDLG_ADDR" "" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}LabelCtrlSymbolFileDir" "" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}LabelCtrlSymbolFileName" "" -"{2BA6A3EE-6488-11D5-80D4-00C04F68EAD7}LabelCtrlViews" "0" -"{2BA6A3EF-6488-11D5-80D4-00C04F68EAD7}StatusCtrlViews" "0" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBatchFileName" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointFlag" "-1 " -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointStatus" "-1 " -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBrowseDirectory" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlLogFileName" "" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlSplitterPosition" "242" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlViews" "1" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "17" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineWndInstanceKey0" "{WK_00000001_CmdLine}" -"{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_MOVE_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_MOVE_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SEARCH_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SEARCH_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SET_DEST_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryCtrlViews" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_BREAK_BREAK_ACCESS_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_BREAK_BREAK_CYCLE_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_BREAK_BREAK_DATA_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_BREAK_BREAK_REGISTER_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_BREAK_BREAK_SEQUENCE_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_BREAK_PC_BREAK_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_BUSCYCLEOCCUR_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_CONFIG_CPU_FREQUENCY" "100000" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_CONFIG_ENDIAN" "LITTLE" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_CONFIG_PCLOCKRATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_CONFIG_ROUND" "RM_NEAR" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_EXEC_EXEC_MODE" "STOP" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_EXEC_STEP_RATE" "40000" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_FILEIOPORT_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_FILEIOVARIALBE_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_INST_DECODE_CACHE_ENABLE_FLAG" "OFF" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_IODLL_COUNT" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_AUTO_ALLOC_RESOURCE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_BUS_WIDTH" "32" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP0" "0x00000000,0x0001FFFF,32, 1,RAM" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP0_ENDIAN" "2" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP0_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP1" "0x00080000,0x000FFFFF,32, 1,I/O" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP1_ENDIAN" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP1_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP2" "0x00100000,0x00107FFF,32, 1,ROM" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP2_ENDIAN" "2" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP2_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP3" "0x007F8000,0x007F9FFF,32, 1,RAM" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP3_ENDIAN" "2" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP3_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP4" "0x007FC000,0x007FC4FF,32, 1,I/O" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP4_ENDIAN" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP4_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP5" "0x007FFC00,0x007FFFFF,32, 1,I/O" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP5_ENDIAN" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP5_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP6" "0x00E00000,0x00FFFFFF,32, 1,ROM" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP6_ENDIAN" "2" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP6_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP7" "0xFEFFE000,0xFEFFFFFF,32, 1,ROM" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP7_ENDIAN" "2" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP7_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP8" "0xFF7FC000,0xFF7FFFFF,32, 1,ROM" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP8_ENDIAN" "2" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP8_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP9" "0xFFE00000,0xFFFFFFFF,32, 1,ROM" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP9_ENDIAN" "2" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MAP9_WRITE_STATE" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MEMORY_MAP_COUNT" "10" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_MEMORY_MODE" "0" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_MAP_PRG_WIDTH" "-1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_RESOURCE_MEMORY_RESOURCE_COUNT" "5" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_RESOURCE_MEMRES0" "0x00000000,0x0001FFFF,3" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_RESOURCE_MEMRES1" "0x00080000,0x000FFFFF,3" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_RESOURCE_MEMRES2" "0x007FC000,0x007FC4FF,3" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_RESOURCE_MEMRES3" "0x007FFC00,0x007FFFFF,3" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_MEMORY_RESOURCE_MEMRES4" "0xFFFF8000,0xFFFFFFFF,3" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_SESSION_IS_SAVED" "YES" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_SYSTEM_CALL_Interrupt_Exception" "1" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_SYSTEM_CALL_SYSTEM_CALL_ADDRESS" "0x00000000" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_SYSTEM_CALL_SYSTEM_CALL_FLAG" "OFF" -"{3575AD59-64F7-49AB-BD50-52BB206A6DDE}T_TRACE2_TRACE2_ACQUISITION" "0,65536,0,0" -"{48FF5DA0-6FFA-11D5-B7CE-00E029352378}CoverageCtrlViews" "0" -"{48FF5DA0-6FFA-11D5-B7CE-00E029352378}CoverageCtrlViewsFromDiffFile" "0" -"{48FF5DA0-6FFA-11D5-B7CE-00E029352378}CoverageFileName" "0" -"{48FF5DA0-6FFA-11D5-B7CE-00E029352378}EcxCov_Cov_SL" "" -"{48FF5DA0-6FFA-11D5-B7CE-00E029352378}EcxCov_Open_End" "" -"{48FF5DA0-6FFA-11D5-B7CE-00E029352378}EcxCov_Open_Start" "" -"{48FF5DA0-6FFA-11D5-B7CE-00E029352378}EcxCov_Src_Open" "" -"{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlSaveFileDir" "" -"{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlSaveFileName" "" -"{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlViews" "0" -"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlPAState" "0" -"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlSaveFileDir" "" -"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlSaveFileName" "" -"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlViews" "0" -"{633553C0-6FE9-11D5-B7CE-00E029352378}ProfileCtrlChartMultiOpen" "0" -"{633553C0-6FE9-11D5-B7CE-00E029352378}ProfileCtrlEnable" "0" -"{633553C0-6FE9-11D5-B7CE-00E029352378}ProfileCtrlSaveListFileDir" "" -"{633553C0-6FE9-11D5-B7CE-00E029352378}ProfileCtrlSaveListFileName" "" -"{633553C0-6FE9-11D5-B7CE-00E029352378}ProfileCtrlSaveTreeFileDir" "" -"{633553C0-6FE9-11D5-B7CE-00E029352378}ProfileCtrlSaveTreeFileName" "" -"{633553C0-6FE9-11D5-B7CE-00E029352378}ProfileCtrlViews" "0" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "0" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "0" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_24" "0000000000000100" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_25" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "26" -"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" -"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" "" -"{7943C44E-7D44-422A-9140-4CF55C88F7D3}DifferenceCtrlViews" "0" -"{7FA2E460-7EC0-11D5-8EB6-00004CC34E9D}SimIOCtrlViews" "0" -"{855C64C3-E49C-4450-9BCA-C9822566D214}OSObjectCtrlViews" "0" -"{85AC95E0-0CE6-11D6-8EB6-00004CC34E9D}TriggerCtrlViews" "0" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE" "00000000,00000000,0,0" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_ADDRESS_NAME" "" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_COMB_ADDRESS" ",,,," -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_COMB_BUFFER" ",,,," -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_SAMPLING_RATE" "1000" -"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}WaveformCtrlViews" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersCtrlViews" "0" -"{99F424FE-E727-45AE-AE1F-11E29DEF272C}ECX_GuiIO_SAMPLING_RATE" "1000" -"{99F424FE-E727-45AE-AE1F-11E29DEF272C}PDGuiIOCtrlPDGuiIOLastSaveDirectory" "" -"{99F424FE-E727-45AE-AE1F-11E29DEF272C}PDGuiIOCtrlViews" "0" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_ADDRESS_NAME" "" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_BUFFER" "00000000,00000000,0,0" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_COLOR" "0,0,0,0" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_COMB_ADDRESS" ",,,," -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_COMB_PALETTE" ",,,," -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_PALETTE_NAME" "" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_REDRAW_CONTINUOUSLY" "0,2" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_SAMPLEING_RATE" "1000" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_VIEW" "0,0,0,0,0,0" -"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ImageCtrlViews" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndInitial_Radix" "0" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchRecord" "" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchSave" "" -"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndUpdate_Interval" "100" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}ElfDwarf2Objects" "1" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}LoadModule0OBJ_ELFDWARF2_ARRAY_EXPAND_LIMIT" "-1" -"{CBEBB610-1516-11D4-8F2D-00409545B67B}LoadModule0OBJ_ELFDWARF2_STATIC_MEM_EXPAND" "1" -"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventCtrlViews" "0" -"{EEDC9300-6FBE-11D5-8613-00A024591A38}LocalsCtrlViews" "0" -"{EEDC9301-6FBE-11D5-8613-00A024591A38}StackTraceCtrlViews" "0" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlIOFile" "" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileDir" "$(CONFIGDIR)" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileName" "" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlViews" "0" -"{F923CED3-3318-4B43-B931-0AE76B289176}TaskTraceCtrlAnalyzeViews" "0" -"{F923CED3-3318-4B43-B931-0AE76B289176}TaskTraceCtrlFileSaveDirectory" "" -"{F923CED3-3318-4B43-B931-0AE76B289176}TaskTraceCtrlTraceViews" "0" -[LANGUAGE] -"English" -[CONFIG_INFO_VD1] -1 -[CONFIG_INFO_VD2] -0 -[CONFIG_INFO_VD3] -0 -[CONFIG_INFO_VD4] -0 -[WINDOW_POSITION_STATE_DATA_VD1] -"Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 228 0 0 350 200 17 0 "32771|32772|32778|<>|32773|32774|<>|32820|<>|32801|32824" "0.0" -"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 228 560 340 350 200 18 0 "36756|36757|36758|36759|<>|36746|36747|<>|39531|<>|39500|39534|<>|36687" "0.0" -"{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 346 560 340 350 200 18 0 "" "0.0" -"{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000003_BOOKMARKS}" "TOOLBAR 0" 59419 1 1 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000004_TEMPLATES}" "TOOLBAR 0" 59419 1 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000005_SEARCH}" "TOOLBAR 0" 59419 0 1 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000007_DEBUG}" "TOOLBAR 0" 59419 0 0 "0.00" 0 914 231 0 0 6 0 "" "0.0" -"{WK_TB00000008_DEBUGRUN}" "TOOLBAR 0" 59419 0 3 "0.00" 0 298 189 0 0 18 0 "" "0.0" -"{WK_TB00000009_VERSIONCONTROL}" "TOOLBAR 0" 59419 1 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000011_CPU}" "TOOLBAR 0" 59419 2 1 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000012_MAP}" "TOOLBAR 0" 59419 1 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000013_SYMBOL}" "TOOLBAR 0" 59419 2 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" -"{WK_TB00000014_CODE}" "TOOLBAR 0" 59419 2 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000015_PERFORMANCE}" "TOOLBAR 0" 59419 2 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000016_GRAPHIC}" "TOOLBAR 0" 59419 2 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000018_DEFAULTWINDOW}" "TOOLBAR 0" 59419 1 2 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000023_RTOS}" "TOOLBAR 0" 59419 2 6 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000025_HELPSYSTEMTOOL}" "TOOLBAR 0" 59419 0 0 "0.00" 0 788 192 0 0 5 0 "" "0.0" -"{WK_TB00000026_MACRO}" "TOOLBAR 0" 59419 1 6 "0.00" 0 0 0 0 0 17 0 "" "0.0" -"{WK_TB00000028_RTOSDEBUG}" "TOOLBAR 0" 59419 0 0 "0.00" 0 559 254 0 0 5 0 "" "0.0" -"{WK_TB00000029_SYSTEMTOOL}" "TOOLBAR 0" 59419 2 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" -[WINDOW_POSITION_STATE_DATA_VD2] -[WINDOW_POSITION_STATE_DATA_VD3] -[WINDOW_POSITION_STATE_DATA_VD4] -[WINDOW_Z_ORDER] -"{WK_TB00000007_DEBUG} TOOLBAR 0" -"{WK_TB00000028_RTOSDEBUG} TOOLBAR 0" -"{WK_TB00000025_HELPSYSTEMTOOL} TOOLBAR 0" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-MDK_Renesas\RTOSDemo\main-full.c" -[TARGET_NAME] -"RX600 Simulator" "" 0 -[STATUSBAR_STATEINFO_VD1] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD2] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD3] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_STATEINFO_VD4] -"MasterShowState" 1 -"ApplicationShowState" 1 -"DebuggerShowState" 1 -[STATUSBAR_DEBUGGER_PANESTATE_VD1] -[STATUSBAR_DEBUGGER_PANESTATE_VD2] -[STATUSBAR_DEBUGGER_PANESTATE_VD3] -[STATUSBAR_DEBUGGER_PANESTATE_VD4] -[DEBUGGER_OPTIONS] -"[V|VERSION|1] [S|MAP|^"0x00000000,0x0001FFFF,RAM,32,101 0x00080000,0x000FFFFF,I/O,32,101 0x00100000,0x00107FFF,ROM,32,101 0x007F8000,0x007F9FFF,RAM,32,101 0x007FC000,0x007FC4FF,I/O,32,101 0x007FFC00,0x007FFFFF,I/O,32,101 0x00E00000,0x00FFFFFF,ROM,32,101 0xFEFFE000,0xFEFFFFFF,ROM,32,101 0xFF7FC000,0xFF7FFFFF,ROM,32,101 0xFFE00000,0xFFFFFFFF,ROM,32,101^"] [S|RESOURCE|^"0x00000000,0x0001FFFF,R/W 0x00080000,0x000FFFFF,R/W 0x007FC000,0x007FC4FF,R/W 0x007FFC00,0x007FFFFF,R/W 0xFFFF8000,0xFFFFFFFF,R/W^"] [B|SIMIOF|0] [I|SIMIOADR|0x00000000] [I|BUS_MODE|0] [S|ENDIAN|^"LITTLE^"] [S|PATCH|^"OFF^"] [S|ROM_MODE|^"^"]" -[DOWNLOAD_MODULES] -"$(CONFIGDIR)\$(PROJECTNAME).abs" 0 "Elf/Dwarf2" 0 0 1 0 -[CONNECT_ON_GO] -"FALSE" -[DOWNLOAD_MODULES_AFTER_BUILD] -"TRUE" -[REMOVE_BREAKPOINTS_ON_DOWNLOAD] -"FALSE" -[DISABLE_MEMORY_ACCESS_PRIOR_TO_COMMAND_FILE_EXECUTION] -"FALSE" -[LIMIT_DISASSEMBLY_MEMORY_ACCESS] -"FALSE" -[DISABLE_MEMORY_ACCESS_DURING_EXECUTION] -"FALSE" -[DEBUGGER_OPTIONS_PROPERTIES] -"1" -[COMMAND_FILES] -[DEFAULT_DEBUG_FORMAT] -"Elf/Dwarf2" -[FLASH_DETAILS] -"0.000000" 0 0 "" 0 "" 0 0 "" 1 1 0 0 0 0 0 "" "" "" "" "" -[BREAKPOINTS] -[END] diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-blinky.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-blinky.c deleted file mode 100644 index f6fd5f4ba..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-blinky.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - * This is a very simple demo that creates two tasks, one queue, and one - * software timer. For a much more complete and complex example select either - * the Debug or Debug_with_optimisation build configurations within the HEW, - * which build main_full.c in place of this file. - * - * One task (the queue receive task) blocks on the queue to wait for data to - * arrive, toggling LED0 each time '100' is received. The other task (the - * queue send task) repeatedly blocks for a fixed period before sending '100' - * to the queue (causing the first task to toggle the LED). - * - * The software timer is configured to auto-reload. The timer callback - * function periodically toggles LED1. - */ - -/* Hardware specific includes. */ -#include "iodefine.h" - -/* Kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" -#include "queue.h" - -/* Priorities at which the tasks are created. */ -#define configQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) - -/* The rate at which data is sent to the queue, specified in milliseconds. */ -#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_PERIOD_MS ) - -/* The period of the software timer, specified in milliseconds. */ -#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / portTICK_PERIOD_MS ) - -/* The number of items the queue can hold. This is 1 as the receive task -will remove items as they are added so the send task should always find the -queue empty. */ -#define mainQUEUE_LENGTH ( 1 ) - -/* The LEDs toggle by the task and timer respectively. */ -#define mainTASK_LED ( 0 ) -#define mainTIMER_LED ( 1 ) - -/* - * The tasks as defined at the top of this file. - */ -static void prvQueueReceiveTask( void *pvParameters ); -static void prvQueueSendTask( void *pvParameters ); - -/* - * The callback function used by the software timer. - */ -static void prvBlinkyTimerCallback( TimerHandle_t xTimer ); - -/* The queue used by both tasks. */ -static QueueHandle_t xQueue = NULL; - -/* This variable is not used by this simple Blinky example. It is defined -purely to allow the project to link as it is used by the full project. */ -volatile unsigned long ulHighFrequencyTickCount = 0UL; -/*-----------------------------------------------------------*/ - -void main(void) -{ -TimerHandle_t xTimer; - - /* Turn all LEDs off. */ - vParTestInitialise(); - - /* Create the queue. */ - xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) ); - - /* Create the software timer, as described at the top of this file. */ - xTimer = xTimerCreate( "BlinkyTimer", /* Just a text name to make debugging easier - not used by the scheduler. */ - mainSOFTWARE_TIMER_PERIOD_MS, /* The timer period. */ - pdTRUE, /* Set to pdTRUE for periodic timer, or pdFALSE for one-shot timer. */ - NULL, /* The timer ID is not required. */ - prvBlinkyTimerCallback ); /* The function executed when the timer expires. */ - - if( xTimer != NULL ) - { - /* Start the timer - it will not actually start running until the - scheduler has started. The block time is set to 0, although, because - xTimerStart() is being called before the scheduler has been started, - the any block time specified would be ignored anyway. */ - xTimerStart( xTimer, 0UL ); - } - - if( xQueue != NULL ) - { - /* Start the two tasks as described at the top of this file. */ - xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - "Rx", /* Just a text name to make debugging easier - not used by the scheduler. */ - configMINIMAL_STACK_SIZE, /* The size of the task stack, in words. */ - NULL, /* The task parameter is not used. */ - configQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task when it is created. */ - NULL ); /* The task handle is not used. */ - - xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL ); - - /* Start the tasks running. */ - vTaskStartScheduler(); - } - - /* If all is well we will never reach here as the scheduler will now be - running. If we do reach here then it is likely that there was insufficient - heap available for the idle task to be created. */ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -static void prvQueueSendTask( void *pvParameters ) -{ -TickType_t xNextWakeTime; -const unsigned long ulValueToSend = 100UL; - - /* Initialise xNextWakeTime - this only needs to be done once. */ - xNextWakeTime = xTaskGetTickCount(); - - for( ;; ) - { - /* Place this task in the blocked state until it is time to run again. - The block state is specified in ticks, the constant used converts ticks - to ms. */ - vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_PERIOD_MS ); - - /* Send to the queue - causing the queue receive task to flash its LED. 0 - is used so the send does not block - it shouldn't need to as the queue - should always be empty here. */ - xQueueSend( xQueue, &ulValueToSend, 0 ); - } -} -/*-----------------------------------------------------------*/ - -static void prvQueueReceiveTask( void *pvParameters ) -{ -unsigned long ulReceivedValue; - - for( ;; ) - { - /* Wait until something arives in the queue - this will block - indefinitely provided INCLUDE_vTaskSuspend is set to 1 in - FreeRTOSConfig.h. */ - xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY ); - - /* To get here something must have arrived, but is it the expected - value? If it is, toggle the LED. */ - if( ulReceivedValue == 100UL ) - { - vParTestToggleLED( mainTASK_LED ); - } - } -} -/*-----------------------------------------------------------*/ - -static void prvBlinkyTimerCallback( TimerHandle_t xTimer ) -{ - /* The software timer does nothing but toggle an LED. */ - vParTestToggleLED( mainTIMER_LED ); -} -/*-----------------------------------------------------------*/ - -void vApplicationSetupTimerInterrupt( void ) -{ - /* Enable compare match timer 0. */ - MSTP( CMT0 ) = 0; - - /* Interrupt on compare match. */ - CMT0.CMCR.BIT.CMIE = 1; - - /* Set the compare match value. */ - CMT0.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ ) -1 ) / 8 ); - - /* Divide the PCLK by 8. */ - CMT0.CMCR.BIT.CKS = 0; - - /* Enable the interrupt... */ - _IEN( _CMT0_CMI0 ) = 1; - - /* ...and set its priority to the application defined kernel priority. */ - _IPR( _CMT0_CMI0 ) = configKERNEL_INTERRUPT_PRIORITY; - - /* Start the timer. */ - CMT.CMSTR0.BIT.STR0 = 1; -} -/*-----------------------------------------------------------*/ - -/* This function is explained by the comments above its prototype at the top -of this file. */ -void vApplicationMallocFailedHook( void ) -{ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -/* This function is explained by the comments above its prototype at the top -of this file. */ -void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) -{ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -/* This function is explained by the comments above its prototype at the top -of this file. */ -void vApplicationIdleHook( void ) -{ - /* Just to prevent the variable getting optimised away. */ - ( void ) ulHighFrequencyTickCount; -} -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-full.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-full.c deleted file mode 100644 index ebb9024be..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/main-full.c +++ /dev/null @@ -1,675 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* **************************************************************************** - * This project includes a lot of tasks and tests and is therefore complex. - * If you would prefer a much simpler project to get started with then select - * the 'Blinky' build configuration within the HEW IDE. The Blinky - * configuration builds main-blinky.c in place of this file. - * **************************************************************************** - * - * Creates all the demo application tasks, then starts the scheduler. The web - * documentation provides more details of the standard demo application tasks, - * which provide no particular functionality but do provide a good example of - * how to use the FreeRTOS API. The tasks defined in flop.c are included in the - * set of standard demo tasks to ensure the floating point unit gets some - * exercise. - * - * In addition to the standard demo tasks, the following tasks and tests are - * defined and/or created within this file: - * - * Webserver ("uIP") task - This serves a number of dynamically generated WEB - * pages to a standard WEB browser. The IP and MAC addresses are configured by - * constants defined at the bottom of FreeRTOSConfig.h. Use either a standard - * Ethernet cable to connect through a hug, or a cross over (point to point) - * cable to connect directly. Ensure the IP address used is compatible with the - * IP address of the machine running the browser - the easiest way to achieve - * this is to ensure the first three octets of the IP addresses are the same. - * - * "Reg test" tasks - These fill the registers with known values, then check - * that each register still contains its expected value. Each task uses - * different values. The tasks run with very low priority so get preempted - * very frequently. A check variable is incremented on each iteration of the - * test loop. A register containing an unexpected value is indicative of an - * error in the context switching mechanism and will result in a branch to a - * null loop - which in turn will prevent the check variable from incrementing - * any further and allow the check task (described below) to determine that an - * error has occurred. The nature of the reg test tasks necessitates that they - * are written in assembly code. - * - * "Check" timer - The check software timer period is initially set to five - * seconds. The callback function associated with the check software timer - * checks that all the standard demo tasks, and the register check tasks, are - * not only still executing, but are executing without reporting any errors. If - * the check software timer discovers that a task has either stalled, or - * reported an error, then it changes its own execution period from the initial - * five seconds, to just 200ms. The check software timer callback function - * also toggles LED3 each time it is called. This provides a visual indication - * of the system status: If LED3 toggles every five seconds, then no issues - * have been discovered. If the LED toggles every 200ms, then an issue has been - * discovered with at least one task. - * - * "High frequency timer test" - A high frequency periodic interrupt is - * generated using a timer - the interrupt is assigned a priority above - * configMAX_SYSCALL_INTERRUPT_PRIORITY so should not be effected by anything - * the kernel is doing. The frequency and priority of the interrupt, in - * combination with other standard tests executed in this demo, should result - * in interrupts nesting at least 3 and probably 4 deep. This test is only - * included in build configurations that have the optimiser switched on. In - * optimised builds the count of high frequency ticks is used as the time base - * for the run time stats. - * - * *NOTE 1* If LED3 is toggling every 5 seconds then all the demo application - * tasks are executing as expected and no errors have been reported in any - * tasks. The toggle rate increasing to 200ms indicates that at least one task - * has reported unexpected behaviour. - * - * *NOTE 2* vApplicationSetupTimerInterrupt() is called by the kernel to let - * the application set up a timer to generate the tick interrupt. In this - * example a compare match timer is used for this purpose. - * - * *NOTE 3* The CPU must be in Supervisor mode when the scheduler is started. - * The PowerON_Reset_PC() supplied in resetprg.c with this demo has - * Change_PSW_PM_to_UserMode() commented out to ensure this is the case. - * - * *NOTE 4* The IntQueue common demo tasks test interrupt nesting and make use - * of all the 8bit timers (as two cascaded 16bit units). - * - */ - -#include - -/* Hardware specific includes. */ -#include "iodefine.h" - -/* Kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" -#include "semphr.h" - -/* Standard demo includes. */ -#include "partest.h" -#include "flash_timer.h" -#include "IntQueue.h" -#include "BlockQ.h" -#include "death.h" -#include "integer.h" -#include "blocktim.h" -#include "semtest.h" -#include "PollQ.h" -#include "GenQTest.h" -#include "QPeek.h" -#include "recmutex.h" -#include "flop.h" - -/* Values that are passed into the reg test tasks using the task parameter. The -tasks check that the values are passed in correctly. */ -#define mainREG_TEST_1_PARAMETER ( 0x12121212UL ) -#define mainREG_TEST_2_PARAMETER ( 0x12345678UL ) - -/* Priorities at which the tasks are created. */ -#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) -#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 ) -#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 ) -#define mainuIP_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) -#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY ) -#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) -#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY ) - -/* The WEB server uses string handling functions, which in turn use a bit more -stack than most of the other tasks. */ -#define mainuIP_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 ) - -/* The LED toggled by the check timer. */ -#define mainCHECK_LED ( 3 ) - -/* The rate at which mainCHECK_LED will toggle when all the tasks are running -without error. Controlled by the check timer as described at the top of this -file. */ -#define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_PERIOD_MS ) - -/* The rate at which mainCHECK_LED will toggle when an error has been reported -by at least one task. Controlled by the check timer as described at the top of -this file. */ -#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_PERIOD_MS ) - -/* A block time of zero simply means "don't block". */ -#define mainDONT_BLOCK ( 0UL ) - -/* A set of timers are created, each of which toggles and LED. This specifies -the number of timers to create. */ -#define mainNUMBER_OF_LEDS_TO_FLASH ( 3 ) - -/* - * vApplicationMallocFailedHook() will only be called if - * configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook - * function that will execute if a call to pvPortMalloc() fails. - * pvPortMalloc() is called internally by the kernel whenever a task, queue or - * semaphore is created. It is also called by various parts of the demo - * application. - */ -void vApplicationMallocFailedHook( void ); - -/* - * vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set to 1 - * in FreeRTOSConfig.h. It is a hook function that is called on each iteration - * of the idle task. It is essential that code added to this hook function - * never attempts to block in any way (for example, call xQueueReceive() with - * a block time specified). If the application makes use of the vTaskDelete() - * API function (as this demo application does) then it is also important that - * vApplicationIdleHook() is permitted to return to its calling function because - * it is the responsibility of the idle task to clean up memory allocated by the - * kernel to any task that has since been deleted. - */ -void vApplicationIdleHook( void ); - -/* - * vApplicationStackOverflowHook() will only be called if - * configCHECK_FOR_STACK_OVERFLOW is set to a non-zero value. The handle and - * name of the offending task should be passed in the function parameters, but - * it is possible that the stack overflow will have corrupted these - in which - * case pxCurrentTCB can be inspected to find the same information. - */ -void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ); - -/* - * The reg test tasks as described at the top of this file. - */ -static void prvRegTest1Task( void *pvParameters ); -static void prvRegTest2Task( void *pvParameters ); - -/* - * The actual implementation of the reg test functionality, which, because of - * the direct register access, have to be in assembly. - */ -static void prvRegTest1Implementation( void ); -static void prvRegTest2Implementation( void ); - -/* - * The check timer callback function, as described at the top of this file. - */ -static void prvCheckTimerCallback( TimerHandle_t xTimer ); - -/* - * Contains the implementation of the WEB server. - */ -extern void vuIP_Task( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -/* Variables that are incremented on each iteration of the reg test tasks - -provided the tasks have not reported any errors. The check task inspects these -variables to ensure they are still incrementing as expected. If a variable -stops incrementing then it is likely that its associate task has stalled. */ -unsigned long ulRegTest1CycleCount = 0UL, ulRegTest2CycleCount = 0UL; - -/* The status message that is displayed at the bottom of the "task stats" web -page, which is served by the uIP task. This will report any errors picked up -by the reg test task. */ -const char *pcStatusMessage = "All tasks executing without error."; - -/*-----------------------------------------------------------*/ - -void main(void) -{ -TimerHandle_t xCheckTimer; -extern void HardwareSetup( void ); - - /* Turn all LEDs off. */ - vParTestInitialise(); - - /* Start the reg test tasks which test the context switching mechanism. */ - xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); - - /* The web server task. NOTE: COMMENTED OUT AS THE ETHERNET PORT IS NOT - YET BEING CONFIGURED IN hwsetup.c. */ - //xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); - - /* Create the standard demo tasks. */ - vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); - vCreateBlockTimeTasks(); - vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); - vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); - vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); - vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); - vStartQueuePeekTasks(); - vStartRecursiveMutexTasks(); - vStartInterruptQueueTasks(); - vStartMathTasks( mainFLOP_TASK_PRIORITY ); - - /* Create the timers used to toggle the LEDs. */ - vStartLEDFlashTimers( mainNUMBER_OF_LEDS_TO_FLASH ); - - /* Create the software timer that performs the 'check' functionality, - as described at the top of this file. */ - xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */ - ( mainNO_ERROR_CHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - - if( xCheckTimer != NULL ) - { - xTimerStart( xCheckTimer, mainDONT_BLOCK ); - } - - /* The suicide tasks must be created last as they need to know how many - tasks were running prior to their creation in order to ascertain whether - or not the correct/expected number of tasks are running at any given time. */ - vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); - - /* Start the tasks running. */ - vTaskStartScheduler(); - - /* If all is well, the scheduler will now be running, and the following line - will never be reached. If the following line does execute, then there was - insufficient FreeRTOS heap memory available for the idle and/or timer tasks - to be created. See the memory management section on the FreeRTOS web site - for more details. */ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -static void prvCheckTimerCallback( TimerHandle_t xTimer ) -{ -static long lChangedTimerPeriodAlready = pdFALSE; -static unsigned long ulLastRegTest1CycleCount = 0, ulLastRegTest2CycleCount = 0; -long lErrorFound = pdFALSE; - - /* If this is being executed then the kernel has been started. Start the - high frequency timer test as described at the top of this file. This is - only included in the optimised build configuration - otherwise it takes up - too much CPU time and can disrupt other tests. */ - #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST - vSetupHighFrequencyTimer(); - #endif - - /* Check the standard demo tasks are running without error. */ - if( xAreGenericQueueTasksStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: GenQueue"; - } - else if( xAreQueuePeekTasksStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: QueuePeek"; - } - else if( xAreBlockingQueuesStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: BlockQueue"; - } - else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: BlockTime"; - } - else if( xAreSemaphoreTasksStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: SemTest"; - } - else if( xArePollingQueuesStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: PollQueue"; - } - else if( xIsCreateTaskStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: Death"; - } - else if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: IntMath"; - } - else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: RecMutex"; - } - else if( xAreIntQueueTasksStillRunning() != pdPASS ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: IntQueue"; - } - else if( xAreMathsTaskStillRunning() != pdPASS ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: Flop"; - } - - /* Check the reg test tasks are still cycling. They will stop incrementing - their loop counters if they encounter an error. */ - if( ulRegTest1CycleCount == ulLastRegTest1CycleCount ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: RegTest1"; - } - - if( ulRegTest2CycleCount == ulLastRegTest2CycleCount ) - { - lErrorFound = pdTRUE; - pcStatusMessage = "Error: RegTest2"; - } - - ulLastRegTest1CycleCount = ulRegTest1CycleCount; - ulLastRegTest2CycleCount = ulRegTest2CycleCount; - - /* Toggle the check LED to give an indication of the system status. If - the LED toggles every mainNO_ERROR_CHECK_TIMER_PERIOD_MS milliseconds then - everything is ok. A faster toggle indicates an error. */ - vParTestToggleLED( mainCHECK_LED ); - - /* Have any errors been latch in lErrorFound? If so, shorten the - period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. - This will result in an increase in the rate at which mainCHECK_LED - toggles. */ - if( lErrorFound != pdFALSE ) - { - if( lChangedTimerPeriodAlready == pdFALSE ) - { - lChangedTimerPeriodAlready = pdTRUE; - - /* This call to xTimerChangePeriod() uses a zero block time. - Functions called from inside of a timer callback function must - *never* attempt to block. */ - xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); - } - } -} -/*-----------------------------------------------------------*/ - -/* The RX port uses this callback function to configure its tick interrupt. -This allows the application to choose the tick interrupt source. */ -void vApplicationSetupTimerInterrupt( void ) -{ - /* Enable compare match timer 0. */ - MSTP( CMT0 ) = 0; - - /* Interrupt on compare match. */ - CMT0.CMCR.BIT.CMIE = 1; - - /* Set the compare match value. */ - CMT0.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ ) -1 ) / 8 ); - - /* Divide the PCLK by 8. */ - CMT0.CMCR.BIT.CKS = 0; - - /* Enable the interrupt... */ - _IEN( _CMT0_CMI0 ) = 1; - - /* ...and set its priority to the application defined kernel priority. */ - _IPR( _CMT0_CMI0 ) = configKERNEL_INTERRUPT_PRIORITY; - - /* Start the timer. */ - CMT.CMSTR0.BIT.STR0 = 1; -} -/*-----------------------------------------------------------*/ - -/* This function is explained by the comments above its prototype at the top -of this file. */ -void vApplicationMallocFailedHook( void ) -{ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -/* This function is explained by the comments above its prototype at the top -of this file. */ -void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName ) -{ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -/* This function is explained by the comments above its prototype at the top -of this file. */ -void vApplicationIdleHook( void ) -{ -} -/*-----------------------------------------------------------*/ - -/* This function is explained in the comments at the top of this file. */ -static void prvRegTest1Task( void *pvParameters ) -{ - if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_1_PARAMETER ) - { - /* The parameter did not contain the expected value. */ - for( ;; ) - { - /* Stop the tick interrupt so its obvious something has gone wrong. */ - taskDISABLE_INTERRUPTS(); - } - } - - /* This is an inline asm function that never returns. */ - prvRegTest1Implementation(); -} -/*-----------------------------------------------------------*/ - -/* This function is explained in the comments at the top of this file. */ -static void prvRegTest2Task( void *pvParameters ) -{ - if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_2_PARAMETER ) - { - /* The parameter did not contain the expected value. */ - for( ;; ) - { - /* Stop the tick interrupt so its obvious something has gone wrong. */ - taskDISABLE_INTERRUPTS(); - } - } - - /* This is an inline asm function that never returns. */ - prvRegTest2Implementation(); -} -/*-----------------------------------------------------------*/ - -/* This function is explained in the comments at the top of this file. */ -#pragma inline_asm prvRegTest1Implementation -static void prvRegTest1Implementation( void ) -{ - ; Put a known value in each register. - MOV.L #1, R1 - MOV.L #2, R2 - MOV.L #3, R3 - MOV.L #4, R4 - MOV.L #5, R5 - MOV.L #6, R6 - MOV.L #7, R7 - MOV.L #8, R8 - MOV.L #9, R9 - MOV.L #10, R10 - MOV.L #11, R11 - MOV.L #12, R12 - MOV.L #13, R13 - MOV.L #14, R14 - MOV.L #15, R15 - - ; Loop, checking each iteration that each register still contains the - ; expected value. -TestLoop1: - - ; Push the registers that are going to get clobbered. - PUSHM R14-R15 - - ; Increment the loop counter to show this task is still getting CPU time. - MOV.L #_ulRegTest1CycleCount, R14 - MOV.L [ R14 ], R15 - ADD #1, R15 - MOV.L R15, [ R14 ] - - ; Yield to extend the text coverage. Set the bit in the ITU SWINTR register. - MOV.L #1, R14 - MOV.L #0872E0H, R15 - MOV.B R14, [R15] - NOP - NOP - - ; Restore the clobbered registers. - POPM R14-R15 - - ; Now compare each register to ensure it still contains the value that was - ; set before this loop was entered. - CMP #1, R1 - BNE RegTest1Error - CMP #2, R2 - BNE RegTest1Error - CMP #3, R3 - BNE RegTest1Error - CMP #4, R4 - BNE RegTest1Error - CMP #5, R5 - BNE RegTest1Error - CMP #6, R6 - BNE RegTest1Error - CMP #7, R7 - BNE RegTest1Error - CMP #8, R8 - BNE RegTest1Error - CMP #9, R9 - BNE RegTest1Error - CMP #10, R10 - BNE RegTest1Error - CMP #11, R11 - BNE RegTest1Error - CMP #12, R12 - BNE RegTest1Error - CMP #13, R13 - BNE RegTest1Error - CMP #14, R14 - BNE RegTest1Error - CMP #15, R15 - BNE RegTest1Error - - ; All comparisons passed, start a new itteratio of this loop. - BRA TestLoop1 - -RegTest1Error: - ; A compare failed, just loop here so the loop counter stops incrementing - ; causing the check task to indicate the error. - BRA RegTest1Error -} -/*-----------------------------------------------------------*/ - -/* This function is explained in the comments at the top of this file. */ -#pragma inline_asm prvRegTest2Implementation -static void prvRegTest2Implementation( void ) -{ - ; Put a known value in each register. - MOV.L #10, R1 - MOV.L #20, R2 - MOV.L #30, R3 - MOV.L #40, R4 - MOV.L #50, R5 - MOV.L #60, R6 - MOV.L #70, R7 - MOV.L #80, R8 - MOV.L #90, R9 - MOV.L #100, R10 - MOV.L #110, R11 - MOV.L #120, R12 - MOV.L #130, R13 - MOV.L #140, R14 - MOV.L #150, R15 - - ; Loop, checking on each iteration that each register still contains the - ; expected value. -TestLoop2: - - ; Push the registers that are going to get clobbered. - PUSHM R14-R15 - - ; Increment the loop counter to show this task is still getting CPU time. - MOV.L #_ulRegTest2CycleCount, R14 - MOV.L [ R14 ], R15 - ADD #1, R15 - MOV.L R15, [ R14 ] - - ; Restore the clobbered registers. - POPM R14-R15 - - CMP #10, R1 - BNE RegTest2Error - CMP #20, R2 - BNE RegTest2Error - CMP #30, R3 - BNE RegTest2Error - CMP #40, R4 - BNE RegTest2Error - CMP #50, R5 - BNE RegTest2Error - CMP #60, R6 - BNE RegTest2Error - CMP #70, R7 - BNE RegTest2Error - CMP #80, R8 - BNE RegTest2Error - CMP #90, R9 - BNE RegTest2Error - CMP #100, R10 - BNE RegTest2Error - CMP #110, R11 - BNE RegTest2Error - CMP #120, R12 - BNE RegTest2Error - CMP #130, R13 - BNE RegTest2Error - CMP #140, R14 - BNE RegTest2Error - CMP #150, R15 - BNE RegTest2Error - - ; All comparisons passed, start a new itteratio of this loop. - BRA TestLoop2 - -RegTest2Error: - ; A compare failed, just loop here so the loop counter stops incrementing - ; - causing the check task to indicate the error. - BRA RegTest2Error -} -/*-----------------------------------------------------------*/ - -char *pcGetTaskStatusMessage( void ) -{ - /* Not bothered about a critical section here although technically because of - the task priorities the pointer could change it will be atomic if not near - atomic and its not critical. */ - return ( char * ) pcStatusMessage; -} -/*-----------------------------------------------------------*/ - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/r_bsp_config.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/r_bsp_config.h deleted file mode 100644 index 1ddbb9d00..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/r_bsp_config.h +++ /dev/null @@ -1,149 +0,0 @@ -/*********************************************************************************************************************** -* DISCLAIMER -* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No -* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all -* applicable laws, including copyright laws. -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM -* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES -* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS -* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of -* this software. By using this software, you agree to the additional terms and conditions found by accessing the -* following link: -* http://www.renesas.com/disclaimer -* -* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. -***********************************************************************************************************************/ -/*********************************************************************************************************************** -* File Name : r_bsp_config_reference.c -* Device(s) : RX63x -* Description : The file r_bsp_config.h is used to configure your BSP. r_bsp_config.h should be included -* somewhere in your package so that the r_bsp code has access to it. This file (r_bsp_config_reference.h) -* is just a reference file that the user can use to make their own r_bsp_config.h file. -************************************************************************************************************************ -* History : DD.MM.YYYY Version Description -* : 13.03.2012 1.00 First Release -***********************************************************************************************************************/ -#ifndef R_BSP_CONFIG_REF_HEADER_FILE -#define R_BSP_CONFIG_REF_HEADER_FILE - -/*********************************************************************************************************************** -Configuration Options -***********************************************************************************************************************/ -/* The 'BSP_DECLARE_STACK' macro is checked so that the stack is only declared in one place (resetprg.c). Every time a - '#pragma stacksize' is encountered, the stack size is increased. This prevents multiplication of stack size. */ -#if defined(BSP_DECLARE_STACK) -/* User Stack size in bytes. The Renesas RX toolchain sets the stack size using the #pragma stacksize directive. */ -#pragma stacksize su=0x1000 -/* Interrupt Stack size in bytes. The Renesas RX toolchain sets the stack size using the #pragma stacksize directive. */ -#pragma stacksize si=0x400 -#endif - -/* Heap size in bytes. */ -#define HEAP_BYTES (0x4) - -/* After reset MCU will operate in Supervisor mode. To switch to User mode, set this macro to '1'. For more information - on the differences between these 2 modes see the CPU >> Processor Mode section of your MCU's hardware manual. - 0 = Stay in Supervisor mode. - 1 = Switch to User mode. -*/ -#define RUN_IN_USER_MODE (0) - -/* To get into User Boot Mode the user must control some pins on the MCU and also set some values in ROM. These values - in ROM are described in the Option-Setting Memory section of the hardware manual. This macro sets these values so - that User Boot Mode can be used. The user is still responsible for setting the MCU pins appropriately. - 0 = Single-Chip or USB Boot Mode - 1 = User Boot Mode -*/ -#define USER_BOOT_ENABLE (0) - -/* Set your desired ID code. NOTE, leave at the default (all 0xFF's) if you do not wish to use an ID code. If you set - this value and program it into the MCU then you will need to remember the ID code because the debugger will ask for - it when trying to connect. Note that the E1/E20 will ignore the ID code when programming the MCU during debugging. - If you set this value and then forget it then you can clear the ID code by connecting up in serial boot mode using - FDT. The ID Code is 16 bytes long. The macro below define the ID Code in 4-byte sections. */ -/* Lowest 4-byte section, address 0xFFFFFFA0. From MSB to LSB: Control Code, ID code 1, ID code 2, ID code 3. */ -#define ID_CODE_LONG_1 (0xFFFFFFFF) -/* 2nd ID Code section, address 0xFFFFFFA4. From MSB to LSB: ID code 4, ID code 5, ID code 6, ID code 7. */ -#define ID_CODE_LONG_2 (0xFFFFFFFF) -/* 3rd ID Code section, address 0xFFFFFFA8. From MSB to LSB: ID code 8, ID code 9, ID code 10, ID code 11. */ -#define ID_CODE_LONG_3 (0xFFFFFFFF) -/* 4th ID Code section, address 0xFFFFFFAC. From MSB to LSB: ID code 12, ID code 13, ID code 14, ID code 15. */ -#define ID_CODE_LONG_4 (0xFFFFFFFF) - -/* This macro lets other modules no if a RTOS is being used. - 0 = RTOS is not used. - 1 = RTOS is used. -*/ -#define RTOS_USED (0) - -/* Clock source select (CKSEL). - 0 = Low Speed On-Chip Oscillator (LOCO) - 1 = High Speed On-Chip Oscillator (HOCO) - 2 = Main Clock Oscillator - 3 = Sub-Clock Oscillator - 4 = PLL Circuit -*/ -#define CLOCK_SOURCE (4) - -/* Clock configuration options. - The input clock frequency is specified and then the system clocks are set by specifying the multipliers used. The - multiplier settings are used to set the clock registers in resetprg.c. If a 12MHz clock is used and the - ICLK is 96MHz, PCLKA is 48MHz, PCLKB is 48MHz, FCLK is 48MHz, USB Clock is 48MHz, and BCLK is 12MHz then the - settings would be: - - XTAL_HZ = 12000000 - PLL_DIV = 1 (no division) - PLL_MUL = 16 (12MHz x 16 = 192MHz) - ICK_DIV = 2 : System Clock (ICLK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / ICK_DIV) = 96MHz - PCKA_DIV = 4 : Peripheral Clock A (PCLKA) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / PCKA_DIV) = 48MHz - PCKB_DIV = 4 : Peripheral Clock B (PCLKB) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / PCKB_DIV) = 48MHz - FCK_DIV = 4 : Flash IF Clock (FCLK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / FCK_DIV) = 48MHz - BCK_DIV = 8 : External Bus Clock (BCK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / BCK_DIV) = 24MHz - UCK_DIV = 4 : USB Clock (UCLK) = (((XTAL_HZ/PLL_DIV) * PLL_MUL) / UCK_DIV) = 48MHz -*/ -/* XTAL - Input clock frequency in Hz */ -#define XTAL_HZ (12000000) -/* PLL Input Frequency Divider Select (PLIDIV). - Available divisors = /1 (no division), /2, /4 -*/ -#define PLL_DIV (1) -/* PLL Frequency Multiplication Factor Select (STC). - Available multipliers = x8, x10, x12, x16, x20, x24, x25, x50 -*/ -#define PLL_MUL (16) -/* System Clock Divider (ICK). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define ICK_DIV (2) -/* Peripheral Module Clock A Divider (PCKA). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define PCKA_DIV (4) -/* Peripheral Module Clock B Divider (PCKB). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define PCKB_DIV (4) -/* External Bus Clock Divider (BCK). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define BCK_DIV (8) -/* Flash IF Clock Divider (FCK). - Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64 -*/ -#define FCK_DIV (4) -/* IEBUS Clock Divider Select. - Available divisors = /1 (no division), /2, /4, /6, /8, /16, /32, /64 -*/ -#define IEBCK_DIV (8) -/* USB Clock Divider Select. - Available divisors = /3, /4 -*/ -#define UCK_DIV (4) - -#endif /* R_BSP_CONFIG_REF_HEADER_FILE */ - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c deleted file mode 100644 index 844630d7b..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/uIP_Task.c +++ /dev/null @@ -1,319 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* Standard includes. */ -#include - -/* Scheduler includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" -#include "queue.h" - -/* uip includes. */ -#include "net/uip.h" -#include "net/uip_arp.h" -#include "apps/httpd/httpd.h" -#include "sys/timer.h" -#include "net/clock-arch.h" -#include "r_ether.h" - -/* Demo includes. */ -#include "ParTest.h" - -/*-----------------------------------------------------------*/ - -/* How long to wait before attempting to connect the MAC again. */ -#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS ) - -/* Shortcut to the header within the Rx buffer. */ -#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ]) - -/* Standard constant. */ -#define uipTOTAL_FRAME_HEADER_SIZE 54 - -/* The ARP timer and the periodic timer share a callback function, so the -respective timer IDs are used to determine which timer actually expired. These -constants are assigned to the timer IDs. */ -#define uipARP_TIMER 0 -#define uipPERIODIC_TIMER 1 - -/* A block time of zero ticks simply means, "don't block". */ -#define uipDONT_BLOCK 0UL - -/*-----------------------------------------------------------*/ - -/* - * Setup the MAC address in the MAC itself, and in the uIP stack. - */ -static void prvSetMACAddress( void ); - -/* - * Perform any uIP initialisation necessary. - */ -static void prvInitialise_uIP( void ); - -/* - * The callback function that is assigned to both the periodic timer and the - * ARP timer. - */ -static void prvUIPTimerCallback( TimerHandle_t xTimer ); - -/* - * Port functions required by the uIP stack. - */ -clock_time_t clock_time( void ); - -/*-----------------------------------------------------------*/ - -/* The queue used to send TCP/IP events to the uIP stack. */ -QueueHandle_t xEMACEventQueue = NULL; - -/*-----------------------------------------------------------*/ - -clock_time_t clock_time( void ) -{ - return xTaskGetTickCount(); -} -/*-----------------------------------------------------------*/ - -void vuIP_Task( void *pvParameters ) -{ -portBASE_TYPE i; -unsigned long ulNewEvent = 0UL; -unsigned long ulUIP_Events = 0UL; - - ( void ) pvParameters; - - /* Initialise the uIP stack. */ - prvInitialise_uIP(); - - /* Initialise the MAC. */ - vInitEmac(); - - while( lEMACWaitForLink() != pdPASS ) - { - vTaskDelay( uipINIT_WAIT ); - } - - for( ;; ) - { - if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) - { - /* Is there received data ready to be processed? */ - uip_len = ( unsigned short ) ulEMACRead(); - - if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) - { - /* Standard uIP loop taken from the uIP manual. */ - if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) - { - uip_arp_ipin(); - uip_input(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - uip_arp_out(); - vEMACWrite(); - } - } - else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) - { - uip_arp_arpin(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - vEMACWrite(); - } - } - } - else - { - ulUIP_Events &= ~uipETHERNET_RX_EVENT; - } - } - - if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) - { - ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; - - for( i = 0; i < UIP_CONNS; i++ ) - { - uip_periodic( i ); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - uip_arp_out(); - vEMACWrite(); - } - } - } - - /* Call the ARP timer function every 10 seconds. */ - if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) - { - ulUIP_Events &= ~uipARP_TIMER_EVENT; - uip_arp_timer(); - } - - if( ulUIP_Events == pdFALSE ) - { - xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); - ulUIP_Events |= ulNewEvent; - } - } -} -/*-----------------------------------------------------------*/ - -static void prvInitialise_uIP( void ) -{ -TimerHandle_t xARPTimer, xPeriodicTimer; -uip_ipaddr_t xIPAddr; -const unsigned long ul_uIPEventQueueLength = 10UL; - - /* Initialise the uIP stack. */ - uip_init(); - uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - uip_sethostaddr( &xIPAddr ); - uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); - uip_setnetmask( &xIPAddr ); - prvSetMACAddress(); - httpd_init(); - - /* Create the queue used to sent TCP/IP events to the uIP stack. */ - xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); - - /* Create and start the uIP timers. */ - xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ - ( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */ - pdTRUE, /* Autor-reload. */ - ( void * ) uipARP_TIMER, - prvUIPTimerCallback - ); - - xPeriodicTimer = xTimerCreate( "PeriodicTimer", - ( 50 / portTICK_PERIOD_MS ), - pdTRUE, /* Autor-reload. */ - ( void * ) uipPERIODIC_TIMER, - prvUIPTimerCallback - ); - - configASSERT( xARPTimer ); - configASSERT( xPeriodicTimer ); - - xTimerStart( xARPTimer, portMAX_DELAY ); - xTimerStart( xPeriodicTimer, portMAX_DELAY ); -} -/*-----------------------------------------------------------*/ - -static void prvUIPTimerCallback( TimerHandle_t xTimer ) -{ -static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; -static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; - - /* This is a time callback, so calls to xQueueSend() must not attempt to - block. */ - switch( ( int ) pvTimerGetTimerID( xTimer ) ) - { - case uipARP_TIMER : xQueueSend( xEMACEventQueue, &ulARPTimerExpired, uipDONT_BLOCK ); - break; - - case uipPERIODIC_TIMER : xQueueSend( xEMACEventQueue, &ulPeriodicTimerExpired, uipDONT_BLOCK ); - break; - - default : /* Should not get here. */ - break; - } -} -/*-----------------------------------------------------------*/ - -static void prvSetMACAddress( void ) -{ -struct uip_eth_addr xAddr; - - /* Configure the MAC address in the uIP stack. */ - xAddr.addr[ 0 ] = configMAC_ADDR0; - xAddr.addr[ 1 ] = configMAC_ADDR1; - xAddr.addr[ 2 ] = configMAC_ADDR2; - xAddr.addr[ 3 ] = configMAC_ADDR3; - xAddr.addr[ 4 ] = configMAC_ADDR4; - xAddr.addr[ 5 ] = configMAC_ADDR5; - uip_setethaddr( xAddr ); -} -/*-----------------------------------------------------------*/ - -void vApplicationProcessFormInput( char *pcInputString ) -{ -char *c; - - /* Only interested in processing form input if this is the IO page. */ - c = strstr( pcInputString, "io.shtml" ); - - if( c ) - { - /* Is there a command in the string? */ - c = strstr( pcInputString, "?" ); - if( c ) - { - /* Turn the LED's on or off in accordance with the check box status. */ - if( strstr( c, "LED0=1" ) != NULL ) - { - /* Turn the LEDs on. */ - vParTestSetLED( 7, 1 ); - vParTestSetLED( 8, 1 ); - vParTestSetLED( 9, 1 ); - vParTestSetLED( 10, 1 ); - } - else - { - /* Turn the LEDs off. */ - vParTestSetLED( 7, 0 ); - vParTestSetLED( 8, 0 ); - vParTestSetLED( 9, 0 ); - vParTestSetLED( 10, 0 ); - } - } - else - { - /* Commands to turn LEDs off are not always explicit. */ - vParTestSetLED( 7, 0 ); - vParTestSetLED( 8, 0 ); - vParTestSetLED( 9, 0 ); - vParTestSetLED( 10, 0 ); - } - } -} - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/EMAC.c deleted file mode 100644 index 63c92a75c..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/EMAC.c +++ /dev/null @@ -1,535 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* Hardware specific includes. */ -#include "platform.h" -#include "r_ether.h" -#include "phy.h" - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* uIP includes. */ -#include "net/uip.h" - -/* The time to wait between attempts to obtain a free buffer. */ -#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS ) - -/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving -up on attempting to obtain a free buffer all together. */ -#define emacBUFFER_WAIT_ATTEMPTS ( 30 ) - -/* The number of Rx descriptors. */ -#define emacNUM_RX_DESCRIPTORS 8 - -/* The number of Tx descriptors. When using uIP there is not point in having -more than two. */ -#define emacNUM_TX_BUFFERS 2 - -/* The total number of EMAC buffers to allocate. */ -#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS ) - -/* The time to wait for the Tx descriptor to become free. */ -#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS ) - -/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to -become free. */ -#define emacTX_WAIT_ATTEMPTS ( 50 ) - -/* Only Rx end and Tx end interrupts are used by this driver. */ -#define emacTX_END_INTERRUPT ( 1UL << 21UL ) -#define emacRX_END_INTERRUPT ( 1UL << 18UL ) - -/*-----------------------------------------------------------*/ - -/* The buffers and descriptors themselves. */ -#pragma section _RX_DESC - volatile ethfifo xRxDescriptors[ emacNUM_RX_DESCRIPTORS ]; -#pragma section _TX_DESC - volatile ethfifo xTxDescriptors[ emacNUM_TX_BUFFERS ]; -#pragma section _ETHERNET_BUFFERS - struct - { - unsigned long ulAlignmentVariable; - char cBuffer[ emacNUM_BUFFERS ][ UIP_BUFSIZE ]; - } xEthernetBuffers; -#pragma section - - - - -/* Used to indicate which buffers are free and which are in use. If an index -contains 0 then the corresponding buffer in xEthernetBuffers is free, otherwise -the buffer is in use or about to be used. */ -static unsigned char ucBufferInUse[ emacNUM_BUFFERS ]; - -/*-----------------------------------------------------------*/ - -/* - * Initialise both the Rx and Tx descriptors. - */ -static void prvInitialiseDescriptors( void ); - -/* - * Return a pointer to a free buffer within xEthernetBuffers. - */ -static unsigned char *prvGetNextBuffer( void ); - -/* - * Return a buffer to the list of free buffers. - */ -static void prvReturnBuffer( unsigned char *pucBuffer ); - -/* - * Examine the status of the next Rx FIFO to see if it contains new data. - */ -static unsigned long prvCheckRxFifoStatus( void ); - -/* - * Setup the microcontroller for communication with the PHY. - */ -static void prvResetMAC( void ); - -/* - * Configure the Ethernet interface peripherals. - */ -static void prvConfigureEtherCAndEDMAC( void ); - -/* - * Something has gone wrong with the descriptor usage. Reset all the buffers - * and descriptors. - */ -static void prvResetEverything( void ); - -/*-----------------------------------------------------------*/ - -/* Points to the Rx descriptor currently in use. */ -static ethfifo *pxCurrentRxDesc = NULL; - -/* The buffer used by the uIP stack to both receive and send. This points to -one of the Ethernet buffers when its actually in use. */ -unsigned char *uip_buf = NULL; - -/*-----------------------------------------------------------*/ - -void vInitEmac( void ) -{ - /* Software reset. */ - prvResetMAC(); - - /* Set the Rx and Tx descriptors into their initial state. */ - prvInitialiseDescriptors(); - - /* Set the MAC address into the ETHERC */ - ETHERC.MAHR = ( ( unsigned long ) configMAC_ADDR0 << 24UL ) | - ( ( unsigned long ) configMAC_ADDR1 << 16UL ) | - ( ( unsigned long ) configMAC_ADDR2 << 8UL ) | - ( unsigned long ) configMAC_ADDR3; - - ETHERC.MALR.BIT.MA = ( ( unsigned long ) configMAC_ADDR4 << 8UL ) | - ( unsigned long ) configMAC_ADDR5; - - /* Perform rest of interface hardware configuration. */ - prvConfigureEtherCAndEDMAC(); - - /* Nothing received yet, so uip_buf points nowhere. */ - uip_buf = NULL; - - /* Initialize the PHY */ - phy_init(); -} -/*-----------------------------------------------------------*/ - -void vEMACWrite( void ) -{ -long x; - - /* Wait until the second transmission of the last packet has completed. */ - for( x = 0; x < emacTX_WAIT_ATTEMPTS; x++ ) - { - if( ( xTxDescriptors[ 1 ].status & ACT ) != 0 ) - { - /* Descriptor is still active. */ - vTaskDelay( emacTX_WAIT_DELAY_ms ); - } - else - { - break; - } - } - - /* Is the descriptor free after waiting for it? */ - if( ( xTxDescriptors[ 1 ].status & ACT ) != 0 ) - { - /* Something has gone wrong. */ - prvResetEverything(); - } - - /* Setup both descriptors to transmit the frame. */ - xTxDescriptors[ 0 ].buf_p = ( char * ) uip_buf; - xTxDescriptors[ 0 ].bufsize = uip_len; - xTxDescriptors[ 1 ].buf_p = ( char * ) uip_buf; - xTxDescriptors[ 1 ].bufsize = uip_len; - - /* uip_buf is being sent by the Tx descriptor. Allocate a new buffer - for use by the stack. */ - uip_buf = prvGetNextBuffer(); - - /* Clear previous settings and go. */ - xTxDescriptors[0].status &= ~( FP1 | FP0 ); - xTxDescriptors[0].status |= ( FP1 | FP0 | ACT ); - xTxDescriptors[1].status &= ~( FP1 | FP0 ); - xTxDescriptors[1].status |= ( FP1 | FP0 | ACT ); - - EDMAC.EDTRR.LONG = 0x00000001; -} -/*-----------------------------------------------------------*/ - -unsigned long ulEMACRead( void ) -{ -unsigned long ulBytesReceived; - - ulBytesReceived = prvCheckRxFifoStatus(); - - if( ulBytesReceived > 0 ) - { - /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to - the buffer that contains the received data. */ - prvReturnBuffer( uip_buf ); - - /* Point uip_buf to the data about ot be processed. */ - uip_buf = ( void * ) pxCurrentRxDesc->buf_p; - - /* Allocate a new buffer to the descriptor, as uip_buf is now using it's - old descriptor. */ - pxCurrentRxDesc->buf_p = prvGetNextBuffer(); - - /* Prepare the descriptor to go again. */ - pxCurrentRxDesc->status &= ~( FP1 | FP0 ); - pxCurrentRxDesc->status |= ACT; - - /* Move onto the next buffer in the ring. */ - pxCurrentRxDesc = pxCurrentRxDesc->next; - - if( EDMAC.EDRRR.LONG == 0x00000000L ) - { - /* Restart Ethernet if it has stopped */ - EDMAC.EDRRR.LONG = 0x00000001L; - } - } - - return ulBytesReceived; -} -/*-----------------------------------------------------------*/ - -long lEMACWaitForLink( void ) -{ -long lReturn; - - /* Set the link status. */ - switch( phy_set_autonegotiate() ) - { - /* Half duplex link */ - case PHY_LINK_100H: - ETHERC.ECMR.BIT.DM = 0; - ETHERC.ECMR.BIT.RTM = 1; - lReturn = pdPASS; - break; - - case PHY_LINK_10H: - ETHERC.ECMR.BIT.DM = 0; - ETHERC.ECMR.BIT.RTM = 0; - lReturn = pdPASS; - break; - - - /* Full duplex link */ - case PHY_LINK_100F: - ETHERC.ECMR.BIT.DM = 1; - ETHERC.ECMR.BIT.RTM = 1; - lReturn = pdPASS; - break; - - case PHY_LINK_10F: - ETHERC.ECMR.BIT.DM = 1; - ETHERC.ECMR.BIT.RTM = 0; - lReturn = pdPASS; - break; - - default: - lReturn = pdFAIL; - break; - } - - if( lReturn == pdPASS ) - { - /* Enable receive and transmit. */ - ETHERC.ECMR.BIT.RE = 1; - ETHERC.ECMR.BIT.TE = 1; - - /* Enable EDMAC receive */ - EDMAC.EDRRR.LONG = 0x1; - } - - return lReturn; -} -/*-----------------------------------------------------------*/ - -static void prvInitialiseDescriptors( void ) -{ -ethfifo *pxDescriptor; -long x; - - for( x = 0; x < emacNUM_BUFFERS; x++ ) - { - /* Ensure none of the buffers are shown as in use at the start. */ - ucBufferInUse[ x ] = pdFALSE; - } - - /* Initialise the Rx descriptors. */ - for( x = 0; x < emacNUM_RX_DESCRIPTORS; x++ ) - { - pxDescriptor = &( xRxDescriptors[ x ] ); - pxDescriptor->buf_p = &( xEthernetBuffers.cBuffer[ x ][ 0 ] ); - - pxDescriptor->bufsize = UIP_BUFSIZE; - pxDescriptor->size = 0; - pxDescriptor->status = ACT; - pxDescriptor->next = &xRxDescriptors[ x + 1 ]; - - /* Mark this buffer as in use. */ - ucBufferInUse[ x ] = pdTRUE; - } - - /* The last descriptor points back to the start. */ - pxDescriptor->status |= DL; - pxDescriptor->next = &xRxDescriptors[ 0 ]; - - /* Initialise the Tx descriptors. */ - for( x = 0; x < emacNUM_TX_BUFFERS; x++ ) - { - pxDescriptor = &( xTxDescriptors[ x ] ); - - /* A buffer is not allocated to the Tx descriptor until a send is - actually required. */ - pxDescriptor->buf_p = NULL; - - pxDescriptor->bufsize = UIP_BUFSIZE; - pxDescriptor->size = 0; - pxDescriptor->status = 0; - pxDescriptor->next = &xTxDescriptors[ x + 1 ]; - } - - /* The last descriptor points back to the start. */ - pxDescriptor->status |= DL; - pxDescriptor->next = &( xTxDescriptors[ 0 ] ); - - /* Use the first Rx descriptor to start with. */ - pxCurrentRxDesc = &( xRxDescriptors[ 0 ] ); -} -/*-----------------------------------------------------------*/ - -static unsigned char *prvGetNextBuffer( void ) -{ -long x; -unsigned char *pucReturn = NULL; -unsigned long ulAttempts = 0; - - while( pucReturn == NULL ) - { - /* Look through the buffers to find one that is not in use by - anything else. */ - for( x = 0; x < emacNUM_BUFFERS; x++ ) - { - if( ucBufferInUse[ x ] == pdFALSE ) - { - ucBufferInUse[ x ] = pdTRUE; - pucReturn = ( unsigned char * ) &( xEthernetBuffers.cBuffer[ x ][ 0 ] ); - break; - } - } - - /* Was a buffer found? */ - if( pucReturn == NULL ) - { - ulAttempts++; - - if( ulAttempts >= emacBUFFER_WAIT_ATTEMPTS ) - { - break; - } - - /* Wait then look again. */ - vTaskDelay( emacBUFFER_WAIT_DELAY_ms ); - } - } - - return pucReturn; -} -/*-----------------------------------------------------------*/ - -static void prvReturnBuffer( unsigned char *pucBuffer ) -{ -unsigned long ul; - - /* Return a buffer to the pool of free buffers. */ - for( ul = 0; ul < emacNUM_BUFFERS; ul++ ) - { - if( &( xEthernetBuffers.cBuffer[ ul ][ 0 ] ) == ( void * ) pucBuffer ) - { - ucBufferInUse[ ul ] = pdFALSE; - break; - } - } -} -/*-----------------------------------------------------------*/ - -static void prvResetEverything( void ) -{ - /* Temporary code just to see if this gets called. This function has not - been implemented. */ - portDISABLE_INTERRUPTS(); - for( ;; ); -} -/*-----------------------------------------------------------*/ - -static unsigned long prvCheckRxFifoStatus( void ) -{ -unsigned long ulReturn = 0; - - if( ( pxCurrentRxDesc->status & ACT ) != 0 ) - { - /* Current descriptor is still active. */ - } - else if( ( pxCurrentRxDesc->status & FE ) != 0 ) - { - /* Frame error. Clear the error. */ - pxCurrentRxDesc->status &= ~( FP1 | FP0 | FE ); - pxCurrentRxDesc->status &= ~( RMAF | RRF | RTLF | RTSF | PRE | CERF ); - pxCurrentRxDesc->status |= ACT; - pxCurrentRxDesc = pxCurrentRxDesc->next; - - if( EDMAC.EDRRR.LONG == 0x00000000UL ) - { - /* Restart Ethernet if it has stopped. */ - EDMAC.EDRRR.LONG = 0x00000001UL; - } - } - else - { - /* The descriptor contains a frame. Because of the size of the buffers - the frame should always be complete. */ - if( ( pxCurrentRxDesc->status & FP0 ) == FP0 ) - { - ulReturn = pxCurrentRxDesc->size; - } - else - { - /* Do not expect to get here. */ - prvResetEverything(); - } - } - - return ulReturn; -} -/*-----------------------------------------------------------*/ - -static void prvResetMAC( void ) -{ - /* Ensure the EtherC and EDMAC are enabled. */ - SYSTEM.MSTPCRB.BIT.MSTPB15 = 0; - vTaskDelay( 100 / portTICK_PERIOD_MS ); - - EDMAC.EDMR.BIT.SWR = 1; - - /* Crude wait for reset to complete. */ - vTaskDelay( 500 / portTICK_PERIOD_MS ); -} -/*-----------------------------------------------------------*/ - -static void prvConfigureEtherCAndEDMAC( void ) -{ - /* Initialisation code taken from Renesas example project. */ - - /* TODO: Check bit 5 */ - ETHERC.ECSR.LONG = 0x00000037; /* Clear all ETHERC statuS BFR, PSRTO, LCHNG, MPD, ICD */ - - /* Set the EDMAC interrupt priority. */ - _IPR( _ETHER_EINT ) = configKERNEL_INTERRUPT_PRIORITY; - - /* TODO: Check bit 5 */ - /* Enable interrupts of interest only. */ - EDMAC.EESIPR.LONG = emacTX_END_INTERRUPT | emacRX_END_INTERRUPT; - ETHERC.RFLR.LONG = 1518; /* Ether payload is 1500+ CRC */ - ETHERC.IPGR.LONG = 0x00000014; /* Intergap is 96-bit time */ - - /* EDMAC */ - EDMAC.EESR.LONG = 0x47FF0F9F; /* Clear all ETHERC and EDMAC status bits */ - #ifdef __LIT - EDMAC.EDMR.BIT.DE = 1; - #endif - EDMAC.RDLAR = ( void * ) pxCurrentRxDesc; /* Initialaize Rx Descriptor List Address */ - EDMAC.TDLAR = &( xTxDescriptors[ 0 ] ); /* Initialaize Tx Descriptor List Address */ - EDMAC.TRSCER.LONG = 0x00000000; /* Copy-back status is RFE & TFE only */ - EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */ - EDMAC.FDR.LONG = 0x00000000; /* Transmit fifo & receive fifo is 256 bytes */ - EDMAC.RMCR.LONG = 0x00000003; /* Receive function is normal mode(continued) */ - ETHERC.ECMR.BIT.PRM = 0; /* Ensure promiscuous mode is off. */ - - /* Enable the interrupt... */ - _IEN( _ETHER_EINT ) = 1; -} -/*-----------------------------------------------------------*/ - -#pragma interrupt ( vEMAC_ISR_Handler( vect = VECT_ETHER_EINT, enable ) ) -void vEMAC_ISR_Handler( void ) -{ -unsigned long ul = EDMAC.EESR.LONG; -long lHigherPriorityTaskWoken = pdFALSE; -extern QueueHandle_t xEMACEventQueue; -const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; - - /* Has a Tx end occurred? */ - if( ul & emacTX_END_INTERRUPT ) - { - /* Only return the buffer to the pool once both Txes have completed. */ - prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); - EDMAC.EESR.LONG = emacTX_END_INTERRUPT; - } - - /* Has an Rx end occurred? */ - if( ul & emacRX_END_INTERRUPT ) - { - /* Make sure the Ethernet task is not blocked waiting for a packet. */ - xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken ); - portYIELD_FROM_ISR( lHigherPriorityTaskWoken ); - EDMAC.EESR.LONG = emacRX_END_INTERRUPT; - } -} - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c deleted file mode 100644 index 016644aa0..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-cgi.c +++ /dev/null @@ -1,277 +0,0 @@ -/** - * \addtogroup httpd - * @{ - */ - -/** - * \file - * Web server script interface - * \author - * Adam Dunkels - * - */ - -/* - * Copyright (c) 2001-2006, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This file is part of the uIP TCP/IP stack. - * - * $Id: httpd-cgi.c,v 1.2 2006/06/11 21:46:37 adam Exp $ - * - */ -#include "net/uip.h" -#include "net/psock.h" -#include "apps/httpd/httpd.h" -#include "apps/httpd/httpd-cgi.h" -#include "apps/httpd/httpd-fs.h" - -#include -#include - -#include "FreeRTOS.h" -#include "task.h" - -HTTPD_CGI_CALL( file, "file-stats", file_stats ); -HTTPD_CGI_CALL( tcp, "tcp-connections", tcp_stats ); -HTTPD_CGI_CALL( net, "net-stats", net_stats ); -HTTPD_CGI_CALL( rtos, "rtos-stats", rtos_stats ); -HTTPD_CGI_CALL( run, "run-time", run_time ); -HTTPD_CGI_CALL( io, "led-io", led_io ); - -static const struct httpd_cgi_call *calls[] = { &file, &tcp, &net, &rtos, &run, &io, NULL }; - -/*---------------------------------------------------------------------------*/ -static PT_THREAD( nullfunction ( struct httpd_state *s, char *ptr ) ) -{ - PSOCK_BEGIN( &s->sout ); - ( void ) ptr; - ( void ) PT_YIELD_FLAG; - PSOCK_END( &s->sout ); -} - -/*---------------------------------------------------------------------------*/ -httpd_cgifunction httpd_cgi( char *name ) -{ - const struct httpd_cgi_call **f; - - /* Find the matching name in the table, return the function. */ - for( f = calls; *f != NULL; ++f ) - { - if( strncmp((*f)->name, name, strlen((*f)->name)) == 0 ) - { - return( *f )->function; - } - } - - return nullfunction; -} - -/*---------------------------------------------------------------------------*/ -static unsigned short generate_file_stats( void *arg ) -{ - char *f = ( char * ) arg; - return sprintf( ( char * ) uip_appdata, "%5u", httpd_fs_count(f) ); -} - -/*---------------------------------------------------------------------------*/ -static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) ) -{ - PSOCK_BEGIN( &s->sout ); - - ( void ) PT_YIELD_FLAG; - - PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 ); - - PSOCK_END( &s->sout ); -} - -/*---------------------------------------------------------------------------*/ -static const char closed[] = /* "CLOSED",*/ { 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0 }; -static const char syn_rcvd[] = /* "SYN-RCVD",*/ { 0x53, 0x59, 0x4e, 0x2d, 0x52, 0x43, 0x56, 0x44, 0 }; -static const char syn_sent[] = /* "SYN-SENT",*/ { 0x53, 0x59, 0x4e, 0x2d, 0x53, 0x45, 0x4e, 0x54, 0 }; -static const char established[] = /* "ESTABLISHED",*/ { 0x45, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0 }; -static const char fin_wait_1[] = /* "FIN-WAIT-1",*/ { 0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49, 0x54, 0x2d, 0x31, 0 }; -static const char fin_wait_2[] = /* "FIN-WAIT-2",*/ { 0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49, 0x54, 0x2d, 0x32, 0 }; -static const char closing[] = /* "CLOSING",*/ { 0x43, 0x4c, 0x4f, 0x53, 0x49, 0x4e, 0x47, 0 }; -static const char time_wait[] = /* "TIME-WAIT,"*/ { 0x54, 0x49, 0x4d, 0x45, 0x2d, 0x57, 0x41, 0x49, 0x54, 0 }; -static const char last_ack[] = /* "LAST-ACK"*/ { 0x4c, 0x41, 0x53, 0x54, 0x2d, 0x41, 0x43, 0x4b, 0 }; - -static const char *states[] = { closed, syn_rcvd, syn_sent, established, fin_wait_1, fin_wait_2, closing, time_wait, last_ack }; - -static unsigned short generate_tcp_stats( void *arg ) -{ - struct uip_conn *conn; - struct httpd_state *s = ( struct httpd_state * ) arg; - - conn = &uip_conns[s->count]; - return sprintf( ( char * ) uip_appdata, - "%d%u.%u.%u.%u:%u%s%u%u%c %c\r\n", htons(conn->lport), - htons(conn->ripaddr.u16[0]) >> 8, htons(conn->ripaddr.u16[0]) & 0xff, htons(conn->ripaddr.u16[1]) >> 8, - htons(conn->ripaddr.u16[1]) & 0xff, htons(conn->rport), states[conn->tcpstateflags & UIP_TS_MASK], conn->nrtx, conn->timer, - (uip_outstanding(conn)) ? '*' : ' ', (uip_stopped(conn)) ? '!' : ' ' ); -} - -/*---------------------------------------------------------------------------*/ -static PT_THREAD( tcp_stats ( struct httpd_state *s, char *ptr ) ) -{ - PSOCK_BEGIN( &s->sout ); - ( void ) ptr; - ( void ) PT_YIELD_FLAG; - for( s->count = 0; s->count < UIP_CONNS; ++s->count ) - { - if( (uip_conns[s->count].tcpstateflags & UIP_TS_MASK) != UIP_CLOSED ) - { - PSOCK_GENERATOR_SEND( &s->sout, generate_tcp_stats, s ); - } - } - - PSOCK_END( &s->sout ); -} - -/*---------------------------------------------------------------------------*/ -static unsigned short generate_net_stats( void *arg ) -{ - struct httpd_state *s = ( struct httpd_state * ) arg; - return sprintf( ( char * ) uip_appdata, "%5u\n", (( uip_stats_t * ) &uip_stat)[s->count] ); -} - -static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) ) -{ - PSOCK_BEGIN( &s->sout ); - ( void ) ptr; - ( void ) PT_YIELD_FLAG; -#if UIP_STATISTICS - for( s->count = 0; s->count < sizeof(uip_stat) / sizeof(uip_stats_t); ++s->count ) - { - PSOCK_GENERATOR_SEND( &s->sout, generate_net_stats, s ); - } - -#endif /* UIP_STATISTICS */ - - PSOCK_END( &s->sout ); -} - -/*---------------------------------------------------------------------------*/ -extern void vTaskList( char *pcWriteBuffer ); -extern char *pcGetTaskStatusMessage( void ); -static char cCountBuf[128]; -long lRefreshCount = 0; -static unsigned short generate_rtos_stats( void *arg ) -{ - ( void ) arg; - lRefreshCount++; - sprintf( cCountBuf, "


    Refresh count = %d


    %s", ( int ) lRefreshCount, pcGetTaskStatusMessage() ); - vTaskList( ( char * ) uip_appdata ); - strcat( uip_appdata, cCountBuf ); - - return strlen( uip_appdata ); -} - -/*---------------------------------------------------------------------------*/ -static PT_THREAD( rtos_stats ( struct httpd_state *s, char *ptr ) ) -{ - PSOCK_BEGIN( &s->sout ); - ( void ) ptr; - ( void ) PT_YIELD_FLAG; - PSOCK_GENERATOR_SEND( &s->sout, generate_rtos_stats, NULL ); - PSOCK_END( &s->sout ); -} - -/*---------------------------------------------------------------------------*/ -char *pcStatus; -unsigned long ulString; - -static unsigned short generate_io_state( void *arg ) -{ - extern long lParTestGetLEDState( unsigned long ulLED ); - ( void ) arg; - - /* Are the dynamically setable LEDs currently on or off? */ - if( lParTestGetLEDState( 3 ) ) - { - pcStatus = "checked"; - } - else - { - pcStatus = ""; - } - - sprintf( uip_appdata, "LED

    ", pcStatus ); - - return strlen( uip_appdata ); -} - -/*---------------------------------------------------------------------------*/ -extern void vTaskGetRunTimeStats( char *pcWriteBuffer ); -extern unsigned short usMaxJitter; -static char cJitterBuffer[ 200 ]; -static unsigned short generate_runtime_stats( void *arg ) -{ - ( void ) arg; - lRefreshCount++; - sprintf( cCountBuf, "


    Refresh count = %d", ( int ) lRefreshCount ); - - #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST - { - sprintf( cJitterBuffer, "


    Max high frequency timer jitter = %d peripheral clock periods.


    ", ( int ) usMaxJitter ); - vTaskGetRunTimeStats( ( char * ) uip_appdata ); - strcat( uip_appdata, cJitterBuffer ); - } - #else - { - ( void ) cJitterBuffer; - strcpy( uip_appdata, "

    Run time stats are only available in the debug_with_optimisation build configuration.

    " ); - } - #endif - - strcat( uip_appdata, cCountBuf ); - - return strlen( uip_appdata ); -} - -/*---------------------------------------------------------------------------*/ -static PT_THREAD( run_time ( struct httpd_state *s, char *ptr ) ) -{ - PSOCK_BEGIN( &s->sout ); - ( void ) ptr; - ( void ) PT_YIELD_FLAG; - PSOCK_GENERATOR_SEND( &s->sout, generate_runtime_stats, NULL ); - PSOCK_END( &s->sout ); -} - -/*---------------------------------------------------------------------------*/ -static PT_THREAD( led_io ( struct httpd_state *s, char *ptr ) ) -{ - PSOCK_BEGIN( &s->sout ); - ( void ) ptr; - ( void ) PT_YIELD_FLAG; - PSOCK_GENERATOR_SEND( &s->sout, generate_io_state, NULL ); - PSOCK_END( &s->sout ); -} - -/** @} */ diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/404.html b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/404.html deleted file mode 100644 index 43e7f4cad..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/404.html +++ /dev/null @@ -1,8 +0,0 @@ - - -

    -

    404 - file not found

    -

    Go here instead.

    -
    - - \ No newline at end of file diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.html b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.html deleted file mode 100644 index 4937dc69a..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - FreeRTOS.org uIP WEB server demo - - - -Loading index.shtml. Click here if not automatically redirected. - - - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.shtml b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.shtml deleted file mode 100644 index 882d085ce..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/index.shtml +++ /dev/null @@ -1,20 +0,0 @@ - - - - FreeRTOS.org uIP WEB server demo - - - -Task Stats | Run Time Stats | TCP Stats | Connections | FreeRTOS Homepage | IO | 37K jpg -

    -


    -

    -

    Task statistics

    -Page will refresh every 2 seconds.

    -

    Task          State  Priority  Stack	#
    ************************************************
    -%! rtos-stats -
    -
    - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/io.shtml b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/io.shtml deleted file mode 100644 index 819e2d39b..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/io.shtml +++ /dev/null @@ -1,28 +0,0 @@ - - - - FreeRTOS.org uIP WEB server demo - - - -Task Stats | Run Time Stats | TCP Stats | Connections | FreeRTOS Homepage | IO | 37K jpg -

    -


    -LED and LCD IO
    - -

    - -Use the check box to turn on or off LED 4, then click "Update IO". - - -

    -

    -%! led-io -

    - -

    -

    - - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/runtime.shtml b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/runtime.shtml deleted file mode 100644 index 3464fd471..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/runtime.shtml +++ /dev/null @@ -1,20 +0,0 @@ - - - - FreeRTOS.org uIP WEB server demo - - - -Task Stats | Run Time Stats | TCP Stats | Connections | FreeRTOS Homepage | IO | 37K jpg -

    -


    -

    -

    Run-time statistics

    -Page will refresh every 2 seconds.

    -

    Task            Abs Time      % Time
    ****************************************
    -%! run-time -
    -
    - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/stats.shtml b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/stats.shtml deleted file mode 100644 index f54118606..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/stats.shtml +++ /dev/null @@ -1,47 +0,0 @@ - - - - FreeRTOS.org uIP WEB server demo - - - -Task Stats | Run Time Stats | TCP Stats | Connections | FreeRTOS Homepage | IO | 37K jpg -

    -


    -

    -

    Network statistics

    - -
    -IP           Packets received
    -             Packets sent
    -             Forwaded
    -             Dropped
    -IP errors    IP version/header length
    -             IP length, high byte
    -             IP length, low byte
    -             IP fragments
    -             Header checksum
    -             Wrong protocol
    -ICMP	     Packets received
    -             Packets sent
    -             Packets dropped
    -             Type errors
    -             Checksum errors
    -TCP          Packets received
    -             Packets sent
    -             Packets dropped
    -             Checksum errors
    -             Data packets without ACKs
    -             Resets
    -             Retransmissionsa
    -             Syn to closed port
    -UDP          Packets dropped
    -             Packets received
    -             Packets sent
    -             Packets chkerr
    -	     No connection avaliable
    -
    %! net-stats
    -
    -
    - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/tcp.shtml b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/tcp.shtml deleted file mode 100644 index 23dcdcae3..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fs/tcp.shtml +++ /dev/null @@ -1,21 +0,0 @@ - - - - FreeRTOS.org uIP WEB server demo - - - -Task Stats | Run Time Stats | TCP Stats | Connections | FreeRTOS Homepage | IO | 37K jpg -

    -


    -
    -

    Network connections

    -

    - - -%! tcp-connections - - - - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fsdata.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fsdata.c deleted file mode 100644 index 47823d100..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/httpd-fsdata.c +++ /dev/null @@ -1,3871 +0,0 @@ -static const char data_404_html[] = { - /* /404.html */ - 0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0, - 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, 0xa, 0x20, 0x20, - 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, - 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, - 0x22, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, - 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0xd, 0xa, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, - 0x34, 0x20, 0x2d, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, - 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, - 0x68, 0x31, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x3c, 0x68, 0x33, 0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, - 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, - 0x68, 0x65, 0x72, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, - 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, - 0x33, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, - 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0xd, 0xa, 0x20, - 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, - 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0}; - -static const char data_index_html[] = { - /* /index.html */ - 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0, - 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, - 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, - 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, - 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, - 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, - 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, - 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, - 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, - 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, - 0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, - 0x4f, 0x44, 0x59, 0x20, 0x6f, 0x6e, 0x4c, 0x6f, 0x61, 0x64, - 0x3d, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, - 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, - 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x3d, - 0x27, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, - 0x6d, 0x6c, 0x27, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x2c, - 0x31, 0x30, 0x30, 0x29, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x66, - 0x6f, 0x6e, 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, - 0x61, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x3e, 0xd, 0xa, 0x4c, - 0x6f, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x2e, 0x20, - 0x20, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x20, 0x3c, 0x61, 0x20, - 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x68, - 0x65, 0x72, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x66, - 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, - 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x72, - 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, - 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, - 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, - 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, 0x3c, - 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, 0xa, 0xd, 0xa, -0}; - -static const char data_index_shtml[] = { - /* /index.shtml */ - 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, - 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, - 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, - 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, - 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, - 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, - 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, - 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, - 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, - 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, - 0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, - 0x4f, 0x44, 0x59, 0x20, 0x6f, 0x6e, 0x4c, 0x6f, 0x61, 0x64, - 0x3d, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, - 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, - 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x3d, - 0x27, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, - 0x6d, 0x6c, 0x27, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x2c, - 0x32, 0x30, 0x30, 0x30, 0x29, 0x22, 0x3e, 0xd, 0xa, 0x3c, - 0x66, 0x6f, 0x6e, 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, - 0x22, 0x61, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x3e, 0xd, 0xa, - 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, - 0x22, 0x3e, 0x54, 0x61, 0x73, 0x6b, 0x20, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, - 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, - 0x72, 0x65, 0x66, 0x3d, 0x22, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x52, 0x75, 0x6e, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, - 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, - 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x54, 0x43, 0x50, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, - 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, - 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, - 0x3d, 0x22, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, - 0x6c, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, - 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, - 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, - 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x66, 0x72, - 0x65, 0x65, 0x72, 0x74, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x67, - 0x2f, 0x22, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, - 0x53, 0x20, 0x48, 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, - 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, - 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, - 0x66, 0x3d, 0x22, 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, - 0x6c, 0x22, 0x3e, 0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0x20, - 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, - 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x6c, 0x6f, - 0x67, 0x6f, 0x2e, 0x6a, 0x70, 0x67, 0x22, 0x3e, 0x33, 0x37, - 0x4b, 0x20, 0x6a, 0x70, 0x67, 0x3c, 0x2f, 0x61, 0x3e, 0xd, - 0xa, 0x3c, 0x62, 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, - 0x3c, 0x68, 0x72, 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, - 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x32, 0x3e, 0x54, - 0x61, 0x73, 0x6b, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xd, - 0xa, 0x50, 0x61, 0x67, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, - 0x20, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x20, 0x65, - 0x76, 0x65, 0x72, 0x79, 0x20, 0x32, 0x20, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x2e, 0x3c, 0x70, 0x3e, 0xd, 0xa, - 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, - 0x3d, 0x22, 0x63, 0x6f, 0x75, 0x72, 0x69, 0x65, 0x72, 0x22, - 0x3e, 0x3c, 0x70, 0x72, 0x65, 0x3e, 0x54, 0x61, 0x73, 0x6b, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x20, 0x20, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x20, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x9, 0x23, 0x3c, 0x62, 0x72, 0x3e, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x3c, 0x62, 0x72, 0x3e, - 0xd, 0xa, 0x25, 0x21, 0x20, 0x72, 0x74, 0x6f, 0x73, 0x2d, - 0x73, 0x74, 0x61, 0x74, 0x73, 0xd, 0xa, 0x3c, 0x2f, 0x70, - 0x72, 0x65, 0x3e, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, - 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, - 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, - 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, 0xa, 0xd, - 0xa, 0}; - -static const char data_io_shtml[] = { - /* /io.shtml */ - 0x2f, 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, - 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, - 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, - 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, - 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, - 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, - 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, - 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, - 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, - 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, - 0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, - 0x4f, 0x44, 0x59, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, - 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, - 0x69, 0x61, 0x6c, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x61, 0x20, - 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x54, - 0x61, 0x73, 0x6b, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, - 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, - 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, - 0x3d, 0x22, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x52, 0x75, 0x6e, - 0x20, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, - 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, - 0x65, 0x66, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, - 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x54, 0x43, 0x50, - 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, - 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, - 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, - 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, - 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, - 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x72, - 0x74, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x22, 0x3e, - 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 0x53, 0x20, 0x48, - 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, - 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, - 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, - 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, - 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, - 0x72, 0x65, 0x66, 0x3d, 0x22, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, - 0x6a, 0x70, 0x67, 0x22, 0x3e, 0x33, 0x37, 0x4b, 0x20, 0x6a, - 0x70, 0x67, 0x3c, 0x2f, 0x61, 0x3e, 0xd, 0xa, 0x3c, 0x62, - 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x72, - 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x3e, 0x4c, 0x45, 0x44, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x4c, 0x43, 0x44, 0x20, 0x49, 0x4f, - 0x3c, 0x2f, 0x62, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xd, 0xa, - 0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0xd, 0xa, 0x55, - 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x20, 0x62, 0x6f, 0x78, 0x20, 0x74, 0x6f, 0x20, - 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x6f, 0x72, - 0x20, 0x6f, 0x66, 0x66, 0x20, 0x4c, 0x45, 0x44, 0x20, 0x34, - 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x6c, 0x69, - 0x63, 0x6b, 0x20, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x20, 0x49, 0x4f, 0x22, 0x2e, 0xd, 0xa, 0xd, 0xa, 0xd, - 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x72, - 0x6d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x46, - 0x6f, 0x72, 0x6d, 0x22, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x3d, 0x22, 0x2f, 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, - 0x6d, 0x6c, 0x22, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x3d, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3e, 0xd, 0xa, 0x25, - 0x21, 0x20, 0x6c, 0x65, 0x64, 0x2d, 0x69, 0x6f, 0xd, 0xa, - 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3d, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, - 0x49, 0x4f, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, - 0x72, 0x6d, 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0x3c, - 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, - 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, - 0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, - 0xa, 0xd, 0xa, 0}; - -static const char data_logo_jpg[] = { - /* /logo.jpg */ - 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, 0x6a, 0x70, 0x67, 0, - 0xff, 0xd8, 0xff, 0xe0, 00, 0x10, 0x4a, 0x46, 0x49, 0x46, - 00, 0x1, 0x1, 00, 00, 0x1, 00, 0x1, 00, 00, - 0xff, 0xdb, 00, 0x43, 00, 0x3, 0x2, 0x2, 0x3, 0x2, - 0x2, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, 0x4, 0x5, - 0x8, 0x5, 0x5, 0x4, 0x4, 0x5, 0xa, 0x7, 0x7, 0x6, - 0x8, 0xc, 0xa, 0xc, 0xc, 0xb, 0xa, 0xb, 0xb, 0xd, - 0xe, 0x12, 0x10, 0xd, 0xe, 0x11, 0xe, 0xb, 0xb, 0x10, - 0x16, 0x10, 0x11, 0x13, 0x14, 0x15, 0x15, 0x15, 0xc, 0xf, - 0x17, 0x18, 0x16, 0x14, 0x18, 0x12, 0x14, 0x15, 0x14, 0xff, - 0xdb, 00, 0x43, 0x1, 0x3, 0x4, 0x4, 0x5, 0x4, 0x5, - 0x9, 0x5, 0x5, 0x9, 0x14, 0xd, 0xb, 0xd, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xff, 0xc0, - 00, 0x11, 0x8, 0x1, 0x8, 0x2, 0xc2, 0x3, 0x1, 0x22, - 00, 0x2, 0x11, 0x1, 0x3, 0x11, 0x1, 0xff, 0xc4, 00, - 0x1f, 00, 00, 0x1, 0x5, 0x1, 0x1, 0x1, 0x1, 0x1, - 0x1, 00, 00, 00, 00, 00, 00, 00, 00, 0x1, - 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, - 0xff, 0xc4, 00, 0xb5, 0x10, 00, 0x2, 0x1, 0x3, 0x3, - 0x2, 0x4, 0x3, 0x5, 0x5, 0x4, 0x4, 00, 00, 0x1, - 0x7d, 0x1, 0x2, 0x3, 00, 0x4, 0x11, 0x5, 0x12, 0x21, - 0x31, 0x41, 0x6, 0x13, 0x51, 0x61, 0x7, 0x22, 0x71, 0x14, - 0x32, 0x81, 0x91, 0xa1, 0x8, 0x23, 0x42, 0xb1, 0xc1, 0x15, - 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x9, 0xa, - 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, - 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, - 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, - 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, - 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, - 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, - 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, - 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, - 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xff, 0xc4, 00, 0x1f, 0x1, 00, 0x3, - 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 00, - 00, 00, 00, 00, 00, 0x1, 0x2, 0x3, 0x4, 0x5, - 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xff, 0xc4, 00, 0xb5, - 0x11, 00, 0x2, 0x1, 0x2, 0x4, 0x4, 0x3, 0x4, 0x7, - 0x5, 0x4, 0x4, 00, 0x1, 0x2, 0x77, 00, 0x1, 0x2, - 0x3, 0x11, 0x4, 0x5, 0x21, 0x31, 0x6, 0x12, 0x41, 0x51, - 0x7, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x8, 0x14, 0x42, - 0x91, 0xa1, 0xb1, 0xc1, 0x9, 0x23, 0x33, 0x52, 0xf0, 0x15, - 0x62, 0x72, 0xd1, 0xa, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, - 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, - 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, - 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, - 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, - 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, - 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, - 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, - 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, - 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xff, - 0xda, 00, 0xc, 0x3, 0x1, 00, 0x2, 0x11, 0x3, 0x11, - 00, 0x3f, 00, 0xfd, 0x53, 0xa2, 0x8a, 0x28, 00, 0xa2, - 0x8a, 0x28, 00, 0xa2, 0x8a, 0x28, 00, 0xa2, 0x8a, 0x28, - 00, 0xaa, 0xf7, 0xfa, 0x85, 0xb6, 0x95, 0x67, 0x2d, 0xd5, - 0xe4, 0xf1, 0xdb, 0x5b, 0x44, 0xa5, 0x9e, 0x59, 0x58, 0x2a, - 0xa8, 0x1e, 0xf5, 0xc6, 0x7c, 0x4e, 0xf8, 0xb3, 0xa6, 0xfc, - 0x39, 0xb4, 0x48, 0xb0, 0xb7, 0xda, 0xd5, 0xc6, 0x5, 0xb6, - 0x9e, 0x8d, 0x86, 0x72, 0x4e, 0x37, 0x37, 0xf7, 0x57, 0xf9, - 0xf6, 0xaa, 0x16, 0x5f, 0xd, 0x9f, 0xc6, 0xd0, 0xc5, 0xa9, - 0xf8, 0xc6, 0xe1, 0xef, 0xa6, 0x99, 0x3, 0xa6, 0x9e, 0x84, - 0xad, 0xbd, 0xb6, 0x7b, 0x2a, 0xf7, 0x3e, 0xe7, 0x9a, 0xe0, - 0xa9, 0x89, 0xbc, 0xdd, 0x1a, 0xb, 0x9a, 0x6b, 0x7e, 0xcb, - 0xd5, 0xfe, 0x9b, 0x9c, 0xb2, 0xaf, 0x79, 0x3a, 0x74, 0xb5, - 0x92, 0xdf, 0xb2, 0xf5, 0xff, 00, 0x23, 0x93, 0xf1, 0xa7, - 0xed, 0x5f, 0xa1, 0x69, 0x1b, 0xa1, 0xd0, 0x2d, 0x64, 0xd6, - 0x2e, 0x1, 0xc7, 0x9b, 0x26, 0x62, 0x84, 0x7d, 0xf, 0x53, - 0xf9, 0x57, 0x91, 0x6b, 0x5f, 0xb5, 0xf, 0x8e, 0x35, 0x49, - 0x9, 0xb7, 0xba, 0xb7, 0xd3, 0x23, 0xec, 0x96, 0xd0, 0x29, - 0xfd, 0x5b, 0x26, 0xbe, 0x92, 0x7f, 0x81, 0x1e, 0xb, 0x7f, - 0xf9, 0x84, 0x46, 0x3e, 0x95, 0xb, 0xfe, 0xcf, 0xfe, 0xa, - 0x93, 0xae, 0x96, 0xa3, 0xe8, 0x6b, 0xc2, 0xaf, 0x84, 0xcd, - 0xab, 0xbb, 0xba, 0xa9, 0x2e, 0xc9, 0xb5, 0xfa, 0x5c, 0xf0, - 0xb1, 0x18, 0x4c, 0xce, 0xbb, 0xd2, 0xb2, 0x8a, 0xec, 0xb4, - 0xff, 00, 0x82, 0x7c, 0x91, 0x3f, 0xc6, 0xf, 0x19, 0x5c, - 0x48, 0x5d, 0xfc, 0x45, 0x7e, 0x58, 0xf5, 0xc4, 0xb8, 0x1f, - 0x90, 0xa7, 0x27, 0xc6, 0x5f, 0x1a, 0x46, 0xca, 0x57, 0xc4, - 0x57, 0xc0, 0xaf, 0x23, 0xf7, 0x99, 0xfe, 0x95, 0xf5, 0x73, - 0xfe, 0xce, 0x9e, 0x9, 0x7f, 0xf9, 0x87, 0x15, 0xfa, 0x35, - 0x43, 0x27, 0xec, 0xd7, 0xe0, 0xa7, 0xe9, 0x67, 0x2a, 0xfd, - 0x1e, 0xbc, 0xcf, 0xec, 0x7c, 0xc5, 0x3b, 0xa9, 0xff, 00, - 0xe4, 0xcc, 0xf3, 0x3f, 0xb1, 0xf3, 0x1d, 0xd5, 0x6f, 0xc5, - 0x9f, 0x31, 0x2f, 0xc7, 0x9f, 0x1e, 0x29, 0xcf, 0xfc, 0x24, - 0x77, 0x47, 0xea, 0x10, 0xff, 00, 0x4a, 0x9e, 0x2f, 0xda, - 0x17, 0xc7, 0xd1, 0xc, 0xf, 0x10, 0xcc, 0x7b, 0xfc, 0xd0, - 0xc6, 0x7f, 0x9a, 0xd7, 0xd1, 0xed, 0xfb, 0x31, 0xf8, 0x34, - 0xe7, 0x10, 0xce, 0x7, 0xfb, 0xff, 00, 0xfd, 0x6a, 0x81, - 0xff, 00, 0x65, 0xcf, 0x8, 0x37, 0x4f, 0xb4, 0x83, 0xfe, - 0xf0, 0xa7, 0xfd, 0x99, 0x9a, 0xad, 0xaa, 0x7f, 0xe4, 0xcc, - 0x3f, 0xb2, 0xf3, 0x45, 0xb5, 0x6f, 0xc5, 0x9f, 0x3d, 0xff, - 00, 0xc3, 0x46, 0x7c, 0x40, 0xff, 00, 0xa0, 0xfb, 0xff, - 00, 0xe0, 0x3c, 0x5f, 0xfc, 0x4d, 0x48, 0xbf, 0xb4, 0x8f, - 0x8f, 0xd4, 0xe7, 0xfb, 0x6f, 0x3e, 0xc6, 0xda, 0x2f, 0xfe, - 0x26, 0xbd, 0xe9, 0xff, 00, 0x65, 0x6f, 0x9, 0xb6, 0x71, - 0x25, 0xd0, 0xff, 00, 0x81, 0xa, 0x85, 0xff, 00, 0x64, - 0xff, 00, 0xb, 0x30, 0xe2, 0xe6, 0xed, 0x4f, 0xd4, 0x51, - 0xfd, 0x9d, 0x9b, 0x2f, 0xb6, 0xff, 00, 0xf0, 0x26, 0x1f, - 0xd9, 0xd9, 0xb2, 0xda, 0xb7, 0xfe, 0x4c, 0xcf, 0x11, 0x5f, - 0xda, 0x63, 0xc7, 0xca, 0x79, 0xd5, 0xa3, 0x6f, 0x63, 0x6b, - 0x1f, 0xf8, 0x54, 0xcb, 0xfb, 0x50, 0x78, 0xf1, 0x40, 0x1f, - 0x6f, 0xb6, 0x3e, 0xe6, 0xd5, 0x2b, 0xd8, 0x5b, 0xf6, 0x49, - 0xf0, 0xd1, 0xe9, 0x7f, 0x76, 0xbe, 0xdc, 0x54, 0xf, 0xfb, - 0x22, 0xe8, 0x24, 0x7c, 0xba, 0xa5, 0xd0, 0x3f, 0xee, 0x8a, - 0x5f, 0x52, 0xce, 0x17, 0xda, 0x7f, 0xf8, 0x17, 0xfc, 0x10, - 0xfa, 0x8e, 0x70, 0xbf, 0xe5, 0xef, 0xfe, 0x4c, 0x79, 0x7a, - 0xfe, 0xd5, 0x9e, 0x38, 0x4, 0x66, 0x4d, 0x3d, 0xb1, 0xd8, - 0xda, 0xf5, 0xfd, 0x6a, 0x55, 0xfd, 0xac, 0x7c, 0x6a, 0xbd, - 0x53, 0x4c, 0x6f, 0xad, 0xb3, 0x7f, 0xf1, 0x55, 0xe8, 0xcf, - 0xfb, 0x21, 0x68, 0xe7, 0xee, 0xea, 0xd7, 0x3, 0xea, 0xa2, - 0xa0, 0x7f, 0xd9, 0x3, 0x4e, 0x39, 0xdb, 0xac, 0x4c, 0x3e, - 0xa8, 0x29, 0xfd, 0x5b, 0x39, 0x5f, 0x69, 0xff, 00, 0xe0, - 0x48, 0x3e, 0xa9, 0x9d, 0x2f, 0xf9, 0x79, 0xf8, 0x9c, 0x18, - 0xfd, 0xad, 0x3c, 0x67, 0xff, 00, 0x3c, 0x74, 0xbf, 0xfc, - 0x7, 0x6f, 0xfe, 0x2e, 0x9e, 0x3f, 0x6b, 0x6f, 0x18, 0x77, - 0xb6, 0xd2, 0xcf, 0xfd, 0xb0, 0x7f, 0xfe, 0x2e, 0xbb, 0x37, - 0xfd, 0x8f, 0xac, 0xff, 00, 0x87, 0x5a, 0x93, 0xf1, 0x41, - 0x50, 0xbf, 0xec, 0x7b, 0x11, 0xfb, 0xba, 0xe3, 0xf, 0xac, - 0x74, 0x7b, 0x1c, 0xe9, 0x75, 0x7f, 0x7a, 0x17, 0xd5, 0xf3, - 0xb5, 0xf6, 0xff, 00, 0x14, 0x72, 0xc9, 0xfb, 0x5d, 0x78, - 0xb1, 0x4f, 0xcd, 0x63, 0xa5, 0xb0, 0xf4, 0xf2, 0x9c, 0x7f, - 0xec, 0xd5, 0x62, 0x2f, 0xda, 0xff, 00, 0xc4, 0x8a, 0xb8, - 0x7d, 0x27, 0x4d, 0x73, 0xea, 0x3, 0x8f, 0xfd, 0x9a, 0xb6, - 0x9f, 0xf6, 0x3d, 0x71, 0x8d, 0x9a, 0xd8, 0x3f, 0x58, 0xea, - 0x17, 0xfd, 0x8f, 0xee, 0x81, 0x3b, 0x75, 0x98, 0xcf, 0xa6, - 0x52, 0xa7, 0x93, 0x3a, 0x5f, 0xcd, 0xf7, 0xa0, 0xf6, 0x79, - 0xe2, 0xfb, 0x5f, 0x91, 0x4d, 0x7f, 0x6c, 0x4d, 0x6c, 0x1, - 0xbb, 0x42, 0xb0, 0x27, 0xb9, 0xe, 0xe3, 0x35, 0x3a, 0x7e, - 0xd8, 0xda, 0x98, 0x3f, 0x37, 0x87, 0x6d, 0x8, 0xf6, 0xb8, - 0x61, 0xfd, 0x29, 0xad, 0xfb, 0x21, 0x6a, 0x40, 0x71, 0xaa, - 0xc2, 0x4f, 0xa6, 0xda, 0x85, 0xff, 00, 0x64, 0x4d, 0x60, - 0x1f, 0x97, 0x53, 0x80, 0xfe, 0x14, 0xef, 0x9d, 0xae, 0xff, - 00, 0x80, 0x7f, 0xc2, 0xe2, 0xeb, 0xf9, 0x17, 0x7, 0xed, - 0x8f, 0x7b, 0xdf, 0xc3, 0x56, 0xdf, 0x85, 0xd3, 0x7f, 0xf1, - 0x35, 0x22, 0xfe, 0xd8, 0xf7, 0x3c, 0x6e, 0xf0, 0xd4, 0x3e, - 0xf8, 0xba, 0x3f, 0xfc, 0x4d, 0x64, 0x37, 0xec, 0x8f, 0xaf, - 0x1, 0xf2, 0xdf, 0xdb, 0x93, 0xe8, 0x6a, 0x16, 0xfd, 0x92, - 0xfc, 0x48, 0xf, 0xcb, 0x75, 0x6c, 0x47, 0xae, 0xea, 0x4e, - 0xae, 0x74, 0xbf, 0x9b, 0xee, 0x42, 0xe7, 0xcf, 0x17, 0xfc, - 0x32, 0x3a, 0x45, 0xfd, 0xb1, 0xf9, 0xf9, 0xbc, 0x32, 0x31, - 0xed, 0x77, 0xff, 00, 0xd8, 0xd4, 0xf1, 0xfe, 0xd8, 0xf6, - 0xd8, 0x3b, 0xfc, 0x37, 0x26, 0x7b, 0x6d, 0xba, 0x1f, 0xfc, - 0x4d, 0x71, 0x6f, 0xfb, 0x29, 0x78, 0xa9, 0x46, 0x43, 0xdb, - 0x93, 0xe9, 0xbc, 0x54, 0x2f, 0xfb, 0x2c, 0x78, 0xb5, 0x71, - 0x81, 0x9, 0xfa, 0x38, 0xa5, 0xf5, 0x9c, 0xe5, 0x74, 0x97, - 0xfe, 0x2, 0xbf, 0xc8, 0x7e, 0xdf, 0x3b, 0x5f, 0x67, 0xf0, - 0x47, 0xa2, 0x45, 0xfb, 0x62, 0xe9, 0x45, 0x7, 0x99, 0xe1, - 0xeb, 0xb0, 0xfe, 0x8b, 0x3a, 0x11, 0xfc, 0xaa, 0xc2, 0x7e, - 0xd8, 0x3a, 0x1, 0xc6, 0xfd, 0xf, 0x50, 0x5f, 0x5c, 0x3a, - 0x1f, 0xeb, 0x5e, 0x58, 0xff, 00, 0xb2, 0xff, 00, 0x8c, - 0x57, 0x38, 0x82, 0x26, 0xc7, 0xfb, 0x62, 0xa2, 0x6f, 0xd9, - 0x97, 0xc6, 0x63, 0x18, 0xb4, 0x43, 0xf4, 0x71, 0x4f, 0xeb, - 0xb9, 0xc2, 0xfb, 0x2f, 0xff, 00, 0x1, 0xff, 00, 0x80, - 0x1f, 0x5a, 0xce, 0x97, 0xd8, 0xfc, 0x11, 0xeb, 0xa3, 0xf6, - 0xbe, 0xf0, 0xd7, 0x7d, 0x23, 0x53, 0x1f, 0xf7, 0xef, 0xff, - 00, 0x8a, 0xa7, 0xaf, 0xed, 0x79, 0xe1, 0x72, 0x39, 0xd2, - 0xf5, 0x31, 0xff, 00, 0x1, 0x4f, 0xfe, 0x2a, 0xbc, 0x61, - 0xff, 00, 0x66, 0xcf, 0x1a, 0xa6, 0x71, 0xa7, 0x86, 0xc7, - 0xa3, 0x8a, 0x85, 0xff, 00, 0x67, 0x5f, 0x1b, 0xa0, 0xcf, - 0xf6, 0x53, 0x1f, 0xa3, 0xa, 0x3f, 0xb4, 0x33, 0x65, 0xf6, - 0x5f, 0xfe, 0x3, 0xff, 00, 00, 0x5f, 0x5e, 0xce, 0x56, - 0xf4, 0xff, 00, 0x3, 0xdc, 0x47, 0xed, 0x71, 0xe1, 0x42, - 0x46, 0x74, 0xfd, 0x4c, 0xf, 0xf7, 0x13, 0xff, 00, 0x8a, - 0xa9, 0xe3, 0xfd, 0xac, 0xfc, 0x1e, 0xc4, 0xee, 0xb6, 0xd4, - 0x90, 0x7f, 0xd7, 0x15, 0x3f, 0xfb, 0x35, 0x78, 0x3, 0x7e, - 0xcf, 0xfe, 0x36, 0x52, 0x47, 0xf6, 0x3c, 0x9f, 0x81, 0x15, - 0xb, 0xfc, 0x9, 0xf1, 0xa2, 0xc, 0xff, 00, 0x63, 0x4c, - 0x7e, 0x98, 0xa5, 0xfd, 0xa7, 0x9a, 0x2d, 0xe2, 0xff, 00, - 0xf0, 0x16, 0x1f, 0xda, 0x39, 0xba, 0xde, 0x9f, 0xe0, 0x7d, - 0x19, 0x1f, 0xed, 0x59, 0xe0, 0x97, 0x5c, 0xb7, 0xf6, 0x8a, - 0x1f, 0x43, 0x6c, 0xf, 0xfe, 0xcd, 0x53, 0xaf, 0xed, 0x4b, - 0xe0, 0x43, 0x8c, 0xdc, 0x5e, 0x8f, 0xad, 0xab, 0x71, 0x5f, - 0x33, 0xb7, 0xc1, 0x2f, 0x19, 0x29, 0xff, 00, 0x90, 0x2d, - 0xc7, 0xe5, 0x50, 0x37, 0xc1, 0xcf, 0x18, 0x20, 0xc9, 0xd1, - 0x2e, 0x71, 0xec, 0xb5, 0x5f, 0xda, 0xf9, 0x92, 0xde, 0x1f, - 0xf9, 0x2b, 0xf, 0xed, 0x5c, 0xd5, 0x6f, 0x4b, 0xf0, 0x7f, - 0xe6, 0x7d, 0x48, 0x3f, 0x69, 0xff, 00, 0x1, 0x1f, 0xf9, - 0x7f, 0xba, 0x1f, 0xf6, 0xe8, 0xff, 00, 0xe1, 0x4e, 0x1f, - 0xb4, 0xe7, 0x80, 0x4f, 0xfc, 0xc4, 0x6e, 0x7, 0xd6, 0xd1, - 0xff, 00, 0xc2, 0xbe, 0x54, 0x7f, 0x84, 0xde, 0x2d, 0x8f, - 0xae, 0x87, 0x77, 0xf8, 0x25, 0x40, 0xdf, 0xc, 0xfc, 0x50, - 0xa0, 0x93, 0xa3, 0x5d, 0xf1, 0xff, 00, 0x4c, 0xcd, 0x27, - 0x9d, 0x66, 0xb, 0xec, 0x2f, 0xfc, 0x5, 0xff, 00, 0x98, - 0xbf, 0xb6, 0x33, 0x35, 0xbd, 0x2f, 0xc1, 0xff, 00, 0x99, - 0xf5, 0xa8, 0xfd, 0xa5, 0xfc, 0x2, 0x46, 0x7f, 0xb5, 0x26, - 0x1f, 0x5b, 0x57, 0xff, 00, 0xa, 0x9d, 0x3f, 0x68, 0xdf, - 00, 0xb9, 0xc7, 0xf6, 0xd1, 0x5f, 0x76, 0xb7, 0x93, 0xff, - 00, 0x89, 0xaf, 0x8f, 0x9b, 0xe1, 0xe7, 0x89, 0x13, 0x19, - 0xd2, 0x2e, 0xc6, 0x7f, 0xe9, 0x99, 0xa8, 0xdb, 0xc0, 0xbe, - 0x20, 0x4c, 0xe7, 0x4a, 0xbb, 0x18, 0xeb, 0xfb, 0xb3, 0x4b, - 0xfb, 0x73, 0x1c, 0xb7, 0x82, 0xfb, 0x9f, 0xf9, 0x87, 0xf6, - 0xd6, 0x60, 0xb7, 0xa5, 0xf8, 0x3f, 0xf3, 0x3e, 0xcc, 0x8f, - 0xf6, 0x84, 0xf0, 0xc, 0x99, 0xff, 00, 0x89, 0xfc, 0x6b, - 0x8f, 0xef, 0x43, 0x20, 0xff, 00, 0xd9, 0x6a, 0x75, 0xf8, - 0xf1, 0xe0, 0x26, 0x50, 0x47, 0x88, 0xed, 0xb9, 0xf5, 0x57, - 0x1f, 0xd2, 0xbe, 0x27, 0x6f, 0x7, 0x6b, 0x8b, 0xd7, 0x4c, - 0xba, 0x1f, 0xf6, 0xcc, 0xd4, 0x6d, 0xe1, 0x6d, 0x65, 0x9, - 0x7, 0x4e, 0xba, 0x18, 0xff, 00, 0xa6, 0x66, 0x9f, 0xf6, - 0xfe, 0x2d, 0x6f, 0x5, 0xf7, 0x3f, 0xf3, 0x1f, 0xf6, 0xee, - 0x35, 0x6f, 0x47, 0xf0, 0x67, 0xdc, 0x23, 0xe3, 0x87, 0x81, - 0xf, 0xfc, 0xcc, 0xd6, 0x5f, 0x99, 0xff, 00, 0xa, 0x92, - 0x3f, 0x8d, 0x3e, 0x7, 0x90, 0x90, 0xbe, 0x26, 0xb0, 0xe3, - 0xd6, 0x4c, 0x7f, 0x4a, 0xf8, 0x54, 0xe8, 0x1a, 0xa2, 0x8c, - 0x9b, 0x1b, 0x80, 0x3f, 0xeb, 0x99, 0xa6, 0x1d, 0x1b, 0x51, - 0x5e, 0xb6, 0x93, 0x8f, 0xf8, 0x1, 0xa7, 0xfe, 0xb0, 0xe2, - 0x7f, 0x92, 0x3f, 0x8f, 0xf9, 0x87, 0xf6, 0xfe, 0x2f, 0xad, - 0x1f, 0xcc, 0xfb, 0xc9, 0x7e, 0x2f, 0x78, 0x2d, 0x86, 0x47, - 0x89, 0x74, 0xec, 0x7f, 0xd7, 0x61, 0x53, 0x47, 0xf1, 0x4f, - 0xc2, 0x12, 0x90, 0x17, 0xc4, 0x7a, 0x71, 0x27, 0xa7, 0xfa, - 0x42, 0xd7, 0xc0, 0xa7, 0x4b, 0xbe, 0x1d, 0x6d, 0xa5, 0x1f, - 0xf0, 0x3, 0x4d, 0x3a, 0x7d, 0xe2, 0xf5, 0xb7, 0x97, 0xfe, - 0xf8, 0x34, 0x7f, 0xac, 0x55, 0xfa, 0xc2, 0x3f, 0x88, 0xff, - 00, 0xd6, 0x1c, 0x42, 0xde, 0x8f, 0xe6, 0x7e, 0x82, 0xc3, - 0xf1, 0xb, 0xc3, 0x17, 0xd, 0xb6, 0x3f, 0x10, 0x69, 0xac, - 0x7a, 0xe3, 0xed, 0x28, 0x3f, 0xad, 0x5a, 0x4f, 0x17, 0xe8, - 0x52, 0x2e, 0x53, 0x59, 0xb0, 0x61, 0xea, 0x2e, 0x50, 0xff, - 00, 0x5a, 0xfc, 0xee, 0x36, 0xb7, 0x23, 0xac, 0x2e, 0x3f, - 0xe0, 0x26, 0x9a, 0x61, 0x98, 0x7f, 0xcb, 0x36, 0xfc, 0xaa, - 0xd7, 0x12, 0x54, 0xeb, 0x4d, 0x7d, 0xe5, 0x2e, 0x23, 0xab, - 0xd6, 0x8f, 0xe3, 0xff, 00, 00, 0xfd, 0x1c, 0x1a, 0xee, - 0x9a, 0x71, 0x8d, 0x42, 0xd4, 0xe7, 0xfe, 0x9b, 0x2f, 0xf8, - 0xd3, 0x86, 0xb3, 0xa7, 0x9e, 0x97, 0xd6, 0xc7, 0xfe, 0xdb, - 0x2f, 0xf8, 0xd7, 0xe7, 0x6, 0xc9, 0x47, 0xf0, 0x37, 0xe5, - 0x47, 0xef, 0x57, 0xb3, 0xa, 0xd3, 0xfd, 0x64, 0x97, 0xfc, - 0xfa, 0x5f, 0x7f, 0xfc, 0x1, 0xff, 00, 0xac, 0x92, 0xff, - 00, 0x9f, 0x3f, 0x8f, 0xfc, 0x3, 0xf4, 0x84, 0x6a, 0xb6, - 0x47, 0xa5, 0xe4, 0x7, 0xe9, 0x2a, 0xff, 00, 0x8d, 0x38, - 0x6a, 0x16, 0xad, 0x8c, 0x5c, 0xc2, 0x73, 0xe9, 0x20, 0xaf, - 0xcd, 0xc1, 0x24, 0xc3, 0xa1, 0x61, 0xf9, 0xd3, 0x85, 0xcd, - 0xc2, 0xf4, 0x77, 0x18, 0xff, 00, 0x68, 0xd3, 0x5c, 0x48, - 0xff, 00, 0xe7, 0xd7, 0xe3, 0xff, 00, 00, 0x7f, 0xeb, - 0x2f, 0x7a, 0x5f, 0x8f, 0xfc, 0x3, 0xf4, 0x95, 0x67, 0x8d, - 0xce, 0x16, 0x44, 0x63, 0xe8, 0x18, 0x1a, 0x7e, 0x47, 0xad, - 0x7e, 0x6d, 0xae, 0xa7, 0x7a, 0x87, 0x2b, 0x73, 0x32, 0x9f, - 0x51, 0x21, 0x1f, 0xd6, 0xa4, 0x1a, 0xe6, 0xa2, 0xbd, 0x2f, - 0x6e, 0x47, 0xd2, 0x66, 0xff, 00, 0x1a, 0xa5, 0xc4, 0x9d, - 0xe9, 0x7e, 0x3f, 0xf0, 0xa, 0xff, 00, 0x59, 0x63, 0xff, - 00, 0x3e, 0xbf, 0x1f, 0xf8, 0x7, 0xe9, 0x6, 0x45, 0x19, - 0xaf, 0xce, 0x31, 0xe2, 0x4d, 0x58, 0xc, 0xd, 0x4a, 0xf0, - 0xf, 0x69, 0xdf, 0xfc, 0x69, 0xc3, 0xc5, 0x3a, 0xc8, 0x3c, - 0x6a, 0x97, 0xc0, 0xff, 00, 0xd7, 0xc3, 0xff, 00, 0x8d, - 0x5f, 0xfa, 0xc7, 0x1f, 0xf9, 0xf5, 0xf8, 0xff, 00, 0xc0, - 0x1f, 0xfa, 0xcb, 0x4f, 0xfe, 0x7d, 0x3f, 0xbf, 0xfe, 0x1, - 0xfa, 0x35, 0x9a, 0x5a, 0xfc, 0xe8, 0x5f, 0x18, 0xeb, 0xb1, - 0xe4, 0x2e, 0xb1, 0x7e, 0xb9, 0xeb, 0x8b, 0x97, 0xe7, 0xf5, - 0xa9, 0x53, 0xc7, 0x7e, 0x22, 0x89, 0x76, 0xae, 0xb9, 0xa9, - 0x28, 0xf4, 0x17, 0x6f, 0xfe, 0x34, 0x7f, 0xac, 0x71, 0xff, - 00, 0x9f, 0x5f, 0x8f, 0xfc, 0x2, 0x97, 0x12, 0xd2, 0xeb, - 0x4d, 0xfd, 0xe7, 0xe8, 0x95, 0x15, 0xf9, 0xe8, 0x9f, 0x12, - 0xbc, 0x55, 0x19, 0x5, 0x7c, 0x43, 0xaa, 0x2, 0x3a, 0x7f, - 0xa5, 0xbf, 0xf8, 0xd4, 0xf1, 0xfc, 0x57, 0xf1, 0x84, 0x59, - 0xdb, 0xe2, 0x5d, 0x50, 0x67, 0xfe, 0x9e, 0x9f, 0xfc, 0x6a, - 0xd7, 0x11, 0xd3, 0xeb, 0x4d, 0xfd, 0xe8, 0xb5, 0xc4, 0x94, - 0x3a, 0xc1, 0xfe, 0x7, 0xe8, 0x25, 0x15, 0xf0, 00, 0xf8, - 0xc3, 0xe3, 0x40, 0x38, 0xf1, 0x3e, 0xa9, 0xff, 00, 0x81, - 0xd, 0x4f, 0x1f, 0x19, 0xbc, 0x6c, 0xe, 0x7f, 0xe1, 0x26, - 0xd4, 0x7f, 0xef, 0xf1, 0xaa, 0xff, 00, 0x58, 0xa8, 0xff, - 00, 0xcf, 0xb7, 0xf8, 0xf, 0xfd, 0x64, 0xc3, 0xff, 00, - 0x23, 0xfc, 0xf, 0xbf, 0x28, 0xaf, 0x82, 0x57, 0xe3, 0x8f, - 0x8e, 0x54, 0xe4, 0x78, 0x92, 0xf8, 0xfd, 0x5c, 0x7f, 0x85, - 0x4a, 0x9f, 0x1e, 0x3c, 0x74, 0x99, 0xc7, 0x88, 0xae, 0xcf, - 0xd7, 0x7, 0xfa, 0x53, 0xff, 00, 0x58, 0xa8, 0x7f, 0xcf, - 0xb9, 0x7e, 0x1f, 0xe6, 0x5a, 0xe2, 0x3c, 0x2f, 0xf2, 0xbf, - 0xc3, 0xfc, 0xcf, 0xbc, 0x68, 0xaf, 0x86, 0x23, 0xfd, 0xa1, - 0xfc, 0x7b, 0x18, 0x51, 0xfd, 0xbd, 0x23, 0x6d, 0xfe, 0xf4, - 0x48, 0x73, 0xf5, 0xe2, 0xac, 0xc7, 0xfb, 0x4a, 0xf8, 0xf6, - 0x37, 0xdd, 0xfd, 0xae, 0x8d, 0xec, 0xd6, 0xd1, 0x91, 0xfc, - 0xaa, 0xd7, 0x10, 0xe1, 0xba, 0xc2, 0x5f, 0x87, 0xf9, 0x96, - 0xb8, 0x8b, 0x9, 0xd9, 0xfd, 0xcb, 0xfc, 0xcf, 0xb7, 0xa8, - 0xaf, 0x8a, 0x17, 0xf6, 0x9f, 0xf1, 0xe8, 0x1c, 0xea, 0x36, - 0xed, 0xf5, 0xb4, 0x4f, 0xf0, 0xa7, 0x8f, 0xda, 0x8b, 0xc7, - 0x7f, 0xf3, 0xfb, 0x69, 0xff, 00, 0x80, 0xab, 0x57, 0xfe, - 0xb0, 0x61, 0x7b, 0x4b, 0xee, 0x5f, 0xe6, 0x57, 0xfa, 0xc3, - 0x83, 0xf3, 0xfb, 0xbf, 0xe0, 0x9f, 0x6a, 0x51, 0x5f, 0x17, - 0xaf, 0xed, 0x4f, 0xe3, 0x90, 0x46, 0x6e, 0x2c, 0xdb, 0xd8, - 0xdb, 0xa, 0x9e, 0x2f, 0xda, 0xb7, 0xc6, 0xb1, 0xb1, 0x2c, - 0x74, 0xf9, 0x6, 0x3a, 0x35, 0xb9, 0xfe, 0x86, 0x9f, 0xfa, - 0xc1, 0x84, 0xed, 0x2f, 0xbb, 0xfe, 0x9, 0x4b, 0x88, 0x30, - 0x5d, 0xdf, 0xdc, 0x7d, 0x93, 0x45, 0x7c, 0x7e, 0xbf, 0xb5, - 0xbf, 0x8b, 0x82, 0x80, 0x6d, 0x34, 0xb6, 0x3e, 0xbe, 0x4b, - 0xff, 00, 0xf1, 0x55, 0x3a, 0x7e, 0xd7, 0x9e, 0x29, 0xc, - 0xb, 0x69, 0xba, 0x5b, 0xe, 0xe3, 0x63, 0x8f, 0xfd, 0x9a, - 0xad, 0x67, 0xd8, 0x3f, 0x3f, 0xb8, 0xb5, 0x9f, 0x60, 0x7f, - 0x99, 0xfd, 0xc7, 0xd7, 0x34, 0x57, 0xc9, 0xab, 0xfb, 0x60, - 0xf8, 0x88, 0x67, 0x76, 0x8d, 0xa6, 0x1f, 0xa1, 0x90, 0x7f, - 0xec, 0xd4, 0xf1, 0xfb, 0x61, 0xeb, 0xdd, 0xf4, 0x3d, 0x37, - 0xfe, 0xfa, 0x93, 0xfc, 0x6a, 0xbf, 0xb7, 0x70, 0x5f, 0xcc, - 0xfe, 0xe6, 0x57, 0xf6, 0xee, 0x7, 0xf9, 0x9f, 0xdc, 0xcf, - 0xab, 0xe8, 0xaf, 0x94, 0xd7, 0xf6, 0xc4, 0xd6, 0xf8, 0xce, - 0x85, 0xa7, 0x9f, 0xa4, 0x8f, 0xfe, 0x35, 0x22, 0xfe, 0xd8, - 0x9a, 0xb6, 0x79, 0xd0, 0x2c, 0x88, 0xf6, 0x99, 0xe9, 0xff, - 00, 0x6e, 0x60, 0xbf, 0x99, 0xfd, 0xcc, 0x7f, 0xdb, 0x98, - 0x1f, 0xe7, 0xfc, 0x19, 0xf5, 0x45, 0x15, 0xf2, 0xf4, 0x7f, - 0xb6, 0x35, 0xe8, 0x5f, 0x9f, 0xc3, 0x76, 0xe5, 0xbd, 0x56, - 0xe9, 0x80, 0xff, 00, 0xd0, 0x6a, 0x65, 0xfd, 0xb2, 0x26, - 0xe3, 0x3e, 0x18, 0x8f, 0xdf, 0x17, 0x87, 0xff, 00, 0x88, - 0xaa, 0x59, 0xde, 0x7, 0xf9, 0xff, 00, 0x7, 0xfe, 0x45, - 0x2c, 0xeb, 0x2, 0xff, 00, 0xe5, 0xe7, 0xe0, 0xff, 00, - 0xc8, 0xfa, 0x6e, 0x8a, 0xf9, 0xba, 0x3f, 0xdb, 0x22, 0xc, - 0xfc, 0xfe, 0x17, 0x90, 0xf, 0xf6, 0x6f, 0x47, 0xff, 00, - 0x11, 0x5b, 0xda, 0x47, 0xed, 0x6f, 0xe1, 0x6b, 0xb8, 0xd7, - 0xed, 0xf6, 0x37, 0xf6, 0x12, 0x13, 0x82, 0x15, 0x56, 0x55, - 0x3, 0xd7, 0x20, 0x83, 0xfa, 0x56, 0xb0, 0xcd, 0xf0, 0x33, - 0x76, 0x55, 0x3f, 0x35, 0xf9, 0xa3, 0x58, 0x66, 0xd8, 0x29, - 0xbb, 0x2a, 0x8b, 0xf1, 0x5f, 0x99, 0xee, 0x74, 0x57, 0x31, - 0xe1, 0xaf, 0x89, 0x9e, 0x17, 0xf1, 0x7b, 0x4, 0xd2, 0x75, - 0xbb, 0x4b, 0xb9, 0x8f, 0x3e, 0x4e, 0xfd, 0xb2, 0x7f, 0xdf, - 0x2d, 0x83, 0xfa, 0x57, 0x4f, 0x5e, 0xac, 0x2a, 0x42, 0xa2, - 0xe6, 0x83, 0xba, 0xf2, 0x3d, 0x48, 0x4e, 0x15, 0x17, 0x34, - 0x1d, 0xd7, 0x90, 0x51, 0x45, 0x15, 0x65, 0x85, 0x14, 0x51, - 0x40, 0x5, 0x14, 0x51, 0x40, 0x5, 0x14, 0x51, 0x40, 0x5, - 0x14, 0x51, 0x40, 0x5, 0x70, 0x7f, 0x18, 0x7e, 0x28, 0xdb, - 0x7c, 0x2f, 0xf0, 0xc3, 0xdd, 0xfe, 0xee, 0x7d, 0x4e, 0x73, - 0xe5, 0xda, 0x5a, 0xbb, 0x63, 0x7b, 0x77, 0x62, 0x3a, 0xed, - 0x1d, 0x4f, 0xe0, 0x3b, 0xd7, 0x75, 0x24, 0x8b, 0x12, 0x33, - 0xbb, 0x5, 0x45, 0x4, 0x96, 0x3d, 00, 0xaf, 0x82, 0x7e, - 0x32, 0x7c, 0x40, 0x7f, 0x88, 0xde, 0x3a, 0xbd, 0xbf, 0x57, - 0x26, 0xc2, 0x13, 0xf6, 0x7b, 0x34, 0xcf, 0x2, 0x35, 0x3d, - 0x7f, 0xe0, 0x47, 0x27, 0xf1, 0xaf, 0x17, 0x35, 0xc6, 0xbc, - 0x1d, 0xf, 0x73, 0xe2, 0x96, 0x8b, 0xfc, 0xcf, 0xf, 0x37, - 0xc7, 0xfd, 0x46, 0x87, 0xb9, 0xf1, 0xcb, 0x45, 0xfe, 0x7f, - 0x23, 0xa3, 0xf8, 0x39, 0xa7, 0xea, 0x1f, 0x13, 0x7e, 0x2a, - 0xc5, 0xa9, 0x6a, 0x92, 0xbd, 0xe3, 0xac, 0x86, 0xe2, 0x79, - 0x24, 0x39, 0xfa, 0xf, 0x61, 0xe8, 0x2b, 0xed, 0x40, 0x2, - 0x80, 0x7, 00, 0x57, 0x83, 0xfe, 0xca, 0x7e, 0x10, 0xfe, - 0xcc, 0xf0, 0xd5, 0xce, 0xb1, 0x34, 0x78, 0x9a, 0xe9, 0xf6, - 0xa1, 0x23, 0xf8, 0x45, 0x7b, 0xcd, 0x63, 0x92, 0x50, 0x74, - 0xb0, 0xbe, 0xd2, 0x5b, 0xcd, 0xdf, 0xfc, 0x83, 0x27, 0xa0, - 0xe9, 0x61, 0x54, 0xa7, 0xf1, 0x4b, 0x56, 0x14, 0x51, 0x45, - 0x7d, 0x1, 0xee, 0x5, 0x14, 0x51, 0x40, 0x5, 0x14, 0x84, - 0x64, 0x70, 0x71, 0xef, 0x40, 0x18, 0x1c, 0x92, 0x7e, 0xb4, - 00, 0xb4, 0x53, 0x2, 0xed, 0x39, 0xde, 0x48, 0xf4, 0x3d, - 0x29, 0xc0, 0x83, 0xd0, 0xe6, 0x80, 0x16, 0x8a, 0x28, 0xa0, - 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, - 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, - 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, - 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x93, 0x2, 0x96, - 0x8a, 00, 0x4c, 0xf, 0x4a, 0x4d, 0x8a, 0x7b, 0xf, 0xca, - 0x9d, 0x45, 00, 0x37, 0xca, 0x43, 0xfc, 0xb, 0xf9, 0x53, - 0x4c, 0x11, 0x1e, 0xb1, 0xa7, 0xfd, 0xf2, 0x2a, 0x4a, 0x29, - 0x58, 0x8, 0xbe, 0xcb, 0xf, 0xfc, 0xf1, 0x8f, 0xfe, 0xf9, - 0x14, 0xd3, 0x65, 0x6e, 0x7a, 0xc1, 0x17, 0xfd, 0xf0, 0x2a, - 0x7a, 0x28, 0xb2, 0x15, 0x91, 0x59, 0xb4, 0xeb, 0x46, 0xeb, - 0x6b, 0x9, 0xfa, 0xc6, 0x29, 0x87, 0x47, 0xb1, 0x6e, 0xb6, - 0x70, 0x1f, 0xac, 0x63, 0xfc, 0x2a, 0xe5, 0x14, 0xb9, 0x63, - 0xd8, 0x2c, 0xbb, 0x19, 0xe7, 0x40, 0xd3, 0x1b, 0xad, 0x85, - 0xb1, 0xff, 00, 0xb6, 0x4b, 0xfe, 0x14, 0xc6, 0xf0, 0xce, - 0x92, 0xdd, 0x74, 0xdb, 0x53, 0xff, 00, 0x6c, 0x85, 0x69, - 0xd1, 0x4b, 0xd9, 0xc3, 0xb2, 0x17, 0x2c, 0x7b, 0x19, 0x7, - 0xc2, 0x3a, 0x2b, 0x75, 0xd2, 0xed, 0x4f, 0xfd, 0xb2, 0x15, - 0x1b, 0x78, 0x2b, 0x41, 0x73, 0x93, 0xa4, 0x59, 0x93, 0xef, - 0xa, 0xd6, 0xdd, 0x15, 0x3e, 0xca, 0x9b, 0xfb, 0x2b, 0xee, - 0x17, 0x24, 0x3b, 0x1c, 0xf3, 0x7c, 0x3f, 0xf0, 0xe3, 0x75, - 0xd1, 0xed, 0x3f, 0xef, 0xd0, 0xa8, 0x9b, 0xe1, 0xaf, 0x86, - 0x1f, 0xae, 0x8b, 0x69, 0xff, 00, 0x7e, 0xc5, 0x74, 0xd4, - 0x54, 0xfd, 0x5e, 0x8b, 0xfb, 0xb, 0xee, 0x44, 0xfb, 0x2a, - 0x6f, 0xec, 0xaf, 0xb8, 0xe4, 0xdf, 0xe1, 0x5f, 0x85, 0x5f, - 0x39, 0xd1, 0x6d, 0xb9, 0xff, 00, 0x60, 0x54, 0x2d, 0xf0, - 0x87, 0xc2, 0x4f, 0xd7, 0x45, 0xb7, 0xff, 00, 0xbe, 0x6b, - 0xb2, 0xa2, 0xa3, 0xea, 0xb4, 0x1f, 0xd8, 0x5f, 0x72, 0x17, - 0xb0, 0xa5, 0xfc, 0xab, 0xee, 0x38, 0x76, 0xf8, 0x2f, 0xe0, - 0xf7, 0xeb, 0xa3, 0x41, 0xf9, 0x54, 0x2f, 0xf0, 0x2f, 0xc1, - 0x8f, 0xff, 00, 0x30, 0x78, 0xc7, 0xd2, 0xbb, 0xea, 0x2a, - 0x5e, 0xb, 0xc, 0xf7, 0xa6, 0xbe, 0xe4, 0x4f, 0xd5, 0xa8, - 0xbf, 0xb0, 0xbe, 0xe3, 0xce, 0x9f, 0xe0, 0x17, 0x83, 0x1f, - 0xfe, 0x61, 0x6a, 0x3e, 0x86, 0xa0, 0x7f, 0xd9, 0xe3, 0xc1, - 0x8f, 0xff, 00, 0x2e, 0x4, 0x7d, 0xd, 0x7a, 0x65, 0x15, - 0xf, 0x1, 0x84, 0x7f, 0xf2, 0xe9, 0x7d, 0xc8, 0x9f, 0xaa, - 0x50, 0x7f, 0x61, 0x7d, 0xc7, 0x96, 0xbf, 0xec, 0xe1, 0xe0, - 0xd7, 0xff, 00, 0x97, 0x37, 0x1f, 0xf0, 0x2a, 0x81, 0xff, - 00, 0x66, 0x7f, 0x7, 0x37, 0xfc, 0xb0, 0x94, 0x7d, 0x1a, - 0xbd, 0x66, 0x8a, 0x9f, 0xec, 0xdc, 0x1b, 0xff, 00, 0x97, - 0x4b, 0xee, 0x23, 0xea, 0x58, 0x67, 0xff, 00, 0x2e, 0xd7, - 0xdc, 0x79, 0x3, 0xfe, 0xcb, 0xfe, 0xf, 0x7f, 0xe0, 0xb8, - 0x5f, 0xa3, 0xd4, 0xd, 0xfb, 0x2c, 0x78, 0x4c, 0xf4, 0x7b, - 0x81, 0xf8, 0x8a, 0xf6, 0x6a, 0x2a, 0x1e, 0x57, 0x82, 0x7f, - 0xf2, 0xe9, 0x12, 0xf0, 0x18, 0x57, 0xff, 00, 0x2e, 0xd7, - 0xdc, 0x78, 0x9b, 0xfe, 0xca, 0x7e, 0x16, 0x6e, 0x97, 0x17, - 0x23, 0xf1, 0x15, 0xb, 0xfe, 0xc9, 0xbe, 0x1b, 0x6f, 0xbb, - 0x79, 0x72, 0x3f, 0x2a, 0xf7, 0x2a, 0x2a, 0x7f, 0xb2, 0x70, - 0x3f, 0xf3, 0xe9, 0x12, 0xf2, 0xec, 0x23, 0xff, 00, 0x97, - 0x68, 0xf0, 0x76, 0xfd, 0x92, 0x74, 0x3, 0xd3, 0x50, 0xb9, - 0x1f, 0x80, 0xa8, 0x5b, 0xf6, 0x45, 0xd1, 0xf, 0x4d, 0x52, - 0xe0, 0x7f, 0xc0, 0x45, 0x7b, 0xf5, 0x15, 0x3f, 0xd9, 0x18, - 0x1f, 0xf9, 0xf7, 0xf9, 0x90, 0xf2, 0xbc, 0x1b, 0xff, 00, - 0x97, 0x68, 0xf9, 0xe9, 0xff, 00, 0x64, 0x2d, 0x2c, 0xfd, - 0xdd, 0x62, 0x7f, 0xc5, 0x5, 0x40, 0xff, 00, 0xb2, 0x5, - 0x97, 0xf0, 0xeb, 0x12, 0x7e, 0x28, 0x2b, 0xe8, 0xca, 0x2a, - 0x3f, 0xb1, 0xb0, 0x3f, 0xf3, 0xef, 0xf1, 0x7f, 0xe6, 0x4b, - 0xca, 0x70, 0x4f, 0xfe, 0x5d, 0xa3, 0xe6, 0xd6, 0xfd, 0x90, - 0x21, 0xfe, 0x1d, 0x65, 0xbf, 0x14, 0xa8, 0x5f, 0xf6, 0x40, - 0x3f, 0xc3, 0xac, 0x7e, 0x69, 0x5f, 0x4c, 0x51, 0x53, 0xfd, - 0x89, 0x81, 0xfe, 0x4f, 0xc5, 0x91, 0xfd, 0x91, 0x82, 0xff, - 00, 0x9f, 0x67, 0xcc, 0xf, 0xfb, 0x20, 0x4f, 0xfc, 0x3a, - 0xba, 0xfe, 0x2b, 0x50, 0xbf, 0xec, 0x83, 0x7e, 0x3e, 0xee, - 0xaf, 0x11, 0xfa, 0xad, 0x7d, 0x4b, 0x45, 0x4f, 0xf6, 0x1e, - 0x7, 0xf9, 0x5f, 0xde, 0xc9, 0x79, 0x36, 0x5, 0xfd, 0x83, - 0xe5, 0x37, 0xfd, 0x91, 0x35, 0x51, 0xd3, 0x53, 0x84, 0xfe, - 0x15, 0x3, 0xfe, 0xc9, 0x1a, 0xd8, 0xe9, 0x7d, 0xb, 0x57, - 0xd6, 0x74, 0x54, 0xbc, 0x87, 0x5, 0xd9, 0xfd, 0xec, 0x87, - 0x92, 0x60, 0x7f, 0x93, 0xf1, 0x3e, 0x46, 0x7f, 0xd9, 0x33, - 0xc4, 0x23, 0xa5, 0xd4, 0x7, 0xf1, 0xa8, 0x1f, 0xf6, 0x51, - 0xf1, 0x28, 0xfb, 0xb2, 0xc2, 0x7f, 0x1a, 0xfb, 0x2, 0x8a, - 0x8f, 0xec, 0xc, 0x1f, 0x9f, 0xde, 0x4f, 0xf6, 0x16, 0xb, - 0xf9, 0x7f, 0x13, 0xe3, 0x87, 0xfd, 0x95, 0x7c, 0x54, 0x3e, - 0xe9, 0x85, 0xbf, 0xe0, 0x42, 0xa1, 0x7f, 0xd9, 0x6f, 0xc5, - 0xeb, 0xd2, 0x38, 0x8f, 0xd1, 0xc5, 0x7d, 0x9b, 0x45, 0x4f, - 0xfa, 0xbf, 0x84, 0xee, 0xfe, 0xff, 00, 0xf8, 0x4, 0xff, - 00, 0x60, 0xe0, 0xbb, 0x3f, 0xbc, 0xf8, 0xad, 0xff, 00, - 0x66, 0x3f, 0x18, 0xaf, 0x4b, 0x64, 0x3f, 0xf0, 0x31, 0x50, - 0xbf, 0xec, 0xd7, 0xe3, 0x35, 0xff, 00, 0x97, 0x20, 0x7f, - 0xe0, 0x42, 0xbe, 0xda, 0xa2, 0xa7, 0xfd, 0x5e, 0xc3, 0x7f, - 0x34, 0xbf, 0xf, 0xf2, 0x23, 0xfd, 0x5f, 0xc1, 0xf9, 0xfd, - 0xe7, 0xc3, 0xcd, 0xfb, 0x39, 0xf8, 0xd1, 0x7f, 0xe6, 0x1a, - 0x4f, 0xfc, 0x8, 0x54, 0x2f, 0xfb, 0x3d, 0xf8, 0xd1, 0x7f, - 0xe6, 0x14, 0xe7, 0xf1, 0x15, 0xf7, 0x3d, 0x15, 0x3f, 0xea, - 0xee, 0x1f, 0xf9, 0xe5, 0xf8, 0x7f, 0x91, 0x3f, 0xea, 0xf6, - 0x13, 0xcf, 0xef, 0x3e, 0x12, 0x3f, 0x1, 0xbc, 0x6d, 0xb, - 0x6, 0x5d, 0x22, 0x60, 0xc3, 0xa3, 0x29, 0xc1, 0x15, 0xde, - 0x78, 0x43, 0xc6, 0xbf, 0x14, 0xfe, 0x15, 0x6c, 0x5d, 0x57, - 0x4c, 0xbc, 0xd7, 0x34, 0x55, 0xfb, 0xf0, 0x5d, 0x12, 0xd2, - 0xa2, 0xff, 00, 0xb1, 0x27, 0x5f, 0xc0, 0xe4, 0x7d, 0x2b, - 0xeb, 0x1a, 0x82, 0xf2, 0xde, 0x2b, 0x9b, 0x69, 0x12, 0x64, - 0x59, 0x10, 0xa9, 0xc8, 0x61, 0x5a, 0xd2, 0xc9, 0x56, 0x19, - 0xf3, 0xd0, 0xab, 0x24, 0xfe, 0x45, 0x53, 0xc8, 0xe9, 0xd0, - 0x7c, 0xf8, 0x7a, 0x92, 0x8b, 0xfe, 0xb7, 0xee, 0x73, 0xbe, - 00, 0xf8, 0x91, 0xa2, 0x7c, 0x48, 0xd2, 0x8d, 0xe6, 0x91, - 0x73, 0xba, 0x58, 0xf0, 0x2e, 0x2d, 0x24, 0xf9, 0x66, 0xb7, - 0x63, 0xfc, 0x2e, 0xbd, 0xbe, 0xbd, 0xd, 0x75, 0x35, 0xf1, - 0x7, 0xc4, 0x6d, 0x72, 0xff, 00, 0xe1, 0x4f, 0xc4, 0x43, - 0xae, 0x78, 0x66, 0x63, 0x69, 0x74, 0x24, 0xfd, 0xfc, 0x20, - 0xfe, 0xee, 0xe1, 0x1, 0xc9, 0x8d, 0xc7, 0x70, 0x7f, 0x31, - 0xda, 0xbe, 0xae, 0xf8, 0x4f, 0xf1, 0x3b, 0x4d, 0xf8, 0xb7, - 0xe0, 0xcb, 0x5d, 0x7f, 0x4d, 0x47, 0x80, 0x3b, 0x34, 0x53, - 0xda, 0xca, 0x46, 0xf8, 0x25, 0x5e, 0x19, 0xf, 0xaf, 0xa8, - 0x3d, 0xc1, 0x6, 0xbd, 0xc, 0xe, 0x35, 0x62, 0x79, 0xa9, - 0xcb, 0xe2, 0x8e, 0x8c, 0xe8, 0xc0, 0x66, 0x4a, 0xbd, 0x59, - 0x61, 0x6a, 0xe9, 0x52, 0x3f, 0x73, 0x5d, 0xd7, 0xea, 0x8e, - 0xc6, 0x8a, 0x28, 0xaf, 0x54, 0xf7, 0x42, 0x8a, 0x28, 0xa0, - 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0xf, 0x37, - 0xfd, 0xa0, 0x7c, 0x6a, 0x3c, 0x17, 0xf0, 0xd7, 0x51, 0x74, - 0x72, 0x97, 0x97, 0xe3, 0xec, 0x56, 0xfb, 0x4e, 0x8, 0x67, - 0x7, 0x24, 0x7d, 0x17, 0x26, 0xbe, 0x25, 0xd0, 0xb4, 0xb9, - 0x35, 0x8d, 0x56, 0xd2, 0xca, 0x15, 0xdc, 0xf3, 0x48, 0x10, - 0x1, 0x5e, 0xd3, 0xfb, 0x5a, 0xf8, 0xcb, 0xfb, 0x5b, 0xc6, - 0x16, 0x7e, 0x1f, 0x85, 0xf3, 0x6, 0x97, 0x1f, 0x99, 0x28, - 0x7, 0x83, 0x33, 0x8c, 0xfe, 0x8b, 0x8f, 0xfb, 0xe8, 0xd6, - 0x77, 0xec, 0xc3, 0xe1, 0x1, 0xaf, 0x78, 0xd8, 0x5f, 0x4d, - 0x1e, 0xeb, 0x7b, 0x25, 0x2f, 0x93, 0xd3, 0x77, 0x6a, 0xfc, - 0xf7, 0x33, 0x93, 0xc7, 0x63, 0xd6, 0x1e, 0x3b, 0x2d, 0x3f, - 0xcc, 0xfc, 0xef, 0x1e, 0xde, 0x63, 0x9a, 0x2a, 0x11, 0xda, - 0x3a, 0x7f, 0x9f, 0xf5, 0xe4, 0x7d, 0x67, 0xe1, 0x3d, 0x12, - 0x3f, 0xe, 0xf8, 0x72, 0xc3, 0x4f, 0x8d, 0x42, 0x88, 0x22, - 0x55, 0x38, 0xf5, 0xc7, 0x35, 0xaf, 0x45, 0x15, 0xfa, 0x4, - 0x62, 0xa1, 0x15, 0x18, 0xec, 0x8f, 0xd0, 0xa2, 0x94, 0x52, - 0x48, 0x28, 0xa2, 0x8a, 0xa2, 0x82, 0x8a, 0x2b, 0xcd, 0xbf, - 0x68, 0xaf, 0x8d, 0xda, 0x47, 0xec, 0xf1, 0xf0, 0x83, 0xc4, - 0x1e, 0x39, 0xd6, 0xe, 0xe8, 0xf4, 0xf8, 0x71, 0x6d, 0x6e, - 0x3e, 0xf5, 0xc5, 0xc3, 0x7c, 0xb1, 0x44, 0x3e, 0xac, 0x46, - 0x7d, 0x6, 0x4f, 0x6a, 00, 0xe7, 0x3f, 0x69, 0x9f, 0xda, - 0xf3, 0xe1, 0xf7, 0xec, 0xaf, 0xa0, 0x47, 0x79, 0xe2, 0xcb, - 0xe7, 0x9f, 0x55, 0xba, 0x52, 0xd6, 0x3a, 0x25, 0x88, 0xf, - 0x77, 0x73, 0x8e, 0xe0, 0x67, 0xa, 0x99, 0xfe, 0x36, 0x20, - 0x7d, 0x4f, 0x15, 0xf9, 0x5d, 0xf1, 0x87, 0xfe, 0xa, 0xd5, - 0xf1, 0x9b, 0xe2, 0x5, 0xc5, 0xdd, 0xbf, 0x85, 0xe5, 0xb1, - 0xf0, 0x1e, 0x90, 0xec, 0x44, 0x4b, 0xa7, 0xc2, 0x26, 0xbb, - 0x9, 0x9e, 0x37, 0x4d, 0x26, 0x46, 0x71, 0xfd, 0xd5, 0x5a, - 0xf9, 0xb3, 0x5d, 0xd7, 0xfc, 0x7d, 0xfb, 0x57, 0x7c, 0x67, - 0x4b, 0x8b, 0xc9, 0x2e, 0x3c, 0x4b, 0xe3, 0x3f, 0x11, 0xdd, - 0xac, 0x10, 0x44, 0xf, 00, 0x93, 0xf2, 0xc6, 0x83, 0xa2, - 0x46, 0xa3, 0x3c, 0x74, 00, 0x13, 0xea, 0x6b, 0xf4, 0x67, - 0xc1, 0x1f, 0xf0, 0x48, 0xaf, 0x87, 0xff, 00, 0xf, 0x7e, - 0x1c, 0xdf, 0x78, 0x9b, 0xe2, 0xf7, 0x8b, 0x75, 0x1b, 0xeb, - 0x9d, 0x3e, 0xca, 0x4b, 0xeb, 0xe8, 0x74, 0x69, 0x56, 0xda, - 0xd6, 0xd9, 0x11, 0xb, 0xb0, 0xe, 0xca, 0x59, 0xf0, 0x1, - 0xe7, 0xe5, 0xcf, 0xa5, 0x32, 0x6e, 0xde, 0xc7, 0xe7, 0x17, - 0x88, 0x7f, 0x68, 0xbf, 0x8a, 0x7e, 0x2b, 0xb9, 0x92, 0x7d, - 0x5b, 0xe2, 0x37, 0x8a, 0x2f, 0x64, 0x90, 0xe5, 0x83, 0xea, - 0xf3, 0x85, 0x27, 0xfd, 0xd0, 0xc0, 0xf, 0xca, 0xbf, 0x5a, - 0xbf, 0xe0, 0x92, 0x3e, 0xb, 0xd6, 0xed, 0xfe, 0x3, 0xea, - 0x3e, 0x39, 0xf1, 0x6, 0xad, 0xa9, 0x6a, 0xb7, 0x9e, 0x23, - 0xbe, 0x74, 0xb3, 0x17, 0xf7, 0x52, 0x4c, 0x22, 0xb6, 0x80, - 0x94, 0x1b, 0x43, 0x13, 0x8d, 0xd2, 0x79, 0x84, 0x91, 0xd4, - 0x5, 0xaf, 0xc7, 0x4d, 0x1b, 0xc3, 0x7f, 0xf0, 0x9e, 0xfc, - 0x44, 0xb2, 0xd0, 0x7c, 0x39, 0x6f, 0x24, 0x4b, 0xac, 0x6a, - 0x89, 0x67, 0xa7, 0xc1, 0x2b, 0x6f, 0x64, 0x12, 0xca, 0x16, - 0x30, 0xcd, 0x8e, 0x70, 0x18, 0x64, 0xfb, 0x13, 0x5f, 0xd1, - 0xcf, 0x86, 0xb4, 0x4d, 0x3, 0xf6, 0x7b, 0xf8, 0x2d, 0x65, - 0xa6, 0xc6, 0x52, 0xcf, 0xc3, 0xfe, 0x13, 0xd1, 0xc0, 0x67, - 0x3c, 0x1, 0x1c, 0x31, 0xe5, 0xdc, 0xfb, 0x9c, 0x12, 0x7d, - 0xcd, 0xc, 0x48, 0xf8, 0xf, 0xc4, 0x7f, 0xf0, 0x59, 0xa9, - 0xfc, 0x25, 0xe2, 0xcd, 0x6b, 0x42, 0xd4, 0x3e, 0x14, 0xab, - 0xcd, 0xa6, 0x5e, 0xcf, 0x65, 0x24, 0x90, 0x6b, 0x7c, 0x33, - 0x47, 0x23, 0x21, 0x20, 0x18, 0x7d, 0x56, 0xbe, 0xec, 0xfd, - 0x9c, 0x3e, 0x34, 0x47, 0xfb, 0x42, 0x7c, 0x1b, 0xf0, 0xff, - 00, 0x8f, 0x62, 0xd2, 0xdf, 0x46, 0x4d, 0x59, 0x24, 0x61, - 0x64, 0xf2, 0xf9, 0xa6, 0x3d, 0xb2, 0x32, 0x7d, 0xec, 0xc, - 0xe7, 0x6e, 0x7a, 0x77, 0xaf, 0xe7, 0x2f, 0xc6, 0x7a, 0xf9, - 0xf1, 0x5f, 0x8b, 0xf5, 0xdd, 0x6d, 0x86, 0xd6, 0xd4, 0xaf, - 0xe7, 0xbd, 0x23, 0xd0, 0xc9, 0x23, 0x3f, 0xfe, 0xcd, 0x5f, - 0xd1, 0x27, 0xec, 0x91, 0xf0, 0xfe, 0x4f, 0x85, 0xff, 00, - 0xb3, 0x57, 0xc3, 0x9f, 0xd, 0xce, 0x9e, 0x5d, 0xdd, 0xae, - 0x8d, 0x3, 0xdc, 0xaf, 0xa4, 0xd2, 0x2f, 0x99, 0x27, 0xfe, - 0x3c, 0xe6, 0x81, 0xa7, 0x73, 0xd6, 0xc9, 0xc0, 0xc9, 0xe0, - 0x57, 0xce, 0xda, 0xff, 00, 0xed, 0xf, 0xae, 0x43, 0xae, - 0x5f, 0x47, 0xa6, 0xc7, 0x64, 0xda, 0x7a, 0x4a, 0xcb, 0x9, - 0x96, 0x26, 0x2c, 0x54, 0x1c, 0x64, 0x9d, 0xc3, 0xaf, 0x5f, - 0xc6, 0xbd, 0x7b, 0xe2, 0x97, 0x89, 0x47, 0x85, 0xbc, 0x11, - 0xa9, 0x5d, 0xab, 0x6d, 0x9d, 0xd3, 0xc8, 0x87, 0xfd, 0xf7, - 0xe0, 0x7e, 0x5c, 0x9f, 0xc2, 0xbe, 0x40, 0xaf, 0x86, 0xe2, - 0x2c, 0xca, 0xae, 0x1a, 0x70, 0xa3, 0x42, 0x5c, 0xaf, 0x77, - 0x6f, 0xc3, 0xf5, 0x3c, 0x9c, 0x75, 0x79, 0x53, 0x6a, 0x10, - 0x76, 0x3d, 0x5d, 0x3f, 0x69, 0xf, 0x12, 0xaf, 0xde, 0xb3, - 0xd3, 0x9b, 0xfe, 0xd9, 0xb8, 0xff, 00, 0xd9, 0xaa, 0x74, - 0xfd, 0xa5, 0x75, 0xe1, 0xf7, 0xb4, 0xdd, 0x3d, 0xbe, 0x81, - 0xc7, 0xfe, 0xcd, 0x5e, 0x43, 0x45, 0x7c, 0x82, 0xce, 0x73, - 0x5, 0xff, 00, 0x2f, 0x5f, 0xe0, 0x79, 0x9f, 0x5a, 0xad, - 0xfc, 0xc7, 0xb3, 0x47, 0xfb, 0x4c, 0xea, 0x83, 0xef, 0xe8, - 0xb6, 0x8d, 0xfe, 0xec, 0xac, 0x3f, 0xc6, 0xa7, 0x4f, 0xda, - 0x72, 0xef, 0xf8, 0xbc, 0x3f, 0x9, 0xfa, 0x5d, 0x11, 0xff, - 00, 0xb2, 0xd7, 0x89, 0x51, 0x5a, 0x2c, 0xf3, 0x31, 0x5f, - 0xf2, 0xf7, 0xf0, 0x5f, 0xe4, 0x57, 0xd7, 0x2b, 0xff, 00, - 0x31, 0xee, 0xd1, 0x7e, 0xd3, 0x83, 0xfe, 0x5a, 0x78, 0x7f, - 0x1f, 0xee, 0xdd, 0x7f, 0xf6, 0x35, 0x66, 0x3f, 0xda, 0x6e, - 0xc8, 0xfd, 0xfd, 0xa, 0x71, 0xfe, 0xec, 0xea, 0x7f, 0xa5, - 0x78, 0x5, 0x15, 0xaa, 0xe2, 0xc, 0xc5, 0x7f, 0xcb, 0xcf, - 0xc1, 0x7f, 0x91, 0x5f, 0x5d, 0xaf, 0xfc, 0xdf, 0x91, 0xf4, - 0x3c, 0x7f, 0xb4, 0xc6, 0x90, 0x7e, 0xfe, 0x91, 0x7a, 0xbf, - 0xee, 0xb2, 0x1f, 0xeb, 0x5a, 0x56, 0x7f, 0xb4, 0x5f, 0x85, - 0xee, 0x8, 0x13, 0x45, 0x7f, 0x6b, 0xee, 0xf0, 0x86, 0x1f, - 0xf8, 0xeb, 0x1a, 0xf9, 0x9a, 0x8a, 0xd6, 0x3c, 0x47, 0x8f, - 0x8e, 0xed, 0x3f, 0x97, 0xf9, 0x14, 0xb1, 0xf5, 0x97, 0x53, - 0xec, 0x4d, 0x7, 0xe2, 0x67, 0x86, 0x7c, 0x48, 0xeb, 0x1d, - 0x8e, 0xaf, 0x3, 0x4c, 0xdd, 0x22, 0x97, 0x31, 0xb9, 0xfa, - 0x6, 0xc6, 0x7f, 0xa, 0xe9, 0xeb, 0xe1, 0x4a, 0xed, 0x7c, - 0x17, 0xf1, 0x6b, 0x5f, 0xf0, 0x6c, 0xa8, 0x89, 0x72, 0xd7, - 0xd6, 00, 0xfc, 0xd6, 0x97, 0x2c, 0x59, 0x71, 0xfe, 0xc9, - 0xea, 0xbf, 0x87, 0x1e, 0xd5, 0xed, 0xe1, 0x38, 0xa1, 0x36, - 0xa3, 0x8a, 0x85, 0xbc, 0xd7, 0xf9, 0x7f, 0xc1, 0x3a, 0xe9, - 0x66, 0x37, 0x76, 0xa8, 0xbe, 0xe3, 0xeb, 0x6a, 0x2b, 0x13, - 0xc2, 0x1e, 0x2f, 0xd3, 0xfc, 0x6b, 0xa3, 0xa6, 0xa1, 0xa7, - 0xc8, 0x4a, 0x13, 0xb6, 0x48, 0xdb, 0x86, 0x8d, 0xfb, 0xa9, - 0x15, 0xb7, 0x5f, 0x75, 0x4e, 0xa4, 0x6a, 0xc5, 0x4e, 0xe, - 0xe9, 0x9e, 0xc4, 0x64, 0xa4, 0xae, 0xb6, 0xa, 0xc0, 0xf1, - 0x17, 0x8e, 0xb4, 0x2f, 0x9, 0xdc, 0x43, 0x6, 0xab, 0xa8, - 0x25, 0xa4, 0xb3, 0x29, 0x74, 0x56, 0x56, 0x39, 00, 0xe3, - 0x3c, 0x3, 0x5b, 0xf5, 0xf2, 0x87, 0xc6, 0xed, 0x74, 0x6b, - 0x9f, 0x10, 0xaf, 0xc2, 0x36, 0xe8, 0xac, 0xc2, 0xda, 0xa7, - 0xfc, 0x7, 0xef, 0x7f, 0xe3, 0xc5, 0xab, 0xc8, 0xcd, 0xf3, - 0x7, 0x97, 0x61, 0xd5, 0x48, 0x24, 0xe4, 0xdd, 0x95, 0xce, - 0x5c, 0x55, 0x77, 0x42, 0x1c, 0xcb, 0x73, 0xe8, 0x4, 0xf8, - 0xb9, 0xe0, 0xf7, 0xe9, 0xaf, 0x5b, 0xf, 0xf7, 0xb7, 0xf, - 0xe6, 0x2a, 0x74, 0xf8, 0xa1, 0xe1, 0x37, 0xe9, 0xe2, 0xb, - 0x1f, 0xc6, 0x50, 0x2b, 0xe3, 0xca, 0x2b, 0xe3, 0x97, 0x14, - 0xe2, 0x7a, 0xd3, 0x8f, 0xe3, 0xfe, 0x67, 0x97, 0xfd, 0xa3, - 0x53, 0xb2, 0x3e, 0xca, 0x8f, 0xe2, 0x17, 0x86, 0x25, 0xfb, - 0xba, 0xfe, 0x9c, 0x7f, 0xed, 0xe5, 0x3f, 0xc6, 0xad, 0x47, - 0xe3, 0xd, 0xa, 0x6f, 0xb9, 0xac, 0xd8, 0x37, 0xd2, 0xe5, - 0x3f, 0xc6, 0xbe, 0x2b, 0xa2, 0xb5, 0x5c, 0x55, 0x5b, 0xad, - 0x25, 0xf7, 0xb2, 0xbf, 0xb4, 0x67, 0xd6, 0x27, 0xdb, 0x89, - 0xaf, 0x69, 0x92, 0x7d, 0xdd, 0x46, 0xd1, 0xbe, 0x93, 0xaf, - 0xf8, 0xd4, 0xc9, 0xa9, 0x5a, 0x49, 0xf7, 0x2e, 0xa0, 0x6f, - 0xa4, 0x80, 0xff, 00, 0x5a, 0xf8, 0x76, 0x8c, 0x91, 0x5a, - 0x2e, 0x2b, 0x97, 0x5a, 0x3f, 0x8f, 0xfc, 0x2, 0xbf, 0xb4, - 0x9f, 0xf2, 0xfe, 0x27, 0xdd, 0xb, 0x2a, 0x37, 0xdd, 0x75, - 0x3f, 0x43, 0x4e, 0xdc, 0x3d, 0x45, 0x7c, 0x30, 0x25, 0x75, - 0xe8, 0xec, 0x3e, 0x86, 0xa4, 0x4b, 0xeb, 0x98, 0xfe, 0xed, - 0xc4, 0xab, 0xf4, 0x72, 0x2b, 0x45, 0xc5, 0x6b, 0xad, 0x1f, - 0xfc, 0x9b, 0xfe, 0x1, 0x5f, 0xda, 0x5f, 0xdc, 0xfc, 0x7f, - 0xe0, 0x1f, 0x72, 0x51, 0x5f, 0x10, 0xa6, 0xb9, 0xa9, 0x47, - 0xf7, 0x75, 0xb, 0xa5, 0xfa, 0x4c, 0xdf, 0xe3, 0x52, 0xaf, - 0x89, 0xb5, 0x84, 0xfb, 0xba, 0xad, 0xf2, 0xfd, 0x2e, 0x5c, - 0x7f, 0x5a, 0xd1, 0x71, 0x5d, 0x3e, 0xb4, 0x5f, 0xdf, 0xff, - 00, 00, 0x7f, 0xda, 0x4b, 0xf9, 0x7f, 0x13, 0xed, 0x9a, - 0x2b, 0xe2, 0xc4, 0xf1, 0x96, 0xbf, 0x1f, 0xdd, 0xd7, 0x35, - 0x25, 0xfa, 0x5d, 0xc9, 0xfe, 0x35, 0xda, 0x7c, 0x25, 0xf1, - 0x7, 0x88, 0x75, 0xff, 00, 0x1e, 0xe9, 0x76, 0x93, 0x6b, - 0x3a, 0x84, 0xf6, 0xc1, 0xda, 0x59, 0x52, 0x4b, 0x97, 0x65, - 0x2a, 0xaa, 0x4e, 0x8, 0x27, 0xa6, 0x70, 0x3f, 0x1a, 0xe9, - 0xa1, 0xc4, 0xb4, 0xab, 0xd5, 0x8d, 0x25, 0x49, 0xde, 0x4d, - 0x2d, 0xd7, 0x53, 0x48, 0x63, 0xe3, 0x39, 0x28, 0xa8, 0xee, - 0x7d, 0x3f, 0x45, 0x14, 0x57, 0xd9, 0x1e, 0xa8, 0x51, 0x45, - 0x14, 00, 0x51, 0x5c, 0xf7, 0x88, 0xfc, 0x7f, 0xa0, 0x78, - 0x4f, 0x8d, 0x4f, 0x52, 0x86, 0x9, 0x7f, 0xe7, 0x8a, 0xe5, - 0xe4, 0xff, 00, 0xbe, 0x57, 0x26, 0xbc, 0xef, 0x5b, 0xfd, - 0xa5, 0x74, 0xcb, 0x70, 0xcb, 0xa5, 0xe9, 0x97, 0x17, 0x6f, - 0xd9, 0xee, 0x18, 0x44, 0xbf, 0x90, 0xc9, 0xfe, 0x55, 0xe6, - 0xe2, 0x33, 0x2c, 0x26, 0x17, 0x4a, 0xb5, 0x12, 0x7d, 0xb7, - 0x7f, 0x72, 0x39, 0xe7, 0x5e, 0x95, 0x3f, 0x8a, 0x47, 0xb2, - 0xd1, 0x5f, 0x34, 0x5f, 0x7e, 0xd1, 0x9e, 0x26, 0xb8, 0x63, - 0xf6, 0x78, 0x2c, 0x2d, 0x13, 0xb6, 0x22, 0x67, 0x23, 0xf1, - 0x2d, 0x8f, 0xd2, 0xb1, 0xae, 0x3e, 0x37, 0xf8, 0xce, 0x72, - 0x7f, 0xe2, 0x6d, 0xe5, 0x3, 0xda, 0x38, 0x23, 0x18, 0xff, - 00, 0xc7, 0x6b, 0xc5, 0x9f, 0x13, 0x60, 0x63, 0xf0, 0xa9, - 0x3f, 0x97, 0xf9, 0xb4, 0x72, 0x3c, 0xc2, 0x8a, 0xda, 0xec, - 0xfa, 0xbc, 0x8c, 0xd2, 0x79, 0x63, 0xdf, 0xf3, 0x35, 0xf2, - 0x2b, 0x7c, 0x5d, 0xf1, 0x83, 0x1c, 0x9d, 0x76, 0xe4, 0x7d, - 0x2, 0x8f, 0xe9, 0x52, 0x45, 0xf1, 0x8b, 0xc6, 0x31, 0x1c, - 0x8d, 0x72, 0x63, 0xfe, 0xf4, 0x68, 0xdf, 0xcd, 0x6b, 0xf, - 0xf5, 0xa3, 0x9, 0xfc, 0x92, 0xfc, 0x3f, 0xcc, 0x9f, 0xed, - 0x1a, 0x7d, 0x99, 0xf5, 0xc5, 0x15, 0xf2, 0xb5, 0xb7, 0xc7, - 0x9f, 0x18, 0xdb, 0xfd, 0xeb, 0xf8, 0x6e, 0x3f, 0xeb, 0xad, - 0xba, 0x7f, 0x40, 0x2b, 0x7f, 0x4d, 0xfd, 0xa5, 0x75, 0xa8, - 0x58, 0xb, 0xed, 0x32, 0xce, 0xe9, 0x7b, 0xf9, 0x25, 0xa2, - 0x3f, 0xa9, 0x61, 0x5d, 0x54, 0xf8, 0x93, 0x1, 0x3f, 0x8a, - 0xeb, 0xd5, 0x7f, 0x95, 0xcd, 0x16, 0x3e, 0x8b, 0xde, 0xe8, - 0xfa, 0x2a, 0x8a, 0xf2, 0xdd, 0x17, 0xf6, 0x87, 0xf0, 0xd6, - 0xa3, 0xb5, 0x6f, 0x52, 0xeb, 0x4c, 0x90, 0xf5, 0x32, 0x26, - 0xf4, 0xfc, 0xd7, 0x27, 0xf4, 0xaf, 0x45, 0xd2, 0xb5, 0x9b, - 0x1d, 0x72, 0xd5, 0x6e, 0x74, 0xfb, 0xb8, 0x6f, 0x20, 0x6e, - 0x8f, 0xb, 0x86, 0x1f, 0x8f, 0xa5, 0x7b, 0x98, 0x7c, 0x6e, - 0x1f, 0x15, 0xfc, 0x19, 0xa9, 0x7e, 0x7f, 0x76, 0xe7, 0x64, - 0x2a, 0xd3, 0xa9, 0xf0, 0x3b, 0x97, 0x68, 0xa2, 0x8a, 0xed, - 0x35, 0xa, 0x28, 0xa2, 0x80, 0xa, 0x28, 0xa2, 0x80, 0xa, - 0x28, 0xa2, 0x80, 0xa, 0x28, 0xa6, 0xbc, 0x8b, 0x12, 0x96, - 0x76, 0x8, 0xa3, 0xa9, 0x63, 0x81, 0x40, 0xe, 0xa2, 0xb0, - 0xb5, 0xf, 0x1d, 0xf8, 0x77, 0x4b, 0x24, 0x5d, 0x6b, 0x56, - 0x30, 0xb0, 0xea, 0xa6, 0x75, 0x27, 0xf2, 0x7, 0x35, 0x8b, - 0x71, 0xf1, 0xa7, 0xc1, 0xb6, 0xe7, 0x7, 0x5a, 0x47, 0xff, - 00, 0xae, 0x70, 0xc8, 0xff, 00, 0xc9, 0x6b, 0x92, 0x78, - 0xbc, 0x35, 0x3d, 0x27, 0x52, 0x2b, 0xd5, 0xa3, 0x27, 0x56, - 0x9c, 0x77, 0x92, 0xfb, 0xce, 0xde, 0x98, 0x5d, 0xb3, 0xf7, - 0xf, 0xe6, 0x2b, 0x82, 0x3f, 0x1d, 0xfc, 0x18, 0xf, 0xfc, - 0x84, 0xe4, 0x3f, 0xf6, 0xed, 0x2f, 0xff, 00, 0x13, 0x4a, - 0xbf, 0x1d, 0x7c, 0x18, 0xc7, 0xfe, 0x42, 0x8e, 0x3e, 0xb6, - 0xb2, 0xff, 00, 0xf1, 0x35, 0x8f, 0xf6, 0x8e, 0xb, 0xfe, - 0x7f, 0x47, 0xff, 00, 0x2, 0x44, 0xfb, 0x7a, 0x5f, 0xce, - 0xbe, 0xf3, 0xbe, 0xc9, 0xc7, 0x4a, 0x4d, 0xc7, 0xfb, 0xa7, - 0xf4, 0xae, 0x3e, 0xdf, 0xe3, 0xf, 0x83, 0xae, 0x7e, 0xee, - 0xb9, 0x2, 0x7f, 0xd7, 0x45, 0x74, 0xfe, 0x60, 0x56, 0xcd, - 0x8f, 0x8c, 0xb4, 0x1d, 0x4f, 0x1f, 0x65, 0xd6, 0x2c, 0x67, - 0x27, 0xa0, 0x59, 0xd7, 0x3f, 0x96, 0x6b, 0x78, 0x62, 0xb0, - 0xf5, 0x3e, 0xa, 0x89, 0xfa, 0x34, 0x5a, 0xa9, 0x9, 0x6d, - 0x24, 0x6c, 0xd1, 0x4d, 0x47, 0x59, 0x17, 0x2a, 0xc1, 0x87, - 0xa8, 0x39, 0xa7, 0x57, 0x51, 0xa0, 0x51, 0x45, 0x30, 0x31, - 0xf3, 0x4a, 0x9e, 0x98, 0xc8, 0x34, 00, 0xfa, 0x28, 0xa2, - 0x80, 0xa, 0x82, 0xf5, 0xfc, 0xbb, 0x39, 0xdb, 0xd1, 0x9, - 0xfd, 0x2a, 0x7a, 0xa3, 0xad, 0xbf, 0x97, 0xa4, 0x5d, 0xb1, - 0x38, 0xc4, 0x66, 0xa6, 0x4e, 0xc9, 0xb1, 0x3d, 0x13, 0x3e, - 0x1c, 0xf8, 0xdf, 0x37, 0xda, 0x3c, 0x49, 0x28, 0xeb, 0x82, - 0x6b, 0x2f, 0xf6, 0x63, 0xf8, 0x99, 0x27, 0xc3, 0x6f, 0x8d, - 0x16, 0xba, 0x44, 0xf2, 0x95, 0xd1, 0x3c, 0x4a, 0x45, 0xa4, - 0x88, 0x71, 0x84, 0xb8, 0x19, 0xf2, 0x9f, 0xdb, 0xba, 0x9f, - 0xf7, 0x85, 0x49, 0xf1, 0x56, 0x7f, 0x3f, 0xc4, 0xd7, 0x3d, - 0xf0, 0x4d, 0x78, 0x7, 0xc5, 0x7b, 0x89, 0x2c, 0xb4, 0xe1, - 0x75, 0x6e, 0xed, 0x15, 0xcd, 0xbb, 0x9, 0xa2, 0x91, 0x4e, - 0xa, 0xba, 0x9c, 0xa9, 0x1f, 0x88, 0xaf, 0xce, 0x32, 0xfa, - 0xce, 0x38, 0xc9, 0x49, 0x77, 0x67, 0xe3, 0x98, 0xbc, 0x4c, - 0xb0, 0xd9, 0xac, 0x31, 0x11, 0xe9, 0x24, 0xbe, 0x4f, 0x46, - 0x7e, 0xc0, 0x51, 0x5c, 0x1f, 0x80, 0xfe, 0x28, 0xe9, 0x5e, - 0x21, 0xf0, 0x37, 0x87, 0x75, 0x59, 0x2e, 0xcb, 0x49, 0x7d, - 0xa7, 0x5b, 0x5c, 0xb1, 0x2a, 0x72, 0x4b, 0xc4, 0xac, 0x7f, - 0x9d, 0x15, 0xfa, 0x45, 0xcf, 0xd8, 0xee, 0x99, 0xde, 0x51, - 0x45, 0x14, 0xc6, 0x14, 0x51, 0x45, 00, 0x15, 0x53, 0x56, - 0xd4, 0xed, 0xf4, 0x5d, 0x2e, 0xee, 0xfe, 0xea, 0x41, 0x15, - 0xb5, 0xb4, 0x4d, 0x2c, 0x8e, 0x7b, 0x2a, 0x8c, 0x9a, 0xb7, - 0x5e, 0x2b, 0xfb, 0x55, 0x78, 0xc4, 0x68, 0x1f, 0xf, 0x86, - 0x93, 0x13, 0xe2, 0xeb, 0x58, 0x93, 0xca, 0xc0, 0xff, 00, - 0x9e, 0x4b, 0x86, 0x73, 0xff, 00, 0xa0, 0x8f, 0xc6, 0xb9, - 0xb1, 0x35, 0x96, 0x1e, 0x8c, 0xaa, 0xbe, 0x88, 0xe4, 0xc5, - 0xd7, 0x58, 0x5a, 0x13, 0xac, 0xfa, 0x2f, 0xf8, 0x63, 0xe4, - 0xcf, 0x12, 0xeb, 0x93, 0xf8, 0xa7, 0xc4, 0x7a, 0x8e, 0xad, - 0x71, 0x8f, 0x3e, 0xfa, 0xe1, 0xe6, 0x60, 0x3a, 0xc, 0x9e, - 00, 0xf6, 0x3, 0x2, 0xbe, 0xc2, 0xfd, 0x9b, 0x3c, 0x23, - 0xff, 00, 0x8, 0xe7, 0x80, 0xa3, 0xb9, 0x91, 0x36, 0xdc, - 0x5e, 0xb1, 0x90, 0xe4, 0x73, 0xb7, 0xb5, 0x7c, 0x91, 0xe0, - 0x6f, 0xf, 0xc9, 0xe2, 0x6f, 0x14, 0x69, 0xda, 0x7c, 0x6a, - 0x5b, 0xcd, 0x95, 0x41, 0xc7, 0xa6, 0x79, 0xaf, 0xd0, 0x8d, - 0x32, 0xc2, 0x2d, 0x2f, 0x4f, 0xb7, 0xb4, 0x85, 0x42, 0x47, - 0xa, 0x4, 0x50, 0x3d, 0x85, 0x7c, 0x6e, 0x43, 0x45, 0xd6, - 0xaf, 0x3c, 0x4c, 0xfa, 0x7e, 0x6c, 0xf8, 0xfe, 0x1d, 0xa0, - 0xea, 0x4e, 0x78, 0xa9, 0xef, 0xfa, 0xbd, 0xcb, 0x54, 0x51, - 0x45, 0x7d, 0xd9, 0xf7, 0x61, 0x45, 0x14, 0x50, 0x1, 0x5f, - 0x98, 0xbf, 0xf0, 0x5b, 0x2f, 0x1d, 0xdc, 0x5a, 0xf8, 0x77, - 0xe1, 0xaf, 0x83, 0x62, 0x25, 0x6d, 0xaf, 0x6e, 0x6e, 0xb5, - 0x59, 0xf0, 0x48, 0xc9, 0x89, 0x52, 0x34, 0x7, 0xd4, 0x7e, - 0xf9, 0xcf, 0xe1, 0x5f, 0xa7, 0x55, 0xf9, 0xe5, 0xff, 00, - 0x5, 0x88, 0xf8, 0x15, 0xab, 0x78, 0xf7, 0xe1, 0x97, 0x86, - 0x3c, 0x79, 0xa2, 0x59, 0xcd, 0x7f, 0x2f, 0x85, 0xa6, 0x9a, - 0x2b, 0xf8, 0x60, 0x42, 0xcc, 0x96, 0x93, 0x5, 0x26, 0x5c, - 0xe, 0x70, 0x8f, 0x1a, 0xe7, 0xd0, 0x31, 0x3d, 0xa8, 0x13, - 0xd8, 0xf8, 0x57, 0xfe, 0x9, 0xbb, 0xf1, 0x4b, 0xc1, 0xff, - 00, 0x8, 0x7f, 0x6a, 0x4d, 0x1f, 0x5d, 0xf1, 0xb5, 0xec, - 0x1a, 0x5e, 0x92, 0xf6, 0x37, 0x36, 0x91, 0xea, 0x17, 0x23, - 0xf7, 0x56, 0xd3, 0xc8, 0xa0, 0x23, 0xb1, 0xfe, 0x10, 0x40, - 0x65, 0xdd, 0xdb, 0x77, 0x3c, 0x57, 0xe8, 0x87, 0xfc, 0x15, - 0x1f, 0xf6, 0x8d, 0xd2, 0x7c, 0x31, 0xfb, 0x2e, 0x36, 0x8b, - 0xe1, 0xed, 0x62, 0xcf, 0x51, 0xbb, 0xf1, 0xb4, 0xc2, 0xc2, - 0x29, 0x6c, 0xae, 0x16, 0x55, 0xfb, 0x2a, 0xe1, 0xe7, 0x70, - 0x54, 0x91, 0x82, 0x36, 0xa7, 0xfd, 0xb4, 0xaf, 0xc4, 0xea, - 0x37, 0x12, 00, 0xc9, 0xc0, 0xe8, 0x2a, 0xac, 0x45, 0xcf, - 0xb5, 0x7f, 0xe0, 0x94, 0x9f, 0xc, 0xb4, 0xcf, 0x13, 0xfe, - 0xd0, 0x57, 0x3e, 0x35, 0xd7, 0xee, 0x6d, 0xac, 0xf4, 0x4f, - 0x5, 0x59, 0x1b, 0xe3, 0x3d, 0xe4, 0x8b, 0x1c, 0x42, 0xe6, - 0x4c, 0xa4, 0x59, 0x66, 0xc0, 0xe0, 0x79, 0x8d, 0xf5, 0x51, - 0x5e, 0xd9, 0xff, 00, 0x5, 0x2f, 0xff, 00, 0x82, 0x80, - 0xf8, 0x77, 0xc6, 0x7e, 0x11, 0xbb, 0xf8, 0x4f, 0xf0, 0xd7, - 0x53, 0x8f, 0x59, 0xb6, 0xbe, 0x64, 0x3a, 0xd6, 0xbd, 0x65, - 0x29, 0x30, 0x6c, 0x56, 0xd, 0xf6, 0x78, 0x98, 0x7d, 0xfc, - 0x90, 0x37, 0x30, 0xf9, 0x71, 0xc7, 0x39, 0x38, 0xfc, 0xc0, - 0x12, 0xba, 0xc6, 0xd1, 0x87, 0x61, 0x1b, 0x10, 0x59, 0x1, - 0xe0, 0x91, 0xd3, 0x22, 0xbd, 0x33, 0xe0, 0x1f, 0xec, 0xe5, - 0xe3, 0x9f, 0xda, 0x43, 0xc6, 0x50, 0x78, 0x7f, 0xc1, 0xba, - 0x4c, 0x97, 0x44, 0xb7, 0xfa, 0x4e, 0xa3, 0x2a, 0x95, 0xb4, - 0xb3, 0x4e, 0xed, 0x2c, 0x98, 0xc0, 0xf6, 0x1d, 0x4f, 0x60, - 0x68, 0xb, 0xf4, 0x3b, 0xbf, 0xd8, 0x3f, 0xf6, 0x70, 0x9f, - 0xf6, 0x92, 0xf8, 0xff, 00, 0xa3, 0x69, 0x33, 0xc2, 0xe7, - 0xc3, 0x7a, 0x53, 0x2e, 0xa7, 0xac, 0x4e, 0x17, 0x2a, 0x21, - 0x46, 0x5, 0x62, 0xcf, 0x4c, 0xc8, 0xd8, 0x5c, 0x7a, 0x16, - 0x3d, 0xab, 0xfa, 0xd, 0x44, 0x58, 0x91, 0x51, 0x14, 0x2a, - 0xa8, 0xc0, 0x3, 0xa0, 0x15, 0xe2, 0xff, 00, 0xb2, 0x8f, - 0xec, 0xb7, 0xe1, 0xaf, 0xd9, 0x53, 0xe1, 0xa4, 0x3e, 0x1b, - 0xd1, 0x7f, 0xd3, 0x35, 0x3b, 0x82, 0x27, 0xd5, 0x75, 0x67, - 0x5c, 0x49, 0x79, 0x3e, 0x31, 0x9f, 0x64, 0x1d, 0x15, 0x7b, - 0xf, 0x72, 0x4d, 0x7b, 0x43, 0xba, 0xc6, 0x8c, 0xec, 0x42, - 0xaa, 0x8c, 0x92, 0x7b, 0xa, 0x96, 0xcb, 0x4a, 0xc7, 0x81, - 0xfe, 0xd2, 0x9e, 0x23, 0x13, 0x5e, 0xe9, 0x9a, 0x24, 0x6f, - 0x91, 0x8, 0x37, 0x33, 0x1, 0xfd, 0xe3, 0xc2, 0x8f, 0xcb, - 0x77, 0xe7, 0x5e, 0x25, 0x5b, 0xbe, 0x39, 0xd7, 0xcf, 0x8a, - 0x3c, 0x5b, 0xaa, 0x6a, 0x79, 0x26, 0x39, 0xa6, 0x3e, 0x5e, - 0x7f, 0xb8, 0x3e, 0x55, 0xfd, 00, 0xac, 0x2a, 0xfc, 0x4b, - 0x33, 0xc4, 0xfd, 0x6f, 0x17, 0x52, 0xaf, 0x4b, 0xe9, 0xe8, - 0xb4, 0x47, 0xc9, 0x62, 0x2a, 0x7b, 0x5a, 0xb2, 0x90, 0x51, - 0x45, 0x15, 0xe6, 0x18, 0x16, 0xec, 0x74, 0x8b, 0xed, 0x50, - 0x39, 0xb3, 0xb2, 0xb8, 0xbb, 0x9, 0x8d, 0xde, 0x44, 0x4c, - 0xfb, 0x73, 0xd3, 0x38, 0x1c, 0x54, 0xd2, 0x78, 0x6f, 0x57, - 0x88, 0x65, 0xf4, 0xab, 0xd4, 0x1e, 0xad, 0x6c, 0xe3, 0xfa, - 0x57, 0xd2, 0x1f, 00, 0x74, 0xf, 0xec, 0x8f, 0x2, 0x47, - 0x74, 0xe9, 0xb6, 0x6d, 0x42, 0x56, 0x9c, 0x92, 0x39, 0xd8, - 0x3e, 0x55, 0xfd, 0x1, 0x3f, 0x8d, 0x7a, 0x55, 0x7d, 0xd6, - 0x13, 0x86, 0xa3, 0x88, 0xc3, 0xc2, 0xac, 0xea, 0x34, 0xe4, - 0xaf, 0x6b, 0x77, 0x3d, 0x8a, 0x58, 0x5, 0x38, 0x29, 0x39, - 0x5a, 0xe7, 0xc3, 0x12, 0xc1, 0x2c, 0x7, 0x12, 0xc6, 0xf1, - 0x9f, 0x47, 0x52, 0x2a, 0x3a, 0xfb, 0x96, 0xe2, 0xce, 0xde, - 0xed, 0xa, 0x4f, 0x4, 0x73, 0x21, 0xfe, 0x19, 0x10, 0x30, - 0xfd, 0x6b, 0x8c, 0xf1, 0x3f, 0xc1, 0xaf, 0xc, 0xf8, 0x8e, - 0xde, 0x40, 0x96, 0x11, 0xe9, 0xb7, 0x44, 0x1d, 0xb7, 0x16, - 0x6a, 0x10, 0x83, 0xee, 0xa3, 0x83, 0xf9, 0x54, 0xd6, 0xe1, - 0x6a, 0xb1, 0x57, 0xa3, 0x51, 0x3f, 0x26, 0xad, 0xfe, 0x62, - 0x9e, 0x5d, 0x24, 0xbd, 0xd9, 0x5c, 0xf9, 0x36, 0x8a, 0xd4, - 0xf1, 0x3f, 0x87, 0xae, 0x7c, 0x2b, 0xaf, 0x5e, 0x69, 0x57, - 0x78, 0x33, 0x5b, 0x3e, 0xd2, 0xcb, 0xd1, 0x81, 0x19, 0xc, - 0x3e, 0xa0, 0x83, 0x59, 0x75, 0xf1, 0x53, 0x84, 0xa9, 0xc9, - 0xc2, 0x4a, 0xcd, 0x68, 0x79, 0x2d, 0x34, 0xec, 0xc2, 0x8a, - 0x28, 0xa8, 0x11, 0xe9, 0xbf, 00, 0x3c, 0x49, 0x36, 0x93, - 0xe3, 0x68, 0xf4, 0xed, 0xc7, 0xec, 0xba, 0x8a, 0x32, 0x32, - 0x76, 0xe, 0xa0, 0xb2, 0x9f, 0xd0, 0x8f, 0xc6, 0xbe, 0x9e, - 0xaf, 0x92, 0xbe, 0xb, 0xda, 0x3d, 0xdf, 0xc4, 0xad, 0x1b, - 0x68, 0x24, 0x46, 0xcf, 0x23, 0x11, 0xd8, 0x4, 0x6f, 0xfe, - 0xb5, 0x7d, 0x6b, 0x5f, 0xa9, 0xf0, 0xcc, 0xe7, 0x2c, 0x13, - 0x52, 0xd9, 0x49, 0xdb, 0xee, 0x4c, 0xfa, 0x2c, 0xbd, 0xb7, - 0x49, 0xa7, 0xdc, 0xa5, 0xad, 0xea, 0x71, 0xe8, 0xda, 0x3d, - 0xed, 0xfc, 0xa7, 0x11, 0xdb, 0x42, 0xf2, 0x9c, 0xff, 00, - 0xb2, 0x9, 0xaf, 0x89, 0xae, 0xae, 0x64, 0xbd, 0xb9, 0x9a, - 0xe2, 0x56, 0xdd, 0x2c, 0xae, 0x64, 0x76, 0xf5, 0x24, 0xe4, - 0xd7, 0xda, 0x3e, 0x28, 0xf0, 0xf4, 0x3e, 0x2a, 0xd0, 0xee, - 0x74, 0xbb, 0x89, 0xa6, 0x82, 0xb, 0x80, 0x3, 0xbc, 0x4, - 0x6, 0xc0, 0x20, 0xe3, 0x90, 0x7d, 0x2b, 0xcd, 0xa4, 0xfd, - 0x9a, 0xb4, 0x16, 0xfb, 0x9a, 0x9e, 0xa0, 0xbf, 0x52, 0x87, - 0xff, 00, 0x65, 0xa8, 0xcf, 0x72, 0xfc, 0x5e, 0x61, 0x28, - 0x2a, 0x9, 0x72, 0xc6, 0xfd, 0x7a, 0xb1, 0x63, 0x28, 0x55, - 0xac, 0xd7, 0x22, 0xd1, 0x1f, 0x39, 0x51, 0x5f, 0x42, 0x49, - 0xfb, 0x33, 0x69, 0x87, 0xee, 0x6b, 0x57, 0x6b, 0xfe, 0xf4, - 0x6a, 0x6a, 0xb4, 0x9f, 0xb3, 0x1c, 0x7, 0xee, 0x6b, 0xf2, - 0xf, 0xf7, 0xad, 0x81, 0xff, 00, 0xd9, 0xab, 0xe4, 0x9f, - 0xf, 0xe6, 0x2b, 0xec, 0x7e, 0x2b, 0xfc, 0xcf, 0x33, 0xea, - 0x55, 0xfb, 0x7e, 0x27, 0x82, 0x51, 0x5e, 0x9b, 0xf1, 0x17, - 0xe0, 0xd2, 0x78, 0x3, 0x42, 0x1a, 0x8b, 0x6b, 0x3f, 0x6b, - 0x2f, 0x32, 0xc2, 0x90, 0xfd, 0x9f, 0x61, 0x62, 0x72, 0x7a, - 0xee, 0x3d, 00, 0x3d, 0xab, 0xcc, 0xab, 0xc7, 0xc4, 0xe1, - 0x6b, 0x60, 0xea, 0x7b, 0x2a, 0xca, 0xcf, 0xe4, 0xff, 00, - 0x23, 0x96, 0xa5, 0x39, 0x52, 0x97, 0x2c, 0xd6, 0xa1, 0x45, - 0x14, 0x57, 0x21, 0x98, 0x51, 0x45, 0x7a, 0x44, 0x1f, 00, - 0x7c, 0x55, 0x73, 0x6b, 0xd, 0xc4, 0x6b, 0x66, 0x56, 0x54, - 0x59, 0x2, 0x99, 0xc8, 0x20, 0x11, 0x9c, 0x1e, 0x3a, 0xd7, - 0x55, 0xc, 0x2d, 0x7c, 0x4d, 0xfd, 0x8c, 0x1c, 0xad, 0xbd, - 0x8d, 0x21, 0x4e, 0x75, 0x3e, 0x5, 0x73, 0xcd, 0xe8, 0xaf, - 0x46, 0x93, 0xe0, 0xf, 0x8c, 0x13, 0xa5, 0xa5, 0xb3, 0xff, - 00, 0xbb, 0x72, 0xb5, 0x56, 0x5f, 0x81, 0xfe, 0x32, 0x8b, - 0xa6, 0x94, 0x1f, 0xfd, 0xcb, 0x88, 0xff, 00, 0xf8, 0xaa, - 0xe8, 0x79, 0x6e, 0x35, 0x6f, 0x46, 0x5f, 0x73, 0x2f, 0xd8, - 0x55, 0x5f, 0x65, 0xfd, 0xc7, 0x7, 0x5e, 0xd3, 0xfb, 0x34, - 0x69, 0x3e, 0x6e, 0xaf, 0xab, 0xea, 0x4c, 0xbc, 0x43, 0xa, - 0xc0, 0x8d, 0xee, 0xc7, 0x27, 0xf4, 0x51, 0xf9, 0xd7, 0x12, - 0xff, 00, 0x7, 0x3c, 0x64, 0x9d, 0x74, 0x29, 0x8f, 0xfb, - 0xb2, 0x46, 0x7f, 0xf6, 0x6a, 0xf7, 0x9f, 0x82, 0x9e, 0x12, - 0xb9, 0xf0, 0x9f, 0x83, 0x84, 0x77, 0xd0, 0x1b, 0x6b, 0xeb, - 0x89, 0x9e, 0x59, 0x63, 0x6e, 0xab, 0xfc, 0x2a, 0xf, 0xe0, - 0x33, 0xf8, 0xd7, 0xb7, 0x91, 0xe0, 0x2b, 0xac, 0x74, 0x67, - 0x56, 0xd, 0x28, 0xdd, 0xea, 0x9a, 0xf2, 0xfd, 0x4e, 0xbc, - 0x1d, 0x19, 0xfb, 0x64, 0xe4, 0xad, 0x63, 0xbf, 0xa2, 0x8a, - 0xf3, 0x4f, 0x8a, 0xff, 00, 0x17, 0xa0, 0xf0, 0x54, 0x6d, - 0xa7, 0x69, 0xfb, 0x6e, 0x35, 0xa7, 0x5c, 0xf3, 0xca, 0x40, - 0xf, 0x76, 0xf5, 0x3e, 0x83, 0xf3, 0xf7, 0xfd, 0x27, 0x13, - 0x89, 0xa5, 0x84, 0xa4, 0xea, 0xd6, 0x76, 0x48, 0xf7, 0xea, - 0x54, 0x8d, 0x28, 0xf3, 0x49, 0xe8, 0x74, 0xde, 0x33, 0xf8, - 0x83, 0xa3, 0xf8, 0x1a, 0xd3, 0xcc, 0xd4, 0x2e, 0x33, 0x70, - 0xcb, 0x98, 0xad, 0x63, 0xe6, 0x59, 0x3e, 0x83, 0xb0, 0xf7, - 0x3c, 0x57, 0xcf, 0xde, 0x32, 0xf8, 0xe3, 0xaf, 0xf8, 0xa3, - 0x7c, 0x36, 0xaf, 0xfd, 0x91, 0x62, 0x4f, 0xfa, 0xbb, 0x66, - 0x3e, 0x63, 0xf, 0xf6, 0x9f, 0xaf, 0xe5, 0x8a, 0xe1, 0x35, - 0x3d, 0x4e, 0xef, 0x59, 0xbd, 0x96, 0xf2, 0xfa, 0xe2, 0x4b, - 0xab, 0x99, 0x4e, 0x5e, 0x49, 0xe, 0x49, 0xff, 00, 0x3e, - 0x95, 0x56, 0xbf, 0x2f, 0xcc, 0x33, 0xec, 0x46, 0x31, 0xb8, - 0x53, 0x7c, 0x90, 0xec, 0xb7, 0x7e, 0xac, 0xf9, 0xda, 0xf8, - 0xca, 0x95, 0x74, 0x8e, 0x88, 0x57, 0x76, 0x91, 0x8b, 0x33, - 0x16, 0x62, 0x72, 0x49, 0x39, 0x26, 0x92, 0x8a, 0x2b, 0xe6, - 0x4e, 00, 0xa2, 0x8a, 0x96, 0xde, 0xd2, 0x7b, 0xc7, 0xd9, - 0x4, 0x32, 0x4e, 0xdf, 0xdd, 0x8d, 0xb, 0x1f, 0xd2, 0x9a, - 0x4d, 0xbb, 0x20, 0x22, 0xa2, 0xb5, 0x47, 0x84, 0xb5, 0xc2, - 0x32, 0x34, 0x5d, 0x47, 0x1e, 0xbf, 0x64, 0x93, 0xfc, 0x2a, - 0x95, 0xd6, 0x9f, 0x75, 0x62, 0x71, 0x73, 0x6d, 0x35, 0xb9, - 0xf4, 0x96, 0x32, 0xbf, 0xce, 0xae, 0x54, 0xe7, 0x15, 0x79, - 0x45, 0xaf, 0x90, 0xdc, 0x5a, 0xdd, 0x15, 0xe8, 0xa2, 0x8a, - 0xcc, 0x41, 0x57, 0x34, 0xad, 0x66, 0xfb, 0x43, 0xba, 0x5b, - 0x9d, 0x3e, 0xee, 0x6b, 0x39, 0xd4, 0xe7, 0x7c, 0x2e, 0x57, - 0x3f, 0x5f, 0x5f, 0xa1, 0xaa, 0x74, 0x55, 0x46, 0x4e, 0x2f, - 0x9a, 0x2e, 0xcc, 0x13, 0x6b, 0x54, 0x7b, 0xef, 0xc3, 0xef, - 0xda, 0x9, 0x2e, 0xe5, 0x8e, 0xc7, 0xc4, 0xc1, 0x20, 0x73, - 0x85, 0x5b, 0xf8, 0xc6, 0x14, 0x9f, 0xf6, 0xc7, 0x6f, 0xa8, - 0xe3, 0xd8, 0x57, 0xb6, 0x47, 0x22, 0x4d, 0x1a, 0xc9, 0x1b, - 0x7, 0x46, 0x19, 0x56, 0x53, 0x90, 0x47, 0xa8, 0x35, 0xf0, - 0xb5, 0x7a, 0xc7, 0xc1, 0x9f, 0x8b, 0x12, 0x78, 0x76, 0xf2, - 0x1d, 0x17, 0x55, 0x98, 0xbe, 0x93, 0x2b, 0x6d, 0x8a, 0x47, - 0x3f, 0xf1, 0xee, 0xc7, 0xa7, 0x3f, 0xdd, 0x3f, 0xa7, 0xe7, - 0x5f, 0x77, 0x94, 0x67, 0xf2, 0xe6, 0x58, 0x7c, 0x63, 0xba, - 0x7b, 0x4b, 0xfc, 0xff, 00, 0xcf, 0xef, 0x3d, 0x9c, 0x2e, - 0x35, 0xdd, 0x42, 0xaf, 0xde, 0x7d, 0x27, 0x45, 0x20, 0x20, - 0x8c, 0x8e, 0x41, 0xa5, 0xaf, 0xd0, 0xcf, 0x70, 0x28, 0xa2, - 0xaa, 0xea, 0x7a, 0x9d, 0xb6, 0x8d, 0xa7, 0xcf, 0x7b, 0x79, - 0x32, 0xc1, 0x6d, 0x2, 0x17, 0x92, 0x46, 0xe8, 00, 0xa4, - 0xda, 0x8a, 0xbb, 0xd8, 0x4d, 0xdb, 0x56, 0x59, 0x66, 0x8, - 0xa5, 0x98, 0x80, 0x7, 0x24, 0x9e, 0xd5, 0xe6, 0xfe, 0x30, - 0xf8, 0xed, 0xa0, 0x78, 0x6f, 0x7c, 0x36, 0x4d, 0xfd, 0xb1, - 0x7a, 0x38, 0xd9, 0x6e, 0xd8, 0x8d, 0x4f, 0xbb, 0xf4, 0xfc, - 0xb3, 0x5e, 0x45, 0xf1, 0x27, 0xe3, 0x16, 0xa1, 0xe3, 0x29, - 0xe5, 0xb4, 0xb1, 0x79, 0x2c, 0x34, 0x60, 0x70, 0x22, 0x53, - 0x87, 0x98, 0x7a, 0xb9, 0x1d, 0xbf, 0xd9, 0xe9, 0xf5, 0xaf, - 0x3a, 0xaf, 0x80, 0xcc, 0x78, 0x95, 0xa6, 0xe9, 0xe0, 0xd7, - 0xfd, 0xbc, 0xff, 00, 0x45, 0xfe, 0x7f, 0x71, 0xe2, 0xd7, - 0xc7, 0xbb, 0xf2, 0xd2, 0xfb, 0xcf, 0x47, 0xf1, 0x7, 0xc7, - 0xbf, 0x14, 0x6b, 0x3b, 0x92, 0xda, 0x68, 0xb4, 0xa8, 0x4f, - 0xf0, 0xda, 0xaf, 0xcd, 0xff, 00, 0x7d, 0x36, 0x4f, 0xe5, - 0x8a, 0xe1, 0x6f, 0xf5, 0xad, 0x43, 0x54, 0x62, 0xd7, 0x97, - 0xd7, 0x37, 0x64, 0xf7, 0x9a, 0x56, 0x7f, 0xe6, 0x6a, 0x95, - 0x15, 0xf1, 0x75, 0xf1, 0x98, 0x8c, 0x4b, 0xbd, 0x69, 0xb7, - 0xf3, 0xfd, 0xf, 0x26, 0x75, 0x67, 0x53, 0xe2, 0x77, 0xa, - 0x28, 0xa2, 0xb8, 0xcc, 0xc2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, - 0x28, 0xa0, 0xb, 0x76, 0x7a, 0xbd, 0xf6, 0x9c, 0xc1, 0xad, - 0x6f, 0x6e, 0x2d, 0x88, 0xef, 0xc, 0xac, 0x9f, 0xc8, 0xd7, - 0x5b, 0xa2, 0x7c, 0x68, 0xf1, 0x6e, 0x8a, 0x55, 0x57, 0x53, - 0x6b, 0xd8, 0xc7, 0x1e, 0x5d, 0xe2, 0x89, 0x33, 0xf8, 0xfd, - 0xef, 0xd6, 0xb8, 0x7a, 0xdb, 0xf0, 0x4e, 0x96, 0x75, 0xaf, - 0x17, 0x68, 0xf6, 0x41, 0x77, 0x9, 0x6e, 0xa3, 0xc, 0x3f, - 0xd9, 0x7, 0x2d, 0xfa, 0x3, 0x5d, 0xd8, 0x6a, 0xf8, 0x88, - 0x54, 0x8c, 0x68, 0xcd, 0xa6, 0xdd, 0xb4, 0x66, 0xb4, 0xe7, - 0x35, 0x24, 0xa0, 0xec, 0x7d, 0x8d, 0xa5, 0xcb, 0x71, 0x3e, - 0x9b, 0x6b, 0x25, 0xda, 0xaa, 0x5d, 0x3c, 0x4a, 0xd2, 0xaa, - 0xc, 00, 0xc4, 0xc, 0x81, 0xf8, 0xd5, 0x9c, 0x73, 0x9a, - 0x5a, 0x2b, 0xf7, 0x14, 0xac, 0x92, 0x3e, 0xbd, 0x5, 0x14, - 0x51, 0x4c, 0x61, 0x58, 0xfe, 0x2e, 0x97, 0xca, 0xf0, 0xed, - 0xeb, 0x74, 0xf9, 0xd, 0x6c, 0x57, 0x33, 0xf1, 0x12, 0x6f, - 0x27, 0xc2, 0xb7, 0x7d, 0xb2, 0x31, 0x58, 0xd6, 0x7c, 0xb4, - 0xe4, 0xfc, 0x8c, 0xea, 0x3b, 0x41, 0xb3, 0xe1, 0x4f, 0x88, - 0x13, 0x79, 0xde, 0x22, 0xbb, 0x6f, 0xf6, 0x8d, 0x78, 0x7, - 0xc6, 0x8b, 0x8f, 0x2f, 0x47, 0x9b, 0x9f, 0xe1, 0x35, 0xee, - 0x5e, 0x2e, 0x97, 0xcd, 0xd6, 0x6f, 0x1b, 0xfd, 0xb3, 0x5f, - 0x3c, 0x7c, 0x78, 0xb9, 0xf2, 0xb4, 0x6b, 0x9f, 0x68, 0xcf, - 0xf2, 0xaf, 0xcd, 0xb2, 0xc5, 0xcd, 0x5e, 0xfe, 0xa7, 0xe2, - 0x18, 0xbf, 0xde, 0xe3, 0xe9, 0xc7, 0xbc, 0xd7, 0xe6, 0x7e, - 0x94, 0xfc, 0xc, 0xf0, 0x98, 0x5f, 0x82, 0x7f, 0xf, 0x84, - 0x90, 0xb0, 0x90, 0x78, 0x7b, 0x4f, 0xd, 0x91, 0xce, 0x7e, - 0xcd, 0x1e, 0x68, 0xaf, 0x59, 0xf8, 0x75, 0x66, 0x2c, 0xfe, - 0x1f, 0x78, 0x62, 0xdc, 0xc6, 0x10, 0xc5, 0xa5, 0xda, 0xc7, - 0xb7, 0x1d, 0x31, 0x12, 0x8c, 0x51, 0x5f, 0xa6, 0x24, 0x7e, - 0xe0, 0xa3, 0xa1, 0xd1, 0xd1, 0x45, 0x15, 0x65, 0x85, 0x14, - 0x51, 0x40, 0x5, 0x7c, 0x4d, 0xfb, 0x4b, 0xf8, 0xc4, 0xf8, - 0xa3, 0xe2, 0x65, 0xcd, 0xac, 0x6e, 0x1a, 0xd3, 0x49, 0x51, - 0x69, 0x1e, 0x31, 0x8d, 0xfd, 0x5c, 0xe4, 0x7b, 0x9c, 0x7e, - 0x15, 0xf5, 0xdf, 0x8e, 0xfc, 0x51, 0xf, 0x82, 0xfc, 0x21, - 0xaa, 0xeb, 0x33, 0x9f, 0x96, 0xd2, 0x6, 0x75, 0x5c, 0xe3, - 0x73, 0xe3, 0xa, 0xa3, 0xdc, 0x9c, 0x57, 0xe7, 0x9b, 0xcb, - 0x3e, 0xa5, 0x7a, 0xf3, 0x4c, 0xc6, 0x5b, 0x9b, 0x89, 0xb, - 0xbb, 0x1e, 0xac, 0xcc, 0x72, 0x4f, 0xe6, 0x6b, 0xe4, 0x78, - 0x83, 0x13, 0xcb, 0x4e, 0x34, 0x17, 0x5d, 0x5f, 0xa2, 0x3e, - 0x33, 0x88, 0xf1, 0x36, 0x84, 0x30, 0xd1, 0xde, 0x5a, 0xbf, - 0x45, 0xb7, 0xe3, 0xf9, 0x1e, 0xfb, 0xfb, 0x27, 0x78, 0x3f, - 0xed, 0xba, 0xdd, 0xe6, 0xb5, 0x32, 0xe6, 0x3b, 0x65, 0xdb, - 0x1e, 0x47, 0xf1, 0x1a, 0xfa, 0xb6, 0xbc, 0xff, 00, 0xe0, - 0x77, 0x85, 0x7, 0x85, 0x7e, 0x1f, 0xe9, 0xf1, 0x32, 0x6d, - 0x9e, 0x75, 0xf3, 0xa4, 0xfa, 0x9a, 0xf4, 0xa, 0xf5, 0xf2, - 0xac, 0x3f, 0xd5, 0xb0, 0x90, 0x8b, 0xdd, 0xea, 0xfe, 0x67, - 0xd0, 0x65, 0xb8, 0x7f, 0xaa, 0xe1, 0x61, 0xe, 0xbb, 0xbf, - 0x98, 0x51, 0x45, 0x15, 0xeb, 0x9e, 0x98, 0x51, 0x45, 0x14, - 00, 0x53, 0x26, 0x86, 0x3b, 0x98, 0x64, 0x86, 0x68, 0xd6, - 0x58, 0xa4, 0x52, 0xae, 0x8e, 0x32, 0xac, 0xf, 0x4, 0x11, - 0xdc, 0x56, 0x5f, 0x8a, 0xfc, 0x5b, 0xa3, 0x78, 0x1b, 0xc3, - 0xf7, 0xba, 0xe7, 0x88, 0x35, 0x3b, 0x5d, 0x1f, 0x48, 0xb2, - 0x8c, 0xcb, 0x71, 0x7b, 0x79, 0x20, 0x8e, 0x38, 0xd4, 0x77, - 0x24, 0xd7, 0xe7, 0xf7, 0xc6, 0xdf, 0xf8, 0x2c, 0x9f, 0x82, - 0xfc, 0x31, 0x3c, 0xd6, 0x1f, 0xd, 0xbc, 0x39, 0x73, 0xe3, - 0xb, 0x84, 0x3b, 0x7f, 0xb4, 0xb5, 0x16, 0x36, 0x96, 0x9f, - 0x55, 0x5c, 0x19, 0x1f, 0xf1, 0xb, 0x40, 0x1e, 0x85, 0xf1, - 0x93, 0xfe, 0x9, 0x37, 0xf0, 0x6b, 0xe2, 0x76, 0xa3, 0x73, - 0xa9, 0xe8, 0x9f, 0xda, 0x3e, 0x3, 0xd4, 0x6e, 0x1c, 0xc9, - 0x20, 0xd2, 0x1d, 0x5e, 0xd4, 0xb1, 0xeb, 0xfb, 0x97, 0x4, - 0x2f, 0xd1, 0xa, 0x8a, 0xf0, 0xd9, 0xbf, 0xe0, 0x88, 0xb0, - 0xfd, 0xb3, 0x31, 0x7c, 0x58, 0x90, 0x5a, 0x67, 0xa3, 0xe8, - 0xa0, 0xc9, 0x8f, 0xa8, 0x9b, 0x15, 0xe2, 0x1a, 0xa7, 0xfc, - 0x16, 0xf, 0xe3, 0xc5, 0xf4, 0xcc, 0xd6, 0xd0, 0x78, 0x57, - 0x4e, 0x8c, 0xfd, 0xd4, 0x87, 0x4c, 0x76, 0xc7, 0xe2, 0xf2, - 0xb6, 0x6b, 0xed, 0xf, 0xf8, 0x26, 0xc7, 0xed, 0x35, 0xf1, - 0x77, 0xf6, 0xa3, 0x93, 0xc5, 0xba, 0xcf, 0x8e, 0x2e, 0xb4, - 0xb6, 0xf0, 0xde, 0x91, 0xe5, 0x5a, 0x5b, 0x8b, 0x1b, 0x11, - 0xb, 0xcb, 0x74, 0xff, 00, 0x33, 0x65, 0xb2, 0x78, 0x54, - 0x3, 0x81, 0xfd, 0xf1, 0x4f, 0x52, 0x74, 0x65, 0xf, 0x87, - 0x1f, 0xf0, 0x47, 0x3f, 0x84, 0x5e, 0x16, 0xb8, 0x4b, 0x8f, - 0x13, 0xeb, 0x1a, 0xef, 0x8c, 0xa4, 0x52, 0xf, 0x91, 0x2c, - 0xab, 0x67, 0x6e, 0x48, 0xf5, 0x58, 0xfe, 0x7f, 0xfc, 0x7e, - 0xbe, 0xd5, 0xf0, 0x27, 0xc3, 0xef, 0xd, 0xfc, 0x31, 0xf0, - 0xe5, 0xb6, 0x81, 0xe1, 0x4d, 0x12, 0xcb, 0x40, 0xd1, 0xed, - 0x86, 0x23, 0xb4, 0xb1, 0x88, 0x46, 0x83, 0xd4, 0x9c, 0x75, - 0x27, 0xb9, 0x39, 0x26, 0xbc, 0x43, 0xc5, 0x7f, 0xf0, 0x50, - 0xef, 0x80, 0xbe, 0x6, 0xf1, 0x76, 0xaf, 0xe1, 0x8d, 0x7b, - 0xc6, 0xaf, 0xa6, 0x6b, 0x5a, 0x55, 0xd4, 0x96, 0x77, 0x96, - 0xd2, 0xe9, 0x77, 0x67, 0xcb, 0x95, 0x1b, 0x6b, 0xd, 0xc2, - 0x22, 0xa7, 0x91, 0xd4, 0x1c, 0x1a, 0xf5, 0xbf, 0x84, 0xbf, - 0x19, 0xbc, 0x1d, 0xf1, 0xcf, 0xc2, 0xed, 0xe2, 0x2f, 0x3, - 0xeb, 0x51, 0xeb, 0xba, 0x3a, 0xdc, 0x35, 0xab, 0x5c, 0xc7, - 0x1b, 0xc6, 0x4, 0x8a, 0x1, 0x65, 0xc3, 0xa8, 0x3c, 0x6, - 0x1d, 0xbb, 0xd2, 0x19, 0xda, 0xd7, 0x11, 0xf1, 0x93, 0xc4, - 0x43, 0xc3, 0xbe, 0x1, 0xd4, 0x59, 0x5f, 0x6c, 0xf7, 0x4b, - 0xf6, 0x58, 0xb9, 0xe7, 0x2f, 0xc1, 0xfc, 0x97, 0x71, 0xae, - 0xde, 0xbe, 0x76, 0xfd, 0xa4, 0x7c, 0x43, 0xf6, 0xcd, 0x7e, - 0xc3, 0x48, 0x8d, 0xf2, 0x96, 0x91, 0x19, 0x64, 0x3, 0xfb, - 0xef, 0xd3, 0xf2, 00, 0x7e, 0x75, 0xe2, 0xe7, 0x18, 0x9f, - 0xaa, 0xe0, 0xa7, 0x35, 0xbb, 0xd1, 0x7a, 0xbf, 0xea, 0xe7, - 0x2e, 0x2a, 0xa7, 0xb3, 0xa4, 0xdf, 0xc8, 0xf1, 0xda, 0x28, - 0xa2, 0xbf, 0x19, 0x3e, 0x54, 0x2a, 0xe6, 0x8f, 0xa6, 0x49, - 0xac, 0xea, 0xd6, 0x76, 0x10, 0x82, 0x65, 0xb9, 0x99, 0x22, - 0x5c, 0x76, 0xdc, 0x40, 0xcd, 0x53, 0xaf, 0x44, 0xf8, 0x18, - 0x9a, 0x64, 0x3e, 0x33, 0xfb, 0x7e, 0xa9, 0x79, 0x6d, 0x67, - 0x15, 0x9c, 0x4c, 0xf1, 0x1b, 0x89, 0x42, 0x6, 0x90, 0xfc, - 0xa3, 0x19, 0xeb, 0x80, 0x58, 0xfe, 0x55, 0xd7, 0x84, 0xa2, - 0xb1, 0x18, 0x88, 0x52, 0x6e, 0xc9, 0xbd, 0x7d, 0x3a, 0x9a, - 0x52, 0x8f, 0x3c, 0xd4, 0x59, 0xf4, 0xfe, 0x9f, 0x63, 0x16, - 0x99, 0x61, 0x6f, 0x69, 0x2, 0xec, 0x86, 0x8, 0xd6, 0x24, - 0x51, 0xd8, 0x1, 0x81, 0x56, 0x2b, 0x2a, 0x3f, 0x16, 0x68, - 0x93, 0x7d, 0xcd, 0x5e, 0xc5, 0xff, 00, 0xdd, 0xb9, 0x43, - 0xfd, 0x6a, 0x43, 0xe2, 0x4d, 0x25, 0x46, 0x4e, 0xa9, 0x66, - 0x7, 0xaf, 0x9e, 0x9f, 0xe3, 0x5f, 0xb7, 0xc6, 0xa5, 0x24, - 0xac, 0xa4, 0xad, 0xea, 0x7d, 0x72, 0x94, 0x6d, 0xa3, 0x34, - 0x69, 0x9, 0xa, 0x9, 0x27, 00, 0x72, 0x49, 0xae, 0x5b, - 0x55, 0xf8, 0xa5, 0xe1, 0x5d, 0x1a, 0x36, 0x69, 0xf5, 0xbb, - 0x57, 0x23, 0xf8, 0x20, 0x7f, 0x35, 0xbf, 0x25, 0xcd, 0x78, - 0xf7, 0xc4, 0x9f, 0x8f, 0x12, 0x6b, 0xf6, 0xb2, 0xe9, 0x9a, - 0xa, 0x49, 0x69, 0x67, 0x20, 0x29, 0x2d, 0xd4, 0x9c, 0x49, - 0x22, 0x9e, 0xa1, 0x47, 0xf0, 0x8f, 0x7e, 0xbf, 0x4a, 0xf3, - 0x71, 0x99, 0xb6, 0x13, 0x7, 0x6, 0xe5, 0x34, 0xdf, 0x64, - 0xee, 0xcc, 0x2a, 0xe2, 0x69, 0xd2, 0x57, 0x6e, 0xec, 0xe2, - 0x3e, 0x27, 0x78, 0x82, 0x2f, 0x13, 0xf8, 0xe7, 0x55, 0xbf, - 0x80, 0x83, 0x6e, 0xd2, 0x8, 0xe3, 0x61, 0xfc, 0x4a, 0x80, - 0x28, 0x3f, 0x8e, 0x33, 0xf8, 0xd7, 0x2d, 0x45, 0x15, 0xf8, - 0xed, 0x6a, 0xb2, 0xaf, 0x52, 0x55, 0x65, 0xbc, 0x9b, 0x7f, - 0x79, 0xf2, 0xd2, 0x93, 0x9c, 0x9c, 0x9f, 0x50, 0xa2, 0x8a, - 0xe9, 0x3c, 0x7, 0xe0, 0x6b, 0xdf, 0x1e, 0x6b, 0x69, 0x65, - 0x6a, 0xc, 0x70, 0x2f, 0xcd, 0x3d, 0xc1, 0x1f, 0x2c, 0x49, - 0xfe, 0x27, 0xb0, 0xa5, 0x4a, 0x94, 0xeb, 0xcd, 0x53, 0xa6, - 0xae, 0xd8, 0x46, 0x2e, 0x6d, 0x46, 0x3b, 0x9e, 0xab, 0xfb, - 0x36, 0xf8, 0x58, 0xa4, 0x57, 0xfa, 0xfc, 0xc8, 0x41, 0x7f, - 0xf4, 0x6b, 0x72, 0x47, 0x51, 0xc1, 0x72, 0x3f, 0x1c, 0xf, - 0xc0, 0xd7, 0xb9, 0x55, 0x3d, 0x23, 0x4a, 0xb6, 0xd0, 0xf4, - 0xcb, 0x6b, 0xb, 0x38, 0xc4, 0x56, 0xd6, 0xf1, 0x88, 0xd1, - 0x47, 0xa0, 0xfe, 0xb5, 0x72, 0xbf, 0x6a, 0xcb, 0xf0, 0x8b, - 0x3, 0x86, 0x85, 0x5, 0xba, 0xdf, 0xd7, 0xa9, 0xf5, 0x94, - 0x29, 0x7b, 0x1a, 0x6a, 0x1, 0x45, 0x14, 0x57, 0xa2, 0x6e, - 0x14, 0x51, 0x45, 00, 0x7c, 0xf7, 0xfb, 0x4a, 0xeb, 0xa6, - 0x7d, 0x67, 0x4c, 0xd2, 0x11, 0xbe, 0x4b, 0x78, 0x8d, 0xc3, - 0x8f, 0xf6, 0x98, 0xe0, 0x7e, 0x41, 0x4f, 0xe7, 0x5e, 0x31, - 0x5d, 0x3f, 0xc4, 0xcd, 0x77, 0xfe, 0x12, 0x3f, 0x1c, 0xea, - 0xf7, 0x81, 0xb7, 0x45, 0xe7, 0x18, 0xa3, 0x3f, 0xec, 0x27, - 0xca, 0x3f, 0x96, 0x7f, 0x1a, 0xe6, 0x2b, 0xf1, 0x3c, 0xcf, - 0x11, 0xf5, 0x9c, 0x65, 0x4a, 0x8b, 0x6b, 0xe9, 0xe8, 0xb4, - 0x47, 0xc9, 0x62, 0x27, 0xed, 0x2a, 0xca, 0x41, 0x45, 0x14, - 0x57, 0x96, 0x73, 0x9b, 0x3e, 0xd, 0xd0, 0xcf, 0x89, 0x3c, - 0x55, 0xa5, 0xe9, 0xb8, 0xca, 0xdc, 0x4e, 0xaa, 0xff, 00, - 0xee, 0xe, 0x5b, 0xf4, 0x6, 0xbe, 0xd1, 0x55, 0xa, 0xa0, - 0x1, 0x80, 0x6, 00, 0xaf, 0x9a, 0xff, 00, 0x67, 0x4d, - 0x18, 0xdf, 0x78, 0xce, 0x7b, 0xf6, 0x5c, 0xc7, 0x63, 0x6e, - 0xc4, 0x1f, 0xf6, 0xdf, 0xe5, 0x1f, 0xa6, 0xea, 0xfa, 0x56, - 0xbf, 0x50, 0xe1, 0x8a, 0x1e, 0xcf, 0xb, 0x2a, 0xaf, 0x79, - 0x3f, 0xc1, 0x7f, 0xc1, 0xb9, 0xf4, 0x19, 0x7c, 0x2d, 0x4d, - 0xcb, 0xb8, 0x51, 0x45, 0x15, 0xf6, 0x7, 0xaa, 0x14, 0x51, - 0x55, 0xb5, 0x1d, 0x42, 0xd, 0x2a, 0xc2, 0xe2, 0xf6, 0xe5, - 0xc4, 0x76, 0xf6, 0xf1, 0xb4, 0xb2, 0x39, 0xec, 0xa0, 0x64, - 0xd2, 0x6d, 0x45, 0x5d, 0x83, 0x76, 0xd4, 0xe3, 0x3e, 0x2d, - 0x7c, 0x47, 0x4f, 0x1, 0x68, 0xaa, 0xb6, 0xfb, 0x5f, 0x55, - 0xba, 0x5, 0x60, 0x43, 0xce, 0xc1, 0xdd, 0xc8, 0xf4, 0x1d, - 0xbd, 0x4d, 0x7c, 0xab, 0x73, 0x73, 0x2d, 0xe5, 0xc4, 0xb3, - 0xcf, 0x23, 0x4b, 0x34, 0xac, 0x5d, 0xe4, 0x73, 0x92, 0xc4, - 0xf5, 0x26, 0xb6, 0x3c, 0x6d, 0xe2, 0xa9, 0xfc, 0x65, 0xe2, - 0x4b, 0xcd, 0x52, 0x72, 0x42, 0xc8, 0xdb, 0x62, 0x8c, 0xff, - 00, 0xcb, 0x38, 0xc7, 0xdd, 0x5f, 0xcb, 0xf5, 0x26, 0xb0, - 0xab, 0xf1, 0xdc, 0xdf, 0x32, 0x96, 0x61, 0x5d, 0xb4, 0xfd, - 0xc5, 0xb2, 0xfd, 0x7e, 0x67, 0xcb, 0x62, 0x6b, 0xba, 0xf3, - 0xf2, 0x5b, 0x5, 0x14, 0x51, 0x5e, 0x11, 0xc6, 0x15, 0xa7, - 0xe1, 0xdf, 0xe, 0x6a, 0x1e, 0x2a, 0xd5, 0x22, 0xb0, 0xd3, - 0x6d, 0xda, 0x79, 0xdc, 0xf6, 0xfb, 0xa8, 0x3f, 0xbc, 0xc7, - 0xb0, 0xf7, 0xa8, 0x34, 0x7d, 0x22, 0xeb, 0x5e, 0xd4, 0xed, - 0xb4, 0xfb, 0x28, 0x8c, 0xd7, 0x57, 0xe, 0x11, 0x10, 0x7a, - 0xfb, 0xfb, 0xe, 0xb5, 0xf5, 0xc7, 0xc3, 0xff, 00, 0x1, - 0xd9, 0x78, 0xb, 0x45, 0x5b, 0x4b, 0x71, 0xbe, 0xe6, 0x40, - 0x1a, 0xe6, 0xe0, 0xf5, 0x91, 0xf1, 0xfa, 0x1, 0xd8, 0x57, - 0xbf, 0x94, 0xe5, 0x52, 0xcc, 0xaa, 0x5d, 0xe9, 0x5, 0xbb, - 0xfd, 0x17, 0xf5, 0xa1, 0xdb, 0x86, 0xc3, 0x3a, 0xf2, 0xd7, - 0x64, 0x71, 0xde, 0xf, 0xfd, 0x9f, 0x34, 0x6d, 0x26, 0x28, - 0xe6, 0xd6, 0x98, 0xea, 0xd7, 0x9d, 0x4c, 0x79, 0x2b, 0xa, - 0x9f, 0x4c, 0x75, 0x6f, 0xc7, 0xf2, 0xaf, 0x50, 0xb2, 0xd3, - 0xed, 0x74, 0xd8, 0x16, 0x1b, 0x4b, 0x68, 0xad, 0xa2, 0x51, - 0x80, 0x91, 0x20, 0x50, 0x3f, 0x1, 0x56, 0x28, 0xaf, 0xd5, - 0x30, 0xd8, 0x2c, 0x3e, 0x12, 0x3c, 0xb4, 0x60, 0x97, 0xe7, - 0xf7, 0x9f, 0x45, 0x4e, 0x94, 0x29, 0x2b, 0x41, 0x58, 0x2a, - 0x2b, 0x8b, 0x58, 0x6e, 0xe2, 0x68, 0xe7, 0x89, 0x26, 0x8d, - 0x86, 0xa, 0x48, 0xa1, 0x81, 0xfc, 0xd, 0x4b, 0x45, 0x76, - 0x34, 0x9e, 0x8c, 0xd8, 0xf2, 0xef, 0x1a, 0xfc, 0x5, 0xd1, - 0x75, 0xe8, 0x65, 0x9f, 0x49, 0x51, 0xa4, 0xea, 0x7, 0x2c, - 0x2, 0x67, 0xc9, 0x73, 0xe8, 0x57, 0xb7, 0xd4, 0x7e, 0x46, - 0xbe, 0x72, 0xd6, 0x74, 0x6b, 0xcf, 0xf, 0xea, 0x73, 0xd8, - 0x5f, 0xc0, 0xd6, 0xf7, 0x50, 0xb6, 0xd7, 0x46, 0xfe, 0x63, - 0xd4, 0x1f, 0x5a, 0xfb, 0x7a, 0xbc, 0x83, 0xf6, 0x87, 0xf0, - 0x7c, 0x5a, 0x87, 0x87, 0xd3, 0x5e, 0x89, 0x31, 0x77, 0x64, - 0x55, 0x25, 0x61, 0xfc, 0x51, 0x31, 0xc7, 0x3f, 0x42, 0x47, - 0xe6, 0x6b, 0xe2, 0xf3, 0xcc, 0x9a, 0x94, 0xa8, 0xcb, 0x13, - 0x87, 0x8f, 0x2c, 0xa3, 0xab, 0x4b, 0x66, 0xba, 0xfc, 0xcf, - 0x23, 0x19, 0x85, 0x8b, 0x8b, 0xa9, 0x5, 0x66, 0x8f, 0x9c, - 0xe8, 0xa2, 0x8a, 0xfc, 0xd0, 0xf0, 0x42, 0x8a, 0x28, 0xa0, - 0xf, 0xa8, 0x7e, 0x5, 0x78, 0xd2, 0x4f, 0x14, 0x78, 0x54, - 0xd9, 0xdd, 0x3e, 0xfb, 0xcd, 0x34, 0xac, 0x25, 0x89, 0xe5, - 0xe3, 0xc7, 0xc8, 0x4f, 0xbf, 0x4, 0x7e, 0x15, 0xe9, 0x55, - 0xf2, 0xd7, 0xc0, 0x5d, 0x71, 0xf4, 0x9f, 0x88, 0x16, 0xd6, - 0xfb, 0xb1, 0xd, 0xfa, 0x34, 0xe, 0x3b, 0x67, 0x1b, 0x94, - 0xfe, 0x63, 0x1f, 0x8d, 0x7d, 0x4b, 0x5f, 0xb0, 0x64, 0x58, - 0xb7, 0x8b, 0xc1, 0x45, 0xc9, 0xeb, 0x1d, 0x1f, 0xcb, 0x6f, - 0xc0, 0xfa, 0x7c, 0x1d, 0x47, 0x52, 0x92, 0xbe, 0xeb, 0x40, - 0xaf, 0x9c, 0x7e, 0x3f, 0xf8, 0xf1, 0xf5, 0x6d, 0x67, 0xfb, - 0x2, 0xd2, 0x42, 0x2c, 0xac, 0x88, 0x33, 0xed, 0x3c, 0x49, - 0x2f, 0xa7, 0xd1, 0x7f, 0x9e, 0x7d, 0x2b, 0xe8, 0x6d, 0x42, - 0xf1, 0x34, 0xfb, 0xb, 0x9b, 0xa9, 0xe, 0x12, 0x8, 0x9a, - 0x46, 0xfa, 00, 0x4f, 0xf4, 0xaf, 0x88, 0xef, 0xef, 0x24, - 0xd4, 0x6f, 0xae, 0x2e, 0xe6, 0x39, 0x96, 0x79, 0x1a, 0x57, - 0x3e, 0xec, 0x72, 0x7f, 0x9d, 0x79, 0x9c, 0x4d, 0x8b, 0x95, - 0x1a, 0x11, 0xa1, 0x7, 0xf1, 0xef, 0xe8, 0x8e, 0x7c, 0xc2, - 0xab, 0x8c, 0x14, 0x17, 0x52, 0xa, 0x28, 0xa2, 0xbf, 0x32, - 0x3c, 00, 0xa2, 0x8a, 0x96, 0xd2, 0xdd, 0xae, 0xee, 0xa1, - 0x81, 0x8, 0xf, 0x2b, 0xac, 0x60, 0x9e, 0x99, 0x27, 0x14, - 0xd2, 0x6d, 0xd9, 0x1, 0x7f, 0x40, 0xf0, 0xc6, 0xab, 0xe2, - 0x8b, 0xaf, 0xb3, 0xe9, 0x76, 0x33, 0x5e, 0x48, 0x3e, 0xf7, - 0x96, 0xbf, 0x2a, 0xff, 00, 0xbc, 0xdd, 0x7, 0xe3, 0x5e, - 0x8d, 0xa7, 0x7e, 0xcd, 0xfe, 0x20, 0xb9, 0x40, 0xd7, 0x57, - 0xb6, 0x56, 0x79, 0xfe, 0x1d, 0xcd, 0x23, 0xf, 0xc8, 0x63, - 0xf5, 0xaf, 0x7a, 0xf0, 0xb7, 0x86, 0xac, 0xfc, 0x27, 0xa1, - 0xda, 0xe9, 0xb6, 0x51, 0x85, 0x8e, 0x25, 0x1, 0x9b, 0x1c, - 0xc8, 0xdd, 0xd8, 0xfb, 0x93, 0x5a, 0xf5, 0xfa, 0x5e, 0x13, - 0x86, 0x70, 0xf0, 0x82, 0x78, 0x96, 0xe5, 0x2f, 0xb9, 0x7f, - 0x99, 0xef, 0xd2, 0xcb, 0xe0, 0x95, 0xea, 0x6a, 0xcf, 0x2, - 0x5f, 0xd9, 0x8e, 0xeb, 0x1f, 0x36, 0xbf, 0x8, 0x3e, 0xd6, - 0xc4, 0xff, 00, 0xec, 0xd4, 0xd7, 0xfd, 0x98, 0xef, 00, - 0xf9, 0x35, 0xe8, 0x9, 0xff, 00, 0x6a, 0xd9, 0x87, 0xfe, - 0xcd, 0x5e, 0xff, 00, 0x45, 0x7a, 0x5f, 0xea, 0xfe, 0x5d, - 0xff, 00, 0x3e, 0xff, 00, 0x17, 0xfe, 0x67, 0x47, 0xd4, - 0xa8, 0x76, 0xfc, 0x59, 0xf3, 0x8d, 0xd7, 0xec, 0xd7, 0xaf, - 0x44, 0x9, 0x83, 0x51, 0xb0, 0x9f, 0xd9, 0x8b, 0xa1, 0xff, - 00, 0xd0, 0x4d, 0x73, 0x3a, 0xb7, 0xc1, 0x7f, 0x17, 0x69, - 0x21, 0x99, 0xb4, 0xa6, 0xba, 0x41, 0xfc, 0x56, 0x8e, 0x24, - 0xfd, 0x7, 0x3f, 0xa5, 0x7d, 0x69, 0x45, 0x73, 0x54, 0xe1, - 0xac, 0xc, 0xd7, 0xb9, 0x78, 0xfc, 0xff, 00, 0xcc, 0xce, - 0x59, 0x7d, 0x17, 0xb5, 0xd1, 0xf0, 0xe5, 0xee, 0x9d, 0x77, - 0xa6, 0xc9, 0xe5, 0xdd, 0xda, 0xcd, 0x6b, 0x27, 0xf7, 0x66, - 0x8c, 0xa1, 0xfc, 0x8d, 0x7a, 0x5f, 0xec, 0xed, 0xa3, 0xb, - 0xff, 00, 0x1b, 0xcb, 0x78, 0xe3, 0x2b, 0x63, 0x6e, 0xce, - 0xa7, 0xd1, 0x9b, 0xe5, 0x1f, 0xa1, 0x6a, 0xfa, 0x3e, 0xff, - 00, 0x4d, 0xb4, 0xd5, 0x6d, 0xda, 0xb, 0xcb, 0x68, 0xae, - 0xa1, 0x61, 0x83, 0x1c, 0xc8, 0x18, 0x1f, 0xc0, 0xd6, 0x4f, - 0x86, 0xfc, 0xd, 0xa3, 0x78, 0x46, 0xea, 0xf6, 0x7d, 0x26, - 0xd3, 0xec, 0x8d, 0x77, 0xb7, 0xcc, 0x55, 0x62, 0x57, 0xe5, - 0xce, 0x30, 0xf, 0x4e, 0xa7, 0xa5, 0x71, 0x61, 0xb8, 0x71, - 0xe1, 0x71, 0x74, 0xeb, 0x29, 0xa9, 0x45, 0x3b, 0xeb, 0xa3, - 0xf2, 0xfc, 0x4c, 0x69, 0xe0, 0x1d, 0x3a, 0x91, 0x95, 0xee, - 0x91, 0xbf, 0x45, 0x14, 0x57, 0xdc, 0x1e, 0xc0, 0x51, 0x45, - 0x14, 00, 0x57, 0x13, 0xf1, 0x6e, 0xe3, 0xc8, 0xf0, 0xa4, - 0xe3, 0xfb, 0xc0, 0xd7, 0x6d, 0x5e, 0x6b, 0xf1, 0xca, 0xe3, - 0xc9, 0xf0, 0xbb, 0xc, 0xe3, 0x2a, 0xd5, 0xc5, 0x8d, 0x97, - 0x2e, 0x1e, 0x6f, 0xc8, 0xe7, 0xc4, 0x3b, 0x52, 0x93, 0xf2, - 0x3e, 0x20, 0xf1, 0x4, 0xbe, 0x65, 0xfd, 0xd3, 0x7a, 0xb9, - 0xaf, 0x9e, 0xfe, 0x34, 0xc4, 0x75, 0x29, 0x6d, 0xec, 0x14, - 0xe0, 0xdd, 0x4f, 0x1c, 00, 0xff, 00, 0xbc, 0xc1, 0x7f, - 0xad, 0x7b, 0xe6, 0xae, 0xfb, 0xa5, 0x98, 0xfa, 0xb1, 0xaf, - 0x12, 0xf1, 0x1d, 0xa7, 0xf6, 0xd7, 0xc5, 0x2f, 0x6, 0xe9, - 0xa3, 0xfe, 0x5e, 0xb5, 0xdb, 0x18, 0x78, 0xf7, 0x9d, 0x5, - 0x7c, 0x1e, 0x4d, 0x1b, 0xd4, 0x47, 0xe2, 0xf4, 0xd7, 0xb4, - 0xcd, 0x28, 0xaf, 0xef, 0x1f, 0xb2, 0xba, 0x6c, 0x1f, 0x65, - 0xd3, 0xed, 0x61, 0xff, 00, 0x9e, 0x71, 0x2a, 0x7e, 0x40, - 0xa, 0x2a, 0xcd, 0x15, 0xfa, 0x49, 0xfb, 0x80, 0x51, 0x45, - 0x14, 00, 0x51, 0x45, 0x21, 0x21, 0x41, 0x24, 0xe0, 0xe, - 0x49, 0xa0, 0xf, 0x9d, 0x7f, 0x6b, 0xdf, 0x1a, 0x2d, 0xb6, - 0x93, 0xa6, 0x78, 0x5e, 0x16, 0x6, 0x5b, 0xa7, 0xfb, 0x5d, - 0xc0, 0xd, 0xc8, 0x45, 0x38, 0x50, 0x47, 0xbb, 0x64, 0xff, - 00, 0xc0, 0x6b, 0xc3, 0xbe, 0x10, 0xf8, 0x59, 0xbc, 0x59, - 0xe3, 0xad, 0x36, 0xcf, 0x69, 0x68, 0x84, 0x81, 0xdf, 0x3, - 0xb0, 0xe6, 0x9d, 0xf1, 0xa3, 0xc6, 0x63, 0xc7, 0x7f, 0x11, - 0xf5, 0x5d, 0x46, 0x27, 0xdf, 0x67, 0x1b, 0x7d, 0x9a, 0xd8, - 0x83, 0x91, 0xe5, 0xa7, 00, 0x8f, 0x62, 0x77, 0x37, 0xe3, - 0x5e, 0xd3, 0xfb, 0x25, 0xf8, 0x3f, 0xca, 0xb7, 0xbe, 0xd7, - 0x66, 0x8c, 0x65, 0x8f, 0x95, 0x13, 0x11, 0xf9, 0xd7, 0xe7, - 0x55, 0x3f, 0xe1, 0x4f, 0x33, 0x51, 0x5a, 0xc6, 0xff, 00, - 0x82, 0xff, 00, 0x3f, 0xd4, 0xfc, 0xe6, 0x2f, 0xfb, 0x53, - 0x35, 0x72, 0xde, 0x29, 0xfe, 0xb, 0xfc, 0xcf, 0xa3, 0x60, - 0x85, 0x6d, 0xe1, 0x8e, 0x24, 0x18, 0x44, 0x50, 0xa0, 0x7b, - 0xa, 0x92, 0x8a, 0x2b, 0xf4, 0x5d, 0x8f, 0xd1, 0x82, 0x8a, - 0x28, 0xa0, 0x2, 0xb3, 0x3c, 0x4d, 0xe2, 0x4d, 0x33, 0xc1, - 0xde, 0x1e, 0xd4, 0x75, 0xcd, 0x66, 0xf2, 0x2d, 0x3f, 0x4a, - 0xd3, 0xe0, 0x7b, 0x9b, 0xab, 0xa9, 0x9b, 0x6a, 0x45, 0x1a, - 0x8c, 0xb3, 0x13, 0xf4, 0x15, 0xa7, 0x5f, 0x1, 0xff, 00, - 0xc1, 0x62, 0x3e, 0x30, 0xc9, 0xe0, 0xdf, 0x81, 0x1a, 0x3f, - 0x82, 0x2c, 0xa7, 0x31, 0xde, 0x78, 0xae, 0xfb, 0xfd, 0x20, - 0x2b, 0x60, 0xfd, 0x92, 0xc, 0x3b, 0xf, 0xa1, 0x73, 0x10, - 0xfa, 0x3, 0x40, 0x1f, 0x9e, 0x9f, 0xb6, 0x97, 0xed, 0x9b, - 0xe2, 0x4f, 0xda, 0xaf, 0xc7, 0x93, 0xb7, 0x9f, 0x36, 0x9b, - 0xe0, 0x8b, 0x9, 0x5e, 0x3d, 0x2b, 0x47, 0x8e, 0x42, 0x11, - 0x90, 0x37, 0x13, 0xcc, 0x3a, 0x34, 0x8c, 00, 0x3c, 0xfd, - 0xde, 0x83, 0xb9, 0x3a, 0x7f, 0x7, 0xbf, 0xe0, 0x9b, 0x1f, - 0x1c, 0x7e, 0x32, 0x68, 0x56, 0xfa, 0xdd, 0x9e, 0x81, 0x6b, - 0xe1, 0xdd, 0x1e, 0xe6, 0x31, 0x35, 0xbd, 0xd7, 0x88, 0x2e, - 0x7e, 0xcc, 0x66, 0x43, 0xc8, 0x65, 0x8c, 0x6, 0x7c, 0x63, - 0x9c, 0x95, 00, 0xd6, 0x6f, 0xfc, 0x13, 0xbb, 0xe1, 0xbe, - 0x87, 0xf1, 0x4b, 0xf6, 0xb4, 0xf0, 0x66, 0x93, 0xe2, 0x25, - 0x82, 0x7d, 0x32, 0xdc, 0xcd, 0xa8, 0x1b, 0x4b, 0x90, 0xa, - 0x5d, 0x3c, 0x31, 0x97, 0x48, 0xf0, 0x7a, 0xfc, 0xc0, 0x36, - 0x3b, 0x85, 0x35, 0xfb, 0x39, 0xfb, 0x62, 0x7c, 0x66, 0xb7, - 0xf8, 0x5, 0xfb, 0x39, 0x78, 0xc3, 0xc5, 0x2, 0x45, 0x86, - 0xf9, 0x2c, 0xcd, 0x96, 0x9a, 0x83, 0x8d, 0xd7, 0x52, 0x8d, - 0x91, 00, 0x3d, 0x89, 0xdd, 0xf4, 0x53, 0x4c, 0x84, 0xaf, - 0xab, 0x3f, 0x9e, 0x6f, 0x16, 0x78, 0x7d, 0xbc, 0x27, 0xe2, - 0x7d, 0x5b, 0x45, 0x7b, 0xcb, 0x6d, 0x41, 0xf4, 0xeb, 0xa9, - 0x2d, 0x5a, 0xea, 0xcd, 0x8b, 0x43, 0x29, 0x46, 0x2a, 0x59, - 0x9, 00, 0x95, 0x24, 0x70, 0x70, 0x2b, 0xf7, 0xe7, 0xf6, - 0x3, 0xf8, 0x22, 0x3e, 0x5, 0x7e, 0xcc, 0x3e, 0x14, 0xd2, - 0x67, 0x8b, 0xcb, 0xd6, 0x35, 0x38, 0xbf, 0xb6, 0x35, 0x1c, - 0x8f, 0x9b, 0xce, 0x9c, 0x6, 0xda, 0x7f, 0xdd, 0x4d, 0x89, - 0xff, 00, 0x1, 0xaf, 0xc5, 0x9f, 0xd8, 0xf3, 0xe0, 0xb4, - 0xbf, 0xb4, 0xf, 0xed, 0x17, 0xe1, 0xf, 0xa, 0x3a, 0x79, - 0xb6, 0x12, 0x5d, 0xb, 0xdd, 0x49, 0x98, 0x64, 0xb, 0x58, - 0xbf, 0x79, 0x2e, 0x7f, 0xde, 00, 0x27, 0xd5, 0xc5, 0x7e, - 0xd9, 0xfe, 0xd9, 0x7f, 0xb4, 0x8e, 0x8d, 0xfb, 0x30, 0x7c, - 0xf, 0xd5, 0xf5, 0x56, 0xbb, 0x82, 0x1f, 0x11, 0x5d, 0x5b, - 0x3d, 0x9e, 0x83, 0xa7, 0xe4, 0x6f, 0x9a, 0xe0, 0xae, 0xd5, - 0x60, 0xbd, 0x76, 0x26, 0x43, 0x31, 0xec, 0x6, 0x3a, 0x91, - 0x43, 0x5, 0xdc, 0xfc, 0x4a, 0xfd, 0xb3, 0x75, 0xfb, 0x5f, - 0x13, 0x7e, 0xd5, 0x7f, 0x14, 0xf5, 0x1b, 0x26, 0x57, 0xb5, - 0x93, 0x5e, 0xb9, 0x44, 0x74, 0xe8, 0xdb, 0x1b, 0x61, 0x3f, - 0x89, 0x52, 0x6b, 0xf5, 0x7f, 0xfe, 0x9, 0x19, 0xa1, 0x49, - 0xa4, 0xfe, 0xc8, 0x36, 0x77, 0x72, 0x2e, 0xdf, 0xed, 0x3d, - 0x66, 0xf6, 0xe5, 0x33, 0xdd, 0x43, 0x2c, 0x59, 0xfc, 0xe3, - 0x6a, 0xfc, 0x50, 0xd1, 0xf4, 0x9d, 0x57, 0xc7, 0x5e, 0x2a, - 0xb3, 0xd3, 0x6c, 0xd2, 0x4d, 0x43, 0x5a, 0xd5, 0xef, 0x12, - 0x8, 0x97, 0xab, 0xcd, 0x3c, 0xaf, 0x81, 0xf8, 0x96, 0x6a, - 0xfe, 0x91, 0x3e, 0x2, 0xfc, 0x2c, 0xb5, 0xf8, 0x27, 0xf0, - 0x73, 0xc2, 0x3e, 0x8, 0xb4, 0xda, 0x53, 0x46, 0xd3, 0xe3, - 0xb7, 0x92, 0x45, 0x1c, 0x49, 0x2e, 0x37, 0x4a, 0xff, 00, - 0xf0, 0x27, 0x2c, 0x7f, 0x1a, 0x18, 0x2d, 0xee, 0x77, 0x53, - 0xcc, 0x96, 0xd0, 0xc9, 0x34, 0x8c, 0x12, 0x38, 0xd4, 0xb3, - 0x31, 0xe8, 00, 0x19, 0x26, 0xbe, 0x2c, 0xf1, 0x46, 0xb5, - 0x27, 0x88, 0xfc, 0x45, 0xa8, 0xea, 0x52, 0x12, 0x4d, 0xcc, - 0xed, 0x20, 0xcf, 0x65, 0xcf, 0xca, 0x3f, 0x1, 0x81, 0x5f, - 0x4a, 0xfc, 0x73, 0xf1, 0x11, 0xd0, 0x7c, 0x3, 0x75, 0x1c, - 0x6f, 0xb2, 0xe2, 0xf9, 0x85, 0xaa, 0x63, 0xae, 0xf, 0x2f, - 0xff, 00, 0x8e, 0x82, 0x3f, 0x1a, 0xf9, 0x5a, 0xbf, 0x38, - 0xe2, 0x8c, 0x4f, 0x35, 0x48, 0x61, 0x97, 0x4d, 0x5f, 0xcf, - 0x6f, 0xeb, 0xcc, 0xf1, 0x33, 0x1a, 0x97, 0x92, 0xa6, 0xba, - 0x5, 0x14, 0x51, 0x5f, 0xa, 0x79, 0x1, 0x45, 0x14, 0x50, - 0x1, 0x46, 0x28, 0xa2, 0x80, 0xa, 0x28, 0xa2, 0x80, 0xa, - 0x7c, 0x10, 0x49, 0x73, 0x32, 0xc5, 0xc, 0x6f, 0x2c, 0xae, - 0x70, 0xa8, 0x8a, 0x59, 0x89, 0xf6, 0x2, 0xb4, 0x3c, 0x3f, - 0xa9, 0xd9, 0xe9, 0x5a, 0x82, 0xcd, 0x7d, 0xa5, 0xc3, 0xab, - 0x5b, 0xff, 00, 0x14, 0x12, 0xc8, 0xc9, 0xf9, 0x15, 0x3d, - 0x7e, 0xb9, 0xaf, 0xa9, 0xbe, 0x1a, 0x5c, 0xf8, 0x5f, 0x58, - 0xd1, 0x56, 0xff, 00, 0xc3, 0xda, 0x7d, 0xbd, 0x90, 0xce, - 0xc9, 0x63, 0x58, 0x82, 0xc9, 0x1b, 0xe3, 0xee, 0xb1, 0xea, - 0x7e, 0xb9, 0xe6, 0xbd, 0xdc, 0xb3, 0x2c, 0x8e, 0x63, 0x2e, - 0x5f, 0x6a, 0xa2, 0xfb, 0x6b, 0x7f, 0xf2, 0xfc, 0x4e, 0xbc, - 0x3e, 0x1d, 0x57, 0x76, 0xe6, 0xb1, 0xe2, 0xbe, 0x9, 0xf8, - 0xd, 0xad, 0x78, 0x86, 0x54, 0x9b, 0x55, 0x56, 0xd1, 0xec, - 0x3a, 0x9f, 0x30, 0x7e, 0xf9, 0xc7, 0xa0, 0x5e, 0xdf, 0x53, - 0xf9, 0x1a, 0xfa, 0x1f, 0xc3, 0x5e, 0x18, 0xd3, 0xbc, 0x25, - 0xa5, 0xc7, 0x61, 0xa6, 0xc0, 0x20, 0x81, 0x79, 0x27, 0xab, - 0x39, 0xee, 0xcc, 0x7b, 0x9a, 0xd5, 0xa2, 0xbf, 0x4b, 0xc0, - 0x65, 0x58, 0x6c, 0xbd, 0x5e, 0x92, 0xbc, 0xbb, 0xbd, 0xff, - 00, 0xe0, 0x1f, 0x41, 0x47, 0xd, 0x4e, 0x87, 0xc3, 0xbf, - 0x70, 0xa2, 0x8a, 0x2b, 0xd8, 0x3a, 0x82, 0x8a, 0x28, 0xa0, - 0x2, 0xb1, 0x3c, 0x69, 0xac, 0xaf, 0x87, 0xbc, 0x27, 0xaa, - 0xea, 0x5, 0xb6, 0x98, 0x2d, 0xdc, 0xa7, 0xfb, 0xe4, 0x61, - 0x47, 0xe6, 0x45, 0x6d, 0xd7, 0x91, 0xfe, 0xd1, 0xfa, 0xd9, - 0xb2, 0xf0, 0xa5, 0x9e, 0x9c, 0x8d, 0x87, 0xbd, 0xb8, 0xcb, - 0xf, 0x54, 0x41, 0x93, 0xff, 00, 0x8f, 0x15, 0xaf, 0x3f, - 0x30, 0xaf, 0xf5, 0x5c, 0x2d, 0x4a, 0xdd, 0x97, 0xe3, 0xd3, - 0xf1, 0x30, 0xaf, 0x3f, 0x67, 0x4e, 0x52, 0x3e, 0x70, 0x24, - 0x93, 0x93, 0xc9, 0xa2, 0x8a, 0x2b, 0xf0, 0xf3, 0xe4, 0x42, - 0x8a, 0x29, 0x42, 0x96, 0x20, 0x1, 0x92, 0x78, 0x2, 0x80, - 0x3e, 0x93, 0xfd, 0x9c, 0xf4, 0x71, 0x65, 0xe0, 0xcb, 0x8b, - 0xe6, 0x5c, 0x49, 0x7b, 0x72, 0xc4, 0x1f, 0xf6, 0x13, 0xe5, - 0x1f, 0xae, 0xea, 0xf5, 0x7a, 0xc4, 0xf0, 0x5e, 0x88, 0x3c, - 0x39, 0xe1, 0x4d, 0x2f, 0x4e, 00, 0x6, 0x82, 0x5, 0xf, - 0x8e, 0xec, 0x79, 0x63, 0xf9, 0x93, 0x5b, 0x75, 0xfb, 0x8e, - 0x2, 0x87, 0xd5, 0xb0, 0xb4, 0xe9, 0x76, 0x4b, 0xef, 0xeb, - 0xf8, 0x9f, 0x5d, 0x42, 0x1e, 0xce, 0x9c, 0x62, 0x14, 0x51, - 0x45, 0x77, 0x9b, 0x85, 0x79, 0x1f, 0xed, 0x15, 0xe2, 0x86, - 0xd3, 0x3c, 0x35, 0x6d, 0xa4, 0x42, 0xfb, 0x65, 0xd4, 0x1f, - 0x32, 0x1, 0xd7, 0xca, 0x5c, 0x13, 0xf9, 0x9c, 0x7e, 0x46, - 0xbd, 0x72, 0xbe, 0x51, 0xf8, 0xdd, 0xae, 0xb6, 0xb7, 0xf1, - 0xb, 0x50, 0x4d, 0xdb, 0xa1, 0xb3, 0xc5, 0xac, 0x63, 0x3d, - 0x36, 0x8f, 0x9b, 0xff, 00, 0x1e, 0x2d, 0x5f, 0x37, 0x9f, - 0xe2, 0x9e, 0x1b, 0x5, 0x25, 0x1d, 0xe5, 0xa7, 0xf9, 0xfe, - 0x7, 0x6, 0x36, 0xa7, 0x25, 0x16, 0x97, 0x5d, 0xe, 0xa, - 0x8a, 0x28, 0xaf, 0xc8, 0xcf, 0x99, 0xa, 0x28, 0xa9, 0x2d, - 0xe0, 0x7b, 0xab, 0x88, 0xa1, 0x88, 0x6e, 0x92, 0x46, 0x8, - 0xab, 0xea, 0x49, 0xc0, 0x14, 0xd2, 0xbe, 0x88, 0xf, 0x79, - 0xfd, 0x9c, 0xfc, 0x18, 0xb1, 0x5a, 0x5c, 0x78, 0x92, 0xe1, - 0x33, 0x24, 0xa5, 0xa0, 0xb6, 0xc8, 0xe8, 0xa3, 0xef, 0x30, - 0xfa, 0x9e, 0x3f, 0x3, 0xeb, 0x5e, 0xdd, 0x59, 0xbe, 0x1b, - 0xd1, 0x62, 0xf0, 0xee, 0x83, 0x61, 0xa6, 0xc2, 00, 0x4b, - 0x68, 0x56, 0x3c, 0x8e, 0xe4, 0xe, 0x4f, 0xe2, 0x72, 0x7f, - 0x1a, 0xd2, 0xaf, 0xdb, 0xb2, 0xfc, 0x2a, 0xc1, 0x61, 0xa1, - 0x45, 0x6e, 0x96, 0xbe, 0xbd, 0x4f, 0xae, 0xa1, 0x4d, 0x52, - 0xa6, 0xa2, 0x14, 0x51, 0x45, 0x7a, 0x26, 0xe1, 0x45, 0x14, - 0x50, 0x1, 0x59, 0x1e, 0x2e, 0xd3, 0xd7, 0x56, 0xf0, 0xb6, - 0xad, 0x66, 0xe3, 0x2b, 0x35, 0xac, 0x8b, 0xf8, 0xed, 0x38, - 0xfd, 0x6b, 0x5e, 0xaa, 0x6a, 0xf2, 0x88, 0x34, 0x9b, 0xd9, - 0x1b, 0xee, 0xa4, 0xe, 0xc7, 0xf0, 0x53, 0x59, 0xd5, 0x4a, - 0x50, 0x92, 0x7b, 0x59, 0x93, 0x25, 0x78, 0xb4, 0xcf, 0x87, - 0xe8, 0xa2, 0x8a, 0xfc, 0xc, 0xf8, 0xc0, 0xa2, 0x8a, 0x28, - 0x3, 0x7b, 0xc0, 0x57, 0x26, 0xd3, 0xc6, 0xda, 0x14, 0xa0, - 0xe3, 0x17, 0xb0, 0x8f, 0xc0, 0xb8, 0x7, 0xf9, 0xd7, 0xd9, - 0xb5, 0xf1, 0x67, 0x83, 0x62, 0x33, 0x78, 0xbb, 0x44, 0x45, - 0xea, 0xd7, 0xb0, 0x8f, 0xfc, 0x7c, 0x57, 0xda, 0x75, 0xfa, - 0x47, 0xa, 0xb7, 0xec, 0x6a, 0xae, 0x97, 0x5f, 0x91, 0xee, - 0xe5, 0xbf, 0xc, 0x8c, 0x3f, 0x1c, 0x86, 0x6f, 0x5, 0xeb, - 0xa1, 0x33, 0xbb, 0xec, 0x33, 0x63, 0x1f, 0xee, 0x1a, 0xf8, - 0xc2, 0xbe, 0xe6, 0xb9, 0xb7, 0x4b, 0xbb, 0x69, 0x60, 0x90, - 0x6e, 0x8e, 0x54, 0x28, 0xc0, 0xf7, 0x4, 0x60, 0xd7, 0xc5, - 0x9e, 0x25, 0xd0, 0xa7, 0xf0, 0xd6, 0xbd, 0x7d, 0xa6, 0x5c, - 0x29, 0x59, 0x2d, 0xe5, 0x28, 0x9, 0x1f, 0x79, 0x7f, 0x85, - 0xbf, 0x11, 0x83, 0xf8, 0xd7, 0x37, 0x15, 0x52, 0x95, 0xe9, - 0x55, 0xe9, 0xaa, 0x23, 0x32, 0x8b, 0xbc, 0x64, 0x66, 0x51, - 0x45, 0x15, 0xf0, 0x7, 0x8a, 0x14, 0xaa, 0xc5, 0x18, 0x32, - 0x92, 0x18, 0x1c, 0x82, 0x3b, 0x52, 0x51, 0x40, 0x1f, 0x49, - 0xfc, 0x39, 0xf8, 0xe5, 0xa6, 0x6b, 0x16, 0x30, 0x59, 0x6b, - 0x93, 0xae, 0x9f, 0xa9, 0x46, 0xa1, 0xc, 0xf2, 0x9c, 0x45, - 0x37, 0x6c, 0xe7, 0xf8, 0x4f, 0xa8, 0x3f, 0x85, 0x7a, 0xac, - 0x53, 0x47, 0x3c, 0x6b, 0x24, 0x4e, 0xb2, 0x46, 0xc3, 0x21, - 0x90, 0xe4, 0x11, 0xf5, 0xaf, 0x85, 0xeb, 0x63, 0x43, 0xf1, - 0x86, 0xb7, 0xe1, 0xa3, 0xff, 00, 0x12, 0xcd, 0x4e, 0xe6, - 0xd1, 0x7f, 0xe7, 0x9a, 0x3e, 0x50, 0xff, 00, 0xc0, 0x4f, - 0x1f, 0xa5, 0x7d, 0xbe, 0xb, 0x89, 0xaa, 0x52, 0x8a, 0x86, - 0x26, 0x3c, 0xd6, 0xea, 0xb7, 0xff, 00, 0x83, 0xf8, 0x1e, - 0xbd, 0x2c, 0xc2, 0x51, 0x56, 0xa8, 0xae, 0x7d, 0xa7, 0x45, - 0x7c, 0xdf, 0xa0, 0xfe, 0xd1, 0xda, 0xed, 0x8e, 0xd4, 0xd4, - 0xed, 0x2d, 0xf5, 0x38, 0xc7, 0x56, 0x5f, 0xdd, 0x49, 0xf9, - 0x8c, 0x8f, 0xd2, 0xbb, 0xed, 0x13, 0xf6, 0x87, 0xf0, 0xd6, - 0xa4, 0xc1, 0x2f, 0x52, 0xe7, 0x4b, 0x73, 0xfc, 0x52, 0xa6, - 0xf4, 0xfc, 0xd7, 0x27, 0xf3, 0x15, 0xf5, 0x74, 0x33, 0xcc, - 0x5, 0x7f, 0xf9, 0x79, 0xca, 0xfc, 0xf4, 0xff, 00, 0x81, - 0xf8, 0x9e, 0x8c, 0x31, 0x94, 0x67, 0xd6, 0xde, 0xa7, 0xa9, - 0x51, 0x59, 0xba, 0x3f, 0x89, 0x34, 0xaf, 0x10, 0x45, 0xe6, - 0x69, 0xba, 0x85, 0xbd, 0xea, 0xf7, 0xf2, 0x64, 0xc, 0x47, - 0xd4, 0x75, 0x15, 0xa5, 0x5e, 0xe4, 0x65, 0x19, 0xae, 0x68, - 0xbb, 0xa3, 0xb1, 0x34, 0xd5, 0xd0, 0x51, 0x45, 0x15, 0x43, - 0xa, 0x28, 0xa2, 0x80, 0xa, 0x28, 0xa2, 0x80, 0xa, 0xf2, - 0xf, 0xda, 0x1e, 0xeb, 0xca, 0xd0, 0x36, 0xe7, 0xfe, 0x59, - 0x9a, 0xf5, 0xfa, 0xf0, 0x6f, 0xda, 0x5e, 0xf8, 0x47, 0x61, - 0xe5, 0x67, 0x91, 0x1d, 0x79, 0x19, 0xb4, 0xb9, 0x30, 0x75, - 0x1f, 0x91, 0xc1, 0x8e, 0x97, 0x2e, 0x1e, 0x4c, 0xf9, 0x7, - 0x53, 0x6f, 0x95, 0xcf, 0xb9, 0xaf, 0x34, 0xf0, 0x2d, 0x92, - 0xeb, 0x9f, 0xb5, 0x7, 0xc3, 0x3b, 0x26, 0x1b, 0x81, 0xd7, - 0xad, 0xe4, 0xc7, 0xfb, 0x84, 0xbf, 0xfe, 0xcb, 0x5e, 0x8d, - 0xaa, 0x36, 0x22, 0x63, 0xec, 0x6b, 0x94, 0xfd, 0x9b, 0xec, - 0xff, 00, 0xb6, 0x3f, 0x6c, 0xbf, 0x87, 0xf1, 0xe3, 0x70, - 0x86, 0x7b, 0x9b, 0x93, 0xed, 0xb2, 0xda, 0x53, 0x9f, 0xcf, - 0x15, 0xf2, 0xd9, 0x24, 0x7d, 0xf3, 0xf2, 0x3c, 0xb1, 0x7b, - 0x4c, 0xe2, 0x97, 0x95, 0xd9, 0xfa, 0xcf, 0x45, 0x14, 0x57, - 0xe8, 0x7, 0xed, 0x61, 0x45, 0x14, 0x50, 0x1, 0x5c, 0x3f, - 0xc6, 0x8f, 0x18, 0xf, 0x4, 0x7c, 0x37, 0xd6, 0x35, 0x5, - 0x62, 0xb7, 0xf, 0x17, 0xd9, 0xad, 0xf6, 0xf5, 0xf3, 0x1f, - 0xe5, 0x53, 0xf8, 0x64, 0x9f, 0xc2, 0xbb, 0x8a, 0xf9, 0x5f, - 0xf6, 0xbf, 0xf1, 0x87, 0xda, 0xb5, 0x6d, 0x2b, 0xc3, 0x31, - 0x1f, 0x92, 0xd9, 0x3e, 0xd9, 0x39, 0xe7, 0xef, 0x36, 0x42, - 0x8f, 0xcb, 0x27, 0xf1, 0xaf, 0x37, 0x31, 0xc4, 0x7d, 0x5b, - 0xd, 0x39, 0xf5, 0xd9, 0x7a, 0xb3, 0xca, 0xcd, 0x31, 0x3f, - 0x54, 0xc2, 0x4e, 0xa2, 0xdf, 0x65, 0xea, 0xff, 00, 0xab, - 0x9f, 0x3e, 0x58, 0x5a, 0xbd, 0xe5, 0xd4, 0x30, 0x46, 0x37, - 0x3b, 0xb0, 0x50, 0x7, 0xa9, 0xaf, 0xd0, 0x3f, 0x86, 0x9e, - 0x19, 0x8f, 0xc2, 0x7e, 0xc, 0xd3, 0x6c, 0x11, 0x2, 0xb8, - 0x88, 0x34, 0x9e, 0xec, 0x47, 0x35, 0xf2, 0x27, 0xec, 0xf7, - 0xe1, 0x13, 0xe2, 0x9f, 0x1f, 0x5a, 0x97, 0x5c, 0xdb, 0xdb, - 0x7e, 0xf5, 0xcf, 0xd3, 0xa5, 0x7d, 0xc4, 0xa0, 0x28, 00, - 0x70, 0x7, 0x15, 0xf3, 0xdc, 0x3d, 0x87, 0xd2, 0x78, 0x87, - 0xe8, 0xbf, 0x53, 0xc2, 0xe1, 0xcc, 0x37, 0x25, 0x39, 0x57, - 0x7d, 0x74, 0x42, 0xd1, 0x45, 0x15, 0xf6, 0x67, 0xd9, 0x5, - 0x14, 0x51, 0x40, 0x5, 0x7e, 0x55, 0x7f, 0xc1, 0x6d, 0x3c, - 0x2b, 0xa8, 0x36, 0xa3, 0xf0, 0xc7, 0xc4, 0x81, 0x19, 0xb4, - 0xa5, 0x8a, 0xef, 0x4f, 0x67, 0x1d, 0x12, 0x62, 0x52, 0x40, - 0xf, 0xd5, 0x43, 0x7f, 0xdf, 0x26, 0xbf, 0x52, 0xb5, 0x4d, - 0x5e, 0xc7, 0x43, 0xb3, 0x6b, 0xbd, 0x46, 0xf6, 0xde, 0xc2, - 0xd5, 0x48, 0x56, 0x9e, 0xea, 0x55, 0x8d, 0x1, 0x27, 00, - 0x16, 0x62, 0x7, 0x24, 0x81, 0x5e, 0x73, 0xf1, 0xc7, 0xe1, - 0xf, 0x82, 0xff, 00, 0x69, 0xef, 0x86, 0x1a, 0x8f, 0x83, - 0x35, 0xeb, 0x98, 0xee, 0xf4, 0xeb, 0xbd, 0xb2, 0xc5, 0x73, - 0x63, 0x3a, 0x99, 0x6d, 0xa6, 0x5e, 0x52, 0x54, 0x23, 0x3c, - 0x83, 0xdb, 0xa1, 0x4, 0x83, 0xc1, 0xa0, 0x4f, 0x53, 0xf9, - 0xcd, 0xf0, 0xaf, 0x8a, 0xb5, 0x8f, 0x3, 0xf8, 0x8b, 0x4f, - 0xd7, 0xb4, 0xd, 0x46, 0xe3, 0x49, 0xd6, 0x74, 0xf9, 0x44, - 0xf6, 0xb7, 0xb6, 0xaf, 0xb6, 0x48, 0x9c, 0x74, 0x20, 0xfe, - 0x9e, 0xe0, 0x90, 0x6b, 0xd8, 0x7e, 0x39, 0x7e, 0xda, 0xdf, - 0x14, 0xbf, 0x68, 0xbf, 0x1, 0x68, 0xfe, 0x13, 0xf1, 0xce, - 0xa9, 0x69, 0xa9, 0x58, 0x69, 0x97, 0x42, 0xf1, 0x27, 0x86, - 0xd1, 0x60, 0x9a, 0x69, 0x2, 0x32, 0x3, 0x29, 0x5c, 0x2b, - 0x60, 0x33, 0x74, 0x51, 0xc9, 0xaf, 0x44, 0xf8, 0xd9, 0xff, - 00, 0x4, 0xbf, 0xf8, 0xd9, 0xf0, 0xa2, 0xfa, 0xea, 0x5d, - 0x27, 0x44, 0x1e, 0x39, 0xd0, 0x91, 0xd8, 0xc5, 0x7d, 0xa1, - 0xb6, 0xf9, 0x76, 0x67, 0x82, 0xf0, 0x1c, 0x38, 0x6c, 0x76, - 0x50, 0xc3, 0xde, 0xbe, 0x79, 0xb8, 0xf8, 0x25, 0xf1, 0x12, - 0xd2, 0xe4, 0xdb, 0xcd, 0xe0, 0x3f, 0x12, 0xc5, 0x38, 0x38, - 0xf2, 0xdb, 0x48, 0xb8, 0xd, 0x9f, 0xa6, 0xca, 0xa2, 0x35, - 0x3a, 0x5f, 0xd9, 0xdb, 0xf6, 0x95, 0xf1, 0x47, 0xec, 0xc5, - 0xe2, 0xd, 0x5f, 0x5f, 0xf0, 0x7d, 0xa6, 0x96, 0xfa, 0xe5, - 0xfd, 0x9f, 0xd8, 0x56, 0xf7, 0x51, 0xb7, 0x33, 0x1b, 0x68, - 0xcb, 0x6, 0x6f, 0x2c, 0x6e, 0x3, 0x2c, 0x55, 0x73, 0x9c, - 0xfd, 0xd1, 0x5c, 0xdf, 0xc5, 0x9f, 0x8d, 0x1e, 0x35, 0xf8, - 0xe5, 0xe2, 0x63, 0xaf, 0xf8, 0xe3, 0xc4, 0x37, 0x7e, 0x20, - 0xd4, 0x82, 0x94, 0x8d, 0xee, 0x8, 0x9, 0xa, 0x67, 0x3b, - 0x23, 0x45, 0x1, 0x51, 0x7d, 0x94, 0xa, 0xf4, 0xdf, 0x86, - 0x7f, 0xb0, 0x3f, 0xc7, 0x6f, 0x8a, 0x97, 0x31, 0x2e, 0x99, - 0xe0, 0xd, 0x47, 0x4c, 0xb5, 0x7e, 0xb7, 0xba, 0xda, 0xfd, - 0x86, 0x15, 0x1e, 0xa7, 0xcc, 0xc3, 0x1f, 0xc1, 0x4d, 0x7e, - 0x8b, 0xfe, 0xc9, 0xff, 00, 0xf0, 0x4a, 0xf, 0xb, 0xfc, - 0x27, 0xbd, 0xb2, 0xf1, 0x37, 0xc4, 0xbb, 0xb8, 0x3c, 0x65, - 0xe2, 0x6b, 0x79, 0x16, 0x6b, 0x7d, 0x3e, 0x10, 0x46, 0x9d, - 0x6a, 0xe3, 0x90, 0x48, 0x60, 0xc, 0xcc, 0xf, 0x76, 0x1, - 0x78, 0x1f, 0x2f, 0x7a, 0x2, 0xcc, 0xf3, 0xaf, 0xf8, 0x25, - 0x8f, 0xec, 0x3b, 0x79, 0xa4, 0xdd, 0xda, 0xfc, 0x65, 0xf1, - 0xde, 0x9b, 0xf6, 0x79, 0xc, 0x64, 0xf8, 0x73, 0x4d, 0xba, - 0x8c, 0x89, 0x13, 0x3c, 0x1b, 0xb7, 0x53, 0xd3, 0x23, 0x21, - 0x7, 0x5e, 0x4b, 0x7a, 0x57, 0xea, 0x25, 0x22, 0xa8, 0x45, - 0xa, 0xa0, 0x2a, 0x81, 0x80, 00, 0xc0, 0x2, 0xa2, 0xbc, - 0xbb, 0x8e, 0xc6, 0xd2, 0x6b, 0x99, 0x9b, 0x64, 0x30, 0xa1, - 0x91, 0xd8, 0xf6, 00, 0x64, 0xd4, 0xb7, 0x6d, 0x59, 0x7b, - 0x23, 0xe7, 0x5f, 0xda, 0x33, 0xc4, 0x23, 0x50, 0xf1, 0x4d, - 0xae, 0x97, 0x1b, 0xe6, 0x3b, 0x8, 0xb2, 0xe0, 0x1e, 0x3c, - 0xc7, 0xe4, 0xff, 00, 0xe3, 0xa1, 0x7f, 0x3a, 0xf2, 0x4a, - 0xbf, 0xaf, 0x6a, 0xb2, 0x6b, 0xba, 0xd5, 0xf6, 0xa1, 0x29, - 0x26, 0x4b, 0x99, 0x9e, 0x53, 0x9e, 0xd9, 0x39, 0x3, 0xf0, - 0x1c, 0x55, 0xa, 0xfc, 0x3b, 0x1f, 0x89, 0x78, 0xbc, 0x4c, - 0xeb, 0x77, 0x7f, 0x87, 0x4f, 0xc0, 0xf9, 0x1a, 0xd5, 0x3d, - 0xad, 0x47, 0x3e, 0xe1, 0x45, 0x14, 0x57, 0x1, 0x89, 0xdd, - 0x7c, 0x28, 0xf8, 0x72, 0x9f, 0x10, 0xf5, 0x4b, 0xc8, 0xae, - 0x66, 0x96, 0xda, 0xce, 0xda, 0x20, 0xcd, 0x24, 0x20, 0x67, - 0x79, 0x3f, 0x28, 0xe4, 0x63, 0xb3, 0x7e, 0x55, 0xe8, 0xf3, - 0x7e, 0xcc, 0x96, 0x4, 0x1f, 0x27, 0x5c, 0xb9, 0x43, 0xdb, - 0x7c, 0x2a, 0xdf, 0xc8, 0x8a, 0xde, 0xf8, 0x1, 0xe1, 0xd6, - 0xd1, 0xbc, 0xe, 0x2e, 0xe5, 0x5d, 0xb3, 0x6a, 0x32, 0x99, - 0xf9, 0xeb, 0xb0, 0x70, 0xbf, 0xc8, 0x9f, 0xc6, 0xbd, 0x32, - 0xbf, 0x50, 0xcb, 0x32, 0x5c, 0x2c, 0xf0, 0x70, 0x96, 0x22, - 0x9d, 0xe4, 0xf5, 0xeb, 0xd7, 0x6f, 0xc0, 0xfa, 0x1c, 0x3e, - 0x12, 0x9b, 0xa4, 0x9c, 0xd6, 0xac, 0xf9, 0xa7, 0xc5, 0x1f, - 0xb3, 0xd6, 0xb7, 0xa2, 0x59, 0xc9, 0x75, 0xa7, 0xdc, 0xc7, - 0xab, 0xa4, 0x63, 0x2d, 0x14, 0x68, 0x52, 0x5c, 0x7b, 0x2e, - 0x48, 0x3f, 0x9e, 0x6b, 0xca, 0xd9, 0x4a, 0xb1, 0x56, 0x4, - 0x10, 0x70, 0x41, 0xea, 0x2b, 0xee, 0xaa, 0xf9, 0x77, 0xe3, - 0xd7, 0x85, 0xe2, 0xf0, 0xff, 00, 0x8d, 0x3e, 0xd3, 0x6c, - 0x81, 0x20, 0xd4, 0x63, 0xfb, 0x41, 0x51, 0xd0, 0x49, 0x92, - 0x1f, 0x1f, 0xa1, 0xfc, 0x6b, 0xc5, 0xcf, 0x32, 0x5a, 0x58, - 0x3a, 0x4b, 0x11, 0x87, 0xd1, 0x6c, 0xd6, 0xff, 00, 0x33, - 0x93, 0x17, 0x84, 0x8d, 0x28, 0xf3, 0xc3, 0x63, 0xcd, 0xa8, - 0xa2, 0x8a, 0xf8, 0x93, 0xc9, 0xa, 0xf5, 0xdf, 0xd9, 0xbf, - 0x5b, 0x7b, 0x5f, 0x14, 0xde, 0xe9, 0x85, 0xbf, 0x73, 0x77, - 0x6f, 0xe6, 0x5, 0xff, 00, 0x6d, 0xf, 0x1f, 0xa1, 0x6a, - 0xf2, 0x2a, 0xed, 0xbe, 0xc, 0x5d, 0x7d, 0x93, 0xe2, 0x5e, - 0x8a, 0x73, 0x80, 0xee, 0xf1, 0x9f, 0xc5, 0x18, 0xf, 0xd7, - 0x15, 0xea, 0x65, 0x75, 0x5d, 0x1c, 0x6d, 0x29, 0x2e, 0xe9, - 0x7d, 0xfa, 0x1d, 0x18, 0x79, 0x72, 0xd6, 0x8b, 0xf3, 0x3e, - 0xb5, 0xa2, 0x8a, 0x2b, 0xf6, 0xc3, 0xeb, 0x42, 0x8a, 0x28, - 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0xbe, 0x61, 0xfd, 0xa0, - 0xb5, 0xef, 0xed, 0x5f, 0x1d, 0x1b, 0x35, 0x6c, 0xc5, 0xa7, - 0xc2, 0xb1, 0x63, 0xfd, 0xb6, 0xf9, 0x9b, 0xf9, 0xa8, 0xfc, - 0x2b, 0xe9, 0xa9, 0xe7, 0x4b, 0x68, 0x24, 0x9a, 0x43, 0xb6, - 0x38, 0xd4, 0xbb, 0x13, 0xd8, 0x1, 0x93, 0x5f, 0x14, 0xf8, - 0x8f, 0x57, 0x6d, 0x7b, 0x5e, 0xd4, 0x35, 0x17, 0xce, 0x6e, - 0xa7, 0x79, 0x70, 0x7b, 0x2, 0x78, 0x1f, 0x96, 0x2b, 0xe3, - 0x38, 0x9f, 0x11, 0xc9, 0x86, 0x85, 0x15, 0xf6, 0x9f, 0xe0, - 0xbf, 0xe0, 0xd8, 0xf2, 0x73, 0x19, 0xda, 0xa, 0x1d, 0xcc, - 0xea, 0x28, 0xa2, 0xbf, 0x32, 0x3c, 00, 0xae, 0x8f, 0xe1, - 0xd6, 0x8c, 0x75, 0xff, 00, 0x1b, 0xe8, 0xd6, 0x7b, 0x77, - 0x23, 0x5c, 0x2b, 0xb8, 0xc7, 0xf0, 0x2f, 0xcc, 0xdf, 0xa0, - 0x35, 0xce, 0x57, 0xb0, 0x7e, 0xcd, 0x9a, 0x3f, 0xda, 0x7c, - 0x49, 0xa9, 0x6a, 0x2c, 0x32, 0xb6, 0xb6, 0xe2, 0x35, 0x3f, - 0xed, 0x39, 0xff, 00, 0x5, 0x3f, 0x9d, 0x7a, 0x59, 0x6d, - 0xf, 0xac, 0xe3, 0x29, 0xd2, 0xee, 0xff, 00, 0x5, 0xab, - 0x37, 0xa1, 0xf, 0x69, 0x56, 0x31, 0x3e, 0x8b, 0xa2, 0x8a, - 0x2b, 0xf6, 0xe3, 0xeb, 0x82, 0x8a, 0x28, 0xa0, 0x8, 0xee, - 0x26, 0x5b, 0x6b, 0x79, 0x65, 0x73, 0x84, 0x8d, 0x4b, 0x13, - 0xec, 0x6, 0x6b, 0xe2, 0x2d, 0x52, 0xf9, 0xf5, 0x3d, 0x4e, - 0xee, 0xf2, 0x43, 0x97, 0xb8, 0x95, 0xe5, 0x6f, 0xab, 0x12, - 0x7f, 0xad, 0x7d, 0x89, 0xe3, 0xa9, 0xda, 0xd7, 0xc1, 0x5a, - 0xf4, 0xa8, 0x70, 0xc9, 0x63, 0x31, 0x7, 0xdf, 0x61, 0xaf, - 0x8c, 0x6b, 0xf3, 0xce, 0x2a, 0xa8, 0xf9, 0xa9, 0x53, 0xf5, - 0x7f, 0x91, 0xe1, 0xe6, 0x52, 0xd6, 0x31, 0xa, 0x28, 0xa2, - 0xbe, 0x8, 0xf1, 0x82, 0xba, 0xbf, 0x85, 0x9a, 0x60, 0xd5, - 0xbe, 0x20, 0xe8, 0x70, 0x30, 0xca, 0x2d, 0xc0, 0x95, 0xbe, - 0x88, 0xb, 0x7f, 0xec, 0xb5, 0xca, 0x57, 0xa2, 0x7c, 0x4, - 0x50, 0x7e, 0x24, 0xd9, 0x13, 0xd4, 0x45, 0x29, 0x1f, 0xf7, - 0xc1, 0xaf, 0x43, 0x2f, 0x82, 0xa9, 0x8b, 0xa5, 0x17, 0xd6, - 0x4b, 0xf3, 0x36, 0xa2, 0xb9, 0xaa, 0xc5, 0x79, 0xa3, 0xea, - 0x7a, 0x28, 0xa2, 0xbf, 0x70, 0x3e, 0xbc, 0x28, 0xa2, 0x8a, - 00, 0x28, 0xa2, 0x8a, 00, 0x2b, 0x95, 0xf8, 0xa3, 0xaa, - 0xd, 0x1f, 0xe1, 0xfe, 0xb9, 0x71, 0x9c, 0x31, 0xb7, 0x68, - 0x97, 0xfd, 0xe7, 0xf9, 0x47, 0xf3, 0xae, 0xaa, 0xbc, 0x67, - 0xf6, 0x92, 0xf1, 0x1a, 0xdb, 0x68, 0xb6, 0x1a, 0x2a, 0x37, - 0xef, 0x6e, 0xa4, 0xf3, 0xe4, 0x1e, 0x88, 0xbd, 0x3f, 0x36, - 0x3f, 0xf8, 0xed, 0x79, 0x99, 0x9d, 0x75, 0x86, 0xc1, 0xd4, - 0xa8, 0xfb, 0x69, 0xea, 0xf4, 0x47, 0x3e, 0x22, 0x7e, 0xce, - 0x94, 0xa4, 0x7c, 0xf5, 0x45, 0x14, 0x57, 0xe2, 0x47, 0xc9, - 0x5, 0x14, 0x51, 0x40, 0x1d, 0x6f, 0xc2, 0x7b, 0x3f, 0xb7, - 0x7c, 0x45, 0xd0, 0xa3, 0xc6, 0x42, 0xdc, 0x9, 0xf, 0xfc, - 0x4, 0x16, 0xfe, 0x95, 0xf5, 0xf5, 0x7c, 0xe3, 0xfb, 0x37, - 0xe8, 0x7f, 0x6c, 0xf1, 0x45, 0xee, 0xa6, 0xcb, 0x94, 0xb2, - 0x83, 0x62, 0x9f, 0xf6, 0xdc, 0xe3, 0xf9, 0x6, 0xfc, 0xeb, - 0xe8, 0xea, 0xfd, 0x4f, 0x86, 0x68, 0xba, 0x78, 0x27, 0x37, - 0xf6, 0x9b, 0x7f, 0x76, 0x87, 0xd1, 0x65, 0xf1, 0xb5, 0x2b, - 0xf7, 0x61, 0x5e, 0x6b, 0xf1, 0x7f, 0xe1, 0x58, 0xf1, 0xbd, - 0xa2, 0xdf, 0xd8, 0x5, 0x8f, 0x58, 0xb7, 0x42, 00, 0x3c, - 0x9, 0xd7, 0xfb, 0xa4, 0xfa, 0xfa, 0x1f, 0xc3, 0xe9, 0xe9, - 0x54, 0x57, 0xd1, 0xe2, 0x70, 0xd4, 0xf1, 0x74, 0x9d, 0x1a, - 0xaa, 0xe9, 0x9d, 0xf5, 0x29, 0xc6, 0xac, 0x5c, 0x65, 0xb1, - 0xf0, 0xdd, 0xed, 0x8d, 0xc6, 0x9b, 0x75, 0x25, 0xb5, 0xd4, - 0x32, 0x5b, 0xdc, 0x46, 0x76, 0xbc, 0x52, 0x2e, 0xd6, 0x53, - 0xee, 0x2a, 0xa, 0xfb, 0x17, 0xc6, 0x3f, 0xf, 0x34, 0x4f, - 0x1c, 0x42, 0xa3, 0x52, 0xb6, 0xfd, 0xfa, 0xc, 0x25, 0xcc, - 0x47, 0x6c, 0x8b, 0xf8, 0xf7, 0x1e, 0xc7, 0x22, 0xbc, 0x3f, - 0xc5, 0x3f, 0xb3, 0xde, 0xbb, 0xa4, 0x34, 0x92, 0xe9, 0x4f, - 0x1e, 0xaf, 0x6a, 0x39, 0xa, 0xe, 0xc9, 0x80, 0xff, 00, - 0x74, 0xf0, 0x7f, 0x3, 0xf8, 0x57, 0xe6, 0x38, 0xee, 0x1f, - 0xc5, 0x61, 0x5b, 0x95, 0x25, 0xcf, 0x1f, 0x2d, 0xfe, 0x6b, - 0xfc, 0x8f, 0x9e, 0xad, 0x82, 0xa9, 0x4f, 0x58, 0xea, 0x8f, - 0x2a, 0xa2, 0xac, 0x5f, 0x69, 0xf7, 0x5a, 0x65, 0xc3, 0x41, - 0x79, 0x6f, 0x2d, 0xac, 0xcb, 0xd6, 0x39, 0x90, 0xab, 0xf, - 0xc0, 0xd5, 0x7a, 0xf9, 0x86, 0x9c, 0x5d, 0x99, 0xe7, 0xec, - 0x14, 0x51, 0x45, 0x20, 0xa, 0x28, 0xa2, 0x80, 0x25, 0xb5, - 0xbb, 0x9e, 0xc6, 0x75, 0x9a, 0xda, 0x69, 0x2d, 0xe6, 0x5e, - 0x56, 0x48, 0x9c, 0xab, 0xf, 0xa1, 0x15, 0xe9, 0x5e, 0x11, - 0xf8, 0xfb, 0xaf, 0x68, 0x6e, 0x91, 0x6a, 0x64, 0x6b, 0x36, - 0x9d, 0xf, 0x98, 0x42, 0xca, 0xbf, 0x46, 0xc7, 0x3f, 0x8e, - 0x7e, 0xb5, 0xe6, 0x14, 0x57, 0x66, 0x1b, 0x19, 0x5f, 0x9, - 0x2e, 0x6a, 0x13, 0x6b, 0xf2, 0xfb, 0xb6, 0x35, 0xa7, 0x56, - 0x74, 0x9d, 0xe0, 0xec, 0x7d, 0x8f, 0xe0, 0xdf, 0x1f, 0xe8, - 0xfe, 0x38, 0xb4, 0xf3, 0x74, 0xeb, 0x8f, 0xdf, 0x28, 0xfd, - 0xe5, 0xb4, 0xbf, 0x2c, 0xa9, 0xf5, 0x1d, 0xc7, 0xb8, 0xe2, - 0xba, 0x4a, 0xf8, 0x7b, 0x4b, 0xd5, 0x2e, 0xf4, 0x5d, 0x42, - 0xb, 0xdb, 0x19, 0xda, 0xde, 0xea, 0x16, 0xdc, 0x92, 0x27, - 0x50, 0x7f, 0xcf, 0x6a, 0xfa, 0xa3, 0xe1, 0x4f, 0xc4, 0x88, - 0xbc, 0x7d, 0xa3, 0x91, 0x36, 0x23, 0xd5, 0x6d, 0x80, 0x17, - 0x31, 0x81, 0x85, 0x6c, 0xf4, 0x75, 0xf6, 0x38, 0xfc, 0xf, - 0xe1, 0x5f, 0xa4, 0xe5, 0x19, 0xdc, 0x71, 0xcf, 0xd8, 0xd6, - 0x56, 0x9f, 0xe0, 0xff, 00, 0xe0, 0xf9, 0x1e, 0xf6, 0x17, - 0x16, 0xab, 0x7b, 0x93, 0xd1, 0xfe, 0x67, 0x73, 0x45, 0x14, - 0x57, 0xd5, 0x9e, 0x90, 0x51, 0x45, 0x14, 00, 0x57, 0xcc, - 0xff, 00, 0xb4, 0xf5, 0xdf, 0xef, 0xd9, 0x33, 0xd1, 0x71, - 0x5f, 0x4c, 0x57, 0xc9, 0xbf, 0xb4, 0xbd, 0xd1, 0x7d, 0x52, - 0x55, 0xcf, 0xf1, 0x1a, 0xf9, 0xdc, 0xf6, 0x56, 0xc1, 0xb5, - 0xdc, 0xf1, 0xb3, 0x69, 0x72, 0xe1, 0x64, 0x7c, 0xdf, 0xac, - 0x36, 0xdb, 0x77, 0x3e, 0xd5, 0x4f, 0xf6, 0x27, 0xb6, 0xfe, - 0xd1, 0xfd, 0xb2, 0xf4, 0xc7, 0x20, 0x37, 0xd9, 0x34, 0xab, - 0xe9, 0xf9, 0xed, 0x95, 0x54, 0xcf, 0xfe, 0x3f, 0x53, 0x78, - 0x81, 0xf6, 0xd9, 0xc8, 0x7f, 0xd9, 0x35, 0x77, 0xfe, 0x9, - 0xe7, 0x69, 0xf6, 0xef, 0xda, 0xbb, 0x5c, 0xb9, 0xea, 0x2d, - 0x3c, 0x3b, 0x3f, 0xe6, 0xd3, 0xc2, 0x3f, 0xa1, 0xaf, 0x27, - 0x23, 0x8e, 0xb7, 0x3f, 0x34, 0xc8, 0x23, 0xcf, 0x9b, 0xa7, - 0xd9, 0x33, 0xf4, 0xee, 0x8a, 0x28, 0xaf, 0xb8, 0x3f, 0x64, - 0xa, 0x28, 0xa2, 0x80, 0x23, 0xb9, 0xb8, 0x8e, 0xd2, 0xde, - 0x59, 0xe5, 0x60, 0x91, 0x44, 0xa5, 0xdd, 0x8f, 0x40, 00, - 0xc9, 0x35, 0xf9, 0xe1, 0xe3, 0xcf, 0x13, 0xc9, 0xe3, 0x3f, - 0x19, 0xea, 0xfa, 0xcb, 0x9c, 0x8b, 0xbb, 0x86, 0x68, 0xfd, - 0xa3, 0x1c, 0x20, 0xff, 00, 0xbe, 0x40, 0xaf, 0xaf, 0x3f, - 0x69, 0x7f, 0x18, 0x9f, 0xa, 0x7c, 0x33, 0xbb, 0x82, 0x17, - 0xdb, 0x77, 0xaa, 0xb7, 0xd8, 0xa3, 0xf5, 0xda, 0xc0, 0x97, - 0x3f, 0xf7, 0xc8, 0x3f, 0x98, 0xaf, 0x8d, 0x7c, 0x3d, 0xa5, - 0x3e, 0xb3, 0xac, 0xd9, 0xd9, 0x46, 0x9, 0x69, 0xa4, 0x54, - 00, 0x7b, 0x9a, 0xf8, 0x7e, 0x20, 0xc4, 0x39, 0x4e, 0x18, - 0x78, 0xf4, 0xd7, 0xe6, 0xf6, 0x3e, 0xb, 0x88, 0x6b, 0xba, - 0xb5, 0xa9, 0xe1, 0x21, 0xd3, 0x57, 0xea, 0xf6, 0xfe, 0xbc, - 0xcf, 0xab, 0x3f, 0x65, 0x6f, 0x8, 0x7f, 0x65, 0x78, 0x5a, - 0x6d, 0x5e, 0x58, 0xf6, 0xcd, 0x76, 0xc5, 0x54, 0x91, 0xfc, - 0x22, 0xbd, 0xd6, 0xb2, 0xbc, 0x2d, 0xa2, 0xc7, 0xe1, 0xef, - 0xf, 0xd8, 0xe9, 0xf1, 0x28, 0x55, 0x82, 0x20, 0xbc, 0xe, - 0xfd, 0xeb, 0x56, 0xbe, 0xab, 0x5, 0x87, 0x58, 0x5c, 0x3c, - 0x29, 0x76, 0x5f, 0x8f, 0x53, 0xec, 0xb0, 0x94, 0x16, 0x1e, - 0x84, 0x69, 0x2e, 0x88, 0x28, 0xa2, 0x8a, 0xee, 0x3a, 0xc2, - 0x8a, 0x28, 0xa0, 0xf, 0xcb, 0xbf, 0xf8, 0x2d, 0x1f, 0xc6, - 0x4b, 0xfb, 0x3b, 0x6f, 0x5, 0xfc, 0x31, 0xb3, 0x73, 0x15, - 0x8d, 0xea, 0x36, 0xb5, 0xa8, 0x60, 0x90, 0x65, 0xda, 0xc6, - 0x38, 0x50, 0xf6, 0x20, 0x1d, 0xed, 0xf5, 0xb, 0xe9, 0x5f, - 0x9b, 0x5f, 0xb, 0x34, 0xfd, 0x7b, 0xc5, 0x3e, 0x3e, 0xf0, - 0xe7, 0x86, 0xb4, 0x3d, 0x52, 0xf3, 0x4f, 0xbc, 0xd5, 0xf5, - 0x8, 0x2c, 0x22, 0x92, 0xda, 0x77, 0x8f, 0x61, 0x92, 0x40, - 0x9b, 0xbe, 0x52, 0x3a, 0x67, 0x3f, 0x85, 0x7e, 0x9a, 0xff, - 00, 0xc1, 0x49, 0xec, 0xfe, 0xd, 0xfe, 0xd2, 0xba, 0x1d, - 0xa6, 0xa7, 0xe1, 0xbf, 0x8a, 0xfe, 0x12, 0xb7, 0xf8, 0x87, - 0xe1, 0x7f, 0x36, 0xd9, 0x74, 0xfb, 0xbd, 0x52, 0x28, 0x56, - 0xee, 0x2d, 0xdf, 0x3c, 0x5, 0x98, 0x80, 0xae, 0xac, 0x9, - 0x5c, 0x9c, 0x64, 0xb0, 0x38, 0xce, 0x47, 0xe5, 0xa7, 0x85, - 0xfc, 0x47, 0xa8, 0x78, 0xb, 0xc5, 0xfa, 0x56, 0xb9, 0xa6, - 0xca, 0xb1, 0xea, 0x9a, 0x3d, 0xec, 0x77, 0x70, 0x48, 0xac, - 0x1d, 0x44, 0x91, 0x38, 0x65, 0xe4, 0x1c, 0x30, 0xca, 0xf6, - 0x38, 0x22, 0xa9, 0x10, 0xf7, 0x3f, 0xa6, 0x8f, 0x9, 0x78, - 0x6a, 0xd7, 0xc1, 0xde, 0x17, 0xd2, 0xb4, 0x2b, 0x22, 0xe6, - 0xd7, 0x4e, 0xb6, 0x8e, 0xd6, 0x36, 0x91, 0x8b, 0x3b, 0x4, - 0x50, 0x37, 0x31, 0x3c, 0x92, 0x71, 0x92, 0x4f, 0x52, 0x6b, - 0x5e, 0xbe, 0x30, 0xf8, 0x1b, 0xff, 00, 0x5, 0x54, 0xf8, - 0x37, 0xf1, 0x2b, 0x43, 0xb4, 0x5f, 0x15, 0xea, 0xa7, 0xc0, - 0x3e, 0x22, 0xd8, 0x5, 0xc5, 0xa6, 0xa6, 0x8c, 0xd6, 0xc5, - 0xf1, 0xc9, 0x8e, 0x75, 0x5, 0x76, 0xfa, 0x6e, 0xda, 0x7d, - 0xab, 0xd9, 0xad, 0x7f, 0x6d, 0x3f, 0x80, 0xf7, 0x87, 0x11, - 0xfc, 0x5b, 0xf0, 0x88, 0x3f, 0xf4, 0xd3, 0x55, 0x89, 0x3f, - 0xf4, 0x22, 0x2a, 0x4b, 0x3d, 0xa6, 0x8a, 0xf3, 0x1d, 0x3f, - 0xf6, 0xa0, 0xf8, 0x3d, 0xab, 0x48, 0x12, 0xcb, 0xe2, 0x97, - 0x83, 0xee, 0x9c, 0xf4, 0x58, 0xb5, 0xcb, 0x66, 0x3f, 0xfa, - 0x1d, 0x77, 0x7a, 0xf, 0x89, 0xb4, 0x8f, 0x14, 0xda, 0x35, - 0xd6, 0x8d, 0xaa, 0xd9, 0x6a, 0xd6, 0xaa, 0xdb, 0xc, 0xd6, - 0x37, 0x9, 0x32, 0x6, 0xc6, 0x70, 0x4a, 0x92, 0x33, 0x82, - 0x3f, 0x3a, 00, 0xd3, 0xaf, 0x36, 0xf8, 0xf9, 0xe2, 0x1f, - 0xec, 0x6f, 0x2, 0x4b, 0x6b, 0x1c, 0x9b, 0x27, 0xd4, 0x24, - 0x10, 00, 0xf, 0x3b, 0x3a, 0xbf, 0xe8, 0x31, 0xff, 00, - 0x2, 0xaf, 0x49, 0xaf, 0x98, 0xff, 00, 0x68, 0x3f, 0x10, - 0x7f, 0x6a, 0xf8, 0xdf, 0xec, 0x28, 0xfb, 0xa0, 0xd3, 0xe2, - 0x11, 0xe0, 0x74, 0xde, 0xdf, 0x33, 0x7f, 0xec, 0xa3, 0xf0, - 0xaf, 0x3, 0x3c, 0xc5, 0x7d, 0x57, 0x3, 0x36, 0xb7, 0x96, - 0x8b, 0xe7, 0xff, 00, 0x2, 0xe7, 0x16, 0x32, 0xa7, 0xb3, - 0xa2, 0xfc, 0xf4, 0x3c, 0xc2, 0x8a, 0x28, 0xaf, 0xc7, 0x8f, - 0x97, 0xa, 0xb7, 0xa4, 0xe9, 0xb3, 0x6b, 0x3a, 0xa5, 0xa5, - 0x8c, 00, 0xb4, 0xd7, 0x32, 0xac, 0x4a, 00, 0xee, 0x4e, - 0x2a, 0xa5, 0x7a, 0x8f, 0xec, 0xf3, 0xa0, 0x1d, 0x4f, 0xc6, - 0xad, 0x7e, 0xe9, 0x98, 0x74, 0xf8, 0x4b, 0xee, 0x23, 0x8f, - 0x31, 0xbe, 0x55, 0x1f, 0x96, 0xe3, 0xf8, 0x57, 0x6e, 0xb, - 0xe, 0xf1, 0x58, 0x98, 0x51, 0x5d, 0x5f, 0xe1, 0xd7, 0xf0, - 0x35, 0xa5, 0xf, 0x69, 0x35, 0xe, 0xe7, 0xd2, 0x3a, 0x75, - 0x8c, 0x7a, 0x66, 0x9f, 0x6d, 0x69, 0x8, 0xdb, 0x14, 0x11, - 0xac, 0x48, 0x3d, 0x80, 0xc0, 0xfe, 0x55, 0x66, 0x8a, 0x2b, - 0xf7, 0x24, 0x94, 0x55, 0x91, 0xf6, 0x9, 0x5b, 0x40, 0xaf, - 0x11, 0xfd, 0xa6, 0xec, 0x43, 0x58, 0x68, 0x57, 0x9d, 0xd2, - 0x59, 0x62, 0x3f, 0xf0, 0x20, 0xf, 0xfe, 0xcb, 0x5e, 0xdd, - 0x5e, 0x4f, 0xfb, 0x48, 0xc3, 0xe6, 0x78, 0x26, 0xce, 0x4c, - 0x7f, 0xab, 0xbe, 0x43, 0xf9, 0xa3, 0x8a, 0xf1, 0xb3, 0xa8, - 0x73, 0xe5, 0xf5, 0x57, 0x95, 0xfe, 0xe7, 0x73, 0x93, 0x16, - 0xaf, 0x42, 0x47, 0xcd, 0x94, 0x51, 0x45, 0x7e, 0x32, 0x7c, - 0xa8, 0x56, 0xc7, 0x83, 0x6f, 0x8e, 0x9b, 0xe2, 0xdd, 0x1a, - 0xe8, 0x1c, 0x79, 0x57, 0x71, 0x31, 0x3e, 0xdb, 0x86, 0x7f, - 0x4a, 0xc7, 0xa7, 0x47, 0x21, 0x86, 0x45, 0x91, 0x7e, 0xf2, - 0x90, 0xc3, 0xf0, 0xad, 0x29, 0xcf, 0xd9, 0xce, 0x33, 0x5d, - 0x1d, 0xc7, 0x17, 0x66, 0x99, 0xf7, 0x4d, 0x15, 0x5b, 0x4c, - 0xb9, 0x17, 0xba, 0x75, 0xad, 0xc0, 0xe9, 0x2c, 0x49, 0x20, - 0xfc, 0x40, 0x35, 0x66, 0xbf, 0x7b, 0x4e, 0xe9, 0x34, 0x7d, - 0x9a, 0xd4, 0x28, 0xa2, 0x8a, 0x63, 0xa, 0x28, 0xa2, 0x80, - 0x38, 0xbf, 0x8c, 0x3a, 0xc8, 0xd1, 0x3e, 0x1e, 0x6a, 0xd2, - 0x6, 0xdb, 0x24, 0xf1, 0xfd, 0x99, 0x30, 0x79, 0x25, 0xce, - 0xe, 0x3f, 0xc, 0x9f, 0xc2, 0xbe, 0x48, 0xaf, 0x75, 0xfd, - 0xa6, 0x35, 0xa3, 0x9d, 0x1f, 0x49, 0x46, 0xf9, 0x7e, 0x7b, - 0x99, 0x14, 0x7f, 0xdf, 0x2b, 0xff, 00, 0xb3, 0x57, 0x85, - 0x57, 0xe5, 0x1c, 0x47, 0x88, 0xf6, 0xd8, 0xde, 0x45, 0xb4, - 0x12, 0x5f, 0xaf, 0xea, 0x7c, 0xde, 0x3e, 0x7c, 0xd5, 0xad, - 0xd8, 0x28, 0xa2, 0x8a, 0xf9, 0x63, 0xce, 0xa, 0xfa, 0x7b, - 0xf6, 0x7d, 0xd0, 0xff, 00, 0xb2, 0xfc, 0x8, 0x2e, 0xd9, - 0x71, 0x2d, 0xfc, 0xcd, 0x2e, 0x48, 0xe7, 0x68, 0xf9, 0x57, - 0xf9, 0x13, 0xf8, 0xd7, 0xcc, 0x71, 0x44, 0xd3, 0x4a, 0x91, - 0xa0, 0x2c, 0xee, 0x42, 0xa8, 0x1d, 0xc9, 0xe9, 0x5f, 0x6b, - 0x78, 0x67, 0x49, 0x5d, 0xb, 0xc3, 0xda, 0x6e, 0x9c, 0xbf, - 0xf2, 0xed, 0x6e, 0x91, 0x1f, 0x72, 0x14, 0x64, 0xfe, 0x75, - 0xf6, 0x9c, 0x2f, 0x43, 0x9f, 0x11, 0x3a, 0xcf, 0xec, 0xaf, - 0xc5, 0xff, 00, 0xc0, 0x3d, 0x5c, 0xbe, 0x17, 0xa8, 0xe5, - 0xd8, 0xd3, 0xa2, 0x8a, 0x2b, 0xf4, 0xc3, 0xe8, 0x2, 0x8a, - 0x28, 0xa0, 0xc, 0x3f, 0x1c, 0xdb, 0xb5, 0xd7, 0x82, 0xf5, - 0xd8, 0x50, 0x65, 0xde, 0xc6, 0x65, 00, 0x7a, 0xec, 0x35, - 0xf1, 0x87, 0x5a, 0xfb, 0xa2, 0x58, 0x96, 0x78, 0x9e, 0x37, - 0x19, 0x47, 0x52, 0xa4, 0x1e, 0xe0, 0xd7, 0xc4, 0xfe, 0x21, - 0xd2, 0x5f, 0x42, 0xd7, 0x75, 0xd, 0x3a, 0x40, 0x77, 0x5b, - 0x4e, 0xf1, 0x73, 0xdc, 0x3, 0xc1, 0xfc, 0x46, 0xd, 0x7e, - 0x7d, 0xc5, 0x54, 0x9d, 0xe9, 0x55, 0xe9, 0xaa, 0xfd, 0x4f, - 0x13, 0x32, 0x8e, 0xb1, 0x91, 0x9f, 0x45, 0x14, 0x57, 0xc0, - 0x1e, 0x28, 0x57, 0x5f, 0xf0, 0x97, 0x55, 0x5d, 0x1f, 0xe2, - 0x1e, 0x8b, 0x33, 0x9c, 0x23, 0xcd, 0xe4, 0x31, 0x3f, 0xed, - 0x82, 0xa3, 0xf5, 0x22, 0xb9, 0xa, 0x74, 0x52, 0xbc, 0x32, - 0xa4, 0x91, 0xb1, 0x57, 0x42, 0x19, 0x58, 0x75, 0x4, 0x74, - 0x35, 0xbd, 0xa, 0xae, 0x85, 0x58, 0x55, 0x5f, 0x65, 0xa7, - 0xf7, 0x15, 0x9, 0x72, 0x49, 0x4b, 0xb1, 0xf7, 0x4d, 0x15, - 0xcb, 0x7c, 0x38, 0xf1, 0xb4, 0x1e, 0x39, 0xf0, 0xcd, 0xbd, - 0xea, 0xb2, 0xad, 0xda, 0xf, 0x2e, 0xe6, 0x10, 0x79, 0x47, - 0x1f, 0xd0, 0xf5, 0x1f, 0x5a, 0xea, 0x6b, 0xf7, 0x3a, 0x35, - 0x61, 0x5e, 0x9c, 0x6a, 0xd3, 0x77, 0x4f, 0x53, 0xec, 0x63, - 0x25, 0x38, 0xa9, 0x47, 0x66, 0x14, 0x51, 0x45, 0x6c, 0x50, - 0x51, 0x45, 0x23, 0x30, 0x45, 0x2c, 0xc4, 0x2a, 0x81, 0x92, - 0x4f, 0x41, 0x40, 0x11, 0xdd, 0x5d, 0x45, 0x63, 0x6d, 0x2d, - 0xc4, 0xf2, 0x2c, 0x50, 0x44, 0x85, 0xdd, 0xd8, 0xe0, 0x2a, - 0x81, 0x92, 0x4d, 0x7c, 0x79, 0xf1, 0x7, 0xc5, 0xaf, 0xe3, - 0x5f, 0x15, 0x5e, 0x6a, 0x64, 0x15, 0x85, 0x8f, 0x97, 0x2, - 0x1f, 0xe1, 0x8d, 0x78, 0x5f, 0xcf, 0xaf, 0xd4, 0x9a, 0xef, - 0xfe, 0x36, 0x7c, 0x58, 0x4d, 0x74, 0xbe, 0x83, 0xa3, 0xcd, - 0xba, 0xc1, 0x1b, 0xfd, 0x22, 0xe5, 0x1b, 0x89, 0x88, 0xfe, - 0x11, 0xfe, 0xc8, 0xf5, 0xee, 0x7d, 0xba, 0xf8, 0xed, 0x7e, - 0x63, 0xc4, 0x39, 0x9c, 0x71, 0x33, 0x58, 0x6a, 0x2e, 0xf1, - 0x8e, 0xef, 0xbb, 0xff, 00, 0x80, 0x7c, 0xf6, 0x3b, 0x10, - 0xaa, 0x3f, 0x67, 0x1d, 0x90, 0x51, 0x45, 0x15, 0xf1, 0xa7, - 0x96, 0x14, 0x51, 0x5d, 0x67, 0xc3, 0x2f, 0x6, 0x3f, 0x8d, - 0xfc, 0x57, 0x6d, 0x66, 0xca, 0xdf, 0x63, 0x8f, 0xf7, 0xd7, - 0x2e, 0x7, 0x44, 0x1d, 0xbf, 0x13, 0x81, 0xf8, 0xfb, 0x56, - 0xd4, 0x68, 0xcf, 0x11, 0x52, 0x34, 0xa9, 0xad, 0x5b, 0xb1, - 0x51, 0x8b, 0x9c, 0x94, 0x56, 0xec, 0xf7, 0xbf, 0x81, 0x7e, - 0x17, 0x6f, 0xe, 0xf8, 0x1e, 0x19, 0xa6, 0x5d, 0xb7, 0x3a, - 0x83, 0x7d, 0xa9, 0x81, 0x1c, 0x85, 0x20, 0x4, 0x1f, 0x90, - 0xcf, 0xe3, 0x5e, 0x89, 0x4d, 0x8e, 0x35, 0x8a, 0x35, 0x44, - 0x50, 0xa8, 0xa0, 0x28, 0x51, 0xd0, 0xa, 0x75, 0x7e, 0xe3, - 0x86, 0xa1, 0x1c, 0x2d, 0x18, 0x51, 0x8e, 0xd1, 0x56, 0x3e, - 0xbe, 0x9c, 0x15, 0x38, 0x28, 0x2e, 0x81, 0x45, 0x14, 0x57, - 0x49, 0xa0, 0x51, 0x45, 0x14, 0x1, 0x53, 0x51, 0xd2, 0x2c, - 0x75, 0x78, 0x4c, 0x37, 0xd6, 0x70, 0x5e, 0x44, 0x7a, 0xa4, - 0xf1, 0x87, 0x1f, 0xad, 0x79, 0xf6, 0xbf, 0xfb, 0x3f, 0xf8, - 0x63, 0x57, 0x2d, 0x25, 0xa2, 0xcf, 0xa5, 0x4a, 0x7f, 0xe7, - 0xdd, 0xf2, 0x99, 0xff, 00, 0x75, 0xb3, 0xfa, 0x11, 0x5e, - 0x99, 0x45, 0x72, 0x57, 0xc1, 0xe1, 0xf1, 0x2a, 0xd5, 0xa0, - 0xa5, 0xfd, 0x77, 0x32, 0x9d, 0x28, 0x54, 0xf8, 0xd5, 0xcf, - 0x9b, 0x3c, 0x45, 0xfb, 0x3a, 0xeb, 0xba, 0x68, 0x69, 0x34, - 0xbb, 0x88, 0x75, 0x58, 0x87, 0x44, 0xff, 00, 0x55, 0x26, - 0x3e, 0x84, 0xe0, 0xfe, 0x75, 0xe6, 0xba, 0xb6, 0x87, 0xa8, - 0x68, 0x37, 0x3f, 0x67, 0xd4, 0x6c, 0xa7, 0xb2, 0x9b, 0xfb, - 0xb3, 0x21, 0x5c, 0xfd, 0x3d, 0x7f, 0xa, 0xfb, 0x76, 0xa9, - 0xea, 0x9a, 0x45, 0x96, 0xb7, 0x68, 0xf6, 0xb7, 0xf6, 0xb1, - 0x5d, 0xdb, 0xb7, 0x58, 0xe5, 0x50, 0xc3, 0xff, 00, 0xad, - 0x5f, 0x2f, 0x8a, 0xe1, 0x8c, 0x3d, 0x4b, 0xbc, 0x3c, 0x9c, - 0x5f, 0x6d, 0xd7, 0xf9, 0x9e, 0x75, 0x4c, 0xbe, 0x12, 0xd6, - 0xe, 0xc7, 0xc4, 0x14, 0x57, 0xa5, 0x7c, 0x60, 0xf8, 0x56, - 0xbe, 0x5, 0xb8, 0x8a, 0xfb, 0x4f, 0x2f, 0x26, 0x93, 0x72, - 0xe5, 0x70, 0xfc, 0x98, 0x5f, 0xa8, 0x5c, 0xf7, 0x4, 0x67, - 0x7, 0xda, 0xbc, 0xd6, 0xbf, 0x3c, 0xc5, 0x61, 0xaa, 0xe0, - 0xea, 0xba, 0x35, 0x55, 0x9a, 0x3c, 0x4a, 0x94, 0xe5, 0x4a, - 0x4e, 0x32, 0xdc, 0x28, 0xa2, 0x8a, 0xe5, 0x33, 0xa, 0xea, - 0x7e, 0x19, 0x78, 0x96, 0x5f, 0xb, 0x78, 0xd3, 0x4d, 0xba, - 0x46, 0x22, 0x19, 0x25, 0x10, 0x4e, 0xb9, 0xe1, 0xa3, 0x62, - 0x1, 0xcf, 0xd3, 0x83, 0xf8, 0x57, 0x2d, 0x4a, 0xac, 0x55, - 0x81, 0x7, 0x4, 0x1c, 0x82, 0x2b, 0x6a, 0x35, 0x65, 0x42, - 0xac, 0x6a, 0xc7, 0x74, 0xee, 0x54, 0x24, 0xe1, 0x25, 0x25, - 0xd0, 0xfb, 0xaa, 0x8a, 0x82, 0xc5, 0xda, 0x5b, 0x2b, 0x77, - 0x6e, 0x19, 0xa3, 0x52, 0x7e, 0xb8, 0xa9, 0xeb, 0xf7, 0x94, - 0xee, 0xae, 0x7d, 0x9a, 0xd4, 0x28, 0xa2, 0x8a, 0x60, 0x21, - 0x38, 0x15, 0xf1, 0xaf, 0xed, 0xf, 0x77, 0xe7, 0x6b, 0xb2, - 0x8f, 0x57, 0x3f, 0xce, 0xbe, 0xc8, 0x94, 0xed, 0x89, 0xcf, - 0xa2, 0x93, 0x5f, 0x10, 0x7c, 0x73, 0xb9, 0xf3, 0xbc, 0x45, - 0x2f, 0xfb, 0xed, 0xfc, 0xeb, 0xe5, 0x78, 0x86, 0x56, 0xc3, - 0xc6, 0x3d, 0xd9, 0xf3, 0xb9, 0xec, 0xb9, 0x70, 0xac, 0xf1, - 0x1f, 0x14, 0xc9, 0xb2, 0xc2, 0x6f, 0xf7, 0x4d, 0x76, 0x9f, - 0xf0, 0x4c, 0x9d, 0x3c, 0x5d, 0x7c, 0x65, 0xf8, 0x91, 0xa9, - 0x11, 0x9f, 0xb3, 0xe9, 0x96, 0xd6, 0xe1, 0xb1, 0xfd, 0xf9, - 0x59, 0x8f, 0xfe, 0x81, 0x5c, 0xf, 0x8d, 0x25, 0xd9, 0xa6, - 0x4d, 0xf4, 0x35, 0xeb, 0xff, 00, 0xf0, 0x4b, 0x2b, 0xd, - 0xf7, 0x3f, 0x15, 0x35, 0x22, 0x3e, 0xfd, 0xcd, 0x95, 0xba, - 0x9f, 0xf7, 0x52, 0x46, 0x3f, 0xfa, 0x10, 0xac, 0x72, 0x38, - 0xe9, 0x73, 0xe1, 0xb8, 0x5e, 0x3c, 0xd9, 0x95, 0x49, 0x76, - 0x47, 0xdf, 0x74, 0x51, 0x45, 0x7d, 0x81, 0xfa, 0xd8, 0x51, - 0x45, 0x66, 0x78, 0x9b, 0x5d, 0x83, 0xc3, 0x1e, 0x1e, 0xd4, - 0x75, 0x6b, 0x93, 0x88, 0x6c, 0xe0, 0x79, 0xd8, 0x67, 0x19, - 0xda, 0x33, 0x8f, 0xa9, 0xe9, 0x4a, 0x4d, 0x45, 0x36, 0xfa, - 0x13, 0x29, 0x28, 0xa7, 0x27, 0xb2, 0x3e, 0x49, 0xfd, 0xaa, - 0xfc, 0x62, 0xda, 0xef, 0xc4, 0x25, 0xd1, 0xe3, 0x72, 0x6d, - 0x34, 0x88, 0x82, 0x15, 0xc8, 0x20, 0xca, 0xe0, 0x33, 0x1f, - 0xcb, 0x68, 0xfc, 0xd, 0x27, 0xec, 0xc1, 0xe1, 0xf, 0xed, - 0xcf, 0x1b, 0xad, 0xfc, 0xd1, 0xee, 0xb7, 0xb2, 0x52, 0xf9, - 0x23, 0x8d, 0xdd, 0xab, 0xc8, 0xf5, 0x6d, 0x52, 0xe3, 0x5e, - 0xd5, 0xef, 0x35, 0x1b, 0xa7, 0x32, 0x5c, 0xdd, 0xcc, 0xd3, - 0x48, 0xc7, 0xd5, 0x8e, 0x6b, 0xec, 0x9f, 0xd9, 0xaf, 0xc2, - 0x3f, 0xf0, 0x8f, 0x78, 0x12, 0x3b, 0xb9, 0x13, 0x6d, 0xc5, - 0xe3, 0x17, 0x39, 0xfe, 0xef, 0x6a, 0xfc, 0xef, 0x8, 0x9e, - 0x63, 0x99, 0x7b, 0x49, 0x6d, 0x7b, 0xfc, 0x96, 0xdf, 0xa1, - 0xf9, 0xd6, 0x5c, 0x9e, 0x63, 0x99, 0x4b, 0x11, 0x2d, 0x93, - 0xbf, 0xf9, 0x1e, 0xbb, 0x45, 0x14, 0x57, 0xe8, 0xa7, 0xe8, - 0xe1, 0x45, 0x79, 0xef, 0xed, 0x1, 0xf1, 0x6a, 0xcb, 0xe0, - 0x67, 0xc1, 0xbf, 0x15, 0xf8, 0xde, 0xf9, 0x94, 0x2e, 0x93, - 0x62, 0xf2, 0xc2, 0x8d, 0xd2, 0x59, 0xc8, 0xdb, 0xa, 0x7f, - 0xc0, 0x9c, 0xa8, 0xfc, 0x6b, 0xf2, 0x66, 0xc3, 0xfe, 0xb, - 0x29, 0xf1, 0xba, 0xdd, 0x97, 0xed, 0x5a, 0x2f, 0x83, 0xae, - 0xd0, 0x75, 0x2, 0xc2, 0xe2, 0x32, 0x7f, 0x11, 0x39, 0xfe, - 0x54, 0xa, 0xf6, 0x3f, 0x6a, 0x2b, 0xc7, 0x7f, 0x6b, 0xaf, - 0x8c, 0xf0, 0x7c, 0x4, 0xfd, 0x9e, 0xbc, 0x63, 0xe2, 0xe7, - 0x90, 0x2d, 0xe4, 0x36, 0x8d, 0x6d, 0x60, 0xb9, 0xc1, 0x7b, - 0xa9, 0x7f, 0x77, 0x10, 0x1f, 0x46, 0x6d, 0xc7, 0xd9, 0x4d, - 0x5f, 0xfd, 0x98, 0xbe, 0x21, 0x78, 0xaf, 0xe2, 0xc7, 0xc1, - 0x1f, 0xc, 0xf8, 0xc3, 0xc6, 0x5a, 0x5d, 0x96, 0x8b, 0xac, - 0x6b, 0x50, 0x7d, 0xb1, 0x6c, 0x6c, 0x43, 0xec, 0x8e, 0x6, - 0x3f, 0xba, 0x27, 0x79, 0x27, 0x2c, 0xb8, 0x6f, 0xf8, 0x10, - 0x15, 0x6f, 0xe3, 0x9f, 0xec, 0xf9, 0xe0, 0xaf, 0xda, 0x37, - 0xc3, 0x16, 0x9e, 0x1e, 0xf1, 0xd5, 0x85, 0xce, 0xa5, 0xa4, - 0xdb, 0x5c, 0x8b, 0xc8, 0xe0, 0xb7, 0xbc, 0x96, 0xdf, 0xf7, - 0xa1, 0x59, 0x43, 0x13, 0x1b, 0x2, 0x70, 0x19, 0xb8, 0x3c, - 0x73, 0x40, 0xcf, 0xe6, 0xc6, 0x59, 0x5e, 0x79, 0x5e, 0x49, - 0x18, 0xbc, 0x8e, 0x4b, 0x33, 0x31, 0xc9, 0x24, 0xf5, 0x26, - 0x9b, 0x5f, 0xba, 0x57, 0x5f, 0xf0, 0x49, 0xbf, 0xd9, 0xda, - 0xe1, 0x8, 0x8f, 0x40, 0xd6, 0x2d, 0x4f, 0xf7, 0xa2, 0xd6, - 0x67, 0x27, 0xff, 00, 0x1e, 0x26, 0xb0, 0x6f, 0x7f, 0xe0, - 0x8f, 0x3f, 0x2, 0x6e, 0x3, 0x79, 0x17, 0x5e, 0x2a, 0xb4, - 0x27, 0xa6, 0xdd, 0x4a, 0x36, 0x3, 0xf3, 0x8a, 0xaa, 0xe4, - 0x72, 0xb3, 0xf1, 0x2e, 0x8a, 0xfd, 0x8a, 0xd4, 0x7f, 0xe0, - 0x8b, 0x1f, 0xc, 0x27, 0x2c, 0x6c, 0xfc, 0x6d, 0xe2, 0xab, - 0x4f, 0x40, 0xff, 00, 0x67, 0x90, 0xf, 0xfc, 0x86, 0xd, - 0x72, 0xf7, 0xdf, 0xf0, 0x44, 0x8d, 0x5, 0xd9, 0xbe, 0xc5, - 0xf1, 0x4b, 0x51, 0x88, 0x76, 0x13, 0xe9, 0x51, 0xbf, 0xf2, - 0x91, 0x68, 0xb8, 0xb9, 0x59, 0xf9, 0x39, 0x8f, 0x6a, 0xfe, - 0x88, 0x7f, 0x62, 0xf, 0x82, 0xb1, 0xfc, 0x7, 0xfd, 0x9a, - 0xbc, 0x1f, 0xe1, 0xd6, 0x89, 0x53, 0x53, 0xb8, 0xb6, 0x1a, - 0x96, 0xa2, 0xc0, 0x60, 0xb5, 0xcc, 0xe0, 0x3b, 0x3, 0xfe, - 0xe8, 0x2a, 0x9f, 0x45, 0x15, 0xf1, 0xe7, 0x83, 0xff, 00, - 0xe0, 0x8b, 0xe9, 0xe1, 0xcf, 0x1e, 0x68, 0x3a, 0xad, 0xff, - 00, 0xc4, 0x68, 0x75, 0x8d, 0x16, 0xc6, 0xfa, 0x1b, 0x9b, - 0xab, 0x6, 0xd2, 0x8c, 0x4f, 0x71, 0x1a, 0x38, 0x63, 0x1e, - 0xef, 0x34, 0x81, 0xbb, 0x18, 0xe9, 0xde, 0xbf, 0x4e, 0x95, - 0x42, 0x28, 0x55, 0x1, 0x54, 0xc, 00, 0x3a, 0x1, 0x49, - 0x94, 0x95, 0x8a, 0x9a, 0xbe, 0xa5, 0x16, 0x8f, 0xa5, 0x5d, - 0xdf, 0x4c, 0x40, 0x8a, 0xda, 0x26, 0x95, 0x89, 0xf4, 0x3, - 0x35, 0xf1, 0x4e, 0xa5, 0xa8, 0x4d, 0xaa, 0xea, 0x17, 0x37, - 0xb7, 0xd, 0xbe, 0x7b, 0x89, 0x1a, 0x57, 0x3e, 0xe4, 0xe4, - 0xd7, 0xd6, 0x7f, 0x14, 0xf4, 0xd, 0x5f, 0xc5, 0x1e, 0x13, - 0x97, 0x4b, 0xd1, 0xcc, 0x2b, 0x2d, 0xc4, 0x8a, 0x25, 0x33, - 0x39, 0x51, 0xe5, 0x8e, 0x48, 0x1c, 0x1e, 0xa4, 0xf, 0xd6, - 0xbc, 0x32, 0x4f, 0xd9, 0xfb, 0xc5, 0xc8, 0x38, 0x82, 0xd2, - 0x4f, 0xf7, 0x6e, 0x7, 0xf5, 0xc5, 0x7c, 0x17, 0x11, 0x51, - 0xc5, 0x62, 0xaa, 0x42, 0x9d, 0x1a, 0x6d, 0xc6, 0x2a, 0xfa, - 0x2e, 0xaf, 0xfc, 0x8f, 0x23, 0x1d, 0x1a, 0x95, 0x24, 0x94, - 0x62, 0xda, 0x47, 0x9b, 0x51, 0x5d, 0xec, 0xdf, 0x3, 0x7c, - 0x67, 0xf, 0xfc, 0xc2, 0x84, 0x9f, 0xee, 0x5c, 0x46, 0x7f, - 0xf6, 0x6a, 0xa5, 0x2f, 0xc2, 0x2f, 0x18, 0x43, 0xf7, 0xb4, - 0x2b, 0x83, 0xfe, 0xe9, 0x56, 0xfe, 0x46, 0xbe, 0x2a, 0x58, - 0xc, 0x5c, 0x77, 0xa5, 0x2f, 0xb9, 0x9e, 0x4b, 0xa3, 0x55, - 0x7d, 0x97, 0xf7, 0x1c, 0x7d, 0x7d, 0x3f, 0xfb, 0x3f, 0xe8, - 0x1f, 0xd9, 0x3e, 0x4, 0x4b, 0xb7, 0x4d, 0xb3, 0x6a, 0x12, - 0xb4, 0xc4, 0x91, 0xce, 0xc1, 0xf2, 0xaf, 0xf2, 0x27, 0xf1, - 0xaf, 0x9, 0xb7, 0xf8, 0x63, 0xe2, 0x79, 0x6f, 0x60, 0xb7, - 0x93, 0x44, 0xbd, 0x84, 0x49, 0x22, 0xa1, 0x91, 0xa1, 0x3b, - 0x57, 0x27, 0x19, 0x27, 0xd0, 0x57, 0xd7, 0x3a, 0x75, 0x8c, - 0x5a, 0x5d, 0x85, 0xb5, 0x9c, 0xb, 0xb6, 0x18, 0x23, 0x58, - 0x90, 0x7a, 00, 0x30, 0x2b, 0xeb, 0x38, 0x6b, 0x5, 0x38, - 0xd7, 0x9d, 0x7a, 0xb1, 0x6b, 0x95, 0x59, 0x5d, 0x5b, 0x57, - 0xff, 00, 0x3, 0xf3, 0x3d, 0x2c, 0x5, 0x26, 0xa6, 0xe7, - 0x25, 0xb1, 0x66, 0x8a, 0x28, 0xaf, 0xd1, 0x4f, 0x74, 0x2b, - 0xcd, 0x7f, 0x68, 0x38, 0xbc, 0xcf, 0x87, 0x53, 0x36, 0x3e, - 0xe5, 0xcc, 0x4d, 0xfa, 0xe3, 0xfa, 0xd7, 0xa5, 0x57, 0x3, - 0xf1, 0xce, 0x2f, 0x37, 0xe1, 0x9e, 0xa8, 0x7f, 0xb8, 0xd1, - 0x37, 0xfe, 0x44, 0x5f, 0xf1, 0xaf, 0x37, 0x32, 0x5c, 0xd8, - 0x2a, 0xcb, 0xfb, 0xaf, 0xf2, 0x39, 0xf1, 0xa, 0xf4, 0xa5, - 0xe8, 0x7c, 0xa5, 0x45, 0x14, 0x57, 0xe2, 0x27, 0xc9, 0x5, - 0x14, 0x51, 0x40, 0x1f, 0x64, 0x7c, 0x3a, 0xba, 0xfb, 0x67, - 0x80, 0xf4, 0x9, 0x49, 0xc9, 0x36, 0x51, 0x3, 0xf5, 0xa, - 0x7, 0xf4, 0xae, 0x8e, 0xb8, 0x4f, 0x82, 0x17, 0x86, 0xf3, - 0xe1, 0xa6, 0x95, 0x93, 0x93, 0x17, 0x99, 0x11, 0xfc, 0x1d, - 0xb1, 0xfa, 0x62, 0xbb, 0xba, 0xfd, 0xd3, 0x5, 0x3f, 0x69, - 0x86, 0xa5, 0x3e, 0xf1, 0x5f, 0x91, 0xf6, 0x14, 0x5f, 0x35, - 0x38, 0xbf, 0x24, 0x14, 0x51, 0x45, 0x76, 0x1a, 0x85, 0x14, - 0x56, 0x7f, 0x88, 0x35, 0x68, 0xf4, 0x1d, 0xe, 0xff, 00, - 0x51, 0x97, 0xee, 0x5a, 0xc2, 0xf2, 0x9f, 0x7c, 0xe, 0x5, - 0x4c, 0xa4, 0xa1, 0x17, 0x29, 0x6c, 0x84, 0xdd, 0x95, 0xd9, - 0xf2, 0xbf, 0xc6, 0xd, 0x78, 0xf8, 0x83, 0xe2, 0x6, 0xa9, - 0x20, 0x6d, 0xd0, 0xdb, 0xbf, 0xd9, 0x63, 0xfa, 0x27, 0x7, - 0xff, 00, 0x1e, 0xdc, 0x7f, 0x1a, 0xe3, 0x2a, 0x4b, 0x89, - 0xde, 0xea, 0x79, 0x66, 0x90, 0xee, 0x92, 0x46, 0x2e, 0xc7, - 0xd4, 0x93, 0x93, 0x51, 0xd7, 0xe1, 0x38, 0x8a, 0xcf, 0x11, - 0x5a, 0x75, 0x65, 0xf6, 0x9b, 0x67, 0xc7, 0x4e, 0x4e, 0x72, - 0x72, 0x7d, 0x42, 0x8a, 0x28, 0xae, 0x72, 0xe, 0xb7, 0xe1, - 0x46, 0x8f, 0xfd, 0xb7, 0xf1, 0x7, 0x46, 0x81, 0x97, 0x7c, - 0x69, 0x37, 0x9e, 0xe3, 0xb6, 0x10, 0x16, 0xfe, 0x60, 0x57, - 0xd7, 0xd5, 0xf3, 0xdf, 0xec, 0xd1, 0xa3, 0xf9, 0xfa, 0xd6, - 0xad, 0xa9, 0xb2, 0xf1, 0x6f, 0xa, 0xc0, 0x87, 0xdd, 0xce, - 0x4f, 0xe8, 0xbf, 0xad, 0x7d, 0x9, 0x5f, 0xaa, 0xf0, 0xd5, - 0xf, 0x67, 0x82, 0xf6, 0x8f, 0x79, 0x36, 0xfe, 0x4b, 0x43, - 0xe8, 0xf0, 0x10, 0xe5, 0xa5, 0xcd, 0xdc, 0x28, 0xa2, 0x8a, - 0xfa, 0xb3, 0xd2, 0xa, 0x28, 0xa2, 0x80, 0xa, 0xf9, 0xdb, - 0xf6, 0x88, 0xf0, 0x69, 0xd3, 0xf5, 0x98, 0x7c, 0x41, 0x6e, - 0x9f, 0xe8, 0xf7, 0x98, 0x8e, 0x7c, 0xf, 0xbb, 0x28, 0x1c, - 0x1f, 0xc4, 0xf, 0xfc, 0x77, 0xde, 0xbe, 0x89, 0xac, 0xdf, - 0x10, 0xe8, 0x36, 0x9e, 0x27, 0xd1, 0xae, 0xb4, 0xcb, 0xd4, - 0xdf, 0x6f, 0x70, 0xbb, 0x5b, 0x1d, 0x54, 0xf5, 0x4, 0x7b, - 0x83, 0xcd, 0x79, 0x59, 0x9e, 0x9, 0x63, 0xf0, 0xd2, 0xa3, - 0xd7, 0x75, 0xeb, 0xfd, 0x68, 0x73, 0x62, 0x28, 0xfb, 0x6a, - 0x6e, 0x3d, 0x4f, 0x89, 0xa8, 0xae, 0x8b, 0xc7, 0x1e, 0x8, - 0xbf, 0xf0, 0x2e, 0xb5, 0x25, 0x95, 0xe2, 0x16, 0x88, 0x92, - 0x60, 0xb8, 0x3, 0xe5, 0x95, 0x3d, 0x47, 0xbf, 0xa8, 0xed, - 0x5c, 0xed, 0x7e, 0x33, 0x56, 0x94, 0xe8, 0xcd, 0xd3, 0xa8, - 0xac, 0xd1, 0xf2, 0xb2, 0x8b, 0x8b, 0xe5, 0x96, 0xe1, 0x45, - 0x14, 0x56, 0x44, 0x9b, 0x7e, 0x12, 0xf1, 0x86, 0xa7, 0xe0, - 0xbd, 0x51, 0x6f, 0xb4, 0xd9, 0xb6, 0x3f, 0xdd, 0x92, 0x36, - 0xe5, 0x25, 0x5f, 0x46, 0x15, 0xf4, 0x1f, 0x85, 0x3e, 0x3e, - 0x78, 0x7b, 0x5d, 0x44, 0x8f, 0x50, 0x66, 0xd1, 0xee, 0xb8, - 0x4, 0x4f, 0xcc, 0x44, 0xfb, 0x38, 0xe9, 0xf8, 0xe2, 0xbe, - 0x61, 0xa2, 0xbd, 0xac, 0x6, 0x6d, 0x89, 0xcb, 0xfd, 0xda, - 0x6e, 0xf1, 0xec, 0xf6, 0xff, 00, 0x80, 0x75, 0x51, 0xc4, - 0xd4, 0xa1, 0xa4, 0x76, 0xec, 0x7d, 0xb7, 0x69, 0xe2, 0xd, - 0x2e, 0xfd, 0x3, 0x5b, 0x6a, 0x36, 0x97, 0xa, 0x46, 0x73, - 0x1c, 0xea, 0xdf, 0xc8, 0xd4, 0xb3, 0x6a, 0xf6, 0x36, 0xeb, - 0xba, 0x5b, 0xdb, 0x78, 0x97, 0xd5, 0xe5, 0x50, 0x3f, 0x9d, - 0x7c, 0x3f, 0x8a, 0x31, 0x5f, 0x46, 0xb8, 0xae, 0x76, 0xd6, - 0x8e, 0xbe, 0xbf, 0xf0, 0xe, 0xff, 00, 0xed, 0x27, 0xfc, - 0xbf, 0x89, 0xf5, 0x9f, 0x88, 0xbe, 0x32, 0xf8, 0x5b, 0xc3, - 0xb1, 0x9c, 0xea, 0x2b, 0x7f, 0x38, 0xe9, 0xd, 0x96, 0x24, - 0x3f, 0x98, 0xe0, 0x7e, 0x26, 0xbc, 0x47, 0xe2, 0x7, 0xc6, - 0xad, 0x5b, 0xc6, 0x4b, 0x25, 0xa5, 0xa8, 0x3a, 0x66, 0x96, - 0xc0, 0xab, 0x43, 0x1b, 0x65, 0xe5, 0x1f, 0xed, 0xb7, 0xa7, - 0xb0, 0xe3, 0xeb, 0x5e, 0x75, 0x45, 0x78, 0x98, 0xdc, 0xf7, - 0x17, 0x8c, 0x8b, 0x85, 0xf9, 0x62, 0xfa, 0x2f, 0xf3, 0x39, - 0x2a, 0xe3, 0x2a, 0xd5, 0x56, 0xd9, 0x5, 0x14, 0x51, 0x5f, - 0x3a, 0x70, 0x85, 0x14, 0x55, 0x8b, 0xd, 0x3e, 0xe7, 0x55, - 0xbc, 0x86, 0xd2, 0xd2, 0x17, 0xb8, 0xb9, 0x95, 0x82, 0xa4, - 0x68, 0x32, 0x58, 0xd3, 0x49, 0xc9, 0xd9, 0x6e, 0x1b, 0x89, - 0x65, 0x65, 0x3e, 0xa3, 0x77, 0xd, 0xad, 0xb4, 0x4d, 0x35, - 0xc4, 0xcc, 0x11, 0x23, 0x41, 0x92, 0xc4, 0xf6, 0xaf, 0xad, - 0x3e, 0x18, 0xf8, 0x6, 0x2f, 00, 0xf8, 0x7d, 0x6d, 0xdb, - 0x64, 0x9a, 0x84, 0xe7, 0xcc, 0xb9, 0x99, 0x7b, 0xb7, 0x65, - 0x1e, 0xc3, 0xfc, 0x4f, 0x7a, 0xc6, 0xf8, 0x4b, 0xf0, 0x9a, - 0x2f, 0x4, 0x5b, 0xfd, 0xbf, 0x50, 0x9, 0x36, 0xb5, 0x2a, - 0xe0, 0x95, 0x39, 0x58, 0x14, 0xff, 00, 0xa, 0xfb, 0xfa, - 0x9f, 0xc3, 0xeb, 0xe9, 0x35, 0xfa, 0x86, 0x47, 0x94, 0x3c, - 0x1a, 0xfa, 0xc5, 0x75, 0xef, 0xbd, 0x97, 0x65, 0xfe, 0x67, - 0xd0, 0xe0, 0xf0, 0xbe, 0xcb, 0xdf, 0x9e, 0xff, 00, 0x90, - 0x51, 0x45, 0x23, 0x30, 0x55, 0x24, 0x9c, 0x1, 0xc9, 0x35, - 0xf5, 0xe7, 0xa8, 0x71, 0xba, 0xef, 0xc5, 0x8d, 0xf, 0xc3, - 0x5e, 0x29, 0xfe, 0xc4, 0xd4, 0x64, 0x7b, 0x77, 0xf2, 0x96, - 0x43, 0x73, 0xb7, 0x31, 0xa9, 0x39, 0xf9, 0x5b, 0x1c, 0x8e, - 0x30, 0x73, 0x8c, 0x73, 0x5d, 0x55, 0x8e, 0xa3, 0x6b, 0xaa, - 0x40, 0xb3, 0xd9, 0xdc, 0xc5, 0x75, 0xb, 0x72, 0x24, 0x85, - 0xc3, 0x29, 0xfc, 0x45, 0x7c, 0x75, 0xe3, 0x8d, 0x78, 0xf8, - 0x9b, 0xc5, 0xba, 0xa6, 0xa5, 0x9c, 0xa4, 0xd3, 0xb7, 0x97, - 0xfe, 0xe0, 0xe1, 0x7f, 0x40, 0x2a, 0x86, 0x93, 0xae, 0x6a, - 0x1a, 0xd, 0xc8, 0xb8, 0xd3, 0xaf, 0x67, 0xb2, 0x97, 0xfb, - 0xd0, 0xb9, 0x5c, 0xfd, 0x7d, 0x7f, 0x1a, 0xfc, 0xf5, 0x71, - 0x3c, 0xa9, 0xd7, 0x9c, 0x67, 0xe, 0x68, 0x5d, 0xda, 0xda, - 0x3b, 0x7e, 0xbf, 0x81, 0xe1, 0xac, 0xc1, 0xa9, 0xb4, 0xd5, - 0xd1, 0xf6, 0xed, 0x15, 0xf3, 0x26, 0x8d, 0xfb, 0x43, 0x78, - 0x9f, 0x4e, 0xda, 0xb7, 0x82, 0xd7, 0x53, 0x8c, 0x75, 0xf3, - 0x63, 0xd8, 0xe7, 0xf1, 0x5c, 0xf, 0xd2, 0xbb, 0x6d, 0x2f, - 0xf6, 0x96, 0xd2, 0xa6, 0x55, 0x1a, 0x86, 0x95, 0x77, 0x6c, - 0xdd, 0xcc, 0xc, 0xb2, 0x2f, 0xeb, 0xb4, 0xd7, 0xd0, 0x51, - 0xcf, 0xf0, 0x15, 0xb7, 0x9f, 0x2b, 0xf3, 0x5f, 0xd2, 0x3b, - 0x61, 0x8d, 0xa3, 0x2e, 0xb6, 0x3d, 0x96, 0x8a, 0xf3, 0xcb, - 0x5f, 0x8f, 0x5e, 0xe, 0xb8, 0xc6, 0xeb, 0xe9, 0xad, 0xcf, - 0xa4, 0xb6, 0xef, 0xfd, 0x1, 0xad, 0x8, 0xbe, 0x31, 0x78, - 0x3a, 0x51, 0xc6, 0xb9, 0x2, 0xff, 00, 0xbc, 0xae, 0x3f, - 0x98, 0xaf, 0x4a, 0x39, 0x86, 0xe, 0x7f, 0xd, 0x58, 0xfd, - 0xe8, 0xe8, 0x55, 0xe9, 0x3d, 0xa4, 0xbe, 0xf3, 0xb3, 0xa2, - 0xb8, 0xa9, 0xfe, 0x32, 0xf8, 0x36, 0x1, 0x93, 0xad, 0xc4, - 0xff, 00, 0xf5, 0xce, 0x37, 0x6f, 0xe4, 0x2b, 0x9b, 0xd7, - 0x7f, 0x68, 0xcd, 0x2, 0xca, 0x16, 0x1a, 0x65, 0xbd, 0xce, - 0xa3, 0x3f, 0xf0, 0xee, 0x5f, 0x2a, 0x3f, 0xc4, 0x9e, 0x7f, - 0x4a, 0x8a, 0x99, 0x9e, 0xa, 0x92, 0xbc, 0xaa, 0xc7, 0xef, - 0xbf, 0xe4, 0x29, 0x62, 0x29, 0x45, 0x5d, 0xc9, 0x16, 0xbf, - 0x68, 0x6d, 0x4a, 0xde, 0xd7, 0xc0, 0x46, 0xd6, 0x42, 0x3e, - 0xd1, 0x75, 0x71, 0x18, 0x89, 0x7b, 0xfc, 0xa7, 0x73, 0x1f, - 0xc8, 0x63, 0xf1, 0xaf, 0x98, 0xeb, 0x7b, 0xc6, 0x3e, 0x35, - 0xd4, 0xfc, 0x71, 0xaa, 0x7d, 0xb7, 0x52, 0x90, 0x12, 0xa3, - 0x6c, 0x50, 0xc6, 0x30, 0x91, 0xaf, 0xa0, 0x1f, 0xd7, 0xad, - 0x60, 0xd7, 0xe5, 0x99, 0xbe, 0x3a, 0x38, 0xfc, 0x53, 0xab, - 0x5, 0xee, 0xa5, 0x64, 0x7c, 0xe6, 0x26, 0xb2, 0xad, 0x53, - 0x99, 0x6c, 0x14, 0x51, 0x45, 0x78, 0xa7, 0x28, 0x55, 0xcd, - 0x1e, 0xc5, 0xb5, 0x3d, 0x5e, 0xca, 0xcd, 0x46, 0x5a, 0xe2, - 0x74, 0x88, 0x1, 0xfe, 0xd3, 0x1, 0xfd, 0x6a, 0x9d, 0x7a, - 0x77, 0xc0, 0x1f, 0xa, 0x9d, 0x73, 0xc6, 0x1f, 0xda, 0x12, - 0xa9, 0x36, 0xda, 0x6a, 0xf9, 0xb9, 0xec, 0x64, 0x3c, 0x20, - 0xfe, 0x67, 0xf0, 0x15, 0xdb, 0x82, 0xc3, 0xcb, 0x15, 0x88, - 0x85, 0x18, 0xf5, 0x7f, 0x87, 0x5f, 0xc0, 0xd6, 0x94, 0x1d, - 0x49, 0xa8, 0xae, 0xa7, 0xd3, 0x68, 0xa1, 0x14, 0x28, 0xe8, - 0x6, 0x29, 0xd4, 0x51, 0x5f, 0xb9, 0x9f, 0x60, 0x14, 0x51, - 0x45, 00, 0x56, 0xd4, 0x5f, 0xcb, 0xb0, 0xb8, 0x6e, 0x98, - 0x43, 0xfc, 0xab, 0xe1, 0x1f, 0x8b, 0xd7, 0x1e, 0x77, 0x88, - 0xe5, 0xef, 0xf3, 0x1f, 0xe7, 0x5f, 0x72, 0xf8, 0x92, 0x5f, - 0x27, 0x43, 0xbc, 0x6e, 0x98, 0x8c, 0xd7, 0xc1, 0x5f, 0x12, - 0xa6, 0xf3, 0xbc, 0x45, 0x3f, 0xb3, 0x1a, 0xf8, 0xce, 0x22, - 0x97, 0xbb, 0x4e, 0x3e, 0x67, 0xc9, 0xf1, 0xc, 0xad, 0x41, - 0x23, 0xc8, 0x3e, 0x20, 0x4b, 0xb3, 0x4a, 0x9b, 0xe8, 0x6b, - 0xe9, 0x1f, 0xf8, 0x25, 0xa6, 0x9e, 0x23, 0xf8, 0x57, 0xe3, - 0x5b, 0xfc, 0x7c, 0xd7, 0x5e, 0x20, 0x64, 0xcf, 0xb2, 0x41, - 0x1f, 0xff, 00, 0x14, 0x6b, 0xe6, 0x1f, 0x89, 0x93, 0x6c, - 0xd2, 0x65, 0xfa, 0x1f, 0xe5, 0x5f, 0x60, 0x7f, 0xc1, 0x32, - 0x6c, 0x3e, 0xcd, 0xfb, 0x35, 0x1b, 0xad, 0xb8, 0x37, 0xba, - 0xe5, 0xec, 0xd9, 0xf5, 00, 0xaa, 0x7f, 0xec, 0x95, 0xd9, - 0x92, 0xc6, 0xd4, 0xcf, 0x99, 0xe1, 0x18, 0xdf, 0x13, 0x5e, - 0x7e, 0x87, 0xd6, 0x74, 0x51, 0x45, 0x7d, 0x39, 0xfa, 0x90, - 0x57, 0x82, 0xfe, 0xd6, 0xde, 0x35, 0x3a, 0x3f, 0x84, 0x6d, - 0x3c, 0x3f, 0x3, 0x62, 0x7d, 0x56, 0x4d, 0xd2, 0xe0, 0xf2, - 0x22, 0x42, 0xf, 0xea, 0xd8, 0x1f, 0x81, 0xaf, 0x7a, 0xaf, - 0x85, 0xbf, 0x68, 0x3f, 0x1a, 0x1f, 0x1a, 0x7c, 0x4b, 0xd4, - 0x1a, 0x29, 0x4, 0x96, 0x5a, 0x79, 0xfb, 0x15, 0xbe, 0xd2, - 0x70, 0x42, 0x9f, 0x98, 0xfe, 0x2d, 0x9f, 0xc8, 0x57, 0x85, - 0x9c, 0xe2, 0x3d, 0x86, 0x15, 0xa5, 0xbc, 0xb4, 0xff, 00, - 0x33, 0xe7, 0xb3, 0xdc, 0x4f, 0xd5, 0xf0, 0x6e, 0x29, 0xeb, - 0x2d, 0x3f, 0xcf, 0xf0, 0x39, 0x5f, 0x2, 0xf8, 0x7e, 0x4f, - 0x12, 0xf8, 0xa3, 0x4f, 0xd3, 0xe3, 0x5d, 0xde, 0x6c, 0xaa, - 0xf, 0xd3, 0x3c, 0xd7, 0xe8, 0x46, 0x95, 0xa7, 0xc7, 0xa5, - 0x69, 0xd6, 0xf6, 0x91, 00, 0xb1, 0xc2, 0x81, 00, 0x1e, - 0xd5, 0xf2, 0xef, 0xec, 0x9d, 0xe0, 0xff, 00, 0xb6, 0x6b, - 0x77, 0x7a, 0xd4, 0xc9, 0x98, 0xed, 0xd3, 0x6c, 0x64, 0x8e, - 0x37, 0x1a, 0xfa, 0xb6, 0xb8, 0xb8, 0x7f, 0xf, 0xc9, 0x46, - 0x55, 0xde, 0xf2, 0xfc, 0x91, 0x87, 0xf, 0xe1, 0xbd, 0x8e, - 0x1b, 0xda, 0x3d, 0xe5, 0xf9, 0x5, 0x14, 0x51, 0x5f, 0x54, - 0x7d, 0x41, 0xf9, 0x87, 0xff, 00, 0x5, 0x9e, 0xf8, 0xdd, - 0x1d, 0xb6, 0x8b, 0xe1, 0x2f, 0x85, 0x76, 0x17, 0x2c, 0x2e, - 0x2e, 0x65, 0xfe, 0xda, 0xd4, 0xe3, 0x46, 0xc0, 0xf2, 0x97, - 0x72, 0x40, 0x8d, 0xeb, 0x96, 0xde, 0xd8, 0xff, 00, 0x61, - 0x4d, 0x7e, 0x72, 0xfe, 0xcf, 0x7f, 0xa, 0xe5, 0xf8, 0xdb, - 0xf1, 0xb3, 0xc1, 0xbe, 0x7, 0x89, 0xfc, 0xb5, 0xd6, 0x75, - 0x8, 0xe0, 0x99, 0xf3, 0x8d, 0xb0, 0x8c, 0xbc, 0xa4, 0x7b, - 0x88, 0xd5, 0xc8, 0xf7, 0xaf, 0x55, 0xff, 00, 0x82, 0x90, - 0x6b, 0xf7, 0x9a, 0xff, 00, 0xed, 0x9f, 0xf1, 0x1c, 0xdd, - 0xc8, 0xce, 0xb6, 0x77, 0x30, 0x59, 0x40, 0xac, 0x73, 0xb2, - 0x34, 0xb7, 0x8c, 00, 0x3d, 0xb2, 0x58, 0xff, 00, 0xc0, - 0x8d, 0x7c, 0xfb, 0xe1, 0x5f, 0x15, 0x6a, 0xfe, 0x7, 0xf1, - 0x1e, 0x9d, 0xaf, 0xe8, 0x3a, 0x84, 0xfa, 0x56, 0xb3, 0xa7, - 0xcc, 0xb7, 0x16, 0xb7, 0x96, 0xcd, 0xb6, 0x48, 0x9c, 0x74, - 0x20, 0xff, 00, 0x9c, 0xf4, 0xaa, 0x33, 0x6f, 0x53, 0xfa, - 0x71, 0x51, 0xa7, 0xf8, 0x4b, 0xc3, 0xc0, 0x7c, 0x96, 0x7a, - 0x5e, 0x99, 0x6b, 0x8f, 0x45, 0x8a, 0x18, 0xd3, 0xf9, 0x5, - 0x5f, 0xd2, 0xbf, 0xe, 0xbe, 0x24, 0x7f, 0xc1, 0x4e, 0x7e, - 0x37, 0x6a, 0x3f, 0x13, 0x7c, 0x4b, 0xa8, 0xf8, 0x57, 0xc6, - 0xd3, 0xe9, 0x9e, 0x1a, 0x9a, 0xfe, 0x66, 0xd3, 0x74, 0xe3, - 0x67, 0x6e, 0xe9, 0xd, 0xbe, 0xe2, 0x23, 0x1f, 0x34, 0x64, - 0xe7, 0x68, 0x4, 0xe4, 0x9e, 0x49, 0xa8, 0x3c, 0x61, 0xff, - 00, 0x5, 0x45, 0xf8, 0xd9, 0xe3, 0xcf, 0x86, 0xda, 0xd7, - 0x83, 0x35, 0x89, 0xf4, 0x49, 0xac, 0xf5, 0x6b, 0x17, 0xb0, - 0xb9, 0xbe, 0x86, 0xc5, 0xa2, 0xba, 0xf2, 0xdd, 0x76, 0xb1, - 0xc, 0xae, 0x14, 0x31, 0x19, 0x19, 0xdb, 0xdc, 0xd7, 0xc8, - 0xb4, 0x92, 0x1b, 0x7d, 0x8f, 0xdf, 0x7f, 0xf8, 0x27, 0x7f, - 0xc4, 0x8f, 0x88, 0xff, 00, 0x18, 0xbe, 0x1, 0x47, 0xe3, - 0x6f, 0x88, 0xfa, 0xc2, 0xea, 0xb7, 0x7a, 0xad, 0xf4, 0xa3, - 0x4f, 0x9, 0x69, 0x1d, 0xb8, 0x8e, 0xda, 0x33, 0xe5, 0xe4, - 0x84, 0x51, 0x92, 0xce, 0xae, 0x72, 0x7b, 0x1, 0x5f, 0x50, - 0xd7, 0xe3, 0xaf, 0xc3, 0xf, 0xf8, 0x2b, 0xf6, 0xa3, 0xf0, - 0xbf, 0xc0, 0xfa, 0x7, 0x85, 0x34, 0xff, 00, 0x84, 0xda, - 0x50, 0xd2, 0xb4, 0x6b, 0x38, 0xac, 0xa0, 0x58, 0x75, 0x69, - 0x23, 0x25, 0x51, 0x40, 0xc9, 0xfd, 0xd1, 0xe4, 0xf2, 0x4f, - 0xb9, 0x35, 0xe8, 0x5a, 0x7f, 0xfc, 0x16, 0xee, 0x16, 0x61, - 0xf6, 0xef, 0x84, 0xb2, 0x46, 0xbd, 0xcd, 0xbe, 0xb8, 0x1f, - 0xf9, 0xc0, 0x28, 0xb1, 0x57, 0x47, 0xea, 0x45, 0x15, 0xf9, - 0xbd, 0x65, 0xff, 00, 0x5, 0xb1, 0xf0, 0x3c, 0x85, 0x7e, - 0xd7, 0xf0, 0xe3, 0xc4, 0x10, 0xe, 0xe6, 0x1b, 0xc8, 0x24, - 0xc7, 0xe7, 0xb6, 0xba, 0xed, 0x3, 0xfe, 0xb, 0x19, 0xf0, - 0x8b, 0x5c, 0xbd, 0xb6, 0xb3, 0x3e, 0x19, 0xf1, 0x84, 0x17, - 0x57, 0x12, 0x2c, 0x51, 0xc6, 0x2d, 0x20, 0x93, 0x73, 0xb1, - 0xc0, 0x51, 0xb6, 0x6e, 0x72, 0x48, 0xed, 0x48, 0x2e, 0x8f, - 0xbc, 0xe8, 0xa8, 0xad, 0xa6, 0x37, 0x16, 0xd1, 0x4a, 0x63, - 0x78, 0x4b, 0xa0, 0x63, 0x1c, 0x98, 0xdc, 0xb9, 0x19, 0xc1, - 0xc7, 0x71, 0x59, 0x1e, 0x36, 0xf1, 0xae, 0x89, 0xf0, 0xe7, - 0xc2, 0x9a, 0x9f, 0x89, 0x7c, 0x47, 0x7f, 0x1e, 0x97, 0xa2, - 0x69, 0xb0, 0x99, 0xee, 0xee, 0xe5, 0x4, 0xac, 0x48, 0x3b, - 0xe0, 0x2, 0x4f, 0x5e, 0x80, 0x50, 0x33, 0x72, 0x8a, 0xf0, - 0x2b, 0xf, 0xdb, 0xdb, 0xf6, 0x7d, 0xd4, 0x63, 0xf, 0x1f, - 0xc5, 0x6f, 0xf, 0xc6, 0xf, 0x6b, 0x89, 0x9a, 0x23, 0xf9, - 0x32, 0x8a, 0xdc, 0xb1, 0xfd, 0xb1, 0x7e, 0x6, 0xea, 0x3f, - 0xea, 0x3e, 0x2d, 0x78, 0x40, 0xff, 00, 0xbf, 0xac, 0x42, - 0x9f, 0xfa, 0x13, 0xa, 00, 0xf6, 0x1a, 0x2b, 0x82, 0xd2, - 0x7e, 0x3e, 0x7c, 0x33, 0xd7, 0xbf, 0xe4, 0x1d, 0xf1, 0xb, - 0xc2, 0xf7, 0xdf, 0xf5, 0xc3, 0x58, 0xb7, 0x7f, 0xe4, 0xf5, - 0xd1, 0xd9, 0x78, 0xd7, 0xc3, 0xda, 0x91, 0x2, 0xd3, 0x5e, - 0xd3, 0x2e, 0x89, 0xe8, 0x21, 0xbc, 0x8d, 0xf3, 0xf9, 0x35, - 00, 0x6d, 0x51, 0x51, 0xa5, 0xc4, 0x52, 0x7d, 0xc9, 0x51, - 0xbf, 0xdd, 0x60, 0x6a, 0x4a, 00, 0x28, 0xa2, 0x8a, 00, - 0x2a, 0xbd, 0xfe, 0x9f, 0x6d, 0xaa, 0x5a, 0x49, 0x6b, 0x79, - 0x6f, 0x1d, 0xd5, 0xb4, 0x98, 0xdf, 0x14, 0xca, 0x19, 0x5b, - 0x9c, 0xf2, 0xf, 0xbd, 0x58, 0xa2, 0x93, 0x49, 0xab, 0x30, - 0x6a, 0xfa, 0x33, 0x96, 0x9b, 0xe1, 0x77, 0x84, 0xe7, 0x1f, - 0x36, 0x81, 0x62, 0x3f, 0xdc, 0x8b, 0x6f, 0xf2, 0xaa, 0x53, - 0x7c, 0x17, 0xf0, 0x6c, 0xfd, 0x74, 0x54, 0x5f, 0xf7, 0x25, - 0x91, 0x7f, 0x93, 0x57, 0x6d, 0x45, 0x72, 0x4b, 0x5, 0x85, - 0x96, 0xf4, 0xa3, 0xf7, 0x23, 0x27, 0x46, 0x9b, 0xde, 0x2b, - 0xee, 0x3c, 0xf6, 0x4f, 0x80, 0xde, 0xc, 0x7e, 0x9a, 0x74, - 0xa9, 0xfe, 0xed, 0xd4, 0x9f, 0xd5, 0xaa, 0xac, 0x9f, 0xb3, - 0xd7, 0x84, 0x9f, 0xee, 0xa5, 0xe4, 0x7f, 0xee, 0xdc, 0x7f, - 0x88, 0xaf, 0x4c, 0xa2, 0xb0, 0x79, 0x66, 0x9, 0xef, 0x46, - 0x3f, 0x72, 0x23, 0xea, 0xf4, 0x7f, 0x95, 0x18, 0x7e, 0xf, - 0xf0, 0x85, 0x97, 0x82, 0x74, 0x93, 0xa7, 0x58, 0x3c, 0xcf, - 0x6f, 0xe6, 0x34, 0xa3, 0xcf, 0x60, 0xc4, 0x13, 0x8c, 0x8c, - 0x80, 0x38, 0xe2, 0xb7, 0x28, 0xa2, 0xbb, 0xe9, 0xd3, 0x8d, - 0x28, 0xa8, 0x41, 0x59, 0x23, 0x68, 0xc5, 0x45, 0x59, 0x6c, - 0x14, 0x51, 0x45, 0x68, 0x50, 0x57, 0x25, 0xf1, 0x4b, 0xc3, - 0xfa, 0x9f, 0x8a, 0x7c, 0x1f, 0x73, 0xa5, 0xe9, 0x46, 0x21, - 0x3c, 0xee, 0x81, 0xcc, 0xce, 0x50, 0x6c, 0x7, 0x27, 0x9c, - 0x1f, 0x41, 0x5d, 0x6d, 0x15, 0x8d, 0x6a, 0x51, 0xaf, 0x4e, - 0x54, 0xa5, 0xb3, 0x56, 0x22, 0x71, 0x53, 0x8b, 0x8b, 0xea, - 0x7c, 0xb5, 0x2f, 0xc0, 0xf, 0x18, 0x47, 0xd2, 0xd6, 0xda, - 0x4f, 0xf7, 0x2e, 0x17, 0xfa, 0xe2, 0xa9, 0xcb, 0xf0, 0x47, - 0xc6, 0x71, 0xff, 00, 0xcc, 0x1f, 0x7f, 0xfb, 0xb3, 0xc7, - 0xff, 00, 0xc5, 0x57, 0xd6, 0x34, 0x57, 0xcb, 0xcb, 0x86, - 0x30, 0x4f, 0x69, 0x49, 0x7c, 0xd7, 0xf9, 0x1e, 0x7b, 0xcb, - 0xe9, 0x77, 0x67, 0xc8, 0x53, 0x7c, 0x25, 0xf1, 0x7c, 0x7, - 0xe6, 0xd0, 0x6e, 0x8f, 0xfb, 0x9b, 0x5b, 0xf9, 0x1a, 0xa3, - 0x3f, 0xc3, 0xef, 0x13, 0x5b, 0xff, 00, 0xac, 0xd0, 0x75, - 0x1, 0xf4, 0xb7, 0x63, 0xfc, 0x85, 0x7d, 0x97, 0x45, 0x61, - 0x2e, 0x16, 0xc3, 0x7d, 0x9a, 0x92, 0xfc, 0x3f, 0xc8, 0x87, - 0x97, 0x43, 0xa4, 0x99, 0xe7, 0xdf, 0x3, 0xbc, 0x37, 0x2f, - 0x87, 0x7c, 0xb, 0xf, 0xda, 0x61, 0x78, 0x2e, 0xee, 0xe5, - 0x79, 0xe4, 0x49, 0x14, 0xab, 0x2f, 0x3b, 0x54, 0x10, 0x7a, - 0x70, 0xa0, 0xfe, 0x35, 0xe8, 0x34, 0x51, 0x5f, 0x59, 0x86, - 0xa1, 0x1c, 0x35, 0x18, 0xd1, 0x8e, 0xd1, 0x56, 0x3d, 0x2a, - 0x70, 0x54, 0xe0, 0xa0, 0xba, 0x5, 0x14, 0x51, 0x5d, 0x26, - 0x81, 0x45, 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, 0x6, 0x57, - 0x88, 0xfc, 0x33, 0xa6, 0xf8, 0xb3, 0x4d, 0x7b, 0x1d, 0x4e, - 0xd9, 0x6e, 0x20, 0x6e, 0x46, 0x78, 0x64, 0x3e, 0xaa, 0x7a, - 0x83, 0x5f, 0x3a, 0xf8, 0xef, 0xe0, 0x66, 0xb1, 0xe1, 0x97, - 0x96, 0xe7, 0x4d, 0x56, 0xd5, 0xb4, 0xd1, 0xc8, 0x31, 0x8c, - 0xcc, 0x83, 0xfd, 0xa5, 0x1d, 0x7e, 0xa3, 0xf2, 0x15, 0xf4, - 0xfd, 0x15, 0xe3, 0xe3, 0xf2, 0xac, 0x3e, 0x60, 0xbf, 0x78, - 0xad, 0x2e, 0xeb, 0x7f, 0xf8, 0x27, 0x2d, 0x6c, 0x34, 0x2b, - 0xfc, 0x5b, 0xf7, 0x3e, 0x15, 0x20, 0xa9, 0x20, 0x8c, 0x11, - 0xc1, 0x7, 0xb5, 0x25, 0x7d, 0x89, 0xe2, 0x7f, 0x86, 0xde, - 0x1e, 0xf1, 0x70, 0x63, 0x7f, 0xa7, 0x47, 0xe7, 0x9f, 0xf9, - 0x78, 0x87, 0xe4, 0x90, 0x7e, 0x23, 0xaf, 0xe3, 0x9a, 0xf3, - 0x2d, 0x6b, 0xf6, 0x66, 0x53, 0xb9, 0xb4, 0x9d, 0x64, 0x8f, - 0x48, 0xaf, 0x23, 0xcf, 0xfe, 0x3c, 0xbf, 0xe1, 0x5f, 0x5, - 0x89, 0xe1, 0xbc, 0x65, 0x17, 0x7a, 0x56, 0x9a, 0xfb, 0x9f, - 0xdc, 0xff, 00, 0xcc, 0xf1, 0xaa, 0x60, 0x2a, 0xc7, 0xe1, - 0xd4, 0xf0, 0x8a, 0x2b, 0xd0, 0x35, 0x3f, 0x81, 0x5e, 0x30, - 0xd3, 0xdc, 0x84, 0xb0, 0x8e, 0xf5, 0x7, 0xf1, 0xdb, 0x4c, - 0xa7, 0xf4, 0x62, 0xf, 0xe9, 0x58, 0x57, 0x3f, 0xe, 0x3c, - 0x53, 0x68, 0x71, 0x26, 0x81, 0x7f, 0xff, 00, 00, 0x81, - 0x9c, 0x7e, 0x99, 0xaf, 0xa, 0xa6, 0x7, 0x15, 0x49, 0xda, - 0x74, 0xa4, 0xbe, 0x4c, 0xe2, 0x74, 0x6a, 0x47, 0x78, 0xb3, - 0x9c, 0xa2, 0xb4, 0xe4, 0xf0, 0xc6, 0xb3, 0x11, 0xc3, 0xe9, - 0x37, 0xca, 0x7d, 0xd, 0xb3, 0xff, 00, 0x85, 0x35, 0x7c, - 0x39, 0xab, 0x31, 0xc0, 0xd2, 0xaf, 0x4f, 0xd2, 0xd9, 0xff, - 00, 0xc2, 0xb9, 0xbd, 0x95, 0x4f, 0xe5, 0x7f, 0x71, 0x1c, - 0xb2, 0xec, 0x67, 0x51, 0x5b, 0xf6, 0xfe, 00, 0xf1, 0x2d, - 0xd1, 0x1e, 0x56, 0x83, 0xa8, 0xb6, 0x7a, 0x13, 0x6c, 0xe0, - 0x7e, 0x64, 0x56, 0xe6, 0x9d, 0xf0, 0x47, 0xc6, 0x3a, 0x83, - 0xa8, 0x3a, 0x5f, 0xd9, 0x50, 0xff, 00, 0x1d, 0xc4, 0xa8, - 0xa0, 0x7e, 0x19, 0x27, 0xf4, 0xae, 0x88, 0x60, 0xb1, 0x35, - 0x3e, 0xa, 0x52, 0x7f, 0x26, 0x5a, 0xa5, 0x52, 0x5b, 0x45, - 0x9c, 0x25, 0x15, 0xee, 0x3a, 0x2f, 0xec, 0xcf, 0x2b, 0x6d, - 0x6d, 0x5b, 0x58, 0x54, 0xf5, 0x8a, 0xce, 0x3c, 0x9f, 0xfb, - 0xe9, 0xbf, 0xc2, 0xbd, 0x2f, 0xc3, 0x1f, 0xa, 0x7c, 0x35, - 0xe1, 0x4d, 0xaf, 0x6b, 0xa7, 0xac, 0xf7, 0x2b, 0xff, 00, - 0x2f, 0x17, 0x5f, 0xbc, 0x7f, 0xc3, 0x3c, 0xf, 0xc0, 0xa, - 0xf7, 0x30, 0xdc, 0x39, 0x8d, 0xac, 0xef, 0x51, 0x28, 0x2f, - 0x3d, 0x5f, 0xdc, 0xbf, 0xe0, 0x1d, 0x94, 0xf0, 0x35, 0x67, - 0xf1, 0x68, 0x7c, 0xfd, 0xe0, 0xbf, 0x83, 0x9a, 0xff, 00, - 0x8c, 0xc, 0x73, 0x18, 0x7f, 0xb3, 0xb4, 0xf6, 0x23, 0x37, - 0x37, 0x20, 0x82, 0x47, 0xaa, 0xaf, 0x56, 0xfd, 0x7, 0xbd, - 0x7d, 0xf, 0xe0, 0x9f, 0x87, 0x3a, 0x37, 0x81, 0x6d, 0xb6, - 0xd8, 0xc1, 0xe6, 0x5d, 0x32, 0xe2, 0x5b, 0xb9, 0x79, 0x91, - 0xff, 00, 0xc0, 0x7b, 0xa, 0xea, 0x68, 0xaf, 0xba, 0xc0, - 0x64, 0xd8, 0x6c, 0x7, 0xbd, 0x15, 0xcd, 0x2e, 0xef, 0xf4, - 0xec, 0x7b, 0x14, 0x30, 0xb4, 0xe8, 0xea, 0xb5, 0x7d, 0xc2, - 0x8a, 0x28, 0xaf, 0x74, 0xec, 0xa, 0xe5, 0x7e, 0x28, 0x6b, - 0xe3, 0xc3, 0x7e, 0x5, 0xd5, 0xae, 0xc3, 0x6d, 0x95, 0xa2, - 0x30, 0xc4, 0x7b, 0xef, 0x7f, 0x94, 0x7e, 0x59, 0xcf, 0xe1, - 0x5d, 0x55, 0x78, 0xc7, 0xed, 0x29, 0x71, 0x76, 0xfa, 0x46, - 0x95, 0x69, 0xd, 0xbc, 0xcf, 0x6d, 0xe6, 0xb4, 0xf3, 0x4a, - 0x88, 0x4a, 0x29, 0x3, 0xa, 0x9, 0xe9, 0xfc, 0x4d, 0xf9, - 0x57, 0x99, 0x99, 0xd7, 0x78, 0x7c, 0x1d, 0x4a, 0x91, 0xde, - 0xda, 0x7c, 0xf4, 0x39, 0xf1, 0x13, 0x70, 0xa5, 0x29, 0x23, - 0xe7, 0xba, 0x28, 0xa2, 0xbf, 0x12, 0x3e, 0x48, 0x28, 0xa2, - 0x8a, 00, 0x28, 0xa2, 0x8a, 00, 0x28, 0xa2, 0x8a, 00, - 0x28, 0xa2, 0x8a, 00, 0x28, 0xa2, 0xbb, 0x3f, 0x5, 0x7c, - 0x27, 0xd7, 0xbc, 0x69, 0x2c, 0x4f, 0x15, 0xbb, 0x59, 0x69, - 0xed, 0xc9, 0xbd, 0xb8, 0x5c, 0x2e, 0x3f, 0xd9, 0x1d, 0x5b, - 0xf0, 0xe3, 0xde, 0xb7, 0xa3, 0x42, 0xae, 0x22, 0x6a, 0x9d, - 0x18, 0xb6, 0xfc, 0x8b, 0x84, 0x25, 0x37, 0x68, 0xab, 0xb3, - 0x9c, 0xd0, 0x34, 0x1b, 0xdf, 0x13, 0x6a, 0xd6, 0xfa, 0x76, - 0x9f, 0x17, 0x9d, 0x73, 0x33, 0x60, 0xe, 0xca, 0x3b, 0xb1, - 0x3d, 0x80, 0xf5, 0xaf, 0xae, 0xbc, 0xb, 0xe0, 0xeb, 0x5f, - 0x3, 0xf8, 0x7a, 0xd, 0x3a, 0xdc, 0x6, 0x90, 0xd, 0xf3, - 0xcc, 0x6, 0xc, 0xb2, 0x1e, 0xa7, 0xfa, 0xf, 0x6a, 0x87, - 0xc0, 0xdf, 0xf, 0xb4, 0xbf, 0x1, 0x58, 0x18, 0x2c, 0x50, - 0xc9, 0x71, 0x26, 0x3c, 0xeb, 0xa9, 00, 0xdf, 0x21, 0xfe, - 0x83, 0xd8, 0x57, 0x4f, 0x5f, 0xa9, 0x64, 0xd9, 0x3a, 0xcb, - 0xe3, 0xed, 0x6a, 0xeb, 0x51, 0xfe, 0xb, 0xb7, 0xf9, 0x9f, - 0x43, 0x85, 0xc2, 0xfb, 0x5, 0xcd, 0x2f, 0x88, 0x28, 0xa2, - 0x8a, 0xfa, 0x73, 0xd1, 0xa, 0x28, 0xa2, 0x80, 0x30, 0x7c, - 0x73, 0x37, 0x91, 0xe1, 0x8b, 0xd6, 0xe9, 0xf2, 0xe2, 0xbe, - 0x8, 0xf1, 0xc4, 0xbe, 0x66, 0xbd, 0x72, 0x73, 0xfc, 0x46, - 0xbe, 0xe8, 0xf8, 0x9f, 0x37, 0x93, 0xe1, 0x2b, 0xa3, 0x9a, - 0xf8, 0x2f, 0xc5, 0xd, 0xbf, 0x55, 0xba, 0x6c, 0xff, 00, - 0x11, 0xaf, 0x84, 0xe2, 0x19, 0x7e, 0xfa, 0x9c, 0x4f, 0x88, - 0xe2, 0x49, 0x7b, 0x91, 0x47, 0x8f, 0x7c, 0x59, 0x9f, 0xcb, - 0xd2, 0x64, 0xe7, 0xb1, 0xfe, 0x55, 0xf7, 0x67, 0xfc, 0x13, - 0xa2, 0xc9, 0xad, 0x3f, 0x64, 0xaf, 0x8, 0xbb, 0xc, 0x1b, - 0x89, 0xaf, 0x67, 0xfc, 0xd, 0xd4, 0xa3, 0xfa, 0x57, 0xc0, - 0x5f, 0x19, 0xa6, 0xf2, 0xf4, 0xa9, 0x79, 0xe3, 0x69, 0xaf, - 0xd2, 0x7f, 0xd8, 0xaf, 0x4a, 0x1a, 0x3f, 0xec, 0xaf, 0xf0, - 0xda, 00, 0x41, 0xdf, 0xa5, 0x25, 0xc1, 0xc7, 0xac, 0x8c, - 0xd2, 0x7f, 0xec, 0xd5, 0xed, 0xe5, 0xa, 0xd4, 0x91, 0xe6, - 0xf0, 0x74, 0x7d, 0xda, 0xf3, 0xf3, 0x3d, 0xb2, 0x8a, 0x28, - 0xaf, 0xa0, 0x3f, 0x49, 0x39, 0x5f, 0x8a, 0x1e, 0x30, 0x4f, - 0x2, 0x78, 0x13, 0x56, 0xd6, 0x18, 0xfe, 0xf2, 0x18, 0xb6, - 0xc2, 0x3d, 0x65, 0x6f, 0x95, 0x7, 0xe6, 0x45, 0x7e, 0x7e, - 0xa7, 0x99, 0x77, 0x71, 0x96, 0x26, 0x49, 0xa5, 0x6c, 0xb3, - 0x1e, 0x4b, 0x31, 0x3c, 0x9f, 0xce, 0xbe, 0x93, 0xfd, 0xaf, - 0xfc, 0x64, 0xf, 0xf6, 0x4f, 0x85, 0xa1, 0x3c, 0xff, 00, - 0xc7, 0xf5, 0xc1, 0xf6, 0xe5, 0x50, 0x7f, 0xe8, 0x47, 0xf0, - 0x15, 0xe3, 0xbf, 0x8, 0x3c, 0x2a, 0xde, 0x2d, 0xf1, 0xd6, - 0x9b, 0x69, 0xb4, 0xb4, 0x42, 0x40, 0xf2, 0x7b, 0x28, 0xe6, - 0xbf, 0x3e, 0xce, 0xab, 0x4b, 0x13, 0x8b, 0x8e, 0x1e, 0x1d, - 0x34, 0xf9, 0xb3, 0xf3, 0xbc, 0xe2, 0xa3, 0xc6, 0xe3, 0xe3, - 0x86, 0x86, 0xd1, 0xd3, 0xe6, 0xf7, 0xfd, 0xf, 0xae, 0xfe, - 0x7, 0x78, 0x51, 0x7c, 0x2b, 0xf0, 0xff, 00, 0x4f, 0x8c, - 0xa8, 0x59, 0xe7, 0x5f, 0x36, 0x43, 0x8e, 0xe6, 0xbd, 0x2, - 0xa3, 0xb7, 0x81, 0x2d, 0xa0, 0x8e, 0x14, 0x1b, 0x51, 0x14, - 0x28, 0x3, 0xd0, 0x54, 0x95, 0xf7, 0x54, 0x29, 0x2a, 0x14, - 0xa3, 0x4a, 0x3b, 0x25, 0x63, 0xef, 0xe9, 0x53, 0x54, 0xa1, - 0x18, 0x47, 0x64, 0x14, 0x51, 0x45, 0x6e, 0x6a, 0x7e, 0x70, - 0xff, 00, 0xc1, 0x43, 0xbf, 0xe0, 0x9c, 0x3a, 0xf7, 0xc6, - 0x5f, 0x19, 0x5d, 0x7c, 0x4c, 0xf8, 0x6b, 0xf6, 0x7b, 0x8d, - 0x7a, 0xea, 0x24, 0x1a, 0xae, 0x87, 0x33, 0x88, 0x9a, 0xe9, - 0xd1, 0x42, 0xac, 0xb1, 0x39, 0xf9, 0x77, 0x95, 0x55, 0x52, - 0xad, 0x8c, 0xed, 0x4, 0x1e, 0xb5, 0xf9, 0x9d, 0xe2, 0x4f, - 0xd9, 0xa7, 0xe2, 0xcf, 0x84, 0x2e, 0xe4, 0xb6, 0xd5, 0xfe, - 0x1b, 0x78, 0xaa, 0xce, 0x54, 0xfb, 0xc4, 0xe9, 0x13, 0xba, - 0x7e, 0xe, 0xaa, 0x54, 0xfe, 0x6, 0xbf, 0xa4, 0xfa, 0xe7, - 0xbe, 0x21, 0x78, 0xca, 0xdb, 0xe1, 0xe7, 0x81, 0xb5, 0xef, - 0x13, 0x5e, 0x47, 0x24, 0xd6, 0xfa, 0x55, 0x9c, 0xb7, 0x6d, - 0x14, 0x2a, 0x59, 0xe4, 0xda, 0xa4, 0x84, 0x50, 0x39, 0x2c, - 0xc7, 00, 0x1, 0xdc, 0xd3, 0xb9, 0x2d, 0x5c, 0xfe, 0x63, - 0xef, 0xac, 0x6e, 0x74, 0xcb, 0xb9, 0x6d, 0x6f, 0x2d, 0xe5, - 0xb4, 0xba, 0x85, 0xb6, 0x49, 0x4, 0xe8, 0x51, 0xd1, 0xbd, - 0xa, 0x9e, 0x41, 0xfa, 0xd5, 0x7a, 0xeb, 0x3e, 0x21, 0x5c, - 0x78, 0x93, 0xc5, 0xbe, 0x32, 0xd7, 0x7c, 0x49, 0xae, 0x69, - 0xb7, 0xb0, 0xea, 0x1a, 0xb5, 0xf4, 0xd7, 0xf7, 0x6, 0x68, - 0x1d, 0x70, 0xf2, 0x39, 0x72, 0x39, 0x1d, 0x1, 0x38, 0xaf, - 0xd9, 0xef, 0xf8, 0x27, 0x3f, 0xec, 0xbd, 0xe1, 0xaf, 0x8, - 0x7e, 0xcb, 0x5e, 0x1e, 0xbd, 0xf1, 0x2f, 0x86, 0xf4, 0xcd, - 0x5b, 0x58, 0xf1, 0x29, 0x3a, 0xcc, 0xe7, 0x52, 0xb1, 0x49, - 0x9a, 0x38, 0xe4, 00, 0x42, 0x9f, 0x38, 0x38, 0xc4, 0x6a, - 0xa7, 0x1e, 0xac, 0x69, 0xdc, 0x9b, 0x5c, 0xfc, 0x36, 0xa2, - 0xbf, 0xa4, 0x3d, 0x67, 0xf6, 0x53, 0xf8, 0x37, 0xe2, 0x2, - 0x7f, 0xb4, 0x3e, 0x17, 0xf8, 0x52, 0xe7, 0x3e, 0xba, 0x4c, - 0x23, 0xf9, 0x28, 0xae, 0x53, 0x54, 0xfd, 0x81, 0x7f, 0x67, - 0xbd, 0x5c, 0x62, 0x6f, 0x85, 0x5a, 0xc, 0x5f, 0xf5, 0xeb, - 0x1b, 0xc1, 0xff, 00, 0xa0, 0x30, 0xa5, 0x71, 0xf2, 0x9f, - 0xcf, 0x3d, 0x7d, 0x3f, 0xff, 00, 0x4, 0xe1, 0xf8, 0x2a, - 0x7e, 0x34, 0x7e, 0xd4, 0xfe, 0x18, 0x8e, 0xe2, 0x3, 0x2e, - 0x8f, 0xe1, 0xf6, 0xfe, 0xdc, 0xbe, 0xc8, 0x3b, 0x71, 0x9, - 0x6, 0x25, 0x27, 0xde, 0x53, 0x1f, 0xe0, 0xd, 0x7e, 0xa9, - 0x6a, 0x5f, 0xf0, 0x4c, 0x4f, 0xd9, 0xc3, 0x51, 0x18, 0xff, - 00, 0x84, 00, 0xda, 0xfb, 0xdb, 0x6a, 0x97, 0x69, 0xff, - 00, 0xb5, 0x6b, 0xd0, 0x3e, 00, 0xfe, 0xc8, 0x5f, 0xc, - 0xbf, 0x66, 0x6d, 0x43, 0x59, 0xbd, 0xf0, 0xe, 0x8d, 0x71, - 0xa6, 0xdc, 0xea, 0xd1, 0xc7, 0xd, 0xd3, 0xdc, 0x5e, 0xcb, - 0x72, 0x4a, 0x21, 0x62, 0xa1, 0x7c, 0xc2, 0x76, 0x8c, 0xb1, - 0xce, 0x3a, 0xf1, 0xe9, 0x45, 0xc3, 0x94, 0xf6, 0x7a, 0xfc, - 0xf8, 0xff, 00, 0x82, 0xc6, 0xfc, 0x66, 0x3e, 0x11, 0xf8, - 0x31, 0xa1, 0x7c, 0x3f, 0xb3, 0x98, 0xa5, 0xef, 0x8a, 0x6e, - 0xfc, 0xeb, 0x90, 0xa7, 0x9f, 0xb2, 0x5b, 0x95, 0x62, 0xf, - 0xd6, 0x46, 0x8f, 0xfe, 0xf9, 0x35, 0xfa, 0xf, 0x5f, 0x23, - 0xfe, 0xd6, 0x9f, 0xf0, 0x4f, 0x2d, 0x1b, 0xf6, 0xb2, 0xf1, - 0xd5, 0xaf, 0x8a, 0x35, 0x7f, 0x1c, 0x6b, 0x1a, 0x34, 0xf6, - 0x96, 0x6b, 0x65, 0x6d, 0x65, 0x6f, 0x6f, 0x14, 0x90, 0x44, - 0x80, 0x96, 0x24, 0x3, 0x83, 0x96, 0x66, 0x24, 0xf3, 0xd8, - 0x7a, 0x52, 0x29, 0x9f, 0x83, 0xf4, 0x57, 0xea, 0x9e, 0xa5, - 0xff, 00, 0x4, 0x45, 0xb5, 0x20, 0xfd, 0x83, 0xe2, 0xc4, - 0xca, 0x7b, 0xb, 0x9d, 0x10, 0x1f, 0xd5, 0x66, 0x15, 0xcf, - 0x5d, 0xff, 00, 0xc1, 0x11, 0xbc, 0x42, 0xaa, 0x4d, 0xaf, - 0xc5, 0x6d, 0x32, 0x46, 0xec, 0x26, 0xd1, 0xe4, 0x41, 0xf9, - 0x89, 0x4f, 0xf2, 0xaa, 0xb9, 0x16, 0x67, 0xe6, 0x66, 0x7, - 0xa5, 0x49, 0x14, 0xf2, 0x42, 0x7f, 0x77, 0x23, 0xc7, 0xfe, - 0xeb, 0x11, 0x5f, 0xa2, 0x1a, 0x87, 0xfc, 0x11, 0x57, 0xe2, - 0x44, 0x8, 0x4d, 0x9f, 0x8f, 0x3c, 0x31, 0x74, 0x7b, 0x2c, - 0x91, 0xdc, 0x47, 0xff, 00, 0xb2, 0x1a, 0xe3, 0xf5, 0x4f, - 0xf8, 0x23, 0xd7, 0xc7, 0x5b, 0x32, 0xdf, 0x65, 0xb9, 0xf0, - 0xb5, 0xfa, 0x8e, 0x9e, 0x5e, 0xa4, 0xe8, 0x4f, 0xfd, 0xf5, - 0x10, 0xa2, 0xe1, 0x66, 0x7c, 0x69, 0xa6, 0xf8, 0xcf, 0xc4, - 0x1a, 0x3b, 0x87, 0xb0, 0xd7, 0x75, 0x3b, 0x17, 0x1d, 0x1a, - 0xda, 0xf2, 0x48, 0xcf, 0xe8, 0xc2, 0xba, 0x9d, 0x3f, 0xf6, - 0x87, 0xf8, 0xa7, 0xa5, 0x38, 0x6b, 0x4f, 0x89, 0x1e, 0x2c, - 0x84, 0x8e, 0x9b, 0x75, 0xab, 0x9c, 0xf, 0xc3, 0x7d, 0x7b, - 0xce, 0xa5, 0xff, 00, 0x4, 0xab, 0xfd, 0xa2, 0x74, 0xf0, - 0x4a, 0x78, 0x5b, 0x4f, 0xbd, 0x3, 0xfe, 0x7d, 0x75, 0x68, - 0xe, 0x7f, 0xef, 0xa6, 0x15, 0xc9, 0xea, 0x7f, 0xf0, 0x4e, - 0xbf, 0xda, 0x27, 0x4a, 0x4, 0xbf, 0xc3, 0x2d, 0x46, 0x75, - 0x1d, 0xed, 0xae, 0x2d, 0xe5, 0xfd, 0x16, 0x4c, 0xd0, 0x16, - 0x67, 0x33, 0x61, 0xfb, 0x69, 0x7c, 0x76, 0xd3, 0x48, 0xf2, - 0x3e, 0x2b, 0xf8, 0xa7, 0x8e, 0x82, 0x4d, 0x41, 0xe4, 0x1f, - 0xf8, 0xf6, 0x6b, 0xa1, 0xb4, 0xff, 00, 0x82, 0x86, 0xfe, - 0xd1, 0x56, 0x61, 0x44, 0x7f, 0x14, 0xb5, 0x56, 0x3, 0xfe, - 0x7a, 0xc1, 0x6f, 0x27, 0xfe, 0x85, 0x19, 0xae, 0x67, 0x53, - 0xfd, 0x8d, 0xfe, 0x39, 0x69, 0x19, 0xfb, 0x4f, 0xc2, 0x9f, - 0x15, 0xe0, 0x75, 0x31, 0x69, 0x92, 0x4b, 0xff, 00, 0xa0, - 0x3, 0x5c, 0xdd, 0xd7, 0xec, 0xf7, 0xf1, 0x4a, 0xc7, 0x3f, - 0x68, 0xf8, 0x6f, 0xe2, 0xd8, 0x71, 0xd7, 0x7e, 0x87, 0x72, - 0x3f, 0xf6, 0x4a, 0x3, 0x53, 0xda, 0x2c, 0xbf, 0xe0, 0xa7, - 0x9f, 0xb4, 0x7d, 0x96, 0x3f, 0xe2, 0xbf, 0x17, 00, 0x76, - 0x9f, 0x4a, 0xb4, 0x6c, 0xff, 00, 0xe4, 0x2a, 0xea, 0x34, - 0xff, 00, 0xf8, 0x2b, 0x87, 0xed, 0x5, 0x64, 0x81, 0x65, - 0xd4, 0x3c, 0x3f, 0x7d, 0x8e, 0xf7, 0x1a, 0x4a, 0x82, 0x7f, - 0xef, 0x96, 0x5a, 0xf9, 0x4e, 0xf7, 0xe1, 0xaf, 0x8b, 0xf4, - 0xd0, 0x4d, 0xdf, 0x85, 0x75, 0xbb, 0x50, 0x3a, 0xf9, 0xfa, - 0x74, 0xc9, 0x8f, 0xcd, 0x6b, 0xe, 0xeb, 0x4f, 0xba, 0xb2, - 0x38, 0xb8, 0xb6, 0x9a, 0x3, 0xe9, 0x2c, 0x65, 0x7f, 0x9d, - 0x1, 0x76, 0x7d, 0xe7, 0xa5, 0x7f, 0xc1, 0x66, 0x3e, 0x30, - 0xda, 0x15, 0xfb, 0x6f, 0x87, 0x7c, 0x2b, 0x7e, 0x7, 0x5f, - 0xf4, 0x79, 0xa2, 0xcf, 0xe5, 0x25, 0x75, 0x76, 0x1f, 0xf0, - 0x5b, 0x3f, 0x18, 0xc5, 0x8f, 0xb6, 0xfc, 0x33, 0xd0, 0xee, - 0x3d, 0x7c, 0x8d, 0x42, 0x68, 0xbf, 0x9a, 0xb5, 0x7e, 0x6c, - 0xe4, 0x52, 0xd1, 0x60, 0xbb, 0x3f, 0x53, 0x74, 0xef, 0xf8, - 0x2d, 0xd0, 0x38, 0xfb, 0x7f, 0xc2, 0x82, 0xbe, 0xbf, 0x66, - 0xd6, 0xb3, 0xfc, 0xe1, 0x15, 0xd2, 0xd9, 0xff, 00, 0xc1, - 0x6c, 0xfc, 0x1a, 0xe0, 0x7d, 0xaf, 0xe1, 0xae, 0xbb, 0x11, - 0xef, 0xe4, 0xdf, 0x42, 0xff, 00, 0xcc, 0x2d, 0x7e, 0x46, - 0xd1, 0x45, 0x82, 0xec, 0xfd, 0x8f, 0xb1, 0xff, 00, 0x82, - 0xd2, 0xfc, 0x29, 0x9b, 0x2, 0xe7, 0xc1, 0x9e, 0x2e, 0xb6, - 0xf5, 0x2b, 0x1d, 0xb3, 0x8f, 0xfd, 0x1c, 0x2b, 0xa4, 0xd3, - 0xbf, 0xe0, 0xb0, 0xff, 00, 0x2, 0xef, 0x31, 0xf6, 0x9b, - 0x5f, 0x14, 0xd8, 0x13, 0xff, 00, 0x3d, 0x74, 0xd4, 0x70, - 0x3f, 0xef, 0x89, 0xd, 0x7e, 0x26, 0x51, 0x45, 0x87, 0xcc, - 0xcf, 0xdd, 0xdd, 0x3f, 0xfe, 0xa, 0xad, 0xfb, 0x3a, 0x5f, - 0x85, 0xdd, 0xe2, 0xbb, 0xfb, 0x46, 0x3f, 0xc3, 0x71, 0xa3, - 0xdc, 0x8c, 0x7e, 0x21, 0x8, 0xae, 0xb7, 0x4b, 0xff, 00, - 0x82, 0x89, 0x7e, 0xce, 0xfa, 0xaa, 0x6, 0x4f, 0x89, 0xba, - 0x6d, 0xb9, 0x3f, 0xc3, 0x75, 0xc, 0xd1, 0x1f, 0xd5, 0x2b, - 0xf9, 0xf5, 0xa2, 0x8b, 0x7, 0x31, 0xfd, 0x18, 0x69, 0xdf, - 0xb6, 0x8f, 0xc0, 0x8d, 0x51, 0x41, 0x83, 0xe2, 0xcf, 0x84, - 0xf9, 0xe8, 0x25, 0xd4, 0xe3, 0x88, 0xfe, 0x4e, 0x41, 0xae, - 0xa3, 0x4a, 0xfd, 0xa0, 0xbe, 0x18, 0x6b, 0x60, 0x7d, 0x83, - 0xe2, 0x1f, 0x85, 0xee, 0xf3, 0xff, 00, 0x3c, 0xb5, 0x7b, - 0x73, 0xff, 00, 0xb3, 0xd7, 0xf3, 0x4f, 0x45, 0x2b, 0x7, - 0x31, 0xfd, 0x3c, 0xd9, 0xf8, 0xff, 00, 0xc2, 0xfa, 0x81, - 0xc5, 0xaf, 0x89, 0x34, 0x8b, 0x92, 0x7b, 0x43, 0x7d, 0x13, - 0xff, 00, 0x26, 0xad, 0x58, 0x75, 0x5b, 0x2b, 0x83, 0x88, - 0xaf, 0x2d, 0xe4, 0x3e, 0x89, 0x2a, 0x9f, 0xeb, 0x5f, 0xcb, - 0x86, 0x7, 0xa5, 0x5a, 0xb4, 0xd5, 0x2f, 0x34, 0xf6, 0x6, - 0xd6, 0xee, 0x7b, 0x62, 0x3a, 0x18, 0x65, 0x64, 0xfe, 0x46, - 0x8b, 0xf, 0x98, 0xfe, 0xa3, 0x83, 0x3, 0xd0, 0x83, 0x4b, - 0x5f, 0xcc, 0x86, 0x9f, 0xf1, 0x5b, 0xc6, 0xda, 0x49, 0x6, - 0xc7, 0xc6, 0x3a, 0xfd, 0x91, 0x1d, 0xd, 0xbe, 0xa9, 0x3c, - 0x7f, 0xc9, 0xeb, 0xa8, 0xd2, 0xff, 00, 0x6a, 0x6f, 0x8c, - 0x5a, 0x2c, 0x8a, 0xf6, 0x9f, 0x14, 0x3c, 0x5a, 0x85, 0x7a, - 0x6f, 0xd6, 0x27, 0x90, 0x7e, 0x4c, 0xc4, 0x51, 0x60, 0xe6, - 0x3f, 0xa4, 0x7a, 0x2b, 0xf9, 0xe6, 0xb3, 0xfd, 0xbf, 0x3f, - 0x68, 0x4b, 0x12, 0xbe, 0x5f, 0xc5, 0x5d, 0x71, 0xb6, 0xf4, - 0x12, 0x98, 0xe4, 0x1f, 0xf8, 0xf2, 0x1a, 0xe8, 0xec, 0x7f, - 0xe0, 0xa6, 0x9f, 0xb4, 0x7d, 0x96, 0xd1, 0xff, 00, 0xb, - 0xd, 0xee, 0x15, 0x7b, 0x4f, 0xa6, 0x5a, 0x36, 0x7e, 0xa7, - 0xca, 0xcd, 0x16, 0xe, 0x64, 0x7e, 0xfb, 0x51, 0x5f, 0x86, - 0x76, 0x3f, 0xf0, 0x56, 0xcf, 0xda, 0x12, 0xce, 0x35, 0x57, - 0xd5, 0x34, 0x2b, 0xbc, 0x7f, 0x14, 0xfa, 0x42, 0x64, 0xff, - 00, 0xdf, 0x24, 0x56, 0xdd, 0x97, 0xfc, 0x16, 0x33, 0xe3, - 0xad, 0xb6, 0x4, 0xda, 0x7f, 0x84, 0x2e, 0xfd, 0xe4, 0xd3, - 0x66, 0x53, 0xff, 00, 0x8e, 0xce, 0x28, 0xb0, 0x5d, 0x1f, - 0xb6, 0x34, 0x57, 0xe3, 0xb6, 0x9d, 0xff, 00, 0x5, 0xa8, - 0xf8, 0x9b, 0x2, 0xa8, 0xbd, 0xf0, 0x3f, 0x85, 0xee, 0xdb, - 0xb9, 0x8d, 0xae, 0x22, 0xcf, 0xfe, 0x3e, 0x6b, 0xa5, 0xd3, - 0xff, 00, 0xe0, 0xb7, 0x1a, 0xfc, 0x78, 0xfb, 0x77, 0xc2, - 0xbd, 0x36, 0x7f, 0xfa, 0xf7, 0xd5, 0xe4, 0x8f, 0xf9, 0xc4, - 0xd4, 0x58, 0x77, 0x47, 0xeb, 0x25, 0x15, 0xf9, 0x8b, 0xa5, - 0x7f, 0xc1, 0x6e, 0x34, 0x77, 0x51, 0xfd, 0xa5, 0xf0, 0xae, - 0xfa, 0x16, 0xef, 0xf6, 0x5d, 0x5d, 0x24, 0x1f, 0xf8, 0xf4, - 0x6b, 0x5d, 0xd, 0xaf, 0xfc, 0x16, 0xbf, 0xe1, 0xe3, 0x91, - 0xf6, 0x9f, 0x87, 0xbe, 0x27, 0x88, 0x7a, 0xc5, 0x35, 0xb3, - 0xff, 00, 0x37, 0x5a, 0x2, 0xe8, 0xfd, 0x19, 0xa2, 0xbe, - 0x1, 0xd3, 0x7f, 0xe0, 0xb3, 0xbf, 0x7, 0xae, 0xdc, 0xb, - 0xaf, 0xc, 0x78, 0xc2, 0xc4, 0x7f, 0x79, 0xed, 0xad, 0x9c, - 0x7f, 0xe3, 0xb3, 0x1a, 0xeb, 0x74, 0xef, 0xf8, 0x2b, 0x87, - 0xec, 0xfb, 0x79, 0x8f, 0x3b, 0x50, 0xd7, 0xac, 0x49, 0xff, - 00, 0x9e, 0xfa, 0x4b, 0x9c, 0x7f, 0xdf, 0x24, 0xd2, 0xb, - 0xa3, 0xed, 0x1a, 0x2b, 0xe5, 0x5d, 0x33, 0xfe, 0xa, 0x7d, - 0xfb, 0x39, 0xea, 0x78, 0x1f, 0xf0, 0x9d, 0x3d, 0xa1, 0x3d, - 0xae, 0xb4, 0xcb, 0x94, 0xfd, 0x7c, 0xbc, 0x57, 0x57, 0xa6, - 0xfe, 0xdf, 0x1f, 0xb3, 0xee, 0xa8, 0x7, 0x95, 0xf1, 0x4f, - 0x42, 0x8c, 0x9e, 0xd7, 0x12, 0x3c, 0x47, 0xff, 00, 0x1e, - 0x51, 0x40, 0xcf, 0x7f, 0xa2, 0xbc, 0x9b, 0x4e, 0xfd, 0xad, - 0x7e, 0xb, 0x6a, 0xc4, 0xb, 0x5f, 0x8a, 0x7e, 0x13, 0x90, - 0x9e, 0xcd, 0xab, 0xc2, 0xa7, 0xf5, 0x61, 0x5d, 0x4d, 0x87, - 0xc6, 0x4f, 00, 0xea, 0xb8, 0xfb, 0x17, 0x8d, 0xbc, 0x3b, - 0x77, 0x9e, 0x9e, 0x4e, 0xab, 0x3, 0x67, 0xf2, 0x7a, 00, - 0xec, 0x28, 0xac, 0x9b, 0x7f, 0x17, 0x68, 0x57, 0x78, 0xf2, - 0x35, 0xad, 0x3a, 0x6c, 0xff, 00, 0xcf, 0x3b, 0xa8, 0xdb, - 0xf9, 0x1a, 0xd0, 0x8a, 0xf2, 0x9, 0xff, 00, 0xd5, 0xcf, - 0x1c, 0x9f, 0xee, 0xb8, 0x34, 0x1, 0x35, 0x14, 0x51, 0x40, - 0x5, 0x14, 0x51, 0x40, 0x5, 0x14, 0x51, 0x40, 0x5, 0x14, - 0x51, 0x40, 0x5, 0x23, 0x28, 0x60, 0x41, 00, 0x83, 0xd4, - 0x1a, 0x5a, 0x28, 0x3, 0x97, 0xd5, 0xbe, 0x19, 0x78, 0x5b, - 0x5b, 0x2c, 0xd7, 0x5a, 0x25, 0xae, 0xf6, 0xeb, 0x24, 0x4b, - 0xe5, 0x31, 0xfc, 0x57, 0x15, 0xc5, 0xea, 0xff, 00, 0xb3, - 0x7e, 0x83, 0x76, 0x4b, 0x58, 0x5e, 0xdd, 0xd8, 0x1e, 0xca, - 0xc4, 0x4a, 0xbf, 0xae, 0xf, 0xeb, 0x5e, 0xb9, 0x45, 0x79, - 0xd5, 0xb2, 0xec, 0x1e, 0x23, 0xf8, 0x94, 0x93, 0xf9, 0x59, - 0xfd, 0xe8, 0xc2, 0x74, 0x29, 0x4f, 0xe2, 0x8a, 0x3e, 0x7b, - 0xbd, 0xfd, 0x99, 0xb5, 0x38, 0xf2, 0x6d, 0x35, 0x9b, 0x59, - 0x87, 0x61, 0x34, 0x4d, 0x1f, 0xf2, 0xdd, 0x58, 0x17, 0xbf, - 0xb3, 0xff, 00, 0x8b, 0xad, 0x9, 0xf2, 0xe0, 0xb5, 0xbb, - 0x3, 0xbc, 0x33, 0x8f, 0xfd, 0x9b, 0x15, 0xf5, 0x1d, 0x15, - 0xe4, 0x54, 0xe1, 0xcc, 0x4, 0xfe, 0x14, 0xd7, 0xa3, 0xff, - 00, 0x3b, 0x9c, 0xb2, 0xc0, 0x51, 0x7b, 0x68, 0x7c, 0x87, - 0x3f, 0xc2, 0x3f, 0x18, 0x5b, 0xe7, 0x76, 0x83, 0x72, 0xc3, - 0xd5, 0xa, 0xb7, 0xf2, 0x35, 0x49, 0xfe, 0x1d, 0x78, 0xa2, - 0x33, 0xcf, 0x87, 0xf5, 0x1f, 0xc2, 0xd9, 0xcf, 0xf4, 0xaf, - 0xb2, 0x68, 0xae, 0x27, 0xc2, 0xd8, 0x6e, 0x95, 0x25, 0xf8, - 0x7f, 0x91, 0x93, 0xcb, 0xa1, 0xd2, 0x4c, 0xf8, 0xd0, 0x7c, - 0x3d, 0xf1, 0x3b, 0x1e, 0x3c, 0x3f, 0xa9, 0x7f, 0xe0, 0x2b, - 0xff, 00, 0x85, 0x5c, 0xb7, 0xf8, 0x53, 0xe2, 0xeb, 0xaf, - 0xb9, 0xa0, 0x5d, 0x8f, 0xfa, 0xe8, 0x2, 0x7f, 0xe8, 0x44, - 0x57, 0xd7, 0xf4, 0x50, 0xb8, 0x5b, 0xf, 0xd6, 0xa4, 0xbf, - 0xf, 0xf2, 0x5, 0x97, 0x43, 0xac, 0x99, 0xf2, 0xe6, 0x9f, - 0xf0, 0x3, 0xc5, 0xb7, 0xa4, 0x79, 0xb0, 0x5b, 0x59, 0x2f, - 0xac, 0xf3, 0x83, 0xfa, 0x2e, 0x6b, 0xa9, 0xd2, 0xbf, 0x66, - 0x59, 0x4b, 0x2b, 0x6a, 0x5a, 0xda, 0x2a, 0xf7, 0x4b, 0x58, - 0x72, 0x7f, 0xef, 0xa6, 0x3f, 0xd2, 0xbd, 0xea, 0x8a, 0xef, - 0xa5, 0xc3, 0xb8, 0xa, 0x7a, 0xca, 0x2e, 0x5e, 0xaf, 0xfc, - 0xac, 0x6d, 0x1c, 0xd, 0x18, 0xee, 0xae, 0x71, 0x5e, 0x1e, - 0xf8, 0x3d, 0xe1, 0x6f, 0xe, 0xec, 0x78, 0xf4, 0xd5, 0xbc, - 0xb8, 0x5e, 0x7c, 0xeb, 0xc3, 0xe6, 0x1c, 0xfa, 0xe0, 0xf0, - 0x3f, 0x1, 0x5d, 0xa0, 0x1, 0x40, 00, 0x60, 0xe, 0x80, - 0x52, 0xd1, 0x5e, 0xfd, 0x1a, 0x14, 0xb0, 0xf1, 0xe5, 0xa5, - 0x15, 0x15, 0xe4, 0x8e, 0xd8, 0xc2, 0x30, 0x56, 0x8a, 0xb0, - 0x51, 0x45, 0x15, 0xb9, 0x61, 0x45, 0x14, 0x50, 0x1, 0x45, - 0x14, 0x50, 0x7, 0x1, 0xf1, 0xa6, 0xef, 0xec, 0xde, 0x11, - 0x7f, 0x73, 0x5f, 0xa, 0x6b, 0x72, 0x79, 0x97, 0x97, 0xc, - 0x7b, 0xb1, 0xaf, 0xb5, 0x7f, 0x68, 0x1b, 0x9f, 0x27, 0xc3, - 0x8, 0x9e, 0xb9, 0x35, 0xf1, 0x1e, 0xa8, 0xfb, 0xa4, 0x94, - 0xfa, 0xb1, 0xaf, 0xce, 0xf3, 0xd9, 0x73, 0x63, 0x23, 0x1e, - 0xc8, 0xfc, 0xfb, 0x89, 0x67, 0xef, 0x24, 0x78, 0x67, 0xc7, - 0x2b, 0x8d, 0x9a, 0x5c, 0xe3, 0xfd, 0x93, 0xfc, 0xab, 0xf5, - 0x97, 0xf6, 0x7f, 0xd2, 0x46, 0x85, 0xf0, 0x37, 0xc0, 0x16, - 0xb, 0x9c, 0x41, 0xa1, 0x59, 0xaf, 0x3e, 0xbe, 0x4a, 0xe6, - 0xbf, 0x22, 0xfe, 0x38, 0x39, 0x9a, 0x23, 0xa, 0xe5, 0x9a, - 0x46, 0x8, 00, 0xea, 0x49, 0xe2, 0xbf, 0x68, 0x3c, 0x33, - 0x62, 0x9a, 0x5f, 0x86, 0xf4, 0xab, 0x38, 0xc6, 0xd4, 0xb7, - 0xb4, 0x8a, 0x25, 0x7, 0xb0, 0x54, 0x3, 0xfa, 0x57, 0xd5, - 0xe5, 0x6a, 0xd4, 0x51, 0x5c, 0x1d, 0x1b, 0x61, 0x27, 0x2e, - 0xf2, 0x66, 0x9d, 0x14, 0x51, 0x5e, 0xc9, 0xf7, 0xe7, 0xe7, - 0xef, 0xc5, 0xdf, 0x13, 0x3f, 0x8b, 0x3e, 0x26, 0xf8, 0x82, - 0xf9, 0xf8, 0xb, 0x72, 0x6d, 0x90, 0x7a, 0x2c, 0x7f, 0x20, - 0xff, 00, 0xd0, 0x49, 0xfc, 0x6b, 0xdc, 0xbf, 0x64, 0xbf, - 0x8, 0xf9, 0x76, 0xd7, 0xda, 0xe4, 0xa9, 0xc9, 0x3e, 0x54, - 0x44, 0xfe, 0xb5, 0xf3, 0x7d, 0xfc, 0x6f, 0xa9, 0xf8, 0xdf, - 0x58, 0x86, 0x31, 0xba, 0x49, 0x35, 0x3b, 0x85, 00, 0x7a, - 0xf9, 0xad, 0x5f, 0x7c, 0x7c, 0x35, 0xf0, 0xd2, 0x78, 0x53, - 0xc1, 0x9a, 0x6d, 0x82, 0xa0, 0x46, 0x58, 0x83, 0x3f, 0xfb, - 0xc4, 0x57, 0xc1, 0x65, 0x94, 0x25, 0x5f, 0x30, 0x95, 0x59, - 0xfd, 0x9b, 0xbf, 0x9b, 0x3f, 0x39, 0xe1, 0xfa, 0x6f, 0x17, - 0x89, 0x9e, 0x2a, 0x7d, 0x2e, 0xfe, 0x6c, 0xea, 0x28, 0xa2, - 0x8a, 0xfb, 0xd3, 0xf4, 0x60, 0xa2, 0x8a, 0x28, 00, 0xa2, - 0x9a, 0xe8, 0x1c, 0x60, 0xe7, 0xd7, 0x83, 0x8a, 0x5c, 0x7b, - 0x9a, 00, 0xaf, 0x73, 0xa6, 0xda, 0x5e, 0x29, 0x17, 0x16, - 0xb0, 0xce, 0xf, 0x69, 0x23, 0xd, 0xfc, 0xc5, 0x4f, 0x1c, - 0x49, 0xc, 0x6b, 0x1c, 0x68, 0xb1, 0xc6, 0x80, 0x2a, 0xaa, - 0x8c, 00, 0x7, 0x40, 0x5, 0x3a, 0x8a, 00, 0x28, 0xa2, - 0x8a, 00, 0x28, 0xa2, 0x8a, 00, 0x28, 0xa2, 0x8a, 00, - 0x28, 0xa2, 0x8a, 00, 0x28, 0xa2, 0x8a, 00, 0x28, 0xa2, - 0x8a, 00, 0x28, 0xa2, 0x8a, 00, 0x46, 0x50, 0xc3, 0x4, - 0x2, 0x3d, 0xd, 0x67, 0x5e, 0x78, 0x6b, 0x48, 0xd4, 0x3f, - 0xe3, 0xeb, 0x4a, 0xb2, 0xb9, 0xff, 00, 0xae, 0xd6, 0xe8, - 0xff, 00, 0xcc, 0x56, 0x95, 0x14, 0x1, 0xc5, 0x6a, 0x9f, - 0x4, 0xfe, 0x1e, 0xeb, 0x60, 0x8d, 0x43, 0xc0, 0xde, 0x1c, - 0xbd, 0xdd, 0xd7, 0xcf, 0xd2, 0xa0, 0x7c, 0xfe, 0x6b, 0x5c, - 0xa6, 0xa7, 0xfb, 0x1f, 0x7c, 0x10, 0xd6, 0x14, 0x8b, 0xbf, - 0x85, 0x5e, 0x13, 0x70, 0x7a, 0xec, 0xd2, 0xa2, 0x4f, 0xfd, - 0x4, 0xa, 0xf6, 0xa, 0x28, 0x3, 0xe7, 0x4d, 0x57, 0xfe, - 0x9, 0xe5, 0xfb, 0x3c, 0x6a, 0xe0, 0x89, 0x7e, 0x18, 0x69, - 0x50, 0xe7, 0xfe, 0x7d, 0x64, 0x9a, 0xf, 0xfd, 0x1, 0xc5, - 0x72, 0xb7, 0x9f, 0xf0, 0x4a, 0xff, 00, 0xd9, 0xbe, 0xe8, - 0xb1, 0x5f, 0x5, 0xdd, 0xdb, 0x13, 0xff, 00, 0x3c, 0x75, - 0xab, 0xce, 0x3f, 0x3, 0x29, 0x15, 0xf5, 0xad, 0x14, 0x1, - 0xf1, 0x76, 0xa3, 0xff, 00, 0x4, 0x8e, 0xfd, 0x9f, 0x6f, - 0x50, 0xac, 0x1a, 0x7e, 0xbf, 0xa7, 0x9f, 0xef, 0x41, 0xab, - 0xbb, 0x1f, 0xfc, 0x7c, 0x35, 0x72, 0xba, 0x97, 0xfc, 0x11, - 0x97, 0xe0, 0xe5, 0xca, 0x9f, 0xb1, 0x78, 0x93, 0xc5, 0xd6, - 0x4d, 0xfe, 0xd5, 0xd5, 0xbc, 0x80, 0x7e, 0x70, 0x8a, 0xfb, - 0xee, 0x8a, 0x5, 0x64, 0x7e, 0x6d, 0xea, 0x1f, 0xf0, 0x44, - 0xdf, 0x5, 0xbc, 0x6d, 0xf6, 0x1f, 0x89, 0x1a, 0xf4, 0x2f, - 0xfc, 0x3f, 0x68, 0xb3, 0x82, 0x40, 0x3f, 0x2d, 0xb5, 0xc8, - 0xea, 0x1f, 0xf0, 0x44, 0x5b, 0x80, 0x18, 0xd8, 0xfc, 0x58, - 0x8c, 0x9f, 0xe1, 0x5b, 0x8d, 0x10, 0x8f, 0xcc, 0x89, 0xbf, - 0xa5, 0x7e, 0xa9, 0x51, 0x4c, 0x2c, 0x8f, 0xc8, 0x5b, 0xff, - 00, 0xf8, 0x22, 0x7f, 0x8e, 0xe2, 0xc, 0x6c, 0xfe, 0x22, - 0xf8, 0x7e, 0xe3, 0xfb, 0xa2, 0x6b, 0x49, 0xe3, 0xcf, 0xe5, - 0xba, 0xb9, 0x1d, 0x43, 0xfe, 0x8, 0xd9, 0xf1, 0xba, 0xd9, - 0x9b, 0xec, 0xba, 0xcf, 0x83, 0xef, 0x10, 0x74, 0xcd, 0xfc, - 0xf1, 0xb1, 0xfc, 0xc, 0x18, 0xfd, 0x6b, 0xf6, 0xa2, 0x8a, - 0x2e, 0x16, 0x47, 0xe1, 0xd5, 0xd7, 0xfc, 0x12, 0x2b, 0xf6, - 0x81, 0xb7, 0x56, 0x29, 0x69, 0xe1, 0xcb, 0x9c, 0x76, 0x8b, - 0x56, 0x19, 0x3f, 0xf7, 0xd2, 0xa, 0xe6, 0x35, 0x1f, 0xf8, - 0x25, 0xef, 0xed, 0x1b, 0x60, 0x5b, 0x6f, 0x81, 0xa2, 0xbc, - 0xb, 0xde, 0xdb, 0x55, 0xb5, 0x39, 0xfa, 0x66, 0x40, 0x6b, - 0xf7, 0xb2, 0x8a, 0x2e, 0x2e, 0x54, 0x7f, 0x3d, 0x77, 0xdf, - 0xf0, 0x4f, 0xdf, 0xda, 0x1b, 0x4f, 0x24, 0x49, 0xf0, 0xb3, - 0x59, 0x7c, 0x77, 0x80, 0xc5, 0x2f, 0xfe, 0x82, 0xe6, 0xb9, - 0x2d, 0x53, 0xf6, 0x4e, 0xf8, 0xd1, 0xa3, 0xbb, 0x25, 0xd7, - 0xc2, 0xdf, 0x16, 0x23, 0x2f, 0x5f, 0x2f, 0x48, 0x9a, 0x4f, - 0xfd, 0x5, 0x4d, 0x7f, 0x48, 0x34, 0x51, 0x70, 0xe5, 0x3f, - 0x99, 0x4d, 0x47, 0xe1, 0xf, 0x8e, 0xf4, 0x76, 0x2b, 0x7d, - 0xe0, 0xaf, 0x11, 0x59, 0xb0, 0xea, 0x27, 0xd2, 0xa7, 0x4c, - 0x7e, 0x69, 0x5c, 0xf5, 0xe6, 0x8d, 0xa8, 0x69, 0xcc, 0x56, - 0xee, 0xc6, 0xe6, 0xd4, 0x8e, 0xa2, 0x68, 0x59, 0x3f, 0x98, - 0xaf, 0xea, 0x2c, 0x80, 0x7a, 0x8a, 0xad, 0x71, 0xa5, 0x59, - 0x5d, 0xff, 00, 0xaf, 0xb3, 0xb7, 0x9b, 0xfe, 0xba, 0x44, - 0xad, 0xfc, 0xc5, 0x17, 0xe, 0x53, 0xf9, 0x70, 0xc8, 0xf5, - 0xa5, 0xaf, 0xe9, 0xe6, 0xeb, 0xe1, 0xf7, 0x85, 0xaf, 0xb3, - 0xf6, 0x9f, 0xd, 0x69, 0x17, 0x19, 0xeb, 0xe6, 0xd8, 0x44, - 0xd9, 0xfc, 0xd6, 0xb9, 0xcd, 0x4f, 0xf6, 0x78, 0xf8, 0x5b, - 0xac, 0xe7, 0xed, 0xdf, 0xe, 0xbc, 0x2d, 0x73, 0x9e, 0xbe, - 0x66, 0x91, 0x1, 0xcf, 0xfe, 0x39, 0x45, 0xc5, 0xca, 0x7f, - 0x35, 0x34, 0x57, 0xf4, 0x53, 0xa8, 0xfe, 0xc4, 0x7f, 0x1, - 0x75, 0x56, 0x2d, 0x3f, 0xc2, 0x7f, 0xb, 0x86, 0x3d, 0x4c, - 0x36, 0xb, 0x17, 0xfe, 0x83, 0x8a, 0xe5, 0xb5, 0x3f, 0xf8, - 0x26, 0xf7, 0xec, 0xeb, 0xaa, 0x67, 0x77, 0xc3, 0x8b, 0x4b, - 0x62, 0x7f, 0xe7, 0xd6, 0xee, 0xe2, 0x2f, 0xe5, 0x25, 0x17, - 0xe, 0x53, 0xf9, 0xff, 00, 0xa2, 0xbf, 0x75, 0x35, 0x5f, - 0xf8, 0x24, 0xf7, 0xec, 0xf1, 0xa8, 0xee, 0x31, 0x78, 0x7f, - 0x56, 0xd3, 0xc9, 0xef, 0x6b, 0xab, 0xcd, 0xc7, 0xe0, 0xe5, - 0xab, 0x91, 0xd4, 0x3f, 0xe0, 0x8d, 0x9f, 0x5, 0x2e, 0x77, - 0x7d, 0x9b, 0x5a, 0xf1, 0x75, 0x91, 0x3d, 0x36, 0xdf, 0x42, - 0xe0, 0x7f, 0xdf, 0x50, 0xd3, 0xb8, 0x72, 0x9f, 0x8b, 0x34, - 0x57, 0xec, 0x35, 0xd7, 0xfc, 0x11, 0x53, 0xe1, 0x9b, 0x83, - 0xf6, 0x7f, 0x1e, 0x78, 0xae, 0x13, 0xdb, 0xcc, 0x5b, 0x67, - 0x3, 0xf2, 0x8c, 0x57, 0x3f, 0xa8, 0x7f, 0xc1, 0x12, 0x7c, - 0x3a, 0xc0, 0xfd, 0x87, 0xe2, 0x8e, 0xa9, 0x19, 0xec, 0x2e, - 0x34, 0xb8, 0xdf, 0xf5, 0xe, 0x28, 0xb8, 0xac, 0xcf, 0xc9, - 0x9a, 0x2b, 0xf4, 0xeb, 0x51, 0xff, 00, 0x82, 0x23, 0x6a, - 0xe1, 0x98, 0xd8, 0x7c, 0x56, 0xb2, 0x65, 0xec, 0xb7, 0x1a, - 0x33, 0x83, 0xf9, 0x89, 0x4f, 0xf2, 0xae, 0x5b, 0x52, 0xff, - 00, 0x82, 0x2b, 0x7c, 0x4a, 0x81, 0x8f, 0xd8, 0x7c, 0x75, - 0xe1, 0x8b, 0xb5, 0x1d, 0x3c, 0xe4, 0xb8, 0x88, 0x9f, 0xc9, - 0x1a, 0x8b, 0x85, 0x99, 0xf9, 0xdd, 0x49, 0x5f, 0x73, 0xea, - 0x7f, 0xf0, 0x47, 0x7f, 0x8e, 0x76, 0x84, 0xfd, 0x92, 0xf7, - 0xc2, 0xb7, 0xeb, 0xfe, 0xce, 0xa3, 0x22, 0x1f, 0xfc, 0x7a, - 0x2a, 0xe3, 0xb5, 0x4f, 0xf8, 0x25, 0x87, 0xed, 0x1b, 0xa7, - 0x48, 0x56, 0x2f, 0x7, 0xd9, 0xea, 00, 0x7f, 0x1d, 0xae, - 0xaf, 0x6d, 0x83, 0xff, 00, 0x7d, 0xba, 0x9a, 0x2e, 0x16, - 0x67, 0xc9, 0x40, 0xed, 0x39, 0x1c, 0x1f, 0x51, 0x5a, 0xda, - 0x77, 0x8b, 0xb5, 0xdd, 0x1d, 0x81, 0xb0, 0xd6, 0xb5, 0x1b, - 0x12, 0x3a, 0x1b, 0x6b, 0xb9, 0x23, 0xc7, 0xe4, 0x45, 0x7b, - 0xe5, 0xdf, 0xfc, 0x13, 0x8f, 0xf6, 0x8e, 0xb3, 0x7d, 0xad, - 0xf0, 0xc2, 0xfe, 0x4f, 0x78, 0x6f, 0x2d, 0x5c, 0x7e, 0x92, - 0xd6, 0xe, 0xa3, 0xfb, 0xc, 0x7c, 0x7e, 0xd2, 0x89, 0x13, - 0xfc, 0x28, 0xf1, 0x23, 0x63, 0xbc, 0x16, 0xbe, 0x70, 0xfc, - 0xd0, 0x9a, 0x3, 0x53, 0x85, 0xb0, 0xf8, 0xf3, 0xf1, 0x2f, - 0x4b, 0x60, 0xd6, 0x9f, 0x10, 0x7c, 0x53, 0x6e, 0x47, 0x4d, - 0x9a, 0xcd, 0xc0, 0xc7, 0xfe, 0x3f, 0x5d, 0x4e, 0x9f, 0xfb, - 0x63, 0xfc, 0x71, 0xd2, 0xd9, 0x4d, 0xbf, 0xc5, 0x5f, 0x15, - 0x64, 0x74, 0xf3, 0x75, 0x29, 0x25, 0x1f, 0x93, 0x13, 0x58, - 0xfa, 0xaf, 0xec, 0xcb, 0xf1, 0x73, 0x44, 0x24, 0x5e, 0xfc, - 0x32, 0xf1, 0x64, 0x4, 0x7a, 0xe8, 0xd7, 0x7, 0xf9, 0x25, - 0x73, 0x1a, 0x9f, 0xc3, 0x3f, 0x18, 0x68, 0x80, 0x9d, 0x47, - 0xc2, 0x7a, 0xe5, 0x80, 0x1d, 0x4d, 0xd6, 0x9b, 0x34, 0x7f, - 0xfa, 0x12, 0x8a, 0x3, 0x53, 0xda, 0x6c, 0x7f, 0xe0, 0xa2, - 0x5f, 0xb4, 0x55, 0x86, 0xd0, 0xbf, 0x13, 0xf5, 0x39, 0x40, - 0xed, 0x3c, 0x16, 0xf2, 0x7f, 0x38, 0xeb, 0xa8, 0xd3, 0xbf, - 0xe0, 0xa9, 0xdf, 0xb4, 0x66, 0x9e, 0x81, 0x4f, 0x8c, 0x6d, - 0x2e, 0xc0, 0xff, 00, 0x9f, 0x8d, 0x22, 0xd5, 0x89, 0xfc, - 0x42, 0x3, 0x5f, 0x28, 0x4f, 0x65, 0x71, 0x6a, 0x71, 0x34, - 0x12, 0xc2, 0x7f, 0xe9, 0xa2, 0x15, 0xfe, 0x75, 0x6, 0x47, - 0xad, 0x1, 0x76, 0x7d, 0xb1, 0x67, 0xff, 00, 0x5, 0x79, - 0xf8, 0xff, 00, 0x6a, 0xa0, 0x49, 0x37, 0x86, 0xae, 0xcf, - 0xf7, 0xa6, 0xd2, 0x70, 0x4f, 0xfd, 0xf2, 0xeb, 0x5b, 0x96, - 0x3f, 0xf0, 0x59, 0x6f, 0x8d, 0x76, 0xe0, 0xb, 0x8d, 0x7, - 0xc1, 0xb7, 0x63, 0xb9, 0x36, 0x37, 0x8, 0x4f, 0xe5, 0x3d, - 0x7c, 0x19, 0x45, 0x16, 0xb, 0xb3, 0xf4, 0x7f, 0x4a, 0xff, - 00, 0x82, 0xd8, 0x78, 0xe6, 0x8, 0xf1, 0xa8, 0xfc, 0x39, - 0xd0, 0x2f, 0x1f, 0xfb, 0xd6, 0xf7, 0x93, 0x40, 0x3f, 0x22, - 0x1e, 0xba, 0x8d, 0x27, 0xfe, 0xb, 0x73, 0x37, 0xfc, 0xc4, - 0xfe, 0x14, 0x47, 0xff, 00, 0x6e, 0x9a, 0xc9, 0xff, 00, - 0xd9, 0xa1, 0xaf, 0xcb, 0x8a, 0x28, 0xb0, 0x5d, 0x9f, 0xad, - 0xfa, 0x5f, 0xfc, 0x16, 0xcf, 0xc2, 0x12, 0x11, 0xfd, 0xa3, - 0xf0, 0xd3, 0x5b, 0xb7, 0x1d, 0xcd, 0xad, 0xf4, 0x32, 0xff, - 00, 0xe8, 0x41, 0x6b, 0xa8, 0xd3, 0x3f, 0xe0, 0xb3, 0xdf, - 0x8, 0xae, 0xdc, 0xb, 0xbf, 0xa, 0xf8, 0xb6, 0xc4, 0x7f, - 0x78, 0xc1, 0x6f, 0x27, 0xf2, 0x96, 0xbf, 0x1a, 0x28, 0xa2, - 0xc1, 0xcc, 0xcf, 0xdc, 0x3b, 0x1f, 0xf8, 0x2b, 0xb7, 0xec, - 0xff, 00, 0x76, 0x47, 0x9d, 0x75, 0xe2, 0x3b, 0x2f, 0x79, - 0xb4, 0x92, 0x7f, 0xf4, 0x6, 0x6a, 0xdc, 0xb3, 0xff, 00, - 0x82, 0xaa, 0x7e, 0xce, 0x57, 0x6c, 0x14, 0xf8, 0xbe, 0xfa, - 0xdf, 0x3d, 0xe6, 0xd1, 0xae, 0x80, 0x1f, 0x94, 0x66, 0xbf, - 0x8, 0x28, 0xa2, 0xc3, 0xe6, 0x3f, 0xa0, 0xd, 0x3f, 0xfe, - 0xa, 0x47, 0xfb, 0x39, 0x6a, 0x2c, 0x15, 0x3e, 0x25, 0x5a, - 0x42, 0x4f, 0xfc, 0xfc, 0x59, 0x5d, 0x44, 0x3f, 0x36, 0x88, - 0xa, 0xea, 0x6c, 0x3f, 0x6d, 0xef, 0x80, 0x9a, 0x88, 0x5f, - 0x27, 0xe2, 0xcf, 0x85, 0x81, 0x6e, 0x82, 0x5d, 0x41, 0x63, - 0x3f, 0x93, 0x62, 0xbf, 0x9d, 0x6a, 0x29, 0x58, 0x39, 0x8f, - 0xe9, 0x53, 0x4e, 0xfd, 0xa2, 0xfe, 0x16, 0x6a, 0xca, 0xd, - 0x9f, 0xc4, 0x6f, 0xb, 0x4e, 0xf, 0x4d, 0xba, 0xc4, 0x1c, - 0xff, 00, 0xe3, 0xf5, 0xd3, 0xd8, 0x78, 0xf3, 0xc3, 0x5a, - 0xa8, 0x6, 0xcb, 0xc4, 0x3a, 0x55, 0xd8, 0x3d, 0xc, 0x17, - 0xb1, 0xbe, 0x7f, 0x26, 0xaf, 0xe6, 0x12, 0x95, 0x58, 0xa9, - 0xc8, 0x24, 0x1f, 0x6a, 0x2c, 0x1c, 0xc7, 0xf5, 0x23, 0xd, - 0xed, 0xbd, 0xc8, 0x6, 0x29, 0xe2, 0x94, 0x1f, 0xee, 0x38, - 0x3f, 0xca, 0xa6, 0xaf, 0xe5, 0xf2, 0xc7, 0xc5, 0x9a, 0xde, - 0x96, 00, 0xb3, 0xd6, 0x75, 0xb, 0x40, 0x3a, 0x79, 0x17, - 0x4e, 0x98, 0xfc, 0x8d, 0x6e, 0x5a, 0xfc, 0x66, 0xf8, 0x83, - 0x63, 0x8f, 0xb3, 0x78, 0xef, 0xc4, 0xd6, 0xf8, 0xe9, 0xe5, - 0x6b, 0x17, 0xb, 0xfc, 0x9e, 0x8b, 0xf, 0x98, 0xfe, 0x99, - 0xe8, 0xaf, 0xe6, 0xd6, 0xc7, 0xf6, 0xa0, 0xf8, 0xc1, 0xa6, - 0xe3, 0xec, 0xff, 00, 0x14, 0x3c, 0x5c, 0x98, 0xe9, 0x9d, - 0x6a, 0xe1, 0xbf, 0x9b, 0x9a, 0xe9, 0xb4, 0xef, 0xdb, 0x9f, - 0xe3, 0xf6, 0x96, 00, 0x83, 0xe2, 0xbf, 0x88, 0xc8, 0x1d, - 0xa6, 0xb9, 0x12, 0xff, 00, 0xe8, 0x60, 0xd1, 0x60, 0xe6, - 0x3f, 0xa2, 0x4a, 0x2b, 0xf0, 0x7, 0x4d, 0xff, 00, 0x82, - 0x94, 0x7e, 0xd1, 0xba, 0x6e, 0x31, 0xf1, 0x1e, 0xe2, 0xe8, - 0xe, 0xd7, 0x36, 0x36, 0xaf, 0xfa, 0xf9, 0x79, 0xae, 0xb7, - 0x4c, 0xff, 00, 0x82, 0xb2, 0x7e, 0xd0, 0xba, 0x78, 0x51, - 0x2e, 0xb5, 0xa3, 0x5f, 0x81, 0xff, 00, 0x3f, 0x3a, 0x4c, - 0x79, 0x3f, 0xf7, 0xce, 0xda, 0x2c, 0x1c, 0xc8, 0xfd, 0xd1, - 0xa2, 0xbf, 0x16, 0x74, 0xdf, 0xf8, 0x2c, 0x9f, 0xc6, 0xbb, - 0x45, 0xb, 0x75, 0xa2, 0x78, 0x46, 0xfb, 0x1d, 0x59, 0xac, - 0xa7, 0x42, 0x7f, 0xef, 0x99, 0xb1, 0xfa, 0x57, 0xeb, 0x5f, - 0xc0, 0x9f, 0x1c, 0x6a, 0x7f, 0x13, 0x3e, 0xc, 0xf8, 0x2b, - 0xc5, 0xba, 0xcd, 0xb4, 0x16, 0x5a, 0xa6, 0xb7, 0xa4, 0xdb, - 0x6a, 0x17, 0x16, 0xf6, 0xc0, 0x88, 0xe3, 0x79, 0x23, 0xe, - 0x55, 0x72, 0x49, 0xc0, 0xcf, 0x73, 0x48, 0x77, 0xb9, 0xdd, - 0xd1, 0x45, 0x14, 0xc, 0x28, 0xa2, 0x8a, 00, 0xf1, 0x4f, - 0xda, 0x4e, 0xe7, 0xcb, 0xd1, 0xa1, 0x4c, 0xff, 00, 0x9, - 0x35, 0xf1, 0xa6, 0xa0, 0xdc, 0x39, 0xf5, 0x26, 0xbe, 0xb3, - 0xfd, 0xa7, 0x6e, 0xb6, 0xc0, 0x89, 0x9e, 0x89, 0x8a, 0xf9, - 0x23, 0x51, 0x6c, 0x46, 0xdf, 0x8d, 0x7e, 0x69, 0x9b, 0x3e, - 0x7c, 0xc2, 0x5e, 0x56, 0x3f, 0x31, 0xe2, 0x59, 0xfe, 0xf4, - 0xf0, 0xdf, 0x1d, 0xc4, 0xda, 0x9f, 0x8e, 0x3c, 0x39, 0x62, - 0x83, 0x73, 0xdc, 0xea, 0xd6, 0xb0, 0x85, 0xf5, 0x2d, 0x2a, - 0xc, 0x7e, 0xb5, 0xfb, 0x56, 00, 00, 0x1, 0xd0, 0x57, - 0xe3, 0x1d, 0x9d, 0xa3, 0xeb, 0x5f, 0xb4, 0x7, 0xc3, 0x8b, - 0x18, 0xcf, 0xcf, 0x2f, 0x89, 0x6c, 0x3f, 0x49, 0xd1, 0x8f, - 0xf2, 0xaf, 0xd9, 0xda, 0xfb, 0x8c, 0xbd, 0x5a, 0x8a, 0x3d, - 0xae, 0x13, 0x8f, 0x2e, 0x5a, 0x9f, 0x76, 0xc2, 0x8a, 0x28, - 0xaf, 0x4c, 0xfb, 0x43, 0xf3, 0xa6, 0xf6, 0x59, 0x3e, 0x1f, - 0x7c, 0x74, 0xd7, 0xac, 0xb5, 0x48, 0xb6, 0xc9, 0x6d, 0xa9, - 0xc9, 0x72, 0x23, 0x27, 0x21, 0x92, 0x43, 0xe6, 0x21, 0xfc, - 0x98, 0x57, 0xd7, 0x5a, 0x47, 0xed, 0x13, 0xe1, 0xdb, 0x8b, - 0x48, 0x7c, 0xd9, 0x15, 0x1f, 0x68, 0xc8, 0xd, 0xd3, 0x8a, - 0xf0, 0x9f, 0xdb, 0xc7, 0xe1, 0x85, 0xed, 0x86, 0xa5, 0xa7, - 0x7c, 0x48, 0xd2, 0xd5, 0x9e, 0x25, 0x44, 0xb1, 0xd4, 0x63, - 0x41, 0xf7, 0x70, 0x4f, 0x97, 0x21, 0xf6, 0xe7, 0x69, 0x3f, - 0xee, 0xd7, 0xce, 0xfe, 0x1f, 0xf1, 0x7c, 0x37, 0xf1, 0x28, - 0xf3, 0x36, 0xc9, 0xdd, 0x49, 0xaf, 0x8a, 0xaf, 0xf5, 0x9c, - 0xb6, 0xac, 0xe5, 0x87, 0xd5, 0x33, 0xf2, 0x6f, 0xaf, 0xd5, - 0xe1, 0xcc, 0x55, 0x5c, 0x2b, 0x8f, 0xb8, 0xdd, 0xd3, 0xf2, - 0x67, 0xe8, 0xc4, 0x3f, 0x1c, 0x7c, 0x33, 0x2f, 0xfc, 0xbd, - 0x1, 0xff, 00, 0x2, 0x15, 0xa1, 0x7, 0xc5, 0x9f, 0xe, - 0x4f, 0xd2, 0xf5, 0x47, 0xe3, 0x5f, 0x9f, 0xb0, 0xea, 0x21, - 0xc6, 0x44, 0xa4, 0x7e, 0x35, 0x65, 0x35, 0x29, 0xd7, 0xee, - 0xdc, 0xb8, 0xfa, 0x35, 0x72, 0x2c, 0xff, 00, 0x15, 0x1f, - 0x8a, 0x8, 0xf6, 0x21, 0xc4, 0xf2, 0x7f, 0x65, 0x1f, 0xa0, - 0xd0, 0xfc, 0x44, 0xd0, 0x26, 0xc6, 0x2f, 0xe3, 0xe7, 0xde, - 0xae, 0x47, 0xe2, 0xfd, 0x1e, 0x50, 0xa, 0xdf, 0xc2, 0x73, - 0xfe, 0xd5, 0x7e, 0x7a, 0x26, 0xb9, 0x7d, 0x18, 0xf9, 0x6f, - 0x25, 0x1f, 0xf0, 0x3a, 0xb5, 0x1f, 0x8b, 0x35, 0x68, 0xbe, - 0xed, 0xfc, 0xdf, 0xf7, 0xd5, 0x6c, 0xb8, 0x8a, 0xaa, 0xf8, - 0xa9, 0xaf, 0xbc, 0xea, 0x8f, 0x12, 0xc7, 0xac, 0xf, 0xd0, - 0xa4, 0xd7, 0xf4, 0xe9, 0x3e, 0xed, 0xe4, 0x27, 0xfe, 0x5, - 0x53, 0xae, 0xa3, 0x6a, 0xdd, 0x2e, 0x22, 0x3f, 0x47, 0x15, - 0xf9, 0xf3, 0x17, 0x8f, 0xf5, 0xd8, 0x47, 0xcb, 0x7f, 0x2f, - 0xe2, 0x6a, 0xf4, 0x3f, 0x15, 0x3c, 0x45, 0xf, 0x4b, 0xe7, - 0x3f, 0x8d, 0x6e, 0xb8, 0x8d, 0x7d, 0xaa, 0x7f, 0x89, 0xd1, - 0x1e, 0x23, 0xa0, 0xf7, 0x8b, 0x3e, 0xfd, 0x59, 0xe3, 0x6e, - 0x92, 0x29, 0xfa, 0x30, 0xa7, 0xee, 0x1e, 0xa2, 0xbe, 0xf, - 0xb7, 0xf8, 0xd9, 0xe2, 0x48, 0x31, 0xfe, 0x92, 0xcd, 0xf5, - 0x35, 0xa3, 0x6f, 0xfb, 0x40, 0xf8, 0x8a, 0x12, 0x33, 0x33, - 0x1c, 0x7a, 0x35, 0x6e, 0xb8, 0x8a, 0x8f, 0x58, 0x33, 0xa2, - 0x3c, 0x41, 0x85, 0x7b, 0xdc, 0xfb, 0x82, 0x8a, 0xf8, 0xd2, - 0xdb, 0xf6, 0x97, 0xd7, 0x62, 0x18, 0x62, 0xed, 0xff, 00, - 0x2, 0xad, 0x3b, 0x6f, 0xda, 0x93, 0x54, 0x4f, 0xbe, 0xae, - 0x7f, 0x1c, 0xd6, 0xeb, 0x3f, 0xc2, 0x3d, 0xee, 0xbe, 0x46, - 0xf1, 0xcf, 0x30, 0x72, 0xfb, 0x47, 0xd7, 0x14, 0x57, 0xcb, - 0x96, 0xff, 00, 0xb5, 0x64, 0xe0, 00, 0xf1, 0x37, 0xe4, - 0x2b, 0x52, 0xd7, 0xf6, 0xab, 0x84, 0xe3, 0xcd, 0x8b, 0xf3, - 0x15, 0xbc, 0x73, 0xbc, 0x13, 0xfb, 0x5f, 0x81, 0xd1, 0x1c, - 0xdb, 0x7, 0x2f, 0xb6, 0x7d, 0x1f, 0x45, 0x78, 0x34, 0x1f, - 0xb5, 0x2e, 0x9a, 0xff, 00, 0x7a, 0x35, 0x15, 0xab, 0x6b, - 0xfb, 0x4a, 0x68, 0x72, 0x91, 0xb8, 0x28, 0xff, 00, 0x81, - 0x62, 0xb7, 0x8e, 0x6d, 0x82, 0x97, 0xfc, 0xbc, 0x47, 0x44, - 0x73, 0xc, 0x34, 0xb6, 0x9a, 0x3d, 0x92, 0x8a, 0xf2, 0xdb, - 0x7f, 0xda, 0x7, 0xc3, 0xf3, 0x11, 0xf3, 0x81, 0xff, 00, - 0x3, 0x15, 0xa7, 0x7, 0xc6, 0xaf, 0xe, 0xcc, 0x33, 0xe7, - 0x81, 0xff, 00, 0x2, 0x15, 0xd1, 0x1c, 0x7e, 0x16, 0x5b, - 0x54, 0x46, 0xcb, 0x15, 0x46, 0x5b, 0x49, 0x1d, 0xfd, 0x15, - 0xc7, 0xc1, 0xf1, 0x53, 0xc3, 0xf3, 0x8e, 0x2e, 0xc0, 0xfa, - 0x91, 0x57, 0xe2, 0xf1, 0xee, 0x89, 0x30, 0x4, 0x5e, 0xa7, - 0xe7, 0x5b, 0xac, 0x45, 0x19, 0x6d, 0x35, 0xf7, 0x9a, 0xaa, - 0xb4, 0xde, 0xd2, 0x47, 0x43, 0x45, 0x64, 0xc7, 0xe2, 0xad, - 0x2a, 0x51, 0xf2, 0xde, 0xc5, 0xff, 00, 0x7d, 0x55, 0x95, - 0xd6, 0xac, 0x1f, 0xa5, 0xdc, 0x27, 0xfe, 0x6, 0x2b, 0x55, - 0x38, 0x3d, 0x99, 0x6a, 0x51, 0x7d, 0x4b, 0xb4, 0x54, 0x9, - 0x7d, 0x6f, 0x27, 0xdd, 0x9e, 0x33, 0xf4, 0x61, 0x52, 0x9, - 0xa3, 0x3d, 0x1d, 0x4f, 0xd0, 0xd5, 0x5d, 0xe, 0xe3, 0xe8, - 0xa4, 0x4, 0x1e, 0x87, 0x34, 0xb4, 0xc6, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0xc7, 0x89, - 0x24, 0xfb, 0xe8, 0xad, 0xfe, 0xf0, 0xcd, 0x3e, 0x8a, 00, - 0xcb, 0xbc, 0xf0, 0xbe, 0x8d, 0xa8, 0x9c, 0xdd, 0xe9, 0x16, - 0x37, 0x47, 0xd6, 0x6b, 0x64, 0x7f, 0xe6, 0x2b, 0x9a, 0xd5, - 0xfe, 0x5, 0xfc, 0x38, 0xd7, 0xc1, 0xfe, 0xd2, 0xf0, 0x17, - 0x86, 0xaf, 0xb3, 0xd7, 0xed, 0x1a, 0x4c, 0xf, 0xfc, 0xd2, - 0xbb, 0x9a, 0x28, 0x3, 0xc7, 0x6f, 0x7f, 0x63, 0x9f, 0x81, - 0x9a, 0x89, 0x26, 0x7f, 0x84, 0x9e, 0xe, 0x24, 0xf7, 0x4d, - 0x1a, 0x4, 0x3f, 0xf8, 0xea, 0x8a, 0xc5, 0xd4, 0x3f, 0x60, - 0xaf, 0xd9, 0xf7, 0x52, 0x42, 0x92, 0xfc, 0x29, 0xf0, 0xfc, - 0x60, 0xf7, 0xb7, 0x85, 0xa1, 0x3f, 0x9a, 0x30, 0xaf, 0x7c, - 0xa2, 0x80, 0x3e, 0x5a, 0xd4, 0xff, 00, 0xe0, 0x99, 0x3f, - 0xb3, 0x96, 0xa4, 0xf, 0xfc, 0x5b, 0xf1, 0x68, 0x4f, 0xf1, - 0x5b, 0x6a, 0x57, 0x49, 0xff, 00, 0xb5, 0x48, 0xae, 0x4b, - 0x52, 0xff, 00, 0x82, 0x47, 0x7e, 0xcf, 0xf7, 0xa0, 0xf9, - 0x16, 0x1a, 0xf5, 0x81, 0xf5, 0x83, 0x56, 0x76, 0xff, 00, - 0xd0, 0xc1, 0xaf, 0xb4, 0xa8, 0xa0, 0x56, 0x3e, 0x1, 0xd5, - 0x7f, 0xe0, 0x8c, 0x9f, 0x8, 0x6e, 0xb2, 0x6c, 0xbc, 0x4d, - 0xe2, 0xcb, 0x3, 0xe8, 0x67, 0x82, 0x50, 0x3f, 0x38, 0xbf, - 0xad, 0x72, 0x9a, 0x9f, 0xfc, 0x11, 0x33, 0xc2, 0x32, 0x3, - 0xfd, 0x9f, 0xf1, 0x2f, 0x5a, 0x80, 0xf6, 0x17, 0x36, 0x10, - 0xc8, 0x3f, 0x42, 0xb5, 0xfa, 0x53, 0x45, 0x1, 0x64, 0x7e, - 0x56, 0x6a, 0x1f, 0xf0, 0x44, 0x4b, 0x92, 0x49, 0xb1, 0xf8, - 0xb7, 0x10, 0x1d, 0x85, 0xc6, 0x84, 0x4f, 0xea, 0x27, 0xac, - 0x2b, 0xcf, 0xf8, 0x22, 0x57, 0x8b, 0xa3, 0x52, 0x6d, 0x7e, - 0x27, 0x68, 0xb3, 0x9e, 0xc2, 0x5d, 0x36, 0x68, 0xf3, 0xf9, - 0x3b, 0x57, 0xeb, 0x85, 0x14, 0xee, 0x16, 0x47, 0xe3, 0x4e, - 0xa7, 0xff, 00, 0x4, 0x60, 0xf8, 0xb5, 0x6e, 0x9, 0xb1, - 0xf1, 0x5f, 0x85, 0x2f, 0x71, 0xd0, 0x3c, 0xb7, 0x11, 0x67, - 0xff, 00, 0x21, 0x1a, 0xe4, 0xf5, 0xf, 0xf8, 0x24, 0x47, - 0xc7, 0xfb, 0x36, 0x22, 0xb, 0x6f, 0xe, 0x5f, 0x1, 0xde, - 0xd, 0x58, 0x2e, 0x7f, 0xef, 0xb4, 0x5a, 0xfd, 0xc2, 0xa2, - 0x8b, 0x8a, 0xc8, 0xfc, 0x14, 0xd5, 0x3f, 0xe0, 0x97, 0x9f, - 0xb4, 0x76, 0x9a, 0x7e, 0x4f, 0x3, 0x45, 0x7d, 0xef, 0x6b, - 0xaa, 0xda, 0x9f, 0xfd, 0xa, 0x41, 0x5c, 0xed, 0xe7, 0xfc, - 0x13, 0xbf, 0xf6, 0x8b, 0xb1, 0xcf, 0x99, 0xf0, 0xb7, 0x54, - 0x7c, 0x7f, 0xcf, 0x1b, 0x8b, 0x69, 0x3f, 0xf4, 0x19, 0x4d, - 0x7f, 0x41, 0xb4, 0x51, 0x70, 0xe5, 0x47, 0xf3, 0xa5, 0xa9, - 0xfe, 0xc5, 0x3f, 0x1d, 0xf4, 0x8c, 0xfd, 0xa7, 0xe1, 0x4f, - 0x89, 0xf8, 0xff, 00, 0x9e, 0x36, 0x2d, 0x2f, 0xfe, 0x81, - 0x9a, 0xe5, 0xf5, 0x1f, 0xd9, 0xd7, 0xe2, 0xa6, 0x90, 0x9, - 0xbd, 0xf8, 0x6d, 0xe2, 0xcb, 0x60, 0x3a, 0x99, 0x34, 0x5b, - 0x91, 0xff, 00, 0xb2, 0x57, 0xf4, 0xab, 0x45, 0x17, 0xe, - 0x53, 0xf9, 0x81, 0xd4, 0xfc, 0x11, 0xe2, 0x3d, 0x10, 0x13, - 0xa8, 0xe8, 0x1a, 0xa5, 0x80, 0x1d, 0x7e, 0xd5, 0x65, 0x24, - 0x78, 0xff, 00, 0xbe, 0x94, 0x56, 0x29, 0xf9, 0x4e, 0xf, - 0x7, 0xd0, 0xd7, 0xf5, 0x25, 0x3d, 0x9c, 0x17, 0x23, 0x13, - 0x41, 0x1c, 0xbf, 0xef, 0xa0, 0x3f, 0xce, 0xb2, 0xb5, 0xf, - 0x3, 0xf8, 0x73, 0x57, 0x4d, 0xb7, 0xde, 0x1f, 0xd2, 0xef, - 0x57, 0xd2, 0xe2, 0xca, 0x39, 0x7, 0xea, 0xb4, 0x5c, 0x39, - 0x4f, 0xe6, 0xa, 0x8a, 0xfe, 0x95, 0xf5, 0x2f, 0xd9, 0xe7, - 0xe1, 0x6e, 0xae, 0x85, 0x2f, 0x7e, 0x1c, 0xf8, 0x56, 0xe5, - 0x4f, 0x50, 0xfa, 0x35, 0xb9, 0xff, 00, 0xd9, 0x2b, 0x99, - 0xbc, 0xfd, 0x8b, 0xfe, 0x4, 0x5f, 0x82, 0x25, 0xf8, 0x49, - 0xe1, 0x1e, 0x7a, 0x98, 0xf4, 0x98, 0xa3, 0x3f, 0x9a, 0x81, - 0x45, 0xc5, 0xca, 0x7f, 0x3a, 0x30, 0xc0, 0xf7, 0x33, 0x47, - 0xc, 0x4a, 0x5e, 0x49, 0x18, 0x22, 0xa8, 0xea, 0x49, 0x38, - 0x2, 0xbf, 0xa7, 0xf, 0x86, 0x5e, 0x1f, 0x1e, 0x14, 0xf8, - 0x6f, 0xe1, 0x5d, 0x10, 0x74, 0xd3, 0xb4, 0xab, 0x5b, 0x4e, - 0x98, 0xfb, 0x91, 0x2a, 0xff, 00, 0x4a, 0xf2, 0x56, 0xfd, - 0x81, 0xbf, 0x67, 0xef, 0x3e, 0x29, 0xe3, 0xf8, 0x5d, 0xa3, - 0x5b, 0xcd, 0x13, 0x89, 0x12, 0x4b, 0x7f, 0x32, 0x32, 0xac, - 0xe, 0x41, 0x1b, 0x5c, 0x77, 0xaf, 0x7e, 00, 0x28, 00, - 0x70, 0x5, 0x5, 0x25, 0x61, 0x68, 0xa2, 0x8a, 0x43, 0xa, - 0x28, 0xa2, 0x80, 0x3e, 0x65, 0xfd, 0xa7, 0xae, 0xf3, 0x74, - 0xc9, 0x9e, 0x80, 0xa, 0xf9, 0x6f, 0x55, 0x6c, 0x40, 0xdf, - 0x4a, 0xfa, 0x2b, 0xf6, 0x96, 0xbb, 0xdf, 0xab, 0xca, 0xb9, - 0xe8, 0xd8, 0xaf, 0x9b, 0xf5, 0xa7, 0xdb, 0x6c, 0xe7, 0xfd, - 0x93, 0x5f, 0x97, 0x63, 0x5f, 0x3e, 0x61, 0x37, 0xe6, 0x7e, - 0x49, 0xc4, 0x93, 0xbd, 0x59, 0x1c, 0x17, 0xc1, 0x6b, 0x21, - 0xad, 0xfe, 0xd7, 0xdf, 0xc, 0x2d, 0x58, 0xf0, 0xba, 0xbf, - 0xda, 0x3f, 0x18, 0xe2, 0x79, 0x7, 0xfe, 0x81, 0x5f, 0xb0, - 0x35, 0xf9, 0x3d, 0xfb, 0x20, 0x69, 0x8b, 0xad, 0xfe, 0xd9, - 0xde, 0x16, 0x2c, 0x37, 0xb, 0x1b, 0x7b, 0xcb, 0xb1, 0xec, - 0x44, 0x25, 0x41, 0xff, 00, 0xc7, 0xeb, 0xf5, 0x86, 0xbf, - 0x44, 0xc1, 0xab, 0x52, 0x47, 0xda, 0x70, 0xdc, 0x39, 0x32, - 0xca, 0x41, 0x45, 0x14, 0x57, 0x69, 0xf4, 0xe5, 0x1d, 0x6b, - 0x45, 0xb1, 0xf1, 0x1e, 0x93, 0x75, 0xa6, 0x6a, 0x56, 0xb1, - 0xde, 0xd8, 0x5d, 0x46, 0x62, 0x9a, 0x9, 0x57, 0x2a, 0xea, - 0x7a, 0x83, 0x5f, 0x9e, 0x3f, 0x1f, 0x3f, 0x63, 0x7d, 0x73, - 0xe1, 0xc6, 0xa7, 0x73, 0xac, 0x78, 0x5c, 0x4b, 0xa8, 0xf8, - 0x71, 0x98, 0xba, 0x94, 0x3b, 0xa5, 0xb5, 0x1f, 0xdd, 0x71, - 0xdc, 0xf, 0xef, 0x7e, 0x78, 0xaf, 0xd1, 0xca, 0x42, 0x3, - 0x2, 0x8, 0xc8, 0x3d, 0x41, 0xae, 0x6a, 0xd4, 0x15, 0x65, - 0xd9, 0x9e, 0x2e, 0x67, 0x94, 0xd0, 0xcd, 0x29, 0xa8, 0xd5, - 0xd1, 0xad, 0x9a, 0xe9, 0xfe, 0x6b, 0xc8, 0xfc, 0x79, 0x4f, - 0xf8, 0x49, 0xb4, 0xae, 0x1e, 0x13, 0x22, 0x8e, 0x3a, 0x73, - 0x52, 0xf, 0x16, 0x6a, 0xb0, 0xff, 00, 0xac, 0xb4, 0x90, - 0x7f, 0xc0, 0x4d, 0x7e, 0xa5, 0x78, 0xa7, 0xe0, 0xb7, 0x84, - 0x3c, 0x5b, 0xbd, 0xaf, 0x34, 0x88, 0xa1, 0x99, 0x8e, 0x4c, - 0xd6, 0xa0, 0x46, 0xc4, 0xfa, 0x9c, 0x70, 0x7f, 0x11, 0x5e, - 0x7f, 0x7f, 0xfb, 0x1e, 0xf8, 0x4a, 0xe9, 0xcb, 0x45, 0x77, - 0x77, 0x8, 0x3d, 0x1, 0x54, 0x6c, 0x7e, 0x82, 0xbc, 0xa, - 0x99, 0x75, 0x5b, 0xfc, 0x29, 0xfe, 0x7, 0xc4, 0xcf, 0x84, - 0x9c, 0x3e, 0x1d, 0x7d, 0x1d, 0xbf, 0x3, 0xf3, 0xe5, 0x7c, - 0x79, 0x75, 0x1f, 0xdf, 0xb7, 0x71, 0xf5, 0x6, 0xa6, 0x4f, - 0x88, 0xc4, 0x70, 0xc8, 0xc3, 0xf0, 0xaf, 0xb9, 0x6e, 0xff, - 00, 0x62, 0x6d, 0x12, 0x40, 0x7c, 0x9d, 0x65, 0xd4, 0xff, - 00, 0xb7, 0x6c, 0xf, 0xfe, 0xcd, 0x58, 0x57, 0x9f, 0xb0, - 0xcc, 0x4e, 0xf, 0x93, 0xac, 0xdb, 0x39, 0xf4, 0x78, 0xa, - 0x8f, 0xeb, 0x5c, 0xaf, 0x2e, 0x9f, 0x5a, 0x5f, 0x8a, 0xff, - 00, 0x33, 0x96, 0x5c, 0x2f, 0x5e, 0x3b, 0x29, 0x7d, 0xeb, - 0xfc, 0xcf, 0x8f, 0xe3, 0xf8, 0x8f, 0x9, 0xeb, 0xb8, 0x55, - 0xa8, 0xfe, 0x22, 0x5b, 0x37, 0xf1, 0xd7, 0xd2, 0x97, 0xff, - 00, 0xb0, 0xbe, 0xa6, 0xa7, 0xf7, 0x33, 0x69, 0xd3, 0x8f, - 0x5d, 0xc5, 0x7f, 0x9a, 0xd7, 0x3f, 0x7f, 0xfb, 0xe, 0x78, - 0x89, 0xf, 0xee, 0xec, 0x6d, 0xa7, 0xf7, 0x8e, 0x64, 0x1f, - 0xcc, 0x8a, 0xe7, 0x96, 0x5f, 0xde, 0x93, 0x39, 0xa5, 0xc3, - 0xf8, 0xa8, 0xec, 0xe5, 0xf7, 0x5c, 0xf1, 0x48, 0xfc, 0x79, - 0x6a, 0xd8, 0xfd, 0xe0, 0xfc, 0x45, 0x59, 0x8f, 0xc6, 0x96, - 0x8d, 0xff, 00, 0x2d, 0x56, 0xbd, 0xe, 0xf3, 0xf6, 0x2d, - 0xf1, 0x44, 0x4c, 0x40, 0xd1, 0x25, 0x6c, 0x77, 0x49, 0x10, - 0xff, 00, 0x26, 0xac, 0x2b, 0xcf, 0xd9, 0x13, 0xc5, 0x96, - 0xec, 0x47, 0xf6, 0x16, 0xa3, 0xc7, 0xfc, 0xf3, 0x89, 0x9b, - 0xf9, 0x56, 0x2f, 0x3, 0x4f, 0xac, 0x24, 0xbe, 0x47, 0x3b, - 0xc9, 0xf1, 0x91, 0xfb, 0x4f, 0xe7, 0x16, 0x60, 0xa7, 0x8a, - 0xed, 0x1f, 0xfe, 0x5a, 0xa7, 0xe7, 0x56, 0x13, 0xc4, 0x56, - 0xcc, 0x3e, 0xfa, 0xfe, 0x75, 0x5e, 0xf7, 0xf6, 0x6c, 0xf1, - 0x2d, 0x96, 0xe2, 0xfa, 0x6e, 0xa7, 0x10, 0x1d, 0xda, 0x16, - 00, 0x7e, 0x95, 0x87, 0x71, 0xf0, 0x6f, 0x5a, 0xb5, 0x62, - 0x18, 0xdc, 0x21, 0x1d, 0x99, 0x6b, 0x9d, 0xe0, 0xa8, 0xf7, - 0x68, 0xe7, 0x78, 0xc, 0x64, 0x7e, 0xda, 0xf9, 0xa3, 0xa9, - 0x5d, 0x66, 0xdd, 0xbf, 0x88, 0x54, 0x83, 0x53, 0x80, 0xff, - 00, 0x10, 0xae, 0x16, 0x4f, 0x86, 0xfa, 0xec, 0x1f, 0x76, - 0x49, 0x4f, 0xd5, 0x6a, 0xbb, 0xf8, 0x43, 0xc4, 0x56, 0xfd, - 0x1d, 0x8f, 0xd4, 0x1a, 0xcf, 0xea, 0x34, 0x9e, 0xd3, 0x32, - 0xfa, 0xbe, 0x35, 0x7f, 0x2b, 0x3d, 0x18, 0x5f, 0x42, 0x7f, - 0x88, 0x53, 0x85, 0xd4, 0x47, 0xa3, 0xd7, 0x98, 0x9d, 0x2b, - 0xc4, 0xb0, 0xff, 00, 0xb, 0x37, 0xe3, 0x4d, 0xdf, 0xe2, - 0x38, 0x3a, 0xc0, 0xc7, 0xf1, 0xa9, 0xfe, 0xcf, 0x8b, 0xda, - 0x62, 0xf6, 0x78, 0xd5, 0xf6, 0x13, 0xf9, 0x9e, 0xa6, 0xb7, - 0x2b, 0xd9, 0xff, 00, 0x5a, 0x91, 0x6e, 0xd8, 0x74, 0x94, - 0xfe, 0x75, 0xe5, 0x3, 0x59, 0xd7, 0xa1, 0xfb, 0xd6, 0x92, - 0x1f, 0xc2, 0x9c, 0x3c, 0x59, 0xaa, 0xc5, 0xf7, 0xed, 0x24, - 0x1f, 0x81, 0xa8, 0x79, 0x6b, 0x7b, 0x34, 0x2e, 0x6c, 0x5c, - 0x77, 0xa4, 0xfe, 0xf3, 0xd6, 0xd3, 0x52, 0xb8, 0x4f, 0xbb, - 0x70, 0xe3, 0xe8, 0xd5, 0x62, 0x3d, 0x7f, 0x50, 0x8f, 0xee, - 0xdd, 0xc8, 0x3f, 0xe0, 0x55, 0xe4, 0xb, 0xe3, 0xbb, 0xb8, - 0xfe, 0xfd, 0xbb, 0x8f, 0xc0, 0xd4, 0xc9, 0xf1, 0xc, 0xaf, - 0xde, 0x8d, 0x87, 0xe7, 0x59, 0xbc, 0xba, 0xa2, 0xda, 0xc3, - 0xfa, 0xd6, 0x26, 0x1b, 0xc2, 0x48, 0xf6, 0x38, 0xbc, 0x63, - 0xac, 0x43, 0x8d, 0x97, 0xb2, 0xc, 0x7b, 0xd5, 0xb8, 0xbe, - 0x22, 0x6b, 0xb0, 0x9e, 0x2f, 0x58, 0xfd, 0x6b, 0xc6, 0x63, - 0xf8, 0x8d, 0x17, 0x7c, 0x8f, 0xc6, 0xac, 0xc7, 0xf1, 0xe, - 0xd8, 0xf5, 0x7a, 0x5f, 0x52, 0xc4, 0x47, 0x6f, 0xcc, 0xb5, - 0x99, 0xd6, 0x8e, 0xfc, 0xcb, 0xef, 0x3d, 0xb2, 0xf, 0x8b, - 0x7e, 0x21, 0x83, 0xa5, 0xd6, 0x7e, 0xb5, 0xa1, 0x6f, 0xf1, - 0xc3, 0xc4, 0x50, 0x11, 0x99, 0xb7, 0x62, 0xbc, 0x36, 0x3f, - 0x1e, 0xda, 0x37, 0xfc, 0xb5, 0x15, 0x66, 0x3f, 0x1a, 0xda, - 0x37, 0xfc, 0xb5, 0x5a, 0x7e, 0xcb, 0x17, 0x1d, 0x9b, 0xfb, - 0xd9, 0xb4, 0x73, 0xba, 0xb1, 0xfb, 0x6d, 0x1e, 0xf9, 0x6f, - 0xfb, 0x43, 0x78, 0x82, 0x10, 0x1, 0x73, 0xf9, 0xd6, 0xa5, - 0xaf, 0xed, 0x2f, 0xac, 0xc5, 0xf7, 0xb2, 0x6b, 0xe7, 0x74, - 0xf1, 0x6d, 0xa3, 0x7f, 0xcb, 0x54, 0xfc, 0xea, 0x74, 0xf1, - 0x25, 0xab, 0xff, 00, 0x1a, 0xfe, 0x75, 0x4a, 0xae, 0x3a, - 0x1b, 0x4e, 0x47, 0x4c, 0x78, 0x86, 0xaa, 0xff, 00, 0x97, - 0xa7, 0xd2, 0xd0, 0x7e, 0xd4, 0xfa, 0x82, 0xe3, 0x7a, 0xb6, - 0x3e, 0x95, 0xab, 0x6b, 0xfb, 0x55, 0xb8, 0xc7, 0x98, 0x9f, - 0x9a, 0xd7, 0xcb, 0x4b, 0xad, 0xdb, 0xb7, 0xf1, 0x8f, 0xce, - 0xa5, 0x5d, 0x56, 0x3, 0xfc, 0x43, 0xf3, 0xab, 0x58, 0xec, - 0x7c, 0x7e, 0xdb, 0x3a, 0xe3, 0xc4, 0x75, 0xff, 00, 0xe7, - 0xe2, 0x3e, 0xb4, 0xb6, 0xfd, 0xaa, 0xad, 0x9c, 0xfc, 0xe8, - 0xa3, 0xfe, 0x3, 0x5a, 0xb6, 0xdf, 0xb4, 0xfe, 0x94, 0xf8, - 0xde, 0x13, 0xf2, 0x22, 0xbe, 0x39, 0x17, 0xf0, 0xb7, 0xf1, - 0xa, 0x78, 0xbb, 0x88, 0xf4, 0x71, 0x5a, 0xac, 0xdb, 0x1f, - 0x1f, 0xb5, 0xf8, 0x1d, 0x91, 0xe2, 0x4a, 0xfd, 0xd3, 0x3e, - 0xd6, 0xb6, 0xfd, 0xa4, 0x34, 0x29, 0xb1, 0xb8, 0xa8, 0xfc, - 0x6b, 0x52, 0xf, 0x8f, 0x5e, 0x1d, 0x94, 0xc, 0xca, 0x6, - 0x7d, 0xd, 0x7c, 0x2e, 0x2e, 0x53, 0xb3, 0xfe, 0xb5, 0x22, - 0xdd, 0x63, 0xa4, 0xa7, 0xf0, 0x35, 0xaa, 0xcf, 0x31, 0xb1, - 0xde, 0xcf, 0xe4, 0x75, 0x47, 0x89, 0x6a, 0xf5, 0x8a, 0x3e, - 0xf5, 0xb7, 0xf8, 0xcb, 0xe1, 0xd9, 0xff, 00, 0xe5, 0xe3, - 0x15, 0xa1, 0x17, 0xc4, 0xed, 0x2, 0x5e, 0x97, 0x80, 0x7d, - 0x6b, 0xf3, 0xf9, 0x2f, 0x65, 0x5f, 0xbb, 0x3b, 0x8f, 0xa3, - 0x54, 0xc9, 0xab, 0xdd, 0xc7, 0xf7, 0x6e, 0xa4, 0x1f, 0xf0, - 0x23, 0x5b, 0xae, 0x20, 0xc4, 0x2d, 0xe0, 0x8e, 0x98, 0xf1, - 0x2c, 0xba, 0xc0, 0xfd, 0x7, 0x8b, 0xc7, 0x3a, 0x2c, 0xdf, - 0x76, 0xf5, 0x3f, 0x1a, 0xb4, 0x9e, 0x28, 0xd2, 0xe4, 0xfb, - 0xb7, 0xb1, 0x9f, 0xc6, 0xbf, 0x3d, 0xa3, 0xf1, 0x2e, 0xa7, - 0x1f, 0xdd, 0xbd, 0x97, 0xfe, 0xfa, 0x35, 0x6a, 0x2f, 0x1b, - 0x6b, 0x30, 0x91, 0xb6, 0xf6, 0x4e, 0x3d, 0x58, 0xd6, 0xcb, - 0x88, 0xa7, 0xd6, 0x9f, 0xe2, 0x74, 0x2e, 0x24, 0x87, 0x58, - 0x1f, 0xa1, 0x11, 0xea, 0xf6, 0x52, 0xfd, 0xdb, 0x98, 0xcf, - 0xfc, 0xa, 0xa6, 0x5b, 0xc8, 0x1b, 0xa4, 0xc8, 0x7e, 0x8c, - 0x2b, 0xf3, 0xfa, 0x1f, 0x89, 0x7a, 0xf4, 0x23, 0x8b, 0xc7, - 0xfc, 0xcd, 0x5e, 0x83, 0xe3, 0x7, 0x88, 0x20, 0xc6, 0x2e, - 0x58, 0xe3, 0xfd, 0xa3, 0x5b, 0xc7, 0x88, 0xa3, 0xd6, 0x9b, - 0x3a, 0x23, 0xc4, 0x58, 0x77, 0xba, 0x67, 0xde, 0xe2, 0x45, - 0x6e, 0x8c, 0xf, 0xd0, 0xd2, 0xe6, 0xbe, 0x18, 0x87, 0xe3, - 0xb7, 0x88, 0x22, 0xc0, 0xf3, 0xf, 0xfd, 0xf4, 0x6b, 0x4e, - 0xdf, 0xf6, 0x8a, 0xd7, 0x21, 0x23, 0x3b, 0x8e, 0x3f, 0xda, - 0x35, 0xba, 0xe2, 0x1a, 0x1d, 0x62, 0xce, 0x88, 0xe7, 0xf8, - 0x47, 0xbb, 0x3e, 0xd5, 0xa2, 0xbe, 0x3e, 0x83, 0xf6, 0x9c, - 0xd5, 0xd0, 0x8d, 0xe1, 0xb1, 0xfe, 0xf1, 0xad, 0x5b, 0x5f, - 0xda, 0x9a, 0xed, 0x71, 0xbd, 0xf, 0x15, 0xbc, 0x73, 0xec, - 0x23, 0xde, 0xeb, 0xe4, 0x74, 0x47, 0x3a, 0xc1, 0xcb, 0xed, - 0x1f, 0x56, 0x51, 0x5f, 0x33, 0xdb, 0x7e, 0xd5, 0x44, 0x91, - 0xe6, 0x20, 0x1f, 0x51, 0x5a, 0xd6, 0xff, 00, 0xb5, 0x35, - 0x91, 0x3, 0x7a, 0xa7, 0xe4, 0x6b, 0xa2, 0x39, 0xd6, 0xa, - 0x5f, 0x6c, 0xe8, 0x8e, 0x69, 0x84, 0x96, 0xd3, 0x47, 0xd0, - 0x54, 0x57, 0x88, 0xdb, 0x7e, 0xd3, 0x5a, 0x4c, 0xa4, 0x6f, - 0x11, 0x8f, 0xc4, 0xd6, 0x9c, 0x1f, 0xb4, 0x56, 0x83, 0x26, - 0x32, 0xf1, 0xe7, 0xd9, 0xeb, 0x78, 0xe6, 0xb8, 0x39, 0x6d, - 0x51, 0x1b, 0xac, 0x76, 0x1e, 0x5b, 0x4d, 0x1e, 0xb7, 0x45, - 0x79, 0xbd, 0xbf, 0xc7, 0x4f, 0xf, 0xcf, 0xff, 00, 0x2d, - 0x94, 0x7f, 0xc0, 0xeb, 0x46, 0x1f, 0x8b, 0xfe, 0x1e, 0x9b, - 0x3, 0xed, 0x40, 0x1f, 0xad, 0x74, 0x47, 0x1b, 0x86, 0x96, - 0xd5, 0x17, 0xde, 0x6c, 0xb1, 0x14, 0x5e, 0xd2, 0x47, 0x6f, - 0x45, 0x72, 0xf0, 0x7c, 0x49, 0xd0, 0x67, 0xe9, 0x7a, 0x83, - 0xea, 0x6a, 0xdc, 0x7e, 0x36, 0xd1, 0x65, 0xfb, 0xb7, 0xf1, - 0x9f, 0xc6, 0xb6, 0x55, 0xe9, 0x3d, 0xa4, 0xbe, 0xf2, 0xd5, - 0x58, 0x3d, 0xa4, 0x8d, 0xda, 0x2b, 0x32, 0x3f, 0x12, 0x69, - 0x92, 0xfd, 0xdb, 0xd8, 0xbf, 0xef, 0xaa, 0x9d, 0x35, 0x7b, - 0x29, 0x3e, 0xed, 0xd4, 0x47, 0xfe, 0x4, 0x2b, 0x45, 0x38, - 0xbd, 0x99, 0x7c, 0xd1, 0xee, 0x5c, 0xa2, 0xa1, 0x5b, 0xb8, - 0x1f, 0xee, 0xca, 0x87, 0xfe, 0x4, 0x2a, 0x41, 0x22, 0x37, - 0x46, 0x53, 0xf4, 0x35, 0x57, 0x45, 0xe, 0xa2, 0x93, 0x39, - 0xa5, 0xa6, 0x1, 0x45, 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, - 0x1, 0x45, 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, 0x1, 0x45, - 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, - 0x1, 0x45, 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, 0x1, 0x45, - 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, 0x1, 0x45, 0x14, 0x50, - 0x1, 0x45, 0x14, 0x50, 0x1, 0x48, 0x78, 0x14, 0xb4, 0xc9, - 0x5b, 0x64, 0x4e, 0xde, 0x80, 0x9a, 00, 0xf8, 0xdb, 0xf6, - 0x85, 0xba, 0xf3, 0x75, 0xd9, 0x87, 0xfb, 0x67, 0xf9, 0xd7, - 0x80, 0x78, 0x89, 0xf6, 0x59, 0x4d, 0xfe, 0xe9, 0xaf, 0x68, - 0xf8, 0xe1, 0x73, 0xe6, 0xf8, 0x82, 0x50, 0x4f, 0xf1, 0x93, - 0xfa, 0xd7, 0x84, 0x78, 0xc6, 0xf0, 0x41, 0xa7, 0x4c, 0x72, - 0x7, 0xca, 0x6b, 0xf2, 0xb7, 0xfb, 0xcc, 0x6c, 0xdf, 0x99, - 0xf8, 0xb7, 0x10, 0xce, 0xf5, 0x66, 0x6f, 0x7f, 0xc1, 0x3d, - 0xac, 0x1b, 0x50, 0xfd, 0xab, 0x75, 0x8b, 0xbd, 0xb9, 0x8e, - 0xcb, 0xc3, 0xf7, 0x4, 0x9f, 0x46, 0x79, 0xa1, 0x51, 0xfa, - 0x66, 0xbf, 0x4f, 0x2b, 0xf3, 0x97, 0xfe, 0x9, 0x81, 0x68, - 0x6f, 0xfe, 0x2d, 0x7c, 0x4d, 0xd5, 0xa, 0x9d, 0xb6, 0xfa, - 0x75, 0xa5, 0xb0, 0x6c, 0x71, 0x99, 0x25, 0x91, 0x88, 0xcf, - 0xfd, 0xb3, 0x15, 0xfa, 0x35, 0x5f, 0xa5, 0xe1, 0xd5, 0xa9, - 0xa3, 0xf5, 0xc, 0x9e, 0x1e, 0xcf, 0x1, 0x4a, 0x3e, 0x48, - 0x28, 0xa2, 0x8a, 0xe9, 0x3d, 0x90, 0xa2, 0x8a, 0x28, 00, - 0xa2, 0x8a, 0x28, 00, 0xa2, 0x8a, 0x28, 00, 0xa2, 0x8a, - 0x28, 00, 0xa2, 0x8a, 0x28, 00, 0xa8, 0xe4, 0x82, 0x29, - 0x46, 0x1e, 0x34, 0x71, 0xe8, 0xca, 0xd, 0x49, 0x45, 00, - 0x50, 0x9f, 0x41, 0xd3, 0x2e, 0x46, 0x26, 0xd3, 0xad, 0x25, - 0x1e, 0x8f, 0x2, 0x9f, 0xe6, 0x2b, 0x3e, 0xe3, 0xc0, 0x1e, - 0x19, 0xbb, 0xff, 00, 0x5b, 0xa0, 0x69, 0xad, 0xff, 00, - 0x6e, 0xa8, 0x3f, 0x90, 0xad, 0xfa, 0x2a, 0x1c, 0x20, 0xf7, - 0x46, 0x6e, 0x9c, 0x25, 0xbc, 0x51, 0xc5, 0xdd, 0xfc, 0x19, - 0xf0, 0x55, 0xe9, 0xcc, 0x9e, 0x1e, 0xb4, 0x1f, 0xf5, 0xcc, - 0x14, 0xfe, 0x44, 0x56, 0x45, 0xdf, 0xec, 0xe9, 0xe0, 0x4b, - 0xbc, 0xff, 00, 0xc4, 0xa0, 0xc3, 0x9f, 0xf9, 0xe7, 0x33, - 0x71, 0xf9, 0x93, 0x5e, 0x97, 0x45, 0x62, 0xf0, 0xd4, 0x65, - 0xbc, 0x17, 0xdc, 0x63, 0x2c, 0x26, 0x1e, 0x5b, 0xd3, 0x5f, - 0x72, 0x3c, 0x66, 0xef, 0xf6, 0x51, 0xf0, 0x4d, 0xce, 0x76, - 0x8b, 0xc8, 0x73, 0xfd, 0xd9, 0x10, 0xff, 00, 0x35, 0xac, - 0x9b, 0xaf, 0xd8, 0xeb, 0xc2, 0x93, 0x3, 0xe5, 0xdf, 0x5d, - 0xc6, 0x7f, 0xda, 0x54, 0x6f, 0xe8, 0x2b, 0xdf, 0x28, 0xac, - 0x9e, 0xb, 0xe, 0xfe, 0xc2, 0x30, 0x79, 0x76, 0x11, 0xff, - 00, 0xcb, 0xb4, 0x7c, 0xd5, 0x79, 0xfb, 0x13, 0xe8, 0xd2, - 0xff, 00, 0xa9, 0xd6, 0x9d, 0x7d, 0x9e, 0xd8, 0x1f, 0xfd, - 0x9a, 0xb0, 0xaf, 0x7f, 0x61, 0xa4, 0x6c, 0xf9, 0x1a, 0xbd, - 0xb3, 0xff, 00, 0xd7, 0x48, 0x4a, 0xff, 00, 0x8d, 0x7d, - 0x65, 0x45, 0x66, 0xf2, 0xfc, 0x3b, 0xfb, 0x3f, 0x8b, 0x32, - 0x79, 0x56, 0x11, 0xfd, 0x9f, 0xc5, 0xff, 00, 0x99, 0xf1, - 0x6d, 0xef, 0xec, 0x2f, 0xa9, 0xe0, 0x98, 0xee, 0x34, 0xe9, - 0x7d, 0x83, 0x11, 0xfc, 0xd6, 0xb9, 0xeb, 0xdf, 0xd8, 0x7f, - 0xc4, 0x28, 0xe, 0xcb, 0xb, 0x79, 0x7f, 0xdc, 0x99, 0x3f, - 0xa9, 0x15, 0xf7, 0x9d, 0x15, 0x9b, 0xcb, 0x68, 0xf4, 0x6d, - 0x7c, 0xcc, 0x25, 0x93, 0x61, 0x9e, 0xd7, 0x5f, 0x33, 0xf3, - 0xb6, 0xf3, 0xf6, 0x2d, 0xf1, 0x4c, 0x4a, 0x48, 0xd0, 0xe4, - 0x3f, 0xf5, 0xce, 0x44, 0x6f, 0xe4, 0xd5, 0x87, 0x7d, 0xfb, - 0x22, 0x78, 0xae, 0xd7, 0x27, 0xfb, 0xb, 0x50, 0xff, 00, - 0x80, 0x46, 0xcd, 0xfc, 0xab, 0xf4, 0xba, 0x8a, 0x8f, 0xec, - 0xc8, 0xf4, 0x9b, 0xfc, 0xe, 0x79, 0x64, 0x54, 0x1e, 0xd2, - 0x7f, 0x87, 0xf9, 0x1f, 0x96, 0x37, 0xbf, 0xb3, 0x77, 0x88, - 0xec, 0x98, 0xac, 0x9a, 0x6e, 0xa5, 0xb, 0x7a, 0x34, 0x2c, - 0x3f, 0xa5, 0x62, 0xdd, 0x7c, 0x18, 0xd6, 0xad, 0x1b, 0x69, - 0x17, 0x31, 0x91, 0xd9, 0x97, 0x15, 0xfa, 0xd1, 0x51, 0xbd, - 0xbc, 0x52, 0xe7, 0x7c, 0x48, 0xf9, 0xfe, 0xf2, 0x83, 0x50, - 0xf2, 0xd9, 0x74, 0xa9, 0xf8, 0x7f, 0xc1, 0x39, 0x65, 0xc3, - 0xb4, 0xa5, 0xf6, 0x97, 0xfe, 0x3, 0xff, 00, 0x4, 0xfc, - 0x8c, 0x97, 0xe1, 0xa6, 0xb9, 0x7, 0xdd, 0x92, 0x5f, 0xc5, - 0x4d, 0x57, 0x7f, 0x6, 0xf8, 0x86, 0xe, 0x8e, 0xdc, 0x7a, - 0x82, 0x2b, 0xf5, 0xae, 0x7f, 0xb, 0xe8, 0xd7, 0x24, 0x99, - 0xb4, 0x9b, 0x19, 0x49, 0xea, 0x5e, 0xdd, 0xf, 0xf4, 0xac, - 0xd9, 0xbe, 0x19, 0xf8, 0x4e, 0xe0, 0x93, 0x27, 0x87, 0x74, - 0xd2, 0x4f, 0x53, 0xf6, 0x65, 0x1f, 0xd2, 0xb3, 0x79, 0x75, - 0x6e, 0x93, 0x5f, 0x71, 0xc7, 0x3e, 0x18, 0xa6, 0xff, 00, - 0x97, 0xee, 0x3f, 0x28, 0xe, 0x8f, 0xe2, 0x38, 0x3d, 0x4f, - 0xe2, 0x69, 0x9f, 0xf1, 0x51, 0xc1, 0xd6, 0x26, 0x6f, 0xc6, - 0xbf, 0x54, 0x67, 0xf8, 0x29, 0xe0, 0x8b, 0x90, 0x43, 0xf8, - 0x76, 0xd0, 0x67, 0xba, 0xee, 0x5f, 0xe4, 0x6b, 0x1e, 0xef, - 0xf6, 0x6e, 0xf0, 0xd, 0xd0, 0xe3, 0x48, 0x68, 0x4f, 0xac, - 0x73, 0xbf, 0xf5, 0x26, 0xb2, 0x79, 0x75, 0x7f, 0xee, 0xbf, - 0xeb, 0xd0, 0xe4, 0x9f, 0xa, 0x45, 0xed, 0x18, 0xfd, 0xef, - 0xfc, 0x8f, 0xcc, 0x7f, 0xed, 0x6d, 0x7a, 0x1f, 0xbd, 0x6c, - 0xe6, 0x94, 0x78, 0xa7, 0x56, 0x8b, 0xef, 0xda, 0xc9, 0xff, - 00, 0x7c, 0x9a, 0xfd, 0x1f, 0xbc, 0xfd, 0x93, 0xbc, 0xf, - 0x73, 0xfe, 0xad, 0x2f, 0x20, 0xff, 00, 0x76, 0x45, 0x3f, - 0xcd, 0x6b, 0x12, 0xf7, 0xf6, 0x35, 0xf0, 0xbc, 0xf9, 0xf2, - 0x35, 0xb, 0x98, 0xbf, 0xdf, 0x8d, 0x5b, 0xf9, 0x62, 0xb1, - 0x96, 0x5f, 0x5b, 0xf9, 0x13, 0x38, 0xe5, 0xc2, 0x8d, 0x6d, - 0x1f, 0xba, 0x47, 0xe7, 0xf0, 0xf1, 0xcd, 0xe4, 0x63, 0xe7, - 0xb7, 0x71, 0xf5, 0x6, 0xa6, 0x4f, 0x88, 0x4e, 0xbf, 0x7a, - 0x32, 0x3f, 0x3a, 0xfb, 0x82, 0xef, 0xf6, 0x24, 0xd3, 0x64, - 0x3f, 0xb9, 0xd6, 0x94, 0xf, 0xf6, 0xed, 0x7f, 0xfb, 0x2a, - 0xc5, 0xbd, 0xfd, 0x86, 0x4b, 0x67, 0xc9, 0xd5, 0xac, 0xe4, - 0xf4, 0xf3, 0x22, 0x65, 0xff, 00, 0x1a, 0xc1, 0xe0, 0x2a, - 0x75, 0xa3, 0xf8, 0xaf, 0xf3, 0x39, 0x65, 0xc3, 0x15, 0x56, - 0xd1, 0x97, 0xde, 0xbf, 0xcc, 0xf9, 0x6, 0x3f, 0x88, 0xa9, - 0xfc, 0x40, 0x8a, 0xb5, 0x1f, 0xc4, 0x4b, 0x73, 0xd5, 0xb1, - 0xf8, 0xd7, 0xd2, 0xb7, 0xbf, 0xb0, 0xae, 0xaa, 0x1, 0xf2, - 0xa7, 0xd3, 0x26, 0xff, 00, 0x81, 0x11, 0xfc, 0xd6, 0xb9, - 0xfb, 0xef, 0xd8, 0x77, 0xc4, 0x71, 0x3, 0xb2, 0xc2, 0xd6, - 0x6f, 0xfa, 0xe7, 0x32, 0xff, 00, 0x52, 0x2b, 0x9, 0x60, - 0x7b, 0xd2, 0x67, 0x3c, 0xb8, 0x7b, 0x13, 0x1d, 0x9c, 0xfe, - 0xeb, 0x9e, 0x27, 0x1f, 0x8f, 0xad, 0x5b, 0x1f, 0xbc, 0xc5, - 0x59, 0x4f, 0x1b, 0x5a, 0xb7, 0xfc, 0xb5, 0x5f, 0xc6, 0xbd, - 0xe, 0xff, 00, 0xf6, 0x31, 0xf1, 0x4d, 0xbe, 0x4f, 0xf6, - 0x1c, 0x8c, 0x3d, 0x63, 0x60, 0xdf, 0xc8, 0xd7, 0x3f, 0x7b, - 0xfb, 0x28, 0xf8, 0x9a, 0xd4, 0x9c, 0xe8, 0x5a, 0x8a, 0xfb, - 0xac, 0xe, 0x7f, 0xa5, 0x61, 0x2c, 0x15, 0x35, 0xbc, 0x1a, - 0xf9, 0x1c, 0xd2, 0xc9, 0xb1, 0x70, 0xfb, 0x6f, 0xe7, 0x16, - 0x62, 0x27, 0x8b, 0xed, 0x5b, 0xfe, 0x5a, 0xa7, 0xe7, 0x53, - 0xa7, 0x89, 0xad, 0x9f, 0xa4, 0x89, 0xf9, 0xd5, 0x7b, 0xcf, - 0xd9, 0xd7, 0xc4, 0x36, 0x79, 0x2f, 0xa7, 0xea, 0x11, 0x1, - 0xfd, 0xe8, 0x58, 0x7f, 0x4a, 0xc6, 0xb8, 0xf8, 0x3b, 0xac, - 0xdb, 0x67, 0xfe, 0x3e, 0x13, 0x1f, 0xde, 0x43, 0x58, 0x3c, - 0x1d, 0xf, 0x34, 0x60, 0xf2, 0xfc, 0x64, 0x7e, 0xda, 0xf9, - 0xa3, 0xa8, 0x5d, 0x7a, 0xdd, 0xbf, 0x8d, 0x7f, 0x3a, 0x95, - 0x75, 0x78, 0xf, 0xf1, 0xa, 0xe1, 0x24, 0xf8, 0x6f, 0xad, - 0xc3, 0x9d, 0xb2, 0xc9, 0xf8, 0xa1, 0xaa, 0xef, 0xe0, 0xfd, - 0x7e, 0xe, 0x92, 0x31, 0xfc, 0xd, 0x47, 0xd4, 0xa8, 0xbd, - 0xa4, 0x67, 0xf5, 0x5c, 0x6a, 0xeb, 0x16, 0x7a, 0x38, 0xd4, - 0xa1, 0x6f, 0xe2, 0x14, 0xe1, 0x7d, 0x9, 0xfe, 0x31, 0x5e, - 0x62, 0xda, 0x47, 0x88, 0xa0, 0xe8, 0x49, 0xfc, 0x4d, 0x34, - 0xff, 00, 0xc2, 0x43, 0x7, 0x58, 0xd9, 0xbf, 0x1a, 0x87, - 0x97, 0xc7, 0xa4, 0x89, 0xf6, 0x58, 0xe5, 0xf6, 0x13, 0xf9, - 0x9e, 0xa6, 0x2e, 0xa3, 0x3f, 0xc4, 0x29, 0xc2, 0xe1, 0x4f, - 0x47, 0xfd, 0x6b, 0xca, 0x7f, 0xb5, 0xb5, 0xd8, 0x7e, 0xf5, - 0xb4, 0x87, 0xf0, 0xa7, 0xf, 0x14, 0xea, 0xb1, 0x7d, 0xeb, - 0x69, 0x3f, 0xef, 0x9a, 0x97, 0x97, 0x3e, 0x92, 0x44, 0xff, - 00, 0xb5, 0xc7, 0x7a, 0x47, 0xab, 0x8b, 0x93, 0xda, 0x53, - 0xf9, 0xd4, 0x89, 0x7d, 0x32, 0xfd, 0xd9, 0xd8, 0x7f, 0xc0, - 0xab, 0xc9, 0xd7, 0xc7, 0x17, 0x91, 0xfd, 0xfb, 0x77, 0x1f, - 0x81, 0xa9, 0x93, 0xe2, 0x13, 0xaf, 0xde, 0x8d, 0x85, 0x64, - 0xf2, 0xd9, 0xf4, 0xb0, 0x7b, 0x7c, 0x44, 0x77, 0xa7, 0x23, - 0xd6, 0x53, 0x58, 0xbd, 0x4f, 0xbb, 0x75, 0x28, 0xff, 00, - 0x81, 0x1a, 0xb1, 0x1f, 0x89, 0xb5, 0x38, 0xbe, 0xed, 0xe4, - 0xa3, 0xfe, 0x4, 0x6b, 0xc9, 0xa3, 0xf8, 0x88, 0x9d, 0xc3, - 0xf, 0xc6, 0xac, 0xc7, 0xf1, 0xa, 0x3, 0xfc, 0x44, 0x54, - 0x7f, 0x67, 0xd6, 0x5b, 0x21, 0xac, 0xc2, 0xac, 0x77, 0x52, - 0x5f, 0x79, 0xeb, 0x71, 0xf8, 0xe3, 0x5a, 0x8b, 0xa5, 0xf4, - 0x9f, 0xf7, 0xd5, 0x5c, 0x83, 0xe2, 0x6e, 0xbd, 0x6, 0x31, - 0x74, 0xc7, 0xea, 0x4d, 0x79, 0x14, 0x7e, 0x3e, 0xb6, 0x6e, - 0xaf, 0x8a, 0xb3, 0x1f, 0x8d, 0xad, 0x5b, 0xfe, 0x5a, 0x8a, - 0x5f, 0x55, 0xc4, 0x47, 0x6b, 0xfd, 0xec, 0xd5, 0x66, 0xf3, - 0x8f, 0xdb, 0x92, 0x3d, 0x8e, 0x1f, 0x8c, 0x3e, 0x20, 0x8b, - 0x1f, 0xe9, 0x4, 0xe3, 0xdc, 0xd6, 0x8d, 0xbf, 0xc7, 0x7d, - 0x7a, 0x1c, 0x7c, 0xe4, 0xff, 00, 0xc0, 0x8d, 0x78, 0x9a, - 0x78, 0xbe, 0xd5, 0xbf, 0xe5, 0xaa, 0xfe, 0x75, 0x3a, 0x78, - 0x9e, 0xd9, 0xff, 00, 0xe5, 0xa2, 0xfe, 0x74, 0x72, 0xe2, - 0xe1, 0xb3, 0x7f, 0x7b, 0x3a, 0x23, 0x9e, 0x54, 0x5f, 0xf2, - 0xf5, 0x9e, 0xef, 0x6f, 0xfb, 0x45, 0x6b, 0x71, 0x63, 0x73, - 0x31, 0xff, 00, 0x81, 0x1a, 0xd6, 0xb6, 0xfd, 0xa6, 0xf5, - 0x48, 0xb1, 0xb8, 0x39, 0xff, 00, 0x81, 0x57, 0xcf, 0x29, - 0xaf, 0xdb, 0xb7, 0xf1, 0xaf, 0xe7, 0x52, 0xae, 0xb1, 0x3, - 0x7f, 0x10, 0xfc, 0xea, 0xd6, 0x23, 0x1b, 0xd, 0xa6, 0xce, - 0xb8, 0x71, 0x5, 0x65, 0xb5, 0x53, 0xe9, 0x4b, 0x6f, 0xda, - 0x92, 0xec, 0x7f, 0xac, 0xdd, 0x5a, 0xd6, 0xdf, 0xb5, 0x42, - 0xf1, 0xbd, 0x41, 0xfa, 0x8a, 0xf9, 0x65, 0x75, 0x38, 0x4f, - 0xf1, 0xf, 0xce, 0x9e, 0x2f, 0xa1, 0x6f, 0xe2, 0x15, 0xa2, - 0xcc, 0x71, 0xf1, 0xfb, 0x6c, 0xeb, 0x8f, 0x11, 0x62, 0x3f, - 0x9d, 0x1f, 0x5b, 0xdb, 0x7e, 0xd4, 0x56, 0x6f, 0x8f, 0x30, - 0x20, 0xfc, 0x2b, 0x56, 0xf, 0xda, 0x63, 0x49, 0x93, 0x19, - 0xf2, 0xfe, 0xb9, 0x22, 0xbe, 0x35, 0x17, 0x31, 0x1f, 0xe2, - 0x14, 0xf1, 0x3a, 0x1e, 0x8f, 0xfa, 0xd6, 0xcb, 0x38, 0xc7, - 0x47, 0xed, 0x7e, 0x7, 0x5c, 0x78, 0x8f, 0x11, 0xe4, 0xcf, - 0xb6, 0xad, 0xff, 00, 0x68, 0x6d, 0xe, 0x5c, 0x6e, 0x78, - 0xc7, 0xfc, 0xa, 0xb4, 0xa0, 0xf8, 0xe7, 0xe1, 0xf9, 0xb1, - 0x89, 0x57, 0xfe, 0xfa, 0xaf, 0x85, 0x44, 0xe3, 0xb3, 0xfe, - 0xb4, 0xf5, 0xba, 0x91, 0x7a, 0x4a, 0xc3, 0xe8, 0xd5, 0xb2, - 0xcf, 0x71, 0x8b, 0x74, 0x8e, 0xa8, 0xf1, 0x25, 0x5e, 0xb1, - 0x3e, 0xf8, 0xb7, 0xf8, 0xb9, 0xa0, 0x4c, 0x1, 0xfb, 0x48, - 0x1f, 0x8d, 0x5d, 0x8b, 0xe2, 0x4e, 0x83, 0x37, 0xdd, 0xbc, - 0x5a, 0xfc, 0xff, 00, 0x5d, 0x46, 0xe5, 0x7a, 0x5c, 0x3f, - 0xfd, 0xf5, 0x53, 0xc7, 0xae, 0xea, 0x11, 0xfd, 0xdb, 0xb9, - 0x7, 0xd1, 0xab, 0x75, 0xc4, 0x35, 0xd6, 0xf0, 0x47, 0x44, - 0x78, 0x91, 0xf5, 0x81, 0xfa, 0xd, 0x1f, 0x8d, 0x74, 0x69, - 0x7a, 0x5f, 0x46, 0x3e, 0xa6, 0xac, 0xc7, 0xe2, 0x5d, 0x32, - 0x5f, 0xbb, 0x7b, 0x11, 0xfc, 0x6b, 0xf3, 0xe5, 0x3c, 0x5b, - 0xab, 0x47, 0x8c, 0x5e, 0xcb, 0xff, 00, 0x7d, 0x55, 0xb8, - 0x7c, 0x7f, 0xad, 0xc3, 0xf7, 0x6f, 0x5f, 0xf1, 0x35, 0xb2, - 0xe2, 0x29, 0x7d, 0xaa, 0x7f, 0x89, 0xd1, 0x1e, 0x24, 0xa6, - 0xf7, 0x89, 0xfa, 0x6, 0x9a, 0xb5, 0x9b, 0xfd, 0xdb, 0xa8, - 0x8f, 0xfc, 0x8, 0x54, 0xa9, 0x79, 0x3, 0xfd, 0xd9, 0x91, - 0xbe, 0x8c, 0x2b, 0xe0, 0x48, 0x7e, 0x29, 0xeb, 0xf1, 0x1f, - 0xf8, 0xfb, 0x73, 0xf8, 0xd6, 0x84, 0x1f, 0x1a, 0x7c, 0x41, - 0x7, 0xfc, 0xb7, 0x27, 0xf1, 0xad, 0xe3, 0xc4, 0x50, 0xeb, - 0x4d, 0xfe, 0x7, 0x44, 0x78, 0x87, 0xe, 0xf7, 0x4c, 0xfb, - 0xbc, 0x3a, 0x9e, 0x8c, 0xf, 0xe3, 0x4b, 0x90, 0x7b, 0xd7, - 0xc3, 0xf6, 0xff, 00, 0x1f, 0x35, 0xc8, 0xb1, 0xba, 0x47, - 0x6f, 0xf8, 0x15, 0x6a, 0x5b, 0xfe, 0xd2, 0x1a, 0xc4, 0x3d, - 0x4b, 0xff, 00, 0xdf, 0x55, 0xd1, 0x1e, 0x21, 0xc3, 0xbd, - 0xe2, 0xd1, 0xd1, 0x1c, 0xfb, 0x8, 0xfa, 0x9f, 0x66, 0xd1, - 0x5f, 0x22, 0xdb, 0x7e, 0xd3, 0xba, 0x8a, 0xe3, 0xcc, 0x32, - 0x1f, 0x6c, 0xd6, 0xad, 0xbf, 0xed, 0x4d, 0x38, 0xc6, 0xe0, - 0xdf, 0x8e, 0x2b, 0x68, 0xe7, 0xd8, 0x37, 0xbb, 0x6b, 0xe4, - 0x6f, 0x1c, 0xe7, 0x7, 0x2f, 0xb4, 0x7d, 0x4b, 0x45, 0x7c, - 0xdf, 0x6b, 0xfb, 0x52, 0x46, 0x71, 0xe6, 0x7e, 0xa2, 0xb5, - 0x2d, 0xff, 00, 0x69, 0xfb, 0x17, 0xc0, 0x65, 0x5f, 0xa9, - 0xad, 0xe3, 0x9d, 0x60, 0xa5, 0xf6, 0xce, 0x88, 0xe6, 0x78, - 0x59, 0x6d, 0x33, 0xdf, 0x28, 0xaf, 0x18, 0xb7, 0xfd, 0xa4, - 0x74, 0x87, 0xc6, 0xf3, 0x18, 0xff, 00, 0x81, 0x56, 0x9d, - 0xbf, 0xed, 0x3, 0xa1, 0xcd, 0x8e, 0x57, 0xfe, 0xfb, 0xae, - 0x88, 0xe6, 0x78, 0x39, 0x6d, 0x51, 0x1b, 0xac, 0x6e, 0x1e, - 0x5b, 0x4d, 0x1e, 0xa9, 0x45, 0x79, 0xec, 0x1f, 0x1a, 0xf4, - 0x9, 0x40, 0xcc, 0xa0, 0x7f, 0xc0, 0x85, 0x5f, 0x83, 0xe2, - 0xc6, 0x83, 0x39, 0xe2, 0xe3, 0x1f, 0x88, 0xae, 0x85, 0x8c, - 0xc3, 0xcb, 0x69, 0xa3, 0x55, 0x88, 0xa4, 0xf6, 0x92, 0x3b, - 0x3a, 0x2b, 0x9a, 0x8f, 0xe2, 0x16, 0x87, 0x27, 0xfc, 0xbe, - 0x28, 0xfc, 0x6a, 0xdc, 0x5e, 0x32, 0xd2, 0x26, 0x3f, 0x2d, - 0xec, 0x7f, 0x9d, 0x6c, 0xab, 0x52, 0x7b, 0x49, 0x1a, 0x2a, - 0x90, 0x7d, 0x4d, 0xaa, 0x2b, 0x39, 0x3c, 0x41, 0xa7, 0x3f, - 0x4b, 0xc8, 0xbf, 0xef, 0xaa, 0x9d, 0x35, 0x4b, 0x49, 0x3e, - 0xed, 0xcc, 0x67, 0xfe, 0x4, 0x2a, 0xd4, 0xe2, 0xf6, 0x65, - 0x73, 0x27, 0xd4, 0xb5, 0x55, 0xb5, 0x27, 0xf2, 0xac, 0x2e, - 0x1b, 0xd1, 0x9, 0xfd, 0x2a, 0x41, 0x73, 0xb, 0x74, 0x95, - 0xf, 0xfc, 0x8, 0x56, 0x4f, 0x8b, 0xb5, 0x58, 0x34, 0xef, - 0xf, 0x5e, 0xcd, 0x24, 0xaa, 0x2, 0xc6, 0x7f, 0x88, 0x52, - 0x9c, 0x92, 0x8b, 0x62, 0x94, 0x92, 0x8b, 0x67, 0xc3, 0xff, - 00, 0x18, 0xef, 0x47, 0xf6, 0xe4, 0xc4, 0x9f, 0xe2, 0x3f, - 0xce, 0xbe, 0x6a, 0xf8, 0x9d, 0xe2, 0x25, 0x8a, 0xdd, 0xe2, - 0x57, 0xc1, 0xc1, 0xef, 0x5e, 0xa7, 0xf1, 0xaf, 0xc6, 0xf0, - 0x7f, 0x69, 0x5c, 0x4a, 0xae, 0x32, 0x58, 0xe0, 0x66, 0xbe, - 0x67, 0xbe, 0x87, 0x53, 0xf8, 0x83, 0xe2, 0x5b, 0x1d, 0x13, - 0x4b, 0x89, 0xee, 0x75, 0x2d, 0x4a, 0xe1, 0x6d, 0xad, 0xe2, - 0x5e, 0x4b, 0x33, 0x1c, 0xa, 0xf8, 0x3c, 0xbf, 0xc, 0xe5, - 0x39, 0x56, 0x7d, 0x5b, 0xb1, 0xf8, 0x9d, 0x78, 0x4b, 0x33, - 0xcc, 0xb9, 0x21, 0xf0, 0xa6, 0x7e, 0x80, 0x7f, 0xc1, 0x2d, - 0xbc, 0x19, 0x36, 0x97, 0xf0, 0xa3, 0xc5, 0x3e, 0x28, 0xb8, - 0x8c, 0xab, 0x6b, 0xda, 0xb6, 0xd8, 0x58, 0xff, 00, 0x14, - 0x30, 0x26, 0xc0, 0x7f, 0xef, 0xb6, 0x93, 0xf2, 0xaf, 0xb5, - 0x6b, 0x88, 0xf8, 0x27, 0xf0, 0xda, 0xdf, 0xe1, 0xf, 0xc2, - 0x9f, 0xc, 0xf8, 0x42, 0xdc, 0xab, 0x8d, 0x2e, 0xcd, 0x22, - 0x92, 0x45, 0x18, 0xf3, 0x25, 0x3f, 0x34, 0x8d, 0xf8, 0xb1, - 0x63, 0x5d, 0xbd, 0x7d, 0xec, 0x23, 0xcb, 0x14, 0x8f, 0xda, - 0x68, 0xc3, 0xd9, 0x53, 0x8c, 0x3b, 0x20, 0xa2, 0x8a, 0x2a, - 0xcd, 0x82, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, - 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, - 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, - 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, - 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, - 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, - 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, - 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0x2, 0xa3, 0x92, - 0xde, 0x29, 0x86, 0x24, 0x89, 0x1c, 0x7f, 0xb4, 0xa0, 0xd4, - 0x94, 0x51, 0xb8, 0x19, 0x97, 0x3e, 0x19, 0xd1, 0xef, 0x41, - 0x17, 0x1a, 0x55, 0x94, 0xc0, 0xf6, 0x92, 0xdd, 0xf, 0xf3, - 0x15, 0x97, 0x75, 0xf0, 0xcb, 0xc2, 0x77, 0x83, 0x12, 0xf8, - 0x7b, 0x4f, 0x3f, 0xee, 0xc0, 0xab, 0xfc, 0xb1, 0x5d, 0x3d, - 0x15, 0x9b, 0xa7, 0x9, 0x6f, 0x14, 0x64, 0xe9, 0x53, 0x97, - 0xc5, 0x14, 0xfe, 0x47, 0x5, 0x75, 0xf0, 0x2b, 0xc0, 0xd7, - 0x9f, 0x7f, 0x40, 0x85, 0x7f, 0xdc, 0x91, 0xd7, 0xf9, 0x35, - 0x64, 0xdc, 0x7e, 0xcd, 0x1e, 0x2, 0xb8, 0x24, 0xff, 00, - 0x65, 0xcb, 0x1e, 0x7b, 0x24, 0xed, 0xfd, 0x73, 0x5e, 0xa7, - 0x45, 0x62, 0xf0, 0xb4, 0x1e, 0xf0, 0x5f, 0x71, 0x83, 0xc1, - 0xe1, 0xa5, 0xbd, 0x35, 0xf7, 0x23, 0xc5, 0xae, 0x7f, 0x64, - 0xbf, 0x3, 0x5c, 0x64, 0xa8, 0xbe, 0x8b, 0x3d, 0x2, 0xca, - 0xa4, 0xf, 0xcd, 0x6b, 0x16, 0xeb, 0xf6, 0x32, 0xf0, 0xb4, - 0xa1, 0xbc, 0xad, 0x46, 0xee, 0x33, 0xdb, 0x72, 0x29, 0xff, - 00, 0xa, 0xfa, 0xe, 0x8a, 0xcd, 0xe0, 0x70, 0xef, 0xec, - 0x19, 0x3c, 0xbb, 0x8, 0xff, 00, 0xe5, 0xda, 0x3e, 0x61, - 0xbb, 0xfd, 0x88, 0xb4, 0xe7, 0x53, 0xe4, 0xeb, 0x99, 0x3d, - 0x83, 0xdb, 0x60, 0x7f, 0xe8, 0x55, 0xcf, 0xdf, 0x7e, 0xc3, - 0x77, 0x27, 0xfd, 0x46, 0xa5, 0x63, 0x2f, 0xfb, 0xe1, 0x97, - 0xff, 00, 0x65, 0x35, 0xf5, 0xf5, 0x15, 0x93, 0xcb, 0xb0, - 0xef, 0x64, 0xd7, 0xcd, 0x98, 0xbc, 0xab, 0x8, 0xfe, 0xcd, - 0xbe, 0x6c, 0xf8, 0x92, 0xf7, 0xf6, 0x18, 0xd6, 0xb9, 0xf2, - 0xdb, 0x4e, 0x97, 0xfd, 0xd9, 0x48, 0xfe, 0x6a, 0x2b, 0x6, - 0xfb, 0xf6, 0x1e, 0xf1, 0x2c, 0x64, 0xec, 0xd3, 0xad, 0xa6, - 0xf7, 0x4b, 0x84, 0xfe, 0xa4, 0x57, 0xdf, 0x34, 0x54, 0x3c, - 0xb2, 0x8f, 0x46, 0xfe, 0xf3, 0x7, 0x93, 0x61, 0x9f, 0x57, - 0xf7, 0xff, 00, 0xc0, 0x3f, 0x39, 0xaf, 0x7f, 0x63, 0x1f, - 0x15, 0xdb, 0x92, 0x3f, 0xb0, 0x65, 0x6f, 0xfa, 0xe7, 0x22, - 0xb7, 0xf2, 0x26, 0xb0, 0x2f, 0x7f, 0x65, 0xf, 0x14, 0x5a, - 0x12, 0xe, 0x83, 0xa8, 0xae, 0x3f, 0xbb, 0x13, 0x37, 0xf2, - 0x15, 0xfa, 0x71, 0x45, 0x43, 0xcb, 0x23, 0xd2, 0x6c, 0xc2, - 0x59, 0x15, 0x7, 0xb4, 0x9f, 0xe1, 0xfe, 0x47, 0xe5, 0x3d, - 0xef, 0xec, 0xfd, 0xad, 0xd9, 0x13, 0xe6, 0x59, 0x5e, 0xc3, - 0xfe, 0xfa, 0x11, 0xfc, 0xc5, 0x64, 0x4f, 0xf0, 0x8f, 0x56, - 0xb7, 0x24, 0x3, 0x32, 0xff, 00, 0xbc, 0x2b, 0xf5, 0xb8, - 0xa8, 0x3d, 0x40, 0x35, 0xc, 0x96, 0x16, 0xd3, 0xc, 0x49, - 0x6f, 0x14, 0x83, 0xfd, 0xa4, 0x6, 0xb3, 0x79, 0x6c, 0xfa, - 0x54, 0xfc, 0x3f, 0xe0, 0x9c, 0x92, 0xe1, 0xda, 0x72, 0xfb, - 0x4b, 0xff, 00, 0x1, 0xff, 00, 0x82, 0x7e, 0x45, 0xc9, - 0xf0, 0xeb, 0x5a, 0x83, 0xa4, 0x8f, 0xf8, 0xa9, 0xaa, 0xcf, - 0xe1, 0x1d, 0x7e, 0x1e, 0x8f, 0xf9, 0xe4, 0x57, 0xeb, 0x7c, - 0xfe, 0x15, 0xd1, 0x6e, 0xbf, 0xd7, 0x69, 0x16, 0x32, 0xff, - 00, 0xbf, 0x6c, 0x87, 0xfa, 0x56, 0x65, 0xcf, 0xc3, 0xf, - 0x9, 0x5d, 0xff, 00, 0xad, 0xf0, 0xee, 0x9c, 0x7d, 0xc5, - 0xba, 0xaf, 0xf2, 0xa8, 0x79, 0x75, 0x6e, 0x93, 0x4f, 0xe4, - 0x72, 0x4f, 0x86, 0x29, 0xbd, 0xb9, 0x7e, 0xe3, 0xf2, 0x7c, - 0xe9, 0x3e, 0x22, 0x83, 0xa7, 0x3f, 0xf0, 0x23, 0x4d, 0xff, - 00, 0x8a, 0x8a, 0x1f, 0xf9, 0x66, 0x5b, 0x1e, 0xf5, 0xfa, - 0x9b, 0x75, 0xf0, 0x2b, 0xc0, 0xb7, 0x79, 0xdf, 0xe1, 0xeb, - 0x75, 0xcf, 0xfc, 0xf3, 0x77, 0x5f, 0xe4, 0x6b, 0x26, 0xe7, - 0xf6, 0x67, 0xf0, 0x5, 0xc0, 0x23, 0xfb, 0x2a, 0x48, 0xb3, - 0xdd, 0x27, 0x6f, 0xeb, 0x9a, 0xc9, 0xe5, 0xf5, 0xff, 00, - 0xba, 0xff, 00, 0xaf, 0x43, 0x8e, 0x7c, 0x29, 0x17, 0xf6, - 0x63, 0xf7, 0xbf, 0xf2, 0x3f, 0x32, 0x3f, 0xb5, 0xb5, 0xc8, - 0x4f, 0xcd, 0x6e, 0xe7, 0xf0, 0xcd, 0x28, 0xf1, 0x46, 0xab, - 0x17, 0xdf, 0xb7, 0x7f, 0xfb, 0xe6, 0xbf, 0x48, 0x2e, 0xff, - 00, 0x64, 0xbf, 0x2, 0xdc, 0x8f, 0x91, 0x2f, 0x61, 0xff, - 00, 0x76, 0x55, 0x3f, 0xcd, 0x6b, 0x1e, 0xf3, 0xf6, 0x33, - 0xf0, 0xa4, 0xc3, 0xf7, 0x1a, 0x85, 0xe4, 0x47, 0xfd, 0xb5, - 0x56, 0xff, 00, 0xa, 0xc9, 0xe0, 0x2b, 0x7f, 0x22, 0x67, - 0x24, 0xb8, 0x51, 0xad, 0xa1, 0xf7, 0x48, 0xfc, 0xfa, 0x5f, - 0x1c, 0x5d, 0xc7, 0xf7, 0xe1, 0x61, 0xff, 00, 0x1, 0x35, - 0x32, 0x7c, 0x41, 0x71, 0xf7, 0x90, 0x8f, 0xce, 0xbe, 0xe2, - 0xbd, 0xfd, 0x88, 0x74, 0xc9, 0x3f, 0xe3, 0xdf, 0x5b, 0xc0, - 0xff, 00, 0xa6, 0x96, 0xdf, 0xe0, 0xd5, 0x81, 0x79, 0xfb, - 0xc, 0x4e, 0xcc, 0x7c, 0x9d, 0x52, 0xc5, 0xd7, 0xb6, 0xf5, - 0x65, 0x3f, 0xfa, 0x9, 0xac, 0x1e, 0x2, 0xa7, 0x5a, 0x5f, - 0x91, 0xcb, 0x2e, 0x17, 0xab, 0x1d, 0xa3, 0x2f, 0xbd, 0x7f, - 0x99, 0xf2, 0x24, 0x7f, 0x11, 0x13, 0xbe, 0x6a, 0xd4, 0x7f, - 0x10, 0xa0, 0x38, 0xcb, 0x11, 0x5f, 0x4a, 0x5d, 0xfe, 0xc2, - 0xfa, 0xcf, 0x3e, 0x5b, 0xe9, 0xb2, 0xe, 0xd8, 0x90, 0x8f, - 0xe6, 0xb5, 0x83, 0x79, 0xfb, 0xe, 0xf8, 0x99, 0x41, 0x29, - 0xa7, 0xdb, 0x49, 0xfe, 0xe5, 0xc2, 0xf, 0xeb, 0x58, 0x3c, - 0xf, 0x7a, 0x4c, 0xe6, 0x97, 0xe, 0xe2, 0x23, 0xb7, 0x3f, - 0xdd, 0x73, 0xc4, 0xa3, 0xf1, 0xed, 0xb3, 0x7f, 0xcb, 0x4f, - 0xd2, 0xac, 0xc7, 0xe3, 0x7b, 0x66, 0xff, 00, 0x96, 0xa2, - 0xbd, 0x16, 0xf7, 0xf6, 0x2e, 0xf1, 0x64, 0xa, 0xcd, 0xfd, - 0x83, 0x23, 0x1, 0xff, 00, 0x3c, 0xe5, 0x56, 0xfd, 0x3, - 0x57, 0x3f, 0x7d, 0xfb, 0x28, 0x78, 0xa6, 0xd0, 0x16, 0x7d, - 0x3, 0x51, 0x50, 0x3b, 0xac, 0x4c, 0x7f, 0xa5, 0x60, 0xf0, - 0x54, 0xd6, 0xf0, 0x6b, 0xe4, 0x73, 0xcb, 0x25, 0xc5, 0xc3, - 0xed, 0xc9, 0x7a, 0xa6, 0x61, 0x27, 0x8c, 0x2d, 0x5b, 0xfe, - 0x5a, 0xad, 0x58, 0x4f, 0x14, 0x5b, 0x3f, 0xfc, 0xb4, 0x5f, - 0xce, 0xaa, 0x5f, 0x7e, 0xcf, 0xda, 0xe5, 0x8e, 0x7c, 0xdb, - 0x1b, 0xf8, 0xf, 0xfb, 0x71, 0xb0, 0xfe, 0x62, 0xb2, 0x27, - 0xf8, 0x47, 0xaa, 0xdb, 0xe7, 0x99, 0xd7, 0xea, 0xb5, 0x83, - 0xc2, 0x50, 0xf4, 0x39, 0xde, 0x5f, 0x8b, 0x8f, 0xfc, 0xbc, - 0x5f, 0x34, 0x75, 0x2b, 0xaf, 0xdb, 0xb7, 0xf1, 0x8f, 0xce, - 0xa5, 0x5d, 0x62, 0x16, 0xee, 0x2b, 0x83, 0x93, 0xe1, 0xd6, - 0xb3, 0xf, 0xdd, 0x95, 0xc7, 0xd5, 0x6a, 0xbb, 0xf8, 0x3f, - 0x5e, 0x83, 0xa4, 0x9f, 0xce, 0xb3, 0xfa, 0x95, 0x17, 0xb4, - 0x88, 0xfa, 0xae, 0x35, 0x6d, 0x28, 0xb3, 0xd2, 0x6, 0xa9, - 0x9, 0xfe, 0x2a, 0x78, 0xbf, 0x84, 0xff, 00, 0x10, 0xaf, - 0x2f, 0x3a, 0x37, 0x88, 0x61, 0xe8, 0x73, 0xff, 00, 0x2, - 0xa6, 0x95, 0xf1, 0xc, 0x3d, 0x50, 0x9f, 0xa3, 0x54, 0xbc, - 0xbe, 0x1d, 0x24, 0x4f, 0xb1, 0xc7, 0x2f, 0xb2, 0x9f, 0xcc, - 0xf5, 0x51, 0x77, 0x11, 0xfe, 0x2a, 0x70, 0x9e, 0x33, 0xfc, - 0x55, 0xe5, 0x3, 0x52, 0xd7, 0xa1, 0xfb, 0xd0, 0x39, 0xa7, - 0x7f, 0xc2, 0x4d, 0xaa, 0xc5, 0xf7, 0xe0, 0x93, 0xfe, 0xf9, - 0xa9, 0x79, 0x77, 0x69, 0x12, 0xd6, 0x32, 0x3b, 0xd2, 0x3d, - 0x58, 0x4c, 0xbd, 0x9a, 0x9e, 0xb3, 0x11, 0xd2, 0x43, 0xf9, - 0xd7, 0x94, 0x2f, 0x8d, 0x6f, 0x53, 0xef, 0x42, 0xff, 00, - 0x8a, 0x9a, 0x95, 0x3e, 0x20, 0x4a, 0xbf, 0x79, 0x18, 0x7e, - 0x6, 0xb3, 0x79, 0x6c, 0xfa, 0x32, 0x7d, 0xae, 0x22, 0x3b, - 0xd2, 0x67, 0xaa, 0xad, 0xd4, 0x8b, 0xd2, 0x56, 0x1f, 0x8d, - 0x4c, 0x9a, 0xa5, 0xda, 0x7d, 0xdb, 0x89, 0x7, 0xd1, 0xab, - 0xcb, 0x23, 0xf8, 0x88, 0xbd, 0xc1, 0x15, 0x66, 0x3f, 0x88, - 0x50, 0x9e, 0xac, 0x6b, 0x37, 0x97, 0x55, 0x5d, 0x3, 0xeb, - 0xb5, 0x23, 0xbc, 0x64, 0x8f, 0x51, 0x8f, 0xc4, 0x3a, 0x8c, - 0x47, 0x2b, 0x75, 0x27, 0xfd, 0xf4, 0x6a, 0xdc, 0x5e, 0x33, - 0xd6, 0x22, 0xfb, 0xb7, 0x8e, 0x3f, 0x1a, 0xf2, 0xd8, 0xfc, - 0x7d, 0x6e, 0x7f, 0x8c, 0xd4, 0xeb, 0xe3, 0xab, 0x6c, 0x64, - 0xcb, 0x8a, 0xcf, 0xea, 0x35, 0xa3, 0xb2, 0x34, 0x59, 0xa4, - 0xa3, 0xd6, 0x4b, 0xef, 0x3d, 0x56, 0x1f, 0x88, 0x9a, 0xe4, - 0x3d, 0x2e, 0xd8, 0xfd, 0x4d, 0x5e, 0x8f, 0xe2, 0xe6, 0xbd, - 0x7, 0xfc, 0xbc, 0xd7, 0x8b, 0x5c, 0x7c, 0x42, 0xb4, 0x88, - 0x1f, 0xde, 0xd6, 0x16, 0xa7, 0xf1, 0x4e, 0xde, 0x30, 0x76, - 0x36, 0xe3, 0x5d, 0x14, 0xf0, 0x78, 0xa7, 0xb3, 0x6b, 0xe6, - 0xcd, 0x16, 0x73, 0x5f, 0x6a, 0x6e, 0x4c, 0xfa, 0x2f, 0xfe, - 0x17, 0xe6, 0xb1, 0x62, 0x32, 0xd3, 0xee, 0x23, 0xde, 0xb8, - 0x5f, 0x88, 0x3f, 0xb4, 0xad, 0xfd, 0xed, 0x94, 0xd0, 0xbd, - 0xe3, 0x7c, 0xc3, 0x5, 0x1, 0xe2, 0xbe, 0x7b, 0xd6, 0x7e, - 0x22, 0xde, 0x5f, 0x16, 0x58, 0x89, 0x55, 0x35, 0x99, 0xe1, - 0xdf, 0xb, 0xf8, 0x87, 0xe2, 0x26, 0xbb, 0x6f, 0xa5, 0xe8, - 0xd6, 0x17, 0x3a, 0xae, 0xa3, 0x70, 0xdb, 0x63, 0x82, 0x4, - 0x2c, 0x4f, 0xf8, 0x1, 0xea, 0x78, 0x15, 0xed, 0xd0, 0xc0, - 0xd4, 0x4a, 0xd5, 0x66, 0xdf, 0x95, 0xcd, 0xe3, 0x8b, 0xcc, - 0x71, 0x5e, 0xe5, 0x49, 0xf2, 0xc5, 0xf4, 0xea, 0xc8, 0x7c, - 0x53, 0xe2, 0xcb, 0x9f, 0x10, 0x5d, 0x33, 0xb3, 0x33, 0x64, - 0xf0, 0x7, 0x7a, 0xfb, 0xf3, 0xf6, 0x15, 0xfd, 0x91, 0x66, - 0xf0, 0x1a, 0x45, 0xf1, 0xf, 0xc6, 0x76, 0x5e, 0x5f, 0x88, - 0xee, 0x13, 0x3a, 0x5d, 0x94, 0x87, 0x26, 0xce, 0x26, 0x5e, - 0x64, 0x71, 0xda, 0x46, 0x7, 0xa7, 0xf0, 0x8f, 0x73, 0xc6, - 0xcf, 0xec, 0xb3, 0xfb, 0xb, 0xe9, 0xff, 00, 0xc, 0x65, - 0xb7, 0xf1, 0x37, 0x8d, 0xd2, 0xdf, 0x57, 0xf1, 0x3a, 0x10, - 0xf6, 0xd6, 0x6a, 0x7c, 0xcb, 0x7b, 0x2e, 0x3a, 0x9c, 0x8c, - 0x3c, 0x9e, 0xfd, 0x7, 0x6c, 0xf5, 0xaf, 0xae, 0xab, 0xe9, - 0xf0, 0xf8, 0x75, 0x4, 0x9b, 0x5e, 0x88, 0xfd, 0xf, 0x26, - 0xca, 0x56, 0x12, 0x2a, 0xa5, 0x45, 0x67, 0xd1, 0x7f, 0x9f, - 0x98, 0x51, 0x45, 0x15, 0xe8, 0x1f, 0x58, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, - 00, 0x14, 0x51, 0x45, 00, 0x14, 0x51, 0x45, 00, 0x14, - 0x51, 0x45, 00, 0x21, 00, 0xf5, 0xa8, 0xa5, 0xb3, 0xb7, - 0x9b, 0xfd, 0x64, 0x11, 0xc9, 0xfe, 0xf2, 0x3, 0x45, 0x14, - 0xad, 0x71, 0x5a, 0xe5, 0x19, 0xfc, 0x2d, 0xa3, 0x5c, 0x92, - 0x66, 0xd2, 0x2c, 0x65, 0x27, 0xbb, 0xdb, 0x21, 0xfe, 0x95, - 0x9b, 0x71, 0xf0, 0xcf, 0xc2, 0x77, 0x44, 0x99, 0x7c, 0x3b, - 0xa6, 0xb1, 0x3f, 0xf4, 0xec, 0xa3, 0xf9, 0xa, 0x28, 0xa8, - 0x74, 0xe0, 0xf7, 0x8a, 0x33, 0x74, 0xa9, 0xcb, 0x78, 0xaf, - 0xb8, 0xc7, 0xbb, 0xf8, 0x13, 0xe0, 0x5b, 0xdc, 0xef, 0xf0, - 0xfd, 0xba, 0x93, 0xde, 0x36, 0x65, 0xfe, 0x46, 0xb1, 0xee, - 0xff, 00, 0x66, 0x4f, 0x1, 0x5d, 0x74, 0xd3, 0xa5, 0x87, - 0xfe, 0xb9, 0xcc, 0x7f, 0xae, 0x68, 0xa2, 0xb1, 0x78, 0x5a, - 0xf, 0x78, 0x2f, 0xb8, 0xc2, 0x58, 0x3c, 0x34, 0xb7, 0xa6, - 0xbe, 0xe4, 0x63, 0x5d, 0x7e, 0xc8, 0xbe, 0xa, 0x9f, 0xee, - 0x49, 0x7d, 0x17, 0xb0, 0x74, 0x3f, 0xfb, 0x2d, 0x64, 0x5d, - 0x7e, 0xc6, 0x1e, 0x19, 0x97, 0x3e, 0x4e, 0xa9, 0x77, 0x17, - 0xfb, 0xd1, 0xab, 0x7f, 0x85, 0x14, 0x56, 0x6f, 0x3, 0x86, - 0x7f, 0x60, 0xc5, 0xe5, 0xd8, 0x47, 0xff, 00, 0x2e, 0xd1, - 0x8b, 0x7b, 0xfb, 0x10, 0x69, 0xd2, 0x3, 0xe4, 0x6b, 0xdc, - 0xf6, 0x12, 0x5a, 0xff, 00, 0x83, 0x56, 0xd, 0xf7, 0xec, - 0x31, 0x71, 0x83, 0xf6, 0x7d, 0x5a, 0xca, 0x53, 0xd8, 0x49, - 0x1b, 0x2f, 0xf4, 0x34, 0x51, 0x59, 0xbc, 0xbb, 0xe, 0xf6, - 0x56, 0xf9, 0xb3, 0x27, 0x95, 0x61, 0x1f, 0xd9, 0xb7, 0xcd, - 0x98, 0x17, 0xdf, 0xb0, 0xce, 0xb8, 0xa0, 0xf9, 0x6d, 0xa7, - 0x4f, 0xec, 0xb2, 0x63, 0xf9, 0xa8, 0xae, 0x7e, 0xff, 00, - 0xf6, 0x24, 0xf1, 0x44, 0x59, 0xd9, 0xa5, 0xc1, 0x37, 0xbc, - 0x73, 0x47, 0xfd, 0x5a, 0x8a, 0x2b, 0x29, 0x65, 0xb4, 0xba, - 0x37, 0xf7, 0xff, 00, 0xc0, 0x39, 0xe5, 0x93, 0x61, 0xba, - 0x37, 0xf7, 0xff, 00, 0xc0, 0x30, 0x2f, 0x3f, 0x63, 0x6f, - 0x16, 0x43, 0xff, 00, 0x32, 0xfc, 0xed, 0xff, 00, 0x5c, - 0xd9, 0x5b, 0xf9, 0x1a, 0xc1, 0xbf, 0xfd, 0x94, 0x3c, 0x55, - 0x6d, 0x90, 0x7c, 0x3f, 0xa9, 0x8f, 0x75, 0x85, 0x98, 0x7e, - 0x82, 0x8a, 0x2b, 0x86, 0xa6, 0x16, 0x34, 0xf6, 0x93, 0xfe, - 0xbe, 0x47, 0x97, 0x5f, 0x2c, 0xa3, 0x4d, 0x68, 0xdf, 0xe1, - 0xfe, 0x46, 0xb, 0x7e, 0xcc, 0x1e, 0x23, 0xb9, 0x9f, 0xcb, - 0x5d, 0x1e, 0xfc, 0xbe, 0x7a, 0x1b, 0x77, 0x3f, 0xd2, 0xb4, - 0x34, 0xff, 00, 0xd8, 0x8f, 0xc7, 0x7a, 0xc4, 0xaa, 0xb0, - 0xe8, 0x57, 0x10, 0x8c, 0xfd, 0xfb, 0x8c, 0x44, 0xb8, 0xf5, - 0xf9, 0x88, 0xa2, 0x8a, 0x58, 0x7a, 0x4e, 0xa4, 0xac, 0xe4, - 0xff, 00, 0xf, 0xf2, 0x38, 0x68, 0x65, 0x54, 0x31, 0x4e, - 0xd3, 0x6d, 0x7a, 0x5b, 0xfc, 0x8f, 0x62, 0xf8, 0x79, 0xff, - 00, 0x4, 0xdc, 0x88, 0x3a, 0x5c, 0x78, 0xc3, 0x5c, 0x8, - 0xa0, 0x83, 0xf6, 0x3d, 0x34, 0x6e, 0x63, 0xec, 0x64, 0x61, - 0x81, 0xf8, 0x3, 0xf5, 0xaf, 0xae, 0x3e, 0x1d, 0xfc, 0x27, - 0xf0, 0xaf, 0xc2, 0xad, 0x29, 0x6c, 0x3c, 0x33, 0xa3, 0xdb, - 0xe9, 0xc9, 0x8c, 0x3c, 0xca, 0xbb, 0xa6, 0x97, 0xdd, 0xdc, - 0xf2, 0x68, 0xa2, 0xbe, 0x82, 0x14, 0x61, 0x4f, 0x6d, 0xcf, - 0xac, 0xc1, 0xe5, 0x98, 0x5c, 0xe, 0xb4, 0x61, 0xaf, 0x77, - 0xab, 0xfb, 0xff, 00, 0xc8, 0xeb, 0xa8, 0xa2, 0x8a, 0xd8, - 0xf5, 0x42, 0x8a, 0x28, 0xa0, 0x2, 0x8a, 0x28, 0xa0, 0xf, - 0xff, 0xd9, 0}; - -static const char data_runtime_shtml[] = { - /* /runtime.shtml */ - 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, - 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, - 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, - 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, - 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, - 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, - 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, - 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, - 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, - 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, - 0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, - 0x4f, 0x44, 0x59, 0x20, 0x6f, 0x6e, 0x4c, 0x6f, 0x61, 0x64, - 0x3d, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, - 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, - 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x3d, - 0x27, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, - 0x68, 0x74, 0x6d, 0x6c, 0x27, 0x26, 0x71, 0x75, 0x6f, 0x74, - 0x3b, 0x2c, 0x32, 0x30, 0x30, 0x30, 0x29, 0x22, 0x3e, 0xd, - 0xa, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, 0x66, 0x61, 0x63, - 0x65, 0x3d, 0x22, 0x61, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x3e, - 0xd, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, - 0x22, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, - 0x6d, 0x6c, 0x22, 0x3e, 0x54, 0x61, 0x73, 0x6b, 0x20, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, - 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, - 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, - 0x22, 0x3e, 0x52, 0x75, 0x6e, 0x20, 0x54, 0x69, 0x6d, 0x65, - 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, - 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, - 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, - 0x22, 0x3e, 0x54, 0x43, 0x50, 0x20, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, - 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, - 0x65, 0x66, 0x3d, 0x22, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, - 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 0x3e, - 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, - 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, - 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, - 0x66, 0x72, 0x65, 0x65, 0x72, 0x74, 0x6f, 0x73, 0x2e, 0x6f, - 0x72, 0x67, 0x2f, 0x22, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, - 0x54, 0x4f, 0x53, 0x20, 0x48, 0x6f, 0x6d, 0x65, 0x70, 0x61, - 0x67, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, - 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, - 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, 0x6f, 0x2e, 0x73, 0x68, - 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x49, 0x4f, 0x3c, 0x2f, 0x61, - 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, - 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, - 0x6c, 0x6f, 0x67, 0x6f, 0x2e, 0x6a, 0x70, 0x67, 0x22, 0x3e, - 0x33, 0x37, 0x4b, 0x20, 0x6a, 0x70, 0x67, 0x3c, 0x2f, 0x61, - 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0x3c, 0x70, 0x3e, - 0xd, 0xa, 0x3c, 0x68, 0x72, 0x3e, 0xd, 0xa, 0x3c, 0x62, - 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x32, - 0x3e, 0x52, 0x75, 0x6e, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xd, 0xa, 0x50, 0x61, 0x67, - 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, - 0x20, 0x32, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x2e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, - 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x63, 0x6f, - 0x75, 0x72, 0x69, 0x65, 0x72, 0x22, 0x3e, 0x3c, 0x70, 0x72, - 0x65, 0x3e, 0x54, 0x61, 0x73, 0x6b, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x62, - 0x73, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x25, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x3c, 0x62, - 0x72, 0x3e, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, - 0x2a, 0x2a, 0x3c, 0x62, 0x72, 0x3e, 0xd, 0xa, 0x25, 0x21, - 0x20, 0x72, 0x75, 0x6e, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0xd, - 0xa, 0x3c, 0x2f, 0x70, 0x72, 0x65, 0x3e, 0x3c, 0x2f, 0x66, - 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, - 0x6e, 0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, - 0x79, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, - 0x3e, 0xd, 0xa, 0xd, 0xa, 0}; - -static const char data_stats_shtml[] = { - /* /stats.shtml */ - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, - 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, - 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, - 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, - 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, - 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, - 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, - 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, - 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, - 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, - 0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, - 0x4f, 0x44, 0x59, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, - 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, - 0x69, 0x61, 0x6c, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x61, 0x20, - 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x54, - 0x61, 0x73, 0x6b, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, - 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, - 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, - 0x3d, 0x22, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x52, 0x75, 0x6e, - 0x20, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, - 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, - 0x65, 0x66, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, - 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x54, 0x43, 0x50, - 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, - 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, - 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, - 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, - 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, - 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x72, - 0x74, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x22, 0x3e, - 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 0x53, 0x20, 0x48, - 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, - 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, - 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, - 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, - 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, - 0x72, 0x65, 0x66, 0x3d, 0x22, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, - 0x6a, 0x70, 0x67, 0x22, 0x3e, 0x33, 0x37, 0x4b, 0x20, 0x6a, - 0x70, 0x67, 0x3c, 0x2f, 0x61, 0x3e, 0xd, 0xa, 0x3c, 0x62, - 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x72, - 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0x3c, 0x70, 0x3e, - 0xd, 0xa, 0x3c, 0x68, 0x32, 0x3e, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xd, - 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, - 0x64, 0x74, 0x68, 0x3d, 0x22, 0x33, 0x30, 0x30, 0x22, 0x20, - 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, - 0x3e, 0xd, 0xa, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, - 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65, - 0x66, 0x74, 0x22, 0x3e, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, - 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x75, 0x72, - 0x69, 0x65, 0x72, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x65, 0x3e, - 0xd, 0xa, 0x49, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x6e, 0x74, 0xd, 0xa, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x64, 0x65, - 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x72, 0x6f, 0x70, - 0x70, 0x65, 0x64, 0xd, 0xa, 0x49, 0x50, 0x20, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x73, 0x20, 0x20, 0x20, 0x20, 0x49, 0x50, - 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x50, 0x20, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2c, 0x20, 0x68, 0x69, - 0x67, 0x68, 0x20, 0x62, 0x79, 0x74, 0x65, 0xd, 0xa, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x49, 0x50, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x2c, 0x20, 0x6c, 0x6f, 0x77, 0x20, 0x62, 0x79, 0x74, - 0x65, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x50, 0x20, 0x66, - 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0xd, 0xa, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0xd, 0xa, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xd, 0xa, 0x49, - 0x43, 0x4d, 0x50, 0x9, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, - 0x6e, 0x74, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, - 0x65, 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x79, 0x70, - 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0xd, 0xa, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0xd, 0xa, - 0x54, 0x43, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0xd, - 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x20, 0x73, 0x65, 0x6e, 0x74, 0xd, 0xa, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x64, - 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0xd, 0xa, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x20, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0xd, 0xa, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x44, 0x61, 0x74, 0x61, 0x20, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, - 0x74, 0x20, 0x41, 0x43, 0x4b, 0x73, 0xd, 0xa, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x52, 0x65, 0x73, 0x65, 0x74, 0x73, 0xd, 0xa, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x52, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x61, 0xd, 0xa, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x53, 0x79, 0x6e, 0x20, 0x74, 0x6f, 0x20, - 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x70, 0x6f, 0x72, - 0x74, 0xd, 0xa, 0x55, 0x44, 0x50, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, - 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x6e, 0x74, 0xd, - 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x20, 0x63, 0x68, 0x6b, 0x65, 0x72, 0x72, 0xd, 0xa, - 0x9, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4e, 0x6f, 0x20, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x61, 0x76, 0x61, 0x6c, 0x69, 0x61, 0x62, 0x6c, 0x65, 0xd, - 0xa, 0x3c, 0x2f, 0x70, 0x72, 0x65, 0x3e, 0x3c, 0x2f, 0x66, - 0x6f, 0x6e, 0x74, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, - 0x74, 0x64, 0x3e, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, 0x66, - 0x61, 0x63, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x75, 0x72, 0x69, - 0x65, 0x72, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x65, 0x3e, 0x25, - 0x21, 0x20, 0x6e, 0x65, 0x74, 0x2d, 0x73, 0x74, 0x61, 0x74, - 0x73, 0xd, 0xa, 0x3c, 0x2f, 0x70, 0x72, 0x65, 0x3e, 0x3c, - 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0x3c, 0x2f, 0x74, 0x64, - 0x3e, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0xd, - 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, - 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, 0x3c, - 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, 0xa, 0}; - -static const char data_tcp_shtml[] = { - /* /tcp.shtml */ - 0x2f, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, - 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, - 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, - 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, - 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, - 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, - 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, - 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, - 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, - 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, - 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, - 0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, - 0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, - 0x4f, 0x44, 0x59, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, - 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, - 0x69, 0x61, 0x6c, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x61, 0x20, - 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x54, - 0x61, 0x73, 0x6b, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, - 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, - 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, - 0x3d, 0x22, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x52, 0x75, 0x6e, - 0x20, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, - 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, - 0x65, 0x66, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, - 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x54, 0x43, 0x50, - 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, - 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, - 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, - 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, - 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, - 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x72, - 0x74, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x22, 0x3e, - 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 0x53, 0x20, 0x48, - 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, - 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, - 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, - 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, - 0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, - 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, - 0x72, 0x65, 0x66, 0x3d, 0x22, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, - 0x6a, 0x70, 0x67, 0x22, 0x3e, 0x33, 0x37, 0x4b, 0x20, 0x6a, - 0x70, 0x67, 0x3c, 0x2f, 0x61, 0x3e, 0xd, 0xa, 0x3c, 0x62, - 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x72, - 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0xd, 0xa, 0x3c, - 0x68, 0x32, 0x3e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xd, 0xa, 0x3c, - 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x3e, 0xd, 0xa, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x68, - 0x3e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x3c, 0x2f, 0x74, 0x68, - 0x3e, 0x3c, 0x74, 0x68, 0x3e, 0x52, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x3c, 0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x74, 0x68, 0x3e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x74, 0x68, 0x3e, - 0x3c, 0x74, 0x68, 0x3e, 0x52, 0x65, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3c, - 0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x74, 0x68, 0x3e, 0x54, 0x69, - 0x6d, 0x65, 0x72, 0x3c, 0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x74, - 0x68, 0x3e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x3c, 0x2f, 0x74, - 0x68, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0xd, 0xa, 0x25, - 0x21, 0x20, 0x74, 0x63, 0x70, 0x2d, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xd, 0xa, 0x3c, - 0x2f, 0x70, 0x72, 0x65, 0x3e, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, - 0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, - 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, - 0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, - 0xa, 0xd, 0xa, 0}; - -const struct httpd_fsdata_file file_404_html[] = {{NULL, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}}; - -const struct httpd_fsdata_file file_index_html[] = {{file_404_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}}; - -const struct httpd_fsdata_file file_index_shtml[] = {{file_index_html, data_index_shtml, data_index_shtml + 13, sizeof(data_index_shtml) - 13}}; - -const struct httpd_fsdata_file file_io_shtml[] = {{file_index_shtml, data_io_shtml, data_io_shtml + 10, sizeof(data_io_shtml) - 10}}; - -const struct httpd_fsdata_file file_logo_jpg[] = {{file_io_shtml, data_logo_jpg, data_logo_jpg + 10, sizeof(data_logo_jpg) - 10}}; - -const struct httpd_fsdata_file file_runtime_shtml[] = {{file_logo_jpg, data_runtime_shtml, data_runtime_shtml + 15, sizeof(data_runtime_shtml) - 15}}; - -const struct httpd_fsdata_file file_stats_shtml[] = {{file_runtime_shtml, data_stats_shtml, data_stats_shtml + 13, sizeof(data_stats_shtml) - 13}}; - -const struct httpd_fsdata_file file_tcp_shtml[] = {{file_stats_shtml, data_tcp_shtml, data_tcp_shtml + 11, sizeof(data_tcp_shtml) - 11}}; - -#define HTTPD_FS_ROOT file_tcp_shtml - -#define HTTPD_FS_NUMFILES 8 diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/makefsdata b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/makefsdata deleted file mode 100644 index a953cdd76..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/makefsdata +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/perl - -open(OUTPUT, "> httpd-fsdata.c"); - -chdir("httpd-fs"); - -opendir(DIR, "."); -@files = grep { !/^\./ && !/(CVS|~)/ } readdir(DIR); -closedir(DIR); - -foreach $file (@files) { - - if(-d $file && $file !~ /^\./) { - print "Processing directory $file\n"; - opendir(DIR, $file); - @newfiles = grep { !/^\./ && !/(CVS|~)/ } readdir(DIR); - closedir(DIR); - printf "Adding files @newfiles\n"; - @files = (@files, map { $_ = "$file/$_" } @newfiles); - next; - } -} - -foreach $file (@files) { - if(-f $file) { - - print "Adding file $file\n"; - - open(FILE, $file) || die "Could not open file $file\n"; - binmode FILE; - - $file =~ s-^-/-; - $fvar = $file; - $fvar =~ s-/-_-g; - $fvar =~ s-\.-_-g; - # for AVR, add PROGMEM here - print(OUTPUT "static const char data".$fvar."[] = {\n"); - print(OUTPUT "\t/* $file */\n\t"); - for($j = 0; $j < length($file); $j++) { - printf(OUTPUT "%#02x, ", unpack("C", substr($file, $j, 1))); - } - printf(OUTPUT "0,\n"); - - - $i = 0; - while(read(FILE, $data, 1)) { - if($i == 0) { - print(OUTPUT "\t"); - } - printf(OUTPUT "%#02x, ", unpack("C", $data)); - $i++; - if($i == 10) { - print(OUTPUT "\n"); - $i = 0; - } - } - print(OUTPUT "0};\n\n"); - close(FILE); - push(@fvars, $fvar); - push(@pfiles, $file); - } -} - -for($i = 0; $i < @fvars; $i++) { - $file = $pfiles[$i]; - $fvar = $fvars[$i]; - - if($i == 0) { - $prevfile = "NULL"; - } else { - $prevfile = "file" . $fvars[$i - 1]; - } - print(OUTPUT "const struct httpd_fsdata_file file".$fvar."[] = {{$prevfile, data$fvar, "); - print(OUTPUT "data$fvar + ". (length($file) + 1) .", "); - print(OUTPUT "sizeof(data$fvar) - ". (length($file) + 1) ."}};\n\n"); -} - -print(OUTPUT "#define HTTPD_FS_ROOT file$fvars[$i - 1]\n\n"); -print(OUTPUT "#define HTTPD_FS_NUMFILES $i\n"); diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.c b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.c deleted file mode 100644 index 8002fcb2e..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.c +++ /dev/null @@ -1,468 +0,0 @@ -/****************************************************************************** -* DISCLAIMER - -* This software is supplied by Renesas Technology Corp. and is only -* intended for use with Renesas products. No other uses are authorized. - -* This software is owned by Renesas Technology Corp. and is protected under -* all applicable laws, including copyright laws. - -* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES -* REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, -* INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -* PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY -* DISCLAIMED. - -* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS -* TECHNOLOGY CORP. NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE -* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES -* FOR ANY REASON RELATED TO THE THIS SOFTWARE, EVEN IF RENESAS OR ITS -* AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -* Renesas reserves the right, without notice, to make changes to this -* software and to discontinue the availability of this software. -* By using this software, you agree to the additional terms and -* conditions found by accessing the following link: -* http://www.renesas.com/disclaimer -****************************************************************************** -* Copyright (C) 2008. Renesas Technology Corp., All Rights Reserved. -******************************************************************************* -* File Name : phy.c -* Version : 1.01 -* Description : Ethernet PHY device driver -****************************************************************************** -* History : DD.MM.YYYY Version Description -* : 15.02.2010 1.00 First Release -* : 06.04.2010 1.01 RX62N changes -******************************************************************************/ - - -/****************************************************************************** -Includes , "Project Includes" -******************************************************************************/ -#include "iodefine.h" -#include "r_ether.h" -#include "phy.h" - -#include "FreeRTOS.h" -#include "task.h" -/****************************************************************************** -Typedef definitions -******************************************************************************/ - -/****************************************************************************** -Macro definitions -******************************************************************************/ - -/****************************************************************************** -Imported global variables and functions (from other files) -******************************************************************************/ - -/****************************************************************************** -Exported global variables and functions (to be accessed by other files) -******************************************************************************/ - -/****************************************************************************** -Private global variables and functions -******************************************************************************/ -uint16_t _phy_read( uint16_t reg_addr ); -void _phy_write( uint16_t reg_addr, uint16_t data ); -void _phy_preamble( void ); -void _phy_reg_set( uint16_t reg_addr, int32_t option ); -void _phy_reg_read( uint16_t *data ); -void _phy_reg_write( uint16_t data ); -void _phy_ta_z0( void ); -void _phy_ta_10( void ); -void _phy_mii_write_1( void ); -void _phy_mii_write_0( void ); - -/** - * External functions - */ - -/****************************************************************************** -* Function Name: phy_init -* Description : Resets Ethernet PHY device -* Arguments : none -* Return Value : none -******************************************************************************/ -int16_t phy_init( void ) -{ - uint16_t reg; - uint32_t count; - - /* Reset PHY */ - _phy_write(BASIC_MODE_CONTROL_REG, 0x8000); - - count = 0; - - do - { - vTaskDelay( 2 / portTICK_PERIOD_MS ); - reg = _phy_read(BASIC_MODE_CONTROL_REG); - count++; - } while (reg & 0x8000 && count < PHY_RESET_WAIT); - - if( count < PHY_RESET_WAIT ) - { - return R_PHY_OK; - } - - return R_PHY_ERROR; -} - -/****************************************************************************** -* Function Name: phy_set_100full -* Description : Set Ethernet PHY device to 100 Mbps full duplex -* Arguments : none -* Return Value : none -******************************************************************************/ -void phy_set_100full( void ) -{ - _phy_write(BASIC_MODE_CONTROL_REG, 0x2100); -} - -/****************************************************************************** -* Function Name: phy_set_10half -* Description : Sets Ethernet PHY device to 10 Mbps half duplexR -* Arguments : none -* Return Value : none -******************************************************************************/ -void phy_set_10half( void ) -{ - _phy_write(BASIC_MODE_CONTROL_REG, 0x0000); -} - -/****************************************************************************** -* Function Name: phy_set_autonegotiate -* Description : Starts autonegotiate and reports the other side's -* : physical capability -* Arguments : none -* Return Value : bit 8 - Full duplex 100 mbps -* : bit 7 - Half duplex 100 mbps -* : bit 6 - Full duplex 10 mbps -* : bit 5 - Half duplex 10 mbps -* : bit 4:0 - Always set to 00001 (IEEE 802.3) -* : -1 if error -******************************************************************************/ -int16_t phy_set_autonegotiate( void ) -{ - uint16_t reg; - uint32_t count; - - _phy_write(AN_ADVERTISEMENT_REG, 0x01E1); - _phy_write(BASIC_MODE_CONTROL_REG, 0x1200); - - count = 0; - - do - { - reg = _phy_read(BASIC_MODE_STATUS_REG); - count++; - vTaskDelay( 100 / portTICK_PERIOD_MS ); - - /* Make sure we don't break out if reg just contains 0xffff. */ - if( reg == 0xffff ) - { - reg = 0; - } - - } while (!(reg & 0x0020) && (count < PHY_AUTO_NEGOTIATON_WAIT)); - - if (count >= PHY_AUTO_NEGOTIATON_WAIT) - { - return R_PHY_ERROR; - } - else - { - /* Get the link partner response */ - reg = (int16_t)_phy_read(AN_LINK_PARTNER_ABILITY_REG); - - if (reg & ( 1 << 8 ) ) - { - return PHY_LINK_100F; - } - if (reg & ( 1 << 7 ) ) - { - return PHY_LINK_100H; - } - if (reg & ( 1 << 6 ) ) - { - return PHY_LINK_10F; - } - if (reg & 1 << 5 ) - { - return PHY_LINK_10H; - } - - return (-1); - } -} - - -/** - * Internal functions - */ - -/****************************************************************************** -* Function Name: _phy_read -* Description : Reads a PHY register -* Arguments : reg_addr - address of the PHY register -* Return Value : read value -******************************************************************************/ -uint16_t _phy_read( uint16_t reg_addr ) -{ - uint16_t data; - - _phy_preamble(); - _phy_reg_set( reg_addr, PHY_READ ); - _phy_ta_z0(); - _phy_reg_read( &data ); - _phy_ta_z0(); - - return( data ); -} - -/****************************************************************************** -* Function Name: _phy_write -* Description : Writes to a PHY register -* Arguments : reg_addr - address of the PHY register -* : data - value -* Return Value : none -******************************************************************************/ -void _phy_write( uint16_t reg_addr, uint16_t data ) -{ - _phy_preamble(); - _phy_reg_set( reg_addr, PHY_WRITE ); - _phy_ta_10(); - _phy_reg_write( data ); - _phy_ta_z0(); -} - -/****************************************************************************** -* Function Name: _phy_preamble -* Description : As preliminary preparation for access to the PHY module register, -* "1" is output via the MII management interface. -* Arguments : none -* Return Value : none -******************************************************************************/ -void _phy_preamble( void ) -{ - int16_t i; - - i = 32; - while( i > 0 ) - { - _phy_mii_write_1(); - i--; - } -} - -/****************************************************************************** -* Function Name: _phy_reg_set -* Description : Sets a PHY device to read or write mode -* Arguments : reg_addr - address of the PHY register -* : option - mode -* Return Value : none -******************************************************************************/ -void _phy_reg_set( uint16_t reg_addr, int32_t option ) -{ - int32_t i; - uint16_t data; - - data = 0; - data = (PHY_ST << 14); /* ST code */ - - if( option == PHY_READ ) - { - data |= (PHY_READ << 12); /* OP code(RD) */ - } - else - { - data |= (PHY_WRITE << 12); /* OP code(WT) */ - } - - data |= (PHY_ADDR << 7); /* PHY Address */ - data |= (reg_addr << 2); /* Reg Address */ - - i = 14; - while( i > 0 ) - { - if( (data & 0x8000) == 0 ) - { - _phy_mii_write_0(); - } - else - { - _phy_mii_write_1(); - } - data <<= 1; - i--; - } -} - -/****************************************************************************** -* Function Name: _phy_reg_read -* Description : Reads PHY register through MII interface -* Arguments : data - pointer to store the data read -* Return Value : none -******************************************************************************/ -void _phy_reg_read( uint16_t *data ) -{ - int32_t i, j; - uint16_t reg_data; - - reg_data = 0; - i = 16; - while( i > 0 ) - { - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000000; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000001; - } - - reg_data <<= 1; - reg_data |= (uint16_t)((ETHERC.PIR.LONG & 0x00000008) >> 3); /* MDI read */ - - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000001; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000000; - } - i--; - } - *data = reg_data; -} - -/****************************************************************************** -* Function Name: _phy_reg_write -* Description : Writes to PHY register through MII interface -* Arguments : data - value to write -* Return Value : none -******************************************************************************/ -void _phy_reg_write( uint16_t data ) -{ - int32_t i; - - i = 16; - while( i > 0 ) - { - if( (data & 0x8000) == 0 ) - { - _phy_mii_write_0(); - } - else - { - _phy_mii_write_1(); - } - i--; - data <<= 1; - } -} - -/****************************************************************************** -* Function Name: _phy_ta_z0 -* Description : Performs bus release so that PHY can drive data -* : for read operation -* Arguments : none -* Return Value : none -******************************************************************************/ -void _phy_ta_z0( void ) -{ - int32_t j; - - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000000; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000001; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000001; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000000; - } -} - -/****************************************************************************** -* Function Name: _phy_ta_10 -* Description : Switches data bus so MII interface can drive data -* : for write operation -* Arguments : none -* Return Value : none -******************************************************************************/ -void _phy_ta_10(void) -{ - _phy_mii_write_1(); - _phy_mii_write_0(); -} - -/****************************************************************************** -* Function Name: _phy_mii_write_1 -* Description : Outputs 1 to the MII interface -* Arguments : none -* Return Value : none -******************************************************************************/ -void _phy_mii_write_1( void ) -{ - int32_t j; - - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000006; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000007; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000007; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000006; - } -} - -/****************************************************************************** -* Function Name: _phy_mii_write_0 -* Description : Outputs 0 to the MII interface -* Arguments : none -* Return Value : none -******************************************************************************/ -void _phy_mii_write_0( void ) -{ - int32_t j; - - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000002; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000003; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000003; - } - for(j = MDC_WAIT; j > 0; j--) - { - ETHERC.PIR.LONG = 0x00000002; - } -} - - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.h deleted file mode 100644 index 50415a7f7..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/phy.h +++ /dev/null @@ -1,84 +0,0 @@ -/****************************************************************************** -* DISCLAIMER -* Please refer to http://www.renesas.com/disclaimer -****************************************************************************** - Copyright (C) 2008. Renesas Technology Corp., All Rights Reserved. -******************************************************************************* -* File Name : phy.h -* Version : 1.02 -* Description : Ethernet PHY device driver -****************************************************************************** -* History : DD.MM.YYYY Version Description -* : 15.02.2010 1.00 First Release -* : 17.03.2010 1.01 Modification of macro definitions for access timing -* : 06.04.2010 1.02 RX62N changes -******************************************************************************/ - -#ifndef PHY_H -#define PHY_H - -/****************************************************************************** -Includes , "Project Includes" -******************************************************************************/ -#include - -/****************************************************************************** -Typedef definitions -******************************************************************************/ - -/****************************************************************************** -Macro definitions -******************************************************************************/ -/* Standard PHY Registers */ -#define BASIC_MODE_CONTROL_REG 0 -#define BASIC_MODE_STATUS_REG 1 -#define PHY_IDENTIFIER1_REG 2 -#define PHY_IDENTIFIER2_REG 3 -#define AN_ADVERTISEMENT_REG 4 -#define AN_LINK_PARTNER_ABILITY_REG 5 -#define AN_EXPANSION_REG 6 - -/* Media Independent Interface */ -#define PHY_ST 1 -#define PHY_READ 2 -#define PHY_WRITE 1 -#define PHY_ADDR 0x1F - -#define MDC_WAIT 2 - -/* PHY return definitions */ -#define R_PHY_OK 0 -#define R_PHY_ERROR -1 - -/* Auto-Negotiation Link Partner Status */ -#define PHY_AN_LINK_PARTNER_100BASE 0x0180 -#define PHY_AN_LINK_PARTNER_FULL 0x0140 -#define PHY_AN_COMPLETE ( 1 << 5 ) - -/* - * Wait counter definitions of PHY-LSI initialization - * ICLK = 96MHz -*/ -#define PHY_RESET_WAIT 0x00000020L -#define PHY_AUTO_NEGOTIATON_WAIT 75 - -#define PHY_AN_ENABLE 0x1200 -#define PHY_AN_10_100_F_H 0xde1 - -/****************************************************************************** -Variable Externs -******************************************************************************/ - -/****************************************************************************** -Functions Prototypes -******************************************************************************/ -/** - * External prototypes - **/ -int16_t phy_init( void ); -void phy_set_100full( void ); -void phy_set_10half( void ); -int16_t phy_set_autonegotiate( void ); - -#endif /* PHY_H */ - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/r_ether.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/r_ether.h deleted file mode 100644 index 13157ab5c..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/r_ether.h +++ /dev/null @@ -1,185 +0,0 @@ -/****************************************************************************** -* DISCLAIMER -* Please refer to http://www.renesas.com/disclaimer -****************************************************************************** - Copyright (C) 2008. Renesas Technology Corp., All Rights Reserved. -******************************************************************************* -* File Name : r_ether.h -* Version : 1.02 -* Description : Ethernet module device driver -****************************************************************************** -* History : DD.MM.YYYY Version Description -* : 15.02.2010 1.00 First Release -* : 03.03.2010 1.01 Buffer size is aligned on the 32-byte boundary. -* : 04.06.2010 1.02 RX62N changes -******************************************************************************/ - -#ifndef R_ETHER_H -#define R_ETHER_H - -/****************************************************************************** -Includes , "Project Includes" -******************************************************************************/ -#include - -/****************************************************************************** -Typedef definitions -******************************************************************************/ -struct Descriptor -{ - __evenaccess uint32_t status; -#if __LIT -/* Little endian */ - __evenaccess uint16_t size; - __evenaccess uint16_t bufsize; -#else -/* Big endian */ - __evenaccess uint16_t bufsize; - __evenaccess uint16_t size; - -#endif - int8_t *buf_p; - struct Descriptor *next; -}; - -typedef struct Descriptor ethfifo; - -typedef enum _NETLNK -{ - PHY_NO_LINK = 0, - PHY_LINK_10H, - PHY_LINK_10F, - PHY_LINK_100H, - PHY_LINK_100F - -} NETLNK; - -/****************************************************************************** -Macro definitions -******************************************************************************/ -#define BUFSIZE 256 /* Must be 32-bit aligned */ -#define ENTRY 8 /* Number of RX and TX buffers */ - -#define ACT 0x80000000 -#define DL 0x40000000 -#define FP1 0x20000000 -#define FP0 0x10000000 -#define FE 0x08000000 - -#define RFOVER 0x00000200 -#define RAD 0x00000100 -#define RMAF 0x00000080 -#define RRF 0x00000010 -#define RTLF 0x00000008 -#define RTSF 0x00000004 -#define PRE 0x00000002 -#define CERF 0x00000001 - -#define TAD 0x00000100 -#define CND 0x00000008 -#define DLC 0x00000004 -#define CD 0x00000002 -#define TRO 0x00000001 - -/** - * Renesas Ethernet API return defines - **/ -#define R_ETHER_OK 0 -#define R_ETHER_ERROR -1 - -/* Ether Interface definitions */ -#define ETH_RMII_MODE 0 -#define ETH_MII_MODE 1 -/* Select Ether Interface Mode */ -#define ETH_MODE_SEL ETH_MII_MODE - -/****************************************************************************** -Variable Externs -******************************************************************************/ - -/****************************************************************************** -Functions Prototypes -******************************************************************************/ -/** - * Renesas Ethernet API prototypes - **/ -int32_t R_Ether_Open(uint32_t ch, uint8_t mac_addr[]); -int32_t R_Ether_Close(uint32_t ch); -int32_t R_Ether_Write(uint32_t ch, void *buf, uint32_t len); -int32_t R_Ether_Read(uint32_t ch, void *buf); - -/** - * FreeRTOS Ethernet API prototypes. - */ - -/* - * Configure all the ethernet components (MAC, DMA, PHY) ready for communication. - */ -void vInitEmac( void ); - -/* - * Auto negotiate the link, returning pass or fail depending on whether a link - * was established or not. - */ -long lEMACWaitForLink( void ); - -/* - * Check the Rx status, and return the number of bytes received if any. - */ -unsigned long ulEMACRead( void ); - -/* - * Send uip_len bytes from uip_buf to the Tx descriptors and initiate a Tx. - */ -void vEMACWrite( void ); - - - - -/****************************************************/ -/* Ethernet statistic collection data */ -struct enet_stats -{ - uint32_t rx_packets; /* total packets received */ - uint32_t tx_packets; /* total packets transmitted */ - uint32_t rx_errors; /* bad packets received */ - uint32_t tx_errors; /* packet transmit problems */ - uint32_t rx_dropped; /* no space in buffers */ - uint32_t tx_dropped; /* no space available */ - uint32_t multicast; /* multicast packets received */ - uint32_t collisions; - - /* detailed rx_errors: */ - uint32_t rx_length_errors; - uint32_t rx_over_errors; /* receiver ring buffer overflow */ - uint32_t rx_crc_errors; /* recved pkt with crc error */ - uint32_t rx_frame_errors; /* recv'd frame alignment error */ - uint32_t rx_fifo_errors; /* recv'r fifo overrun */ - uint32_t rx_missed_errors; /* receiver missed packet */ - - /* detailed tx_errors */ - uint32_t tx_aborted_errors; - uint32_t tx_carrier_errors; - uint32_t tx_fifo_errors; - uint32_t tx_heartbeat_errors; - uint32_t tx_window_errors; -}; - -struct ei_device -{ - const int8_t *name; - uint8_t open; - uint8_t Tx_act; - uint8_t Rx_act; - uint8_t txing; /* Transmit Active */ - uint8_t irqlock; /* EDMAC's interrupt disabled when '1'. */ - uint8_t dmaing; /* EDMAC Active */ - ethfifo *rxcurrent; /* current receive discripter */ - ethfifo *txcurrent; /* current transmit discripter */ - uint8_t save_irq; /* Original dev->irq value. */ - struct enet_stats stat; - uint8_t mac_addr[6]; -}; - -#endif /* R_ETHER_H */ - diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/uip-conf.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/uip-conf.h deleted file mode 100644 index 00f739647..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/uip-conf.h +++ /dev/null @@ -1,167 +0,0 @@ -/** - * \addtogroup uipopt - * @{ - */ - -/** - * \name Project-specific configuration options - * @{ - * - * uIP has a number of configuration options that can be overridden - * for each project. These are kept in a project-specific uip-conf.h - * file and all configuration names have the prefix UIP_CONF. - */ - -/* - * Copyright (c) 2006, Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is part of the uIP TCP/IP stack - * - * $Id: uip-conf.h,v 1.6 2006/06/12 08:00:31 adam Exp $ - */ - -/** - * \file - * An example uIP configuration file - * \author - * Adam Dunkels - */ - -#ifndef __UIP_CONF_H__ -#define __UIP_CONF_H__ - -#define UIP_CONF_EXTERNAL_BUFFER -#define UIP_CONF_PROCESS_HTTPD_FORMS 1 - -/** - * 8 bit datatype - * - * This typedef defines the 8-bit type used throughout uIP. - * - * \hideinitializer - */ -typedef unsigned char u8_t; - -/** - * 16 bit datatype - * - * This typedef defines the 16-bit type used throughout uIP. - * - * \hideinitializer - */ -typedef unsigned short u16_t; - -typedef unsigned long u32_t; - -/** - * Statistics datatype - * - * This typedef defines the dataype used for keeping statistics in - * uIP. - * - * \hideinitializer - */ -typedef unsigned short uip_stats_t; - -/** - * Maximum number of TCP connections. - * - * \hideinitializer - */ -#define UIP_CONF_MAX_CONNECTIONS 40 - -/** - * Maximum number of listening TCP ports. - * - * \hideinitializer - */ -#define UIP_CONF_MAX_LISTENPORTS 40 - -/** - * uIP buffer size. - * - * \hideinitializer - */ -#define UIP_CONF_BUFFER_SIZE 1480 - -/** - * CPU byte order. - * - * \hideinitializer - */ -#ifdef __LIT -#define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN -#else -#define UIP_CONF_BYTE_ORDER UIP_BIG_ENDIAN -#endif - -/** - * Logging on or off - * - * \hideinitializer - */ -#define UIP_CONF_LOGGING 0 - -/** - * UDP support on or off - * - * \hideinitializer - */ -#define UIP_CONF_UDP 0 - -/** - * UDP checksums on or off - * - * \hideinitializer - */ -#define UIP_CONF_UDP_CHECKSUMS 1 - -/** - * uIP statistics on or off - * - * \hideinitializer - */ -#define UIP_CONF_STATISTICS 1 - -/* Here we include the header file for the application(s) we use in - our project. */ -/*#include "smtp.h"*/ -/*#include "hello-world.h"*/ -/*#include "telnetd.h"*/ -#include "webserver.h" -/*#include "dhcpc.h"*/ -/*#include "resolv.h"*/ -/*#include "webclient.h"*/ - -#define CCIF -#define CC_REGISTER_ARG - -#endif /* __UIP_CONF_H__ */ - -/** @} */ -/** @} */ diff --git a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/webserver.h b/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/webserver.h deleted file mode 100644 index 5267f0587..000000000 --- a/FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/webserver/webserver.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2002, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This file is part of the uIP TCP/IP stack - * - * $Id: webserver.h,v 1.2 2006/06/11 21:46:38 adam Exp $ - * - */ -#ifndef __WEBSERVER_H__ -#define __WEBSERVER_H__ - -#include "apps/httpd/httpd.h" - -typedef struct httpd_state uip_tcp_appstate_t; -/* UIP_APPCALL: the name of the application function. This function - must return void and take no arguments (i.e., C type "void - appfunc(void)"). */ -#define UIP_APPCALL httpd_appcall - - -#endif /* __WEBSERVER_H__ */ diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/FreeRTOSConfig.h index 84545e5b8..ce09cda75 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.c index bc4f93e26..47abfb128 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/ParTest.c b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/ParTest.c index 48cc680ec..4d44294ce 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/RegTest.S b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/RegTest.S index 72e477d18..1cb6bec04 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/RegTest.S +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/RegTest.S @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main.c b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main.c index 41a4d6746..697e30472 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_blinky.c b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_blinky.c index 1b6223777..b4060575f 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_blinky.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_full.c b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_full.c index b1f06c8ef..4cd30869d 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_full.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_GCC_e2studio/src/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/FreeRTOSConfig.h b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/FreeRTOSConfig.h index 84545e5b8..ce09cda75 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.c b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.c index 2e68a7364..a6949541a 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.h b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.h index d26057f9a..6d56a462f 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/ParTest.c b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/ParTest.c index 254632dee..f4b8a33aa 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/ParTest.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src index 3129412c9..44ff35377 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main.c b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main.c index 886f29807..12ac3b07f 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_blinky.c b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_blinky.c index 1b6223777..b4060575f 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_blinky.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c index cf2bf9d27..55f60ad17 100644 --- a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c +++ b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c index 7af648f06..937a5a473 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h index 8c19fbe9a..a61ff25a5 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c index bd91466fa..26b6fefdb 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S index 72e477d18..1cb6bec04 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_GCC.S @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s index 475239aeb..813677822 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/RegTest_IAR.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c index cdb58ab86..5198469a9 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h index cc63ff5fe..7d3872083 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/PriorityDefinitions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/main.c b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/main.c index 5ad5c694b..2c03faf50 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/main.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_GCC_e2studio_IAR/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c index 7af648f06..937a5a473 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Blinky_Demo/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/FreeRTOSConfig.h index eeccb1c17..e8a9f7f35 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c index d1632617b..c61922f45 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h index c42b95499..349ae52d7 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/IntQueueTimer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/main_full.c b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/main_full.c index 615e31255..19b4da04d 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/main_full.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/Full_Demo/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/main.c b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/main.c index 58f3197a1..f89ee7e91 100644 --- a/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/main.c +++ b/FreeRTOS/Demo/RX700_RX71M_RSK_Renesas_e2studio/src/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h index 3850ec184..1c30ae531 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c index c16da15b0..79d024856 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c index aab91f6fb..ee54571f5 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/flop.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c index 334e6a51f..8a9ea39cb 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src index 0f2c0ba82..f7558ce24 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c index 34282819a..f7df3984f 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/uIP_Task.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c index ad77ad6ad..5f0fdca75 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC_ISR.src b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC_ISR.src index 7f5e6f0a9..d9a2133e2 100644 --- a/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC_ISR.src +++ b/FreeRTOS/Demo/SuperH_SH7216_Renesas/RTOSDemo/webserver/EMAC_ISR.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/T-HEAD_CB2201_CDK/FreeRTOSConfig.h b/FreeRTOS/Demo/T-HEAD_CB2201_CDK/FreeRTOSConfig.h index ace104cd2..3d3813034 100644 --- a/FreeRTOS/Demo/T-HEAD_CB2201_CDK/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/T-HEAD_CB2201_CDK/FreeRTOSConfig.h @@ -1,101 +1,101 @@ -/* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H -#include "stdio.h" -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * - * See http://www.freertos.org/a00110.html. - *----------------------------------------------------------*/ - -#define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 0 -#define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ( ( unsigned long ) 24000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) (256) ) -#define configTOTAL_HEAP_SIZE ( ( size_t ) 16384 ) -#define configMAX_TASK_NAME_LEN ( 12 ) -#define configUSE_TRACE_FACILITY 0 -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_CO_ROUTINES 0 -#define configUSE_MUTEXES 1 -#define configCHECK_FOR_STACK_OVERFLOW 1 -#define configUSE_RECURSIVE_MUTEXES 0 -#define configQUEUE_REGISTRY_SIZE 10 -#define configUSE_MALLOC_FAILED_HOOK 1 -#define configUSE_STATS_FORMATTING_FUNCTIONS 1 -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY 1 -#define configTIMER_QUEUE_LENGTH 36 -#define configTIMER_TASK_STACK_DEPTH 1024 -#define configUSE_TIME_SLICING 1 -#define configUSE_COUNTING_SEMAPHORES 1 - -#define portCRITICAL_NESTING_IN_TCB 0 - - - - -/*#define configGENERATE_RUN_TIME_STATS 1*/ - -#define configMAX_PRIORITIES ( 200 ) -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - -/* Set the following definitions to 1 to include the API function, or zero -to exclude the API function. */ - -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_vTaskCleanUpResources 0 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 - -#define configASSERT( a ) do {if ((a)==0){printf("Assert : %s %d\r\n", __FILE__, __LINE__);while(1);}}while(0) - -#define configKERNEL_INTERRUPT_PRIORITY ( ( unsigned char ) 7 << ( unsigned char ) 5 ) /* Priority 7, or 255 as only the top three bits are implemented. This is the lowest priority. */ -#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( ( unsigned char ) 5 << ( unsigned char ) 5 ) /* Priority 5, or 160 as only the top three bits are implemented. */ - -extern volatile unsigned long ulHighFrequencyTimerTicks; -/* There is already a high frequency timer running - just reset its count back -to zero. */ -/* -#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() ( ulHighFrequencyTimerTicks = 0UL ) -#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTimerTicks -*/ -#endif /* FREERTOS_CONFIG_H */ +/* + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://www.FreeRTOS.org + * http://aws.amazon.com/freertos + * + * 1 tab == 4 spaces! + */ + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H +#include "stdio.h" +/*----------------------------------------------------------- + * Application specific definitions. + * + * These definitions should be adjusted for your particular hardware and + * application requirements. + * + * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE + * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. + * + * See http://www.freertos.org/a00110.html. + *----------------------------------------------------------*/ + +#define configUSE_PREEMPTION 1 +#define configUSE_IDLE_HOOK 0 +#define configUSE_TICK_HOOK 0 +#define configCPU_CLOCK_HZ ( ( unsigned long ) 24000000 ) +#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) (256) ) +#define configTOTAL_HEAP_SIZE ( ( size_t ) 16384 ) +#define configMAX_TASK_NAME_LEN ( 12 ) +#define configUSE_TRACE_FACILITY 0 +#define configUSE_16_BIT_TICKS 0 +#define configIDLE_SHOULD_YIELD 1 +#define configUSE_CO_ROUTINES 0 +#define configUSE_MUTEXES 1 +#define configCHECK_FOR_STACK_OVERFLOW 1 +#define configUSE_RECURSIVE_MUTEXES 0 +#define configQUEUE_REGISTRY_SIZE 10 +#define configUSE_MALLOC_FAILED_HOOK 1 +#define configUSE_STATS_FORMATTING_FUNCTIONS 1 +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY 1 +#define configTIMER_QUEUE_LENGTH 36 +#define configTIMER_TASK_STACK_DEPTH 1024 +#define configUSE_TIME_SLICING 1 +#define configUSE_COUNTING_SEMAPHORES 1 + +#define portCRITICAL_NESTING_IN_TCB 0 + + + + +/*#define configGENERATE_RUN_TIME_STATS 1*/ + +#define configMAX_PRIORITIES ( 200 ) +#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) + +/* Set the following definitions to 1 to include the API function, or zero +to exclude the API function. */ + +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_vTaskCleanUpResources 0 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelay 1 + +#define configASSERT( a ) do {if ((a)==0){printf("Assert : %s %d\r\n", __FILE__, __LINE__);while(1);}}while(0) + +#define configKERNEL_INTERRUPT_PRIORITY ( ( unsigned char ) 7 << ( unsigned char ) 5 ) /* Priority 7, or 255 as only the top three bits are implemented. This is the lowest priority. */ +#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( ( unsigned char ) 5 << ( unsigned char ) 5 ) /* Priority 5, or 160 as only the top three bits are implemented. */ + +extern volatile unsigned long ulHighFrequencyTimerTicks; +/* There is already a high frequency timer running - just reset its count back +to zero. */ +/* +#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() ( ulHighFrequencyTimerTicks = 0UL ) +#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTimerTicks +*/ +#endif /* FREERTOS_CONFIG_H */ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c index 42edfe6ec..e1a630d3b 100644 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c +++ b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c @@ -1,6 +1,6 @@ /* * FreeRTOS Kernel V10.0.0 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h index 5245d484c..807064ddf 100644 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h +++ b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h @@ -1,6 +1,6 @@ /* * FreeRTOS Kernel V10.0.0 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c index 3e47328cc..3eeb70026 100644 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c +++ b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c index 6fbd8a563..e273b7fef 100644 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c +++ b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S index 0256daf5b..371ebd3b6 100644 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S +++ b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h index 27883a20c..5288a9b16 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c index b3e738711..1debe3bdc 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h index 18a434717..15ba7f51b 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/InterruptNestTest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c index dfc17063d..b4ef55f10 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c index 156d58b8d..551b72bf0 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c index 51848e202..aa6ac0488 100644 --- a/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c +++ b/FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC/RTOSDemo/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h index 5cce56f98..aca52423b 100644 --- a/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/main.c b/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/main.c index b711cc62b..281ddae12 100644 --- a/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/FreeRTOSConfig.h deleted file mode 100644 index 8c96911fd..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/FreeRTOSConfig.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - *----------------------------------------------------------*/ - -#define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 1 -#define configUSE_TICK_HOOK 0 -#define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */ -#define configTOTAL_HEAP_SIZE ( ( size_t ) 0 ) /* This parameter has no effect when heap_3.c is included in the project. */ -#define configMAX_TASK_NAME_LEN ( 7 ) -#define configUSE_TRACE_FACILITY 1 -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_CO_ROUTINES 0 -#define configUSE_MUTEXES 1 -#define configCHECK_FOR_STACK_OVERFLOW 0 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configQUEUE_REGISTRY_SIZE 0 -#define configUSE_MALLOC_FAILED_HOOK 1 -#define configUSE_APPLICATION_TASK_TAG 0 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_ALTERNATIVE_API 0 - -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY 2 -#define configTIMER_QUEUE_LENGTH 20 -#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) - -#define configMAX_PRIORITIES ( 7 ) -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - - -/* Co-routine definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - -/* Set the following definitions to 1 to include the API function, or zero -to exclude the API function. */ - -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_vTaskCleanUpResources 0 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define INCLUDE_xTaskGetSchedulerState 1 - -/* This demo makes use of one or more example stats formatting functions. These -format the raw data provided by the xTaskGetSystemState() function in to human -readable ASCII form. See the notes in the implementation of vTaskList() within -FreeRTOS/Source/tasks.c for limitations. */ -#define configINCLUDE_STATS_FORMATTING_FUNCTIONS 1 - -/* Run time stats gathering definitions. */ -unsigned long ulMainGetRunTimeCounterValue( void ); -void vMainConfigureTimerForRunTimeStats( void ); -#define configGENERATE_RUN_TIME_STATS 1 -#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vMainConfigureTimerForRunTimeStats() -#define portGET_RUN_TIME_COUNTER_VALUE() ulMainGetRunTimeCounterValue() - - -extern void vAssertCalled( void ); -#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled() - -#define configNETWORK_INTERFACE_TO_USE 2L - -#define configMAC_ISR_SIMULATOR_PRIORITY ( 6 ) -#define configLWIP_TASK_PRIORITY ( 5 ) - -/* MAC address configuration. */ -#define configMAC_ADDR0 0x00 -#define configMAC_ADDR1 0x13 -#define configMAC_ADDR2 0x14 -#define configMAC_ADDR3 0x15 -#define configMAC_ADDR4 0x15 -#define configMAC_ADDR5 0x16 - -/* IP address configuration. */ -#define configIP_ADDR0 172 -#define configIP_ADDR1 25 -#define configIP_ADDR2 218 -#define configIP_ADDR3 200 - -/* Netmask configuration. */ -#define configNET_MASK0 255 -#define configNET_MASK1 255 -#define configNET_MASK2 255 -#define configNET_MASK3 0 - -/* The size of the global output buffer that is available for use when there -are multiple command interpreters running at once (for example, one on a UART -and one on TCP/IP). This is done to prevent an output buffer being defined by -each implementation - which would waste RAM. In this case, there is only one -command interpreter running, and it has its own local output buffer, so the -global buffer is just set to be one byte long as it is not used and should not -take up unnecessary RAM. */ -#define configCOMMAND_INT_MAX_OUTPUT_SIZE 1 - -#endif /* FREERTOS_CONFIG_H */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.sln b/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.sln deleted file mode 100644 index 3f819af17..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WIN32", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.Build.0 = Debug|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Release|Win32.ActiveCfg = Release|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj b/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj deleted file mode 100644 index c0a342247..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj +++ /dev/null @@ -1,275 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {C686325E-3261-42F7-AEB1-DDE5280E1CEB} - RTOSDemo - - - - Application - false - MultiByte - v142 - - - Application - false - MultiByte - v142 - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\Debug\ - .\Debug\ - true - .\Release\ - .\Release\ - false - - - - .\Debug/WIN32.tlb - - - - - Disabled - ..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\Source\include;..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories) - _WINSOCKAPI_;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - .\Debug/WIN32.pch - .\Debug/ - .\Debug/ - .\Debug/ - Level4 - true - false - EditAndContinue - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c09 - - - .\Debug/RTOSDemo.exe - true - true - .\Debug/WIN32.pdb - Console - MachineX86 - wpcap.lib;%(AdditionalDependencies) - ..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap - - - true - .\Debug/WIN32.bsc - - - - - .\Release/WIN32.tlb - - - - - MaxSpeed - OnlyExplicitInline - _WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - MultiThreaded - true - .\Release/WIN32.pch - .\Release/ - .\Release/ - .\Release/ - Level3 - true - ..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\Source\include;..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c09 - - - .\Release/RTOSDemo.exe - true - .\Release/WIN32.pdb - Console - MachineX86 - ..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap - wpcap.lib;%(AdditionalDependencies) - - - true - .\Release/WIN32.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj.filters b/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj.filters deleted file mode 100644 index 6914b1003..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/WIN32.vcxproj.filters +++ /dev/null @@ -1,436 +0,0 @@ - - - - - {38712199-cebf-4124-bf15-398f7c3419ea} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {af3445a1-4908-4170-89ed-39345d90d30c} - - - {f32be356-4763-4cae-9020-974a2638cb08} - *.c - - - {a60060e3-3949-4f60-b025-cb84164ae9ed} - - - {34567deb-d5ab-4a56-8640-0aaec609521a} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {2d4a700c-06e3-4dd2-afbe-ab1be71ebe2a} - - - {88f409e6-d396-4ac5-94bd-7a99c914be46} - - - {19ff1a34-36de-4c48-9d10-3fb1fa0d1fa4} - h;hpp;hxx;hm;inl - - - {f1895f21-b338-4923-bec6-c20eba7b48af} - - - {2d5e204f-7bfe-467c-b8fc-daf0120b3380} - - - {ac8f3f6f-979d-4405-9b5d-d22ddab77efe} - - - {d0f66056-3a9d-4160-986b-6c770c5c05b6} - - - {2c08d348-4005-406d-9941-735524db4bef} - - - {c791a789-07eb-46aa-9934-23684669793b} - - - {d7b51b46-8083-4d4e-ba8b-03e7c96a79ae} - - - {268723e7-d189-420d-ba66-26c24054b16b} - - - {ae3a6e4d-2101-4d1d-be3a-c19a72fe0ed0} - - - {aef10a28-c761-43f8-aad6-adc6e4963cef} - - - {2a415654-7006-4079-b071-86fe1b73e811} - - - {cc0c5b7c-cd80-4573-bdc1-122b1c9f685a} - - - {a8022720-9bfe-4681-b4ef-4785c87a815e} - - - {c3366d35-95df-4c03-a752-3ae631ec6bba} - - - {92b32a46-5658-4c53-b5de-3b174955a777} - - - {6c4a261d-ca37-4528-ad50-8f04032898cb} - - - - - Demo App Source - - - FreeRTOS Source\Source - - - FreeRTOS Source\Source - - - FreeRTOS Source\Source - - - FreeRTOS Source\Source - - - FreeRTOS Source\Source\Portable - - - Demo App Source\Common Demo Tasks - - - FreeRTOS Source\Source - - - lwIP\Source\API - - - lwIP\Source\API - - - lwIP\Source\API - - - lwIP\Source\API - - - lwIP\Source\API - - - lwIP\Source\API - - - lwIP\Source\API - - - lwIP\Source\API - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core\IPv4 - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Source\Core - - - lwIP\Arch - - - lwIP\Source\Core - - - lwIP\Source\NetIf - - - lwIP\Source\NetIf - - - lwIP\Source\Core\SNMP - - - lwIP\Source\Core\SNMP - - - lwIP\Source\Core\SNMP - - - lwIP\Source\Core\SNMP - - - lwIP\Source\Core\SNMP - - - lwIP\Source\Core\SNMP - - - lwIP_Apps - - - Demo App Source - - - lwIP_Apps\BasicSocketCommandServer - - - lwIP_Apps\httpd_raw_from_lwIP_download - - - lwIP_Apps\httpd_raw_from_lwIP_download - - - - - Configuration Files - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - FreeRTOS Source\Include - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\IPv4\lwIP - - - lwIP\Source\Include\netif - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Source\Include\lwIP - - - lwIP\Arch - - - lwIP\Arch - - - lwIP\Arch - - - lwIP\Arch - - - lwIP\Arch - - - lwIP\Arch - - - lwIP\Arch - - - lwIP\Arch - - - Configuration Files - - - Configuration Files - - - \ No newline at end of file diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c deleted file mode 100644 index ee9ecf9f4..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/BasicSocketCommandServer/BasicSocketCommandServer.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* Standard includes. */ -#include "stdlib.h" - -/* lwIP core includes */ -#include "lwip/opt.h" -#include "lwip/sockets.h" - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* Utils includes. */ -#include "CommandInterpreter.h" - -/* Dimensions the buffer into which input characters are placed. */ -#define cmdMAX_INPUT_SIZE 20 - -/* Dimensions the buffer into which string outputs can be placed. */ -#define cmdMAX_OUTPUT_SIZE 1024 - -/*-----------------------------------------------------------*/ - -void vBasicSocketsCommandInterpreterTask( void *pvParameters ) -{ -long lSocket, lClientFd, lBytes, lAddrLen = sizeof( struct sockaddr_in ); -struct sockaddr_in sLocalAddr; -struct sockaddr_in client_addr; -const signed char *pcWelcomeMessage = "FreeRTOS command server - connection accepted.\r\nType Help to view a list of registered commands.\r\n\r\n>"; -signed char cInChar, cInputIndex; -static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ]; -portBASE_TYPE xReturned; - - ( void ) pvParameters; - - lSocket = lwip_socket(AF_INET, SOCK_STREAM, 0); - - if( lSocket >= 0 ) - { - memset((char *)&sLocalAddr, 0, sizeof(sLocalAddr)); - sLocalAddr.sin_family = AF_INET; - sLocalAddr.sin_len = sizeof(sLocalAddr); - sLocalAddr.sin_addr.s_addr = htonl(INADDR_ANY); - sLocalAddr.sin_port = ntohs( ( ( unsigned short ) 23 ) ); - - if( lwip_bind( lSocket, ( struct sockaddr *) &sLocalAddr, sizeof( sLocalAddr ) ) < 0 ) - { - lwip_close( lSocket ); - vTaskDelete( NULL ); - } - - if( lwip_listen( lSocket, 20 ) != 0 ) - { - lwip_close( lSocket ); - vTaskDelete( NULL ); - } - - for( ;; ) - { - - lClientFd = lwip_accept(lSocket, ( struct sockaddr * ) &client_addr, ( u32_t * ) &lAddrLen ); - - if( lClientFd > 0L ) - { - lwip_send( lClientFd, pcWelcomeMessage, strlen( ( const char * ) pcWelcomeMessage ), 0 ); - - cInputIndex = 0; - memset( cInputString, 0x00, cmdMAX_INPUT_SIZE ); - - do - { - lBytes = lwip_recv( lClientFd, &cInChar, sizeof( cInChar ), 0 ); - - if( lBytes > 0L ) - { - if( cInChar == '\n' ) - { - /* The input string has been terminated. Was the - input a quit command? */ - if( strcmp( "quit", ( const char * ) cInputString ) == 0 ) - { - /* Set lBytes to 0 to close the connection. */ - lBytes = 0L; - } - else - { - /* The input string was not a quit command. - Pass the string to the command interpreter. */ - do - { - xReturned = xCmdIntProcessCommand( cInputString, cOutputString, cmdMAX_OUTPUT_SIZE ); - lwip_send( lClientFd, cOutputString, strlen( ( const char * ) cOutputString ), 0 ); - - } while( xReturned != pdFALSE ); - - /* All the strings generated by the input - command have been sent. Clear the input - string ready to receive the next command. */ - cInputIndex = 0; - memset( cInputString, 0x00, cmdMAX_INPUT_SIZE ); - lwip_send( lClientFd, "\r\n>", strlen( "\r\n>" ), 0 ); - } - } - else - { - if( cInChar == '\r' ) - { - /* Ignore the character. */ - } - else if( cInChar == '\b' ) - { - /* Backspace was pressed. Erase the last - character in the string - if any. */ - if( cInputIndex > 0 ) - { - cInputIndex--; - cInputString[ cInputIndex ] = '\0'; - } - } - else - { - /* A character was entered. Add it to the string - entered so far. When a \n is entered the complete - string will be passed to the command interpreter. */ - if( cInputIndex < cmdMAX_INPUT_SIZE ) - { - cInputString[ cInputIndex ] = cInChar; - cInputIndex++; - } - } - } - } - - } while( lBytes > 0L ); - - lwip_close( lClientFd ); - } - } - } - - /* Will only get here if a listening socket could not be created. */ - vTaskDelete( NULL ); -} - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.c deleted file mode 100644 index 993fffcdd..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#include "lwip/opt.h" -#include "lwip/def.h" -#include "fs.h" -#include "fsdata.h" -#include - -/** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the - * file system (to prevent changing the file included in CVS) */ -#ifndef HTTPD_USE_CUSTUM_FSDATA -#define HTTPD_USE_CUSTUM_FSDATA 0 -#endif - -#if HTTPD_USE_CUSTUM_FSDATA -#include "fsdata_custom.c" -#else /* HTTPD_USE_CUSTUM_FSDATA */ -#include "fsdata.c" -#endif /* HTTPD_USE_CUSTUM_FSDATA */ - -/*-----------------------------------------------------------------------------------*/ -/* Define the number of open files that we can support. */ -#ifndef LWIP_MAX_OPEN_FILES -#define LWIP_MAX_OPEN_FILES 10 -#endif - -/* Define the file system memory allocation structure. */ -struct fs_table { - struct fs_file file; - u8_t inuse; -}; - -/* Allocate file system memory */ -struct fs_table fs_memory[LWIP_MAX_OPEN_FILES]; - -#if LWIP_HTTPD_CUSTOM_FILES -int fs_open_custom(struct fs_file *file, const char *name); -void fs_close_custom(struct fs_file *file); -#endif /* LWIP_HTTPD_CUSTOM_FILES */ - -/*-----------------------------------------------------------------------------------*/ -static struct fs_file * -fs_malloc(void) -{ - int i; - for(i = 0; i < LWIP_MAX_OPEN_FILES; i++) { - if(fs_memory[i].inuse == 0) { - fs_memory[i].inuse = 1; - return(&fs_memory[i].file); - } - } - return(NULL); -} - -/*-----------------------------------------------------------------------------------*/ -static void -fs_free(struct fs_file *file) -{ - int i; - for(i = 0; i < LWIP_MAX_OPEN_FILES; i++) { - if(&fs_memory[i].file == file) { - fs_memory[i].inuse = 0; - break; - } - } - return; -} - -/*-----------------------------------------------------------------------------------*/ -struct fs_file * -fs_open(const char *name) -{ - struct fs_file *file; - const struct fsdata_file *f; - - file = fs_malloc(); - if(file == NULL) { - return NULL; - } - -#if LWIP_HTTPD_CUSTOM_FILES - if(fs_open_custom(file, name)) { - file->is_custom_file = 1; - return file; - } - file->is_custom_file = 0; -#endif /* LWIP_HTTPD_CUSTOM_FILES */ - - for(f = FS_ROOT; f != NULL; f = f->next) { - if (!strcmp(name, (char *)f->name)) { - file->data = (const char *)f->data; - file->len = f->len; - file->index = f->len; - file->pextension = NULL; - file->http_header_included = f->http_header_included; -#if HTTPD_PRECALCULATED_CHECKSUM - file->chksum_count = f->chksum_count; - file->chksum = f->chksum; -#endif /* HTTPD_PRECALCULATED_CHECKSUM */ -#if LWIP_HTTPD_FILE_STATE - file->state = fs_state_init(file, name); -#endif /* #if LWIP_HTTPD_FILE_STATE */ - return file; - } - } - fs_free(file); - return NULL; -} - -/*-----------------------------------------------------------------------------------*/ -void -fs_close(struct fs_file *file) -{ -#if LWIP_HTTPD_CUSTOM_FILES - if (file->is_custom_file) { - fs_close_custom(file); - } -#endif /* LWIP_HTTPD_CUSTOM_FILES */ -#if LWIP_HTTPD_FILE_STATE - fs_state_free(file, file->state); -#endif /* #if LWIP_HTTPD_FILE_STATE */ - fs_free(file); -} -/*-----------------------------------------------------------------------------------*/ -int -fs_read(struct fs_file *file, char *buffer, int count) -{ - int read; - - if(file->index == file->len) { - return -1; - } - - read = file->len - file->index; - if(read > count) { - read = count; - } - - MEMCPY(buffer, (file->data + file->index), read); - file->index += read; - - return(read); -} -/*-----------------------------------------------------------------------------------*/ -int fs_bytes_left(struct fs_file *file) -{ - return file->len - file->index; -} diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.h deleted file mode 100644 index cd7675923..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fs.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __FS_H__ -#define __FS_H__ - -#include "lwip/opt.h" - -/** Set this to 1 and provide the functions: - * - "int fs_open_custom(struct fs_file *file, const char *name)" - * Called first for every opened file to allow opening files - * that are not included in fsdata(_custom).c - * - "void fs_close_custom(struct fs_file *file)" - * Called to free resources allocated by fs_open_custom(). - */ -#ifndef LWIP_HTTPD_CUSTOM_FILES -#define LWIP_HTTPD_CUSTOM_FILES 0 -#endif - -/** Set this to 1 to include an application state argument per file - * that is opened. This allows to keep a state per connection/file. - */ -#ifndef LWIP_HTTPD_FILE_STATE -#define LWIP_HTTPD_FILE_STATE 0 -#endif - -/** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for - * predefined (MSS-sized) chunks of the files to prevent having to calculate - * the checksums at runtime. */ -#ifndef HTTPD_PRECALCULATED_CHECKSUM -#define HTTPD_PRECALCULATED_CHECKSUM 0 -#endif - -#if HTTPD_PRECALCULATED_CHECKSUM -struct fsdata_chksum { - u32_t offset; - u16_t chksum; - u16_t len; -}; -#endif /* HTTPD_PRECALCULATED_CHECKSUM */ - -struct fs_file { - const char *data; - int len; - int index; - void *pextension; -#if HTTPD_PRECALCULATED_CHECKSUM - const struct fsdata_chksum *chksum; - u16_t chksum_count; -#endif /* HTTPD_PRECALCULATED_CHECKSUM */ - u8_t http_header_included; -#if LWIP_HTTPD_CUSTOM_FILES - u8_t is_custom_file; -#endif /* LWIP_HTTPD_CUSTOM_FILES */ -#if LWIP_HTTPD_FILE_STATE - void *state; -#endif /* LWIP_HTTPD_FILE_STATE */ -}; - -struct fs_file *fs_open(const char *name); -void fs_close(struct fs_file *file); -int fs_read(struct fs_file *file, char *buffer, int count); -int fs_bytes_left(struct fs_file *file); - -#if LWIP_HTTPD_FILE_STATE -/** This user-defined function is called when a file is opened. */ -void *fs_state_init(struct fs_file *file, const char *name); -/** This user-defined function is called when a file is closed. */ -void fs_state_free(struct fs_file *file, void *state); -#endif /* #if LWIP_HTTPD_FILE_STATE */ - -#endif /* __FS_H__ */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.c deleted file mode 100644 index f2ddfd935..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.c +++ /dev/null @@ -1,2068 +0,0 @@ -#include "fs.h" -#include "lwip/def.h" -#include "fsdata.h" - - -#define file_NULL (struct fsdata_file *) NULL - - -static const unsigned int dummy_align__404_html = 0; -static const unsigned char data__404_html[] = { -/* /404.html (10 chars) */ -0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 404 File not found -" (29 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, -0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: text/html - -" (27 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, -0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, -/* raw file data (544 bytes) */ -0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69, -0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69,0x67, -0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20, -0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f,0x68, -0x65,0x61,0x64,0x3e,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63,0x6f,0x6c, -0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78,0x74,0x3d, -0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0a,0x0a,0x20,0x20,0x20,0x20,0x3c,0x74, -0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30,0x30,0x25, -0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x72,0x20,0x76,0x61,0x6c, -0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, -0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20,0x20,0x0a,0x09,0x20,0x20, -0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, -0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x22,0x3e,0x3c,0x69, -0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63, -0x73,0x2e,0x67,0x69,0x66,0x22,0x0a,0x09,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72, -0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c, -0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x53,0x49,0x43,0x53, -0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f,0x61,0x3e,0x0a,0x09,0x3c,0x2f,0x74, -0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30, -0x22,0x3e,0x09,0x20,0x20,0x0a,0x09,0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49, -0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68, -0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f, -0x68,0x31,0x3e,0x0a,0x09,0x20,0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d, -0x20,0x50,0x61,0x67,0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c, -0x2f,0x68,0x32,0x3e,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0a,0x09,0x20,0x20,0x20, -0x20,0x53,0x6f,0x72,0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65, -0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74, -0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e, -0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x69,0x73,0x0a,0x09,0x20,0x20,0x20,0x20,0x73, -0x65,0x72,0x76,0x65,0x72,0x2e,0x20,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0a, -0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0a,0x09,0x20,0x20,0x26,0x6e, -0x62,0x73,0x70,0x3b,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72,0x3e, -0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0a, -0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0a,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,0x0a, -}; - -static const unsigned int dummy_align__index_shtml = 1; -static const unsigned char data__index_shtml[] = { -/* /index.shtml (13 chars) */ -0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 200 OK -" (17 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, -0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: text/html -Expires: Fri, 10 Apr 2008 14:00:00 GMT -Pragma: no-cache - -" (85 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, -0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x45,0x78,0x70,0x69,0x72,0x65,0x73, -0x3a,0x20,0x46,0x72,0x69,0x2c,0x20,0x31,0x30,0x20,0x41,0x70,0x72,0x20,0x32,0x30, -0x30,0x38,0x20,0x31,0x34,0x3a,0x30,0x30,0x3a,0x30,0x30,0x20,0x47,0x4d,0x54,0x0d, -0x0a,0x50,0x72,0x61,0x67,0x6d,0x61,0x3a,0x20,0x6e,0x6f,0x2d,0x63,0x61,0x63,0x68, -0x65,0x0d,0x0a,0x0d,0x0a, -/* raw file data (762 bytes) */ -0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, -0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, -0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, -0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x20,0x22, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72, -0x67,0x2f,0x54,0x52,0x2f,0x68,0x74,0x6d,0x6c,0x34,0x2f,0x6c,0x6f,0x6f,0x73,0x65, -0x2e,0x64,0x74,0x64,0x22,0x3e,0x0d,0x0a,0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x3c,0x74, -0x69,0x74,0x6c,0x65,0x3e,0x46,0x72,0x65,0x65,0x52,0x54,0x4f,0x53,0x2e,0x6f,0x72, -0x67,0x20,0x6c,0x77,0x49,0x50,0x20,0x57,0x45,0x42,0x20,0x73,0x65,0x72,0x76,0x65, -0x72,0x20,0x64,0x65,0x6d,0x6f,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x3c,0x42,0x4f, -0x44,0x59,0x20,0x6f,0x6e,0x4c,0x6f,0x61,0x64,0x3d,0x22,0x77,0x69,0x6e,0x64,0x6f, -0x77,0x2e,0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x26,0x71,0x75, -0x6f,0x74,0x3b,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x68,0x72,0x65,0x66, -0x3d,0x27,0x69,0x6e,0x64,0x65,0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x27,0x26,0x71, -0x75,0x6f,0x74,0x3b,0x2c,0x32,0x30,0x30,0x30,0x29,0x22,0x3e,0x0d,0x0a,0x3c,0x66, -0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65,0x3d,0x22,0x61,0x72,0x69,0x61,0x6c,0x22, -0x3e,0x0d,0x0a,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x69,0x6e,0x64,0x65, -0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x54,0x61,0x73,0x6b,0x20,0x53,0x74, -0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62,0x3e,0x7c,0x3c,0x2f,0x62,0x3e, -0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x72,0x75,0x6e,0x74,0x69,0x6d, -0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x52,0x75,0x6e,0x20,0x54,0x69,0x6d, -0x65,0x20,0x53,0x74,0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62,0x3e,0x7c, -0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74, -0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x66,0x72,0x65,0x65,0x72,0x74,0x6f, -0x73,0x2e,0x6f,0x72,0x67,0x2f,0x22,0x3e,0x46,0x72,0x65,0x65,0x52,0x54,0x4f,0x53, -0x20,0x48,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62, -0x3e,0x7c,0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22, -0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22,0x3e,0x33,0x37,0x4b,0x20,0x6a,0x70, -0x67,0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e,0x0d,0x0a, -0x3c,0x68,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e,0x0d,0x0a,0x3c, -0x68,0x32,0x3e,0x54,0x61,0x73,0x6b,0x20,0x73,0x74,0x61,0x74,0x69,0x73,0x74,0x69, -0x63,0x73,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a,0x50,0x61,0x67,0x65,0x20,0x77,0x69, -0x6c,0x6c,0x20,0x72,0x65,0x66,0x72,0x65,0x73,0x68,0x20,0x65,0x76,0x65,0x72,0x79, -0x20,0x32,0x20,0x73,0x65,0x63,0x6f,0x6e,0x64,0x73,0x2e,0x3c,0x70,0x3e,0x0d,0x0a, -0x3c,0x66,0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65,0x3d,0x22,0x63,0x6f,0x75,0x72, -0x69,0x65,0x72,0x22,0x3e,0x3c,0x70,0x72,0x65,0x3e,0x54,0x61,0x73,0x6b,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x53,0x74,0x61,0x74,0x65,0x20,0x20,0x50, -0x72,0x69,0x6f,0x72,0x69,0x74,0x79,0x20,0x20,0x53,0x74,0x61,0x63,0x6b,0x09,0x23, -0x3c,0x62,0x72,0x3e,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x21,0x2d,0x2d,0x23,0x72, -0x74,0x6f,0x73,0x5f,0x73,0x74,0x61,0x74,0x73,0x2d,0x2d,0x3e,0x0d,0x0a,0x3c,0x2f, -0x70,0x72,0x65,0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x2f,0x66, -0x6f,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c, -0x2f,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; - -static const unsigned int dummy_align__logo_jpg = 2; -static const unsigned char data__logo_jpg[] = { -/* /logo.jpg (10 chars) */ -0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x00,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 200 OK -" (17 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, -0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: image/jpeg - -" (28 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, -0x61,0x67,0x65,0x2f,0x6a,0x70,0x65,0x67,0x0d,0x0a,0x0d,0x0a, -/* raw file data (28602 bytes) */ -0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x00,0x00,0x01, -0x00,0x01,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x03,0x02,0x02,0x03,0x02,0x02,0x03, -0x03,0x03,0x03,0x04,0x03,0x03,0x04,0x05,0x08,0x05,0x05,0x04,0x04,0x05,0x0a,0x07, -0x07,0x06,0x08,0x0c,0x0a,0x0c,0x0c,0x0b,0x0a,0x0b,0x0b,0x0d,0x0e,0x12,0x10,0x0d, -0x0e,0x11,0x0e,0x0b,0x0b,0x10,0x16,0x10,0x11,0x13,0x14,0x15,0x15,0x15,0x0c,0x0f, -0x17,0x18,0x16,0x14,0x18,0x12,0x14,0x15,0x14,0xff,0xdb,0x00,0x43,0x01,0x03,0x04, -0x04,0x05,0x04,0x05,0x09,0x05,0x05,0x09,0x14,0x0d,0x0b,0x0d,0x14,0x14,0x14,0x14, -0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, -0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, -0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xff,0xc0, -0x00,0x11,0x08,0x00,0xea,0x02,0x71,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, -0x01,0xff,0xc4,0x00,0x1f,0x00,0x00,0x01,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, -0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x10,0x00,0x02,0x01,0x03,0x03,0x02,0x04,0x03,0x05, -0x05,0x04,0x04,0x00,0x00,0x01,0x7d,0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,0x21, -0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,0x23, -0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,0x17, -0x18,0x19,0x1a,0x25,0x26,0x27,0x28,0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,0x3a, -0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a, -0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a, -0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99, -0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7, -0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5, -0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf1, -0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xff,0xc4,0x00,0x1f,0x01,0x00,0x03, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, -0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x11,0x00, -0x02,0x01,0x02,0x04,0x04,0x03,0x04,0x07,0x05,0x04,0x04,0x00,0x01,0x02,0x77,0x00, -0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,0x13, -0x22,0x32,0x81,0x08,0x14,0x42,0x91,0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,0x15, -0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,0x27, -0x28,0x29,0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, -0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, -0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,0x88, -0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6, -0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4, -0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe2, -0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9, -0xfa,0xff,0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xfd, -0x53,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa4,0x34,0x8e, -0x70,0x09,0xaf,0x0b,0xf1,0xbf,0xc6,0x4b,0x8f,0x13,0x78,0xc2,0xdb,0xc1,0x7e,0x0f, -0xb8,0x2b,0x24,0x93,0x08,0xae,0xf5,0x48,0x88,0x3b,0x47,0xf1,0x2c,0x7f,0x4e,0x72, -0xdf,0x97,0xad,0x72,0x62,0x71,0x54,0xf0,0xb1,0xe6,0x9e,0xef,0x44,0xba,0xb6,0x73, -0x57,0xc4,0x43,0x0e,0x93,0x9e,0xef,0x44,0xba,0xb6,0x77,0xbe,0x3b,0xf8,0xb9,0xa1, -0xf8,0x16,0x39,0x23,0x9d,0xe4,0xd4,0x35,0x05,0x1c,0x58,0x59,0x2e,0xf9,0x3d,0xb7, -0x76,0x51,0xf5,0xfc,0x8d,0x78,0x07,0x8a,0xff,0x00,0x69,0x3f,0x1b,0x6a,0xb3,0x3a, -0x69,0x3a,0x7f,0xf6,0x2d,0xb7,0xf0,0x81,0x09,0x96,0x5f,0xc5,0x98,0x63,0xf2,0x15, -0xf4,0xde,0x83,0xe0,0xdd,0x27,0xc3,0xf6,0x62,0x0b,0x6b,0x38,0xc9,0x3f,0x33,0xcb, -0x20,0xde,0xf2,0x37,0x76,0x66,0x3c,0x92,0x6b,0x40,0xe9,0x16,0x47,0xad,0x9c,0x1f, -0xf7,0xec,0x57,0x9d,0x88,0xc2,0xe3,0x31,0x2b,0xf8,0xbc,0x8b,0xb2,0x5f,0xad,0xce, -0x3c,0x46,0x1b,0x13,0x88,0x56,0x8d,0x5e,0x45,0xe4,0xbf,0x53,0xe0,0x8d,0x4f,0xc6, -0xfe,0x33,0xd5,0x18,0x9b,0xcd,0x5f,0x56,0x90,0x93,0x9c,0x19,0xa4,0x0b,0xf9,0x0e, -0x2b,0x35,0x75,0xff,0x00,0x10,0xc7,0x9c,0x6a,0x3a,0x82,0xfa,0xfe,0xfa,0x41,0xfd, -0x6b,0xf4,0x19,0xb4,0x2d,0x39,0xba,0xd8,0x5b,0x7f,0xdf,0xa1,0xfe,0x15,0x19,0xf0, -0xce,0x94,0xff,0x00,0x7b,0x4d,0xb5,0x3f,0xf6,0xc5,0x7f,0xc2,0xbc,0x79,0x64,0x15, -0xa4,0xef,0xed,0xaf,0xf2,0x7f,0xe6,0x78,0x72,0xc8,0x6a,0x49,0xdd,0xd7,0x7f,0xd7, -0xcc,0xf8,0x0d,0x3c,0x5f,0xe2,0x68,0x94,0x05,0xd6,0x35,0x45,0x03,0xa0,0x17,0x32, -0x0f,0xeb,0x53,0x27,0x8f,0xbc,0x59,0x11,0x25,0x75,0xfd,0x59,0x33,0xe9,0x77,0x28, -0xfe,0xb5,0xf7,0x8b,0x78,0x3b,0x44,0x7e,0xba,0x4d,0x99,0xff,0x00,0xb6,0x2b,0x51, -0x37,0x81,0x7c,0x3c,0xf9,0xce,0x8d,0x66,0x73,0xff,0x00,0x4c,0x56,0xa5,0x64,0x58, -0x85,0xb5,0x6f,0xcc,0x9f,0xec,0x2a,0xeb,0x6a,0xef,0xf1,0xff,0x00,0x33,0xe1,0x6f, -0xf8,0x59,0x3e,0x2f,0x5f,0xf9,0x98,0xb5,0x7f,0xfc,0x0c,0x93,0xfc,0x69,0xeb,0xf1, -0x4f,0xc6,0x51,0x9c,0xaf,0x89,0x35,0x5c,0xfb,0xdd,0x3f,0xf8,0xd7,0xdc,0x0d,0xf0, -0xf3,0xc3,0x6f,0xd7,0x44,0xb2,0x3f,0xf6,0xc8,0x54,0x4f,0xf0,0xcb,0xc2,0xaf,0xf7, -0xb4,0x2b,0x23,0xff,0x00,0x6c,0x85,0x2f,0xec,0x4c,0x5f,0xfc,0xfe,0xfc,0xc5,0xfd, -0x89,0x8a,0x5b,0x57,0x7f,0x89,0xf1,0x54,0x7f,0x17,0xfc,0x6b,0x1f,0xfc,0xcc,0x9a, -0x99,0xfa,0xdc,0x35,0x58,0x8b,0xe3,0x87,0x8e,0xe1,0x6c,0xaf,0x89,0x2f,0x73,0xd3, -0xe6,0x21,0x87,0xe4,0x45,0x7d,0x8e,0xff,0x00,0x09,0x7c,0x20,0xfd,0x74,0x0b,0x3f, -0xc2,0x3c,0x54,0x2f,0xf0,0x6b,0xc1,0xaf,0xd7,0x41,0xb5,0x1f,0x45,0xa4,0xb2,0x7c, -0x72,0xda,0xb7,0xe2,0xc7,0xfd,0x8f,0x8d,0x5b,0x62,0x1f,0xe2,0x7c,0x8a,0x9f,0x1f, -0xbc,0x7e,0x83,0x1f,0xf0,0x91,0x5c,0x7d,0x4c,0x71,0x9f,0xfd,0x96,0xa6,0x1f,0xb4, -0x37,0x8f,0xc7,0xfc,0xcc,0x12,0xfe,0x30,0x45,0xff,0x00,0xc4,0x57,0xd5,0xaf,0xf0, -0x43,0xc1,0x4e,0x0f,0xfc,0x48,0xa0,0x1f,0x4a,0x89,0xbe,0x03,0xf8,0x21,0xf3,0xff, -0x00,0x12,0x48,0x86,0x7d,0x09,0xa7,0xfd,0x95,0x98,0xad,0xab,0x7e,0x2c,0x3f,0xb2, -0xb3,0x15,0xb6,0x21,0xfd,0xec,0xf9,0x69,0x7f,0x68,0xaf,0x1f,0x8f,0xf9,0x8f,0x39, -0xfa,0xdb,0xc5,0xff,0x00,0xc4,0xd4,0x89,0xfb,0x48,0x78,0xf9,0x08,0x3f,0xdb,0x59, -0xc7,0xad,0xb4,0x47,0xff,0x00,0x65,0xaf,0xa6,0x9f,0xf6,0x7d,0xf0,0x33,0x8e,0x74, -0x75,0x1e,0xe1,0x8d,0x42,0xff,0x00,0xb3,0x9f,0x81,0x9c,0x7f,0xc8,0x2d,0x97,0xe9, -0x21,0xa3,0xfb,0x33,0x34,0x5b,0x56,0xff,0x00,0xc9,0x98,0xbf,0xb3,0x33,0x35,0xb5, -0x7f,0xc5,0x9f,0x39,0xc7,0xfb,0x4d,0xf8,0xf1,0x17,0x07,0x52,0x85,0xcf,0xab,0x5a, -0xa6,0x7f,0x95,0x58,0x4f,0xda,0x9b,0xc7,0x49,0x8f,0xf4,0x9b,0x36,0xc7,0xad,0xaa, -0xf3,0xfa,0xd7,0xbe,0xbf,0xec,0xd5,0xe0,0x86,0xc9,0x16,0x32,0xaf,0xd2,0x43,0x50, -0x3f,0xec,0xc5,0xe0,0xa6,0xe9,0x6f,0x3a,0xff,0x00,0xdb,0x4a,0x5f,0xd9,0xf9,0xb2, -0xda,0xaf,0xfe,0x4c,0xc3,0xfb,0x3f,0x36,0x5b,0x57,0xfc,0x59,0xe2,0x0b,0xfb,0x57, -0x78,0xdd,0x7a,0x9d,0x39,0xbe,0xb6,0xc7,0xfa,0x35,0x3d,0x7f,0x6b,0x0f,0x1a,0x82, -0x32,0x9a,0x61,0xff,0x00,0xb7,0x66,0xff,0x00,0xe2,0xeb,0xd9,0xdb,0xf6,0x5a,0xf0, -0x63,0x0e,0x12,0xe5,0x7f,0xed,0xa5,0x42,0xff,0x00,0xb2,0xa7,0x83,0xcf,0x47,0xbb, -0x5f,0xfb,0x69,0x43,0xc1,0xe7,0x0b,0x6a,0x9f,0xf9,0x30,0x7d,0x4b,0x37,0x5b,0x56, -0xfc,0x4f,0x23,0x5f,0xda,0xd7,0xc6,0x43,0xad,0xbe,0x96,0xdf,0xf6,0xc1,0xff,0x00, -0xf8,0xba,0x91,0x3f,0x6b,0x8f,0x16,0x82,0x37,0x59,0x69,0x6d,0xeb,0xfb,0xa7,0xff, -0x00,0xe2,0xeb,0xd4,0x24,0xfd,0x93,0xbc,0x2a,0xd8,0xdb,0x75,0x78,0xbf,0xf0,0x20, -0x6a,0x07,0xfd,0x92,0x3c,0x34,0x73,0x8b,0xfb,0xb5,0xf4,0xe9,0x4b,0xea,0xb9,0xca, -0xfb,0x7f,0x88,0x7d,0x53,0x39,0x5b,0x55,0xfc,0x4f,0x3d,0x8b,0xf6,0xbe,0xf1,0x32, -0xe7,0xcc,0xd2,0xb4,0xc7,0xf4,0xc2,0xc8,0x3f,0xf6,0x6a,0xb0,0x9f,0xb6,0x16,0xbc, -0x31,0xbb,0x43,0xd3,0x5b,0xd7,0x0d,0x20,0xfe,0xb5,0xda,0xc9,0xfb,0x22,0xe8,0x19, -0xf9,0x75,0x3b,0xa0,0x3d,0xd4,0x54,0x0f,0xfb,0x21,0x68,0xe4,0x7c,0xba,0xbd,0xcf, -0xe2,0x82,0x9f,0xb1,0xce,0x97,0xda,0xfc,0x50,0x7b,0x0c,0xe9,0x7d,0xbf,0xc8,0xe6, -0x07,0xed,0x89,0xaa,0xf7,0xf0,0xf5,0x99,0xfa,0x4e,0xdf,0xe1,0x4f,0x5f,0xdb,0x1b, -0x50,0x1f,0x7b,0xc3,0x96,0xa7,0xe9,0x72,0xdf,0xfc,0x4d,0x6f,0x3f,0xec,0x7f,0xa6, -0x1c,0xed,0xd6,0xe7,0x5f,0xac,0x60,0xd4,0x12,0x7e,0xc7,0xb6,0x99,0x1b,0x35,0xd9, -0x31,0xef,0x17,0xff,0x00,0x5e,0x8e,0x4c,0xed,0x75,0xfc,0x85,0xec,0xf3,0xb5,0xf6, -0xbf,0x23,0x35,0x7f,0x6c,0x7b,0xc3,0xf7,0xbc,0x35,0x01,0x1e,0xd7,0x67,0xff,0x00, -0x89,0xa9,0x93,0xf6,0xc8,0x70,0x06,0xef,0x0b,0xa9,0x3d,0xf1,0x7b,0xff,0x00,0xd8, -0x54,0xaf,0xfb,0x1e,0xa0,0x5f,0x97,0x5d,0xe7,0xde,0x2a,0x85,0xbf,0x63,0xe9,0x32, -0x76,0xeb,0xa9,0xed,0x98,0x8d,0x2f,0xf8,0x5b,0x5d,0xff,0x00,0xf2,0x50,0xb6,0x76, -0xba,0xfe,0x44,0xeb,0xfb,0x64,0xc4,0x7e,0xf7,0x85,0xdf,0x1e,0xd7,0xa3,0xff,0x00, -0x8d,0xd4,0xcb,0xfb,0x63,0xda,0x63,0xe6,0xf0,0xcc,0xc0,0xfb,0x5e,0x03,0xff,0x00, -0xb2,0x56,0x63,0xfe,0xc7,0xd7,0x7d,0xb5,0xc8,0x4f,0xd5,0x0d,0x40,0xff,0x00,0xb2, -0x06,0xa6,0x01,0xdb,0xad,0x5b,0x13,0xee,0x84,0x53,0xf6,0x99,0xda,0xe8,0xfe,0xe8, -0x87,0x3e,0x78,0xbf,0xa4,0x6f,0x27,0xed,0x8b,0xa7,0x13,0xcf,0x87,0x2e,0x40,0xff, -0x00,0xaf,0x95,0x3f,0xfb,0x2d,0x48,0x3f,0x6c,0x3d,0x27,0x1f,0x37,0x87,0xaf,0x01, -0xf6,0x9d,0x0f,0xf4,0xae,0x59,0xbf,0x64,0x2d,0x68,0x1e,0x35,0x6b,0x53,0xef,0x83, -0x50,0x37,0xec,0x8d,0xe2,0x11,0xf7,0x75,0x0b,0x46,0xfc,0x4d,0x4f,0xb7,0xce,0x97, -0xd9,0x7f,0x72,0x17,0xb5,0xce,0xd7,0xd9,0xfc,0x11,0xdd,0x45,0xfb,0x5f,0xf8,0x74, -0xb7,0xcf,0xa3,0x6a,0x4a,0x3d,0x54,0xc6,0x7f,0xf6,0x6a,0xb3,0x1f,0xed,0x75,0xe1, -0x36,0x5c,0xbe,0x9b,0xab,0x2b,0x7a,0x08,0xe3,0x3f,0xfb,0x3d,0x79,0xb4,0x9f,0xb2, -0x67,0x89,0x54,0x1c,0x5e,0x5a,0x13,0xfe,0xf1,0xa8,0x1b,0xf6,0x50,0xf1,0x5f,0x69, -0xad,0x1b,0xfe,0x07,0x42,0xc5,0x67,0x0b,0xec,0x3f,0xb9,0x0f,0xeb,0x39,0xd2,0xfb, -0x1f,0x82,0x3d,0x54,0x7e,0xd6,0xfe,0x0e,0xce,0x0d,0x96,0xae,0x07,0xaf,0x93,0x1f, -0xff,0x00,0x17,0x4f,0x1f,0xb5,0xaf,0x83,0x31,0xff,0x00,0x1e,0xba,0xb7,0xfd,0xf8, -0x4f,0xfe,0x2e,0xbc,0x85,0xbf,0x65,0x4f,0x18,0x0f,0xbb,0xf6,0x46,0xff,0x00,0xb6, -0xb5,0x03,0xfe,0xcb,0xbe,0x34,0x4c,0xe2,0x0b,0x76,0x03,0xd2,0x51,0x43,0xc7,0x66, -0xeb,0x7a,0x7f,0xf9,0x28,0x7d,0x73,0x39,0x5f,0xf2,0xeb,0xf0,0x3d,0xa9,0x7f,0x6a, -0xff,0x00,0x05,0x36,0x3f,0x75,0xa9,0xaf,0xd6,0xdd,0x7f,0xf8,0xaa,0x91,0x7f,0x6a, -0xaf,0x04,0x11,0xc9,0xd4,0x53,0xeb,0x6c,0x3f,0xf8,0xaa,0xf0,0xb6,0xfd,0x99,0x7c, -0x6c,0xbd,0x2c,0xe2,0x3f,0x49,0x45,0x42,0xff,0x00,0xb3,0x67,0x8d,0xd4,0x7f,0xc8, -0x3d,0x4f,0xd1,0xc5,0x2f,0xed,0x1c,0xd5,0x7f,0xcb,0xbf,0xfc,0x95,0x8b,0xeb,0xf9, -0xba,0xff,0x00,0x97,0x5f,0x87,0xfc,0x13,0xe8,0x48,0xbf,0x69,0xef,0x01,0xc8,0xe0, -0x1b,0xeb,0xa8,0xc1,0xfe,0x26,0xb5,0x6c,0x0f,0xca,0xad,0x2f,0xed,0x27,0xf0,0xfd, -0x81,0x3f,0xdb,0x2e,0xbe,0xc6,0xd6,0x5f,0xfe,0x26,0xbe,0x6b,0x6f,0xd9,0xd7,0xc7, -0x0a,0x78,0xd2,0xc9,0xc7,0xa3,0x8a,0x81,0xff,0x00,0x67,0xef,0x1c,0xa9,0xff,0x00, -0x90,0x34,0x87,0xe8,0xc0,0xff,0x00,0x5a,0x7f,0xda,0x99,0x9c,0x77,0xa5,0xff,0x00, -0x92,0xb0,0xfe,0xd2,0xcd,0x56,0xf4,0x7f,0x06,0x7d,0x42,0x3f,0x68,0x9f,0x87,0xcd, -0xff,0x00,0x33,0x02,0x8f,0xad,0xb4,0xdf,0xfc,0x45,0x38,0x7e,0xd0,0x9f,0x0f,0xcf, -0x4f,0x11,0x47,0xff,0x00,0x80,0xf2,0x8f,0xfd,0x92,0xbe,0x55,0x6f,0x81,0x3e,0x37, -0x43,0xce,0x89,0x37,0xe1,0x51,0x3f,0xc1,0x4f,0x1a,0x27,0x5d,0x0e,0xe7,0x8f,0x6a, -0x6f,0x38,0xcc,0x16,0xf4,0xbf,0xf2,0x59,0x07,0xf6,0xae,0x64,0xb7,0xa1,0xf8,0x3f, -0xf3,0x3e,0xb2,0x1f,0x1f,0xfc,0x00,0xd8,0xff,0x00,0x8a,0x8e,0x1e,0x7d,0x62,0x93, -0xff,0x00,0x89,0xa9,0xd3,0xe3,0xaf,0x80,0xdc,0x64,0x78,0x92,0xd4,0x7d,0x43,0x8f, -0xe9,0x5f,0x1f,0xbf,0xc1,0xff,0x00,0x18,0xa0,0xe7,0x42,0xba,0xe7,0xfd,0x9a,0x85, -0xbe,0x14,0xf8,0xb9,0x3a,0xe8,0x77,0x7f,0xf7,0xc5,0x2f,0xed,0xac,0x72,0xff,0x00, -0x97,0x4b,0xee,0x62,0xfe,0xd8,0xc7,0xad,0xe8,0x7e,0x0c,0xfb,0x3d,0x3e,0x32,0xf8, -0x21,0xc0,0xc7,0x89,0xb4,0xfe,0x7d,0x65,0xc5,0x48,0x9f,0x17,0x7c,0x14,0xf9,0xc7, -0x89,0xf4,0xce,0x3d,0x6e,0x14,0x57,0xc4,0xef,0xf0,0xd3,0xc5,0x51,0x9f,0x9b,0x44, -0xbd,0x1f,0xf6,0xc8,0xd4,0x0d,0xe0,0x0f,0x12,0x27,0x5d,0x1e,0xf0,0x7f,0xdb,0x23, -0x47,0xf6,0xee,0x29,0x6f,0x49,0x7e,0x23,0xfe,0xdb,0xc6,0x2d,0xe8,0x7e,0x67,0xdc, -0x63,0xe2,0xbf,0x83,0x4f,0x4f,0x13,0xe9,0x7f,0xf8,0x16,0x9f,0xe3,0x52,0x2f,0xc4, -0xef,0x09,0x36,0x71,0xe2,0x5d,0x2f,0x8f,0xfa,0x7b,0x4f,0xf1,0xaf,0x85,0x1b,0xc1, -0x5e,0x20,0x5e,0xba,0x55,0xd0,0xff,0x00,0xb6,0x46,0xa2,0x6f,0x0a,0x6b,0x69,0xd7, -0x4c,0xba,0x1f,0xf6,0xc8,0xd1,0xfd,0xbf,0x89,0xeb,0x49,0x7e,0x22,0xfe,0xdd,0xc5, -0x2d,0xe8,0x7e,0x67,0xde,0xc9,0xf1,0x07,0xc2,0xf2,0x80,0x57,0xc4,0x3a,0x59,0x07, -0xa7,0xfa,0x64,0x7f,0xe3,0x56,0x13,0xc6,0x5a,0x04,0x9f,0x77,0x5a,0xd3,0x9b,0x1e, -0x97,0x49,0xfe,0x35,0xf9,0xfa,0xde,0x1c,0xd5,0xd7,0xae,0x9f,0x72,0x3f,0xed,0x91, -0xa8,0xce,0x89,0xa9,0x27,0x06,0xca,0xe0,0x7d,0x63,0x34,0xd7,0x10,0xd6,0x5b,0xd3, -0x5f,0x8f,0xf9,0x0f,0xfb,0x7e,0xbf,0x5a,0x1f,0x99,0xfa,0x1a,0x9e,0x23,0xd2,0x64, -0x50,0x57,0x54,0xb3,0x60,0x7a,0x62,0xe1,0x3f,0xc6,0x9f,0xfd,0xbb,0xa6,0x9e,0x9a, -0x8d,0xa9,0xff,0x00,0xb6,0xeb,0xfe,0x35,0xf9,0xd8,0x74,0xbb,0xe1,0xd6,0xd6,0x61, -0xff,0x00,0x00,0x34,0xc3,0x61,0x78,0xbd,0x60,0x90,0x7d,0x54,0xd3,0xff,0x00,0x58, -0xe7,0xd6,0x97,0xe3,0xff,0x00,0x00,0x7f,0xeb,0x0d,0x45,0xff,0x00,0x2e,0x7f,0x1f, -0xf8,0x07,0xe8,0xca,0x6a,0xf6,0x2e,0x32,0x2f,0x2d,0xd8,0x7a,0x89,0x54,0xff,0x00, -0x5a,0x78,0xd4,0x6d,0x49,0xe2,0xe6,0x03,0xf4,0x90,0x7f,0x8d,0x7e,0x71,0x7d,0x9e, -0xed,0x7f,0xe5,0x9c,0xa3,0xf0,0x34,0xb9,0xbb,0x43,0xff,0x00,0x2d,0x47,0xe7,0x47, -0xfa,0xc7,0x2f,0xf9,0xf5,0xf8,0xff,0x00,0xc0,0x0f,0xf5,0x8a,0x56,0xd6,0x8b,0xfb, -0xff,0x00,0xe0,0x1f,0xa4,0x0b,0x75,0x13,0x8c,0xac,0xa8,0xc3,0xd4,0x30,0x34,0xf1, -0x20,0x3d,0xc1,0xfc,0x6b,0xf3,0x78,0x5e,0x5e,0xa7,0x49,0x66,0x51,0xec,0xcd,0x53, -0x2e,0xb5,0xaa,0xc6,0xc0,0xad,0xf5,0xda,0x9f,0x51,0x33,0x83,0xfc,0xea,0xd7,0x11, -0xf7,0xa5,0xf8,0xff,0x00,0xc0,0x29,0x71,0x1a,0xeb,0x49,0xfd,0xff,0x00,0xf0,0x0f, -0xd1,0xb0,0xc3,0xd6,0x97,0x75,0x7e,0x74,0x0f,0x13,0x6b,0x4a,0x30,0x35,0x4b,0xe5, -0xfa,0x5c,0x3f,0xf8,0xd2,0x8f,0x16,0x6b,0x8a,0x72,0x35,0x7d,0x40,0x1f,0xfa,0xfa, -0x93,0xfc,0x6a,0xff,0x00,0xd6,0x38,0xff,0x00,0xcf,0xbf,0xc7,0xfe,0x00,0xff,0x00, -0xd6,0x48,0x75,0xa4,0xfe,0xf3,0xf4,0x58,0x36,0x69,0x6b,0xf3,0xb1,0x7c,0x6b,0xe2, -0x04,0x04,0x0d,0x6b,0x51,0x1f,0xf6,0xf5,0x27,0xf8,0xd5,0x88,0xfe,0x23,0x78,0xa2, -0x10,0x36,0x78,0x83,0x54,0x5c,0x70,0x31,0x79,0x27,0xf8,0xd3,0x5c,0x45,0x0e,0xb4, -0xdf,0xde,0x52,0xe2,0x4a,0x5d,0x69,0xb3,0xf4,0x32,0x8a,0xfc,0xf9,0x5f,0x8a,0x5e, -0x2e,0x41,0x81,0xe2,0x4d,0x54,0x0f,0xfa,0xfb,0x73,0xfd,0x6a,0xc2,0x7c,0x62,0xf1, -0xaa,0x63,0x1e,0x26,0xd4,0xb8,0xe9,0xfb,0xf2,0x6a,0xd7,0x11,0x52,0xeb,0x4d,0xfe, -0x05,0x7f,0xac,0x94,0x3a,0xc1,0xfe,0x07,0xdf,0xd4,0x57,0xc0,0xa3,0xe3,0x57,0x8d, -0xd7,0xfe,0x66,0x6d,0x43,0xf1,0x97,0xff,0x00,0xad,0x4f,0x4f,0x8d,0xfe,0x38,0x5c, -0x7f,0xc5,0x4b,0x7c,0x71,0xea,0xe0,0xff,0x00,0x4a,0xaf,0xf5,0x8a,0x87,0xf2,0x3f, -0xc0,0xaf,0xf5,0x8f,0x0d,0xfc,0x8f,0xf0,0x3e,0xf7,0xa2,0xbe,0x0c,0x5f,0x8e,0xde, -0x3a,0x5e,0x9e,0x24,0xbc,0xfc,0x76,0x9f,0xe9,0x56,0x53,0xf6,0x84,0xf1,0xea,0x63, -0xfe,0x2a,0x19,0x8e,0x3d,0x61,0x8c,0xff,0x00,0xec,0xb4,0xd7,0x11,0x61,0xdf,0xd8, -0x97,0xe1,0xfe,0x65,0x2e,0x22,0xc2,0xf5,0x8c,0xbf,0x0f,0xf3,0x3e,0xea,0xa2,0xbe, -0x1c,0x8b,0xf6,0x8e,0xf1,0xf4,0x44,0x9f,0xed,0xc2,0xd9,0xfe,0xf5,0xbc,0x47,0xff, -0x00,0x65,0xab,0xf6,0x3f,0xb5,0x17,0x8e,0xed,0x26,0x57,0x96,0xee,0xd2,0xed,0x07, -0x54,0x9a,0xd5,0x40,0x3f,0xf7,0xce,0x0d,0x68,0xb8,0x83,0x0a,0xf7,0x4f,0xf0,0xff, -0x00,0x32,0xd7,0x10,0xe0,0xde,0xe9,0xaf,0x97,0xfc,0x13,0xed,0x4a,0x2b,0xe6,0x2f, -0x0c,0xfe,0xd8,0x52,0x06,0x58,0xfc,0x41,0xa1,0x86,0x5e,0xf3,0xe9,0xcf,0x83,0xed, -0xf2,0x39,0xff,0x00,0xd9,0xab,0xda,0xbc,0x15,0xf1,0x6f,0xc2,0xfe,0x3f,0x5d,0xba, -0x46,0xa9,0x1c,0x97,0x40,0x65,0xad,0x26,0xfd,0xdc,0xcb,0xff,0x00,0x01,0x3d,0x7e, -0xa3,0x22,0xbd,0x6c,0x3e,0x63,0x86,0xc4,0xe9,0x4e,0x7a,0xf6,0xd9,0x9e,0xa6,0x1f, -0x32,0xc2,0xe2,0x9d,0xa9,0xcd,0x5f,0xb6,0xcc,0xec,0xe8,0xa6,0xa9,0xcd,0x3a,0xbd, -0x13,0xd3,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x42, -0x69,0x6a,0xbd,0xe5,0xd4,0x56,0x56,0xd3,0x5c,0x4f,0x22,0xc5,0x04,0x48,0x5d,0xdd, -0xce,0x02,0xa8,0x19,0x24,0x9a,0x4f,0x45,0x71,0x37,0x65,0x76,0x78,0x6f,0xed,0x35, -0xf1,0x65,0xfc,0x33,0xa6,0x2f,0x86,0xb4,0xb9,0xb6,0x6a,0x57,0xd1,0xee,0xb8,0x95, -0x1b,0x0d,0x0c,0x3d,0x30,0x3d,0x0b,0x72,0x3e,0x80,0xfa,0x8a,0xe4,0xbf,0x64,0xbf, -0x08,0xfd,0xa7,0x55,0xbe,0xd7,0x66,0x43,0xb6,0xdd,0x7c,0xa8,0x8f,0x6d,0xc7,0xad, -0x78,0x9f,0x8c,0xbc,0x4d,0x71,0xe3,0x9f,0x17,0xea,0x3a,0xbc,0xdb,0x8b,0xde,0x4e, -0x5a,0x34,0x3d,0x51,0x33,0x84,0x5f,0xc0,0x00,0x2b,0xed,0x7f,0x82,0x9e,0x13,0x1e, -0x11,0xf8,0x7d,0xa6,0xdb,0x15,0xdb,0x3c,0xa9,0xe7,0xcb,0x91,0x83,0xb9,0xb9,0xaf, -0x89,0xc3,0x4e,0x59,0x96,0x64,0xea,0xbf,0x86,0x1b,0x7e,0x9f,0xe6,0x7c,0x56,0x0a, -0xa4,0xb3,0x3c,0xc1,0xd7,0x97,0xc3,0x0d,0xbf,0x4f,0xf3,0x3b,0xb0,0x31,0x4b,0x45, -0x15,0xf6,0xe7,0xdb,0x09,0x4b,0x45,0x14,0x00,0x53,0x43,0x83,0xd2,0x9d,0x5e,0x0f, -0xf1,0xcb,0xf6,0xdc,0xf8,0x3b,0xfb,0x3e,0x5c,0xc9,0x61,0xe2,0xaf,0x16,0xc2,0xfa, -0xda,0x02,0x7f,0xb1,0xf4,0xc4,0x6b,0xbb,0xa0,0x47,0x66,0x54,0xc8,0x8c,0x9e,0xde, -0x61,0x5c,0xd0,0x07,0xba,0x89,0x01,0x6d,0xbc,0xe7,0xdc,0x1a,0x7d,0x7e,0x71,0xeb, -0xdf,0xf0,0x5a,0xdf,0x00,0x5b,0xb3,0x0d,0x1b,0xe1,0xf7,0x89,0x2f,0x80,0xe8,0xd7, -0xd3,0xdb,0xdb,0xe7,0xf0,0x56,0x92,0xbe,0x9f,0xfd,0x94,0x7f,0x6a,0xb8,0xbf,0x69, -0x8f,0x85,0xfa,0xaf,0x8f,0x2e,0x7c,0x36,0xfe,0x0b,0xd0,0xac,0xae,0x64,0xb7,0x59, -0xef,0xef,0x92,0x44,0x91,0x63,0x40,0xd2,0xca,0x5b,0x6a,0x85,0x45,0xce,0x32,0x7d, -0x1b,0xa6,0x28,0x11,0xef,0xb4,0x57,0x17,0x6d,0xf1,0xb3,0xe1,0xe5,0xeb,0x2a,0xdb, -0xf8,0xf3,0xc3,0x33,0xb3,0x1c,0x05,0x8b,0x58,0xb7,0x62,0x4f,0xe0,0xf5,0xd9,0x83, -0x9e,0x94,0x0c,0x5a,0x2b,0x33,0x5f,0xf1,0x1e,0x9f,0xe1,0x7d,0x3d,0xaf,0xb5,0x3b, -0x91,0x6b,0x6a,0xac,0x14,0xb9,0x52,0xdc,0x93,0x80,0x30,0x01,0x35,0x81,0x17,0xc5, -0xff,0x00,0x07,0xcd,0xd3,0x5d,0x80,0x7f,0xbe,0xae,0xbf,0xcc,0x57,0x34,0xf1,0x34, -0x69,0x4b,0x96,0xa4,0xd2,0x7e,0x6d,0x22,0x1c,0xe1,0x17,0x66,0xd2,0x3b,0x1a,0x31, -0x5c,0xcc,0x7f,0x12,0xfc,0x2b,0x26,0x31,0xe2,0x0b,0x01,0x9f,0xef,0x4e,0xa3,0xf9, -0xd4,0xc3,0xe2,0x0f,0x86,0x0f,0x4f,0x10,0xe9,0x9f,0xf8,0x16,0x9f,0xe3,0x49,0x62, -0xb0,0xef,0x6a,0x8b,0xef,0x42,0xf6,0x90,0xfe,0x64,0x74,0x34,0x56,0x12,0xf8,0xe7, -0xc3,0x8e,0x78,0xd7,0xf4,0xc3,0xff,0x00,0x6f,0x91,0xff,0x00,0x8d,0x58,0x8b,0xc5, -0x3a,0x34,0xe3,0xf7,0x7a,0xb5,0x8c,0x9f,0xee,0xdc,0x21,0xfe,0xb5,0xa2,0xad,0x4d, -0xed,0x25,0xf7,0x8f,0x9a,0x2f,0x66,0x6a,0xd1,0x55,0x13,0x55,0xb2,0x97,0x95,0xbb, -0x81,0xbf,0xdd,0x95,0x4f,0xf5,0xa9,0x96,0x78,0xa4,0xfb,0xb2,0x2b,0x7d,0x1a,0xaf, -0x9e,0x2f,0x66,0x55,0xd1,0x2d,0x14,0xdd,0xdd,0xc1,0xa5,0x07,0x35,0x43,0x16,0x8a, -0x28,0xa6,0x01,0x45,0x21,0xe9,0x49,0x9a,0x00,0x75,0x26,0x29,0x32,0x3d,0x69,0x73, -0x48,0x05,0xa4,0xc5,0x18,0xf7,0xa5,0xa6,0x02,0x62,0x96,0x8a,0x28,0x00,0xa2,0x8a, -0x28,0x01,0x29,0x68,0xa2,0x80,0x12,0x8c,0x52,0xd1,0x40,0x05,0x14,0x51,0x40,0x05, -0x26,0x29,0x68,0xa0,0x04,0xc5,0x18,0x1e,0x94,0xb4,0x50,0x02,0x6d,0x1e,0x82,0x93, -0xcb,0x53,0xfc,0x23,0xf2,0xa0,0x92,0x3f,0x87,0x3f,0x8d,0x28,0xcf,0x71,0x8a,0x00, -0x69,0x82,0x33,0xd6,0x35,0x3f,0x80,0xa6,0x9b,0x58,0x5b,0xac,0x48,0x7f,0xe0,0x22, -0xa5,0xa2,0x95,0x97,0x61,0x59,0x10,0x1b,0x1b,0x73,0xd6,0x08,0xff,0x00,0xef,0x91, -0x4d,0x3a,0x6d,0xa3,0x75,0xb6,0x84,0xfd,0x50,0x55,0x9a,0x29,0x72,0xc7,0xb0,0x59, -0x14,0x9b,0x46,0xb0,0x6e,0xb6,0x56,0xe7,0xfe,0xd9,0x8f,0xf0,0xa8,0xdb,0xc3,0xba, -0x5b,0x75,0xd3,0xed,0x8f,0xfd,0xb2,0x5f,0xf0,0xad,0x1a,0x29,0x7b,0x38,0x76,0x17, -0x2a,0xec,0x64,0xb7,0x85,0x74,0x76,0xeb,0xa6,0x5a,0x9f,0xfb,0x64,0xbf,0xe1,0x51, -0xb7,0x83,0x74,0x36,0xeb,0xa4,0xda,0x1f,0xac,0x23,0xfc,0x2b,0x6a,0x8a,0x9f,0x65, -0x4f,0xf9,0x57,0xdc,0x2e,0x48,0x76,0x30,0x1f,0xc0,0x9e,0x1e,0x93,0xef,0x68,0xd6, -0x67,0xfe,0xd8,0x8a,0x89,0xbe,0x1c,0xf8,0x65,0xba,0xe8,0x96,0x7f,0xf7,0xec,0x57, -0x49,0x45,0x4b,0xc3,0xd2,0x7b,0xc1,0x7d,0xc4,0xfb,0x28,0x3f,0xb2,0x8e,0x55,0xbe, -0x17,0xf8,0x55,0xfa,0xe8,0x96,0x9f,0xf7,0xc5,0x42,0xdf,0x09,0x3c,0x22,0xdd,0x74, -0x3b,0x5f,0xfb,0xe6,0xba,0xfa,0x5a,0x8f,0xaa,0xd0,0xfe,0x45,0xf7,0x21,0x7b,0x1a, -0x5f,0xca,0xbe,0xe3,0x89,0x7f,0x83,0x7e,0x0e,0x7e,0xba,0x1d,0xb7,0xe5,0x50,0x3f, -0xc0,0xff,0x00,0x05,0x3f,0xfc,0xc0,0xe0,0x1f,0x4c,0xd7,0x7b,0x45,0x4b,0xc1,0xe1, -0xdf,0xfc,0xbb,0x5f,0x72,0x27,0xea,0xf4,0x7f,0x91,0x7d,0xc7,0x9e,0x3f,0xc0,0x5f, -0x04,0xbf,0xfc,0xc1,0xa3,0x1f,0x46,0x35,0x0b,0xfe,0xcf,0x7e,0x09,0x7f,0xf9,0x85, -0x63,0xe8,0xe6,0xbd,0x23,0x34,0x64,0x7a,0xd4,0x7d,0x47,0x0b,0xff,0x00,0x3e,0xd7, -0xdc,0x88,0xfa,0xa5,0x0f,0xe4,0x5f,0x71,0xe6,0x0f,0xfb,0x39,0x78,0x25,0xff,0x00, -0xe6,0x1c,0xc3,0xe8,0xf5,0x0b,0xfe,0xcd,0x5e,0x09,0x7f,0xf9,0x72,0x90,0x7d,0x24, -0xaf,0x55,0xa2,0xa7,0xfb,0x3f,0x08,0xff,0x00,0xe5,0xda,0xfb,0x89,0xfa,0x96,0x19, -0xef,0x4d,0x7d,0xc7,0x92,0x3f,0xec,0xc5,0xe0,0xb6,0xe9,0x05,0xc2,0xff,0x00,0xdb, -0x4a,0x81,0xff,0x00,0x65,0xcf,0x07,0xb7,0x41,0x72,0xbf,0xf6,0xd2,0xbd,0x8e,0x8a, -0x9f,0xec,0xcc,0x1b,0xff,0x00,0x97,0x4b,0xee,0x27,0xea,0x18,0x57,0xff,0x00,0x2e, -0xd7,0xdc,0x78,0xb3,0xfe,0xca,0xbe,0x12,0x6e,0x92,0x5d,0x2f,0xfc,0x08,0x54,0x2f, -0xfb,0x27,0xf8,0x5d,0xba,0x5c,0xdd,0x0f,0xc4,0x57,0xb7,0xd1,0x51,0xfd,0x95,0x82, -0xff,0x00,0x9f,0x48,0x97,0x97,0x61,0x1f,0xfc,0xbb,0x47,0x84,0xbf,0xec,0x95,0xe1, -0xb6,0xe9,0x7d,0x76,0x3f,0x2a,0xa5,0x77,0xfb,0x24,0x69,0xd0,0x95,0x9f,0x4e,0xd6, -0x6e,0xed,0xae,0xe3,0x21,0xe2,0x90,0x60,0x15,0x61,0xd0,0x82,0x39,0x06,0xbe,0x83, -0xa4,0x3d,0x29,0x7f,0x64,0xe0,0xf7,0x54,0xed,0xf7,0x99,0xbc,0xaf,0x07,0x2f,0xf9, -0x76,0x8f,0x01,0xf0,0x97,0xc6,0x3d,0x4f,0xe1,0xff,0x00,0x89,0xd3,0xc2,0x5e,0x3e, -0xb9,0x59,0xa1,0x77,0x10,0xda,0x6b,0xa4,0x6d,0xcb,0x67,0x01,0x66,0xed,0xcf,0x1f, -0x3f,0xe7,0xeb,0x5e,0xfa,0x8c,0x18,0x70,0x72,0x3d,0x6b,0xe3,0x1f,0xda,0x88,0xa5, -0xee,0xbb,0x24,0x4c,0x01,0x05,0x88,0xc7,0xad,0x77,0x1f,0xb1,0xff,0x00,0xc6,0x49, -0xbc,0x47,0x65,0x79,0xe0,0x6d,0x66,0xe9,0xa6,0xd5,0xf4,0xa8,0x84,0xd6,0x53,0x4a, -0xd9,0x79,0xed,0x72,0x06,0x09,0xee,0x63,0x25,0x47,0xd1,0x97,0xd2,0xb9,0x70,0x18, -0xde,0x6a,0xd3,0xc3,0x4d,0xdf,0x95,0xe8,0xcf,0x23,0x07,0x98,0xfb,0x2c,0x6b,0xcb, -0xea,0xbb,0xaf,0xb2,0xdf,0xe4,0xff,0x00,0x43,0xe9,0x8a,0x29,0x9b,0xbd,0xff,0x00, -0x5a,0x2b,0xe8,0x8f,0xaa,0xe6,0x43,0xe8,0xa2,0x8a,0x45,0x05,0x14,0x51,0x40,0x05, -0x79,0x0f,0xed,0x3d,0xe2,0xdf,0xf8,0x46,0xfe,0x1a,0xdc,0x5a,0x45,0x26,0xcb,0xad, -0x55,0xc5,0xa2,0x60,0xf3,0xb3,0xac,0x9f,0xf8,0xe8,0x23,0xfe,0x05,0x5e,0xb8,0x49, -0xed,0x5f,0x1b,0x7e,0xd4,0xbe,0x30,0x3a,0xff,0x00,0xc4,0x4f,0xec,0xb8,0xdf,0x75, -0xae,0x93,0x10,0x8b,0x00,0x82,0x0c,0xad,0x86,0x73,0xf8,0x0d,0xa3,0xea,0x0d,0x78, -0xf9,0xb6,0x23,0xea,0xf8,0x59,0x35,0xbb,0xd1,0x7c,0xcf,0x13,0x38,0xc4,0xfd,0x5b, -0x07,0x26,0xb7,0x96,0x8b,0xe6,0x72,0x5f,0x06,0x7c,0x26,0x7c,0x5d,0xe3,0xed,0x32, -0xd3,0x6e,0xe8,0x52,0x41,0x2c,0xb9,0xfe,0xe8,0xe6,0xbe,0xf6,0x8d,0x04,0x68,0xa8, -0xa3,0x0a,0xa3,0x00,0x0f,0x4a,0xf9,0xd3,0xf6,0x49,0xf0,0x8f,0xd9,0xf4,0xfb,0xfd, -0x7a,0x68,0xfe,0x79,0x4f,0x93,0x13,0x1f,0x4e,0xf5,0xf4,0x60,0xae,0x3c,0x8b,0x0f, -0xec,0xb0,0xde,0xd1,0xef,0x2d,0x7e,0x5d,0x0c,0x32,0x2c,0x37,0xb0,0xc2,0x29,0x3d, -0xe5,0xa8,0xb4,0x51,0x45,0x7d,0x21,0xf4,0x41,0x48,0x4e,0x29,0x6b,0x95,0xf8,0xad, -0xe3,0x88,0x3e,0x19,0xfc,0x32,0xf1,0x5f,0x8b,0x6e,0x81,0x68,0x34,0x4d,0x2e,0xe7, -0x50,0x65,0x03,0x39,0xf2,0xa3,0x67,0xc7,0xe3,0x8a,0x00,0xfc,0xfb,0xff,0x00,0x82, -0x96,0x7f,0xc1,0x41,0x75,0x2f,0x01,0x6a,0xd7,0xbf,0x09,0xbe,0x1b,0x6a,0x06,0xcf, -0x59,0x8e,0x30,0x35,0xcd,0x72,0x03,0x87,0xb6,0xdc,0x33,0xf6,0x68,0x5b,0xb3,0xed, -0x20,0xb3,0x8f,0xbb,0xb8,0x01,0xce,0xec,0x7c,0x27,0xf0,0x53,0xf6,0x29,0xf8,0xcd, -0xfb,0x4a,0x59,0xcb,0xaf,0x78,0x6b,0xc3,0xb2,0x4d,0xa4,0xc9,0x21,0x27,0x5a,0xd5, -0xee,0x45,0xbc,0x33,0xbe,0x4e,0xe2,0xae,0xe7,0x32,0x1c,0x83,0x92,0xa0,0xe0,0xf5, -0x35,0xe5,0x9a,0x76,0xab,0x1f,0x8f,0xbe,0x29,0xda,0x6a,0x3e,0x2e,0xbf,0x2b,0x0e, -0xb3,0xac,0xa4,0xfa,0xb5,0xfb,0xb6,0xd2,0xa9,0x2c,0xe0,0xcf,0x21,0x3d,0xb0,0x19, -0x8f,0xb5,0x7f,0x40,0x9f,0x1c,0x3e,0x24,0xe8,0x3f,0xb3,0x97,0xec,0xbf,0xae,0xf8, -0x9b,0x43,0x5b,0x5b,0x7d,0x2b,0x46,0xd1,0x44,0x7a,0x34,0x36,0xa5,0x44,0x4c,0xcc, -0xa2,0x3b,0x61,0x1e,0x38,0x20,0xb3,0x27,0x4e,0xdc,0xd3,0x25,0x6a,0x7f,0x3e,0x1e, -0x2f,0xf0,0x4e,0xa1,0xe0,0xef,0x1d,0x6a,0xbe,0x13,0x9d,0xa1,0xbe,0xd5,0x74,0xeb, -0xe7,0xd3,0xa4,0xfb,0x03,0x99,0x63,0x92,0x64,0x7d,0x85,0x50,0xe0,0x6e,0xf9,0x81, -0x03,0x8e,0x71,0x5f,0xbd,0xbe,0x1c,0xf8,0x6b,0xa7,0x7e,0xce,0x7f,0xb0,0xcd,0xef, -0x86,0x2e,0x84,0x51,0xc7,0xa3,0x78,0x42,0xed,0xf5,0x07,0xc6,0x16,0x4b,0x86,0xb7, -0x91,0xe7,0x27,0xeb,0x23,0x30,0xfc,0xab,0xf2,0x6b,0xfe,0x09,0xd5,0xf0,0x92,0x7f, -0x8e,0x9f,0xb5,0xbf,0x87,0xae,0x75,0x24,0x6b,0xed,0x3f,0x45,0x95,0xfc,0x45,0xa9, -0xcb,0x29,0xfb,0xcd,0x11,0x06,0x32,0x4f,0x72,0xd3,0xb4,0x59,0xf5,0x19,0xaf,0xb2, -0xff,0x00,0xe0,0xac,0x1f,0xb6,0x06,0x8d,0xa5,0x78,0x12,0xe7,0xe0,0xdf,0x85,0xb5, -0x38,0x6f,0xf5,0xfd,0x52,0x44,0xfe,0xde,0x6b,0x67,0x0e,0xb6,0x56,0xc8,0x43,0x08, -0x19,0x81,0xe2,0x47,0x60,0x99,0x5e,0x48,0x50,0x72,0x06,0xe1,0x40,0x2d,0x35,0x3f, -0x2c,0xfe,0x17,0x78,0x72,0xe3,0xc6,0x1f,0x12,0xfc,0x27,0xa0,0xd9,0x0c,0xdd,0xea, -0x7a,0xb5,0xa5,0x9c,0x5c,0xe3,0xe6,0x92,0x64,0x51,0xfc,0xeb,0xfa,0x6e,0x8d,0x3c, -0xb4,0x55,0xeb,0x80,0x06,0x6b,0xf1,0x1f,0xfe,0x09,0x3f,0xf0,0x0e,0xe3,0xe2,0x67, -0xed,0x0b,0x17,0x8c,0xaf,0x2d,0x0b,0xf8,0x7b,0xc1,0xa9,0xf6,0xb6,0x92,0x45,0x3b, -0x1e,0xf1,0x81,0x10,0x20,0x3e,0xaa,0x73,0x27,0xb6,0xc1,0xeb,0x5f,0xb7,0x2c,0xc1, -0x14,0x92,0x70,0x00,0xcd,0x0c,0x16,0xc7,0x81,0xfe,0xd2,0x7e,0x22,0x12,0xdd,0x69, -0x9a,0x24,0x6d,0x91,0x18,0x37,0x52,0x8f,0x73,0x95,0x4f,0xd3,0x77,0xe6,0x2b,0xc4, -0xab,0x7b,0xc7,0x5e,0x20,0x3e,0x28,0xf1,0x6e,0xa7,0xa9,0x64,0x98,0xe5,0x98,0x88, -0xb3,0xd9,0x07,0x0b,0xfa,0x01,0x58,0x35,0xf8,0x96,0x67,0x89,0xfa,0xde,0x2e,0x75, -0x56,0xd7,0xb2,0xf4,0x5a,0x1f,0x29,0x88,0xa9,0xed,0x6a,0xb9,0x06,0x68,0xa2,0x8c, -0xd7,0x98,0x73,0x85,0x14,0x51,0x48,0x00,0x71,0x4e,0x49,0x5e,0x33,0x95,0x76,0x52, -0x3b,0x83,0x8a,0x6d,0x14,0xd3,0x6b,0x60,0xb9,0xb5,0xa6,0xf8,0xd7,0x5f,0xd2,0x0a, -0xfd,0x93,0x58,0xbd,0x84,0x2f,0x45,0x13,0x31,0x5f,0xc8,0xf1,0x5e,0x89,0xe1,0x6f, -0xda,0x2b,0x56,0xb0,0x91,0x22,0xd6,0xed,0xd3,0x51,0xb7,0xef,0x2c,0x2a,0x12,0x51, -0xf8,0x7d,0xd3,0xfa,0x7d,0x6b,0xc8,0x68,0xaf,0x43,0x0f,0x98,0xe2,0xb0,0xb2,0xbd, -0x2a,0x8f,0xf4,0xfb,0x8d,0xe1,0x5e,0xa5,0x37,0x78,0xc8,0xfb,0x57,0xc3,0x5e,0x28, -0xd3,0xbc,0x59,0xa6,0xa5,0xf6,0x9b,0x72,0xb7,0x10,0x31,0xc1,0xec,0xc8,0xdd,0xd5, -0x87,0x63,0x5a,0xd5,0xf2,0x47,0xc2,0x6f,0x18,0x4f,0xe1,0x2f,0x17,0xda,0x10,0xe7, -0xec,0x57,0x6e,0xb0,0x5c,0xc7,0x9e,0x08,0x27,0x01,0xbe,0xaa,0x4e,0x7f,0x3f,0x5a, -0xfa,0xd9,0x4e,0x46,0x6b,0xf5,0x3c,0xa7,0x31,0x59,0x8d,0x0e,0x76,0xad,0x25,0xa3, -0x3e,0x8b,0x0d,0x5f,0xdb,0xc2,0xfd,0x50,0x37,0x00,0xd7,0xcd,0x1f,0x15,0x3e,0x26, -0xeb,0x51,0x78,0xeb,0x51,0xb7,0xd2,0xf5,0x5b,0x9b,0x5b,0x4b,0x56,0x10,0x04,0x89, -0xf0,0xa5,0x94,0x7c,0xc7,0x1f,0xef,0x64,0x7e,0x15,0xf4,0x4e,0xbb,0xaa,0xc7,0xa1, -0xe8,0xd7,0xda,0x84,0xdc,0xc5,0x6b,0x0b,0xcc,0xc0,0x75,0x21,0x41,0x38,0xfd,0x2b, -0xe2,0x8b,0xbb,0xa9,0x2f,0x6e,0xa6,0xb8,0x95,0xb7,0xcb,0x33,0xb4,0x8e,0xc7,0xbb, -0x13,0x92,0x6b,0xc6,0xe2,0x5c,0x64,0xe8,0xd3,0xa7,0x4a,0x9c,0xac,0xdb,0xbe,0x9d, -0x8e,0x6c,0x7d,0x57,0x08,0xa8,0xc5,0xd8,0xea,0x13,0xe2,0xc7,0x8b,0xa3,0xe9,0xae, -0xdd,0x7e,0x3b,0x4f,0xf3,0x15,0x32,0x7c,0x64,0xf1,0x94,0x7d,0x35,0xb9,0x0f,0xfb, -0xd1,0x46,0x7f,0xf6,0x5a,0xe3,0x28,0xaf,0x82,0x58,0xec,0x52,0xda,0xac,0xbe,0xf6, -0x78,0x9e,0xda,0xa7,0xf3,0x3f,0xbc,0xef,0x13,0xe3,0x8f,0x8c,0xd3,0xfe,0x62,0xc1, -0xbf,0xde,0xb7,0x8b,0xff,0x00,0x89,0xab,0x09,0xf1,0xef,0xc6,0x0b,0xd6,0xf6,0x06, -0xfa,0xdb,0xaf,0xf8,0x57,0x9d,0xd1,0x5a,0x2c,0xcb,0x1a,0xb6,0xad,0x2f,0xbd,0x97, -0xf5,0x8a,0xbf,0xcc,0xcf,0x4a,0x5f,0xda,0x0b,0xc5,0xca,0x79,0x96,0xd1,0xff,0x00, -0xde,0xb7,0xff,0x00,0x03,0x53,0xa7,0xed,0x17,0xe2,0xa4,0xeb,0x16,0x9c,0xff,0x00, -0x58,0x1b,0xff,0x00,0x8b,0xaf,0x2e,0xa2,0xb4,0x59,0xb6,0x39,0x6d,0x59,0xfd,0xe3, -0x58,0x9a,0xcb,0xed,0x33,0xd6,0x23,0xfd,0xa4,0xbc,0x48,0xbf,0x7a,0xcb,0x4e,0x6f, -0xfb,0x66,0xe3,0xff,0x00,0x67,0xab,0x09,0xfb,0x4b,0x6b,0x60,0x7c,0xda,0x5d,0x8b, -0x1f,0x6d,0xe3,0xfa,0xd7,0x8f,0xd1,0x56,0xb3,0x9c,0x7a,0xff,0x00,0x97,0xac,0x7f, -0x5a,0xaf,0xfc,0xc7,0xb3,0x27,0xed,0x33,0xaa,0x0f,0xbd,0xa2,0xda,0xb7,0xd2,0x56, -0x1f,0xd2,0xa7,0x5f,0xda,0x6e,0xef,0xf8,0xb4,0x08,0x7f,0x0b,0xa3,0xff,0x00,0xc4, -0xd7,0x89,0x51,0xfa,0xd6,0xab,0x3c,0xcc,0x3a,0x55,0xfc,0x17,0xf9,0x14,0xb1,0x95, -0xff,0x00,0x98,0xfb,0x1b,0xe1,0xef,0x8b,0x26,0xf1,0xb7,0x86,0x61,0xd5,0xa5,0xb3, -0x16,0x42,0x67,0x75,0x48,0xc3,0xee,0xc8,0x52,0x57,0x39,0xc0,0xee,0x0d,0x74,0xb5, -0x89,0xe0,0xad,0x23,0xfb,0x03,0xc2,0x9a,0x56,0x9e,0x7e,0xf4,0x16,0xe8,0xaf,0xee, -0xd8,0xcb,0x1f,0xcf,0x35,0xb4,0x6b,0xf5,0xac,0x3f,0x3f,0xb1,0x87,0xb5,0x77,0x95, -0x95,0xfd,0x4f,0xa5,0x85,0xf9,0x17,0x36,0xe2,0xd2,0x13,0x8a,0xaf,0x7b,0x7f,0x6f, -0xa7,0x5a,0x49,0x73,0x75,0x3c,0x76,0xf6,0xf1,0x8d,0xcf,0x2c,0xac,0x15,0x54,0x7a, -0x92,0x6b,0xc7,0x3c,0x65,0xfb,0x45,0xdb,0xda,0xb3,0xdb,0x78,0x7a,0xdf,0xed,0x72, -0x0e,0x3e,0xd9,0x70,0x08,0x8f,0xea,0xab,0xd4,0xfe,0x38,0xfc,0x6b,0x0c,0x5e,0x3b, -0x0f,0x82,0x8f,0x35,0x69,0x5b,0xcb,0xaf,0xdc,0x4d,0x5a,0xd0,0xa4,0xaf,0x36,0x7b, -0x51,0x70,0xa3,0x24,0xe0,0x7a,0x9a,0xe5,0xf5,0x8f,0x8a,0x3e,0x16,0xd0,0xb7,0x0b, -0x9d,0x6a,0xd8,0xba,0x9c,0x18,0xe0,0x6f,0x39,0x81,0xf7,0x09,0x92,0x2b,0xe5,0xbf, -0x10,0xf8,0xe3,0x5d,0xf1,0x4c,0x8c,0xda,0x96,0xa5,0x34,0xe8,0x4e,0x7c,0xa0,0xdb, -0x63,0x1f,0x45,0x18,0x15,0x85,0xd2,0xbe,0x33,0x11,0xc5,0x2f,0x6c,0x3d,0x3f,0x9b, -0xff,0x00,0x25,0xfe,0x67,0x95,0x3c,0xc7,0xf9,0x23,0xf7,0x9f,0x4b,0xdf,0xfe,0xd1, -0x7e,0x19,0xb6,0x72,0xb0,0x45,0x7d,0x79,0xe8,0xd1,0xc4,0x15,0x7f,0xf1,0xe6,0x07, -0xf4,0xac,0xb9,0xbf,0x69,0x9d,0x31,0x4f,0xee,0x74,0x6b,0xb7,0x1f,0xed,0xc8,0xab, -0xfc,0xb3,0x5f,0x3e,0x51,0x5e,0x44,0xb8,0x8f,0x1f,0x2d,0x9a,0x5f,0x2f,0xf3,0x39, -0x5e,0x3a,0xb3,0xea,0x7b,0xfa,0xfe,0xd3,0x76,0x64,0xfc,0xda,0x14,0xe0,0x7b,0x4e, -0xa7,0xfa,0x55,0xb8,0xbf,0x69,0x6d,0x10,0xe3,0xcc,0xd2,0xf5,0x04,0xf5,0xda,0x23, -0x6f,0xfd,0x98,0x57,0xce,0xb4,0x54,0xae,0x21,0xcc,0x17,0xda,0x4f,0xe4,0x84,0xb1, -0xd5,0xfb,0x9f,0x53,0x58,0x7c,0x7b,0xf0,0x85,0xe8,0x4f,0x32,0xf2,0x6b,0x36,0x6f, -0xe1,0x9e,0xdd,0xb8,0xfa,0x95,0x04,0x7e,0xb5,0xd8,0xe9,0x3e,0x25,0xd2,0xb5,0xe0, -0x4e,0x9d,0xa9,0x5a,0xde,0xe0,0x64,0x88,0x25,0x56,0x23,0xea,0x07,0x4a,0xf8,0xa2, -0x9d,0x14,0xaf,0x04,0x8a,0xf1,0xbb,0x46,0xeb,0xca,0xb2,0x1c,0x11,0xf4,0x22,0xbd, -0x0a,0x3c,0x51,0x88,0x8b,0xfd,0xf4,0x13,0x5e,0x5a,0x3f,0xd4,0xde,0x19,0x8c,0xd7, -0xc4,0xae,0x7d,0xcf,0x9c,0x9e,0xb4,0xb5,0xf2,0xcf,0x84,0xfe,0x39,0x78,0x8b,0xc3, -0xae,0x91,0xdd,0x4d,0xfd,0xaf,0x68,0x3a,0xc7,0x72,0x7e,0x70,0x3d,0x9f,0xaf,0xe7, -0x9a,0xf7,0xbf,0x04,0x7c,0x49,0xd1,0xfc,0x75,0x6e,0x4d,0x94,0xde,0x55,0xda,0x0c, -0xc9,0x69,0x36,0x04,0x8b,0xee,0x3d,0x47,0xb8,0xaf,0xaf,0xc0,0xe7,0x18,0x5c,0x73, -0xe5,0x83,0xb4,0xbb,0x3f,0xd0,0xf4,0xe8,0xe2,0xa9,0xd6,0xd1,0x3b,0x33,0xac,0xa2, -0x90,0x1c,0x8a,0x5a,0xf7,0x0e,0xc0,0xa2,0x8a,0x28,0x00,0xa2,0x90,0x9c,0x57,0x3b, -0xe2,0x9f,0x88,0x1a,0x1f,0x83,0x93,0x3a,0x9d,0xfc,0x71,0x4a,0x46,0x44,0x09,0xf3, -0xc8,0xdf,0xf0,0x11,0xce,0x3d,0xcf,0x15,0x95,0x4a,0xb0,0xa5,0x1e,0x6a,0x92,0xb2, -0xf3,0x26,0x52,0x51,0x57,0x93,0x3a,0x3a,0x4c,0xd7,0x84,0x6b,0xdf,0xb4,0xb3,0x1d, -0xc9,0xa3,0xe9,0x20,0x0e,0xd2,0xde,0x3f,0x3f,0xf7,0xc2,0xff,0x00,0xf1,0x55,0xc3, -0xea,0x7f,0x1b,0x7c,0x5f,0xa9,0x13,0xff,0x00,0x13,0x31,0x68,0xa7,0xf8,0x6d,0xa2, -0x55,0xc7,0xe3,0x82,0x7f,0x5a,0xf9,0xca,0xfc,0x45,0x81,0xa5,0xa4,0x5b,0x97,0xa2, -0xff,0x00,0x33,0x82,0x78,0xea,0x31,0xd1,0x6a,0x7d,0x5d,0x9f,0xca,0x8d,0xc3,0xd6, -0xbe,0x30,0xba,0xf1,0xaf,0x88,0x2f,0x73,0xe7,0xeb,0x7a,0x84,0x80,0xf5,0x06,0xe5, -0xf1,0xf9,0x66,0xb3,0x1e,0xfa,0xe6,0x43,0x96,0xb8,0x95,0x89,0xee,0xce,0x4d,0x79, -0x92,0xe2,0xaa,0x6b,0xe1,0xa4,0xfe,0xff,0x00,0xf8,0x07,0x3b,0xcc,0xa3,0xd2,0x27, -0xdc,0x04,0x2b,0x1f,0x9b,0x69,0xfa,0xd3,0x86,0xd0,0x30,0x00,0xfc,0x2b,0xe1,0xbf, -0xb5,0xcf,0xff,0x00,0x3d,0xa4,0xff,0x00,0xbe,0x8d,0x58,0xb6,0xd7,0x35,0x2b,0x33, -0x9b,0x7d,0x42,0xea,0x03,0xeb,0x1c,0xcc,0xbf,0xc8,0xd4,0xae,0x2a,0x87,0x5a,0x3f, -0x8f,0xfc,0x01,0x7f,0x69,0x2e,0xb1,0xfc,0x4f,0xb6,0xb6,0xa9,0x3d,0x06,0x69,0xd9, -0xe3,0x8a,0xf8,0xe6,0xd3,0xe2,0x37,0x8a,0x2c,0xbf,0xd5,0x6b,0xd7,0xff,0x00,0x47, -0x9d,0x9c,0x7f,0xe3,0xd9,0xae,0x82,0xc3,0xe3,0xcf,0x8b,0xec,0x48,0xdf,0x75,0x05, -0xea,0x8e,0xd3,0xc0,0xbf,0xcd,0x71,0x5d,0x74,0xf8,0x9f,0x0b,0x2f,0x8e,0x2d,0x7d, -0xcc,0xda,0x39,0x85,0x37,0xba,0x68,0xfa,0xa2,0x90,0xf1,0x5e,0x27,0xe1,0x2f,0xda, -0x22,0x6d,0x5f,0x53,0xb3,0xd3,0xef,0xb4,0x61,0xe6,0xdc,0xca,0x90,0xac,0x96,0xb2, -0x7f,0x13,0x10,0x07,0xca,0xdf,0x5f,0x5a,0xf6,0xc1,0xc8,0x15,0xf4,0x78,0x4c,0x75, -0x0c,0x74,0x5c,0xa8,0x4a,0xf6,0x3b,0xa9,0x56,0x85,0x65,0x78,0x30,0x56,0x0e,0xa0, -0x8e,0x86,0x96,0x9a,0xab,0xb4,0x60,0x74,0xa7,0x57,0x79,0xb0,0x53,0x5c,0xe1,0x49, -0xf4,0x14,0xea,0x8a,0xe9,0xfc,0xbb,0x69,0x5b,0xd1,0x09,0xfd,0x29,0x3d,0x80,0xf8, -0x93,0xf6,0x80,0xb9,0xfb,0x47,0x8a,0xe4,0x5c,0xe7,0x04,0xd7,0x87,0xe8,0xfe,0x3c, -0x97,0xe1,0x5f,0xc5,0x4f,0x09,0x78,0xaa,0x10,0x0a,0x5a,0x5f,0x24,0x57,0x0a,0x4e, -0x03,0x41,0x27,0xee,0xe4,0x07,0xfe,0x02,0xc4,0x8f,0x70,0x3d,0x2b,0xd6,0xbe,0x33, -0x5c,0x79,0xde,0x2d,0xb8,0x39,0xce,0x33,0x5f,0x2e,0x7c,0x77,0xba,0x30,0xe8,0x72, -0xed,0x38,0x60,0xa4,0x8c,0x7a,0xd7,0xe7,0x18,0x29,0x37,0x8e,0x94,0x97,0x76,0x7e, -0x39,0x8f,0xa9,0x25,0x9a,0x53,0x9c,0x77,0xe7,0x47,0xec,0x77,0xdb,0x61,0xff,0x00, -0x9e,0xc9,0xf9,0xd1,0x5e,0x03,0xfd,0x91,0x7b,0xff,0x00,0x3f,0x72,0xff,0x00,0xdf, -0x46,0x8a,0xfd,0x0f,0x9d,0x9f,0xaf,0x73,0x79,0x1f,0x44,0xd1,0x45,0x15,0xa9,0xa8, -0x51,0x45,0x14,0x01,0x93,0xe2,0x9d,0x7a,0x1f,0x0b,0xf8,0x77,0x53,0xd5,0xae,0x48, -0xf2,0x6c,0xed,0xde,0x76,0x1e,0xbb,0x41,0x38,0xfc,0x4f,0x15,0xf9,0xe8,0xf3,0x5d, -0x78,0x97,0x5b,0x92,0x79,0x4b,0x4d,0x79,0x7d,0x39,0x76,0x3d,0x49,0x66,0x6c,0xff, -0x00,0x5a,0xfa,0x97,0xf6,0xb9,0xf1,0x6b,0x69,0x9e,0x11,0xb1,0xd0,0xa0,0x90,0x2c, -0xba,0x9c,0xdb,0xe5,0x51,0x8c,0xf9,0x51,0xf3,0xfa,0xb1,0x5f,0xc8,0xd7,0x8e,0x7e, -0xce,0xde,0x11,0xff,0x00,0x84,0xa3,0xe2,0x15,0xa3,0xc8,0xbb,0xad,0xac,0xff,0x00, -0x7e,0xfc,0x71,0xc7,0x41,0xf9,0xd7,0xc3,0xe7,0x33,0x78,0xac,0x54,0x30,0x90,0xfe, -0x9b,0xff,0x00,0x80,0x7c,0x26,0x6f,0x27,0x8c,0xc7,0x53,0xc2,0x47,0x65,0xbf,0xab, -0xff,0x00,0x80,0x7d,0x75,0xf0,0xeb,0xc3,0x51,0xf8,0x4f,0xc1,0xba,0x5e,0x9a,0x8b, -0xb5,0xa2,0x84,0x17,0xf7,0x62,0x32,0x6b,0xa4,0x03,0x14,0x2f,0x02,0x96,0xbe,0xd2, -0x9c,0x15,0x38,0x28,0x47,0x64,0x7d,0xc4,0x22,0xa1,0x15,0x15,0xb2,0x0a,0x28,0xa2, -0xb4,0x2c,0x2b,0x88,0xf8,0xe1,0xe0,0x17,0xf8,0xa9,0xf0,0x77,0xc6,0xbe,0x0f,0x8e, -0x5f,0x22,0x5d,0x73,0x48,0xba,0xb0,0x8e,0x53,0xfc,0x0f,0x24,0x4c,0xaa,0x7f,0x02, -0x45,0x76,0xf4,0x84,0x66,0x80,0x3f,0x97,0xbf,0x12,0xf8,0x6f,0x53,0xf0,0x77,0x88, -0x75,0x2d,0x0f,0x59,0xb3,0x97,0x4f,0xd5,0x74,0xeb,0x87,0xb5,0xba,0xb5,0x9d,0x70, -0xf1,0x48,0xa4,0x86,0x52,0x3e,0xa2,0xb4,0xa7,0xf8,0x99,0xe2,0xdb,0x9f,0x06,0x0f, -0x08,0x4d,0xe2,0x5d,0x56,0x6f,0x0b,0x09,0x56,0x71,0xa3,0x49,0x79,0x23,0x5a,0xac, -0x8b,0x9d,0xac,0x23,0x27,0x68,0x23,0x27,0xa0,0xef,0x5f,0xbd,0xff,0x00,0xb4,0x67, -0xec,0x2b,0xf0,0x9f,0xf6,0x99,0xb8,0x6d,0x4b,0xc4,0xba,0x3c,0xba,0x77,0x88,0xf6, -0x04,0x1a,0xee,0x8f,0x20,0x82,0xe9,0x80,0x18,0x01,0xf8,0x29,0x26,0x07,0x03,0x7a, -0x92,0x07,0x00,0x81,0x5f,0x2a,0x6a,0xbf,0xf0,0x44,0xcf,0x0c,0x49,0x76,0x0e,0x99, -0xf1,0x3b,0x56,0xb6,0xb5,0xef,0x1d,0xde,0x9b,0x14,0xcf,0x8f,0xf7,0x95,0x90,0x7e, -0x95,0x57,0x22,0xcf,0xa1,0xf9,0x77,0xe0,0xff,0x00,0x89,0x7e,0x2c,0xf8,0x7d,0x0e, -0xa7,0x17,0x86,0x3c,0x45,0xa9,0x78,0x7d,0x75,0x38,0x84,0x17,0x9f,0xd9,0xb7,0x2f, -0x03,0x4f,0x18,0x24,0x84,0x62,0xa4,0x12,0x32,0x4f,0x15,0xdb,0xfe,0xcf,0x3f,0xb3, -0x4f,0x8e,0xff,0x00,0x6a,0x2f,0x1c,0x47,0xa3,0x78,0x5a,0xc6,0x49,0x63,0xf3,0x03, -0x6a,0x1a,0xcd,0xc8,0x3f,0x66,0xb3,0x42,0x79,0x79,0x1f,0xb9,0xeb,0x85,0x19,0x66, -0x3d,0x2b,0xf5,0x27,0xe1,0xef,0xfc,0x11,0xd7,0xe0,0xf7,0x86,0x2f,0xe1,0xbb,0xf1, -0x1e,0xad,0xe2,0x0f,0x18,0x98,0xf9,0x36,0x97,0x17,0x0b,0x6b,0x6e,0xc7,0xdc,0x44, -0xa1,0xff,0x00,0x0d,0xf5,0xf6,0xa7,0x82,0x3c,0x03,0xe1,0xcf,0x86,0xbe,0x1e,0xb6, -0xd0,0x7c,0x2b,0xa2,0x58,0xf8,0x7f,0x47,0xb7,0x1f,0xbb,0xb3,0xd3,0xe0,0x58,0xa3, -0x07,0xb9,0x20,0x0e,0x58,0xf7,0x63,0xc9,0xee,0x69,0x5c,0x12,0xee,0x71,0xdf,0xb3, -0x97,0xec,0xfd,0xe1,0xbf,0xd9,0xab,0xe1,0x7e,0x9d,0xe0,0xcf,0x0d,0xc6,0x5a,0x38, -0x7f,0x7b,0x77,0x7d,0x22,0x81,0x35,0xed,0xc3,0x01,0xbe,0x67,0x3e,0xa7,0x00,0x01, -0xd8,0x00,0x07,0x02,0xb6,0x7e,0x30,0xf8,0x8c,0x78,0x6f,0xc0,0x7a,0x8c,0x8a,0xc1, -0x6e,0x2e,0x57,0xec,0xb0,0xf3,0x83,0xb9,0xf8,0x24,0x7b,0x85,0xdc,0x7f,0x0a,0xed, -0xeb,0xe7,0x8f,0xda,0x43,0xc4,0x5f,0x6b,0xd6,0x6c,0x34,0x68,0xdf,0x29,0x6b,0x19, -0x9e,0x50,0x3a,0x6f,0x6e,0x07,0xe4,0x07,0xfe,0x3d,0x5e,0x2e,0x6f,0x89,0xfa,0xae, -0x0e,0x73,0x5b,0xbd,0x17,0xab,0xd0,0xe7,0xc5,0x54,0xf6,0x74,0x9b,0x3c,0x6e,0x8a, -0x28,0xaf,0xc6,0x0f,0x95,0x0a,0xf6,0xff,0x00,0xd9,0xcf,0xc2,0x90,0x5e,0xc5,0xaa, -0xea,0xf7,0x76,0xf1,0x4e,0x99,0x16,0xd1,0x09,0x50,0x30,0xc8,0xf9,0x98,0xe0,0xfd, -0x57,0xf5,0xaf,0x10,0xaf,0xb0,0xbe,0x1a,0x78,0x74,0xf8,0x63,0xc1,0x1a,0x4d,0x8b, -0xa9,0x59,0xc4,0x5e,0x64,0xc0,0x8c,0x10,0xee,0x77,0x30,0xfc,0x09,0xc7,0xe1,0x5f, -0x57,0xc3,0xb8,0x5f,0x6f,0x8b,0xf6,0x92,0x5a,0x45,0x7e,0x2f,0x44,0x7a,0x58,0x0a, -0x7c,0xf5,0x79,0x9f,0x43,0x4e,0x4f,0x09,0xe8,0x93,0x0f,0xde,0x69,0x16,0x2f,0xf5, -0xb6,0x43,0xfd,0x2b,0x36,0xf3,0xe1,0x87,0x85,0x2f,0x91,0x96,0x4d,0x02,0xc5,0x41, -0xea,0x62,0x84,0x46,0x7f,0x35,0xc1,0xae,0x9c,0x0c,0x51,0x5f,0xa6,0xcb,0x0f,0x46, -0x5f,0x14,0x13,0xf9,0x23,0xe8,0x1d,0x38,0x3d,0xd2,0x3c,0x33,0xe2,0x17,0xc0,0x1b, -0x3b,0x6d,0x3a,0xe3,0x50,0xf0,0xf3,0xcb,0x1c,0x90,0xa1,0x76,0xb3,0x95,0xb7,0x87, -0x03,0x93,0xb5,0x8f,0x39,0xfa,0x93,0x9f,0x6a,0xf0,0x8a,0xfb,0x2b,0xc7,0x7e,0x21, -0x83,0xc3,0x3e,0x14,0xd4,0x6f,0xe6,0x20,0x6c,0x89,0x95,0x14,0xff,0x00,0x1b,0x91, -0x85,0x1f,0x99,0xaf,0x8d,0x40,0xc0,0x02,0xbf,0x34,0xe2,0x2c,0x2e,0x1b,0x0d,0x5a, -0x1e,0xc1,0x59,0xb5,0xaa,0x5f,0x81,0xe0,0x63,0xa9,0xc2,0x9c,0xd7,0x26,0x81,0x45, -0x14,0x57,0xc9,0x1e,0x61,0x6f,0x49,0xb5,0x7b,0xed,0x56,0xce,0xde,0x21,0x99,0x25, -0x99,0x23,0x5c,0x7a,0x96,0x00,0x7f,0x3a,0xfb,0x79,0x38,0x50,0x2b,0xe5,0xdf,0x81, -0x3e,0x13,0x6f,0x10,0x78,0xce,0x2b,0xc9,0x13,0x75,0xa6,0x9a,0x3c,0xf7,0x24,0x70, -0x64,0xe8,0x83,0xeb,0x9f,0x9b,0xfe,0x03,0x5f,0x51,0x81,0x5f,0xa5,0xf0,0xc5,0x09, -0x53,0xc3,0xce,0xab,0xfb,0x4f,0x4f,0x91,0xef,0xe5,0xd0,0x71,0x83,0x93,0xea,0x61, -0x78,0xdb,0xc3,0x4f,0xe2,0xff,0x00,0x0e,0x5d,0xe9,0x2b,0x78,0xf6,0x22,0xe3,0x68, -0x69,0x91,0x37,0x10,0x03,0x02,0x46,0x32,0x3a,0xe3,0x15,0xe4,0xf2,0x7e,0xcc,0x63, -0xf8,0x3c,0x40,0x7f,0xe0,0x56,0x9f,0xfd,0x9d,0x7b,0xb5,0x26,0x2b,0xe8,0x71,0x59, -0x6e,0x17,0x19,0x25,0x3a,0xf0,0xbb,0xf5,0x67,0x75,0x4c,0x3d,0x3a,0xae,0xf3,0x57, -0x3c,0x09,0xff,0x00,0x66,0x4b,0xaf,0xe0,0xd7,0xa1,0x3f,0xef,0x5b,0x11,0xff,0x00, -0xb3,0x55,0x77,0xfd,0x99,0xf5,0x31,0xf7,0x35,0xab,0x46,0xfa,0xc4,0xc2,0xbe,0x85, -0xc5,0x52,0xd6,0x35,0x38,0xb4,0x7d,0x2a,0xf2,0xfa,0x63,0x88,0xad,0xa2,0x79,0x58, -0xfb,0x28,0x26,0xbc,0xe9,0xe4,0x39,0x72,0x4d,0xb8,0x5b,0xe6,0xff,0x00,0xcc,0xc1, -0xe0,0xa8,0x2d,0x6c,0x7c,0x65,0xe2,0x0d,0x20,0xe8,0x1a,0xdd,0xee,0x9a,0xd7,0x11, -0xdc,0xbd,0xac,0x86,0x26,0x92,0x20,0x42,0x96,0x1d,0x40,0xcf,0xa1,0xc8,0xfc,0x2b, -0x3e,0xa6,0xbc,0xba,0x96,0xfe,0xee,0x6b,0x99,0xdb,0x7c,0xf3,0x3b,0x49,0x23,0x7a, -0xb1,0x39,0x27,0xf3,0x35,0x0d,0x7e,0x51,0x53,0x95,0xcd,0xb8,0x2d,0x2f,0xa1,0xf3, -0x4e,0xd7,0x76,0x0a,0x28,0xad,0x2f,0x0d,0xe9,0x2d,0xaf,0x78,0x83,0x4d,0xd3,0xd4, -0x13,0xf6,0x9b,0x84,0x8c,0xe3,0xb2,0x93,0xc9,0xfc,0xb3,0x4a,0x10,0x75,0x24,0xa0, -0xb7,0x6e,0xc1,0x15,0x76,0x91,0xd2,0xda,0xfc,0x17,0xf1,0x7d,0xe5,0xa4,0x37,0x30, -0xe9,0x41,0xe2,0x99,0x04,0x88,0x7c,0xf8,0xc1,0xc1,0x19,0x19,0x05,0xb8,0xa4,0x93, -0xe0,0xb7,0x8c,0xe3,0xeb,0xa2,0x39,0xff,0x00,0x76,0x68,0x8f,0xfe,0xcd,0x5f,0x59, -0x43,0x1a,0xc5,0x12,0x22,0x8d,0xaa,0xa0,0x00,0x07,0x61,0x4e,0xc7,0xbd,0x7e,0x99, -0xfe,0xac,0x61,0x1a,0x5e,0xf4,0xaf,0xea,0xbf,0xc8,0xf7,0xff,0x00,0xb3,0xa9,0xf7, -0x67,0xc8,0x12,0x7c,0x2a,0xf1,0x6c,0x47,0xe6,0xd0,0x6e,0xcf,0xfb,0xaa,0x0f,0xf2, -0x35,0xa1,0xe1,0x2f,0x86,0x1e,0x20,0x9b,0xc5,0x3a,0x52,0x5e,0xe8,0xb7,0x50,0x5a, -0x7d,0xa5,0x1a,0x67,0x9a,0x22,0x10,0x20,0x39,0x6c,0x9f,0x70,0x31,0x5f,0x57,0x8a, -0x31,0x44,0x38,0x67,0x0d,0x09,0xa9,0x29,0xbd,0x3d,0x06,0xb2,0xfa,0x69,0xde,0xec, -0x07,0x02,0xb1,0x7c,0x59,0xe2,0xed,0x3f,0xc1,0xba,0x3c,0x9a,0x86,0xa1,0x2e,0xc8, -0xc7,0xca,0x91,0xaf,0xdf,0x95,0xbb,0x2a,0x8e,0xe7,0xf9,0x75,0x35,0x7f,0x56,0xd5, -0x6d,0xb4,0x4d,0x36,0xe6,0xfa,0xf2,0x51,0x0d,0xb4,0x08,0x64,0x91,0xcf,0x60,0x3f, -0xcf,0x4a,0xf9,0x1b,0xe2,0x07,0x8e,0x6e,0xfc,0x77,0xae,0xbd,0xe4,0xe5,0xa3,0xb6, -0x8c,0x95,0xb6,0xb7,0xcf,0x11,0x27,0xf8,0x9e,0xe7,0xfa,0x62,0xbd,0x1c,0xdb,0x34, -0x8e,0x5d,0x4a,0xd1,0xd6,0x6f,0x65,0xfa,0xb3,0x7c,0x4e,0x21,0x50,0x8e,0x9b,0xb2, -0x6f,0x1e,0x7c,0x48,0xd5,0x3c,0x79,0x78,0x5a,0xe5,0xcd,0xbd,0x8a,0x1c,0xc5,0x67, -0x1b,0x1d,0x8b,0xe8,0x4f,0xf7,0x9b,0xdc,0xfe,0x18,0xae,0x4e,0x8a,0x2b,0xf2,0x5a, -0xd5,0xaa,0x62,0x26,0xea,0x55,0x77,0x6c,0xf9,0x99,0x4e,0x53,0x7c,0xd2,0x7a,0x85, -0x14,0x57,0x5d,0xe0,0x0f,0x86,0x9a,0xa7,0x8f,0xae,0x8f,0xd9,0x80,0xb7,0xb1,0x8d, -0xb1,0x2d,0xe4,0x83,0xe5,0x1f,0xec,0x81,0xfc,0x4d,0xed,0xf9,0xd3,0xa3,0x46,0xa6, -0x22,0x6a,0x9d,0x25,0x76,0xc7,0x08,0x4a,0xa4,0xb9,0x62,0xae,0xce,0x46,0xa7,0xb7, -0xb1,0xb9,0xbc,0xff,0x00,0x51,0x6f,0x2c,0xf8,0xeb,0xe5,0xa1,0x6f,0xe5,0x5f,0x55, -0xf8,0x5f,0xe0,0xe7,0x86,0x7c,0x35,0x12,0x11,0x60,0x97,0xf7,0x23,0x19,0x9e,0xf0, -0x09,0x0e,0x7d,0x40,0x3f,0x28,0xfc,0x05,0x76,0xc9,0x0a,0x46,0x00,0x55,0x0a,0x07, -0x18,0x03,0x02,0xbe,0xce,0x87,0x0b,0x54,0x94,0x6f,0x5a,0xa2,0x4f,0xb2,0x57,0xfc, -0x74,0x3d,0x58,0x65,0xd2,0x7f,0x1c,0xac,0x7c,0x3f,0x71,0xa7,0x5d,0xda,0x0c,0xcf, -0x6b,0x34,0x23,0xd6,0x48,0xca,0xff,0x00,0x31,0x55,0xeb,0xee,0x96,0x8d,0x5d,0x48, -0x60,0x08,0x3d,0x8d,0x71,0xde,0x29,0xf8,0x4d,0xe1,0xcf,0x15,0x42,0xfe,0x6d,0x8a, -0x59,0xdd,0x31,0x2c,0x2e,0xad,0x00,0x8d,0xf7,0x7a,0x9c,0x70,0xdf,0x88,0x34,0xeb, -0xf0,0xb5,0x48,0xc6,0xf4,0x6a,0x5d,0xf6,0x6a,0xc1,0x3c,0xb9,0xa5,0xee,0x4a,0xe7, -0xc8,0xf4,0x57,0x4b,0xe3,0xbf,0x02,0x5f,0xf8,0x0f,0x56,0xfb,0x25,0xd8,0xf3,0x61, -0x93,0x2d,0x05,0xca,0x8c,0x2c,0x8b,0xfd,0x08,0xee,0x3d,0xeb,0x9a,0xaf,0x89,0xab, -0x4a,0x74,0x26,0xe9,0xd4,0x56,0x68,0xf2,0x65,0x17,0x07,0xcb,0x2d,0xc2,0xac,0x69, -0xfa,0x85,0xce,0x95,0x7b,0x0d,0xdd,0x9c,0xef,0x6d,0x73,0x0b,0x6e,0x8e,0x58,0xdb, -0x05,0x4d,0x57,0xa2,0xb3,0x4d,0xc5,0xa7,0x1d,0x1a,0x25,0x3b,0x6a,0x8f,0xaa,0xfe, -0x13,0xfc,0x4d,0x8f,0xc7,0x9a,0x61,0x86,0xe3,0x6c,0x5a,0xb5,0xb2,0x8f,0x3a,0x31, -0xc0,0x91,0x7f,0xbe,0xbe,0xde,0xa3,0xb1,0xfa,0x8a,0xef,0xc5,0x7c,0x59,0xe1,0x3f, -0x12,0xdc,0x78,0x47,0xc4,0x16,0x7a,0xad,0xb1,0x25,0xe0,0x6f,0x99,0x33,0xfe,0xb1, -0x0f,0xde,0x53,0xf5,0x19,0xaf,0xb2,0xf4,0xeb,0xd8,0x75,0x2b,0x0b,0x7b,0xbb,0x77, -0x12,0x41,0x3c,0x6b,0x24,0x6c,0x3a,0x15,0x23,0x20,0xd7,0xeb,0x39,0x16,0x64,0xf1, -0xd4,0x5c,0x2a,0x3f,0x7e,0x3b,0xf9,0xae,0x8c,0xfa,0x5c,0x1d,0x77,0x5a,0x16,0x96, -0xe8,0xb3,0x48,0x4e,0xd1,0x93,0x41,0xaf,0x29,0xf8,0xf9,0xe3,0x99,0x3c,0x3f,0xa2, -0x45,0xa4,0xd9,0xc8,0x52,0xf3,0x50,0x07,0x7b,0x29,0xe5,0x22,0x1d,0x7f,0x3e,0x9f, -0x4c,0xd7,0xb5,0x8b,0xc4,0xc3,0x07,0x46,0x55,0xa7,0xb2,0x3a,0xea,0xd4,0x54,0xa0, -0xe6,0xfa,0x1c,0xff,0x00,0xc5,0x1f,0x8e,0xb2,0x2c,0xb3,0x69,0x5e,0x1b,0x94,0x2e, -0xdc,0xa4,0xba,0x82,0xf3,0xcf,0x71,0x1f,0xff,0x00,0x15,0xf9,0x7a,0xd7,0x87,0x4f, -0x3c,0xb7,0x33,0x3c,0xb3,0x48,0xf2,0xca,0xec,0x59,0x9d,0xd8,0xb3,0x31,0x3d,0x49, -0x26,0x99,0x45,0x7e,0x39,0x8d,0xc7,0xd7,0xc7,0xd4,0xe7,0xaa,0xfd,0x17,0x44,0x7c, -0xb5,0x5a,0xd3,0xac,0xef,0x20,0xa2,0x8a,0x2b,0xce,0x30,0x0a,0x2b,0xba,0xf0,0xbf, -0xc1,0x8f,0x13,0x78,0xa2,0x14,0xb8,0x4b,0x64,0xb0,0xb5,0x7e,0x56,0x5b,0xc6,0x29, -0xb8,0x7a,0x85,0x00,0x9f,0xd2,0xbb,0x28,0x3f,0x66,0x5b,0xb6,0x51,0xe7,0xeb,0xd1, -0x21,0xee,0x23,0xb6,0x2d,0xfa,0x96,0x15,0xeb,0xd1,0xca,0x31,0xd5,0xd7,0x34,0x29, -0xbb,0x79,0xe9,0xf9,0x9d,0x31,0xc3,0x56,0x9a,0xba,0x89,0xe2,0x74,0x57,0xb9,0x37, -0xec,0xc6,0xf8,0xf9,0x7c,0x42,0x3f,0x1b,0x4f,0xfe,0xce,0xaa,0x5c,0x7e,0xcc,0xfa, -0x8a,0xa9,0xf2,0x35,0xab,0x59,0x0f,0x61,0x24,0x2c,0x9f,0xc8,0x9a,0xdd,0xe4,0x59, -0x82,0xff,0x00,0x97,0x7f,0x8a,0xff,0x00,0x32,0xfe,0xa7,0x5d,0x7d,0x93,0xc6,0x28, -0xaf,0x47,0xd4,0xbe,0x01,0x78,0xb2,0xc4,0x33,0x43,0x05,0xb5,0xf2,0x8f,0xf9,0xe1, -0x38,0xcf,0xe4,0xc0,0x57,0x15,0xac,0x78,0x6b,0x56,0xf0,0xfb,0xed,0xd4,0xb4,0xdb, -0x9b,0x2e,0x70,0x1a,0x68,0xc8,0x53,0xf4,0x3d,0x0d,0x79,0xd5,0xb0,0x58,0x9c,0x3e, -0xb5,0x69,0xb5,0xf2,0x30,0x95,0x2a,0x90,0xf8,0xa3,0x63,0xac,0xf8,0x1d,0xa4,0x0d, -0x57,0xe2,0x25,0x83,0x32,0x6e,0x8e,0xd5,0x5e,0xe1,0xbd,0xb0,0x30,0xa7,0xfe,0xfa, -0x65,0xaf,0xab,0x07,0x4a,0xf0,0x8f,0xd9,0x9f,0x48,0x05,0xb5,0x9d,0x51,0x97,0xfb, -0x96,0xc8,0x7f,0xf1,0xe6,0xff,0x00,0xd9,0x6b,0xde,0x2b,0xf4,0xce,0x1d,0xa3,0xec, -0xb0,0x2a,0x5f,0xcc,0xdb,0xfd,0x3f,0x43,0xe8,0x30,0x30,0xe5,0xa3,0x7e,0xe1,0x45, -0x14,0x57,0xd3,0x9e,0x80,0x55,0x2d,0x66,0x4f,0x2b,0x4a,0xbb,0x6f,0x48,0xcd,0x5d, -0xac,0x7f,0x16,0xcb,0xe4,0x78,0x7a,0xf9,0xff,0x00,0xe9,0x99,0xac,0xea,0x3b,0x41, -0xb2,0x64,0xed,0x16,0xcf,0x83,0x7e,0x27,0xcf,0xe7,0x78,0xa6,0xf4,0x83,0x9c,0x12, -0x3f,0x5a,0xf9,0xc3,0xe2,0xbc,0x5f,0xda,0x1a,0xa6,0x95,0x65,0xb7,0x79,0xb8,0xbd, -0x82,0x1d,0x9d,0x77,0x6e,0x91,0x57,0x1f,0xad,0x7d,0x01,0xe3,0xa9,0xbc,0xdd,0x7a, -0xf5,0xb3,0x9f,0x9c,0x8a,0xf1,0x3b,0xa8,0x3f,0xb4,0xfe,0x36,0xfc,0x3b,0xb2,0xed, -0x37,0x88,0xf4,0xe4,0xfa,0x8f,0xb4,0xc7,0xfe,0x15,0xf9,0xde,0x54,0xb9,0xb1,0x2d, -0xf9,0xfe,0xa7,0xe3,0x33,0x5e,0xd7,0x36,0xa4,0xbf,0xbc,0x7e,0xb6,0xff,0x00,0x61, -0x5a,0xff,0x00,0xcf,0xba,0xfe,0x54,0x56,0xad,0x15,0xfa,0x2f,0x2a,0x3f,0x66,0xb2, -0x1f,0x45,0x14,0x55,0x94,0x14,0xd2,0x69,0xd5,0xc8,0xfc,0x55,0xf1,0x6f,0xfc,0x21, -0x1e,0x01,0xd6,0xb5,0x75,0x60,0xb3,0xc3,0x09,0x48,0x33,0x8f,0xf5,0xad,0xf2,0xa7, -0x07,0xaf,0x24,0x1c,0x7b,0x56,0x75,0x26,0xa9,0xc1,0xce,0x5b,0x23,0x3a,0x93,0x54, -0xa0,0xe7,0x2d,0x96,0xa7,0xc8,0x5f,0x1f,0xbc,0x5f,0xff,0x00,0x09,0x8f,0xc4,0xfd, -0x4e,0x48,0xa4,0x2f,0x69,0x64,0x45,0x94,0x18,0x24,0x8c,0x26,0x77,0x11,0xf5,0x62, -0xdf,0xa5,0x7b,0xc7,0xec,0xaf,0xe1,0x1f,0xec,0x7f,0x08,0x4d,0xab,0x4a,0x98,0x9a, -0xf9,0xfe,0x52,0x47,0x3b,0x05,0x7c,0xa9,0xa0,0x69,0x73,0xf8,0x83,0x5d,0xb5,0xb3, -0x8c,0x19,0x66,0xb9,0x98,0x2f,0xa9,0x24,0x9e,0x4d,0x7e,0x85,0x78,0x67,0x45,0x8b, -0xc3,0xfa,0x0d,0x8e,0x9f,0x12,0x85,0x4b,0x78,0x95,0x30,0x3d,0x40,0xe6,0xbe,0x27, -0x28,0x83,0xc5,0xe3,0x27,0x8a,0x9f,0x4f,0xcd,0xff,0x00,0xc0,0x3e,0x27,0x23,0x84, -0xb1,0x58,0x9a,0x98,0xc9,0xff,0x00,0x57,0x34,0xc5,0x2d,0x14,0x57,0xdd,0x1f,0x74, -0x14,0x51,0x45,0x00,0x32,0x49,0x16,0x18,0xd9,0xdd,0x82,0x22,0x82,0x59,0x98,0xe0, -0x01,0xea,0x6b,0xe0,0x7f,0xda,0x6b,0xfe,0x0a,0xd3,0xe0,0xaf,0x85,0x9a,0x95,0xe7, -0x87,0xbe,0x1e,0x69,0xc9,0xe3,0xcd,0x72,0xdd,0x8c,0x73,0x5f,0xb4,0xa6,0x3d,0x36, -0x17,0x07,0x95,0x0e,0x3e,0x69,0x88,0xff,0x00,0x67,0x0b,0xfe,0xd7,0x5a,0xe2,0xbf, -0xe0,0xad,0x3f,0xb5,0xed,0xe7,0x84,0xed,0x62,0xf8,0x37,0xe1,0x3b,0xf6,0xb6,0xbe, -0xd4,0x2d,0xc5,0xc7,0x88,0x6e,0xa0,0x7c,0x3c,0x76,0xef,0xfe,0xae,0xd8,0x10,0x78, -0x2e,0x3e,0x66,0xff,0x00,0x64,0xa8,0xe8,0xc6,0xbe,0x5a,0xfd,0x8a,0x7f,0xe0,0x9d, -0x9a,0xff,0x00,0xed,0x53,0xa7,0xc9,0xe2,0x9d,0x5f,0x55,0x3e,0x15,0xf0,0x3c,0x53, -0x18,0x12,0xed,0x21,0xf3,0x2e,0x6f,0x5d,0x71,0xb9,0x61,0x52,0x40,0x0a,0xbd,0x0b, -0xb6,0x46,0x78,0x00,0xe0,0xe1,0x92,0xfc,0x8c,0xef,0x1a,0xff,0x00,0xc1,0x51,0x7f, -0x68,0x5f,0x17,0xcd,0x37,0x91,0xe2,0xeb,0x7f,0x0e,0xdb,0x3b,0x16,0x5b,0x7d,0x1b, -0x4f,0x86,0x30,0x83,0xb0,0x0e,0xea,0xcf,0xf9,0xb5,0x7d,0x1d,0xff,0x00,0x04,0xc4, -0xf8,0xc5,0xf1,0xb7,0xf6,0x81,0xf8,0xe3,0x7d,0x71,0xe2,0x9f,0x88,0x1a,0xe6,0xad, -0xe0,0xff,0x00,0x0f,0xd8,0xbd,0xd5,0xe5,0xb5,0xc3,0x29,0x86,0x79,0xe4,0xcc,0x70, -0xc4,0xc7,0x6e,0x47,0x57,0x93,0x03,0xfe,0x79,0x57,0xc9,0xbf,0xb7,0x6f,0xc0,0x4f, -0x01,0xfe,0xcd,0x7f,0x18,0x6d,0xbc,0x0b,0xe0,0x8d,0x57,0x58,0xd5,0xde,0xd7,0x4f, -0x8e,0xe3,0x53,0x9f,0x57,0x9e,0x29,0x19,0x27,0x90,0x96,0x58,0xc0,0x8e,0x34,0x0b, -0x88,0xf6,0x31,0xce,0x7f,0xd6,0x0e,0x98,0xaf,0xd3,0xef,0xf8,0x25,0x5f,0xc1,0x81, -0xf0,0xbf,0xf6,0x5f,0xb1,0xd7,0x2e,0xad,0xfc,0xad,0x5f,0xc5,0xf3,0x9d,0x56,0x56, -0x3f,0x7b,0xec,0xff,0x00,0x72,0xdd,0x7d,0x86,0xd0,0x5b,0xfe,0xda,0x50,0x08,0x8f, -0xe3,0x97,0xfc,0x15,0x17,0xc0,0x9f,0x00,0x7e,0x2c,0xeb,0xfe,0x01,0xd7,0xfc,0x21, -0xe2,0x5b,0xbd,0x43,0x48,0x92,0x34,0x92,0xea,0xc4,0x5b,0xb4,0x32,0x07,0x89,0x24, -0x56,0x5d,0xd2,0x29,0xe8,0xe3,0xb7,0x50,0x6b,0xe8,0x3f,0xd9,0xdb,0xe3,0xe6,0x87, -0xfb,0x4a,0xfc,0x30,0xb3,0xf1,0xc7,0x87,0x6c,0xef,0xac,0x34,0xcb,0x99,0xe5,0xb7, -0x58,0x35,0x15,0x45,0x98,0x34,0x6d,0xb5,0xb2,0x15,0x98,0x63,0x3d,0x39,0xaf,0xc2, -0xdf,0xdb,0xb3,0xc7,0x76,0x9f,0x11,0xbf,0x6b,0x6f,0x89,0x5a,0xcd,0x84,0xbe,0x75, -0x90,0xd4,0xbe,0xc5,0x13,0x8e,0x84,0x5b,0xc6,0x90,0x12,0x3d,0x8b,0x46,0xc7,0xf1, -0xaf,0xd8,0xaf,0xf8,0x27,0x2f,0x81,0x67,0xf0,0x0f,0xec,0x75,0xf0,0xfa,0xd2,0xe5, -0x59,0x2e,0x2f,0xed,0xa4,0xd5,0x59,0x58,0x60,0x81,0x71,0x2b,0x4a,0x9f,0xf8,0xe3, -0x2d,0x03,0x4f,0x53,0xe9,0x19,0xa7,0x5b,0x78,0x9e,0x49,0x18,0x24,0x68,0xa5,0x99, -0x98,0xe0,0x00,0x3b,0xd7,0xc5,0xfe,0x2d,0xd7,0x5f,0xc4,0xde,0x25,0xd4,0x75,0x37, -0x27,0xfd,0x22,0x66,0x65,0x07,0xb2,0x74,0x51,0xf8,0x00,0x05,0x7d,0x29,0xf1,0xbf, -0xc4,0x5f,0xd8,0x1e,0x01,0xbc,0x54,0x70,0xb7,0x17,0xc4,0x5a,0x46,0x3d,0x43,0x7d, -0xff,0x00,0xfc,0x74,0x37,0xe9,0x5f,0x2a,0x57,0xe7,0x1c,0x51,0x8a,0xe6,0x9c,0x30, -0xeb,0xa6,0xaf,0xe7,0xb1,0xe1,0xe6,0x15,0x2f,0x25,0x4f,0xe6,0x14,0x51,0x45,0x7c, -0x29,0xe3,0x9a,0x5e,0x1a,0x92,0xc6,0x2d,0x7f,0x4f,0x93,0x52,0x25,0x6c,0x23,0x99, -0x5e,0x6d,0xab,0xb8,0x95,0x07,0x24,0x60,0x7a,0xe3,0x1f,0x8d,0x7d,0x2b,0x1f,0xc7, -0x9f,0x06,0xb0,0x03,0xed,0xf2,0xaf,0xd6,0xda,0x4f,0xf0,0xaf,0x96,0x28,0xaf,0x6b, -0x01,0x9b,0x56,0xcb,0xa3,0x28,0xd2,0x49,0xdf,0xbf,0xfc,0x39,0xd7,0x47,0x13,0x3a, -0x09,0xa8,0xad,0xcf,0xaa,0xcf,0xc7,0x5f,0x06,0x81,0x9f,0xed,0x37,0xff,0x00,0xc0, -0x69,0x3f,0xf8,0x9a,0xc7,0xd6,0x3f,0x68,0xcf,0x0e,0xda,0x44,0xc2,0xc6,0xde,0xef, -0x50,0x97,0xb0,0xd9,0xe5,0xaf,0xe2,0x4f,0x3f,0xa5,0x7c,0xd9,0x45,0x7a,0x53,0xe2, -0x6c,0x6c,0x95,0x92,0x8a,0xf9,0x7f,0xc1,0x37,0x79,0x85,0x67,0xb5,0x8e,0xa7,0xc7, -0x5f,0x11,0x35,0x5f,0x1e,0xdd,0xab,0xde,0x32,0xc3,0x69,0x19,0x26,0x1b,0x48,0xbe, -0xe2,0x7b,0x9f,0x53,0xee,0x7f,0x0c,0x57,0x2d,0x45,0x6b,0xe9,0x1e,0x12,0xd6,0xb5, -0xed,0xa7,0x4f,0xd2,0xee,0xae,0x91,0xba,0x3c,0x71,0x1d,0x9f,0xf7,0xd7,0x4f,0xd6, -0xbe,0x72,0x73,0xad,0x8b,0xa8,0xe5,0x2b,0xca,0x4f,0xe6,0x70,0xc9,0xce,0xac,0xae, -0xf5,0x66,0x45,0x69,0x78,0x7b,0xc3,0xb7,0xfe,0x29,0xd5,0x21,0xd3,0xf4,0xe8,0x0c, -0xd7,0x12,0x1f,0xf8,0x0a,0x0e,0xec,0xc7,0xb0,0x15,0xe9,0x5e,0x18,0xfd,0x9d,0x75, -0x7d,0x45,0xd2,0x4d,0x66,0xe2,0x3d,0x36,0x0e,0x09,0x8a,0x32,0x24,0x94,0x8f,0x4e, -0x38,0x1f,0x99,0xfa,0x57,0xb9,0x78,0x4f,0xc1,0x7a,0x57,0x82,0xec,0x3e,0xcb,0xa6, -0x5b,0x08,0xb3,0x83,0x24,0xad,0xcc,0x92,0x1f,0x56,0x6e,0xff,0x00,0x4e,0x83,0xb0, -0x15,0xf4,0x79,0x7f,0x0f,0xe2,0x31,0x12,0x52,0xc4,0x2e,0x48,0xfe,0x2f,0xfa,0xf3, -0x3b,0xa8,0x60,0xa7,0x37,0x79,0xe8,0x8a,0xfe,0x01,0xf0,0x5d,0xaf,0x81,0xbc,0x3f, -0x0e,0x9f,0x6e,0x7c,0xc9,0x4f,0xcf,0x3c,0xf8,0xc1,0x95,0xcf,0x53,0xf4,0xec,0x3d, -0x85,0x74,0xb4,0x94,0xb5,0xfa,0x7d,0x2a,0x51,0xa3,0x05,0x4e,0x0a,0xc9,0x1f,0x43, -0x18,0xa8,0xa5,0x15,0xb0,0x51,0x45,0x15,0xa9,0x41,0x5e,0x6f,0xf1,0xeb,0x5c,0xfe, -0xc9,0xf0,0x05,0xc4,0x0a,0xdb,0x65,0xbe,0x91,0x6d,0xd7,0x1e,0x99,0xdc,0xdf,0xa0, -0x23,0xf1,0xaf,0x47,0x3d,0x2b,0xe7,0x8f,0xda,0x4f,0x5b,0xfb,0x4e,0xbd,0xa6,0x69, -0x68,0xdf,0x25,0xac,0x26,0x67,0x03,0xfb,0xce,0x70,0x3f,0x20,0xbf,0xad,0x78,0x79, -0xd5,0x7f,0xab,0xe0,0x6a,0x49,0x6e,0xf4,0xfb,0xce,0x4c,0x5c,0xf9,0x28,0xc9,0x9e, -0x39,0x45,0x14,0x57,0xe3,0x67,0xca,0x85,0x7a,0x67,0xec,0xfb,0xa2,0xff,0x00,0x69, -0x78,0xec,0x5d,0xba,0x93,0x1d,0x84,0x0d,0x2e,0x7b,0x07,0x6f,0x95,0x41,0xfc,0x0b, -0x1f,0xc2,0xbc,0xce,0xbe,0x89,0xfd,0x9b,0x74,0x41,0x6b,0xe1,0xdd,0x47,0x54,0x65, -0x22,0x4b,0xc9,0xc4,0x4a,0x4f,0x42,0x91,0x8e,0x08,0xfc,0x59,0x87,0xe1,0x5e,0xf6, -0x47,0x43,0xdb,0xe3,0xe0,0x9e,0xcb,0x5f,0xbb,0xfe,0x09,0xd9,0x84,0x87,0x3d,0x68, -0xf9,0x6a,0x7b,0x08,0xe9,0x4b,0x45,0x15,0xfb,0x11,0xf5,0x21,0x48,0x4e,0x29,0x6a, -0x9e,0xad,0xa8,0xc5,0xa4,0xe9,0xb7,0x57,0xb3,0x9c,0x43,0x6f,0x13,0x4a,0xe7,0xd9, -0x41,0x27,0xf9,0x54,0xc9,0xa8,0xa6,0xde,0xc2,0x6e,0xda,0xb3,0xc3,0x3f,0x68,0x9f, -0x1b,0xb5,0xc5,0xdc,0x3e,0x1b,0xb5,0x90,0x88,0xa2,0x02,0x6b,0xbd,0xa7,0xef,0x31, -0xe5,0x50,0xfd,0x07,0xcd,0x8f,0x71,0xe9,0x5e,0x27,0x57,0x35,0x9d,0x52,0x7d,0x6f, -0x55,0xbb,0xd4,0x2e,0x4e,0x67,0xb9,0x95,0xa5,0x7f,0xa9,0x39,0xc7,0xd0,0x74,0xfc, -0x2a,0x9d,0x7e,0x25,0x98,0x62,0xe5,0x8d,0xc4,0xca,0xb3,0xdb,0xa7,0xa7,0x43,0xe4, -0xab,0xd5,0x75,0xaa,0x39,0x30,0xa2,0x8a,0x2b,0xce,0x30,0x3a,0x5f,0x87,0xde,0x0a, -0x9f,0xc7,0x5e,0x22,0x86,0xc2,0x32,0x63,0xb7,0x5f,0xde,0x5c,0x4c,0x07,0xdc,0x8f, -0xbf,0xe2,0x7a,0x0f,0xfe,0xb5,0x7d,0x71,0xa3,0x69,0x16,0x9a,0x16,0x9b,0x05,0x8d, -0x8c,0x2b,0x6f,0x6b,0x02,0xed,0x48,0xd0,0x71,0xf5,0x3e,0xa4,0xf5,0x27,0xa9,0xae, -0x13,0xe0,0x4f,0x84,0xd7,0xc3,0xde,0x0d,0x8a,0xf2,0x44,0x02,0xf3,0x52,0xc5,0xc3, -0x92,0x39,0x11,0xff,0x00,0xcb,0x31,0xf9,0x73,0xf5,0x63,0x5e,0x93,0x5f,0xad,0x64, -0x59,0x7c,0x70,0x98,0x75,0x52,0x4b,0xdf,0x9e,0xaf,0xc9,0x74,0x47,0xd2,0xe0,0xe8, -0x2a,0x54,0xd4,0x9e,0xec,0x4a,0x5a,0x28,0xaf,0xa6,0x3d,0x00,0xa2,0x8a,0x28,0x03, -0x8c,0xf8,0xb1,0xe1,0x58,0xbc,0x55,0xe0,0xbb,0xe8,0x76,0x03,0x75,0x6e,0x86,0xe2, -0xdd,0xb1,0xc8,0x75,0x19,0xc0,0xfa,0x8c,0x8f,0xc6,0xbe,0x47,0xaf,0xb9,0xe4,0x50, -0xe8,0x54,0x8c,0x82,0x30,0x6b,0xe2,0x0d,0x46,0x11,0x6f,0xa8,0xdd,0x42,0x3a,0x47, -0x2b,0xa0,0xfc,0x09,0x15,0xf9,0xd7,0x14,0xd0,0x8c,0x67,0x4e,0xb2,0xdd,0xdd,0x3f, -0x91,0xe1,0x66,0x30,0x49,0xc6,0x5d,0xca,0xf4,0x51,0x45,0x7c,0x21,0xe3,0x85,0x7d, -0x49,0xf0,0x17,0x5a,0x6d,0x57,0xe1,0xf5,0xb4,0x4e,0xe5,0xe4,0xb2,0x95,0xed,0xc9, -0x3e,0x83,0xe6,0x51,0xf8,0x2b,0x01,0xf8,0x57,0xcb,0x75,0xf4,0x27,0xec,0xcf,0x29, -0x3a,0x0e,0xb3,0x1f,0x65,0xba,0x56,0xfc,0xd3,0x1f,0xd2,0xbe,0xa7,0x86,0xea,0x38, -0x63,0x94,0x57,0x54,0xff,0x00,0xcc,0xf4,0x70,0x12,0x6a,0xb5,0xbb,0x9e,0xcc,0x6b, -0xe5,0x2f,0x8e,0x1a,0x9b,0xea,0x3f,0x11,0xb5,0x14,0x66,0x2d,0x1d,0xa8,0x48,0x23, -0x1e,0x80,0x28,0x27,0xff,0x00,0x1e,0x66,0xaf,0xab,0x3b,0x57,0xc8,0xdf,0x17,0x6d, -0x5a,0xd3,0xe2,0x3e,0xb8,0xad,0xd5,0xa6,0x12,0x0f,0xa3,0x28,0x23,0xf9,0xd7,0xd3, -0x71,0x3c,0xa4,0xb0,0x91,0x4b,0x67,0x2f,0xd1,0x9d,0xf9,0x83,0xfd,0xd2,0xf5,0x38, -0xfa,0x28,0xa2,0xbf,0x30,0x3e,0x7c,0x2b,0xb7,0xf8,0x35,0xa3,0xd9,0xeb,0x5e,0x3f, -0xb0,0x8a,0xf7,0x6b,0x45,0x18,0x69,0x96,0x37,0xe4,0x48,0xca,0x32,0xa3,0xf3,0xe7, -0xf0,0xae,0x22,0xac,0xe9,0xba,0x8d,0xce,0x91,0x7f,0x05,0xed,0xa4,0xcd,0x05,0xcc, -0x0e,0x1e,0x39,0x13,0xaa,0x91,0x5d,0x38,0x6a,0x91,0xa3,0x5e,0x15,0x26,0xae,0x93, -0x4e,0xc5,0xd3,0x92,0x8c,0xd4,0x9e,0xc7,0xdb,0xea,0x38,0xc5,0x3b,0x15,0xe2,0xbe, -0x10,0xfd,0xa3,0x2c,0xe7,0x8d,0x21,0xf1,0x0d,0xb3,0xda,0xcc,0x38,0x37,0x56,0xeb, -0xba,0x33,0xee,0x57,0xa8,0xfc,0x33,0x5e,0xa7,0xa3,0x78,0xbb,0x46,0xf1,0x0a,0x06, -0xd3,0xb5,0x2b,0x6b,0xbf,0x55,0x8e,0x41,0xb8,0x7d,0x57,0xa8,0xaf,0xd9,0x70,0xb9, -0x86,0x17,0x16,0x93,0xa5,0x35,0xe9,0xd7,0xee,0x3e,0xae,0x9d,0x7a,0x75,0x7e,0x16, -0x6b,0xe2,0x82,0x29,0x37,0x52,0xe6,0xbd,0x23,0x70,0xc7,0xe3,0x4c,0x9e,0xde,0x3b, -0x98,0xda,0x39,0x51,0x64,0x8d,0x86,0x19,0x1d,0x72,0x08,0xf4,0x22,0xa4,0xa2,0x95, -0x93,0xdc,0x2c,0x50,0xd2,0x74,0x2b,0x0d,0x06,0x29,0x62,0xd3,0xed,0x21,0xb3,0x8a, -0x49,0x0c,0xad,0x1c,0x08,0x15,0x4b,0x10,0x01,0x38,0x1f,0x41,0x57,0xe8,0xa2,0x94, -0x62,0xa2,0xad,0x15,0x64,0x24,0x92,0xd1,0x05,0x14,0x51,0x54,0x30,0xae,0x67,0xe2, -0x24,0xfe,0x47,0x85,0x2f,0x5b,0xa1,0xdb,0x8a,0xe9,0xab,0x88,0xf8,0xbd,0x71,0xf6, -0x7f,0x07,0xdc,0x1c,0xe3,0x3f,0xe1,0x5c,0xb8,0xa9,0x72,0xd0,0x9b,0xf2,0x66,0x35, -0x9d,0xa9,0xc9,0x9f,0x08,0x78,0xa6,0x5d,0xfa,0x9d,0xe3,0x67,0xf8,0xcd,0x79,0xb7, -0xc3,0x9b,0x15,0xd7,0x3f,0x6a,0xdf,0x86,0x16,0x6f,0xc8,0x1a,0xd4,0x73,0xe3,0xde, -0x25,0x69,0x47,0xea,0x95,0xdf,0x6b,0xaf,0xba,0x7b,0x86,0xf5,0x63,0x5c,0x9f,0xec, -0xe3,0x0b,0xea,0x3f,0xb6,0xaf,0xc3,0xb4,0x0b,0xb9,0x21,0x96,0xf6,0x66,0xf6,0x0b, -0x67,0x3e,0x0f,0xe6,0x45,0x7c,0x36,0x48,0xaf,0x56,0xe7,0xe4,0x38,0x15,0xed,0x33, -0x9a,0x5e,0xad,0x9f,0xab,0x7b,0x68,0xa5,0xcd,0x15,0xfa,0x21,0xfb,0x08,0xb4,0x51, -0x45,0x22,0xc4,0xcd,0x7c,0xcb,0xfb,0x60,0xf8,0xbc,0xee,0xd1,0xfc,0x33,0x0b,0xe0, -0x1c,0xdf,0x5c,0x80,0x4f,0xba,0xc6,0x3e,0x9f,0x7c,0xfe,0x02,0xbe,0x97,0x95,0xc4, -0x68,0xce,0xc4,0x2a,0xa8,0x24,0x92,0x70,0x00,0xaf,0xcf,0xaf,0x89,0xbe,0x2c,0x93, -0xc6,0xfe,0x3c,0xd6,0x35,0x56,0x72,0xf1,0x4b,0x39,0x8e,0x01,0x9c,0x85,0x89,0x7e, -0x54,0xc7,0xe0,0x33,0xf8,0xd7,0xce,0x67,0x98,0x8f,0x63,0x86,0xf6,0x6b,0x79,0x69, -0xf2,0xea,0x7c,0xc7,0x10,0x62,0x7d,0x96,0x17,0xd9,0x47,0x79,0xbb,0x7c,0xba,0x9e, -0x89,0xfb,0x2d,0x78,0x47,0xfb,0x6b,0xc6,0x8d,0xa9,0xcb,0x1e,0xe8,0x2c,0x17,0x70, -0x27,0xa6,0xf3,0xd2,0xbe,0xc4,0x1d,0x2b,0xca,0x3f,0x67,0x0f,0x08,0xff,0x00,0xc2, -0x37,0xf0,0xfe,0x09,0xe4,0x4d,0xb7,0x17,0xc7,0xce,0x62,0x47,0x38,0xed,0x5e,0xaf, -0x5d,0x19,0x3e,0x1f,0xd8,0x61,0x63,0x7d,0xe5,0xab,0xf9,0xff,0x00,0xc0,0x3d,0x0c, -0xab,0x0d,0xf5,0x6c,0x24,0x62,0xf7,0x7a,0xb1,0x68,0xa2,0x8a,0xf6,0xcf,0x5c,0x29, -0x09,0xa5,0xa4,0xc5,0x00,0x7f,0x37,0xdf,0xb5,0x6f,0x8c,0xaf,0x3c,0x7d,0xfb,0x4a, -0x7c,0x4c,0xd6,0xef,0x9c,0xc9,0x34,0xda,0xfd,0xe4,0x28,0x4f,0x55,0x8a,0x29,0x4c, -0x51,0x2f,0xe1,0x1c,0x68,0x3f,0x0a,0xfd,0x53,0xfd,0x82,0x7f,0x6c,0xcf,0x83,0xf6, -0x1f,0xb3,0x47,0x85,0xfc,0x31,0xa9,0xf8,0xa7,0x4c,0xf0,0xae,0xbb,0xe1,0xbb,0x13, -0x6f,0x77,0xa7,0x6a,0x93,0xad,0xb1,0x99,0x94,0xb3,0x19,0x62,0x67,0x20,0x49,0xbf, -0x24,0xe0,0x1c,0xe4,0x90,0x47,0x4a,0xf8,0x47,0xfe,0x0a,0x39,0xfb,0x2b,0x78,0x83, -0xe0,0x87,0xc7,0x0f,0x10,0xf8,0xa2,0x1d,0x3e,0x69,0xfc,0x11,0xe2,0x7b,0xf9,0x75, -0x1b,0x2d,0x4a,0x35,0xdd,0x1c,0x32,0xca,0xdb,0xe5,0x82,0x4c,0x0f,0x91,0x83,0xb3, -0x6d,0xcf,0x55,0x23,0x07,0x39,0x03,0xe4,0x43,0xc7,0x19,0xaa,0x22,0xf6,0x67,0xaf, -0x6b,0x7a,0xcd,0xcf,0xed,0x4b,0xfb,0x51,0x5c,0xea,0x1a,0x95,0xf2,0x58,0x0f,0x17, -0x78,0x83,0x32,0x5d,0x5d,0xca,0xa8,0xb6,0x76,0xaf,0x20,0x03,0x73,0x36,0x00,0x11, -0xc2,0x00,0xe7,0xfb,0x95,0xfa,0x69,0xfb,0x5b,0xff,0x00,0xc1,0x44,0x3e,0x1f,0x7c, -0x15,0xf8,0x50,0xfe,0x01,0xf8,0x43,0xac,0xda,0x78,0x83,0xc4,0xc7,0x4f,0x5d,0x32, -0xd2,0xe7,0x49,0x71,0x2d,0xa6,0x95,0x08,0x4f,0x2c,0x48,0x65,0x19,0x57,0x90,0x28, -0xf9,0x55,0x49,0xc1,0xc1,0x38,0xc6,0x0f,0xe3,0x6f,0x5a,0xf5,0x3f,0x80,0xff,0x00, -0xb3,0x47,0xc4,0x3f,0xda,0x3b,0xc4,0x91,0x69,0x3e,0x0b,0xd0,0x66,0xbc,0x8b,0x78, -0x17,0x3a,0x9c,0xe0,0xc7,0x65,0x6a,0x33,0xcb,0x4b,0x2e,0x30,0x31,0x9f,0xba,0x32, -0xc7,0xb0,0x34,0x09,0x17,0x3f,0x65,0xcf,0x80,0x7a,0xc7,0xed,0x37,0xf1,0xb7,0x43, -0xf0,0x8d,0x92,0xcc,0x6d,0x27,0x9b,0xed,0x3a,0xb5,0xf8,0xc9,0xfb,0x35,0xa2,0x90, -0x65,0x90,0x9e,0x79,0x3f,0x75,0x73,0xd5,0x99,0x6b,0xfa,0x2e,0xd2,0xb4,0xcb,0x6d, -0x13,0x4b,0xb4,0xd3,0xec,0xa2,0x58,0x2c,0xed,0x21,0x48,0x21,0x89,0x06,0x02,0x22, -0xa8,0x55,0x03,0xe8,0x00,0xaf,0x0f,0xfd,0x90,0xff,0x00,0x64,0x5f,0x0d,0x7e,0xc9, -0xbe,0x00,0x1a,0x4e,0x98,0xcb,0xaa,0x78,0x86,0xfb,0x6c,0x9a,0xb6,0xb6,0xf1,0xed, -0x7b,0x99,0x00,0xe1,0x50,0x73,0xb2,0x35,0xe7,0x6a,0xe4,0xf5,0x24,0x92,0x6b,0xdd, -0x2f,0x6f,0x22,0xb0,0xb4,0x9e,0xe6,0x76,0xd9,0x0c,0x31,0xb4,0x8e,0xc7,0xb2,0x81, -0x92,0x7f,0x2a,0x87,0x24,0x95,0xd9,0x5b,0x23,0xe7,0x6f,0xda,0x2f,0xc4,0x7f,0xda, -0x1e,0x26,0xb5,0xd2,0xa3,0x6c,0xc7,0x61,0x16,0xe7,0x19,0xe3,0xcc,0x7c,0x1f,0xd1, -0x42,0xfe,0x75,0xe4,0x95,0xa1,0xe2,0x0d,0x62,0x4f,0x10,0x6b,0x97,0xfa,0x94,0xbf, -0x7e,0xea,0x66,0x97,0x1e,0x80,0x9e,0x07,0xe0,0x30,0x3f,0x0a,0xcf,0xaf,0xc4,0x31, -0xf8,0x87,0x8a,0xc5,0x4e,0xb7,0x77,0xf8,0x74,0x3e,0x4a,0xb5,0x4f,0x6b,0x51,0xcc, -0x28,0xa2,0xba,0x5f,0x87,0x1e,0x1f,0xff,0x00,0x84,0x9f,0xc6,0xba,0x5d,0x8b,0x2e, -0xe8,0x4c,0xa2,0x49,0x81,0xe9,0xb1,0x7e,0x66,0x07,0xeb,0x8c,0x7e,0x35,0xcb,0x46, -0x94,0xab,0x54,0x8d,0x28,0xef,0x27,0x6f,0xbc,0xce,0x31,0x73,0x92,0x8a,0xea,0x61, -0x49,0xa7,0xdd,0x43,0xfe,0xb2,0xda,0x64,0xff,0x00,0x7a,0x32,0x2a,0xb9,0x18,0x35, -0xf7,0x40,0x41,0x80,0x36,0x8c,0x56,0x37,0x88,0x3c,0x17,0xa3,0x78,0x9e,0xd9,0xe1, -0xd4,0x34,0xe8,0x27,0xdc,0x31,0xe6,0x6c,0x02,0x45,0xf7,0x0c,0x39,0x15,0xf7,0x15, -0x38,0x56,0x49,0x5e,0x9d,0x5b,0xbf,0x35,0xff,0x00,0x04,0xf5,0xe5,0x97,0x3b,0x7b, -0xb2,0x3e,0x30,0xa2,0xba,0x4f,0x88,0x3e,0x0e,0x97,0xc0,0xfe,0x26,0xb8,0xd3,0x5d, -0x8c,0x90,0xe0,0x4b,0x04,0xad,0xd5,0xe3,0x3d,0x09,0xf7,0x18,0x20,0xfb,0x8a,0xe6, -0xeb,0xe1,0xaa,0xd2,0x9d,0x1a,0x8e,0x9c,0xd5,0x9a,0xd0,0xf2,0x25,0x17,0x06,0xe2, -0xfa,0x05,0x74,0x7e,0x0d,0xf1,0xde,0xab,0xe0,0x9d,0x4a,0x3b,0x8b,0x2b,0x87,0x36, -0xfb,0x81,0x96,0xd5,0x98,0xf9,0x72,0xaf,0x70,0x47,0x63,0xef,0xd4,0x57,0x39,0x45, -0x14,0xaa,0xce,0x8c,0xd5,0x4a,0x6e,0xcd,0x04,0x64,0xe0,0xf9,0xa3,0xb9,0xf7,0x06, -0x95,0xa8,0xc3,0xab,0xe9,0xb6,0xd7,0xb6,0xed,0xba,0x0b,0x88,0xd6,0x54,0x3e,0xc4, -0x64,0x7f,0x3a,0xb7,0x5c,0x27,0xc1,0x2b,0xef,0xb7,0x7c,0x37,0xd2,0x49,0x39,0x68, -0x83,0xc2,0x7f,0xe0,0x2e,0x40,0xfd,0x31,0x5d,0xdd,0x7e,0xe5,0x86,0xab,0xed,0xe8, -0x42,0xaf,0x74,0x9f,0xde,0x8f,0xaf,0xa7,0x2e,0x78,0x29,0x77,0x0a,0x28,0xa2,0xba, -0x4d,0x02,0x8a,0x28,0xa0,0x04,0x27,0x00,0xd7,0xc7,0x1f,0x11,0x35,0xcf,0xf8,0x48, -0xbc,0x6d,0xac,0x5f,0x2b,0x07,0x8d,0xa7,0x64,0x8c,0x8e,0x85,0x17,0xe5,0x53,0xf8, -0x80,0x0f,0xe3,0x5f,0x54,0x78,0xf7,0x5d,0xff,0x00,0x84,0x73,0xc1,0xfa,0xb6,0xa0, -0xae,0x12,0x48,0xad,0xdb,0xcb,0x2d,0xd3,0x79,0x18,0x4f,0xfc,0x78,0x8a,0xf8,0xcc, -0x0c,0x0c,0x57,0xc0,0x71,0x4d,0x7d,0x29,0xd0,0x5e,0xaf,0xf2,0x5f,0xa9,0xe2,0xe6, -0x33,0xf8,0x60,0x2d,0x14,0x51,0x5f,0x9f,0x1e,0x20,0x57,0xd8,0xdf,0x0e,0xb4,0x4f, -0xec,0x0f,0x04,0xe8,0xf6,0x44,0x61,0xd6,0xdd,0x5d,0xc7,0xfb,0x4d,0xf3,0x37,0xea, -0xc6,0xbe,0x53,0xf0,0x5e,0x91,0xfd,0xbf,0xe2,0xcd,0x27,0x4f,0xc6,0x56,0x7b,0x94, -0x0e,0x3f,0xd9,0x07,0x2d,0xfa,0x03,0x5f,0x68,0x28,0x01,0x40,0x1c,0x01,0x5f,0x7f, -0xc2,0xd4,0x3f,0x89,0x5d,0xfa,0x7e,0xaf,0xf4,0x3d,0xac,0xba,0x1f,0x14,0xfe,0x41, -0x4b,0x45,0x15,0xfa,0x09,0xed,0x85,0x79,0xb7,0xc7,0xed,0x63,0xfb,0x2f,0xe1,0xfc, -0xf0,0xa9,0x2b,0x25,0xf4,0xc9,0x6e,0xa4,0x7a,0x67,0x73,0x7e,0x88,0x47,0xe3,0x5e, -0x93,0x5e,0x17,0xfb,0x4e,0x6a,0x0e,0xb1,0xe8,0x36,0x4a,0x7e,0x46,0x32,0xcc,0xc3, -0xdc,0x6d,0x03,0xf9,0xb5,0x78,0xd9,0xc5,0x57,0x47,0x01,0x56,0x4b,0xb5,0xbe,0xfd, -0x0e,0x5c,0x54,0xb9,0x28,0xc9,0x9e,0x11,0x45,0x14,0x57,0xe3,0x07,0xca,0x05,0x5e, -0xd0,0xb4,0xc6,0xd6,0xb5,0xab,0x0d,0x3d,0x0e,0x1a,0xea,0x74,0x87,0x3e,0x9b,0x88, -0x19,0xaa,0x35,0xda,0x7c,0x1b,0xb4,0x5b,0xdf,0x89,0x3a,0x2a,0x3f,0xdd,0x57,0x79, -0x3f,0x15,0x8d,0x88,0xfd,0x40,0xae,0xac,0x2d,0x3f,0x6d,0x5e,0x14,0xdf,0x56,0x97, -0xe2,0x69,0x4e,0x3c,0xd3,0x8c,0x7c,0xcf,0xac,0xad,0xa0,0x8e,0xd6,0xde,0x28,0x62, -0x50,0x91,0x46,0xa1,0x11,0x47,0x40,0x00,0xc0,0x02,0xa5,0xa4,0x14,0xb5,0xfb,0xaa, -0x49,0x2b,0x23,0xec,0x42,0x8a,0x28,0xa6,0x01,0x45,0x14,0x50,0x04,0x73,0x38,0x86, -0x27,0x76,0x38,0x55,0x04,0x93,0xf8,0x57,0xc3,0xd7,0x93,0x7d,0xa6,0xf2,0x79,0xbf, -0xe7,0xa4,0x8c,0xff,0x00,0x99,0xcd,0x7d,0x79,0xf1,0x37,0x5a,0x5d,0x07,0xc0,0xba, -0xc5,0xd1,0x38,0x73,0x01,0x8a,0x3c,0x1e,0x77,0x3f,0xca,0x3f,0x9e,0x7f,0x0a,0xf8, -0xf6,0xbf,0x3a,0xe2,0x9a,0xa9,0xce,0x95,0x25,0xd1,0x36,0x78,0x59,0x8c,0xb5,0x8c, -0x42,0x8a,0x28,0xaf,0x84,0x3c,0x70,0xaf,0xa1,0xff,0x00,0x66,0x98,0x36,0xf8,0x6b, -0x56,0x97,0x04,0x6f,0xbb,0x0b,0x9f,0xa2,0x0f,0xf1,0xaf,0x9e,0x3a,0xd7,0xd5,0x5f, -0x02,0xf4,0xa6,0xd3,0x3e,0x1d,0x58,0x3b,0xae,0xd9,0x2e,0x9d,0xee,0x08,0xf6,0x27, -0x0b,0xff,0x00,0x8e,0x81,0x5f,0x55,0xc3,0x74,0xdc,0xf1,0xdc,0xdd,0x93,0xff,0x00, -0x23,0xd1,0xc0,0x46,0xf5,0xaf,0xd9,0x1e,0x81,0x8e,0x2b,0xc3,0xbf,0x68,0x6f,0x02, -0xcd,0x71,0xe4,0xf8,0x8e,0xce,0x33,0x20,0x89,0x04,0x57,0x61,0x47,0x21,0x73,0xf2, -0xbf,0xe1,0x9c,0x1f,0xc3,0xde,0xbd,0xc4,0x53,0x66,0x85,0x27,0x8d,0xa3,0x91,0x16, -0x44,0x71,0xb5,0x95,0x86,0x41,0x1e,0x86,0xbf,0x46,0xc7,0x60,0xe1,0x8e,0xa1,0x2a, -0x33,0xeb,0xf8,0x33,0xdd,0xad,0x49,0x56,0x83,0x83,0x3e,0x17,0xa2,0xbd,0xc7,0xe2, -0x1f,0xec,0xff,0x00,0x20,0x96,0x5b,0xff,0x00,0x0d,0x60,0xa3,0x65,0x9b,0x4f,0x76, -0xc1,0x53,0xff,0x00,0x4c,0xd8,0xff,0x00,0x23,0xef,0xcf,0x41,0x5e,0x2d,0x7f,0xa7, -0x5d,0x69,0x57,0x2f,0x6f,0x79,0x6f,0x2d,0xac,0xe9,0xf7,0xa3,0x95,0x0a,0xb0,0xfc, -0x0d,0x7e,0x43,0x8c,0xcb,0xf1,0x18,0x19,0xb8,0xd5,0x8e,0x9d,0xfa,0x33,0xe6,0x2a, -0xd0,0x9d,0x17,0x69,0x22,0xbd,0x14,0x51,0x5e,0x69,0x80,0x52,0xab,0x14,0x60,0xca, -0x4a,0xb0,0x39,0x04,0x1c,0x11,0x49,0x45,0x34,0xed,0xaa,0x03,0xab,0xd1,0xbe,0x29, -0xf8,0xa7,0x41,0xda,0xb6,0xba,0xcd,0xc3,0x46,0x08,0xfd,0xdd,0xc1,0xf3,0x94,0x8f, -0x4f,0x9b,0x24,0x0f,0xa6,0x2b,0xd1,0x34,0x0f,0xda,0x56,0x65,0x65,0x4d,0x6b,0x4a, -0x57,0x52,0x79,0x9a,0xc9,0x88,0x20,0x7f,0xb8,0xc7,0x9f,0xfb,0xe8,0x57,0x88,0x51, -0x5e,0xae,0x1f,0x35,0xc6,0x61,0xbf,0x87,0x51,0xdb,0xb3,0xd5,0x7e,0x27,0x4c,0x31, -0x35,0x69,0xfc,0x32,0x3e,0xc3,0xf0,0xc7,0xc4,0x9f,0x0f,0xf8,0xb8,0x2a,0xe9,0xf7, -0xe8,0x6e,0x08,0xcf,0xd9,0xa5,0xf9,0x25,0x1f,0xf0,0x13,0xd7,0xf0,0xcd,0x74,0xf9, -0xaf,0x85,0x91,0xda,0x37,0x57,0x46,0x2a,0xca,0x72,0x18,0x1c,0x10,0x6b,0xd6,0x7e, -0x1c,0xfc,0x75,0xbe,0xd1,0x25,0x8a,0xc7,0x5e,0x77,0xbf,0xd3,0xce,0x14,0x5c,0x9e, -0x66,0x8b,0xeb,0xfd,0xe1,0xf5,0xe7,0xeb,0xd2,0xbe,0xcb,0x01,0xc4,0xb0,0xaa,0xd5, -0x3c,0x52,0xe5,0x7d,0xd6,0xdf,0x3e,0xc7,0xab,0x47,0x1e,0xa4,0xf9,0x6a,0x2b,0x1f, -0x48,0xd1,0x50,0x59,0x5e,0xc1,0xa8,0x5a,0xc5,0x73,0x6d,0x2a,0xcf,0x6f,0x2a,0x87, -0x8e,0x44,0x39,0x56,0x53,0xd0,0x83,0x53,0xd7,0xdb,0xa6,0x9a,0xba,0x3d,0x7d,0xc2, -0x8a,0x28,0xa6,0x01,0x5e,0x5f,0xf1,0xfa,0xf4,0xda,0xf8,0x48,0xa8,0xfe,0x2c,0xd7, -0xa8,0x57,0x8a,0xfe,0xd2,0xd7,0x5e,0x57,0x87,0xe3,0x4c,0xff,0x00,0x09,0x38,0xaf, -0x2f,0x33,0x97,0x2e,0x12,0xa3,0xf2,0x38,0xb1,0xb2,0xe5,0xc3,0xcd,0xf9,0x1f,0x18, -0x6b,0x32,0x65,0x65,0x6e,0xe4,0x93,0x55,0xff,0x00,0x62,0x7b,0x51,0xaa,0x7e,0xd9, -0x36,0xcf,0x8c,0x8b,0x2d,0x16,0xfa,0xe7,0xe8,0x49,0x8a,0x3c,0xff,0x00,0xe4,0x43, -0xf9,0xd1,0xad,0xbe,0xdb,0x69,0x0f,0xb1,0xad,0x6f,0xf8,0x27,0x95,0x9f,0xdb,0x3f, -0x6a,0x3f,0x15,0x5e,0xe3,0x22,0xd7,0xc3,0x72,0xc5,0xbb,0xd0,0xc9,0x73,0x01,0xff, -0x00,0xda,0x66,0xbe,0x63,0x21,0x8f,0xbd,0x73,0xf2,0xcc,0x8d,0x73,0xe7,0x09,0xf6, -0x4c,0xfd,0x29,0xdb,0x45,0x1c,0xd1,0x5f,0x79,0x73,0xf5,0xeb,0x21,0xd4,0x51,0x49, -0x48,0xa3,0xcd,0x3f,0x68,0x5f,0x18,0x9f,0x07,0xfc,0x31,0xd4,0xa4,0x85,0xf6,0x5d, -0xdf,0x62,0xc6,0x03,0xe8,0x5f,0x3b,0x8f,0xe0,0x81,0x8f,0xd4,0x0a,0xf8,0xeb,0xc0, -0x3e,0x1d,0x93,0xc5,0x3e,0x2c,0xd3,0x74,0xd8,0xd7,0x3e,0x6c,0xca,0x1b,0xd8,0x67, -0x9a,0xf5,0x7f,0xda,0xdb,0xc6,0x1f,0xda,0xbe,0x30,0xb2,0xd0,0x61,0x7c,0xc1,0xa6, -0xc3,0xe6,0x4a,0x01,0xe0,0xca,0xfe,0xbe,0xe1,0x40,0xff,0x00,0xbe,0xab,0x43,0xf6, -0x4b,0xf0,0x7f,0xda,0xb5,0x7b,0xdd,0x76,0x64,0xca,0x5b,0x2f,0x97,0x11,0x3f,0xde, -0x3d,0x6b,0xe0,0xb1,0xcd,0xe6,0x19,0x8c,0x68,0x2d,0x96,0x9f,0xe6,0x7c,0x06,0x2d, -0xbc,0xc7,0x35,0x54,0x57,0xc3,0x1d,0x3e,0xed,0x59,0xf5,0x0e,0x9f,0x65,0x1e,0x9d, -0x63,0x6f,0x6d,0x12,0x85,0x8e,0x14,0x08,0xa0,0x7a,0x01,0x8a,0xb3,0x48,0x3a,0x52, -0xd7,0xde,0x24,0x92,0xb2,0x3e,0xf9,0x2b,0x2b,0x20,0xa2,0x8a,0x29,0x8c,0x2b,0xf2, -0xdf,0xf6,0xd7,0xff,0x00,0x82,0x9b,0x78,0xf3,0xe1,0x1f,0xed,0x0d,0xa9,0xf8,0x43, -0xe1,0xcc,0x9a,0x4b,0xe8,0xfa,0x0c,0x49,0x69,0x7d,0xfd,0xa1,0x69,0xf6,0x81,0x3d, -0xe6,0x37,0x49,0x82,0x19,0x59,0x42,0x6e,0x09,0x80,0x7a,0xab,0x57,0xea,0x2c,0xb2, -0xa4,0x31,0xb3,0xc8,0xea,0x88,0xa0,0x96,0x66,0x38,0x00,0x7a,0x93,0x5f,0x84,0x3f, -0xf0,0x51,0x9f,0xd9,0xb7,0xc4,0x9f,0x0a,0xbe,0x3b,0xf8,0xa7,0xc5,0xe2,0xde,0x4d, -0x4b,0xc1,0xbe,0x27,0xd4,0x65,0xd4,0xad,0x75,0x8b,0x71,0xbe,0x28,0xe5,0x99,0x8b, -0xc9,0x04,0x84,0x67,0x63,0x2b,0xb3,0x63,0x38,0xdc,0xb8,0x23,0xb8,0x0d,0x09,0x9f, -0x6d,0x7e,0xc1,0xff,0x00,0xb5,0xcf,0xc4,0xef,0xdb,0x5b,0xc4,0xde,0x24,0xd0,0xbc, -0x73,0xe1,0x9f,0x07,0xcf,0xe0,0x9d,0x2e,0xc5,0x5f,0x51,0x78,0x74,0xf9,0x77,0x4d, -0x2c,0x84,0x88,0x62,0xdb,0x24,0xce,0x9c,0xec,0x91,0x89,0xdb,0xc0,0x4c,0x63,0x90, -0x47,0xb1,0xf8,0xbf,0xfe,0x09,0x9f,0xfb,0x3c,0xf8,0xc2,0xe9,0xae,0x64,0xf0,0x2a, -0xe9,0x13,0x39,0x25,0x8e,0x91,0x79,0x35,0xb2,0x1c,0xff,0x00,0xb0,0x1b,0x68,0xfc, -0x00,0xaf,0x84,0xbf,0xe0,0x93,0xbf,0xb5,0x1f,0x82,0x3e,0x09,0xea,0xfe,0x2e,0xf0, -0x97,0x8d,0xb5,0x2b,0x7f,0x0f,0x45,0xe2,0x09,0x2d,0xee,0x2c,0xb5,0x6b,0xaf,0x92, -0x01,0x24,0x61,0xd5,0xa2,0x96,0x4e,0x88,0x08,0x60,0x54,0x9e,0x33,0xbf,0x24,0x64, -0x67,0xf5,0xef,0x4a,0xf1,0x66,0x89,0xad,0xdb,0x47,0x71,0xa7,0xeb,0x36,0x17,0xf0, -0x48,0x01,0x49,0x6d,0xae,0x92,0x45,0x61,0xec,0x54,0x90,0x68,0x04,0x7c,0xe9,0xe1, -0x0f,0xf8,0x26,0x9f,0xec,0xf1,0xe0,0xeb,0x85,0xb8,0x8f,0xc0,0x51,0xea,0xf3,0x29, -0x05,0x5b,0x58,0xbc,0x9a,0xe5,0x47,0xfc,0x01,0x9f,0x69,0xfc,0x41,0xaf,0xa4,0x34, -0x2f,0x0f,0x69,0x7e,0x18,0xd2,0xe0,0xd3,0x74,0x7d,0x3a,0xd7,0x4a,0xd3,0xe0,0x1b, -0x62,0xb4,0xb2,0x85,0x61,0x89,0x07,0xa0,0x55,0x00,0x0a,0xd0,0x0c,0x18,0x02,0x08, -0x20,0xf7,0x14,0x64,0x1a,0x43,0x16,0xbc,0xdb,0xe3,0xcf,0x88,0xff,0x00,0xb1,0x3c, -0x0d,0x35,0xb4,0x6d,0x89,0xf5,0x17,0x16,0xeb,0x83,0xc8,0x5e,0xae,0x7e,0x98,0x18, -0xff,0x00,0x81,0x0a,0xf4,0x83,0xc0,0xaf,0x99,0x7f,0x68,0x4f,0x10,0x9d,0x5f,0xc6, -0x69,0xa7,0xa3,0x66,0x1d,0x3a,0x30,0x84,0x7f,0xd3,0x46,0xc3,0x37,0xe9,0xb4,0x7e, -0x15,0xe0,0xe7,0x78,0x9f,0xaa,0xe0,0xa6,0xd6,0xf2,0xd1,0x7c,0xff,0x00,0xe0,0x1c, -0x58,0xba,0x9e,0xce,0x93,0xf3,0x3c,0xbe,0x8a,0x28,0xaf,0xc7,0x4f,0x97,0x0a,0xf7, -0x2f,0xd9,0xaf,0xc3,0xd9,0x93,0x55,0xd6,0xa4,0x5c,0xe3,0x16,0xb1,0x1f,0xfc,0x79, -0xff,0x00,0xf6,0x5a,0xf0,0xda,0xfa,0xff,0x00,0xe1,0x77,0x87,0x8f,0x86,0x7c,0x0f, -0xa5,0x5a,0x32,0x14,0x99,0xa2,0x13,0x4c,0x0f,0x50,0xef,0xf3,0x10,0x7e,0x99,0xc7, -0xe1,0x5f,0x55,0xc3,0x98,0x6f,0x6d,0x8c,0xf6,0x8f,0x68,0x2b,0xfc,0xf6,0x47,0xa3, -0x80,0xa7,0xcf,0x57,0x9b,0xb1,0xd6,0x51,0x49,0x4b,0x5f,0xab,0x1f,0x48,0x78,0x4f, -0xed,0x35,0xa7,0x28,0x3a,0x1d,0xfa,0xaf,0xcc,0x7c,0xd8,0x5d,0xbd,0x7e,0xe9,0x5f, -0xfd,0x9b,0xf3,0xaf,0x0a,0xaf,0xa3,0xff,0x00,0x69,0x38,0x03,0xf8,0x3a,0xc2,0x5c, -0x72,0x97,0xca,0x33,0xec,0x63,0x7f,0xf0,0x15,0xf3,0x85,0x7e,0x47,0xc4,0x30,0x50, -0xcc,0x26,0xd7,0x54,0x9f,0xe0,0x7c,0xce,0x39,0x5a,0xbb,0x0a,0x28,0xa2,0xbe,0x6c, -0xe0,0x3e,0x92,0xfd,0x9b,0xef,0x84,0xfe,0x0c,0xbc,0xb6,0xce,0x5a,0x0b,0xc6,0xe3, -0xd1,0x59,0x54,0x8f,0xd7,0x35,0xeb,0x35,0xe1,0x1f,0xb3,0x1d,0xd0,0x0d,0xe2,0x0b, -0x62,0xdc,0x91,0x0c,0x8a,0xbf,0xf7,0xd8,0x27,0xf9,0x57,0xbb,0x66,0xbf,0x64,0xc9, -0x6a,0x7b,0x4c,0x05,0x27,0xd9,0x5b,0xee,0x76,0x3e,0xa7,0x09,0x2e,0x6a,0x11,0x16, -0x8a,0x28,0xaf,0x70,0xec,0x0a,0x28,0xa4,0x3d,0x28,0x03,0xc8,0x3f,0x69,0x0d,0x6f, -0xec,0x9e,0x19,0xb1,0xd3,0x11,0x80,0x7b,0xd9,0xf7,0xb0,0xf5,0x44,0xe7,0xff,0x00, -0x42,0x2b,0xf9,0x57,0xce,0x95,0xe9,0x7f,0xb4,0x06,0xb8,0x75,0x4f,0x1e,0x3d,0xa0, -0x20,0xc5,0x61,0x0a,0xc2,0x30,0x73,0xf3,0x1f,0x99,0xbf,0xf4,0x20,0x3f,0x0a,0xf3, -0x4a,0xfc,0x77,0x3b,0xaf,0xf5,0x8c,0x74,0xda,0xd9,0x69,0xf7,0x7f,0xc1,0x3e,0x5b, -0x19,0x3e,0x7a,0xcf,0xcb,0x40,0xa2,0x8a,0x2b,0xc1,0x38,0xcf,0x55,0xfd,0x9d,0x74, -0x53,0x7f,0xe3,0x2b,0x8b,0xf6,0x40,0x62,0xb1,0xb7,0x24,0x37,0xa3,0xb9,0xda,0x3f, -0x40,0xf5,0xf4,0xb5,0x79,0x2f,0xec,0xe7,0xa2,0x7d,0x87,0xc1,0xf7,0x3a,0x83,0xc6, -0x04,0x97,0xd7,0x07,0x6b,0xf7,0x31,0xa7,0xca,0x07,0xfd,0xf5,0xbf,0xf3,0xaf,0x5a, -0xaf,0xd8,0x32,0x2a,0x1e,0xc3,0x01,0x0b,0xef,0x2d,0x7e,0xff,0x00,0xf8,0x16,0x3e, -0xa3,0x07,0x0e,0x4a,0x2b,0xcf,0x50,0xa2,0x8a,0x2b,0xe8,0x0e,0xd0,0xaf,0x00,0xfd, -0xa6,0xc6,0x35,0x3d,0x04,0xf6,0x30,0xcb,0xfc,0xd6,0xbd,0xfe,0xbc,0x67,0xf6,0x97, -0xd2,0xbc,0xed,0x0f,0x49,0xd4,0x42,0x92,0x6d,0xe7,0x68,0x4e,0x07,0x00,0x3a,0xe7, -0x27,0xf1,0x41,0xf9,0xd7,0x81,0x9e,0xc1,0xcf,0x2f,0xa8,0x97,0x93,0xfc,0x4e,0x2c, -0x62,0xbd,0x09,0x1f,0x3d,0x51,0x45,0x15,0xf8,0xf1,0xf2,0xe1,0x5d,0xa7,0xc1,0xcb, -0xc4,0xb1,0xf8,0x93,0xa2,0xbb,0x9c,0x2b,0xc8,0xf1,0x7e,0x2c,0x8c,0xa3,0xf5,0x22, -0xb8,0xba,0xb1,0xa7,0xdf,0x4d,0xa5,0xdf,0xdb,0x5e,0x5b,0xb6,0xd9,0xed,0xe4,0x59, -0x50,0xfa,0x32,0x9c,0x8f,0xe5,0x5d,0x38,0x6a,0xbe,0xc2,0xbc,0x2a,0xbf,0xb2,0xd3, -0xfb,0x99,0x74,0xe5,0xc9,0x35,0x2e,0xcc,0xfb,0x88,0x52,0xd6,0x4f,0x86,0x3c,0x43, -0x6d,0xe2,0x9d,0x0e,0xcf,0x53,0xb4,0x6c,0xc5,0x70,0x81,0xb6,0xe7,0x25,0x1b,0xba, -0x9f,0x70,0x72,0x3f,0x0a,0xd6,0xaf,0xdd,0x21,0x38,0xce,0x2a,0x71,0x77,0x4c,0xfb, -0x14,0xd3,0x57,0x41,0x45,0x14,0x55,0x8c,0x28,0xa4,0xc8,0xae,0x4f,0xe2,0x2f,0x8f, -0xed,0x3c,0x07,0xa2,0xb5,0xcc,0x84,0x4b,0x7b,0x28,0x2b,0x6d,0x6d,0x9e,0x5d,0xbd, -0x4f,0xfb,0x23,0xb9,0xff,0x00,0x1a,0xc6,0xb5,0x68,0x50,0xa6,0xea,0xd4,0x76,0x48, -0x89,0x49,0x41,0x39,0x4b,0x63,0xcb,0x7f,0x68,0xdf,0x17,0x2d,0xc5,0xcd,0x9f,0x87, -0xad,0xdf,0x3e,0x41,0x17,0x37,0x38,0xec,0xc4,0x10,0x8b,0xf9,0x12,0x7f,0x11,0x5e, -0x27,0x56,0x75,0x2d,0x46,0xe3,0x56,0xbf,0x9e,0xf6,0xee,0x53,0x35,0xcc,0xee,0x64, -0x91,0xcf,0x72,0x6a,0xb5,0x7e,0x2d,0x98,0x62,0xde,0x3b,0x13,0x2a,0xcf,0xae,0xde, -0x9d,0x0f,0x94,0xaf,0x55,0xd6,0x9b,0x98,0x51,0x45,0x15,0xe7,0x18,0x16,0x74,0xcd, -0x3e,0x6d,0x5b,0x51,0xb5,0xb2,0xb6,0x5d,0xf7,0x17,0x32,0x2c,0x51,0xa9,0xe8,0x59, -0x8e,0x07,0xf3,0xaf,0xb5,0xb4,0x7d,0x3a,0x2d,0x1f,0x4a,0xb4,0xb1,0x80,0x62,0x1b, -0x68,0x96,0x14,0x1e,0xca,0x00,0x1f,0xca,0xbc,0x03,0xf6,0x78,0xf0,0x69,0xd4,0x75, -0xa9,0xb5,0xfb,0x84,0xff,0x00,0x47,0xb2,0x06,0x38,0x32,0x3e,0xf4,0xa4,0x72,0x7f, -0x05,0x3f,0x99,0xf6,0xaf,0xa2,0x87,0x4a,0xfd,0x3b,0x86,0xb0,0x8e,0x8d,0x09,0x62, -0x24,0xb5,0x9e,0xde,0x88,0xfa,0x0c,0xbe,0x97,0x2c,0x1c,0xdf,0x51,0x68,0xa4,0xcd, -0x2d,0x7d,0x91,0xea,0x88,0x46,0x6b,0x33,0x5b,0xf0,0xd6,0x97,0xe2,0x2b,0x63,0x06, -0xa5,0x61,0x05,0xec,0x7d,0x84,0xa8,0x09,0x1f,0x43,0xd4,0x7e,0x15,0xa9,0x45,0x4c, -0xa1,0x19,0xae,0x59,0x2b,0xa1,0x34,0x9a,0xb3,0x3c,0x7b,0x5f,0xfd,0x9b,0xf4,0x8b, -0xd6,0x32,0x69,0x57,0xd3,0xe9,0xac,0x4e,0x7c,0xb9,0x07,0x9d,0x18,0x1e,0x83,0x90, -0x47,0xe6,0x6b,0xce,0x35,0xdf,0x81,0x3e,0x2a,0xd1,0x81,0x78,0xad,0xa2,0xd4,0xe2, -0x19,0xf9,0xad,0x1f,0x2d,0x8e,0xdf,0x29,0xc1,0xfc,0xb3,0x5f,0x54,0x52,0x11,0x5f, -0x3d,0x88,0xc8,0x30,0x35,0xf5,0x51,0xe5,0x7e,0x5f,0xe5,0xb1,0xc3,0x3c,0x15,0x19, -0xf4,0xb7,0xa1,0xf0,0xe5,0xed,0x85,0xd6,0x9b,0x39,0x86,0xee,0xda,0x5b,0x59,0x87, -0x58,0xe6,0x42,0x8d,0xf9,0x1a,0x82,0xbe,0xdb,0xd5,0xf4,0x1d,0x3f,0x5d,0xb6,0x36, -0xfa,0x85,0x9c,0x37,0xb0,0x9f,0xe1,0x99,0x03,0x63,0xdc,0x7a,0x57,0x8b,0xfc,0x45, -0xf8,0x03,0x1d,0xbd,0xb4,0xda,0x8f,0x86,0xb7,0xe5,0x32,0xef,0x60,0xe7,0x76,0x47, -0x7d,0x84,0xf3,0x9f,0x63,0x9c,0xfa,0xf6,0xaf,0x91,0xc6,0xf0,0xe5,0x7a,0x11,0x75, -0x28,0x4b,0x9d,0x2e,0x9b,0x3f,0xf8,0x27,0x9b,0x57,0x01,0x38,0x2e,0x68,0x3b,0xa3, -0xc3,0x28,0xa0,0x8c,0x1c,0x74,0xa2,0xbe,0x40,0xf2,0xc2,0x8a,0x28,0xa0,0x0f,0x6f, -0xfd,0x9d,0xbc,0x6b,0x22,0xdc,0xcf,0xe1,0xcb,0x99,0x0b,0x46,0xca,0x67,0xb5,0xdc, -0x7e,0xe9,0x1f,0x79,0x07,0xb1,0xeb,0xf8,0x1a,0xf7,0xba,0xf8,0xf7,0xe1,0x7d,0xe3, -0xd8,0xfc,0x41,0xd0,0x64,0x8c,0xe0,0xb5,0xd2,0xc6,0x7e,0x8d,0xf2,0x9f,0xd1,0x8d, -0x7d,0x84,0x2b,0xf5,0x6e,0x1c,0xc4,0x4a,0xb6,0x13,0x92,0x6f,0xe1,0x76,0xf9,0x1f, -0x47,0x80,0xa8,0xe7,0x4a,0xcf,0xa0,0xb4,0x51,0x45,0x7d,0x51,0xe9,0x08,0x78,0xaf, -0x9f,0xbf,0x6a,0x3b,0xbd,0x96,0x51,0xc7,0x9e,0x89,0xd2,0xbe,0x81,0x35,0xf3,0x27, -0xed,0x4f,0x77,0xfe,0x90,0x23,0x07,0xf8,0x45,0x78,0x59,0xd4,0xb9,0x70,0x53,0x3c, -0xac,0xce,0x5c,0xb8,0x59,0xb3,0xe5,0x3f,0x11,0x3e,0xdb,0x19,0x4f,0xfb,0x26,0xbb, -0xef,0xf8,0x26,0x55,0x81,0xb9,0xf8,0x97,0xf1,0x53,0x53,0xed,0x0d,0xa5,0x8d,0xb0, -0x3f,0xef,0xbc,0xcd,0xff,0x00,0xb2,0x0a,0xf3,0x8f,0x16,0xc9,0xe5,0xe9,0xb3,0x9f, -0x45,0xaf,0x63,0xff,0x00,0x82,0x5b,0xdb,0x16,0xb7,0xf8,0xab,0x7d,0xb7,0x89,0x35, -0x1b,0x38,0x43,0x7a,0xec,0x8a,0x42,0x7f,0xf4,0x3a,0xf2,0xb2,0x28,0xe8,0xd9,0xf9, -0xdf,0x0d,0x47,0x9b,0x33,0x9c,0xbb,0x44,0xfb,0xb3,0x9a,0x29,0xd4,0x57,0xd9,0x1f, -0xac,0x85,0x52,0xd5,0xb5,0x28,0x74,0x9d,0x36,0xee,0xfa,0xe0,0xed,0x82,0xda,0x26, -0x99,0xcf,0xfb,0x2a,0x32,0x6a,0xed,0x78,0xaf,0xed,0x53,0xe3,0x0f,0xec,0x0f,0x87, -0xab,0xa5,0xc3,0x26,0xdb,0xad,0x5e,0x61,0x09,0x00,0xe0,0xf9,0x4b,0xf3,0x48,0x7e, -0x9f,0x75,0x7f,0xe0,0x55,0xcd,0x89,0xac,0xb0,0xf4,0x65,0x55,0xf4,0x47,0x26,0x2e, -0xba,0xc2,0xd0,0x9d,0x67,0xd1,0x1f,0x26,0x78,0x83,0x5a,0xb8,0xf1,0x6f,0x89,0x2f, -0xf5,0x4b,0x8c,0xb5,0xc5,0xf5,0xc3,0x4a,0x47,0xa6,0x4f,0x03,0xf0,0x18,0x1f,0x85, -0x7d,0xbd,0xf0,0x4b,0xc2,0x63,0xc2,0x3f,0x0f,0xf4,0xeb,0x76,0x4d,0xb3,0xcc,0x82, -0x69,0x78,0xc7,0x26,0xbe,0x43,0xf8,0x3b,0xe1,0x46,0xf1,0x77,0x8f,0x74,0xcb,0x3d, -0xbb,0xa1,0x59,0x04,0x92,0x9f,0x45,0x1c,0xd7,0xde,0xf0,0xc4,0xb0,0xc2,0x91,0xa0, -0xda,0xaa,0x00,0x03,0xda,0xbe,0x4f,0x21,0xa2,0xea,0x54,0xa9,0x89,0x9f,0xa7,0xdf, -0xab,0x3e,0x57,0x87,0xa8,0x39,0x73,0xe2,0xa7,0xbb,0xfe,0x99,0x25,0x14,0x56,0x47, -0x8b,0xfc,0x53,0xa7,0x78,0x1f,0xc2,0x9a,0xcf,0x88,0xb5,0x79,0xbe,0xcf,0xa5,0xe9, -0x36,0x73,0x5f,0x5d,0x4b,0x8c,0xec,0x8a,0x34,0x2e,0xe7,0x1d,0xf8,0x53,0x5f,0x6a, -0x7d,0xa9,0xaf,0x45,0x7e,0x2d,0xcd,0xff,0x00,0x05,0x91,0xf8,0xd2,0x35,0x2b,0x86, -0xb6,0xd1,0x7c,0x20,0xd6,0x2d,0x2b,0x18,0x22,0x9e,0xc2,0x7f,0x31,0x63,0x2c,0x76, -0xab,0x30,0x9c,0x02,0x40,0xc0,0xce,0x2b,0xf5,0x5f,0xf6,0x6a,0xf1,0xbf,0x8a,0xfe, -0x25,0x7c,0x0e,0xf0,0x8f,0x8a,0xfc,0x6b,0x65,0x63,0xa6,0xf8,0x83,0x5a,0xb3,0x5b, -0xf9,0x2d,0x34,0xe4,0x74,0x8a,0x38,0xa4,0x25,0xa1,0xe1,0xd9,0x8e,0x4c,0x65,0x09, -0xc9,0xea,0x48,0xa0,0x49,0xdc,0xf9,0xef,0xfe,0x0a,0xb9,0xf1,0xa3,0xfe,0x15,0x97, -0xec,0xc9,0x73,0xe1,0xfb,0x39,0x8c,0x7a,0xb7,0x8c,0x6e,0x06,0x96,0x81,0x7a,0x8b, -0x60,0x37,0xdc,0x1f,0xa1,0x50,0x13,0xfe,0xda,0x57,0xe2,0x00,0xd4,0x6e,0xc5,0xab, -0xdb,0x0b,0xa9,0x85,0xb3,0xfd,0xe8,0x44,0x87,0x63,0x73,0x9e,0x47,0x4e,0xa2,0xbf, -0xa2,0x9f,0x8f,0x5f,0xb2,0x2f,0xc3,0x3f,0xda,0x5e,0xfb,0x4b,0xbc,0xf1,0xf6,0x95, -0x77,0xaa,0xcd,0xa6,0x44,0xf0,0xda,0x79,0x3a,0x8c,0xd6,0xeb,0x12,0xb1,0xcb,0x7c, -0xa8,0xc0,0x12,0x48,0x19,0x24,0x67,0x81,0xe9,0x5e,0x33,0x7d,0xff,0x00,0x04,0x93, -0xfd,0x9e,0xae,0xff,0x00,0xd5,0x69,0x5a,0xed,0x97,0xfd,0x70,0xd6,0x24,0x3f,0xfa, -0x1e,0xea,0x62,0x6a,0xe7,0xe1,0xa7,0x34,0xf8,0x66,0x92,0xde,0x41,0x24,0x4e,0xd1, -0x48,0x3a,0x32,0x1c,0x11,0xf8,0xd7,0xed,0x36,0xa9,0xff,0x00,0x04,0x70,0xf8,0x23, -0x78,0xa7,0xec,0x9a,0xb7,0x8b,0xb4,0xf2,0x7b,0xa5,0xfc,0x2f,0x8f,0xfb,0xea,0x13, -0x5c,0x9d,0xff,0x00,0xfc,0x11,0x47,0xe1,0xf4,0xad,0xfe,0x85,0xf1,0x0f,0xc4,0xd6, -0xe3,0xd2,0xe2,0xde,0xde,0x5f,0xe4,0xab,0x4e,0xe2,0xb3,0x3f,0x28,0xad,0x3e,0x21, -0xf8,0xaa,0xc3,0x02,0xd7,0xc4,0xda,0xc5,0xb6,0x3a,0x08,0x6f,0xe5,0x4c,0x7e,0x4d, -0x5f,0xb1,0x9f,0xf0,0x49,0x2f,0x0c,0x78,0x9e,0x4f,0x82,0x3a,0xbf,0x8e,0x7c,0x53, -0xae,0xea,0xda,0xcc,0xbe,0x20,0xbe,0xf2,0x74,0xf4,0xd4,0xef,0x25,0x9c,0x43,0x6d, -0x06,0x54,0xb2,0x07,0x63,0x8d,0xf2,0x17,0xe9,0xd7,0x60,0xaf,0x36,0xbe,0xff,0x00, -0x82,0x23,0xe8,0x0e,0xa7,0xec,0x9f,0x15,0xb5,0x28,0x4f,0xfd,0x36,0xd1,0xa3,0x93, -0xf9,0x4c,0xb5,0xfa,0x0f,0xf0,0x97,0xe1,0xbe,0x9f,0xf0,0x87,0xe1,0x9f,0x86,0x7c, -0x19,0xa5,0xb6,0xfb,0x1d,0x12,0xc2,0x2b,0x28,0xe5,0x2b,0xb4,0xc9,0xb5,0x70,0xce, -0x47,0x38,0x2c,0xd9,0x63,0xcf,0x52,0x69,0x31,0xa4,0xce,0x8f,0x55,0xd4,0x62,0xd2, -0x74,0xdb,0xab,0xd9,0xdb,0x6c,0x36,0xf1,0x34,0xae,0x7d,0x94,0x64,0xd7,0xc5,0x5a, -0xb6,0xa5,0x2e,0xb1,0xaa,0x5d,0xdf,0x4e,0x73,0x35,0xcc,0xad,0x2b,0x7d,0x49,0xcd, -0x7d,0x6b,0xf1,0x2b,0xc3,0xba,0x97,0x8a,0xfc,0x29,0x73,0xa5,0x69,0x93,0x41,0x04, -0xd7,0x0c,0xa1,0xde,0x76,0x65,0x1b,0x01,0xc9,0x03,0x00,0xf2,0x70,0x07,0xd0,0x9a, -0xf1,0x39,0x7f,0x67,0x2f,0x13,0xa2,0x92,0xb7,0x3a,0x6c,0x87,0xd1,0x66,0x70,0x7f, -0x54,0xaf,0x85,0xe2,0x1a,0x18,0xbc,0x5c,0xe1,0x0a,0x34,0xdb,0x8a,0xd7,0x4e,0xe7, -0x93,0x8e,0x85,0x5a,0x8d,0x46,0x11,0xba,0x47,0x95,0xd1,0x5e,0x87,0x3f,0xc0,0x5f, -0x18,0xc2,0x7e,0x5b,0x18,0x26,0xf7,0x4b,0x84,0xfe,0xa4,0x55,0x39,0x3e,0x0a,0x78, -0xd2,0x3c,0x9f,0xec,0x46,0x61,0xfe,0xcd,0xc4,0x47,0xff,0x00,0x66,0xaf,0x89,0x79, -0x6e,0x36,0x3b,0xd2,0x97,0xdc,0xcf,0x25,0xd0,0xaa,0xbe,0xcb,0x32,0xfe,0x1d,0xf8, -0x7b,0xfe,0x12,0x8f,0x19,0xe9,0x76,0x0c,0x81,0xe1,0x69,0x44,0x92,0x83,0xd3,0xcb, -0x5f,0x99,0x87,0xe2,0x06,0x3f,0x1a,0xfb,0x1c,0x70,0x05,0x78,0xcf,0xc0,0xaf,0x87, -0x5a,0x9f,0x86,0x75,0x2d,0x47,0x51,0xd6,0x2c,0x9a,0xd2,0x7d,0x82,0x08,0x55,0xc8, -0x24,0x82,0x72,0xc7,0x82,0x7d,0x14,0x7e,0x75,0xec,0xd5,0xfa,0x37,0x0f,0x61,0x25, -0x86,0xc2,0xb9,0x54,0x56,0x94,0x9f,0xe5,0xa2,0x3d,0xdc,0x0d,0x27,0x4e,0x9d,0xda, -0xd5,0x8b,0x45,0x14,0x57,0xd4,0x9e,0x89,0xe6,0x1f,0xb4,0x3c,0x7e,0x67,0xc3,0xfc, -0xff,0x00,0x72,0xee,0x36,0xfd,0x18,0x7f,0x5a,0xf9,0x8e,0xbe,0xa7,0xf8,0xf7,0x1e, -0xff,0x00,0x86,0xb7,0xed,0xfd,0xc9,0x61,0x6f,0xfc,0x88,0x07,0xf5,0xaf,0x96,0x33, -0x5f,0x96,0x71,0x32,0xb6,0x35,0x3f,0xee,0xaf,0xcd,0x9f,0x3b,0x98,0x2f,0xde,0xdf, -0xc8,0x28,0xa2,0x8a,0xf9,0x23,0xcc,0x3d,0x5f,0xf6,0x6f,0xb9,0x31,0xf8,0xd6,0xf2, -0x1c,0xe1,0x64,0xb1,0x63,0x8f,0x52,0x1d,0x3f,0xc4,0xd7,0xd2,0x63,0xad,0x7c,0xa1, -0xf0,0x42,0xf1,0xad,0x3e,0x25,0x69,0x4a,0xa7,0x0b,0x30,0x96,0x26,0xfa,0x79,0x6c, -0x7f,0x98,0x15,0xf5,0x78,0xaf,0xd5,0x38,0x6a,0x7c,0xd8,0x2e,0x5e,0xcd,0xff,0x00, -0x99,0xf4,0x78,0x07,0x7a,0x36,0xec,0xc5,0xa2,0x8a,0x2b,0xeb,0x0f,0x48,0x2a,0x3b, -0x89,0xd2,0xda,0x09,0x25,0x91,0x82,0x47,0x1a,0x96,0x66,0x27,0x80,0x00,0xe4,0xd3, -0xcd,0x70,0xff,0x00,0x19,0xb5,0xcf,0xec,0x4f,0x87,0xba,0xa1,0x5c,0x79,0xb7,0x4a, -0x2d,0x14,0x1e,0xfb,0xf8,0x6f,0xfc,0x77,0x71,0xfc,0x2b,0x9f,0x11,0x59,0x50,0xa3, -0x3a,0xaf,0xa2,0x6c,0x89,0xcb,0x92,0x2e,0x5d,0x8f,0x96,0xb5,0xbd,0x56,0x4d,0x73, -0x59,0xbe,0xd4,0x65,0x1b,0x64,0xba,0x9d,0xe6,0x2b,0xfd,0xdd,0xc4,0x9c,0x7e,0x15, -0x4a,0x8a,0x2b,0xf0,0x99,0xc9,0xce,0x4e,0x4f,0x76,0x7c,0x73,0x77,0x77,0x61,0x40, -0x04,0x90,0x07,0x24,0xd1,0x5d,0x17,0xc3,0xcd,0x1b,0xfb,0x7f,0xc6,0xda,0x3d,0x91, -0x5d,0xc8,0xf7,0x0a,0xee,0x3d,0x51,0x7e,0x66,0xfd,0x14,0xd5,0xd1,0xa6,0xeb,0x54, -0x8d,0x35,0xbb,0x69,0x0e,0x31,0x72,0x92,0x8a,0xea,0x7d,0x59,0xe0,0x9d,0x10,0x78, -0x77,0xc2,0x7a,0x56,0x9e,0x17,0x6b,0x43,0x6e,0x81,0xc7,0xfb,0x64,0x65,0xbf,0x52, -0x6b,0x76,0x90,0x74,0x18,0xe9,0x4b,0x5f,0xbb,0xd3,0x82,0xa7,0x05,0x05,0xb2,0x56, -0x3e,0xc6,0x2b,0x95,0x24,0x82,0x8a,0x28,0xad,0x0a,0x0a,0xc0,0xf1,0xcf,0x86,0x93, -0xc5,0xde,0x16,0xd4,0x34,0xb6,0x21,0x5a,0x78,0xff,0x00,0x76,0xc7,0xa2,0xc8,0x0e, -0x54,0x9f,0x6c,0x81,0x5b,0xf4,0x86,0xb3,0xa9,0x08,0xd5,0x83,0x84,0xb6,0x7a,0x0a, -0x49,0x49,0x38,0xbe,0xa7,0xc3,0x57,0x56,0xb2,0xd9,0x5c,0xcb,0x6f,0x3c,0x6d,0x14, -0xd1,0x39,0x8d,0xd1,0x86,0x0a,0xb0,0x38,0x20,0xd4,0x55,0xf4,0x07,0xc6,0xef,0x85, -0x32,0xea,0x8c,0xfe,0x20,0xd1,0xe1,0x32,0x5d,0x01,0x9b,0xab,0x64,0x1c,0xc8,0x07, -0xf1,0xa8,0xee,0x40,0xea,0x3b,0x8f,0x7e,0xbf,0x3f,0xd7,0xe2,0xd9,0x86,0x06,0xa6, -0x02,0xb3,0xa7,0x3d,0xba,0x3e,0xeb,0xfa,0xdc,0xf9,0x3a,0xf4,0x65,0x46,0x7c,0xac, -0x28,0xa2,0x8a,0xf3,0x0e,0x73,0xb3,0xf8,0x73,0xf1,0x3a,0xfb,0xe1,0xf5,0xe3,0x04, -0x43,0x77,0xa7,0x4a,0x73,0x35,0xab,0x1c,0x73,0xfd,0xe5,0x3d,0x8f,0xf3,0xfc,0xb1, -0xf4,0x3f,0x86,0xbe,0x2b,0xf8,0x67,0xc4,0xd1,0x21,0x87,0x52,0x8a,0xd6,0x72,0x39, -0xb7,0xbb,0x61,0x13,0x83,0xe9,0xc9,0xc1,0xfc,0x09,0xaf,0x91,0x68,0xaf,0xa1,0xcb, -0xf3,0xbc,0x46,0x02,0x3e,0xcd,0x7b,0xd1,0xec,0xfa,0x7a,0x33,0xba,0x8e,0x2e,0xa5, -0x15,0xcb,0xba,0x3e,0xe7,0x8e,0xe2,0x29,0x90,0x3c,0x72,0x23,0xa1,0xe8,0xca,0xc0, -0x83,0x54,0xf5,0x0d,0x7f,0x4c,0xd2,0x50,0xb5,0xee,0xa1,0x6b,0x68,0xa3,0xbc,0xd3, -0x2a,0xff,0x00,0x33,0x5f,0x13,0x2c,0x8e,0x83,0x0a,0xcc,0xa3,0xd8,0xe2,0x9a,0x79, -0x39,0x27,0x27,0xde,0xbd,0xd7,0xc5,0x52,0xb7,0xbb,0x47,0x5f,0x5f,0xf8,0x07,0x67, -0xf6,0x93,0xe9,0x1f,0xc7,0xfe,0x01,0xf4,0x6f,0x8c,0x7f,0x68,0x5d,0x2b,0x4c,0x89, -0xe1,0xd0,0xe3,0x3a,0xa5,0xd9,0xc8,0x13,0x30,0x29,0x0a,0x7e,0x7c,0xb7,0xe1,0xc1, -0xf5,0xaf,0x03,0xd7,0xbc,0x41,0x7f,0xe2,0x6d,0x4a,0x5b,0xfd,0x46,0xe1,0xae,0x6e, -0x64,0xea,0xcd,0xd0,0x0e,0xc0,0x0e,0xc0,0x7a,0x0a,0xce,0xa2,0xbe,0x5f,0x1d,0x9a, -0x62,0x71,0xef,0xf7,0xaf,0x4e,0xcb,0x63,0xce,0xad,0x88,0xa9,0x5b,0xe2,0xd8,0x28, -0xa2,0x8a,0xf2,0x4e,0x60,0xad,0x8f,0x09,0xf8,0x5e,0xf7,0xc6,0x1a,0xe5,0xbe,0x9b, -0x62,0x84,0xc9,0x21,0xcb,0xc8,0x47,0xcb,0x1a,0x7f,0x13,0x1f,0x61,0xfa,0x9c,0x0e, -0xf4,0x78,0x5f,0xc2,0x9a,0x97,0x8c,0x35,0x44,0xb1,0xd3,0x60,0x32,0xc8,0x7e,0xfb, -0x9c,0x84,0x89,0x7f,0xbc,0xc7,0xb0,0xfd,0x7d,0x33,0x5f,0x54,0x7c,0x3e,0xf8,0x7f, -0x63,0xe0,0x2d,0x24,0x41,0x6e,0x04,0xd7,0x72,0x00,0x6e,0x2e,0x98,0x61,0xa4,0x3f, -0xd0,0x0e,0xc2,0xbe,0x8b,0x29,0xca,0x67,0x8f,0xa8,0xa7,0x35,0x6a,0x6b,0x77,0xdf, -0xc9,0x1d,0xb8,0x6c,0x34,0xab,0xca,0xef,0xe1,0x35,0xbc,0x35,0xe1,0xeb,0x5f,0x0b, -0x68,0xb6,0xba,0x65,0x92,0x95,0x82,0x04,0xda,0x09,0xea,0xc7,0xbb,0x1f,0x72,0x72, -0x7f,0x1a,0xd4,0x14,0x52,0xd7,0xeb,0x70,0x84,0x69,0xc5,0x46,0x2a,0xc9,0x1f,0x4e, -0x92,0x4a,0xc8,0xc7,0xf1,0x4f,0x8a,0x6c,0x7c,0x21,0xa5,0x9d,0x43,0x51,0x76,0x4b, -0x60,0xe9,0x19,0x28,0xbb,0x8e,0x58,0xe3,0xa7,0xb7,0x5e,0x39,0xc0,0xa9,0x74,0x3f, -0x12,0x69,0x9e,0x23,0xb5,0x17,0x1a,0x6d,0xf4,0x37,0x91,0x11,0x92,0x62,0x6c,0x95, -0xfa,0x8e,0xa0,0xfb,0x1a,0xf1,0xdf,0xda,0x5f,0x5d,0xf9,0x74,0x8d,0x1d,0x1b,0xae, -0xeb,0xa9,0x00,0x3f,0xf0,0x15,0xff,0x00,0xd9,0xab,0xc4,0x2c,0xaf,0xee,0x74,0xeb, -0x85,0x9e,0xd2,0xe2,0x5b,0x69,0xd7,0xee,0xc9,0x0b,0x94,0x61,0xf8,0x8a,0xf8,0xec, -0x77,0x10,0x3c,0x16,0x32,0x54,0x79,0x79,0xa2,0xad,0xeb,0x73,0xcb,0xad,0x8d,0xf6, -0x55,0x5c,0x6d,0x74,0x7d,0xc7,0x9a,0x5a,0xf9,0x63,0x44,0xf8,0xf1,0xe2,0xbd,0x1c, -0x2a,0x4d,0x71,0x16,0xa7,0x10,0xfe,0x1b,0xa8,0xf2,0xd8,0xff,0x00,0x79,0x70,0x7f, -0x3c,0xd7,0x6f,0xa6,0x7e,0xd3,0x36,0xcc,0x48,0xd4,0x34,0x39,0xa2,0x03,0xf8,0xad, -0xa6,0x0f,0x93,0xf4,0x60,0xbf,0xce,0xbb,0xe8,0xf1,0x0e,0x06,0xaa,0xf7,0xa4,0xe2, -0xfc,0xd7,0xf9,0x5c,0xda,0x18,0xea,0x32,0xdd,0xd8,0xf6,0xfc,0xd1,0x9a,0xf3,0x1b, -0x0f,0xda,0x1f,0xc2,0xb7,0x6a,0x0c,0xdf,0x6d,0xb1,0x3e,0x93,0x41,0x9f,0xfd,0x00, -0xb5,0x5f,0x5f,0x8e,0xbe,0x0b,0x23,0xfe,0x42,0xce,0x3e,0xb6,0xb2,0xff,0x00,0xf1, -0x35,0xe9,0x47,0x33,0xc1,0x4b,0x6a,0xb1,0xfb,0xcd,0xd6,0x22,0x93,0xda,0x48,0xef, -0xe9,0x1d,0x82,0xa1,0x24,0x80,0x31,0xce,0x6b,0xcd,0xaf,0xff,0x00,0x68,0x1f,0x09, -0x5a,0xc2,0xcd,0x0c,0xd7,0x37,0xcc,0x3f,0x82,0x1b,0x76,0x52,0x7f,0xef,0xbd,0xa3, -0xf5,0xaf,0x35,0xf1,0xe7,0xc7,0xab,0xef,0x12,0x5a,0x4d,0xa7,0xe9,0x36,0xe7,0x4c, -0xb2,0x94,0x15,0x92,0x56,0x6c,0xcc,0xeb,0xe9,0xc7,0x0b,0xef,0x8c,0xfd,0x6b,0x93, -0x13,0x9d,0xe0,0xa8,0x41,0xb5,0x35,0x27,0xd9,0x6a,0x67,0x53,0x17,0x4a,0x0a,0xf7, -0xb9,0xe7,0xbe,0x28,0x96,0x0b,0x8f,0x12,0xea,0xd2,0xda,0xe3,0xec,0xcf,0x77,0x2b, -0x45,0xb7,0xa6,0xd2,0xe4,0x8c,0x7e,0x15,0x97,0x45,0x15,0xf9,0x04,0xe5,0xcf,0x37, -0x2e,0xee,0xe7,0xcb,0xb7,0x77,0x70,0xa2,0x8a,0x2a,0x04,0x75,0xff,0x00,0x08,0xf4, -0xf6,0xd4,0xbe,0x22,0xe8,0x88,0x01,0xc4,0x73,0x79,0xc4,0x8e,0xc1,0x14,0xb7,0xf4, -0xaf,0xae,0xc7,0x4a,0xf0,0x7f,0xd9,0xbf,0xc2,0xac,0x64,0xbe,0xf1,0x04,0xc9,0x85, -0xdb,0xf6,0x6b,0x72,0x47,0x5e,0xee,0x7f,0x40,0x3f,0x3a,0xf7,0x81,0xd2,0xbf,0x57, -0xe1,0xcc,0x3b,0xa3,0x82,0xe7,0x97,0xda,0x77,0xf9,0x74,0x3e,0x93,0x03,0x07,0x1a, -0x57,0x7d,0x45,0xa2,0x8a,0x2b,0xea,0x4f,0x44,0x69,0xaf,0x92,0xff,0x00,0x69,0xfb, -0xbf,0x33,0x5a,0x74,0xce,0x70,0xd5,0xf5,0xab,0x74,0xaf,0x8c,0x7f,0x68,0xdb,0xbf, -0x3b,0xc4,0xb2,0x8c,0xff,0x00,0x19,0xaf,0x99,0xcf,0xdd,0xb0,0xb6,0xee,0xd1,0xe0, -0x67,0x72,0xe5,0xc2,0x48,0xf9,0xcb,0xc7,0x32,0xec,0xd2,0x67,0x3d,0x3e,0x5a,0xfa, -0x47,0xfe,0x09,0x79,0xa6,0x88,0x7e,0x0f,0xf8,0xbb,0x50,0xc7,0xcd,0x77,0xe2,0x39, -0x57,0x38,0xec,0x90,0x42,0x07,0xea,0x4d,0x7c,0xc3,0xf1,0x1e,0x5f,0x2f,0x46,0x9c, -0xe7,0xb1,0xfe,0x55,0xf5,0xff,0x00,0xfc,0x13,0x53,0x4f,0x36,0x9f,0xb3,0x2c,0x17, -0x24,0x63,0xed,0xda,0xcd,0xf5,0xc0,0x3e,0xb8,0x93,0xcb,0xff,0x00,0xda,0x75,0x9e, -0x47,0x1b,0x53,0xb9,0xf1,0xbc,0x27,0x1b,0xe2,0xeb,0xcf,0xc9,0x1f,0x55,0x51,0x45, -0x15,0xf5,0x47,0xea,0x21,0x5f,0x13,0x7e,0xd3,0x3e,0x2f,0x3e,0x27,0xf8,0x9b,0x71, -0x68,0x8e,0x4d,0xa6,0x92,0x9f,0x64,0x41,0xdb,0x7f,0x59,0x0f,0xe7,0x81,0xff,0x00, -0x01,0xaf,0xae,0xbc,0x73,0xe2,0x68,0x7c,0x1d,0xe1,0x2d,0x57,0x59,0x9b,0x1b,0x6c, -0xe0,0x69,0x14,0x1f,0xe2,0x7c,0x61,0x57,0xf1,0x62,0x07,0xe3,0x5f,0x9f,0x28,0x2e, -0x75,0xcd,0x57,0x74,0x8c,0xd3,0x5d,0x5d,0xcc,0x59,0x98,0xf2,0x59,0xd9,0xb2,0x4f, -0xe6,0x6b,0xe4,0xb8,0x83,0x11,0xcb,0x4e,0x34,0x23,0xbb,0xd7,0xfa,0xf9,0x9f,0x1b, -0xc4,0x58,0x87,0xc9,0x0c,0x34,0x77,0x93,0xbb,0xf4,0xff,0x00,0x87,0x3e,0x96,0xfd, -0x92,0x7c,0x1f,0xe4,0xd9,0xdf,0x6b,0xf2,0xa6,0x0c,0x87,0xc9,0x88,0x91,0xdb,0xb9, -0xaf,0xa3,0xeb,0x97,0xf8,0x6f,0xe1,0xa4,0xf0,0x97,0x83,0x74,0xcd,0x39,0x54,0x2b, -0x47,0x10,0x2f,0x8e,0xec,0x7a,0xd7,0x51,0x5e,0xde,0x5d,0x87,0xfa,0xb6,0x1a,0x14, -0xfa,0xf5,0xf5,0x3e,0x8f,0x03,0x87,0x58,0x5c,0x3c,0x29,0x76,0x41,0x5f,0x0c,0x7f, -0xc1,0x5c,0xbe,0x35,0x9f,0x87,0x7f,0xb3,0xbc,0x3e,0x0f,0xb2,0x9b,0xcb,0xd5,0x3c, -0x65,0x75,0xf6,0x56,0xda,0xd8,0x65,0xb4,0x88,0xac,0x93,0x1f,0x70,0xc7,0xcb,0x42, -0x3b,0x87,0x6f,0x4a,0xfb,0x9e,0xbf,0x23,0xff,0x00,0xe0,0xb6,0x56,0x5a,0x90,0xf8, -0x89,0xf0,0xd6,0xf2,0x48,0xdc,0xe9,0x07,0x4a,0xb9,0x8a,0x17,0xc7,0xc8,0x26,0x13, -0x29,0x90,0x7d,0x76,0x98,0xff,0x00,0x2a,0xf4,0xd1,0xdc,0xcf,0x86,0xbf,0x67,0xbf, -0x04,0xe9,0xbf,0x12,0x7e,0x39,0x78,0x17,0xc3,0x3a,0xcd,0xe4,0x76,0x1a,0x56,0xa9, -0xac,0x5b,0xdb,0x5d,0x4f,0x2b,0x05,0x51,0x19,0x71,0xb8,0x64,0xf7,0x61,0xf2,0x8f, -0x72,0x2b,0xfa,0x16,0xf8,0xcd,0xf1,0x1b,0x4e,0xf8,0x1d,0xf0,0x6f,0xc5,0x1e,0x2e, -0x9e,0x38,0xe3,0xb4,0xd0,0x34,0xc9,0x27,0x86,0xd9,0x70,0x81,0xdd,0x53,0x11,0x44, -0xbd,0x86,0xe6,0xda,0xa0,0x7b,0xd7,0xf3,0x4e,0xac,0x51,0x83,0x29,0x2a,0xc0,0xe4, -0x11,0xd4,0x57,0x5f,0xaa,0xfc,0x62,0xf1,0xde,0xbb,0xe1,0x97,0xf0,0xee,0xa7,0xe3, -0x2d,0x7b,0x51,0xd0,0x5f,0x6e,0xed,0x32,0xeb,0x52,0x9a,0x5b,0x73,0xb4,0x86,0x5c, -0xc6,0xcc,0x47,0x04,0x02,0x38,0xe3,0x14,0xc8,0x4e,0xc7,0x77,0xe1,0x9f,0xda,0x7f, -0xe3,0xb6,0xb5,0xe2,0xab,0x6b,0x5d,0x23,0xe2,0x6f,0x8b,0x5b,0x55,0xd5,0x2f,0x16, -0x28,0xa1,0x4d,0x5a,0x72,0xad,0x2c,0x8f,0x85,0x01,0x4b,0x60,0x0c,0xb7,0x40,0x31, -0x5f,0xd0,0x5f,0xc3,0xcd,0x07,0x50,0xf0,0xbf,0x81,0x74,0x0d,0x27,0x55,0xd4,0xae, -0x35,0x9d,0x52,0xce,0xc6,0x18,0x6f,0x35,0x0b,0xa9,0x0c,0x92,0x5c,0xcc,0x10,0x79, -0x92,0x33,0x1e,0x4e,0x5b,0x26,0xbf,0x99,0xff,0x00,0x09,0xf8,0xaf,0x55,0xf0,0x37, -0x89,0x34,0xed,0x7f,0x43,0xbc,0x6d,0x3f,0x58,0xd3,0xa7,0x5b,0x9b,0x5b,0xa4,0x55, -0x66,0x8a,0x45,0x39,0x56,0x01,0x81,0x19,0x1e,0xe2,0xbe,0x84,0xd3,0x3f,0xe0,0xa5, -0x1f,0xb4,0x76,0x95,0xf7,0x3e,0x24,0x5c,0x4e,0x3d,0x2e,0xb4,0xfb,0x49,0x7f,0xf4, -0x28,0x8d,0x0c,0x69,0x9f,0xbf,0xd4,0x57,0xe1,0x66,0x99,0xff,0x00,0x05,0x62,0xfd, -0xa1,0xec,0x17,0x12,0xeb,0xda,0x46,0xa1,0xef,0x73,0xa4,0x42,0x3f,0xf4,0x00,0xb5, -0xbf,0x63,0xff,0x00,0x05,0x87,0xf8,0xed,0x6b,0x81,0x35,0x9f,0x84,0xaf,0x3f,0xeb, -0xae,0x99,0x2a,0x9f,0xfc,0x76,0x61,0x4a,0xc5,0x5d,0x1f,0xb6,0x94,0x57,0x86,0xfe, -0xc6,0x7f,0x16,0x3c,0x69,0xf1,0xc7,0xe0,0x3e,0x8b,0xe3,0x8f,0x1c,0x58,0xe9,0xba, -0x6e,0xa3,0xac,0x49,0x2c,0xd6,0xb6,0xfa,0x64,0x4f,0x1c,0x7f,0x66,0x0d,0xb5,0x18, -0x87,0x76,0x39,0x62,0xac,0x7a,0xe3,0x05,0x7f,0x1f,0x4a,0xf8,0xa1,0xe3,0xfd,0x3f, -0xe1,0x67,0xc3,0xbf,0x12,0x78,0xbf,0x54,0x60,0x2c,0x34,0x4b,0x09,0xaf,0xa5,0x05, -0xb1,0xbf,0x62,0x92,0x14,0x7b,0xb1,0xc2,0x8f,0x72,0x29,0x0c,0xea,0x28,0xaf,0xcb, -0xad,0x3b,0xfe,0x0b,0x77,0x64,0x42,0x8b,0xef,0x84,0xd3,0xab,0x77,0xfb,0x3e,0xb8, -0x0f,0xf3,0x80,0x57,0x61,0xa5,0x7f,0xc1,0x6a,0xfe,0x1b,0xcb,0x1e,0x75,0x2f,0x00, -0x78,0xa6,0xd2,0x4f,0xee,0xda,0xbd,0xb4,0xe3,0xf3,0x69,0x13,0xf9,0x53,0xb0,0xae, -0x8f,0xd1,0x5a,0x2b,0xe0,0x5b,0x4f,0xf8,0x2c,0xef,0xc1,0x89,0xb1,0xe7,0x78,0x6b, -0xc6,0xb6,0xe7,0xd3,0xec,0x56,0xad,0xfc,0xae,0x2b,0xab,0xd1,0xbf,0xe0,0xad,0xdf, -0xb3,0xe6,0xa6,0xa0,0xdd,0x6a,0x9a,0xee,0x90,0x7d,0x2f,0x34,0x89,0x1b,0x1f,0xf7, -0xe8,0xbd,0x01,0x74,0x7d,0x9f,0x45,0x7c,0xa7,0x69,0xff,0x00,0x05,0x44,0xfd,0x9b, -0x6e,0x80,0x27,0xe2,0x04,0x90,0x67,0xfe,0x7a,0xe8,0xb7,0xe3,0xf9,0x42,0x6b,0xa6, -0xd2,0xff,0x00,0xe0,0xa0,0xbf,0xb3,0xce,0xae,0x14,0xc3,0xf1,0x4f,0x46,0x8b,0x77, -0x41,0x74,0xb3,0x40,0x7f,0xf1,0xf4,0x14,0x87,0x73,0xe8,0x6a,0x2b,0xc9,0xf4,0xff, -0x00,0xda,0xcb,0xe0,0xb6,0xa8,0xa1,0xad,0xfe,0x2b,0xf8,0x35,0x81,0xec,0xfa,0xe5, -0xba,0x1f,0xc9,0x9c,0x56,0xfd,0x97,0xc7,0x5f,0x86,0xda,0x96,0x3e,0xc9,0xf1,0x07, -0xc2,0xd7,0x39,0xe9,0xe5,0x6b,0x56,0xcd,0x9f,0xc9,0xe8,0x03,0xb4,0x9a,0x08,0xe7, -0x52,0x92,0x22,0xc8,0x87,0xaa,0xb0,0xc8,0x3f,0x85,0x50,0x9f,0xc3,0x3a,0x3d,0xcf, -0xfa,0xed,0x2e,0xce,0x5f,0xf7,0xed,0xd0,0xff,0x00,0x4a,0x76,0x9f,0xe2,0x4d,0x27, -0x56,0x8c,0x49,0x63,0xa9,0xd9,0x5e,0xc6,0x79,0x0d,0x6f,0x70,0x92,0x03,0xf9,0x13, -0x5a,0x0a,0xe1,0x86,0x41,0x04,0x7a,0x83,0x51,0x28,0x46,0x5f,0x12,0xb8,0x9a,0x4f, -0x74,0x73,0xf3,0x7c,0x3c,0xf0,0xc5,0xc7,0x32,0x78,0x7f,0x4e,0x3f,0xf6,0xea,0x83, -0xfa,0x55,0x49,0x7e,0x15,0x78,0x46,0x51,0xce,0x81,0x66,0xbf,0xee,0x47,0xb7,0xf9, -0x57,0x59,0x9a,0x5a,0xc2,0x58,0x5a,0x12,0xde,0x0b,0xee,0x44,0x3a,0x70,0x7b,0xc5, -0x1c,0x8e,0x9d,0xf0,0xaf,0xc2,0xfa,0x4e,0xa5,0x6f,0x7f,0x65,0xa5,0xad,0xbd,0xd4, -0x0d,0xba,0x37,0x49,0x5f,0x83,0xd3,0xa6,0x71,0x5d,0x68,0xeb,0x4b,0x45,0x69,0x4e, -0x8d,0x3a,0x2a,0xd4,0xe2,0x92,0xf2,0x2a,0x31,0x8c,0x34,0x8a,0xb0,0x51,0x45,0x15, -0xb1,0x42,0x1a,0xe2,0x7e,0x28,0x7c,0x3c,0x9b,0xe2,0x1d,0x85,0x9d,0xaa,0x6a,0x22, -0xc2,0x3b,0x79,0x0c,0xa5,0x4c,0x3e,0x66,0xf6,0xc6,0x07,0xf1,0x0c,0x63,0x27,0xd7, -0xad,0x76,0xf4,0x56,0x15,0xe8,0x43,0x13,0x4d,0xd2,0xa8,0xaf,0x17,0xb9,0x13,0x82, -0xa9,0x17,0x19,0x6c,0x7c,0xf5,0x37,0xec,0xcd,0xaa,0x2e,0x7c,0x9d,0x66,0xd1,0xff, -0x00,0xdf,0x8d,0x97,0xfc,0x6a,0x93,0xfe,0xcd,0xbe,0x23,0x19,0xd9,0x7d,0xa6,0xb7, -0xd6,0x49,0x07,0xfe,0xc9,0x5f,0x49,0x51,0x5e,0x0b,0xe1,0xdc,0xbd,0xfd,0x97,0xf7, -0xb3,0x8d,0xe0,0x68,0xbe,0x9f,0x89,0xf3,0x1c,0xff,0x00,0xb3,0xbf,0x8a,0xa2,0x52, -0x55,0xf4,0xf9,0x88,0xfe,0x14,0x9c,0x8f,0xe6,0xa2,0xbb,0x0f,0x83,0x7f,0x0a,0xb5, -0x8f,0x0a,0x78,0x9a,0x7d,0x4b,0x57,0x82,0x38,0x55,0x20,0x31,0xc3,0xb6,0x45,0x7d, -0xcc,0xc4,0x64,0xf0,0x78,0xc0,0x18,0xfc,0x6b,0xdb,0x28,0xaa,0xa1,0x90,0xe1,0x30, -0xd5,0x63,0x5a,0x17,0xbc,0x7c,0xc2,0x18,0x2a,0x54,0xe4,0xa4,0xaf,0xa0,0x51,0x45, -0x15,0xf4,0x67,0x78,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x87,0x9a,0xf2,0xef, -0x88,0x7f,0x03,0xac,0x3c,0x55,0x24,0x97,0xda,0x63,0xa6,0x9b,0xa9,0xb6,0x59,0xb8, -0xfd,0xd4,0xc7,0xd5,0x80,0xe8,0x7d,0xc7,0xe4,0x6b,0xd4,0xa8,0xae,0x4c,0x4e,0x16, -0x8e,0x2e,0x1e,0xce,0xb4,0x6e,0x8c,0xea,0x53,0x8d,0x55,0xcb,0x35,0x73,0xe3,0x1f, -0x13,0x78,0x1f,0x5b,0xf0,0x84,0xc5,0x35,0x4b,0x09,0x20,0x8f,0x38,0x13,0xaf,0xcd, -0x13,0x7d,0x18,0x71,0xf8,0x75,0xf6,0xac,0x2a,0xfb,0x9e,0x68,0x52,0x78,0xca,0x48, -0xaa,0xe8,0x78,0x2a,0xc3,0x20,0xd7,0x15,0xae,0x7c,0x18,0xf0,0x9e,0xb8,0x59,0xdf, -0x4d,0x5b,0x49,0x4f,0xfc,0xb4,0xb3,0x6f,0x2b,0xf4,0x1f,0x2f,0xe9,0x5f,0x0f,0x8a, -0xe1,0x79,0x5e,0xf8,0x69,0xfc,0x9f,0xf9,0xa3,0xc7,0xa9,0x97,0x3d,0xe9,0xbf,0xbc, -0xf9,0x36,0x8a,0xf7,0xed,0x43,0xf6,0x65,0xb2,0x91,0x89,0xb0,0xd6,0xe7,0x85,0x7b, -0x2d,0xc4,0x2b,0x27,0xea,0x0a,0xd6,0x0d,0xcf,0xec,0xd5,0xad,0x23,0x91,0x06,0xa9, -0x63,0x2a,0xf6,0x32,0x07,0x43,0xfa,0x03,0x5e,0x0c,0xf2,0x2c,0xc2,0x0f,0xf8,0x77, -0xf4,0x68,0xe3,0x78,0x3a,0xeb,0xec,0x9e,0x3f,0x45,0x7a,0xb1,0xfd,0x9b,0xfc,0x4b, -0xda,0xf7,0x4b,0x3f,0xf6,0xd6,0x4f,0xfe,0x22,0x9e,0x9f,0xb3,0x6f,0x88,0xc9,0xf9, -0xef,0xb4,0xd5,0x1e,0xd2,0x48,0x7f,0xf6,0x4a,0xc1,0x64,0xf8,0xf7,0xff,0x00,0x2e, -0x99,0x1f,0x55,0xad,0xfc,0xac,0xf2,0x6a,0x2b,0xdb,0x74,0xff,0x00,0xd9,0x9a,0xe9, -0xb9,0xbd,0xd7,0x22,0x8f,0xd5,0x60,0xb7,0x2f,0xfa,0x92,0x3f,0x95,0x75,0x9a,0x3f, -0xec,0xf3,0xe1,0x9b,0x0c,0x35,0xdb,0x5d,0x6a,0x4c,0x3b,0x4b,0x26,0xc4,0xfc,0x97, -0x07,0xf5,0xae,0xda,0x5c,0x3d,0x8f,0xa8,0xf5,0x8a,0x8f,0xab,0xff,0x00,0x2b,0x9a, -0xc7,0x03,0x5a,0x5b,0xab,0x1f,0x36,0x59,0xd9,0x5c,0x6a,0x17,0x09,0x05,0xac,0x12, -0xdc,0xcc,0xe7,0x0b,0x1c,0x28,0x59,0x8f,0xd0,0x0a,0xf5,0x5f,0x05,0xfe,0xcf,0x9a, -0x9e,0xaa,0xd1,0xdc,0xeb,0xb2,0x7f,0x66,0x5a,0x13,0x9f,0x21,0x08,0x69,0xd8,0x7e, -0xa1,0x7f,0x1c,0x9f,0x6a,0xf7,0xdd,0x1f,0xc3,0xba,0x6f,0x87,0xe1,0x31,0x69,0xd6, -0x36,0xf6,0x51,0x9e,0xa2,0x18,0xc2,0xe7,0xeb,0xeb,0x5a,0x75,0xf4,0xd8,0x3e,0x19, -0xa3,0x49,0xa9,0xe2,0x25,0xcc,0xfb,0x6c,0xbf,0xcd,0x9e,0x85,0x2c,0xbe,0x31,0xd6, -0xa3,0xb9,0x93,0xe1,0xdf,0x0c,0xe9,0xbe,0x15,0xd3,0xd6,0xcf,0x4c,0xb5,0x4b,0x58, -0x47,0x5d,0xbf,0x79,0xcf,0xab,0x1e,0xa4,0xfd,0x6b,0x54,0x74,0xa5,0xa2,0xbe,0xca, -0x10,0x8d,0x38,0xa8,0xc1,0x59,0x23,0xd5,0x49,0x45,0x59,0x05,0x35,0xba,0x73,0x4e, -0xa8,0x2f,0x56,0x66,0xb5,0x98,0x40,0x50,0x4f,0xb0,0xf9,0x65,0xfe,0xee,0xec,0x71, -0x9f,0x6c,0xd5,0x3d,0x15,0xc6,0x7c,0x99,0xf1,0x6f,0x5d,0xfe,0xdf,0xf1,0xfe,0xab, -0x32,0xb6,0xe8,0xa1,0x93,0xec,0xd1,0xf3,0x9e,0x13,0x83,0x8f,0xab,0x6e,0x3f,0x8d, -0x71,0xd5,0xdd,0x6b,0xff,0x00,0x06,0x7c,0x5b,0xa3,0xb4,0x92,0x35,0x81,0xd4,0x50, -0x1c,0x99,0xac,0xdb,0xcc,0x2d,0xef,0xb7,0xef,0x7e,0x95,0xc5,0xde,0xd9,0x5c,0x69, -0xb3,0x18,0x6e,0xed,0xe5,0xb5,0x98,0x75,0x8e,0x64,0x28,0xdf,0x91,0xe6,0xbf,0x11, -0xc6,0xd2,0xc4,0x2a,0xd3,0xa9,0x5e,0x0d,0x36,0xdb,0xd5,0x1f,0x23,0x5a,0x33,0xe7, -0x72,0x92,0xdc,0x86,0x8a,0x28,0xaf,0x38,0xc0,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a, -0x00,0x28,0xa2,0xae,0xe9,0x5a,0x26,0xa1,0xae,0xcf,0xe4,0xe9,0xd6,0x53,0xde,0xcb, -0xdd,0x60,0x42,0xd8,0xf7,0x38,0xe9,0xf8,0xd5,0x46,0x32,0x9b,0xe5,0x8a,0xbb,0x1a, -0x4d,0xe8,0x8a,0x55,0xd4,0x78,0x03,0xc0,0x17,0xfe,0x3d,0xd5,0xd6,0xde,0xdd,0x5a, -0x2b,0x38,0xc8,0x37,0x17,0x44,0x7c,0xb1,0xaf,0xa0,0xf5,0x63,0xd8,0x7f,0x4a,0xef, -0xbc,0x1b,0xfb,0x3b,0xde,0xdd,0xba,0x5c,0x78,0x86,0x71,0x67,0x00,0xe4,0xda,0x40, -0xc1,0xa4,0x6f,0x62,0xc3,0x81,0xf8,0x67,0xf0,0xaf,0x76,0xd1,0x74,0x5b,0x1f,0x0f, -0xd8,0x47,0x65,0xa7,0xdb,0x25,0xad,0xb4,0x63,0xe5,0x44,0x1f,0xa9,0xf5,0x3e,0xe6, -0xbe,0xc3,0x2c,0xe1,0xfa,0xb5,0xa4,0xaa,0x62,0x97,0x2c,0x7b,0x75,0x7f,0xe4,0x7a, -0x98,0x7c,0x14,0xa4,0xd4,0xaa,0x68,0x83,0x45,0xd1,0xad,0x74,0x0d,0x32,0xdb,0x4f, -0xb2,0x8c,0x45,0x6d,0x02,0x04,0x45,0xf6,0xf5,0x3e,0xa4,0xfa,0xd5,0xe1,0x4b,0x45, -0x7e,0x99,0x18,0xa8,0x25,0x18,0xec,0x8f,0x7d,0x24,0x95,0x90,0x51,0x45,0x15,0x43, -0x1b,0x21,0xdb,0x1b,0x1f,0x40,0x4d,0x7c,0x35,0xf1,0xd6,0xeb,0xcf,0xf1,0x4c,0xbc, -0xe7,0xe6,0x26,0xbe,0xe0,0xbe,0x7f,0x2e,0xce,0x76,0x3d,0x90,0x9f,0xd2,0xbe,0x0b, -0xf8,0xbb,0x38,0x9f,0xc5,0x13,0xfd,0x4f,0xf3,0xaf,0x91,0xe2,0x19,0x5a,0x9d,0x38, -0xf7,0x67,0xcb,0x71,0x0c,0xad,0x86,0xb1,0xe0,0x5f,0x15,0xe7,0xf2,0xb4,0x59,0xb9, -0xec,0x7f,0x95,0x7d,0xeb,0xfb,0x03,0x69,0xbf,0xd9,0xdf,0xb2,0x7f,0x81,0x7d,0x6e, -0x23,0xb8,0xb9,0x38,0xff,0x00,0x6e,0xe2,0x53,0x5f,0x9f,0x7f,0x19,0x26,0x11,0xe8, -0x92,0xf3,0x8f,0x94,0xff,0x00,0x2a,0xfd,0x29,0xfd,0x90,0xec,0x06,0x9b,0xfb,0x31, -0x7c,0x33,0x84,0x2e,0xdc,0xe8,0x76,0xd2,0x90,0x7d,0x5d,0x77,0x9f,0xd5,0xab,0xb3, -0x26,0x56,0xa2,0x78,0x1c,0x1f,0x1b,0xfb,0x79,0xf9,0xa3,0xd7,0xa8,0xa2,0x8a,0xfa, -0x23,0xf4,0x83,0xe7,0x5f,0xda,0xf7,0xc6,0x0d,0x69,0xa2,0xe9,0x5e,0x1c,0x81,0xf0, -0x6f,0x64,0x37,0x37,0x00,0x7f,0x71,0x3e,0xe8,0x3f,0x56,0x39,0xff,0x00,0x80,0xd7, -0x94,0x7e,0xcf,0x3e,0x12,0xff,0x00,0x84,0xa3,0xe2,0x15,0xa3,0x3a,0x6e,0xb7,0xb3, -0xfd,0xfb,0xfa,0x71,0xd2,0xb2,0x7e,0x36,0xf8,0xb1,0xbc,0x65,0xf1,0x33,0x5a,0xbb, -0x0f,0xbe,0xda,0xde,0x53,0x67,0x6f,0xce,0x40,0x48,0xf2,0x38,0xfa,0xb6,0xe3,0xf8, -0xd7,0xd0,0x7f,0xb2,0xb7,0x84,0x46,0x93,0xe1,0x29,0xf5,0x79,0x53,0x13,0xde,0xbe, -0x14,0x91,0xfc,0x03,0xff,0x00,0xaf,0x5f,0x01,0xff,0x00,0x23,0x1c,0xd3,0xfb,0xa9, -0xfe,0x0b,0xfc,0xd9,0xf9,0xfd,0x2f,0xf8,0x52,0xcd,0x5c,0xf7,0x8c,0x7f,0x25,0xff, -0x00,0x04,0xf7,0x30,0x30,0x00,0xe9,0x4b,0x48,0x29,0x6b,0xef,0xcf,0xd0,0x02,0xbc, -0xff,0x00,0xe3,0x67,0xc0,0x9f,0x05,0xfe,0xd0,0x9e,0x0c,0x97,0xc3,0x1e,0x37,0xd1, -0xe3,0xd5,0xb4,0xd2,0xe2,0x58,0x9b,0x71,0x49,0xad,0xe5,0x00,0x81,0x24,0x4e,0x39, -0x46,0xc1,0x23,0x8e,0xa0,0x90,0x72,0x09,0x15,0xe8,0x14,0x50,0x07,0xe6,0x47,0x8d, -0x3f,0xe0,0x89,0xda,0x1d,0xc5,0xc3,0x4b,0xe1,0x5f,0x89,0xb7,0xfa,0x7c,0x1c,0x9f, -0x23,0x57,0xd3,0x92,0xe5,0x87,0xfd,0xb4,0x47,0x8f,0xff,0x00,0x41,0xaf,0xcb,0x8f, -0x1b,0x68,0x56,0x5e,0x17,0xf1,0x86,0xb5,0xa3,0xe9,0xda,0xb4,0x7a,0xf5,0x8e,0x9f, -0x79,0x2d,0xac,0x3a,0x9c,0x31,0x98,0xe3,0xba,0x54,0x72,0xa2,0x55,0x52,0x49,0x0a, -0xd8,0xc8,0xe7,0xa1,0xaf,0xe9,0x9b,0xc6,0x1a,0x1d,0xc7,0x89,0x7c,0x2b,0xac,0x69, -0x16,0x9a,0x94,0xba,0x35,0xcd,0xfd,0x9c,0xb6,0xb1,0xea,0x10,0x20,0x69,0x2d,0x99, -0xd0,0xa8,0x91,0x01,0xe0,0xb2,0xe7,0x23,0x3c,0x64,0x0a,0xfc,0xdd,0xd4,0x3f,0xe0, -0x89,0x1a,0x41,0x95,0x5a,0xc7,0xe2,0x9d,0xea,0xc6,0x18,0x12,0x97,0x3a,0x42,0x31, -0x23,0xb8,0xca,0xca,0x3f,0x95,0x3b,0x92,0xd1,0xf2,0x97,0xc2,0x7f,0xf8,0x26,0x5f, -0xc6,0x3f,0x8c,0xbf,0x0d,0x34,0x4f,0x1b,0xe8,0x03,0x41,0x87,0x4b,0xd5,0xe2,0x69, -0xad,0xed,0xf5,0x0b,0xd7,0x86,0xe3,0x60,0x76,0x50,0xc5,0x7c,0xb2,0x30,0xdb,0x77, -0x0e,0x79,0x04,0x1a,0xd3,0xbc,0xff,0x00,0x82,0x4e,0x7e,0xd1,0x16,0xa4,0x88,0xf4, -0x0d,0x1e,0xe8,0x0e,0xf0,0xeb,0x30,0x8c,0xff,0x00,0xdf,0x44,0x57,0xed,0xff,0x00, -0x85,0x7c,0x35,0x63,0xe0,0xdf,0x0c,0xe9,0x3a,0x06,0x99,0x17,0x91,0xa6,0xe9,0x76, -0x91,0x59,0x5a,0xc5,0x9c,0xec,0x8a,0x34,0x08,0x83,0xf2,0x51,0x5a,0xb4,0x5c,0x2c, -0x8f,0xc0,0x4d,0x47,0xfe,0x09,0xa7,0xfb,0x47,0x69,0xcc,0xc0,0xfc,0x38,0x9a,0xe5, -0x57,0xf8,0xad,0xb5,0x1b,0x47,0x07,0xe9,0xfb,0xdc,0x9a,0xc6,0xd1,0xbf,0x60,0x7f, -0x8e,0xf7,0xde,0x25,0xd3,0x34,0xbb,0xcf,0x86,0x7e,0x20,0xb0,0x86,0xea,0xee,0x2b, -0x79,0x6f,0x5e,0xd7,0x74,0x50,0x2b,0x38,0x53,0x23,0x32,0x92,0x02,0xa8,0x39,0x27, -0x3d,0x05,0x7f,0x42,0x78,0xa0,0x80,0x7b,0x51,0x70,0xe5,0x46,0x2f,0x82,0xfc,0x29, -0x63,0xe0,0x5f,0x07,0x68,0x9e,0x1c,0xd3,0x23,0x58,0xb4,0xfd,0x26,0xce,0x1b,0x28, -0x11,0x46,0x00,0x48,0xd0,0x28,0xfd,0x05,0x7c,0x4f,0xff,0x00,0x05,0x7d,0xf8,0xb1, -0x73,0xe1,0x4f,0x80,0x9a,0x6f,0x82,0x34,0xd5,0xb8,0x6b,0xef,0x15,0xde,0xff,0x00, -0xa4,0x98,0x63,0x2c,0xa2,0xce,0xdf,0x6b,0xb8,0x62,0x3a,0x66,0x46,0x84,0x0f,0x50, -0x1b,0xd2,0xbe,0xf3,0xa6,0xb2,0x2b,0x75,0x00,0xfd,0x45,0x22,0x8f,0xe5,0xad,0xa3, -0x64,0x24,0x32,0xb2,0xe3,0xfb,0xc3,0x14,0xd1,0xcf,0x4e,0x6b,0xfa,0x8b,0xbc,0xd1, -0x74,0xfd,0x42,0x33,0x1d,0xd5,0x85,0xb5,0xca,0x1e,0xab,0x34,0x2a,0xe0,0xfe,0x04, -0x57,0x2d,0xab,0xfc,0x11,0xf8,0x77,0xaf,0xa9,0x5d,0x4b,0xc0,0x7e,0x19,0xbf,0x53, -0xd4,0x5c,0xe9,0x16,0xf2,0x67,0xf3,0x4a,0x77,0x23,0x94,0xfe,0x67,0x71,0x9a,0x2b, -0xfa,0x3a,0xba,0xfd,0x90,0x3e,0x07,0x5e,0xe7,0xcd,0xf8,0x43,0xe0,0x9c,0x9e,0xa5, -0x34,0x1b,0x64,0x3f,0x98,0x41,0x5c,0xbe,0xad,0xff,0x00,0x04,0xfb,0xfd,0x9e,0xb5, -0x9c,0xf9,0xdf,0x0b,0x74,0x58,0x73,0xff,0x00,0x3e,0x7e,0x6d,0xbf,0xfe,0x8b,0x75, -0xc5,0x3b,0x87,0x29,0xfc,0xf6,0xd1,0x5f,0xbd,0x17,0x5f,0xf0,0x4b,0x8f,0xd9,0xb2, -0xe9,0xcb,0x0f,0x01,0xcd,0x01,0x3f,0xf3,0xcb,0x5b,0xbe,0x03,0xf2,0xf3,0xab,0x9f, -0xd5,0x3f,0xe0,0x92,0x1f,0xb3,0xed,0xfe,0xef,0xb3,0xe9,0xba,0xf6,0x9b,0x9e,0x9f, -0x66,0xd5,0xdd,0xb1,0xff,0x00,0x7f,0x03,0x51,0x70,0xe5,0x3f,0x0d,0xe8,0xaf,0xd9, -0xab,0xef,0xf8,0x23,0x0f,0xc1,0xdb,0x87,0x63,0x6d,0xe2,0x8f,0x19,0x5a,0x03,0xd1, -0x7e,0xd5,0x6c,0xe0,0x7e,0x70,0x56,0x05,0xff,0x00,0xfc,0x11,0x43,0xc0,0x32,0x03, -0xf6,0x2f,0x88,0x9e,0x24,0xb7,0x3d,0xbe,0xd1,0x6f,0x6f,0x2e,0x3f,0x25,0x5a,0x2e, -0x1c,0xac,0xfc,0x89,0x8a,0xee,0x68,0x71,0xe5,0xcd,0x24,0x78,0xfe,0xeb,0x11,0x5a, -0xf6,0x3e,0x3b,0xf1,0x2e,0x98,0x41,0xb3,0xf1,0x0e,0xab,0x69,0x8e,0x9e,0x45,0xec, -0xa9,0xfc,0x9a,0xbf,0x4c,0x35,0x5f,0xf8,0x22,0x28,0x24,0xff,0x00,0x66,0x7c,0x59, -0xd8,0x3b,0x0b,0xbd,0x13,0x71,0xff,0x00,0xc7,0x67,0x15,0xcd,0xde,0xff,0x00,0xc1, -0x12,0xbc,0x5d,0x19,0x3f,0x64,0xf8,0x9d,0xa2,0x4e,0x3b,0x79,0xda,0x6c,0xd1,0xff, -0x00,0x27,0x6a,0x05,0x66,0x7c,0x2f,0xa6,0xfe,0xd0,0x9f,0x14,0x34,0x62,0x0d,0x8f, -0xc4,0x5f,0x15,0x5a,0xe3,0xa7,0x95,0xac,0xdc,0x2f,0xfe,0xcf,0x5d,0x56,0x9f,0xfb, -0x6a,0xfc,0x77,0xd2,0xc0,0x16,0xff,0x00,0x15,0xfc,0x53,0x81,0xda,0x5d,0x45,0xe4, -0xff,0x00,0xd0,0xb3,0x5f,0x4c,0x6a,0xdf,0xf0,0x46,0x1f,0x8b,0x96,0xc7,0xfe,0x25, -0xfe,0x2c,0xf0,0x85,0xf0,0xff,0x00,0xa6,0xb3,0x5c,0xc2,0x7f,0xf4,0x4b,0x57,0x29, -0x7d,0xff,0x00,0x04,0x87,0xf8,0xfd,0x68,0x48,0x8a,0x1f,0x0d,0x5e,0x81,0xde,0x1d, -0x57,0x19,0xff,0x00,0xbe,0xd1,0x68,0x1d,0x99,0xe6,0x56,0x1f,0xf0,0x50,0xcf,0xda, -0x23,0x4f,0x60,0x53,0xe2,0x86,0xab,0x28,0x1d,0xae,0x22,0x82,0x5f,0xfd,0x0a,0x33, -0x5d,0x4e,0x9b,0xff,0x00,0x05,0x4c,0xfd,0xa3,0x34,0xec,0x67,0xc6,0x36,0x97,0x80, -0x76,0xb9,0xd2,0x2d,0x9b,0x3f,0x92,0x03,0x4b,0xa9,0xff,0x00,0xc1,0x2c,0x7f,0x68, -0xdd,0x3c,0x9d,0x9e,0x0d,0xb4,0xbd,0x03,0xbd,0xb6,0xb1,0x68,0x73,0xf8,0x34,0x8a, -0x6b,0x8d,0xbf,0xff,0x00,0x82,0x7f,0xfe,0xd0,0xba,0x73,0xb2,0xc9,0xf0,0xb3,0x5a, -0x93,0x6f,0x7b,0x7f,0x2a,0x50,0x7e,0x9b,0x5c,0xe6,0x8d,0x03,0x53,0xd5,0xac,0x7f, -0xe0,0xaf,0x7f,0x1f,0x6d,0x14,0x09,0x64,0xf0,0xcd,0xe7,0xfb,0x53,0x69,0x44,0x1f, -0xfc,0x72,0x45,0xae,0x9f,0x4b,0xff,0x00,0x82,0xce,0xfc,0x5e,0xb4,0x50,0x2f,0x7c, -0x2f,0xe1,0x1b,0xff,0x00,0x53,0xf6,0x7b,0x88,0xcf,0xe9,0x35,0x7c,0xc5,0x7b,0xfb, -0x1b,0xfc,0x73,0xd3,0xf7,0x79,0xff,0x00,0x09,0xbc,0x5c,0x02,0x8c,0x92,0x9a,0x4c, -0xce,0x07,0xe2,0xaa,0x6b,0x90,0xd4,0x7e,0x0a,0xfc,0x42,0xd1,0xd9,0x96,0xfb,0xc0, -0x9e,0x25,0xb4,0x2b,0xf7,0xbc,0xed,0x22,0xe1,0x71,0xf9,0xa5,0x1a,0x05,0xd9,0xf7, -0xa6,0x9f,0xff,0x00,0x05,0xb3,0xf1,0x7c,0x48,0x3e,0xdd,0xf0,0xcb,0x44,0xb8,0x7f, -0x5b,0x7d,0x46,0x68,0x87,0xe4,0x55,0xab,0x7f,0x4f,0xff,0x00,0x82,0xdd,0xce,0x31, -0xf6,0xef,0x84,0x91,0xb7,0xa9,0xb7,0xd7,0x88,0xfd,0x0c,0x06,0xbf,0x32,0xee,0x7c, -0x31,0xac,0x59,0x92,0x27,0xd2,0xaf,0x61,0x23,0xaf,0x99,0x6c,0xeb,0x8f,0xcc,0x56, -0x73,0xa1,0x8d,0xb6,0xb0,0x2a,0xde,0x87,0x8a,0x34,0x0b,0xb3,0xf5,0xc7,0x4a,0xff, -0x00,0x82,0xd8,0xf8,0x36,0x54,0xce,0xa5,0xf0,0xd7,0x5d,0xb6,0x6e,0xe2,0xd2,0xfa, -0x19,0x87,0xfe,0x3c,0x12,0xba,0x0b,0x2f,0xf8,0x2d,0x17,0xc2,0x59,0x71,0xf6,0x9f, -0x06,0xf8,0xc6,0xdc,0xfa,0xa4,0x36,0xae,0x3f,0xf4,0x78,0xaf,0xc6,0xdc,0xe7,0xbd, -0x18,0x34,0x58,0x2e,0xcf,0xdb,0xbd,0x37,0xfe,0x0a,0xfd,0xf0,0x16,0xf5,0x03,0x5c, -0x7f,0xc2,0x4d,0x60,0x4f,0x69,0xb4,0xb0,0xf8,0xff,0x00,0xbe,0x24,0x6a,0xe9,0xec, -0xbf,0xe0,0xaa,0x5f,0xb3,0x75,0xdc,0x41,0xe4,0xf1,0xb5,0xdd,0xa3,0x1f,0xe0,0x9b, -0x44,0xbd,0x24,0x7e,0x2b,0x11,0x1f,0xad,0x7e,0x0e,0xe2,0x8a,0x2c,0x1c,0xc7,0xf4, -0x01,0x63,0xff,0x00,0x05,0x23,0xfd,0x9c,0x6f,0xc0,0xd9,0xf1,0x32,0xce,0x2c,0xf6, -0x9e,0xc6,0xee,0x3f,0xfd,0x0a,0x21,0x5d,0x6e,0x99,0xfb,0x6a,0xfc,0x06,0xd5,0xe3, -0x0f,0x07,0xc5,0xcf,0x08,0xc6,0x0f,0x6b,0xad,0x56,0x2b,0x73,0xf9,0x48,0x54,0xd7, -0xf3,0xa5,0x9a,0x29,0x58,0x39,0x8f,0xe9,0x32,0xcf,0xf6,0x9c,0xf8,0x3f,0xa8,0x15, -0x16,0xdf,0x15,0x3c,0x17,0x39,0x6e,0x82,0x3f,0x10,0x5a,0x1c,0xff,0x00,0xe4,0x4a, -0xeb,0xb4,0xdf,0x1f,0x78,0x63,0x59,0x50,0xd6,0x1e,0x22,0xd2,0x6f,0x94,0xf2,0x0d, -0xb5,0xf4,0x52,0x03,0xf9,0x31,0xaf,0xe6,0x16,0x9c,0xb2,0x32,0x10,0x55,0x8a,0x91, -0xdc,0x1a,0x2c,0x1c,0xc7,0xf5,0x25,0x14,0xf1,0xcc,0x9b,0xe3,0x75,0x75,0xf5,0x52, -0x08,0xa7,0xe6,0xbf,0x97,0x8b,0x7f,0x10,0xea,0xb6,0x98,0xf2,0x35,0x3b,0xc8,0x71, -0xd3,0xcb,0xb8,0x75,0xc7,0xe4,0x6b,0x7b,0x4f,0xf8,0xc3,0xe3,0xcd,0x2b,0x1f,0x62, -0xf1,0xb7,0x88,0xad,0x31,0xd3,0xc9,0xd5,0x67,0x4c,0x7e,0x4f,0x45,0x87,0xcc,0x7f, -0x4d,0x39,0xa5,0xaf,0xe7,0x07,0x4e,0xfd,0xae,0x3e,0x35,0xe9,0x48,0xa9,0x69,0xf1, -0x5b,0xc5,0xf0,0xa2,0xf0,0x17,0xfb,0x66,0x72,0x3f,0x22,0xd5,0xd1,0xe9,0xff,0x00, -0xb7,0xbf,0xed,0x07,0xa6,0xe3,0xca,0xf8,0xab,0xaf,0xc9,0x8e,0xd7,0x12,0x24,0xdf, -0xfa,0x1a,0x9a,0x2c,0x1c,0xc8,0xfe,0x86,0xe8,0xaf,0xc0,0xed,0x33,0xfe,0x0a,0x75, -0xfb,0x46,0xe9,0x7d,0x3c,0x7c,0x2e,0x87,0xa5,0xd6,0x99,0x69,0x27,0xf3,0x8f,0x35, -0xd2,0xd9,0x7f,0xc1,0x5b,0x3f,0x68,0x4b,0x5c,0x79,0xba,0xae,0x85,0x79,0xff,0x00, -0x5d,0xb4,0x88,0xc6,0x7f,0xef,0x82,0xb4,0x58,0x77,0x47,0xee,0x65,0x15,0xf8,0xa9, -0xa6,0xff,0x00,0xc1,0x63,0xbe,0x37,0x5a,0x11,0xf6,0xad,0x2f,0xc2,0x77,0xc3,0xbe, -0xeb,0x09,0x90,0xff,0x00,0xe3,0xb3,0x0a,0xea,0xf4,0xff,0x00,0xf8,0x2d,0x67,0xc4, -0x28,0x71,0xf6,0xdf,0x87,0xfe,0x1b,0xb9,0xff,0x00,0xae,0x33,0xdc,0x45,0xfc,0xd9, -0xa8,0xb0,0x5d,0x1f,0xb0,0x14,0x57,0xe4,0xf5,0x8f,0xfc,0x16,0xe7,0x5b,0x56,0x1f, -0x6c,0xf8,0x51,0x60,0xeb,0xdc,0xc1,0xad,0x3a,0x9f,0xd6,0x13,0x5d,0x66,0x99,0xff, -0x00,0x05,0xb7,0xd0,0x5d,0x07,0xf6,0x8f,0xc2,0xdd,0x4a,0x27,0xef,0xf6,0x5d,0x56, -0x37,0x1f,0xf8,0xf4,0x62,0x8b,0x05,0xd1,0xfa,0x6b,0x45,0x7e,0x77,0xd8,0xff,0x00, -0xc1,0x6a,0x7e,0x18,0xc8,0x83,0xed,0x7e,0x06,0xf1,0x6c,0x12,0x1e,0xa2,0x1f,0xb2, -0xc8,0x07,0xe2,0x65,0x5f,0xe5,0x5d,0x16,0x9b,0xff,0x00,0x05,0x8e,0xf8,0x23,0x76, -0x07,0xda,0x74,0xaf,0x17,0x58,0x9e,0xfb,0xec,0x21,0x7c,0x7f,0xdf,0x33,0x1a,0x56, -0x0b,0xa3,0xee,0xea,0x2b,0xe3,0xdd,0x33,0xfe,0x0a,0xbd,0xfb,0x3a,0xdf,0x45,0xbe, -0x7f,0x12,0x6a,0xba,0x71,0xfe,0xe5,0xce,0x8d,0x72,0xc7,0xff,0x00,0x21,0xab,0x0a, -0xdd,0xb2,0xff,0x00,0x82,0x9c,0x7e,0xcd,0xd7,0xcc,0x14,0x7c,0x43,0x10,0x93,0xff, -0x00,0x3d,0xb4,0xab,0xd4,0xfe,0x70,0xd0,0x3b,0x9f,0x52,0xd1,0x5e,0x13,0xa6,0xfe, -0xdd,0x5f,0x00,0x35,0x58,0x95,0xe2,0xf8,0xb1,0xe1,0xa8,0x81,0xed,0x75,0x77,0xe4, -0x1f,0xc9,0xc0,0x35,0xbd,0x6b,0xfb,0x59,0x7c,0x14,0xbd,0x0a,0x61,0xf8,0xb5,0xe0, -0xa6,0xdd,0xd0,0x1d,0x7e,0xd4,0x13,0xf8,0x17,0xa0,0x0f,0x58,0xa2,0xb8,0xed,0x33, -0xe3,0x27,0x80,0xb5,0xa4,0x56,0xd3,0xfc,0x6d,0xe1,0xdb,0xd5,0x6e,0x86,0xdf,0x55, -0x81,0xf3,0xf9,0x3d,0x74,0xd6,0x9a,0xb5,0x8d,0xfc,0x61,0xed,0xaf,0x2d,0xee,0x10, -0xf4,0x68,0xa5,0x56,0x07,0xf1,0x06,0x80,0x2d,0xd4,0x17,0x56,0x70,0x5e,0x46,0x63, -0x9e,0x08,0xe7,0x8c,0xf5,0x59,0x14,0x30,0x3f,0x81,0xa9,0x43,0x82,0x32,0x0e,0x7e, -0x94,0xb9,0xa4,0xd2,0x6a,0xcc,0x37,0x39,0x4b,0xff,0x00,0x85,0x9e,0x14,0xd4,0x41, -0x12,0xe8,0x56,0x6a,0x4f,0x56,0x85,0x3c,0xa3,0xf9,0xae,0x2b,0x02,0xf3,0xf6,0x7d, -0xf0,0x95,0xc6,0x7c,0xb8,0x6e,0xad,0x73,0xff,0x00,0x3c,0xae,0x09,0xff,0x00,0xd0, -0xb3,0x5e,0x95,0x9a,0x2b,0x86,0xa6,0x5f,0x84,0xab,0xf1,0xd2,0x8b,0xf9,0x23,0x07, -0x42,0x9c,0xb7,0x8a,0x3c,0x7e,0x6f,0xd9,0xa7,0x44,0x63,0xfb,0xad,0x57,0x50,0x4f, -0xf7,0xbc,0xb6,0xff,0x00,0xd9,0x45,0x56,0x6f,0xd9,0x9b,0x4f,0xcf,0xcb,0xad,0x5c, -0x8f,0xac,0x4a,0x7f,0xad,0x7b,0x55,0x26,0x2b,0x8d,0xe4,0xb9,0x7b,0xff,0x00,0x97, -0x4b,0xf1,0xff,0x00,0x33,0x3f,0xaa,0x50,0xfe,0x53,0xc6,0x13,0xf6,0x66,0xd3,0x54, -0xfc,0xda,0xcd,0xd1,0xff,0x00,0x76,0x35,0x15,0x7e,0xd3,0xf6,0x70,0xf0,0xdc,0x0c, -0x0c,0xd7,0x7a,0x85,0xcf,0xb3,0x48,0x8a,0x3f,0x45,0xaf,0x58,0xc5,0x2d,0x38,0xe4, -0xd8,0x08,0xed,0x49,0x02,0xc2,0xd1,0x5f,0x64,0xe2,0x74,0xcf,0x83,0x7e,0x11,0xd2, -0x88,0x29,0xa3,0xc5,0x3b,0x7a,0xdc,0xb3,0x4b,0xfa,0x31,0x22,0xba,0xfb,0x4b,0x2b, -0x7b,0x08,0x56,0x1b,0x68,0x23,0x82,0x25,0xe0,0x24,0x48,0x14,0x0f,0xc0,0x54,0xf4, -0x57,0xa5,0x4b,0x0f,0x46,0x82,0xb5,0x28,0x25,0xe8,0x8e,0x88,0xc2,0x30,0xf8,0x55, -0x82,0x8a,0x28,0xae,0x82,0xc2,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0c,0xef,0x10, -0xcb,0xe4,0xe8,0x97,0xaf,0xe9,0x13,0x7f,0x2a,0xf8,0x0b,0xe2,0x14,0xe6,0x7f,0x11, -0x5d,0x31,0xe7,0xe6,0x35,0xf7,0x7f,0x8e,0x66,0xf2,0x3c,0x2d,0xa8,0x36,0x71,0xfb, -0xb2,0x2b,0xe0,0x2f,0x18,0x4b,0xe6,0xeb,0x37,0x6d,0xfe,0xd1,0xaf,0x88,0xe2,0x29, -0x7b,0xf4,0xa3,0xea,0x7c,0x67,0x12,0x4a,0xd4,0xa2,0x8f,0x00,0xf8,0xed,0x75,0xe5, -0x68,0x93,0x8c,0xf4,0x42,0x7f,0x4a,0xfd,0x6a,0xf8,0x37,0xa6,0xff,0x00,0x63,0x7c, -0x24,0xf0,0x55,0x81,0x50,0x86,0xdb,0x45,0xb3,0x88,0xa8,0x18,0xc1,0x10,0xa0,0xaf, -0xc8,0x7f,0x8e,0xbf,0xe9,0x36,0x82,0xd8,0x13,0x99,0x59,0x63,0xe3,0xfd,0xa3,0x8f, -0xeb,0x5f,0xb3,0x7a,0x25,0xa8,0xb1,0xd1,0xec,0x6d,0x87,0x48,0x60,0x8e,0x31,0xf8, -0x28,0x1f,0xd2,0xbd,0xcc,0xa9,0x5a,0x82,0x38,0xf8,0x3e,0x3f,0xec,0xd5,0x27,0xde, -0x45,0xea,0x28,0xa2,0xbd,0xb3,0xef,0xcf,0xcd,0xfd,0x0b,0x4e,0x93,0xc4,0x1e,0x25, -0x8e,0xce,0x20,0x5a,0x4b,0x8b,0x92,0xbf,0x9b,0x1a,0xfd,0x0a,0xf0,0xbe,0x8b,0x17, -0x87,0xb4,0x1b,0x1d,0x3a,0x15,0xc2,0x41,0x12,0xa7,0xe3,0x8e,0x6b,0xe1,0x7f,0x80, -0x9a,0xce,0x9f,0xa2,0x7c,0x4f,0x67,0xd6,0x07,0x96,0x6c,0xae,0x65,0x88,0xa3,0x8e, -0x56,0x40,0xe4,0x73,0x9f,0xa5,0x7d,0xb5,0x6f,0xf1,0x0b,0x40,0xb8,0x50,0x57,0x51, -0x8b,0xf1,0x35,0xf2,0x19,0x34,0x29,0xd1,0x9d,0x59,0xce,0x49,0x4a,0xf6,0xf9,0x1f, -0x11,0xc3,0x2a,0x9a,0xc3,0xca,0xa4,0x9f,0xbc,0xdd,0xbe,0xe3,0xa4,0xa2,0xb1,0xe3, -0xf1,0x6e,0x91,0x2f,0xdd,0xbf,0x84,0xff,0x00,0xc0,0xaa,0xd2,0x6b,0x76,0x12,0x7d, -0xdb,0xc8,0x4f,0xfc,0x0c,0x57,0xd5,0xaa,0x90,0x7b,0x34,0x7d,0xaa,0x94,0x5f,0x52, -0xf5,0x23,0x67,0x1c,0x75,0xf7,0xa8,0x12,0xf6,0xde,0x5f,0xb9,0x3c,0x6d,0xf4,0x61, -0x52,0x89,0x50,0xf4,0x70,0x7f,0x1a,0xbb,0xa6,0x3b,0x8e,0x19,0xc0,0xc8,0xe6,0x8a, -0x40,0xd9,0x1d,0x69,0x73,0x4c,0x62,0xd1,0x49,0x45,0x00,0x2d,0x14,0x51,0x40,0x05, -0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x09,0x8a,0x5a,0x28,0xa0, -0x02,0x8a,0x28,0xa0,0x02,0x92,0x96,0x8a,0x00,0x4c,0x0f,0x4a,0x31,0x4b,0x45,0x00, -0x25,0x2d,0x14,0x50,0x01,0x45,0x14,0x50,0x03,0x1e,0x24,0x91,0x4a,0xba,0x2b,0x29, -0xea,0x08,0xc8,0xac,0x4d,0x5b,0xc0,0x5e,0x19,0xd7,0xa2,0x31,0xea,0x7e,0x1d,0xd2, -0x75,0x18,0xcf,0x54,0xba,0xb1,0x8a,0x50,0x7f,0x06,0x53,0x5b,0xd4,0x50,0x07,0x98, -0xdf,0x7e,0xcb,0xdf,0x07,0x35,0x26,0x66,0xba,0xf8,0x51,0xe0,0xa9,0xd9,0xba,0xb3, -0xf8,0x7e,0xd0,0x93,0xf8,0xf9,0x75,0x85,0xa9,0xfe,0xc5,0x1f,0x01,0xb5,0x58,0xca, -0x4d,0xf0,0x8f,0xc2,0x31,0x8f,0x5b,0x6d,0x2a,0x28,0x0f,0xe7,0x18,0x53,0x5e,0xd7, -0x45,0x00,0x7c,0xcb,0xa9,0x7f,0xc1,0x35,0xff,0x00,0x67,0x0d,0x53,0x3e,0x67,0xc3, -0x4b,0x58,0x49,0xef,0x6d,0xa8,0x5d,0xc3,0xff,0x00,0xa0,0xca,0x2b,0x9e,0xbe,0xff, -0x00,0x82,0x54,0x7e,0xce,0x37,0x6b,0x88,0xbc,0x21,0x7f,0x64,0x7f,0xbd,0x06,0xb7, -0x78,0x4f,0xfe,0x3f,0x23,0x57,0xd7,0x74,0x50,0x16,0x3e,0x1b,0xd6,0x3f,0xe0,0x8f, -0x5f,0x02,0xb5,0x01,0xfe,0x89,0x71,0xe2,0x9d,0x2c,0xff,0x00,0xd3,0xbe,0xa4,0x8f, -0xff,0x00,0xa3,0x23,0x6a,0xe5,0xae,0xbf,0xe0,0x8a,0xff,0x00,0x0b,0x1c,0x9f,0xb3, -0xf8,0xe3,0xc6,0x10,0xe7,0xa7,0x98,0xd6,0xaf,0x8f,0xca,0x11,0x5f,0xa1,0xb4,0x50, -0x2b,0x23,0xf3,0x37,0x55,0xff,0x00,0x82,0x25,0x78,0x72,0x40,0xdf,0xd9,0x9f,0x14, -0x35,0x4b,0x73,0xdb,0xed,0x7a,0x5c,0x72,0xe3,0xfe,0xf9,0x75,0xae,0x4e,0xef,0xfe, -0x08,0x8b,0xab,0xab,0x1f,0xb2,0xfc,0x59,0xb1,0x91,0x7b,0x09,0xb4,0x37,0x53,0xf8, -0xe2,0x73,0x5f,0xab,0xd4,0x50,0x16,0x47,0xe4,0x0e,0xa5,0xff,0x00,0x04,0x51,0xf8, -0x81,0x10,0x3f,0x60,0xf8,0x85,0xe1,0xbb,0xa3,0xdb,0xcf,0xb7,0x9e,0x1c,0xfe,0x41, -0xab,0x8f,0xd4,0xff,0x00,0xe0,0x8e,0x7f,0x1c,0x2d,0x1b,0x16,0xba,0x97,0x84,0xaf, -0xc7,0xaa,0xea,0x12,0xa7,0xe8,0xd0,0xd7,0xed,0x6d,0x18,0xa7,0x70,0xb2,0x3f,0x0c, -0x35,0x0f,0xf8,0x24,0xc7,0xed,0x0d,0x65,0x9f,0x2b,0x45,0xd1,0x6f,0xb1,0xff,0x00, -0x3e,0xfa,0xc4,0x43,0x3f,0xf7,0xde,0xda,0xe5,0x35,0x6f,0xf8,0x26,0x9f,0xed,0x1d, -0xa4,0xb1,0x07,0xe1,0xcc,0xd7,0x60,0x75,0x6b,0x5d,0x42,0xd2,0x41,0xff,0x00,0xa3, -0x6b,0xf7,0xeb,0x14,0x62,0x8b,0x85,0x91,0xfc,0xf0,0x5e,0xfe,0xc2,0x3f,0xb4,0x05, -0x81,0x22,0x5f,0x85,0x1e,0x22,0x6c,0x7f,0xcf,0x1b,0x71,0x2f,0xfe,0x80,0x4d,0x72, -0xfa,0xa7,0xec,0xb7,0xf1,0x8b,0x46,0x62,0xb7,0x9f,0x0b,0x7c,0x5f,0x16,0x3a,0x91, -0xa2,0x5c,0x38,0x1f,0x8a,0xa1,0x15,0xfd,0x23,0xd1,0x8a,0x2e,0x2b,0x1f,0xcc,0x7d, -0xff,0x00,0xc2,0xef,0x19,0xe9,0x4c,0x56,0xf7,0xc2,0x5a,0xed,0x99,0x1d,0x44,0xfa, -0x6c,0xc9,0x8f,0xcd,0x6b,0x02,0xe7,0x4e,0xbb,0xb3,0x62,0xb3,0xda,0xcd,0x03,0x0e, -0xa2,0x48,0xca,0x91,0xf9,0x8a,0xfe,0xa3,0xf0,0x2a,0xbd,0xc6,0x99,0x67,0x76,0x8c, -0x93,0xda,0xc1,0x32,0xb7,0x05,0x64,0x8c,0x30,0x3f,0x98,0xa2,0xe1,0xca,0x7f,0x2e, -0x18,0xa2,0xbf,0xa6,0x6d,0x43,0xe0,0xc7,0xc3,0xed,0x58,0xb1,0xbe,0xf0,0x2f,0x86, -0xaf,0x0b,0x72,0xc6,0x7d,0x22,0xdd,0xc9,0xfa,0xe5,0x2b,0x9e,0xbd,0xfd,0x95,0xbe, -0x0c,0xea,0x0a,0xcb,0x3f,0xc2,0x8f,0x06,0x3e,0xee,0xa4,0x68,0x36,0xca,0x7f,0x30, -0x80,0xd1,0x71,0x72,0x9f,0xcd,0xd5,0x18,0x3d,0x6b,0xfa,0x1a,0xd5,0x7f,0x60,0x8f, -0xd9,0xf7,0x58,0x56,0x13,0xfc,0x29,0xd0,0x23,0xdd,0xd4,0xda,0xc4,0xd0,0x1f,0xcd, -0x18,0x57,0x23,0x77,0xff,0x00,0x04,0xbb,0xfd,0x9b,0x2e,0xd9,0x9b,0xfe,0x15,0xfc, -0x90,0x33,0x73,0x98,0x75,0xbb,0xf1,0xfa,0x79,0xf8,0x1f,0x95,0x3b,0x87,0x29,0xf8, -0x27,0x45,0x7e,0xe5,0xeb,0x3f,0xf0,0x49,0x4f,0xd9,0xef,0x53,0x8c,0xad,0xae,0x91, -0xad,0xe9,0x07,0xb3,0x5a,0x6b,0x12,0xb9,0x1f,0xf7,0xf7,0x7d,0x71,0xd7,0xbf,0xf0, -0x46,0x0f,0x83,0x73,0xb9,0x6b,0x7f,0x14,0xf8,0xd6,0xdb,0x3f,0xc3,0xf6,0xcb,0x47, -0x03,0xf3,0xb6,0xcf,0xeb,0x45,0xc3,0x94,0xfc,0x65,0xa2,0xbf,0x5f,0xb5,0x5f,0xf8, -0x22,0x97,0xc3,0xc9,0x50,0x0d,0x37,0xe2,0x0f,0x89,0xed,0x5f,0xd6,0xea,0x1b,0x79, -0xc7,0xe4,0xa8,0x95,0xc8,0xea,0x7f,0xf0,0x44,0x58,0x49,0x3f,0xd9,0xdf,0x16,0x9d, -0x7d,0x05,0xd6,0x85,0x9f,0xd5,0x67,0x14,0x5c,0x56,0x67,0xe5,0x7d,0x48,0x97,0x33, -0x45,0xf7,0x25,0x74,0xff,0x00,0x75,0x88,0xaf,0xd2,0x8b,0xef,0xf8,0x22,0x57,0x8a, -0x63,0xcf,0xd8,0xfe,0x28,0xe9,0x13,0xfa,0x79,0xfa,0x54,0xb1,0x67,0xf2,0x91,0xab, -0x95,0xd4,0xff,0x00,0xe0,0x8c,0x1f,0x16,0xad,0xc9,0xfb,0x0f,0x8b,0x3c,0x27,0x7a, -0x07,0x4f,0x32,0x6b,0x88,0x89,0xff,0x00,0xc8,0x46,0x80,0xb3,0x3e,0x19,0xd3,0xfc, -0x77,0xe2,0x5d,0x25,0x95,0xac,0x7c,0x43,0xaa,0xd9,0x95,0xe4,0x1b,0x7b,0xd9,0x13, -0x1f,0x93,0x57,0x63,0xa7,0x7e,0xd3,0xbf,0x17,0xf4,0x95,0x55,0xb3,0xf8,0xa1,0xe2, -0xfb,0x74,0x5e,0x8a,0x9a,0xdd,0xc8,0x03,0xf0,0xdf,0x5f,0x47,0x5e,0x7f,0xc1,0x20, -0x7e,0x3e,0x5b,0x13,0xe5,0x8f,0x0b,0xdd,0x81,0xd3,0xc9,0xd5,0x58,0x67,0xfe,0xfa, -0x8c,0x57,0x35,0xa9,0xff,0x00,0xc1,0x2b,0xff,0x00,0x68,0xcd,0x3c,0x31,0x8f,0xc2, -0x16,0x77,0xd8,0xff,0x00,0x9f,0x5d,0x5e,0xd8,0xe7,0xe9,0xb9,0xd6,0x80,0xd4,0xf3, -0x8b,0x4f,0xdb,0x7b,0xe3,0xdd,0x96,0x3c,0xaf,0x8b,0x3e,0x29,0x38,0xe9,0xe6,0xdf, -0xb4,0x9f,0xfa,0x16,0x6b,0xa5,0xd3,0x7f,0xe0,0xa3,0xbf,0xb4,0x5e,0x99,0x81,0x1f, -0xc4,0xbb,0xd9,0x80,0xed,0x73,0x69,0x6d,0x2e,0x7f,0xef,0xa8,0xcd,0x56,0xbf,0xff, -0x00,0x82,0x78,0x7e,0xd1,0x3a,0x71,0x3e,0x67,0xc2,0xed,0x52,0x4c,0x7f,0xcf,0x09, -0xed,0xe5,0xff,0x00,0xd0,0x64,0x35,0xcd,0x6a,0x5f,0xb1,0x97,0xc7,0x4d,0x28,0x91, -0x71,0xf0,0x9f,0xc5,0x9c,0x75,0x30,0xe9,0x92,0x4a,0x3f,0x34,0x06,0x80,0xd4,0xf5, -0x8b,0x2f,0xf8,0x2a,0xd7,0xed,0x17,0x68,0xa0,0x3f,0x8a,0x34,0xdb,0xac,0x77,0x9f, -0x46,0xb7,0xe7,0xfe,0xf9,0x51,0x5b,0xf6,0x1f,0xf0,0x57,0xff,0x00,0x8f,0x56,0xa4, -0x79,0xeb,0xe1,0x8b,0xc0,0x3a,0xf9,0xba,0x5b,0x29,0x3f,0xf7,0xcc,0x82,0xbe,0x5b, -0xd4,0xfe,0x04,0xfc,0x49,0xd1,0x5c,0xa5,0xf7,0xc3,0xff,0x00,0x14,0x5a,0x30,0xea, -0x25,0xd1,0xee,0x17,0xff,0x00,0x64,0xae,0x7e,0xf3,0xc1,0x5e,0x21,0xd3,0xce,0x2e, -0xb4,0x1d,0x4e,0xd8,0xff,0x00,0xd3,0x6b,0x39,0x13,0xf9,0xad,0x03,0xd4,0xfb,0xcb, -0x4d,0xff,0x00,0x82,0xd2,0xfc,0x51,0xb7,0x50,0x2f,0x7c,0x15,0xe1,0x5b,0xcf,0x52, -0x82,0xe2,0x23,0xff,0x00,0xa3,0x0d,0x74,0x56,0x5f,0xf0,0x5b,0x5f,0x14,0x2e,0x05, -0xdf,0xc3,0x0d,0x22,0x5f,0x53,0x06,0xa7,0x2a,0x7f,0x34,0x35,0xf9,0xab,0x34,0x12, -0xdb,0xb6,0xd9,0x63,0x78,0x9b,0xd1,0xd4,0x83,0x4c,0xa3,0x40,0xbb,0x3f,0x54,0x74, -0xbf,0xf8,0x2d,0xcd,0xbe,0x40,0xd4,0x7e,0x14,0x4a,0x07,0x73,0x6b,0xad,0x03,0xfa, -0x34,0x35,0xd4,0x58,0xff,0x00,0xc1,0x6b,0xfc,0x07,0x20,0x1f,0x6c,0xf8,0x77,0xe2, -0x38,0x0f,0xfd,0x30,0xb9,0xb7,0x93,0xf9,0x95,0xaf,0xc8,0x6c,0x51,0x45,0x85,0xcc, -0xcf,0xd9,0x9d,0x3b,0xfe,0x0b,0x39,0xf0,0x82,0xe4,0x81,0x77,0xe1,0x8f,0x17,0xd9, -0x67,0xf8,0xbe,0xcd,0x6f,0x20,0x1f,0x94,0xd5,0xd7,0x69,0xdf,0xf0,0x56,0xff,0x00, -0xd9,0xf6,0xf2,0x20,0xd7,0x1a,0x96,0xbd,0xa7,0xb1,0xfe,0x19,0xf4,0x99,0x18,0x8f, -0xfb,0xe0,0xb0,0xaf,0xc3,0x8a,0xb5,0xa4,0xd8,0xbe,0xa7,0xaa,0xd9,0xd9,0xc4,0xbb, -0xa5,0xb8,0x99,0x21,0x50,0x3b,0x96,0x60,0x07,0xf3,0xa2,0xc3,0xb9,0xfd,0x3f,0xe8, -0x3a,0xd5,0xb7,0x88,0xf4,0x4d,0x3f,0x56,0xb3,0x2e,0x6c,0xef,0xed,0xe3,0xba,0x84, -0xc8,0xa5,0x58,0xa3,0xa8,0x65,0xca,0x9e,0x41,0xc1,0x1c,0x1a,0xbf,0x55,0x34,0xab, -0x18,0xf4,0xcd,0x32,0xd2,0xce,0x14,0x11,0xc5,0x6f,0x0a,0x44,0x88,0x3a,0x28,0x55, -0x00,0x0f,0xd2,0xad,0xd4,0x96,0x14,0x51,0x45,0x00,0x72,0x3f,0x14,0xe7,0xfb,0x3f, -0x83,0x6f,0x4f,0xa8,0xc5,0x7c,0x0d,0xe2,0x29,0x37,0xdf,0xdd,0x37,0xab,0x9a,0xfb, -0x9b,0xe3,0x65,0xcf,0x91,0xe0,0xc9,0x87,0xf7,0x8e,0x3f,0x4a,0xf8,0x43,0x5a,0x7d, -0xd3,0x4e,0xde,0xac,0x6b,0xe0,0x33,0xe7,0x7c,0x54,0x23,0xd9,0x1f,0x01,0xc4,0xf3, -0xb2,0x48,0xf1,0x4f,0x1a,0x42,0x35,0x2f,0x88,0x9e,0x12,0xb1,0x64,0xf3,0x16,0xe7, -0x5a,0xb2,0x84,0xa6,0x33,0xb8,0x34,0xe8,0x08,0xfc,0x8d,0x7e,0xcc,0xa0,0x0a,0xa1, -0x40,0xc0,0x1c,0x57,0xe3,0xef,0x87,0xac,0x9f,0x5c,0xfd,0xa4,0xfe,0x19,0x59,0x2f, -0x3b,0xbc,0x47,0x67,0x26,0x3d,0x92,0x40,0xe7,0xff,0x00,0x40,0xaf,0xd8,0x31,0x5f, -0x57,0x97,0x46,0xd4,0x11,0xd7,0xc2,0x71,0xe5,0xcb,0xef,0xdd,0xb1,0x68,0xa2,0x8a, -0xf5,0x0f,0xb4,0x3f,0x3c,0xbf,0x6b,0x4f,0x07,0xde,0xfc,0x28,0xf8,0xc1,0x3e,0xbf, -0x6f,0x19,0x5d,0x0b,0xc4,0x4d,0xf6,0x95,0x78,0xc6,0x04,0x73,0x80,0x04,0xaa,0x7d, -0xc9,0xf9,0xff,0x00,0xe0,0x47,0xd2,0xb9,0x0d,0x2b,0xc6,0x12,0x5d,0xc4,0xaf,0x15, -0xeb,0xe0,0x8e,0xcf,0x5f,0xa1,0xbf,0x13,0xfe,0x1a,0x68,0xdf,0x15,0xfc,0x21,0x77, -0xe1,0xfd,0x6e,0x0f,0x36,0xda,0x61,0xba,0x39,0x57,0x1b,0xe0,0x90,0x0f,0x96,0x44, -0x3d,0x88,0xcf,0xe3,0xc8,0x3c,0x1a,0xfc,0xed,0xf8,0x9f,0xfb,0x2e,0xf8,0xe3,0xe1, -0x16,0xa9,0x33,0xdb,0xac,0x97,0xda,0x46,0xec,0xc3,0x7f,0x6e,0xa4,0xc6,0xc3,0x3c, -0x06,0x1f,0xc2,0x7d,0x8f,0xe1,0x9a,0xf9,0x3c,0xcb,0x2d,0x84,0xe4,0xea,0x6c,0x7e, -0x4f,0x9d,0xe5,0x78,0x9c,0x16,0x22,0x58,0xac,0x22,0x6e,0x13,0x77,0x69,0x74,0x66, -0xfc,0x3e,0x28,0xd4,0x23,0xe6,0x3b,0xf9,0x47,0xfc,0x0e,0xaf,0x43,0xe3,0x9d,0x6e, -0x1f,0xbb,0xa9,0x4b,0xf8,0xb5,0x78,0xb9,0xb9,0xf1,0x3e,0x9f,0xf2,0x4d,0x68,0x5c, -0x8e,0xf8,0xe4,0xd2,0x8f,0x15,0xeb,0x11,0x7d,0xfb,0x09,0x3f,0x23,0x5f,0x35,0xf5, -0x19,0xaf,0x86,0x4b,0xef,0x3c,0x48,0xe2,0x71,0xd1,0x5f,0x0c,0xbe,0xf3,0xdd,0x21, -0xf8,0x9f,0xe2,0x38,0x0f,0xcb,0xa8,0xb9,0xad,0x1b,0x7f,0x8c,0xfe,0x26,0xb7,0xe9, -0x7a,0xcd,0xf5,0xaf,0x9f,0x57,0xc7,0x97,0x91,0xfd,0xfb,0x49,0x57,0xf0,0x35,0x22, -0x7c,0x46,0x2b,0xf7,0xe2,0x90,0x1f,0x71,0x4d,0x61,0x71,0x31,0xf8,0x64,0xfe,0xf3, -0x55,0x99,0x63,0x61,0xba,0x91,0xf4,0x94,0x1f,0xb4,0x1f,0x8a,0x21,0xc7,0xef,0xf3, -0xf8,0xd6,0xa5,0xbf,0xed,0x33,0xe2,0x38,0xb1,0xbc,0x96,0xc7,0xbd,0x7c,0xc2,0x9f, -0x12,0x60,0xfe,0x2d,0xc3,0xf0,0xab,0x31,0xfc,0x44,0xb4,0x60,0x32,0xff,0x00,0xa5, -0x5a,0x58,0xf8,0xed,0x37,0xf7,0x9b,0x47,0x3c,0xc5,0x43,0x79,0x4b,0xee,0x3e,0xa8, -0xb5,0xfd,0xaa,0x75,0x98,0x88,0xf3,0x22,0xdc,0x3f,0x3a,0xd5,0xb7,0xfd,0xac,0xae, -0x86,0x3c,0xcb,0x6c,0xfa,0xfc,0xa2,0xbe,0x4c,0x8f,0xc7,0x96,0x4d,0xff,0x00,0x2d, -0x16,0xac,0xa7,0x8c,0xac,0x9f,0x1f,0xbd,0x43,0xf8,0xd5,0xac,0x46,0x63,0x0f,0xb4, -0xcd,0xe3,0xc4,0x98,0x88,0xef,0x3f,0xc0,0xfa,0xfe,0xd7,0xf6,0xb2,0x84,0xe3,0xce, -0xb6,0xff,0x00,0xc7,0x6b,0x52,0xdb,0xf6,0xab,0xd2,0xe4,0x23,0xcc,0x80,0x0f,0xc0, -0xd7,0xc6,0x69,0xe2,0x8b,0x37,0xe9,0x2a,0xfe,0x06,0xa7,0x4d,0x7a,0xd5,0xfa,0x38, -0x3f,0x8d,0x52,0xcc,0x73,0x18,0x6e,0xff,0x00,0x03,0xaa,0x3c,0x51,0x5b,0xf9,0x91, -0xf6,0xdd,0xbf,0xed,0x3b,0xe1,0xe9,0x00,0xde,0x30,0x4f,0xfb,0x55,0xa9,0x6d,0xfb, -0x43,0xf8,0x66,0x7c,0x66,0x5d,0xbf,0xf0,0x21,0x5f,0x0a,0xae,0xad,0x6e,0xdd,0x1c, -0x54,0x83,0x50,0x84,0xf4,0x93,0xf5,0xad,0x16,0x73,0x8f,0x8e,0xf6,0xfb,0x8e,0xb8, -0x71,0x45,0x4e,0xb6,0x3e,0xf8,0xb7,0xf8,0xdf,0xe1,0x99,0xc8,0xc5,0xd0,0x1f,0x88, -0xad,0x28,0x3e,0x2a,0xf8,0x72,0x71,0x91,0x7e,0xa3,0xf2,0xaf,0xcf,0xa5,0xbf,0x51, -0xf7,0x66,0x23,0xe8,0x6a,0x64,0xd4,0xe4,0x5f,0xbb,0x70,0xc3,0xfe,0x05,0x5a,0xac, -0xfb,0x14,0xbe,0x28,0x2f,0xc4,0xeb,0x8f,0x13,0xcb,0xac,0x51,0xfa,0x19,0x17,0x8f, -0xb4,0x29,0xbe,0xee,0xa1,0x1f,0xe7,0x57,0x23,0xf1,0x4e,0x95,0x2f,0xdd,0xbe,0x84, -0xff,0x00,0xc0,0xab,0xf3,0xbe,0x3d,0x6e,0xf1,0x3e,0xe5,0xe4,0xa3,0xe8,0xf5,0x66, -0x3f,0x15,0xea,0xb1,0x11,0xb7,0x50,0x9b,0xfe,0xfb,0x35,0xb2,0xe2,0x1a,0x8b,0xe2, -0xa7,0xf8,0x9d,0x51,0xe2,0x58,0x3d,0xe0,0x7e,0x88,0xa6,0xb1,0x63,0x27,0xdd,0xbb, -0x88,0xff,0x00,0xc0,0xc5,0x4a,0xb7,0x90,0x3f,0xdd,0x99,0x0f,0xd1,0x85,0x7e,0x7b, -0x43,0xe3,0xfd,0x7a,0x2f,0xbb,0xa8,0xcb,0xf9,0xd5,0xf8,0x3e,0x2b,0x78,0x8e,0x0c, -0x62,0xf9,0xcf,0xd4,0xd6,0xeb,0x88,0xa3,0xf6,0xa9,0xbf,0xbc,0xe8,0x8f,0x11,0xd0, -0x7b,0xc5,0x9f,0x7f,0x09,0x14,0xff,0x00,0x10,0xfc,0xe9,0x73,0xef,0x5f,0x08,0xc1, -0xf1,0xbf,0xc4,0xd0,0x7f,0xcb,0xd1,0x6f,0xc4,0xd6,0x9d,0xb7,0xed,0x11,0xe2,0x58, -0x3a,0xcb,0x9f,0xf8,0x11,0xad,0xe3,0xc4,0x34,0x1e,0xf0,0x67,0x44,0x78,0x83,0x0a, -0xf7,0xb9,0xf6,0xe0,0x34,0x66,0xbe,0x37,0xb6,0xfd,0xa7,0x35,0xf8,0x71,0xbf,0x2d, -0xf8,0xd6,0xad,0xbf,0xed,0x57,0xaa,0x2f,0xfa,0xc8,0x49,0x1f,0x85,0x6d,0x1c,0xfb, -0x08,0xf7,0xbf,0xdc,0x6f,0x1c,0xf3,0x06,0xfe,0xd1,0xf5,0x9e,0x68,0x07,0x35,0xf3, -0x0d,0xbf,0xed,0x65,0x28,0xff,0x00,0x59,0x6f,0x9f,0xf8,0x0e,0x6b,0x52,0xdb,0xf6, -0xb1,0xb5,0x38,0xf3,0x6d,0xc0,0xfc,0x2b,0xa2,0x39,0xd6,0x09,0xfd,0xaf,0xc0,0xe9, -0x8e,0x6d,0x83,0x97,0xdb,0x3e,0x8b,0xa2,0xbc,0x26,0x0f,0xda,0xa3,0x47,0x7c,0x07, -0x88,0x03,0xdf,0xad,0x6a,0x5b,0x7e,0xd2,0xde,0x1e,0x98,0x0d,0xe4,0x2f,0xfc,0x0a, -0xb7,0x8e,0x6b,0x83,0x97,0xfc,0xbc,0x46,0xf1,0xc7,0xe1,0xa5,0xb4,0xd1,0xec,0x54, -0x57,0x98,0xdb,0xfe,0xd0,0x3e,0x19,0x9f,0xfe,0x5b,0x05,0xff,0x00,0x81,0x56,0x9c, -0x1f,0x19,0xfc,0x35,0x36,0x3f,0xd3,0x00,0xfc,0x45,0x74,0x47,0x1d,0x86,0x96,0xd5, -0x17,0xde,0x6e,0xb1,0x34,0x65,0xb4,0xd1,0xdd,0xd1,0x5c,0xa4,0x1f,0x13,0xfc,0x3d, -0x38,0x18,0xbe,0x41,0xf5,0x35,0x76,0x2f,0x1c,0xe8,0x93,0x7d,0xdb,0xf8,0x8f,0xe3, -0x5b,0x2c,0x45,0x29,0x6d,0x25,0xf7,0x9a,0x2a,0xb4,0xde,0xd2,0x46,0xf5,0x15,0x97, -0x1f,0x89,0x74,0xc9,0x47,0xcb,0x7d,0x09,0xff,0x00,0x81,0x55,0x94,0xd5,0xac,0xe4, -0xfb,0xb7,0x51,0x1f,0xf8,0x10,0xad,0x54,0xe2,0xf6,0x65,0xa9,0x27,0xb3,0x2d,0xd1, -0x51,0x0b,0xa8,0x5b,0xa4,0xa8,0x7f,0xe0,0x42,0x9e,0x1d,0x58,0x64,0x10,0x7e,0x86, -0xaa,0xe8,0xab,0x8e,0xa2,0x93,0x34,0x66,0x98,0x0b,0x45,0x26,0x45,0x19,0xa0,0x05, -0xa2,0x93,0x34,0xb4,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, -0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, -0x00,0x51,0x45,0x14,0x00,0x94,0x6d,0x06,0x96,0x8a,0x00,0x4c,0x51,0x8a,0x5a,0x28, -0x01,0x31,0x4d,0x31,0xa1,0x04,0x15,0x04,0x1e,0xb9,0x14,0xfa,0x28,0x03,0x1e,0xfb, -0xc1,0xba,0x06,0xa9,0x9f,0xb6,0x68,0x7a,0x6d,0xde,0x7a,0xf9,0xf6,0x91,0xbe,0x7f, -0x31,0x5c,0xe5,0xf7,0xc0,0x6f,0x86,0x7a,0x9e,0xef,0xb5,0xfc,0x3c,0xf0,0xad,0xc9, -0x6e,0xa6,0x5d,0x16,0xd9,0x89,0xfc,0x4a,0x57,0x77,0x45,0x00,0x78,0xd6,0xa9,0xfb, -0x1a,0x7c,0x0b,0xd6,0x15,0xc5,0xcf,0xc2,0x6f,0x09,0x12,0xfd,0x5a,0x2d,0x2a,0x28, -0x9b,0xfe,0xfa,0x40,0x08,0xae,0x2e,0xfb,0xfe,0x09,0xb1,0xfb,0x37,0x5f,0xbb,0xb4, -0x9f,0x0c,0xad,0x23,0x2d,0xd7,0xc8,0xd4,0x6f,0x22,0x03,0xe8,0x16,0x60,0x05,0x7d, -0x33,0x45,0x00,0x7c,0x97,0x7f,0xff,0x00,0x04,0xb0,0xfd,0x9b,0xaf,0x22,0x65,0x8f, -0xc1,0x17,0x56,0x6c,0x7f,0x8e,0x0d,0x6e,0xf4,0x91,0xff,0x00,0x7d,0x4a,0xc3,0xf4, -0xac,0x5d,0x0f,0xfe,0x09,0x3f,0xf0,0x43,0xc3,0x5e,0x2b,0xd2,0x3c,0x41,0xa7,0x37, -0x89,0x21,0xba,0xd2,0xef,0x61,0xbe,0x86,0x17,0xd4,0x52,0x48,0x59,0xe3,0x70,0xe1, -0x58,0x34,0x44,0x95,0x25,0x40,0x23,0x3d,0x3b,0xd7,0xd9,0xd4,0x50,0x2b,0x05,0x14, -0x51,0x40,0xc2,0x8a,0x28,0xa0,0x0f,0x29,0xfd,0xa1,0x2e,0x7c,0x9f,0x0a,0x05,0xce, -0x32,0x58,0xfe,0x95,0xf0,0xf6,0xaa,0xfc,0x48,0x7d,0xcd,0x7d,0x97,0xfb,0x4b,0xdc, -0xf9,0x7a,0x24,0x29,0x9f,0xe1,0x3c,0x57,0xc5,0xda,0xb3,0xe2,0x27,0x3f,0x5a,0xfc, -0xeb,0x38,0x7c,0xd8,0xfb,0x76,0x48,0xfc,0xd3,0x8a,0x27,0xef,0xdb,0xc8,0xe4,0x3e, -0x04,0xda,0x0d,0x63,0xf6,0xc8,0xf8,0x6d,0x01,0xc9,0xf2,0xaf,0xe6,0xb9,0xe3,0xfe, -0x99,0xdb,0xca,0xc3,0xf9,0x57,0xeb,0x58,0xaf,0xcb,0x1f,0xd8,0xe7,0x4f,0x6d,0x5f, -0xf6,0xce,0xd0,0xa5,0x03,0x29,0x61,0xa7,0xdf,0x5d,0x37,0xb0,0xf2,0xbc,0xb1,0xfa, -0xc8,0x2b,0xf5,0x38,0x77,0xaf,0xb7,0xc1,0xab,0x51,0x47,0xd1,0xf0,0xd4,0x39,0x32, -0xca,0x7e,0x62,0xd1,0x45,0x15,0xdc,0x7d,0x40,0x98,0xa6,0xc9,0x0a,0x4a,0xa5,0x5d, -0x43,0xa1,0xe0,0xab,0x0c,0x83,0x4f,0xa2,0x80,0x38,0xad,0x6b,0xe0,0xcf,0x83,0x35, -0xf9,0x1a,0x4b,0xbd,0x02,0xd7,0xcc,0x61,0x82,0xd0,0x83,0x17,0xe8,0xa4,0x0a,0xe5, -0xaf,0x7f,0x65,0x8f,0x01,0x5d,0x9c,0xad,0x95,0xc5,0xbf,0xb4,0x53,0x7f,0xf1,0x40, -0xd7,0xaf,0x51,0x5c,0xd2,0xc3,0x51,0x96,0xf0,0x47,0x24,0xb0,0x98,0x79,0xbb,0xca, -0x9a,0xfb,0x8f,0x09,0xba,0xfd,0x8f,0x3c,0x13,0x36,0x4a,0x4d,0xa8,0x46,0x7d,0xdd, -0x08,0xff,0x00,0xd0,0x2b,0x02,0xff,0x00,0xf6,0x26,0xd0,0x27,0xcf,0xd9,0xf5,0x69, -0x22,0x3f,0xf4,0xd2,0xdc,0x3f,0xf2,0x61,0x5f,0x4a,0x51,0xf8,0xd6,0x4f,0x03,0x87, -0x7f,0x60,0xe7,0x79,0x6e,0x16,0x5f,0x63,0xf3,0x3e,0x50,0xbc,0xfd,0x84,0xec,0x64, -0xe6,0x2d,0x6a,0x17,0x3f,0xed,0xda,0x95,0xff,0x00,0xd9,0x8d,0x73,0xd7,0xdf,0xb0, -0x65,0xd9,0x62,0x20,0xbb,0xd3,0x5c,0x76,0x2c,0x59,0x4f,0xfe,0x81,0x5f,0x68,0x62, -0x8c,0x56,0x4f,0x2e,0xa0,0xfa,0x3f,0xbd,0x98,0xbc,0xa7,0x0a,0xfe,0xcb,0xfb,0xd9, -0xf0,0x8d,0xe7,0xec,0x1d,0xae,0x2a,0xb1,0x8d,0x6c,0x65,0x3d,0x82,0x4d,0x8c,0xfe, -0x78,0xae,0x7a,0xfb,0xf6,0x20,0xf1,0x54,0x07,0xe4,0xd3,0x0b,0x0f,0xfa,0x67,0x70, -0x87,0xff,0x00,0x66,0xaf,0xd0,0xfc,0x51,0x8a,0x87,0x96,0xd3,0xe9,0x27,0xf7,0x9c, -0xf2,0xc8,0xf0,0xb2,0xef,0xf8,0x7f,0x91,0xf9,0xa7,0x7b,0xfb,0x1f,0x78,0xc6,0xd4, -0x90,0xba,0x46,0xa0,0x4f,0xfb,0x1f,0x30,0xfd,0x2b,0x0a,0xef,0xf6,0x69,0xf1,0x85, -0x91,0x3b,0xb4,0xed,0x4e,0x3c,0x7a,0xdb,0xb7,0xf8,0x57,0xea,0x4e,0x29,0x0a,0xe6, -0xa1,0xe5,0xab,0xa4,0xdf,0xe0,0x72,0xcb,0x87,0x70,0xd2,0xeb,0xf8,0x23,0xf2,0x7a, -0xef,0xe0,0xd7,0x8a,0x6c,0x72,0x59,0x6e,0xa3,0x03,0xfb,0xf1,0x11,0x59,0xef,0xe0, -0x3f,0x13,0xdb,0x74,0x91,0xce,0x3d,0x54,0xd7,0xeb,0x83,0x44,0xae,0x30,0xc0,0x11, -0xe8,0x45,0x55,0x9f,0x45,0xb0,0xba,0xff,0x00,0x5d,0x65,0x6f,0x30,0xff,0x00,0x6e, -0x25,0x3f,0xd2,0xb2,0x79,0x6c,0xba,0x4f,0xf0,0x38,0xe5,0xc2,0xf8,0x79,0x76,0xfb, -0xbf,0xe0,0x9f,0x92,0x6d,0xa0,0x78,0xaa,0xdf,0xdf,0xeb,0x9a,0x88,0xa7,0x8a,0x2d, -0xfe,0xf4,0x3b,0xbe,0x86,0xbf,0x57,0xee,0x3c,0x03,0xe1,0xbb,0xa0,0x7c,0xdd,0x07, -0x4d,0x7c,0xf7,0x36,0xa9,0xfe,0x15,0x97,0x73,0xf0,0x6f,0xc1,0x77,0x79,0xf3,0x3c, -0x3b,0x67,0xff,0x00,0x00,0x52,0x9f,0xc8,0x8a,0xc9,0xe5,0xb5,0x3b,0xa6,0x72,0x4b, -0x84,0xe9,0x74,0xb7,0xe2,0x8f,0xcb,0x31,0xaa,0xf8,0x8a,0x0f,0xbf,0x68,0xc6,0x94, -0x78,0xab,0x58,0x8b,0xef,0xd8,0xcb,0xc7,0xfb,0x26,0xbf,0x4d,0xae,0x7f,0x67,0x8f, -0x00,0xdd,0x67,0x3a,0x12,0x46,0x4f,0x74,0x99,0xff,0x00,0xf8,0xaa,0xc5,0xbb,0xfd, -0x94,0xfc,0x09,0x75,0x9d,0xb6,0xf7,0x70,0x67,0xfe,0x79,0xca,0xbf,0xd5,0x4d,0x63, -0x2c,0xb2,0xa7,0xf2,0xc5,0x9c,0xb2,0xe1,0x37,0xd3,0xff,0x00,0x4a,0x67,0xe7,0x32, -0xf8,0xee,0xf6,0x3f,0xbf,0x6b,0x28,0xfc,0x0d,0x4c,0x9f,0x11,0x4a,0x9f,0x9e,0x17, -0x1f,0x85,0x7d,0xf7,0x79,0xfb,0x1c,0x78,0x36,0x7f,0xf5,0x37,0x57,0xd1,0x1f,0xf6, -0x8a,0x37,0xfe,0xca,0x2b,0x02,0xf3,0xf6,0x22,0xd1,0x26,0x72,0x62,0xd6,0x9d,0x17, -0xd1,0xed,0x43,0x1f,0xcf,0x78,0xac,0x1e,0x59,0x3e,0xb4,0x97,0xde,0x73,0x4b,0x85, -0xab,0xaf,0x86,0xff,0x00,0x7a,0x3e,0x2b,0x4f,0x89,0x10,0xff,0x00,0x10,0x65,0xfa, -0x8a,0xb1,0x1f,0xc4,0x4b,0x46,0xea,0xf8,0xaf,0xac,0x2f,0x7f,0x61,0x2b,0x49,0x01, -0xf2,0x35,0x88,0x1d,0xbb,0x09,0x2d,0x8a,0xff,0x00,0x53,0x5c,0xf5,0xe7,0xec,0x19, -0xa8,0x1f,0xf5,0x77,0x5a,0x63,0x8f,0xf7,0x98,0x7f,0xec,0xb5,0x83,0xcb,0x5f,0x5a, -0x4c,0xe7,0x97,0x0e,0xe2,0xe3,0xb3,0x97,0xe0,0xcf,0x9e,0xa3,0xf1,0xed,0x9b,0xff, -0x00,0xcb,0x45,0x15,0x66,0x3f,0x19,0xd9,0x3f,0xfc,0xb5,0x4f,0xce,0xbd,0x7a,0xfb, -0xf6,0x11,0xd7,0xe3,0x62,0x23,0x86,0xce,0x61,0xeb,0x1c,0xc0,0x67,0xf3,0xc5,0x73, -0xf7,0x9f,0xb1,0x27,0x8b,0x21,0xdd,0xb3,0x4a,0x76,0x03,0xfe,0x79,0xdc,0x21,0xff, -0x00,0xd9,0xab,0x09,0x65,0xb1,0x5b,0xd3,0x92,0xf9,0x1c,0xd2,0xc9,0x31,0xd1,0xea, -0xff,0x00,0xf0,0x13,0x89,0x4f,0x14,0xd9,0xbf,0xfc,0xb5,0x4f,0xfb,0xea,0xa7,0x4d, -0x7e,0xd5,0xff,0x00,0x8d,0x4f,0xe2,0x2b,0x4a,0xf7,0xf6,0x43,0xf1,0x8d,0xa0,0x2d, -0xfd,0x8f,0xa8,0x81,0xe9,0x1a,0x16,0xfe,0x42,0xb0,0xef,0x7f,0x66,0xdf,0x17,0x58, -0xf2,0xda,0x76,0xa7,0x17,0xfb,0xf6,0xed,0xfe,0x15,0xcf,0x2c,0xbe,0x9a,0xee,0xbe, -0x47,0x3c,0xb2,0xdc,0x74,0x3a,0xfe,0x0c,0xbe,0xba,0xb5,0xbb,0x7f,0x18,0xa9,0x17, -0x51,0x80,0xff,0x00,0x18,0xae,0x46,0xe7,0xe1,0x07,0x89,0xac,0x8e,0x1b,0xed,0x28, -0x47,0x67,0x88,0xd5,0x17,0xf0,0x2f,0x89,0xad,0x8f,0x12,0x3f,0x1e,0xaa,0x6b,0x17, -0x81,0xa5,0xd2,0x46,0x2f,0x0d,0x8d,0x8f,0x63,0xd0,0x16,0xfa,0x23,0xd2,0x4f,0xd6, -0xa5,0x5b,0xdc,0x7d,0xd9,0x88,0xfc,0x6b,0xcc,0xdb,0x42,0xf1,0x4d,0xbe,0x79,0x27, -0xeb,0x9a,0x66,0xcf,0x13,0x41,0xf7,0xa2,0x2d,0x8f,0x43,0x51,0xfd,0x9f,0x17,0xb4, -0x85,0xc9,0x8d,0x8f,0xd8,0xfc,0x4f,0x55,0x4d,0x52,0x74,0xfb,0xb7,0x4e,0x3e,0x8d, -0x56,0x23,0xd7,0xef,0xe3,0xfb,0x97,0xb2,0x8f,0xa3,0x1a,0xf2,0x1f,0xed,0x5f,0x10, -0xc2,0x3e,0x6b,0x47,0x3f,0x4a,0x51,0xe2,0x9d,0x62,0x3f,0xbf,0x67,0x27,0xfd,0xf3, -0x51,0xfd,0x9d,0x2e,0x92,0x41,0xed,0x31,0xb0,0xde,0x9b,0xfb,0xcf,0x67,0x8f,0xc6, -0x1a,0xc4,0x5f,0x77,0x50,0x97,0xfe,0xfa,0xab,0xb0,0x7c,0x44,0xd7,0xe0,0xfb,0xba, -0x84,0x9f,0x8d,0x78,0x7a,0xf8,0xea,0xf2,0x3f,0xf5,0x96,0xb2,0x8f,0xf8,0x09,0xa9, -0x53,0xe2,0x29,0x5f,0xbf,0x14,0x8b,0xf5,0x14,0x96,0x06,0xbc,0x7e,0x17,0xf8,0x94, -0xb1,0xd8,0xb8,0x6f,0x19,0x23,0xde,0x60,0xf8,0xb7,0xe2,0x48,0x3f,0xe5,0xf4,0x9f, -0xad,0x69,0x43,0xf1,0xd7,0xc4,0xd0,0x81,0x8b,0x8c,0xe3,0xdc,0xd7,0xcf,0x91,0xfc, -0x48,0x87,0xb8,0x65,0xfc,0x2a,0xcc,0x7f,0x11,0x2d,0x5b,0xab,0xe3,0xea,0x2a,0x95, -0x0c,0x5c,0x7e,0x19,0x3f,0xbc,0xd5,0x67,0x18,0x98,0x6e,0xe4,0xbe,0x47,0xd1,0xb6, -0xbf,0xb4,0x67,0x88,0xe0,0x00,0x17,0xcf,0xd0,0xd6,0xa5,0xbf,0xed,0x3f,0xae,0x46, -0x7e,0x70,0xc7,0xf1,0xaf,0x99,0xe3,0xf1,0xed,0x9b,0x7f,0xcb,0x41,0xf8,0xd5,0x98, -0xfc,0x69,0x66,0xf8,0xfd,0xea,0x7e,0x75,0x4a,0x58,0xf8,0x6d,0x26,0x6f,0x1e,0x20, -0xaf,0x1f,0xb6,0xfe,0xe3,0xea,0x5b,0x7f,0xda,0xb3,0x50,0x4c,0x6f,0x84,0x93,0xf4, -0x15,0xa9,0x6b,0xfb,0x58,0x37,0x1e,0x6c,0x39,0xff,0x00,0x80,0xd7,0xc9,0xd1,0xf8, -0xae,0xd1,0xff,0x00,0xe5,0xa2,0x7e,0x75,0x3a,0x78,0x86,0xd5,0xfa,0x3a,0xfe,0x75, -0x6b,0x19,0x98,0xc3,0xed,0x33,0xa6,0x3c,0x4d,0x59,0x7f,0xcb,0xc4,0x7d,0x7f,0x6f, -0xfb,0x56,0xd9,0x39,0xc3,0xc2,0x07,0xd4,0x56,0xad,0xb7,0xed,0x45,0xa2,0xc9,0x8f, -0x31,0x00,0xfc,0x6b,0xe3,0x15,0xd6,0x2d,0xdb,0xf8,0x87,0xe7,0x52,0x2e,0xa5,0x03, -0x7f,0x1e,0x2b,0x45,0x9a,0xe6,0x11,0xdd,0xfe,0x07,0x5c,0x38,0x9a,0xb7,0xf3,0x26, -0x7d,0xbb,0x6d,0xfb,0x48,0x78,0x7a,0x7c,0x6e,0x60,0xbf,0xf0,0x2a,0xd4,0x83,0xe3, -0xdf,0x86,0x66,0xc7,0xef,0xc0,0xff,0x00,0x81,0x0a,0xf8,0x48,0x5f,0x44,0x7a,0x3f, -0xeb,0x4f,0x5b,0xc5,0xea,0x25,0xc7,0xe3,0x5a,0x2c,0xef,0x1b,0x1d,0xd2,0xfb,0x8e, -0xc8,0xf1,0x35,0x5e,0xa9,0x33,0xef,0xd8,0x3e,0x30,0xf8,0x6e,0x7c,0x62,0xec,0x0f, -0xc4,0x55,0xe8,0x7e,0x25,0x78,0x7e,0x7c,0x6d,0xbe,0x4f,0xc6,0xbf,0x3e,0x56,0xf9, -0x86,0x31,0x3b,0x7f,0xdf,0x55,0x3a,0x6a,0xd7,0x51,0xfd,0xcb,0xb9,0x07,0xd1,0xab, -0x65,0xc4,0x18,0x85,0xbc,0x11,0xd5,0x1e,0x25,0x7d,0x60,0x7e,0x86,0x47,0xe3,0x4d, -0x16,0x5c,0x62,0xfe,0x2f,0xc4,0xd5,0xa8,0xfc,0x45,0xa6,0xcb,0xf7,0x6f,0x61,0x3f, -0xf0,0x2a,0xfc,0xf1,0x8f,0xc4,0x7a,0x8c,0x7f,0x76,0xf6,0x51,0xff,0x00,0x02,0xab, -0x91,0x78,0xdf,0x5a,0x87,0xee,0xea,0x12,0x7e,0x75,0xb2,0xe2,0x29,0xaf,0x8a,0x9f, -0xe2,0x74,0x47,0x89,0x21,0xd6,0x07,0xe8,0x52,0xea,0x96,0x8f,0xf7,0x6e,0x62,0x3f, -0x46,0x15,0x2a,0xdc,0x44,0xdd,0x24,0x43,0xf4,0x22,0xbf,0x3f,0x20,0xf8,0x97,0xe2, -0x08,0x08,0xdb,0x7c,0xe7,0xeb,0x57,0xe1,0xf8,0xc5,0xe2,0x48,0x7f,0xe5,0xec,0x9a, -0xde,0x3c,0x45,0x0f,0xb5,0x4d,0x9d,0x31,0xe2,0x2c,0x3b,0xde,0x2c,0xfb,0xdc,0x3a, -0x9e,0x8c,0x0f,0xe3,0x4b,0x9a,0xf8,0x66,0xdf,0xe3,0xdf,0x89,0x2d,0xff,0x00,0xe5, -0xb6,0x7f,0x13,0x5a,0x96,0xdf,0xb4,0x87,0x88,0x21,0xc6,0xe6,0x2d,0xf8,0x9a,0xdd, -0x71,0x0e,0x1d,0xef,0x16,0x8d,0xe3,0x9f,0xe1,0x1e,0xec,0xfb,0x4b,0x38,0xa3,0x22, -0xbe,0x42,0xb7,0xfd,0xa8,0xb5,0x98,0xf1,0xb9,0x0f,0xe7,0x9a,0xd4,0xb5,0xfd,0xab, -0x2e,0xd7,0x1e,0x64,0x44,0xfe,0x15,0xba,0xcf,0xb0,0x8f,0x7b,0xfd,0xc7,0x44,0x73, -0xac,0x1c,0xbe,0xd1,0xf5,0x4e,0x45,0x15,0xf3,0x55,0xb7,0xed,0x5c,0xac,0x47,0x99, -0x00,0x03,0xfd,0xda,0xd5,0xb7,0xfd,0xaa,0x74,0xe6,0xc6,0xf8,0x97,0xf2,0x35,0xbc, -0x73,0x9c,0x14,0xbe,0xd9,0xd1,0x1c,0xd3,0x09,0x2d,0xa6,0x8f,0xa0,0x33,0x4b,0x5e, -0x25,0x6b,0xfb,0x4e,0x68,0xb2,0xfd,0xf0,0x8b,0xf8,0x9a,0xd5,0xb7,0xfd,0xa2,0xfc, -0x3b,0x36,0x01,0x60,0x0f,0xfb,0xd5,0xd1,0x1c,0xcf,0x07,0x2d,0xaa,0x23,0x75,0x8e, -0xc3,0xcb,0x69,0xa3,0xd6,0x28,0xaf,0x3a,0x83,0xe3,0x9f,0x86,0xe6,0xc7,0xfa,0x40, -0x5c,0xff,0x00,0xb4,0x2b,0x46,0xdf,0xe2,0xdf,0x87,0x6e,0x31,0x8b,0xb5,0x1f,0x52, -0x2b,0x75,0x8d,0xc3,0x4b,0x6a,0x8b,0xef,0x36,0x58,0x8a,0x2f,0x69,0x23,0xb4,0xa2, -0xb9,0xa8,0xfe,0x22,0xe8,0x12,0xfd,0xdb,0xf4,0xcd,0x5b,0x8b,0xc6,0x1a,0x44,0xdf, -0x76,0xfa,0x2f,0xc4,0xd6,0xca,0xbd,0x29,0x6d,0x25,0xf7,0x9a,0x2a,0x90,0x7b,0x33, -0x6a,0x8a,0xce,0x4f,0x10,0x69,0xd2,0x7d,0xdb,0xc8,0x5b,0xfe,0x05,0x56,0x13,0x51, -0xb6,0x7e,0x97,0x11,0x1f,0xf8,0x18,0xad,0x14,0xe2,0xf6,0x65,0x73,0x2e,0xe5,0x9a, -0x2a,0x35,0xb8,0x89,0xfe,0xec,0x88,0x7e,0x8d,0x4f,0xdc,0x3d,0x45,0x55,0xca,0x16, -0x8a,0x29,0x33,0x4c,0x05,0xa2,0x93,0x34,0x66,0x80,0x16,0x8a,0x4a,0x33,0x40,0x0b, -0x45,0x14,0x94,0x01,0xf3,0xdf,0xed,0x45,0x77,0xb6,0xde,0x38,0xf3,0xd2,0x3c,0x57, -0xc7,0x5e,0x24,0xbc,0x5b,0x7b,0x39,0x58,0x9c,0x61,0x4d,0x7d,0x53,0xfb,0x54,0x5f, -0x88,0xee,0x4a,0x93,0x8c,0x28,0x02,0xbe,0x1a,0xf8,0x97,0xe2,0x95,0xb6,0xb3,0x78, -0x95,0xf2,0xc4,0x73,0xcd,0x7e,0x79,0x88,0xa6,0xeb,0xe6,0x53,0xf2,0xb1,0xf9,0x1f, -0x13,0xd4,0x73,0xc4,0xaa,0x31,0xdd,0x9e,0xad,0xff,0x00,0x04,0xe8,0xd3,0xe6,0xd6, -0x3f,0x69,0x8f,0x14,0xea,0xe1,0x37,0xda,0x69,0xfe,0x1f,0x92,0x06,0x7c,0xfd,0xd9, -0x25,0xb8,0x8b,0x60,0xfc,0x44,0x4f,0xf9,0x57,0xe9,0x78,0xaf,0x87,0x7f,0xe0,0x96, -0xbe,0x07,0x96,0xcb,0xc1,0x1e,0x34,0xf1,0xa4,0xe0,0x8f,0xed,0xcd,0x42,0x3b,0x3b, -0x70,0xc3,0xac,0x56,0xca,0xd9,0x61,0xf5,0x69,0x98,0x7f,0xc0,0x2b,0xee,0x3a,0xfb, -0xba,0x11,0xe5,0xa6,0x91,0xfa,0x46,0x59,0x43,0xea,0xf8,0x3a,0x74,0xfb,0x20,0xa2, -0x8a,0x2b,0xa0,0xf5,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0, -0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0, -0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x93,0x14,0xb4,0x50,0x02,0x62,0x8c, -0x52,0xd1,0x40,0x0d,0x23,0xd2,0x94,0x0a,0x5a,0x28,0x01,0x31,0x46,0xd1,0x4b,0x45, -0x00,0x46,0xd0,0xa3,0x82,0x19,0x15,0x81,0xec,0x45,0x54,0x9b,0x40,0xd3,0x6e,0x46, -0x26,0xd3,0xed,0x65,0x1f,0xed,0xc2,0xa7,0xfa,0x55,0xfa,0x2a,0x5c,0x53,0xdd,0x12, -0xe2,0x9e,0xe8,0xe7,0x6e,0x7e,0x1e,0x78,0x62,0xf3,0xfd,0x76,0x81,0xa7,0x3f,0xfd, -0xbb,0x20,0xfe,0x42,0xb2,0xee,0x7e,0x0b,0xf8,0x26,0xef,0x3e,0x67,0x87,0x2c,0xc6, -0x7f,0xb8,0xa5,0x3f,0x91,0x15,0xdb,0x51,0x59,0xba,0x34,0x9e,0xf1,0x5f,0x71,0x93, -0xa1,0x4a,0x5b,0xc1,0x7d,0xc8,0xf3,0x2b,0xbf,0xd9,0xc7,0xc0,0x37,0x60,0x8f,0xec, -0x51,0x1f,0xba,0x4c,0xff,0x00,0xd4,0x9a,0xc7,0xba,0xfd,0x93,0xfc,0x09,0x70,0x72, -0xb0,0xdd,0xc3,0xec,0x92,0xaf,0xf5,0x53,0x5e,0xcb,0x45,0x64,0xf0,0x94,0x1f,0xd8, -0x46,0x0f,0x03,0x86,0x7b,0xd3,0x5f,0x71,0xe0,0x37,0xbf,0xb1,0xaf,0x84,0x27,0xcf, -0x91,0x77,0x79,0x11,0x3f,0xdf,0xd8,0xf8,0xfd,0x05,0x61,0x5d,0x7e,0xc3,0xba,0x2c, -0xb9,0xf2,0xf5,0xc6,0x5f,0x4d,0xd6,0x80,0xff,0x00,0xec,0xf5,0xf4,0xdd,0x15,0x9b, -0xc0,0xe1,0xdf,0xd9,0xfc,0xcc,0x9e,0x5b,0x84,0x7f,0x63,0xf3,0x3e,0x46,0xd4,0x3f, -0x61,0x38,0x98,0x9f,0xb3,0x6a,0xd6,0x92,0x0f,0xfa,0x69,0x01,0x4f,0xe5,0x9a,0xe7, -0xef,0x3f,0x60,0xcd,0x49,0x89,0xf2,0xee,0xb4,0xb7,0x1d,0xbe,0x77,0x07,0xff,0x00, -0x40,0xaf,0xb6,0x31,0x46,0x2b,0x37,0x97,0x50,0xe9,0x75,0xf3,0x31,0x79,0x46,0x15, -0xf4,0x7f,0x79,0xf0,0x45,0xff,0x00,0xec,0x29,0xe2,0x18,0x81,0x31,0x5b,0x5a,0x4d, -0x8e,0xd1,0xdc,0x00,0x4f,0xe7,0x8a,0xc0,0xba,0xfd,0x89,0xbc,0x5d,0x10,0x24,0x69, -0x12,0x71,0xfd,0xcb,0x84,0x3f,0xc9,0xab,0xf4,0x5b,0x14,0x98,0x35,0x1f,0xd9,0xb4, -0xfa,0x49,0x9c,0xf2,0xc8,0xf0,0xd2,0xea,0xff,0x00,0x0f,0xf2,0x3f,0x33,0x2f,0xbf, -0x64,0xaf,0x18,0x59,0x96,0x1f,0xd8,0xda,0x96,0x47,0xfc,0xf3,0x8d,0x98,0x7e,0x60, -0x56,0x15,0xdf,0xec,0xe7,0xe2,0xcb,0x30,0x49,0xd3,0xf5,0x38,0xc0,0xea,0x5a,0xdd, -0xb1,0xfc,0xab,0xf5,0x47,0x14,0x9b,0x73,0xd6,0xb3,0x79,0x6f,0x6a,0x8c,0xe5,0x97, -0x0e,0xe1,0xe5,0xd7,0xf0,0x47,0xe4,0xbd,0xcf,0xc2,0x3f,0x11,0xd9,0x83,0x93,0x70, -0x9f,0xef,0x46,0x45,0x51,0x93,0xc0,0xfe,0x25,0xb7,0xe9,0x23,0xf1,0xea,0xa6,0xbf, -0x5c,0xde,0xde,0x39,0x06,0x19,0x15,0x87,0xa3,0x0c,0xd5,0x3b,0x8f,0x0f,0x69,0x77, -0x9f,0xeb,0xf4,0xeb,0x49,0xbf,0xdf,0x81,0x5b,0xf9,0x8a,0xcd,0xe5,0xd3,0xe9,0x3f, -0xc0,0xe3,0x9f,0x0b,0xd0,0x97,0x6f,0xbb,0xfe,0x09,0xf9,0x24,0xda,0x1f,0x8a,0x2d, -0xfb,0x96,0xc7,0xd6,0xa3,0x2b,0xe2,0x58,0x3a,0xc5,0xbb,0xe8,0x6b,0xf5,0x7a,0xe3, -0xe1,0xb7,0x85,0x6e,0xb3,0xe6,0xf8,0x7b,0x4d,0x6c,0xf5,0x3f,0x66,0x40,0x7f,0x41, -0x59,0x57,0x5f,0x04,0x7c,0x0f,0x77,0xf7,0xfc,0x3b,0x68,0x3d,0x76,0xee,0x5f,0xe4, -0x6b,0x27,0x96,0xd5,0xee,0x99,0xc7,0x2e,0x14,0xa6,0xf6,0xb7,0xe2,0x7e,0x5a,0xff, -0x00,0x6a,0xf8,0x86,0x1f,0xbd,0x6a,0xc7,0x1e,0x94,0xe1,0xe2,0x9d,0x62,0x2f,0xbf, -0x67,0x27,0xfd,0xf3,0x5f,0xa6,0x37,0x7f,0xb3,0x5f,0x80,0x2e,0xff,0x00,0xe6,0x0c, -0x61,0xff,0x00,0xae,0x73,0x3f,0xf5,0x26,0xb1,0xee,0xbf,0x64,0xbf,0x01,0xdc,0x92, -0x56,0x1b,0xd8,0x7d,0x92,0x65,0xfe,0xaa,0x6b,0x17,0x96,0xd5,0xfe,0x58,0x9c,0xb2, -0xe1,0x3e,0xcb,0xf1,0x7f,0xe4,0x7e,0x74,0x8f,0x1c,0xde,0xc6,0x7e,0x7b,0x59,0x07, -0xe0,0x6a,0x54,0xf8,0x88,0xeb,0xf7,0xe2,0x71,0xf9,0xd7,0xde,0xd7,0xbf,0xb1,0x87, -0x85,0x27,0xcf,0x91,0x7f,0x79,0x0f,0xfb,0xea,0xaf,0xfe,0x15,0x89,0x75,0xfb,0x0e, -0x68,0xf2,0x92,0x63,0xd7,0x18,0x7b,0x35,0xa0,0x3f,0xfb,0x3d,0x61,0x2c,0xb6,0xa7, -0x5a,0x6b,0xef,0x39,0xa5,0xc2,0xd5,0x97,0xc3,0x7f,0xbd,0x1f,0x16,0xc7,0xf1,0x1e, -0x2e,0xe0,0x8a,0xb3,0x1f,0xc4,0x4b,0x66,0xea,0xf5,0xf5,0x5e,0xa1,0xfb,0x08,0x29, -0xcf,0xd9,0xb5,0x6b,0x39,0x07,0x6f,0x36,0x16,0x5f,0xe5,0x9a,0xe7,0xee,0xff,0x00, -0x60,0xbd,0x4c,0x82,0x52,0xe7,0x4a,0x7f,0x6d,0xce,0x3f,0xf6,0x4a,0xc2,0x59,0x6b, -0xeb,0x49,0x9c,0xd2,0xe1,0xcc,0x5c,0x76,0x72,0xfc,0x19,0xf3,0xec,0x7e,0x3d,0xb4, -0x7c,0x66,0x40,0x3e,0xb5,0x66,0x3f,0x1a,0xd9,0xbe,0x3f,0x7a,0xb5,0xea,0xfa,0x87, -0xec,0x2f,0xe2,0x58,0x58,0x88,0xac,0x6d,0xe7,0x03,0xbc,0x57,0x0a,0x07,0xea,0x45, -0x61,0x5e,0x7e,0xc5,0x3e,0x2f,0x81,0x49,0x1a,0x3c,0xa7,0x1f,0xf3,0xce,0x74,0x6f, -0xe4,0xd5,0x83,0xcb,0xa3,0xd6,0x9c,0x97,0xc8,0xe7,0x96,0x49,0x8e,0x8e,0xd2,0x7f, -0xf8,0x09,0xc6,0xc7,0xe2,0xcb,0x47,0xc7,0xef,0x53,0xf3,0xa9,0xd3,0xc4,0x76,0xaf, -0xd2,0x45,0x3f,0x8d,0x5d,0xbc,0xfd,0x93,0x7c,0x61,0x66,0x0b,0x7f,0x62,0xea,0x60, -0x7f,0xb1,0x13,0x37,0xf2,0x15,0x87,0x79,0xfb,0x3b,0xf8,0xb2,0xc7,0xef,0xe9,0xfa, -0x9c,0x5f,0xef,0xdb,0xb0,0xfe,0x95,0xce,0xf0,0x14,0x97,0x46,0xbe,0x47,0x3c,0xb2, -0xec,0x74,0x3e,0xd7,0xe0,0xcd,0x55,0xd6,0xad,0xdb,0xf8,0x87,0xe7,0x52,0x0d,0x4e, -0x06,0xfe,0x31,0x5c,0x6d,0xc7,0xc2,0x9f,0x10,0xda,0x31,0x52,0xd3,0xa1,0x07,0x18, -0x68,0xc8,0xaa,0x72,0x78,0x23,0xc4,0x96,0xfd,0x24,0x63,0x8f,0xf6,0x4d,0x66,0xf0, -0x34,0xba,0x48,0xc1,0xe1,0x71,0xb1,0xec,0xcf,0x41,0x17,0xf0,0xff,0x00,0x7a,0x9e, -0xb7,0x91,0xf6,0x7f,0xd6,0xbc,0xd1,0xb4,0x4f,0x13,0x41,0xdc,0x9f,0x6e,0x69,0xa4, -0x78,0x96,0x0e,0xb1,0x16,0xfc,0x6b,0x37,0x97,0xc5,0xed,0x22,0x7d,0x9e,0x35,0x7d, -0x84,0xfe,0x67,0xa8,0xad,0xe0,0x1d,0x25,0x23,0xf1,0xa9,0x93,0x50,0x95,0x7e,0xed, -0xc3,0x8f,0xa3,0x57,0x93,0xff,0x00,0x6a,0xf8,0x82,0x1f,0xbd,0x6a,0xc7,0x1e,0x94, -0xa3,0xc5,0x3a,0xbc,0x5f,0x7e,0xd2,0x4f,0xfb,0xe6,0xa1,0xe5,0xcf,0xa4,0x90,0x73, -0x62,0xe3,0xbd,0x37,0xf7,0x9e,0xbd,0x1e,0xb5,0x7b,0x11,0xf9,0x2e,0xe4,0x1f,0x47, -0x35,0x65,0x3c,0x55,0xaa,0xc7,0xf7,0x6f,0xa5,0xff,0x00,0xbe,0x8d,0x78,0xe0,0xf1, -0xcd,0xe4,0x7f,0x7e,0xda,0x41,0xff,0x00,0x01,0x35,0x2a,0x7c,0x44,0x61,0xf7,0xa2, -0x71,0x51,0xfd,0x9f,0x55,0x6c,0xff,0x00,0x11,0xac,0x5e,0x26,0x3b,0xc2,0x47,0xb4, -0xc3,0xe3,0xcd,0x72,0x0f,0xbb,0x7d,0x27,0xe2,0x6a,0xec,0x3f,0x14,0x7c,0x43,0x0e, -0x31,0x7a,0xe7,0xea,0x6b,0xc4,0x13,0xe2,0x3c,0x47,0x19,0xdd,0x56,0xa3,0xf8,0x89, -0x6c,0x71,0x97,0x22,0x8f,0xa9,0xe2,0x63,0xb5,0xfe,0xf3,0x45,0x9a,0x57,0x86,0xfc, -0xcb,0xef,0x3d,0xda,0xdf,0xe3,0x4f,0x89,0x20,0xc6,0x2e,0x4f,0xe6,0x6b,0x46,0xdb, -0xe3,0xff,0x00,0x88,0xa0,0xc6,0x64,0x2c,0x7d,0x77,0x57,0x81,0x47,0xe3,0xdb,0x46, -0xff,0x00,0x96,0x95,0x66,0x3f,0x1a,0xda,0x37,0xfc,0xb5,0x5a,0x7c,0x98,0xc8,0x6d, -0x27,0xf7,0x9b,0x47,0x3c,0xad,0x1f,0xb6,0xfe,0xe3,0xe8,0x8b,0x7f,0xda,0x53,0x5f, -0x8b,0x86,0x27,0x1e,0xcd,0x5a,0x96,0xdf,0xb5,0x26,0xab,0x10,0x1b,0xe3,0x63,0xf5, -0x35,0xf3,0x5c,0x7e,0x2d,0xb4,0x7e,0x92,0xaf,0xe7,0x53,0xaf,0x88,0xed,0x5f,0xa3, -0xaf,0xe7,0x56,0xab,0xe3,0xe1,0xb4,0xd9,0xd3,0x1e,0x22,0xac,0xbf,0xe5,0xe1,0xf5, -0x0d,0xb7,0xed,0x59,0x73,0x91,0xe6,0xa1,0xff,0x00,0xbe,0x45,0x6b,0x5b,0x7e,0xd5, -0xb0,0xb6,0x03,0xc2,0x3e,0xa4,0x57,0xc9,0xc9,0xad,0xdb,0xbf,0xf1,0x8f,0xce,0xa5, -0x5d,0x52,0x06,0xfe,0x2a,0xb5,0x98,0x66,0x10,0xfb,0x6f,0xee,0x3a,0xe1,0xc4,0x95, -0x97,0xdb,0x47,0xd8,0x16,0xbf,0xb5,0x26,0x9a,0xc3,0xf7,0xa8,0xbf,0x91,0xad,0x4b, -0x6f,0xda,0x5b,0x44,0x9b,0x19,0x0a,0x3f,0x1a,0xf8,0xb4,0x6a,0x30,0x9e,0x77,0x0a, -0x6b,0xea,0xb0,0x20,0x3f,0x3f,0xeb,0x5b,0x47,0x36,0xc7,0xad,0x2f,0x7f,0x91,0xd4, -0xb8,0x9e,0xac,0x77,0x68,0xfb,0xa2,0xdf,0xf6,0x84,0xf0,0xec,0xa0,0x66,0x50,0x0f, -0xb3,0x0a,0xb7,0x37,0xc7,0x8f,0x0d,0x43,0x6e,0x65,0x7b,0x8c,0x01,0xdb,0x70,0xcd, -0x7e,0x7b,0xdf,0xf8,0xce,0xd6,0xc9,0x09,0x33,0x85,0xc7,0xfb,0x55,0xc0,0x78,0x93, -0xe2,0xcc,0x80,0x34,0x76,0x92,0xb1,0x27,0xbe,0x6b,0xd5,0xa1,0x8f,0xcc,0x2a,0xbd, -0x52,0x17,0xfa,0xd9,0x56,0x4f,0x96,0x9d,0x3e,0x66,0x7b,0xb7,0xed,0x37,0xf1,0xc6, -0xcf,0x5f,0xd5,0xee,0xe4,0xb5,0x93,0x31,0x74,0x8c,0x1e,0xb5,0xf2,0xd7,0x87,0x3c, -0x2b,0xaf,0xfc,0x6d,0xf1,0xe6,0x9f,0xe1,0x8d,0x0a,0x16,0xb8,0xd4,0x35,0x09,0x76, -0x6e,0xfe,0x08,0x63,0xcf,0xcd,0x23,0x9e,0xca,0xa3,0x24,0x9f,0x6f,0x5a,0x93,0xc2, -0xbe,0x13,0xf1,0x57,0xc6,0x6f,0x16,0x41,0xa3,0x68,0x36,0x13,0x6a,0xba,0x95,0xc3, -0x70,0x89,0xf7,0x51,0x7b,0xbb,0xb1,0xe1,0x54,0x77,0x27,0xfa,0x8a,0xfd,0x46,0xfd, -0x97,0x3f,0x65,0xdd,0x1b,0xf6,0x79,0xf0,0xdb,0x39,0x31,0xea,0x5e,0x2b,0xbe,0x41, -0xfd,0xa1,0xa9,0xe3,0x8c,0x75,0xf2,0xa2,0xcf,0x21,0x01,0xfc,0x58,0xf2,0x7b,0x01, -0xe9,0x61,0x70,0xaf,0x99,0xce,0x5b,0xbd,0x5b,0x34,0xcb,0x30,0x15,0x73,0x1c,0x53, -0xc6,0x62,0x3f,0xe0,0x7a,0x23,0xd2,0xfe,0x17,0x7c,0x3e,0xd3,0x7e,0x15,0xf8,0x03, -0x44,0xf0,0xa6,0x92,0x81,0x6c,0x74,0xbb,0x65,0x81,0x5b,0x1c,0xbb,0x75,0x67,0x3e, -0xec,0xc4,0x93,0xf5,0xae,0xaa,0x90,0x0c,0x52,0xd7,0xd0,0x25,0x6d,0x0f,0xd2,0xd2, -0xb2,0xb2,0x0a,0x28,0xa2,0x81,0x85,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x09,0x46,0x29,0x68,0xa0,0x04,0xc5,0x18,0xa5,0xa2, -0x80,0x13,0x6d,0x26,0xda,0x75,0x14,0x01,0x13,0xda,0xc3,0x26,0x77,0xc4,0x8d,0x9e, -0xb9,0x50,0x6a,0x8d,0xc7,0x86,0xb4,0x9b,0xa0,0x44,0xda,0x5d,0x9c,0xca,0x7a,0x89, -0x20,0x43,0xfd,0x2b,0x4e,0x8a,0x97,0x18,0xbd,0xd1,0x2e,0x31,0x7b,0xa3,0x98,0xb9, -0xf8,0x65,0xe1,0x3b,0xb1,0xfb,0xdf,0x0e,0xe9,0xa7,0xe9,0x6c,0x8b,0xfc,0x85,0x65, -0xdd,0x7c,0x0e,0xf0,0x35,0xd9,0x26,0x4f,0x0e,0x5a,0x0f,0xf7,0x37,0x27,0xf2,0x22, -0xbb,0xba,0x2b,0x37,0x42,0x93,0xde,0x2b,0xee,0x31,0x78,0x7a,0x32,0xde,0x0b,0xee, -0x47,0x96,0x5d,0xfe,0xcc,0xfe,0x00,0xbb,0x24,0xff,0x00,0x64,0x34,0x24,0xff,0x00, -0xcf,0x39,0x9b,0x8f,0xcc,0x9a,0xc7,0xba,0xfd,0x91,0xfc,0x0b,0x71,0xf7,0x12,0xf6, -0x13,0xfe,0xcc,0xaa,0x7f,0x9a,0xd7,0xb5,0xd1,0x59,0x3c,0x25,0x07,0xf6,0x11,0x8b, -0xc0,0xe1,0x9f,0xfc,0xbb,0x47,0xcf,0x37,0xbf,0xb1,0x77,0x85,0x67,0x27,0xc8,0xd4, -0x2e,0xe1,0x1e,0x8e,0x88,0xff,0x00,0xcb,0x15,0x8b,0x75,0xfb,0x0d,0x69,0x12,0xe7, -0xcb,0xd7,0x58,0x7a,0x6f,0xb4,0x07,0xff,0x00,0x66,0xaf,0xa8,0x28,0xac,0xde,0x07, -0x0e,0xfe,0xcf,0xe6,0x64,0xf2,0xcc,0x2b,0xfb,0x1f,0x8b,0x3e,0x3e,0xbf,0xfd,0x84, -0x1c,0x93,0xf6,0x7d,0x56,0xc6,0x40,0x7f,0xe7,0xac,0x4c,0xbf,0xc8,0x1a,0xc1,0xbd, -0xfd,0x83,0x35,0x65,0xc9,0x8e,0xe7,0x4b,0x97,0xe8,0xee,0x0f,0xea,0xa2,0xbe,0xdf, -0xa4,0x6e,0x95,0x93,0xcb,0xa8,0x74,0xbf,0xde,0x60,0xf2,0x8c,0x2b,0xe8,0xfe,0xf3, -0xe0,0x0b,0xef,0xd8,0x67,0xc4,0xd1,0x93,0xe5,0xe9,0xf0,0x4c,0x3f,0xe9,0x95,0xc2, -0x0f,0xe6,0x45,0x61,0x5e,0x7e,0xc5,0x7e,0x30,0xb7,0x04,0x8d,0x16,0x63,0xff,0x00, -0x5c,0xe7,0x46,0xfe,0x4c,0x6b,0xf4,0x6c,0x75,0xa0,0x75,0xac,0xde,0x5d,0x4f,0xa4, -0x99,0xcf,0x2c,0x8f,0x0c,0xfa,0xbf,0xc3,0xfc,0x8f,0xcc,0x3b,0xcf,0xd9,0x53,0xc5, -0xd6,0x8c,0x41,0xd1,0x35,0x51,0x8f,0xee,0xc0,0xec,0x3f,0x30,0x2b,0x16,0xfb,0xf6, -0x7b,0xf1,0x56,0x9e,0xa5,0xa4,0xb1,0xd4,0xa1,0x03,0xbb,0xc0,0xc3,0xfa,0x57,0xea, -0xb8,0xe9,0x4d,0x3c,0xd4,0x3c,0xbb,0xb4,0xd9,0xcb,0x2e,0x1d,0xc3,0xbe,0xbf,0x82, -0x3f,0x24,0x67,0xf8,0x59,0xaf,0xda,0x9c,0x16,0x99,0x7f,0xde,0x42,0x2a,0xa3,0xf8, -0x2b,0xc4,0x50,0x1e,0x25,0x6f,0xc4,0x1a,0xfd,0x75,0x96,0xd6,0x19,0x57,0xe7,0x89, -0x1f,0xfd,0xe5,0x06,0xb3,0x2f,0x3c,0x37,0xa4,0x5d,0xff,0x00,0xaf,0xd2,0xec,0xa6, -0xff,0x00,0xae,0x96,0xe8,0xdf,0xcc,0x57,0x34,0xf0,0x72,0x8f,0xdb,0xfc,0x3f,0xe0, -0x9e,0x65,0x5e,0x1d,0xc3,0xc7,0xb7,0xdd,0xff,0x00,0x04,0xfc,0x94,0x9b,0x44,0xf1, -0x2c,0x2b,0xc3,0x13,0xf4,0xcd,0x64,0x5d,0xe8,0x9e,0x28,0x94,0x13,0x99,0x31,0xec, -0x09,0xaf,0xd4,0x6f,0x14,0x78,0x37,0x40,0x44,0x98,0xae,0x87,0xa6,0x83,0x8e,0xa2, -0xd2,0x3f,0xf0,0xac,0x0f,0x06,0xf8,0x4b,0x43,0x9e,0xf1,0xd6,0x5d,0x1b,0x4f,0x91, -0x72,0x38,0x7b,0x54,0x23,0xf9,0x57,0x1c,0x63,0x25,0x2b,0x2b,0x7d,0xc7,0x8f,0x2c, -0x97,0x0c,0xa5,0xca,0x92,0xfb,0x8f,0xcc,0x9b,0x2f,0x86,0x9e,0x2d,0xf1,0x2d,0xd8, -0xb7,0xb3,0xd3,0xef,0x75,0x19,0xd8,0xf1,0x15,0xbc,0x4c,0xed,0xcf,0xb0,0x15,0xf4, -0x27,0xc2,0x4f,0xf8,0x27,0x6f,0x8a,0x7c,0x4d,0x3c,0x37,0x7e,0x31,0xb9,0x5f,0x0d, -0xe9,0x99,0x05,0xa0,0x52,0x24,0xba,0x71,0xd7,0x85,0x1f,0x2a,0xfd,0x58,0xe4,0x7f, -0x76,0xbf,0x46,0x74,0xed,0x2e,0xcf,0x4c,0xb7,0x58,0xac,0xed,0x20,0xb4,0x8c,0x0e, -0x12,0x08,0xd5,0x00,0xfc,0x00,0xab,0x8b,0x5e,0xfd,0x1c,0x3d,0xd2,0x94,0xdd,0xcf, -0xa2,0xc0,0xf0,0xed,0x18,0x5a,0x75,0x26,0xe4,0xbb,0x5a,0xc8,0xe2,0x7e,0x16,0xfc, -0x1b,0xf0,0xa7,0xc1,0xcd,0x0c,0x69,0x9e,0x18,0xd2,0xe3,0xb3,0x46,0x03,0xce,0xb8, -0x6f,0x9a,0x79,0xc8,0xef,0x23,0xf5,0x3f,0x4e,0x83,0xb0,0x15,0xdb,0x8e,0x28,0x1d, -0x29,0x6b,0xd0,0x49,0x25,0x64,0x7d,0x8c,0x29,0xc6,0x9c,0x54,0x20,0xac,0x90,0x51, -0x45,0x14,0xcd,0x02,0x8a,0x28,0xa0,0x0f,0xff,0xd9,}; - -static const unsigned int dummy_align__runtime_shtml = 3; -static const unsigned char data__runtime_shtml[] = { -/* /runtime.shtml (15 chars) */ -0x2f,0x72,0x75,0x6e,0x74,0x69,0x6d,0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 200 OK -" (17 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, -0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: text/html -Expires: Fri, 10 Apr 2008 14:00:00 GMT -Pragma: no-cache - -" (85 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, -0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x45,0x78,0x70,0x69,0x72,0x65,0x73, -0x3a,0x20,0x46,0x72,0x69,0x2c,0x20,0x31,0x30,0x20,0x41,0x70,0x72,0x20,0x32,0x30, -0x30,0x38,0x20,0x31,0x34,0x3a,0x30,0x30,0x3a,0x30,0x30,0x20,0x47,0x4d,0x54,0x0d, -0x0a,0x50,0x72,0x61,0x67,0x6d,0x61,0x3a,0x20,0x6e,0x6f,0x2d,0x63,0x61,0x63,0x68, -0x65,0x0d,0x0a,0x0d,0x0a, -/* raw file data (758 bytes) */ -0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, -0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, -0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, -0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x20,0x22, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72, -0x67,0x2f,0x54,0x52,0x2f,0x68,0x74,0x6d,0x6c,0x34,0x2f,0x6c,0x6f,0x6f,0x73,0x65, -0x2e,0x64,0x74,0x64,0x22,0x3e,0x0d,0x0a,0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x3c,0x74, -0x69,0x74,0x6c,0x65,0x3e,0x46,0x72,0x65,0x65,0x52,0x54,0x4f,0x53,0x2e,0x6f,0x72, -0x67,0x20,0x6c,0x77,0x49,0x50,0x20,0x57,0x45,0x42,0x20,0x73,0x65,0x72,0x76,0x65, -0x72,0x20,0x64,0x65,0x6d,0x6f,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x3c,0x42,0x4f, -0x44,0x59,0x20,0x6f,0x6e,0x4c,0x6f,0x61,0x64,0x3d,0x22,0x77,0x69,0x6e,0x64,0x6f, -0x77,0x2e,0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x26,0x71,0x75, -0x6f,0x74,0x3b,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x68,0x72,0x65,0x66, -0x3d,0x27,0x72,0x75,0x6e,0x74,0x69,0x6d,0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x27, -0x26,0x71,0x75,0x6f,0x74,0x3b,0x2c,0x32,0x30,0x30,0x30,0x29,0x22,0x3e,0x0d,0x0a, -0x3c,0x66,0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65,0x3d,0x22,0x61,0x72,0x69,0x61, -0x6c,0x22,0x3e,0x0d,0x0a,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x69,0x6e, -0x64,0x65,0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x54,0x61,0x73,0x6b,0x20, -0x53,0x74,0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62,0x3e,0x7c,0x3c,0x2f, -0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x72,0x75,0x6e,0x74, -0x69,0x6d,0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x52,0x75,0x6e,0x20,0x54, -0x69,0x6d,0x65,0x20,0x53,0x74,0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62, -0x3e,0x7c,0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x66,0x72,0x65,0x65,0x72, -0x74,0x6f,0x73,0x2e,0x6f,0x72,0x67,0x2f,0x22,0x3e,0x46,0x72,0x65,0x65,0x52,0x54, -0x4f,0x53,0x20,0x48,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x3c,0x2f,0x61,0x3e,0x20, -0x3c,0x62,0x3e,0x7c,0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66, -0x3d,0x22,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22,0x3e,0x33,0x37,0x4b,0x20, -0x6a,0x70,0x67,0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e, -0x0d,0x0a,0x3c,0x68,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e,0x0d, -0x0a,0x3c,0x68,0x32,0x3e,0x52,0x75,0x6e,0x2d,0x74,0x69,0x6d,0x65,0x20,0x73,0x74, -0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x73,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a,0x50, -0x61,0x67,0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x72,0x65,0x66,0x72,0x65,0x73,0x68, -0x20,0x65,0x76,0x65,0x72,0x79,0x20,0x32,0x20,0x73,0x65,0x63,0x6f,0x6e,0x64,0x73, -0x2e,0x3c,0x70,0x3e,0x0d,0x0a,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65, -0x3d,0x22,0x63,0x6f,0x75,0x72,0x69,0x65,0x72,0x22,0x3e,0x3c,0x70,0x72,0x65,0x3e, -0x54,0x61,0x73,0x6b,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x41,0x62,0x73,0x20,0x54,0x69,0x6d,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x25,0x20, -0x54,0x69,0x6d,0x65,0x3c,0x62,0x72,0x3e,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x21,0x2d,0x2d,0x23,0x72,0x75,0x6e,0x5f,0x73, -0x74,0x61,0x74,0x73,0x2d,0x2d,0x3e,0x0d,0x0d,0x0a,0x3c,0x2f,0x70,0x72,0x65,0x3e, -0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e, -0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74,0x6d, -0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; - - - -const struct fsdata_file file__404_html[] = { { -file_NULL, -data__404_html, -data__404_html + 12, -sizeof(data__404_html) - 12, -1, -}}; - -const struct fsdata_file file__index_shtml[] = { { -file__404_html, -data__index_shtml, -data__index_shtml + 16, -sizeof(data__index_shtml) - 16, -1, -}}; - -const struct fsdata_file file__logo_jpg[] = { { -file__index_shtml, -data__logo_jpg, -data__logo_jpg + 12, -sizeof(data__logo_jpg) - 12, -1, -}}; - -const struct fsdata_file file__runtime_shtml[] = { { -file__logo_jpg, -data__runtime_shtml, -data__runtime_shtml + 16, -sizeof(data__runtime_shtml) - 16, -1, -}}; - -#define FS_ROOT file__runtime_shtml -#define FS_NUMFILES 4 - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.h deleted file mode 100644 index 6f6c557f3..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/fsdata.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __FSDATA_H__ -#define __FSDATA_H__ - -#include "lwip/opt.h" -#include "fs.h" - -struct fsdata_file { - const struct fsdata_file *next; - const unsigned char *name; - const unsigned char *data; - int len; - u8_t http_header_included; -#if HTTPD_PRECALCULATED_CHECKSUM - u16_t chksum_count; - const struct fsdata_chksum *chksum; -#endif /* HTTPD_PRECALCULATED_CHECKSUM */ -}; - -#endif /* __FSDATA_H__ */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.c deleted file mode 100644 index 6f1132caf..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.c +++ /dev/null @@ -1,2184 +0,0 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -/* This httpd supports for a - * rudimentary server-side-include facility which will replace tags of the form - * in any file whose extension is .shtml, .shtm or .ssi with - * strings provided by an include handler whose pointer is provided to the - * module via function http_set_ssi_handler(). - * Additionally, a simple common - * gateway interface (CGI) handling mechanism has been added to allow clients - * to hook functions to particular request URIs. - * - * To enable SSI support, define label LWIP_HTTPD_SSI in lwipopts.h. - * To enable CGI support, define label LWIP_HTTPD_CGI in lwipopts.h. - * - * By default, the server assumes that HTTP headers are already present in - * each file stored in the file system. By defining LWIP_HTTPD_DYNAMIC_HEADERS in - * lwipopts.h, this behavior can be changed such that the server inserts the - * headers automatically based on the extension of the file being served. If - * this mode is used, be careful to ensure that the file system image used - * does not already contain the header information. - * - * File system images without headers can be created using the makefsfile - * tool with the -h command line option. - * - * - * Notes about valid SSI tags - * -------------------------- - * - * The following assumptions are made about tags used in SSI markers: - * - * 1. No tag may contain '-' or whitespace characters within the tag name. - * 2. Whitespace is allowed between the tag leadin "". - * 3. The maximum tag name length is LWIP_HTTPD_MAX_TAG_NAME_LEN, currently 8 characters. - * - * Notes on CGI usage - * ------------------ - * - * The simple CGI support offered here works with GET method requests only - * and can handle up to 16 parameters encoded into the URI. The handler - * function may not write directly to the HTTP output but must return a - * filename that the HTTP server will send to the browser as a response to - * the incoming CGI request. - * - * @todo: - * - don't use mem_malloc() (for SSI/dynamic headers) - * - split too long functions into multiple smaller functions? - * - support more file types? - */ -#include "lwip/debug.h" -#include "lwip/stats.h" -#include "httpd.h" -#include "httpd_structs.h" -#include "lwip/tcp.h" -#include "fs.h" - -#include -#include - -#if LWIP_TCP - -#ifndef HTTPD_DEBUG -#define HTTPD_DEBUG LWIP_DBG_OFF -#endif - -/** Set this to 1 and add the next line to lwippools.h to use a memp pool - * for allocating struct http_state instead of the heap: - * - * LWIP_MEMPOOL(HTTPD_STATE, 20, 100, "HTTPD_STATE") - */ -#ifndef HTTPD_USE_MEM_POOL -#define HTTPD_USE_MEM_POOL 0 -#endif - -/** The server port for HTTPD to use */ -#ifndef HTTPD_SERVER_PORT -#define HTTPD_SERVER_PORT 80 -#endif - -/** Maximum retries before the connection is aborted/closed. - * - number of times pcb->poll is called -> default is 4*500ms = 2s; - * - reset when pcb->sent is called - */ -#ifndef HTTPD_MAX_RETRIES -#define HTTPD_MAX_RETRIES 4 -#endif - -/** The poll delay is X*500ms */ -#ifndef HTTPD_POLL_INTERVAL -#define HTTPD_POLL_INTERVAL 4 -#endif - -/** Priority for tcp pcbs created by HTTPD (very low by default). - * Lower priorities get killed first when running out of memroy. - */ -#ifndef HTTPD_TCP_PRIO -#define HTTPD_TCP_PRIO TCP_PRIO_MIN -#endif - -/** Set this to 1 to enabled timing each file sent */ -#ifndef LWIP_HTTPD_TIMING -#define LWIP_HTTPD_TIMING 0 -#endif -#ifndef HTTPD_DEBUG_TIMING -#define HTTPD_DEBUG_TIMING LWIP_DBG_OFF -#endif - -/** Set this to 1 on platforms where strnstr is not available */ -#ifndef LWIP_HTTPD_STRNSTR_PRIVATE -#define LWIP_HTTPD_STRNSTR_PRIVATE 1 -#endif - -/** Set this to one to show error pages when parsing a request fails instead - of simply closing the connection. */ -#ifndef LWIP_HTTPD_SUPPORT_EXTSTATUS -#define LWIP_HTTPD_SUPPORT_EXTSTATUS 0 -#endif - -/** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */ -#ifndef LWIP_HTTPD_SUPPORT_V09 -#define LWIP_HTTPD_SUPPORT_V09 1 -#endif - -/** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */ -#ifndef LWIP_HTTPD_SUPPORT_REQUESTLIST -#define LWIP_HTTPD_SUPPORT_REQUESTLIST 0 -#endif - -#if LWIP_HTTPD_SUPPORT_REQUESTLIST -/** Number of rx pbufs to enqueue to parse an incoming request (up to the first - newline) */ -#ifndef LWIP_HTTPD_REQ_QUEUELEN -#define LWIP_HTTPD_REQ_QUEUELEN 10 -#endif - -/** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming - request (up to the first double-newline) */ -#ifndef LWIP_HTTPD_REQ_BUFSIZE -#define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH -#endif - -/** Defines the maximum length of a HTTP request line (up to the first CRLF, - copied from pbuf into this a global buffer when pbuf- or packet-queues - are received - otherwise the input pbuf is used directly) */ -#ifndef LWIP_HTTPD_MAX_REQ_LENGTH -#define LWIP_HTTPD_MAX_REQ_LENGTH 1023 -#endif -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - -/** Maximum length of the filename to send as response to a POST request, - * filled in by the application when a POST is finished. - */ -#ifndef LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN -#define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63 -#endif - -/** Set this to 0 to not send the SSI tag (default is on, so the tag will - * be sent in the HTML page */ -#ifndef LWIP_HTTPD_SSI_INCLUDE_TAG -#define LWIP_HTTPD_SSI_INCLUDE_TAG 1 -#endif - -/** Set this to 1 to call tcp_abort when tcp_close fails with memory error. - * This can be used to prevent consuming all memory in situations where the - * HTTP server has low priority compared to other communication. */ -#ifndef LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR -#define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0 -#endif - -#ifndef true -#define true ((u8_t)1) -#endif - -#ifndef false -#define false ((u8_t)0) -#endif - -/** Minimum length for a valid HTTP/0.9 request: "GET /\r\n" -> 7 bytes */ -#define MIN_REQ_LEN 7 - -#define CRLF "\r\n" - -/** These defines check whether tcp_write has to copy data or not */ - -/** This was TI's check whether to let TCP copy data or not -#define HTTP_IS_DATA_VOLATILE(hs) ((hs->file < (char *)0x20000000) ? 0 : TCP_WRITE_FLAG_COPY)*/ -#ifndef HTTP_IS_DATA_VOLATILE -#if LWIP_HTTPD_SSI -/* Copy for SSI files, no copy for non-SSI files */ -#define HTTP_IS_DATA_VOLATILE(hs) ((hs)->tag_check ? TCP_WRITE_FLAG_COPY : 0) -#else /* LWIP_HTTPD_SSI */ -/** Default: don't copy if the data is sent from file-system directly */ -#define HTTP_IS_DATA_VOLATILE(hs) (((hs->file != NULL) && (hs->handle != NULL) && (hs->file == \ - (char*)hs->handle->data + hs->handle->len - hs->left)) \ - ? 0 : TCP_WRITE_FLAG_COPY) -#endif /* LWIP_HTTPD_SSI */ -#endif - -/** Default: headers are sent from ROM */ -#ifndef HTTP_IS_HDR_VOLATILE -#define HTTP_IS_HDR_VOLATILE(hs, ptr) 0 -#endif - -#if LWIP_HTTPD_SSI -/** Default: Tags are sent from struct http_state and are therefore volatile */ -#ifndef HTTP_IS_TAG_VOLATILE -#define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY -#endif -#endif /* LWIP_HTTPD_SSI */ - -typedef struct -{ - const char *name; - u8_t shtml; -} default_filename; - -const default_filename g_psDefaultFilenames[] = { - {"/index.shtml", true }, - {"/index.ssi", true }, - {"/index.shtm", true }, - {"/index.html", false }, - {"/index.htm", false } -}; - -#define NUM_DEFAULT_FILENAMES (sizeof(g_psDefaultFilenames) / \ - sizeof(default_filename)) - -#if LWIP_HTTPD_SUPPORT_REQUESTLIST -/** HTTP request is copied here from pbufs for simple parsing */ -static char httpd_req_buf[LWIP_HTTPD_MAX_REQ_LENGTH+1]; -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - -#if LWIP_HTTPD_SUPPORT_POST -/** Filename for response file to send when POST is finished */ -static char http_post_response_filename[LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN+1]; -#endif /* LWIP_HTTPD_SUPPORT_POST */ - -#if LWIP_HTTPD_DYNAMIC_HEADERS -/* The number of individual strings that comprise the headers sent before each - * requested file. - */ -#define NUM_FILE_HDR_STRINGS 3 -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ - -#if LWIP_HTTPD_SSI - -#define HTTPD_LAST_TAG_PART 0xFFFF - -const char * const g_pcSSIExtensions[] = { - ".shtml", ".shtm", ".ssi", ".xml" -}; - -#define NUM_SHTML_EXTENSIONS (sizeof(g_pcSSIExtensions) / sizeof(const char *)) - -enum tag_check_state { - TAG_NONE, /* Not processing an SSI tag */ - TAG_LEADIN, /* Tag lead in "" being processed */ - TAG_SENDING /* Sending tag replacement string */ -}; -#endif /* LWIP_HTTPD_SSI */ - -struct http_state { - struct fs_file *handle; - char *file; /* Pointer to first unsent byte in buf. */ - -#if LWIP_HTTPD_SUPPORT_REQUESTLIST - struct pbuf *req; -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - -#if LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS - char *buf; /* File read buffer. */ - int buf_len; /* Size of file read buffer, buf. */ -#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ - u32_t left; /* Number of unsent bytes in buf. */ - u8_t retries; -#if LWIP_HTTPD_SSI - const char *parsed; /* Pointer to the first unparsed byte in buf. */ -#if !LWIP_HTTPD_SSI_INCLUDE_TAG - const char *tag_started;/* Poitner to the first opening '<' of the tag. */ -#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ - const char *tag_end; /* Pointer to char after the closing '>' of the tag. */ - u32_t parse_left; /* Number of unparsed bytes in buf. */ - u16_t tag_index; /* Counter used by tag parsing state machine */ - u16_t tag_insert_len; /* Length of insert in string tag_insert */ -#if LWIP_HTTPD_SSI_MULTIPART - u16_t tag_part; /* Counter passed to and changed by tag insertion function to insert multiple times */ -#endif /* LWIP_HTTPD_SSI_MULTIPART */ - u8_t tag_check; /* true if we are processing a .shtml file else false */ - u8_t tag_name_len; /* Length of the tag name in string tag_name */ - char tag_name[LWIP_HTTPD_MAX_TAG_NAME_LEN + 1]; /* Last tag name extracted */ - char tag_insert[LWIP_HTTPD_MAX_TAG_INSERT_LEN + 1]; /* Insert string for tag_name */ - enum tag_check_state tag_state; /* State of the tag processor */ -#endif /* LWIP_HTTPD_SSI */ -#if LWIP_HTTPD_CGI - char *params[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Params extracted from the request URI */ - char *param_vals[LWIP_HTTPD_MAX_CGI_PARAMETERS]; /* Values for each extracted param */ -#endif /* LWIP_HTTPD_CGI */ -#if LWIP_HTTPD_DYNAMIC_HEADERS - const char *hdrs[NUM_FILE_HDR_STRINGS]; /* HTTP headers to be sent. */ - u16_t hdr_pos; /* The position of the first unsent header byte in the - current string */ - u16_t hdr_index; /* The index of the hdr string currently being sent. */ -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ -#if LWIP_HTTPD_TIMING - u32_t time_started; -#endif /* LWIP_HTTPD_TIMING */ -#if LWIP_HTTPD_SUPPORT_POST - u32_t post_content_len_left; -#if LWIP_HTTPD_POST_MANUAL_WND - u32_t unrecved_bytes; - struct tcp_pcb *pcb; - u8_t no_auto_wnd; -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ -#endif /* LWIP_HTTPD_SUPPORT_POST*/ -}; - -static err_t http_find_file(struct http_state *hs, const char *uri, int is_09); -static err_t http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri); -static err_t http_poll(void *arg, struct tcp_pcb *pcb); - -#if LWIP_HTTPD_SSI -/* SSI insert handler function pointer. */ -tSSIHandler g_pfnSSIHandler = NULL; -int g_iNumTags = 0; -const char **g_ppcTags = NULL; - -#define LEN_TAG_LEAD_IN 5 -const char * const g_pcTagLeadIn = ""; -#endif /* LWIP_HTTPD_SSI */ - -#if LWIP_HTTPD_CGI -/* CGI handler information */ -const tCGI *g_pCGIs; -int g_iNumCGIs; -#endif /* LWIP_HTTPD_CGI */ - -#if LWIP_HTTPD_STRNSTR_PRIVATE -/** Like strstr but does not need 'buffer' to be NULL-terminated */ -static char* -strnstr(const char* buffer, const char* token, size_t n) -{ - const char* p; - int tokenlen = (int)strlen(token); - if (tokenlen == 0) { - return (char *)buffer; - } - for (p = buffer; *p && (p + tokenlen <= buffer + n); p++) { - if ((*p == *token) && (strncmp(p, token, tokenlen) == 0)) { - return (char *)p; - } - } - return NULL; -} -#endif /* LWIP_HTTPD_STRNSTR_PRIVATE */ - -/** Allocate a struct http_state. */ -static struct http_state* -http_state_alloc(void) -{ - struct http_state *ret; -#if HTTPD_USE_MEM_POOL - ret = (struct http_state *)memp_malloc(MEMP_HTTPD_STATE); -#else /* HTTPD_USE_MEM_POOL */ - ret = (struct http_state *)mem_malloc(sizeof(struct http_state)); -#endif /* HTTPD_USE_MEM_POOL */ - if (ret != NULL) { - /* Initialize the structure. */ - memset(ret, 0, sizeof(struct http_state)); -#if LWIP_HTTPD_DYNAMIC_HEADERS - /* Indicate that the headers are not yet valid */ - ret->hdr_index = NUM_FILE_HDR_STRINGS; -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ - } - return ret; -} - -/** Free a struct http_state. - * Also frees the file data if dynamic. - */ -static void -http_state_free(struct http_state *hs) -{ - if (hs != NULL) { - if(hs->handle) { -#if LWIP_HTTPD_TIMING - u32_t ms_needed = sys_now() - hs->time_started; - u32_t needed = LWIP_MAX(1, (ms_needed/100)); - LWIP_DEBUGF(HTTPD_DEBUG_TIMING, ("httpd: needed %"U32_F" ms to send file of %d bytes -> %"U32_F" bytes/sec\n", - ms_needed, hs->handle->len, ((((u32_t)hs->handle->len) * 10) / needed))); -#endif /* LWIP_HTTPD_TIMING */ - fs_close(hs->handle); - hs->handle = NULL; - } -#if LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS - if (hs->buf != NULL) { - mem_free(hs->buf); - hs->buf = NULL; - } -#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ -#if HTTPD_USE_MEM_POOL - memp_free(MEMP_HTTPD_STATE, hs); -#else /* HTTPD_USE_MEM_POOL */ - mem_free(hs); -#endif /* HTTPD_USE_MEM_POOL */ - } -} - -/** Call tcp_write() in a loop trying smaller and smaller length - * - * @param pcb tcp_pcb to send - * @param ptr Data to send - * @param length Length of data to send (in/out: on return, contains the - * amount of data sent) - * @param apiflags directly passed to tcp_write - * @return the return value of tcp_write - */ -static err_t -http_write(struct tcp_pcb *pcb, const void* ptr, u16_t *length, u8_t apiflags) -{ - u16_t len; - err_t err; - LWIP_ASSERT("length != NULL", length != NULL); - len = *length; - do { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Trying go send %d bytes\n", len)); - err = tcp_write(pcb, ptr, len, apiflags); - if (err == ERR_MEM) { - if ((tcp_sndbuf(pcb) == 0) || - (tcp_sndqueuelen(pcb) >= TCP_SND_QUEUELEN)) { - /* no need to try smaller sizes */ - len = 1; - } else { - len /= 2; - } - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, - ("Send failed, trying less (%d bytes)\n", len)); - } - } while ((err == ERR_MEM) && (len > 1)); - - if (err == ERR_OK) { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Sent %d bytes\n", len)); - } else { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); - } - - *length = len; - return err; -} - -/** - * The connection shall be actively closed. - * Reset the sent- and recv-callbacks. - * - * @param pcb the tcp pcb to reset callbacks - * @param hs connection state to free - */ -static err_t -http_close_conn(struct tcp_pcb *pcb, struct http_state *hs) -{ - err_t err; - LWIP_DEBUGF(HTTPD_DEBUG, ("Closing connection %p\n", (void*)pcb)); - -#if LWIP_HTTPD_SUPPORT_POST - if (hs != NULL) { - if ((hs->post_content_len_left != 0) -#if LWIP_HTTPD_POST_MANUAL_WND - || ((hs->no_auto_wnd != 0) && (hs->unrecved_bytes != 0)) -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ - ) { - /* make sure the post code knows that the connection is closed */ - http_post_response_filename[0] = 0; - httpd_post_finished(hs, http_post_response_filename, LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN); - } - } -#endif /* LWIP_HTTPD_SUPPORT_POST*/ - - - tcp_arg(pcb, NULL); - tcp_recv(pcb, NULL); - tcp_err(pcb, NULL); - tcp_poll(pcb, NULL, 0); - tcp_sent(pcb, NULL); - if(hs != NULL) { - http_state_free(hs); - } - - err = tcp_close(pcb); - if (err != ERR_OK) { - LWIP_DEBUGF(HTTPD_DEBUG, ("Error %d closing %p\n", err, (void*)pcb)); - /* error closing, try again later in poll */ - tcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); - } - return err; -} -#if LWIP_HTTPD_CGI -/** - * Extract URI parameters from the parameter-part of an URI in the form - * "test.cgi?x=y" @todo: better explanation! - * Pointers to the parameters are stored in hs->param_vals. - * - * @param hs http connection state - * @param params pointer to the NULL-terminated parameter string from the URI - * @return number of parameters extracted - */ -static int -extract_uri_parameters(struct http_state *hs, char *params) -{ - char *pair; - char *equals; - int loop; - - /* If we have no parameters at all, return immediately. */ - if(!params || (params[0] == '\0')) { - return(0); - } - - /* Get a pointer to our first parameter */ - pair = params; - - /* Parse up to LWIP_HTTPD_MAX_CGI_PARAMETERS from the passed string and ignore the - * remainder (if any) */ - for(loop = 0; (loop < LWIP_HTTPD_MAX_CGI_PARAMETERS) && pair; loop++) { - - /* Save the name of the parameter */ - hs->params[loop] = pair; - - /* Remember the start of this name=value pair */ - equals = pair; - - /* Find the start of the next name=value pair and replace the delimiter - * with a 0 to terminate the previous pair string. */ - pair = strchr(pair, '&'); - if(pair) { - *pair = '\0'; - pair++; - } else { - /* We didn't find a new parameter so find the end of the URI and - * replace the space with a '\0' */ - pair = strchr(equals, ' '); - if(pair) { - *pair = '\0'; - } - - /* Revert to NULL so that we exit the loop as expected. */ - pair = NULL; - } - - /* Now find the '=' in the previous pair, replace it with '\0' and save - * the parameter value string. */ - equals = strchr(equals, '='); - if(equals) { - *equals = '\0'; - hs->param_vals[loop] = equals + 1; - } else { - hs->param_vals[loop] = NULL; - } - } - - return loop; -} -#endif /* LWIP_HTTPD_CGI */ - -#if LWIP_HTTPD_SSI -/** - * Insert a tag (found in an shtml in the form of "" into the file. - * The tag's name is stored in hs->tag_name (NULL-terminated), the replacement - * should be written to hs->tag_insert (up to a length of LWIP_HTTPD_MAX_TAG_INSERT_LEN). - * The amount of data written is stored to hs->tag_insert_len. - * - * @todo: return tag_insert_len - maybe it can be removed from struct http_state? - * - * @param hs http connection state - */ -static void -get_tag_insert(struct http_state *hs) -{ - int loop; - size_t len; -#if LWIP_HTTPD_SSI_MULTIPART - u16_t current_tag_part = hs->tag_part; - hs->tag_part = HTTPD_LAST_TAG_PART; -#endif /* LWIP_HTTPD_SSI_MULTIPART */ - - if(g_pfnSSIHandler && g_ppcTags && g_iNumTags) { - - /* Find this tag in the list we have been provided. */ - for(loop = 0; loop < g_iNumTags; loop++) { - if(strcmp(hs->tag_name, g_ppcTags[loop]) == 0) { - hs->tag_insert_len = g_pfnSSIHandler(loop, hs->tag_insert, - LWIP_HTTPD_MAX_TAG_INSERT_LEN -#if LWIP_HTTPD_SSI_MULTIPART - , current_tag_part, &hs->tag_part -#endif /* LWIP_HTTPD_SSI_MULTIPART */ -#if LWIP_HTTPD_FILE_STATE - , hs->handle->state -#endif /* LWIP_HTTPD_FILE_STATE */ - ); - return; - } - } - } - - /* If we drop out, we were asked to serve a page which contains tags that - * we don't have a handler for. Merely echo back the tags with an error - * marker. */ -#define UNKNOWN_TAG1_TEXT "***UNKNOWN TAG " -#define UNKNOWN_TAG1_LEN 18 -#define UNKNOWN_TAG2_TEXT "***" -#define UNKNOWN_TAG2_LEN 7 - len = LWIP_MIN(strlen(hs->tag_name), - LWIP_HTTPD_MAX_TAG_INSERT_LEN - (UNKNOWN_TAG1_LEN + UNKNOWN_TAG2_LEN)); - MEMCPY(hs->tag_insert, UNKNOWN_TAG1_TEXT, UNKNOWN_TAG1_LEN); - MEMCPY(&hs->tag_insert[UNKNOWN_TAG1_LEN], hs->tag_name, len); - MEMCPY(&hs->tag_insert[UNKNOWN_TAG1_LEN + len], UNKNOWN_TAG2_TEXT, UNKNOWN_TAG2_LEN); - hs->tag_insert[UNKNOWN_TAG1_LEN + len + UNKNOWN_TAG2_LEN] = 0; - - len = strlen(hs->tag_insert); - LWIP_ASSERT("len <= 0xffff", len <= 0xffff); - hs->tag_insert_len = (u16_t)len; -} -#endif /* LWIP_HTTPD_SSI */ - -#if LWIP_HTTPD_DYNAMIC_HEADERS -/** - * Generate the relevant HTTP headers for the given filename and write - * them into the supplied buffer. - */ -static void -get_http_headers(struct http_state *pState, char *pszURI) -{ - unsigned int iLoop; - char *pszWork; - char *pszExt; - char *pszVars; - - /* Ensure that we initialize the loop counter. */ - iLoop = 0; - - /* In all cases, the second header we send is the server identification - so set it here. */ - pState->hdrs[1] = g_psHTTPHeaderStrings[HTTP_HDR_SERVER]; - - /* Is this a normal file or the special case we use to send back the - default "404: Page not found" response? */ - if (pszURI == NULL) { - pState->hdrs[0] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; - pState->hdrs[2] = g_psHTTPHeaderStrings[DEFAULT_404_HTML]; - - /* Set up to send the first header string. */ - pState->hdr_index = 0; - pState->hdr_pos = 0; - return; - } else { - /* We are dealing with a particular filename. Look for one other - special case. We assume that any filename with "404" in it must be - indicative of a 404 server error whereas all other files require - the 200 OK header. */ - if (strstr(pszURI, "404")) { - pState->hdrs[0] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_FOUND]; - } else if (strstr(pszURI, "400")) { - pState->hdrs[0] = g_psHTTPHeaderStrings[HTTP_HDR_BAD_REQUEST]; - } else if (strstr(pszURI, "501")) { - pState->hdrs[0] = g_psHTTPHeaderStrings[HTTP_HDR_NOT_IMPL]; - } else { - pState->hdrs[0] = g_psHTTPHeaderStrings[HTTP_HDR_OK]; - } - - /* Determine if the URI has any variables and, if so, temporarily remove - them. */ - pszVars = strchr(pszURI, '?'); - if(pszVars) { - *pszVars = '\0'; - } - - /* Get a pointer to the file extension. We find this by looking for the - last occurrence of "." in the filename passed. */ - pszExt = NULL; - pszWork = strchr(pszURI, '.'); - while(pszWork) { - pszExt = pszWork + 1; - pszWork = strchr(pszExt, '.'); - } - - /* Now determine the content type and add the relevant header for that. */ - for(iLoop = 0; (iLoop < NUM_HTTP_HEADERS) && pszExt; iLoop++) { - /* Have we found a matching extension? */ - if(!strcmp(g_psHTTPHeaders[iLoop].extension, pszExt)) { - pState->hdrs[2] = - g_psHTTPHeaderStrings[g_psHTTPHeaders[iLoop].headerIndex]; - break; - } - } - - /* Reinstate the parameter marker if there was one in the original URI. */ - if(pszVars) { - *pszVars = '?'; - } - } - - /* Does the URL passed have any file extension? If not, we assume it - is a special-case URL used for control state notification and we do - not send any HTTP headers with the response. */ - if(!pszExt) { - /* Force the header index to a value indicating that all headers - have already been sent. */ - pState->hdr_index = NUM_FILE_HDR_STRINGS; - } else { - /* Did we find a matching extension? */ - if(iLoop == NUM_HTTP_HEADERS) { - /* No - use the default, plain text file type. */ - pState->hdrs[2] = g_psHTTPHeaderStrings[HTTP_HDR_DEFAULT_TYPE]; - } - - /* Set up to send the first header string. */ - pState->hdr_index = 0; - pState->hdr_pos = 0; - } -} -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ - -/** - * Try to send more data on this pcb. - * - * @param pcb the pcb to send data - * @param hs connection state - */ -static u8_t -http_send_data(struct tcp_pcb *pcb, struct http_state *hs) -{ - err_t err; - u16_t len; - u16_t mss; - u8_t data_to_send = false; -#if LWIP_HTTPD_DYNAMIC_HEADERS - u16_t hdrlen, sendlen; -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ - - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_send_data: pcb=%p hs=%p left=%d\n", (void*)pcb, - (void*)hs, hs != NULL ? hs->left : 0)); - -#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND - if (hs->unrecved_bytes != 0) { - return 0; - } -#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ - -#if LWIP_HTTPD_DYNAMIC_HEADERS - /* If we were passed a NULL state structure pointer, ignore the call. */ - if (hs == NULL) { - return 0; - } - - /* Assume no error until we find otherwise */ - err = ERR_OK; - - /* Do we have any more header data to send for this file? */ - if(hs->hdr_index < NUM_FILE_HDR_STRINGS) { - /* How much data can we send? */ - len = tcp_sndbuf(pcb); - sendlen = len; - - while(len && (hs->hdr_index < NUM_FILE_HDR_STRINGS) && sendlen) { - const void *ptr; - u16_t old_sendlen; - /* How much do we have to send from the current header? */ - hdrlen = (u16_t)strlen(hs->hdrs[hs->hdr_index]); - - /* How much of this can we send? */ - sendlen = (len < (hdrlen - hs->hdr_pos)) ? len : (hdrlen - hs->hdr_pos); - - /* Send this amount of data or as much as we can given memory - * constraints. */ - ptr = (const void *)(hs->hdrs[hs->hdr_index] + hs->hdr_pos); - old_sendlen = sendlen; - err = http_write(pcb, ptr, &sendlen, HTTP_IS_HDR_VOLATILE(hs, ptr)); - if ((err == ERR_OK) && (old_sendlen != sendlen)) { - /* Remember that we added some more data to be transmitted. */ - data_to_send = true; - } else if (err != ERR_OK) { - /* special case: http_write does not try to send 1 byte */ - sendlen = 0; - } - - /* Fix up the header position for the next time round. */ - hs->hdr_pos += sendlen; - len -= sendlen; - - /* Have we finished sending this string? */ - if(hs->hdr_pos == hdrlen) { - /* Yes - move on to the next one */ - hs->hdr_index++; - hs->hdr_pos = 0; - } - } - - /* If we get here and there are still header bytes to send, we send - * the header information we just wrote immediately. If there are no - * more headers to send, but we do have file data to send, drop through - * to try to send some file data too. */ - if((hs->hdr_index < NUM_FILE_HDR_STRINGS) || !hs->file) { - LWIP_DEBUGF(HTTPD_DEBUG, ("tcp_output\n")); - return 1; - } - } -#else /* LWIP_HTTPD_DYNAMIC_HEADERS */ - /* Assume no error until we find otherwise */ - err = ERR_OK; -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ - - /* Have we run out of file data to send? If so, we need to read the next - * block from the file. */ - if (hs->left == 0) { -#if LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS - int count; -#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ - - /* Do we have a valid file handle? */ - if (hs->handle == NULL) { - /* No - close the connection. */ - http_close_conn(pcb, hs); - return 0; - } - if (fs_bytes_left(hs->handle) <= 0) { - /* We reached the end of the file so this request is done. - * @todo: don't close here for HTTP/1.1? */ - LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); - http_close_conn(pcb, hs); - return 0; - } -#if LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS - /* Do we already have a send buffer allocated? */ - if(hs->buf) { - /* Yes - get the length of the buffer */ - count = hs->buf_len; - } else { - /* We don't have a send buffer so allocate one up to 2mss bytes long. */ - count = 2 * tcp_mss(pcb); - do { - hs->buf = (char*)mem_malloc((mem_size_t)count); - if (hs->buf != NULL) { - hs->buf_len = count; - break; - } - count = count / 2; - } while (count > 100); - - /* Did we get a send buffer? If not, return immediately. */ - if (hs->buf == NULL) { - LWIP_DEBUGF(HTTPD_DEBUG, ("No buff\n")); - return 0; - } - } - - /* Read a block of data from the file. */ - LWIP_DEBUGF(HTTPD_DEBUG, ("Trying to read %d bytes.\n", count)); - - count = fs_read(hs->handle, hs->buf, count); - if(count < 0) { - /* We reached the end of the file so this request is done. - * @todo: don't close here for HTTP/1.1? */ - LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); - http_close_conn(pcb, hs); - return 1; - } - - /* Set up to send the block of data we just read */ - LWIP_DEBUGF(HTTPD_DEBUG, ("Read %d bytes.\n", count)); - hs->left = count; - hs->file = hs->buf; -#if LWIP_HTTPD_SSI - hs->parse_left = count; - hs->parsed = hs->buf; -#endif /* LWIP_HTTPD_SSI */ -#else /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ - LWIP_ASSERT("SSI and DYNAMIC_HEADERS turned off but eof not reached", 0); -#endif /* LWIP_HTTPD_SSI || LWIP_HTTPD_DYNAMIC_HEADERS */ - } - -#if LWIP_HTTPD_SSI - if(!hs->tag_check) { -#endif /* LWIP_HTTPD_SSI */ - /* We are not processing an SHTML file so no tag checking is necessary. - * Just send the data as we received it from the file. */ - - /* We cannot send more data than space available in the send - buffer. */ - if (tcp_sndbuf(pcb) < hs->left) { - len = tcp_sndbuf(pcb); - } else { - len = (u16_t)hs->left; - LWIP_ASSERT("hs->left did not fit into u16_t!", (len == hs->left)); - } - mss = tcp_mss(pcb); - if(len > (2 * mss)) { - len = 2 * mss; - } - - err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); - if (err == ERR_OK) { - data_to_send = true; - hs->file += len; - hs->left -= len; - } -#if LWIP_HTTPD_SSI - } else { - /* We are processing an SHTML file so need to scan for tags and replace - * them with insert strings. We need to be careful here since a tag may - * straddle the boundary of two blocks read from the file and we may also - * have to split the insert string between two tcp_write operations. */ - - /* How much data could we send? */ - len = tcp_sndbuf(pcb); - - /* Do we have remaining data to send before parsing more? */ - if(hs->parsed > hs->file) { - /* We cannot send more data than space available in the send - buffer. */ - if (tcp_sndbuf(pcb) < (hs->parsed - hs->file)) { - len = tcp_sndbuf(pcb); - } else { - LWIP_ASSERT("Data size does not fit into u16_t!", - (hs->parsed - hs->file) <= 0xffff); - len = (u16_t)(hs->parsed - hs->file); - } - mss = tcp_mss(pcb); - if(len > (2 * mss)) { - len = 2 * mss; - } - - err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); - if (err == ERR_OK) { - data_to_send = true; - hs->file += len; - hs->left -= len; - } - - /* If the send buffer is full, return now. */ - if(tcp_sndbuf(pcb) == 0) { - return data_to_send; - } - } - - LWIP_DEBUGF(HTTPD_DEBUG, ("State %d, %d left\n", hs->tag_state, hs->parse_left)); - - /* We have sent all the data that was already parsed so continue parsing - * the buffer contents looking for SSI tags. */ - while((hs->parse_left) && (err == ERR_OK)) { - /* @todo: somewhere in this loop, 'len' should grow again... */ - if (len == 0) { - return data_to_send; - } - switch(hs->tag_state) { - case TAG_NONE: - /* We are not currently processing an SSI tag so scan for the - * start of the lead-in marker. */ - if(*hs->parsed == g_pcTagLeadIn[0]) { - /* We found what could be the lead-in for a new tag so change - * state appropriately. */ - hs->tag_state = TAG_LEADIN; - hs->tag_index = 1; -#if !LWIP_HTTPD_SSI_INCLUDE_TAG - hs->tag_started = hs->parsed; -#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG */ - } - - /* Move on to the next character in the buffer */ - hs->parse_left--; - hs->parsed++; - break; - - case TAG_LEADIN: - /* We are processing the lead-in marker, looking for the start of - * the tag name. */ - - /* Have we reached the end of the leadin? */ - if(hs->tag_index == LEN_TAG_LEAD_IN) { - hs->tag_index = 0; - hs->tag_state = TAG_FOUND; - } else { - /* Have we found the next character we expect for the tag leadin? */ - if(*hs->parsed == g_pcTagLeadIn[hs->tag_index]) { - /* Yes - move to the next one unless we have found the complete - * leadin, in which case we start looking for the tag itself */ - hs->tag_index++; - } else { - /* We found an unexpected character so this is not a tag. Move - * back to idle state. */ - hs->tag_state = TAG_NONE; - } - - /* Move on to the next character in the buffer */ - hs->parse_left--; - hs->parsed++; - } - break; - - case TAG_FOUND: - /* We are reading the tag name, looking for the start of the - * lead-out marker and removing any whitespace found. */ - - /* Remove leading whitespace between the tag leading and the first - * tag name character. */ - if((hs->tag_index == 0) && ((*hs->parsed == ' ') || - (*hs->parsed == '\t') || (*hs->parsed == '\n') || - (*hs->parsed == '\r'))) { - /* Move on to the next character in the buffer */ - hs->parse_left--; - hs->parsed++; - break; - } - - /* Have we found the end of the tag name? This is signalled by - * us finding the first leadout character or whitespace */ - if((*hs->parsed == g_pcTagLeadOut[0]) || - (*hs->parsed == ' ') || (*hs->parsed == '\t') || - (*hs->parsed == '\n') || (*hs->parsed == '\r')) { - - if(hs->tag_index == 0) { - /* We read a zero length tag so ignore it. */ - hs->tag_state = TAG_NONE; - } else { - /* We read a non-empty tag so go ahead and look for the - * leadout string. */ - hs->tag_state = TAG_LEADOUT; - LWIP_ASSERT("hs->tag_index <= 0xff", hs->tag_index <= 0xff); - hs->tag_name_len = (u8_t)hs->tag_index; - hs->tag_name[hs->tag_index] = '\0'; - if(*hs->parsed == g_pcTagLeadOut[0]) { - hs->tag_index = 1; - } else { - hs->tag_index = 0; - } - } - } else { - /* This character is part of the tag name so save it */ - if(hs->tag_index < LWIP_HTTPD_MAX_TAG_NAME_LEN) { - hs->tag_name[hs->tag_index++] = *hs->parsed; - } else { - /* The tag was too long so ignore it. */ - hs->tag_state = TAG_NONE; - } - } - - /* Move on to the next character in the buffer */ - hs->parse_left--; - hs->parsed++; - - break; - - /* We are looking for the end of the lead-out marker. */ - case TAG_LEADOUT: - /* Remove leading whitespace between the tag leading and the first - * tag leadout character. */ - if((hs->tag_index == 0) && ((*hs->parsed == ' ') || - (*hs->parsed == '\t') || (*hs->parsed == '\n') || - (*hs->parsed == '\r'))) { - /* Move on to the next character in the buffer */ - hs->parse_left--; - hs->parsed++; - break; - } - - /* Have we found the next character we expect for the tag leadout? */ - if(*hs->parsed == g_pcTagLeadOut[hs->tag_index]) { - /* Yes - move to the next one unless we have found the complete - * leadout, in which case we need to call the client to process - * the tag. */ - - /* Move on to the next character in the buffer */ - hs->parse_left--; - hs->parsed++; - - if(hs->tag_index == (LEN_TAG_LEAD_OUT - 1)) { - /* Call the client to ask for the insert string for the - * tag we just found. */ -#if LWIP_HTTPD_SSI_MULTIPART - hs->tag_part = 0; /* start with tag part 0 */ -#endif /* LWIP_HTTPD_SSI_MULTIPART */ - get_tag_insert(hs); - - /* Next time through, we are going to be sending data - * immediately, either the end of the block we start - * sending here or the insert string. */ - hs->tag_index = 0; - hs->tag_state = TAG_SENDING; - hs->tag_end = hs->parsed; -#if !LWIP_HTTPD_SSI_INCLUDE_TAG - hs->parsed = hs->tag_started; -#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ - - /* If there is any unsent data in the buffer prior to the - * tag, we need to send it now. */ - if (hs->tag_end > hs->file) { - /* How much of the data can we send? */ -#if LWIP_HTTPD_SSI_INCLUDE_TAG - if(len > hs->tag_end - hs->file) { - len = (u16_t)(hs->tag_end - hs->file); - } -#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ - if(len > hs->tag_started - hs->file) { - /* we would include the tag in sending */ - len = (u16_t)(hs->tag_started - hs->file); - } -#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ - - err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); - if (err == ERR_OK) { - data_to_send = true; -#if !LWIP_HTTPD_SSI_INCLUDE_TAG - if(hs->tag_started <= hs->file) { - /* pretend to have sent the tag, too */ - len += hs->tag_end - hs->tag_started; - } -#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ - hs->file += len; - hs->left -= len; - } - } - } else { - hs->tag_index++; - } - } else { - /* We found an unexpected character so this is not a tag. Move - * back to idle state. */ - hs->parse_left--; - hs->parsed++; - hs->tag_state = TAG_NONE; - } - break; - - /* - * We have found a valid tag and are in the process of sending - * data as a result of that discovery. We send either remaining data - * from the file prior to the insert point or the insert string itself. - */ - case TAG_SENDING: - /* Do we have any remaining file data to send from the buffer prior - * to the tag? */ - if(hs->tag_end > hs->file) { - /* How much of the data can we send? */ -#if LWIP_HTTPD_SSI_INCLUDE_TAG - if(len > hs->tag_end - hs->file) { - len = (u16_t)(hs->tag_end - hs->file); - } -#else /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ - LWIP_ASSERT("hs->started >= hs->file", hs->tag_started >= hs->file); - if (len > hs->tag_started - hs->file) { - /* we would include the tag in sending */ - len = (u16_t)(hs->tag_started - hs->file); - } -#endif /* LWIP_HTTPD_SSI_INCLUDE_TAG*/ - if (len != 0) { - err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); - } else { - err = ERR_OK; - } - if (err == ERR_OK) { - data_to_send = true; -#if !LWIP_HTTPD_SSI_INCLUDE_TAG - if(hs->tag_started <= hs->file) { - /* pretend to have sent the tag, too */ - len += hs->tag_end - hs->tag_started; - } -#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ - hs->file += len; - hs->left -= len; - } - } else { -#if LWIP_HTTPD_SSI_MULTIPART - if(hs->tag_index >= hs->tag_insert_len) { - /* Did the last SSIHandler have more to send? */ - if (hs->tag_part != HTTPD_LAST_TAG_PART) { - /* If so, call it again */ - hs->tag_index = 0; - get_tag_insert(hs); - } - } -#endif /* LWIP_HTTPD_SSI_MULTIPART */ - - /* Do we still have insert data left to send? */ - if(hs->tag_index < hs->tag_insert_len) { - /* We are sending the insert string itself. How much of the - * insert can we send? */ - if(len > (hs->tag_insert_len - hs->tag_index)) { - len = (hs->tag_insert_len - hs->tag_index); - } - - /* Note that we set the copy flag here since we only have a - * single tag insert buffer per connection. If we don't do - * this, insert corruption can occur if more than one insert - * is processed before we call tcp_output. */ - err = http_write(pcb, &(hs->tag_insert[hs->tag_index]), &len, - HTTP_IS_TAG_VOLATILE(hs)); - if (err == ERR_OK) { - data_to_send = true; - hs->tag_index += len; - /* Don't return here: keep on sending data */ - } - } else { - /* We have sent all the insert data so go back to looking for - * a new tag. */ - LWIP_DEBUGF(HTTPD_DEBUG, ("Everything sent.\n")); - hs->tag_index = 0; - hs->tag_state = TAG_NONE; -#if !LWIP_HTTPD_SSI_INCLUDE_TAG - hs->parsed = hs->tag_end; -#endif /* !LWIP_HTTPD_SSI_INCLUDE_TAG*/ - } - break; - } - } - } - - /* If we drop out of the end of the for loop, this implies we must have - * file data to send so send it now. In TAG_SENDING state, we've already - * handled this so skip the send if that's the case. */ - if((hs->tag_state != TAG_SENDING) && (hs->parsed > hs->file)) { - /* We cannot send more data than space available in the send - buffer. */ - if (tcp_sndbuf(pcb) < (hs->parsed - hs->file)) { - len = tcp_sndbuf(pcb); - } else { - LWIP_ASSERT("Data size does not fit into u16_t!", - (hs->parsed - hs->file) <= 0xffff); - len = (u16_t)(hs->parsed - hs->file); - } - if(len > (2 * tcp_mss(pcb))) { - len = 2 * tcp_mss(pcb); - } - - err = http_write(pcb, hs->file, &len, HTTP_IS_DATA_VOLATILE(hs)); - if (err == ERR_OK) { - data_to_send = true; - hs->file += len; - hs->left -= len; - } - } - } -#endif /* LWIP_HTTPD_SSI */ - - if((hs->left == 0) && (fs_bytes_left(hs->handle) <= 0)) { - /* We reached the end of the file so this request is done. - * This adds the FIN flag right into the last data segment. - * @todo: don't close here for HTTP/1.1? */ - LWIP_DEBUGF(HTTPD_DEBUG, ("End of file.\n")); - http_close_conn(pcb, hs); - return 0; - } - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("send_data end.\n")); - return data_to_send; -} - -#if LWIP_HTTPD_SUPPORT_EXTSTATUS -/** Initialize a http connection with a file to send for an error message - * - * @param hs http connection state - * @param error_nr HTTP error number - * @return ERR_OK if file was found and hs has been initialized correctly - * another err_t otherwise - */ -static err_t -http_find_error_file(struct http_state *hs, u16_t error_nr) -{ - const char *uri1, *uri2, *uri3; - struct fs_file *file; - - if (error_nr == 501) { - uri1 = "/501.html"; - uri2 = "/501.htm"; - uri3 = "/501.shtml"; - } else { - /* 400 (bad request is the default) */ - uri1 = "/400.html"; - uri2 = "/400.htm"; - uri3 = "/400.shtml"; - } - file = fs_open(uri1); - if (file == NULL) { - file = fs_open(uri2); - if (file == NULL) { - file = fs_open(uri3); - if (file == NULL) { - LWIP_DEBUGF(HTTPD_DEBUG, ("Error page for error %"U16_F" not found\n", - error_nr)); - return ERR_ARG; - } - } - } - return http_init_file(hs, file, 0, NULL); -} -#else /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ -#define http_find_error_file(hs, error_nr) ERR_ARG -#endif /* LWIP_HTTPD_SUPPORT_EXTSTATUS */ - -/** - * Get the file struct for a 404 error page. - * Tries some file names and returns NULL if none found. - * - * @param uri pointer that receives the actual file name URI - * @return file struct for the error page or NULL no matching file was found - */ -static struct fs_file * -http_get_404_file(const char **uri) -{ - struct fs_file *file; - - *uri = "/404.html"; - file = fs_open(*uri); - if(file == NULL) { - /* 404.html doesn't exist. Try 404.htm instead. */ - *uri = "/404.htm"; - file = fs_open(*uri); - if(file == NULL) { - /* 404.htm doesn't exist either. Try 404.shtml instead. */ - *uri = "/404.shtml"; - file = fs_open(*uri); - if(file == NULL) { - /* 404.htm doesn't exist either. Indicate to the caller that it should - * send back a default 404 page. - */ - *uri = NULL; - } - } - } - - return file; -} - -#if LWIP_HTTPD_SUPPORT_POST -static err_t -http_handle_post_finished(struct http_state *hs) -{ - /* application error or POST finished */ - /* NULL-terminate the buffer */ - http_post_response_filename[0] = 0; - httpd_post_finished(hs, http_post_response_filename, LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN); - return http_find_file(hs, http_post_response_filename, 0); -} - -/** Pass received POST body data to the application and correctly handle - * returning a response document or closing the connection. - * ATTENTION: The application is responsible for the pbuf now, so don't free it! - * - * @param hs http connection state - * @param p pbuf to pass to the application - * @return ERR_OK if passed successfully, another err_t if the response file - * hasn't been found (after POST finished) - */ -static err_t -http_post_rxpbuf(struct http_state *hs, struct pbuf *p) -{ - err_t err; - - /* adjust remaining Content-Length */ - if (hs->post_content_len_left < p->tot_len) { - hs->post_content_len_left = 0; - } else { - hs->post_content_len_left -= p->tot_len; - } - err = httpd_post_receive_data(hs, p); - if ((err != ERR_OK) || (hs->post_content_len_left == 0)) { -#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND - if (hs->unrecved_bytes != 0) { - return ERR_OK; - } -#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ - /* application error or POST finished */ - return http_handle_post_finished(hs); - } - - return ERR_OK; -} - -/** Handle a post request. Called from http_parse_request when method 'POST' - * is found. - * - * @param pcb The tcp_pcb which received this packet. - * @param p The input pbuf (containing the POST header and body). - * @param hs The http connection state. - * @param data HTTP request (header and part of body) from input pbuf(s). - * @param data_len Size of 'data'. - * @param uri The HTTP URI parsed from input pbuf(s). - * @param uri_end Pointer to the end of 'uri' (here, the rest of the HTTP - * header starts). - * @return ERR_OK: POST correctly parsed and accepted by the application. - * ERR_INPROGRESS: POST not completely parsed (no error yet) - * another err_t: Error parsing POST or denied by the application - */ -static err_t -http_post_request(struct tcp_pcb *pcb, struct pbuf **inp, struct http_state *hs, - char *data, u16_t data_len, char *uri, char *uri_end) -{ - err_t err; - /* search for end-of-header (first double-CRLF) */ - char* crlfcrlf = strnstr(uri_end + 1, CRLF CRLF, data_len - (uri_end + 1 - data)); - -#if LWIP_HTTPD_POST_MANUAL_WND - hs->pcb = pcb; -#else /* LWIP_HTTPD_POST_MANUAL_WND */ - LWIP_UNUSED_ARG(pcb); /* only used for LWIP_HTTPD_POST_MANUAL_WND */ -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ - - if (crlfcrlf != NULL) { - /* search for "Content-Length: " */ -#define HTTP_HDR_CONTENT_LEN "Content-Length: " -#define HTTP_HDR_CONTENT_LEN_LEN 16 -#define HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN 10 - char *scontent_len = strnstr(uri_end + 1, HTTP_HDR_CONTENT_LEN, crlfcrlf - (uri_end + 1)); - if (scontent_len != NULL) { - char *scontent_len_end = strnstr(scontent_len + HTTP_HDR_CONTENT_LEN_LEN, CRLF, HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN); - if (scontent_len_end != NULL) { - int content_len; - char *conten_len_num = scontent_len + HTTP_HDR_CONTENT_LEN_LEN; - *scontent_len_end = 0; - content_len = atoi(conten_len_num); - if (content_len > 0) { - /* adjust length of HTTP header passed to application */ - const char *hdr_start_after_uri = uri_end + 1; - u16_t hdr_len = LWIP_MIN(data_len, crlfcrlf + 4 - data); - u16_t hdr_data_len = LWIP_MIN(data_len, crlfcrlf + 4 - hdr_start_after_uri); - u8_t post_auto_wnd = 1; - http_post_response_filename[0] = 0; - err = httpd_post_begin(hs, uri, hdr_start_after_uri, hdr_data_len, content_len, - http_post_response_filename, LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN, &post_auto_wnd); - if (err == ERR_OK) { - /* try to pass in data of the first pbuf(s) */ - struct pbuf *q = *inp; - u16_t start_offset = hdr_len; -#if LWIP_HTTPD_POST_MANUAL_WND - hs->no_auto_wnd = !post_auto_wnd; -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ - /* set the Content-Length to be received for this POST */ - hs->post_content_len_left = (u32_t)content_len; - - /* get to the pbuf where the body starts */ - while((q != NULL) && (q->len <= start_offset)) { - struct pbuf *head = q; - start_offset -= q->len; - q = q->next; - /* free the head pbuf */ - head->next = NULL; - pbuf_free(head); - } - *inp = NULL; - if (q != NULL) { - /* hide the remaining HTTP header */ - pbuf_header(q, -(s16_t)start_offset); -#if LWIP_HTTPD_POST_MANUAL_WND - if (!post_auto_wnd) { - /* already tcp_recved() this data... */ - hs->unrecved_bytes = q->tot_len; - } -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ - return http_post_rxpbuf(hs, q); - } else { - return ERR_OK; - } - } else { - /* return file passed from application */ - return http_find_file(hs, http_post_response_filename, 0); - } - } else { - LWIP_DEBUGF(HTTPD_DEBUG, ("POST received invalid Content-Length: %s\n", - conten_len_num)); - return ERR_ARG; - } - } - } - } - /* if we come here, the POST is incomplete */ -#if LWIP_HTTPD_SUPPORT_REQUESTLIST - return ERR_INPROGRESS; -#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - return ERR_ARG; -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ -} - -#if LWIP_HTTPD_POST_MANUAL_WND -/** A POST implementation can call this function to update the TCP window. - * This can be used to throttle data reception (e.g. when received data is - * programmed to flash and data is received faster than programmed). - * - * @param connection A connection handle passed to httpd_post_begin for which - * httpd_post_finished has *NOT* been called yet! - * @param recved_len Length of data received (for window update) - */ -void httpd_post_data_recved(void *connection, u16_t recved_len) -{ - struct http_state *hs = (struct http_state*)connection; - if (hs != NULL) { - if (hs->no_auto_wnd) { - u16_t len = recved_len; - if (hs->unrecved_bytes >= recved_len) { - hs->unrecved_bytes -= recved_len; - } else { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_LEVEL_WARNING, ("httpd_post_data_recved: recved_len too big\n")); - len = (u16_t)hs->unrecved_bytes; - hs->unrecved_bytes = 0; - } - if (hs->pcb != NULL) { - if (len != 0) { - tcp_recved(hs->pcb, len); - } - if ((hs->post_content_len_left == 0) && (hs->unrecved_bytes == 0)) { - /* finished handling POST */ - http_handle_post_finished(hs); - http_send_data(hs->pcb, hs); - } - } - } - } -} -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ - -#endif /* LWIP_HTTPD_SUPPORT_POST */ - -/** - * When data has been received in the correct state, try to parse it - * as a HTTP request. - * - * @param p the received pbuf - * @param hs the connection state - * @param pcb the tcp_pcb which received this packet - * @return ERR_OK if request was OK and hs has been initialized correctly - * ERR_INPROGRESS if request was OK so far but not fully received - * another err_t otherwise - */ -static err_t -http_parse_request(struct pbuf **inp, struct http_state *hs, struct tcp_pcb *pcb) -{ - char *data; - char *crlf; - u16_t data_len; - struct pbuf *p = *inp; -#if LWIP_HTTPD_SUPPORT_REQUESTLIST - u16_t clen; -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ -#if LWIP_HTTPD_SUPPORT_POST - err_t err; -#endif /* LWIP_HTTPD_SUPPORT_POST */ - - LWIP_UNUSED_ARG(pcb); /* only used for post */ - LWIP_ASSERT("p != NULL", p != NULL); - LWIP_ASSERT("hs != NULL", hs != NULL); - - if ((hs->handle != NULL) || (hs->file != NULL)) { - LWIP_DEBUGF(HTTPD_DEBUG, ("Received data while sending a file\n")); - /* already sending a file */ - /* @todo: abort? */ - return ERR_USE; - } - -#if LWIP_HTTPD_SUPPORT_REQUESTLIST - - LWIP_DEBUGF(HTTPD_DEBUG, ("Received %"U16_F" bytes\n", p->tot_len)); - - /* first check allowed characters in this pbuf? */ - - /* enqueue the pbuf */ - if (hs->req == NULL) { - LWIP_DEBUGF(HTTPD_DEBUG, ("First pbuf\n")); - hs->req = p; - } else { - LWIP_DEBUGF(HTTPD_DEBUG, ("pbuf enqueued\n")); - pbuf_cat(hs->req, p); - } - - if (hs->req->next != NULL) { - data_len = LWIP_MIN(hs->req->tot_len, LWIP_HTTPD_MAX_REQ_LENGTH); - pbuf_copy_partial(hs->req, httpd_req_buf, data_len, 0); - data = httpd_req_buf; - } else -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - { - data = (char *)p->payload; - data_len = p->len; - if (p->len != p->tot_len) { - LWIP_DEBUGF(HTTPD_DEBUG, ("Warning: incomplete header due to chained pbufs\n")); - } - } - - /* received enough data for minimal request? */ - if (data_len >= MIN_REQ_LEN) { - /* wait for CRLF before parsing anything */ - crlf = strnstr(data, CRLF, data_len); - if (crlf != NULL) { -#if LWIP_HTTPD_SUPPORT_POST - int is_post = 0; -#endif /* LWIP_HTTPD_SUPPORT_POST */ - int is_09 = 0; - char *sp1, *sp2; - u16_t left_len, uri_len; - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("CRLF received, parsing request\n")); - /* parse method */ - if (!strncmp(data, "GET ", 4)) { - sp1 = data + 3; - /* received GET request */ - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received GET request\"\n")); -#if LWIP_HTTPD_SUPPORT_POST - } else if (!strncmp(data, "POST ", 5)) { - /* store request type */ - is_post = 1; - sp1 = data + 4; - /* received GET request */ - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received POST request\n")); -#endif /* LWIP_HTTPD_SUPPORT_POST */ - } else { - /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ - data[4] = 0; - /* unsupported method! */ - LWIP_DEBUGF(HTTPD_DEBUG, ("Unsupported request method (not implemented): \"%s\"\n", - data)); - return http_find_error_file(hs, 501); - } - /* if we come here, method is OK, parse URI */ - left_len = data_len - ((sp1 +1) - data); - sp2 = strnstr(sp1 + 1, " ", left_len); -#if LWIP_HTTPD_SUPPORT_V09 - if (sp2 == NULL) { - /* HTTP 0.9: respond with correct protocol version */ - sp2 = strnstr(sp1 + 1, CRLF, left_len); - is_09 = 1; -#if LWIP_HTTPD_SUPPORT_POST - if (is_post) { - /* HTTP/0.9 does not support POST */ - goto badrequest; - } -#endif /* LWIP_HTTPD_SUPPORT_POST */ - } -#endif /* LWIP_HTTPD_SUPPORT_V09 */ - uri_len = sp2 - (sp1 + 1); - if ((sp2 != 0) && (sp2 > sp1)) { - char *uri = sp1 + 1; - /* null-terminate the METHOD (pbuf is freed anyway wen returning) */ - *sp1 = 0; - uri[uri_len] = 0; - LWIP_DEBUGF(HTTPD_DEBUG, ("Received \"%s\" request for URI: \"%s\"\n", - data, uri)); -#if LWIP_HTTPD_SUPPORT_POST - if (is_post) { -#if LWIP_HTTPD_SUPPORT_REQUESTLIST - struct pbuf **q = &hs->req; -#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - struct pbuf **q = inp; -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - err = http_post_request(pcb, q, hs, data, data_len, uri, sp2); - if (err != ERR_OK) { - /* restore header for next try */ - *sp1 = ' '; - *sp2 = ' '; - uri[uri_len] = ' '; - } - if (err == ERR_ARG) { - goto badrequest; - } - return err; - } else -#endif /* LWIP_HTTPD_SUPPORT_POST */ - { - return http_find_file(hs, uri, is_09); - } - } else { - LWIP_DEBUGF(HTTPD_DEBUG, ("invalid URI\n")); - } - } - } - -#if LWIP_HTTPD_SUPPORT_REQUESTLIST - clen = pbuf_clen(hs->req); - if ((hs->req->tot_len <= LWIP_HTTPD_REQ_BUFSIZE) && - (clen <= LWIP_HTTPD_REQ_QUEUELEN)) { - /* request not fully received (too short or CRLF is missing) */ - return ERR_INPROGRESS; - } else -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - { -#if LWIP_HTTPD_SUPPORT_POST -badrequest: -#endif /* LWIP_HTTPD_SUPPORT_POST */ - LWIP_DEBUGF(HTTPD_DEBUG, ("bad request\n")); - /* could not parse request */ - return http_find_error_file(hs, 400); - } -} - -/** Try to find the file specified by uri and, if found, initialize hs - * accordingly. - * - * @param hs the connection state - * @param uri the HTTP header URI - * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) - * @return ERR_OK if file was found and hs has been initialized correctly - * another err_t otherwise - */ -static err_t -http_find_file(struct http_state *hs, const char *uri, int is_09) -{ - size_t loop; - struct fs_file *file = NULL; - char *params; -#if LWIP_HTTPD_CGI - int i; - int count; -#endif /* LWIP_HTTPD_CGI */ - -#if LWIP_HTTPD_SSI - /* - * By default, assume we will not be processing server-side-includes - * tags - */ - hs->tag_check = false; -#endif /* LWIP_HTTPD_SSI */ - - /* Have we been asked for the default root file? */ - if((uri[0] == '/') && (uri[1] == 0)) { - /* Try each of the configured default filenames until we find one - that exists. */ - for (loop = 0; loop < NUM_DEFAULT_FILENAMES; loop++) { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Looking for %s...\n", g_psDefaultFilenames[loop].name)); - file = fs_open((char *)g_psDefaultFilenames[loop].name); - uri = (char *)g_psDefaultFilenames[loop].name; - if(file != NULL) { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opened.\n")); -#if LWIP_HTTPD_SSI - hs->tag_check = g_psDefaultFilenames[loop].shtml; -#endif /* LWIP_HTTPD_SSI */ - break; - } - } - if (file == NULL) { - /* None of the default filenames exist so send back a 404 page */ - file = http_get_404_file(&uri); -#if LWIP_HTTPD_SSI - hs->tag_check = false; -#endif /* LWIP_HTTPD_SSI */ - } - } else { - /* No - we've been asked for a specific file. */ - /* First, isolate the base URI (without any parameters) */ - params = (char *)strchr(uri, '?'); - if (params != NULL) { - /* URI contains parameters. NULL-terminate the base URI */ - *params = '\0'; - params++; - } - -#if LWIP_HTTPD_CGI - /* Does the base URI we have isolated correspond to a CGI handler? */ - if (g_iNumCGIs && g_pCGIs) { - for (i = 0; i < g_iNumCGIs; i++) { - if (strcmp(uri, g_pCGIs[i].pcCGIName) == 0) { - /* - * We found a CGI that handles this URI so extract the - * parameters and call the handler. - */ - count = extract_uri_parameters(hs, params); - uri = g_pCGIs[i].pfnCGIHandler(i, count, hs->params, - hs->param_vals); - break; - } - } - } -#endif /* LWIP_HTTPD_CGI */ - - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Opening %s\n", uri)); - - file = fs_open(uri); - if (file == NULL) { - file = http_get_404_file(&uri); - } -#if LWIP_HTTPD_SSI - if (file != NULL) { - /* - * See if we have been asked for an shtml file and, if so, - * enable tag checking. - */ - hs->tag_check = false; - for (loop = 0; loop < NUM_SHTML_EXTENSIONS; loop++) { - if (strstr(uri, g_pcSSIExtensions[loop])) { - hs->tag_check = true; - break; - } - } - } -#endif /* LWIP_HTTPD_SSI */ - } - return http_init_file(hs, file, is_09, uri); -} - -/** Initialize a http connection with a file to send (if found). - * Called by http_find_file and http_find_error_file. - * - * @param hs http connection state - * @param file file structure to send (or NULL if not found) - * @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response) - * @param uri the HTTP header URI - * @return ERR_OK if file was found and hs has been initialized correctly - * another err_t otherwise - */ -static err_t -http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const char *uri) -{ - if (file != NULL) { - /* file opened, initialise struct http_state */ -#if LWIP_HTTPD_SSI - hs->tag_index = 0; - hs->tag_state = TAG_NONE; - hs->parsed = file->data; - hs->parse_left = file->len; - hs->tag_end = file->data; -#endif /* LWIP_HTTPD_SSI */ - hs->handle = file; - hs->file = (char*)file->data; - LWIP_ASSERT("File length must be positive!", (file->len >= 0)); - hs->left = file->len; - hs->retries = 0; -#if LWIP_HTTPD_TIMING - hs->time_started = sys_now(); -#endif /* LWIP_HTTPD_TIMING */ -#if !LWIP_HTTPD_DYNAMIC_HEADERS - LWIP_ASSERT("HTTP headers not included in file system", hs->handle->http_header_included); -#endif /* !LWIP_HTTPD_DYNAMIC_HEADERS */ -#if LWIP_HTTPD_SUPPORT_V09 - if (hs->handle->http_header_included && is_09) { - /* HTTP/0.9 responses are sent without HTTP header, - search for the end of the header. */ - char *file_start = strnstr(hs->file, CRLF CRLF, hs->left); - if (file_start != NULL) { - size_t diff = file_start + 4 - hs->file; - hs->file += diff; - hs->left -= (u32_t)diff; - } - } -#endif /* LWIP_HTTPD_SUPPORT_V09*/ - } else { - hs->handle = NULL; - hs->file = NULL; - hs->left = 0; - hs->retries = 0; - } -#if LWIP_HTTPD_DYNAMIC_HEADERS - /* Determine the HTTP headers to send based on the file extension of - * the requested URI. */ - if ((hs->handle == NULL) || !hs->handle->http_header_included) { - get_http_headers(hs, (char*)uri); - } -#else /* LWIP_HTTPD_DYNAMIC_HEADERS */ - LWIP_UNUSED_ARG(uri); -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ - return ERR_OK; -} - -/** - * The pcb had an error and is already deallocated. - * The argument might still be valid (if != NULL). - */ -static void -http_err(void *arg, err_t err) -{ - struct http_state *hs = (struct http_state *)arg; - LWIP_UNUSED_ARG(err); - - LWIP_DEBUGF(HTTPD_DEBUG, ("http_err: %s", lwip_strerr(err))); - - if (hs != NULL) { - http_state_free(hs); - } -} - -/** - * Data has been sent and acknowledged by the remote host. - * This means that more data can be sent. - */ -static err_t -http_sent(void *arg, struct tcp_pcb *pcb, u16_t len) -{ - struct http_state *hs = (struct http_state *)arg; - - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_sent %p\n", (void*)pcb)); - - LWIP_UNUSED_ARG(len); - - if (hs == NULL) { - return ERR_OK; - } - - hs->retries = 0; - - http_send_data(pcb, hs); - - return ERR_OK; -} - -/** - * The poll function is called every 2nd second. - * If there has been no data sent (which resets the retries) in 8 seconds, close. - * If the last portion of a file has not been sent in 2 seconds, close. - * - * This could be increased, but we don't want to waste resources for bad connections. - */ -static err_t -http_poll(void *arg, struct tcp_pcb *pcb) -{ - struct http_state *hs = (struct http_state *)arg; - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: pcb=%p hs=%p pcb_state=%s\n", - (void*)pcb, (void*)hs, tcp_debug_state_str(pcb->state))); - - if (hs == NULL) { - err_t closed; - /* arg is null, close. */ - LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: arg is NULL, close\n")); - closed = http_close_conn(pcb, hs); - LWIP_UNUSED_ARG(closed); -#if LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR - if (closed == ERR_MEM) { - tcp_abort(pcb); - return ERR_ABRT; - } -#endif /* LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR */ - return ERR_OK; - } else { - hs->retries++; - if (hs->retries == HTTPD_MAX_RETRIES) { - LWIP_DEBUGF(HTTPD_DEBUG, ("http_poll: too many retries, close\n")); - http_close_conn(pcb, hs); - return ERR_OK; - } - - /* If this connection has a file open, try to send some more data. If - * it has not yet received a GET request, don't do this since it will - * cause the connection to close immediately. */ - if(hs && (hs->handle)) { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: try to send more data\n")); - if(http_send_data(pcb, hs)) { - /* If we wrote anything to be sent, go ahead and send it now. */ - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("tcp_output\n")); - tcp_output(pcb); - } - } - } - - return ERR_OK; -} - -/** - * Data has been received on this pcb. - * For HTTP 1.0, this should normally only happen once (if the request fits in one packet). - */ -static err_t -http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) -{ - err_t parsed = ERR_ABRT; - struct http_state *hs = (struct http_state *)arg; - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: pcb=%p pbuf=%p err=%s\n", (void*)pcb, - (void*)p, lwip_strerr(err))); - - if ((err != ERR_OK) || (p == NULL) || (hs == NULL)) { - /* error or closed by other side? */ - if (p != NULL) { - /* Inform TCP that we have taken the data. */ - tcp_recved(pcb, p->tot_len); - pbuf_free(p); - } - if (hs == NULL) { - /* this should not happen, only to be robust */ - LWIP_DEBUGF(HTTPD_DEBUG, ("Error, http_recv: hs is NULL, close\n")); - } - http_close_conn(pcb, hs); - return ERR_OK; - } - -#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND - if (hs->no_auto_wnd) { - hs->unrecved_bytes += p->tot_len; - } else -#endif /* LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND */ - { - /* Inform TCP that we have taken the data. */ - tcp_recved(pcb, p->tot_len); - } - -#if LWIP_HTTPD_SUPPORT_POST - if (hs->post_content_len_left > 0) { - /* reset idle counter when POST data is received */ - hs->retries = 0; - /* this is data for a POST, pass the complete pbuf to the application */ - http_post_rxpbuf(hs, p); - /* pbuf is passed to the application, don't free it! */ - if (hs->post_content_len_left == 0) { - /* all data received, send response or close connection */ - http_send_data(pcb, hs); - } - return ERR_OK; - } else -#endif /* LWIP_HTTPD_SUPPORT_POST */ - { - if (hs->handle == NULL) { - parsed = http_parse_request(&p, hs, pcb); - LWIP_ASSERT("http_parse_request: unexpected return value", parsed == ERR_OK - || parsed == ERR_INPROGRESS ||parsed == ERR_ARG || parsed == ERR_USE); - } else { - LWIP_DEBUGF(HTTPD_DEBUG, ("http_recv: already sending data\n")); - } -#if LWIP_HTTPD_SUPPORT_REQUESTLIST - if (parsed != ERR_INPROGRESS) { - /* request fully parsed or error */ - if (hs->req != NULL) { - pbuf_free(hs->req); - hs->req = NULL; - } - } -#else /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - if (p != NULL) { - /* pbuf not passed to application, free it now */ - pbuf_free(p); - } -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - if (parsed == ERR_OK) { -#if LWIP_HTTPD_SUPPORT_POST - if (hs->post_content_len_left == 0) -#endif /* LWIP_HTTPD_SUPPORT_POST */ - { - LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_recv: data %p len %"S32_F"\n", hs->file, hs->left)); - http_send_data(pcb, hs); - } - } else if (parsed == ERR_ARG) { - /* @todo: close on ERR_USE? */ - http_close_conn(pcb, hs); - } - } - return ERR_OK; -} - -/** - * A new incoming connection has been accepted. - */ -static err_t -http_accept(void *arg, struct tcp_pcb *pcb, err_t err) -{ - struct http_state *hs; - struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen*)arg; - LWIP_UNUSED_ARG(err); - LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept %p / %p\n", (void*)pcb, arg)); - - /* Decrease the listen backlog counter */ - tcp_accepted(lpcb); - /* Set priority */ - tcp_setprio(pcb, HTTPD_TCP_PRIO); - - /* Allocate memory for the structure that holds the state of the - connection - initialized by that function. */ - hs = http_state_alloc(); - if (hs == NULL) { - LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept: Out of memory, RST\n")); - return ERR_MEM; - } - - /* Tell TCP that this is the structure we wish to be passed for our - callbacks. */ - tcp_arg(pcb, hs); - - /* Set up the various callback functions */ - tcp_recv(pcb, http_recv); - tcp_err(pcb, http_err); - tcp_poll(pcb, http_poll, HTTPD_POLL_INTERVAL); - tcp_sent(pcb, http_sent); - - return ERR_OK; -} - -/** - * Initialize the httpd with the specified local address. - */ -static void -httpd_init_addr(ip_addr_t *local_addr) -{ - struct tcp_pcb *pcb; - err_t err; - - pcb = tcp_new(); - LWIP_ASSERT("httpd_init: tcp_new failed", pcb != NULL); - tcp_setprio(pcb, HTTPD_TCP_PRIO); - /* set SOF_REUSEADDR here to explicitly bind httpd to multiple interfaces */ - err = tcp_bind(pcb, local_addr, HTTPD_SERVER_PORT); - LWIP_ASSERT("httpd_init: tcp_bind failed", err == ERR_OK); - pcb = tcp_listen(pcb); - LWIP_ASSERT("httpd_init: tcp_listen failed", pcb != NULL); - /* initialize callback arg and accept callback */ - tcp_arg(pcb, pcb); - tcp_accept(pcb, http_accept); -} - -/** - * Initialize the httpd: set up a listening PCB and bind it to the defined port - */ -void -httpd_init(void) -{ -#if HTTPD_USE_MEM_POOL - LWIP_ASSERT("memp_sizes[MEMP_HTTPD_STATE] >= sizeof(http_state)", - memp_sizes[MEMP_HTTPD_STATE] >= sizeof(http_state)); -#endif - LWIP_DEBUGF(HTTPD_DEBUG, ("httpd_init\n")); - - httpd_init_addr(IP_ADDR_ANY); -} - -#if LWIP_HTTPD_SSI -/** - * Set the SSI handler function. - * - * @param ssi_handler the SSI handler function - * @param tags an array of SSI tag strings to search for in SSI-enabled files - * @param num_tags number of tags in the 'tags' array - */ -void -http_set_ssi_handler(tSSIHandler ssi_handler, const char **tags, int num_tags) -{ - LWIP_DEBUGF(HTTPD_DEBUG, ("http_set_ssi_handler\n")); - - LWIP_ASSERT("no ssi_handler given", ssi_handler != NULL); - LWIP_ASSERT("no tags given", tags != NULL); - LWIP_ASSERT("invalid number of tags", num_tags > 0); - - g_pfnSSIHandler = ssi_handler; - g_ppcTags = tags; - g_iNumTags = num_tags; -} -#endif /* LWIP_HTTPD_SSI */ - -#if LWIP_HTTPD_CGI -/** - * Set an array of CGI filenames/handler functions - * - * @param cgis an array of CGI filenames/handler functions - * @param num_handlers number of elements in the 'cgis' array - */ -void -http_set_cgi_handlers(const tCGI *cgis, int num_handlers) -{ - LWIP_ASSERT("no cgis given", cgis != NULL); - LWIP_ASSERT("invalid number of handlers", num_handlers > 0); - - g_pCGIs = cgis; - g_iNumCGIs = num_handlers; -} -#endif /* LWIP_HTTPD_CGI */ - -#endif /* LWIP_TCP */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.h deleted file mode 100644 index 8c3c03d47..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - * This version of the file has been modified by Texas Instruments to offer - * simple server-side-include (SSI) and Common Gateway Interface (CGI) - * capability. - */ - -#ifndef __HTTPD_H__ -#define __HTTPD_H__ - -#include "lwip/opt.h" -#include "lwip/err.h" -#include "lwip/pbuf.h" - - -/** Set this to 1 to support CGI */ -#ifndef LWIP_HTTPD_CGI -#define LWIP_HTTPD_CGI 0 -#endif - -/** Set this to 1 to support SSI (Server-Side-Includes) */ -#ifndef LWIP_HTTPD_SSI -#define LWIP_HTTPD_SSI 1 -#endif - -/** Set this to 1 to support HTTP POST */ -#ifndef LWIP_HTTPD_SUPPORT_POST -#define LWIP_HTTPD_SUPPORT_POST 0 -#endif - - -#if LWIP_HTTPD_CGI - -/* - * Function pointer for a CGI script handler. - * - * This function is called each time the HTTPD server is asked for a file - * whose name was previously registered as a CGI function using a call to - * http_set_cgi_handler. The iIndex parameter provides the index of the - * CGI within the ppcURLs array passed to http_set_cgi_handler. Parameters - * pcParam and pcValue provide access to the parameters provided along with - * the URI. iNumParams provides a count of the entries in the pcParam and - * pcValue arrays. Each entry in the pcParam array contains the name of a - * parameter with the corresponding entry in the pcValue array containing the - * value for that parameter. Note that pcParam may contain multiple elements - * with the same name if, for example, a multi-selection list control is used - * in the form generating the data. - * - * The function should return a pointer to a character string which is the - * path and filename of the response that is to be sent to the connected - * browser, for example "/thanks.htm" or "/response/error.ssi". - * - * The maximum number of parameters that will be passed to this function via - * iNumParams is defined by LWIP_HTTPD_MAX_CGI_PARAMETERS. Any parameters in the incoming - * HTTP request above this number will be discarded. - * - * Requests intended for use by this CGI mechanism must be sent using the GET - * method (which encodes all parameters within the URI rather than in a block - * later in the request). Attempts to use the POST method will result in the - * request being ignored. - * - */ -typedef const char *(*tCGIHandler)(int iIndex, int iNumParams, char *pcParam[], - char *pcValue[]); - -/* - * Structure defining the base filename (URL) of a CGI and the associated - * function which is to be called when that URL is requested. - */ -typedef struct -{ - const char *pcCGIName; - tCGIHandler pfnCGIHandler; -} tCGI; - -void http_set_cgi_handlers(const tCGI *pCGIs, int iNumHandlers); - - -/* The maximum number of parameters that the CGI handler can be sent. */ -#ifndef LWIP_HTTPD_MAX_CGI_PARAMETERS -#define LWIP_HTTPD_MAX_CGI_PARAMETERS 16 -#endif - -#endif /* LWIP_HTTPD_CGI */ - -#if LWIP_HTTPD_SSI - -/** LWIP_HTTPD_SSI_MULTIPART==1: SSI handler function is called with 2 more - * arguments indicating a counter for insert string that are too long to be - * inserted at once: the SSI handler function must then set 'next_tag_part' - * which will be passed back to it in the next call. */ -#ifndef LWIP_HTTPD_SSI_MULTIPART -#define LWIP_HTTPD_SSI_MULTIPART 0 -#endif - -/* - * Function pointer for the SSI tag handler callback. - * - * This function will be called each time the HTTPD server detects a tag of the - * form in a .shtml, .ssi or .shtm file where "name" appears as - * one of the tags supplied to http_set_ssi_handler in the ppcTags array. The - * returned insert string, which will be appended after the the string - * "" in file sent back to the client,should be written to pointer - * pcInsert. iInsertLen contains the size of the buffer pointed to by - * pcInsert. The iIndex parameter provides the zero-based index of the tag as - * found in the ppcTags array and identifies the tag that is to be processed. - * - * The handler returns the number of characters written to pcInsert excluding - * any terminating NULL or a negative number to indicate a failure (tag not - * recognized, for example). - * - * Note that the behavior of this SSI mechanism is somewhat different from the - * "normal" SSI processing as found in, for example, the Apache web server. In - * this case, the inserted text is appended following the SSI tag rather than - * replacing the tag entirely. This allows for an implementation that does not - * require significant additional buffering of output data yet which will still - * offer usable SSI functionality. One downside to this approach is when - * attempting to use SSI within JavaScript. The SSI tag is structured to - * resemble an HTML comment but this syntax does not constitute a comment - * within JavaScript and, hence, leaving the tag in place will result in - * problems in these cases. To work around this, any SSI tag which needs to - * output JavaScript code must do so in an encapsulated way, sending the whole - * HTML section as a single include. - */ -typedef u16_t (*tSSIHandler)(int iIndex, char *pcInsert, int iInsertLen -#if LWIP_HTTPD_SSI_MULTIPART - , u16_t current_tag_part, u16_t *next_tag_part -#endif /* LWIP_HTTPD_SSI_MULTIPART */ -#if LWIP_HTTPD_FILE_STATE - , void *connection_state -#endif /* LWIP_HTTPD_FILE_STATE */ - ); - -void http_set_ssi_handler(tSSIHandler pfnSSIHandler, - const char **ppcTags, int iNumTags); - -/* The maximum length of the string comprising the tag name */ -#ifndef LWIP_HTTPD_MAX_TAG_NAME_LEN -#define LWIP_HTTPD_MAX_TAG_NAME_LEN 8 -#endif - -/* The maximum length of string that can be returned to replace any given tag */ -#ifndef LWIP_HTTPD_MAX_TAG_INSERT_LEN -#define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192 -#endif - -#endif /* LWIP_HTTPD_SSI */ - -#if LWIP_HTTPD_SUPPORT_POST - -/* These functions must be implemented by the application */ - -/** Called when a POST request has been received. The application can decide - * whether to accept it or not. - * - * @param connection Unique connection identifier, valid until httpd_post_end - * is called. - * @param uri The HTTP header URI receiving the POST request. - * @param http_request The raw HTTP request (the first packet, normally). - * @param http_request_len Size of 'http_request'. - * @param content_len Content-Length from HTTP header. - * @param response_uri Filename of response file, to be filled when denying the - * request - * @param response_uri_len Size of the 'response_uri' buffer. - * @param post_auto_wnd Set this to 0 to let the callback code handle window - * updates by calling 'httpd_post_data_recved' (to throttle rx speed) - * default is 1 (httpd handles window updates automatically) - * @return ERR_OK: Accept the POST request, data may be passed in - * another err_t: Deny the POST request, send back 'bad request'. - */ -err_t httpd_post_begin(void *connection, const char *uri, const char *http_request, - u16_t http_request_len, int content_len, char *response_uri, - u16_t response_uri_len, u8_t *post_auto_wnd); - -/** Called for each pbuf of data that has been received for a POST. - * ATTENTION: The application is responsible for freeing the pbufs passed in! - * - * @param connection Unique connection identifier. - * @param p Received data. - * @return ERR_OK: Data accepted. - * another err_t: Data denied, http_post_get_response_uri will be called. - */ -err_t httpd_post_receive_data(void *connection, struct pbuf *p); - -/** Called when all data is received or when the connection is closed. - * The application must return the filename/URI of a file to send in response - * to this POST request. If the response_uri buffer is untouched, a 404 - * response is returned. - * - * @param connection Unique connection identifier. - * @param response_uri Filename of response file, to be filled when denying the request - * @param response_uri_len Size of the 'response_uri' buffer. - */ -void httpd_post_finished(void *connection, char *response_uri, u16_t response_uri_len); - -#ifndef LWIP_HTTPD_POST_MANUAL_WND -#define LWIP_HTTPD_POST_MANUAL_WND 0 -#endif - -#if LWIP_HTTPD_POST_MANUAL_WND -void httpd_post_data_recved(void *connection, u16_t recved_len); -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ - -#endif /* LWIP_HTTPD_SUPPORT_POST */ - -void httpd_init(void); - -#endif /* __HTTPD_H__ */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd_structs.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd_structs.h deleted file mode 100644 index 1080a5597..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/httpd_structs.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef __HTTPD_STRUCTS_H__ -#define __HTTPD_STRUCTS_H__ - -#include "httpd.h" - -/** This string is passed in the HTTP header as "Server: " */ -#ifndef HTTPD_SERVER_AGENT -#define HTTPD_SERVER_AGENT "lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip)" -#endif - -/** Set this to 1 if you want to include code that creates HTTP headers - * at runtime. Default is off: HTTP headers are then created statically - * by the makefsdata tool. Static headers mean smaller code size, but - * the (readonly) fsdata will grow a bit as every file includes the HTTP - * header. */ -#ifndef LWIP_HTTPD_DYNAMIC_HEADERS -#define LWIP_HTTPD_DYNAMIC_HEADERS 0 -#endif - - -#if LWIP_HTTPD_DYNAMIC_HEADERS -/** This struct is used for a list of HTTP header strings for various - * filename extensions. */ -typedef struct -{ - const char *extension; - int headerIndex; -} tHTTPHeader; - -/** A list of strings used in HTTP headers */ -static const char * const g_psHTTPHeaderStrings[] = -{ - "Content-type: text/html\r\n\r\n", - "Content-type: text/html\r\nExpires: Fri, 10 Apr 2008 14:00:00 GMT\r\nPragma: no-cache\r\n\r\n", - "Content-type: image/gif\r\n\r\n", - "Content-type: image/png\r\n\r\n", - "Content-type: image/jpeg\r\n\r\n", - "Content-type: image/bmp\r\n\r\n", - "Content-type: image/x-icon\r\n\r\n", - "Content-type: application/octet-stream\r\n\r\n", - "Content-type: application/x-javascript\r\n\r\n", - "Content-type: application/x-javascript\r\n\r\n", - "Content-type: text/css\r\n\r\n", - "Content-type: application/x-shockwave-flash\r\n\r\n", - "Content-type: text/xml\r\n\r\n", - "Content-type: text/plain\r\n\r\n", - "HTTP/1.0 200 OK\r\n", - "HTTP/1.0 404 File not found\r\n", - "HTTP/1.0 400 Bad Request\r\n", - "HTTP/1.0 501 Not Implemented\r\n", - "HTTP/1.1 200 OK\r\n", - "HTTP/1.1 404 File not found\r\n", - "HTTP/1.1 400 Bad Request\r\n", - "HTTP/1.1 501 Not Implemented\r\n", - "Content-Length: ", - "Connection: Close\r\n", - "Server: "HTTPD_SERVER_AGENT"\r\n", - "\r\n

    404: The requested file cannot be found.

    \r\n" -}; - -/* Indexes into the g_psHTTPHeaderStrings array */ -#define HTTP_HDR_HTML 0 /* text/html */ -#define HTTP_HDR_SSI 1 /* text/html Expires... */ -#define HTTP_HDR_GIF 2 /* image/gif */ -#define HTTP_HDR_PNG 3 /* image/png */ -#define HTTP_HDR_JPG 4 /* image/jpeg */ -#define HTTP_HDR_BMP 5 /* image/bmp */ -#define HTTP_HDR_ICO 6 /* image/x-icon */ -#define HTTP_HDR_APP 7 /* application/octet-stream */ -#define HTTP_HDR_JS 8 /* application/x-javascript */ -#define HTTP_HDR_RA 9 /* application/x-javascript */ -#define HTTP_HDR_CSS 10 /* text/css */ -#define HTTP_HDR_SWF 11 /* application/x-shockwave-flash */ -#define HTTP_HDR_XML 12 /* text/xml */ -#define HTTP_HDR_DEFAULT_TYPE 13 /* text/plain */ -#define HTTP_HDR_OK 14 /* 200 OK */ -#define HTTP_HDR_NOT_FOUND 15 /* 404 File not found */ -#define HTTP_HDR_BAD_REQUEST 16 /* 400 Bad request */ -#define HTTP_HDR_NOT_IMPL 17 /* 501 Not Implemented */ -#define HTTP_HDR_OK_11 18 /* 200 OK */ -#define HTTP_HDR_NOT_FOUND_11 19 /* 404 File not found */ -#define HTTP_HDR_BAD_REQUEST_11 20 /* 400 Bad request */ -#define HTTP_HDR_NOT_IMPL_11 21 /* 501 Not Implemented */ -#define HTTP_HDR_CONTENT_LENGTH 22 /* Content-Length: (HTTP 1.1)*/ -#define HTTP_HDR_CONN_CLOSE 23 /* Connection: Close (HTTP 1.1) */ -#define HTTP_HDR_SERVER 24 /* Server: HTTPD_SERVER_AGENT */ -#define DEFAULT_404_HTML 25 /* default 404 body */ - -/** A list of extension-to-HTTP header strings */ -const static tHTTPHeader g_psHTTPHeaders[] = -{ - { "html", HTTP_HDR_HTML}, - { "htm", HTTP_HDR_HTML}, - { "shtml",HTTP_HDR_SSI}, - { "shtm", HTTP_HDR_SSI}, - { "ssi", HTTP_HDR_SSI}, - { "gif", HTTP_HDR_GIF}, - { "png", HTTP_HDR_PNG}, - { "jpg", HTTP_HDR_JPG}, - { "bmp", HTTP_HDR_BMP}, - { "ico", HTTP_HDR_ICO}, - { "class",HTTP_HDR_APP}, - { "cls", HTTP_HDR_APP}, - { "js", HTTP_HDR_JS}, - { "ram", HTTP_HDR_RA}, - { "css", HTTP_HDR_CSS}, - { "swf", HTTP_HDR_SWF}, - { "xml", HTTP_HDR_XML} -}; - -#define NUM_HTTP_HEADERS (sizeof(g_psHTTPHeaders) / sizeof(tHTTPHeader)) - -#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */ - -#endif /* __HTTPD_STRUCTS_H__ */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.sln b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.sln deleted file mode 100644 index df961bb8d..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MakeFSData_proj", "MakeFSData_proj.vcxproj", "{31A9131E-BD1E-4F2D-8E1F-BC8E679E0368}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {31A9131E-BD1E-4F2D-8E1F-BC8E679E0368}.Debug|Win32.ActiveCfg = Debug|Win32 - {31A9131E-BD1E-4F2D-8E1F-BC8E679E0368}.Debug|Win32.Build.0 = Debug|Win32 - {31A9131E-BD1E-4F2D-8E1F-BC8E679E0368}.Release|Win32.ActiveCfg = Release|Win32 - {31A9131E-BD1E-4F2D-8E1F-BC8E679E0368}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.suo b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.suo deleted file mode 100644 index 3b44ee3bfe3a05655a2381dadd8c56495d4aaac3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11264 zcmeHNTWlOx89vUXP1-_}20{oWT|$6ByxZAbUuq`~*=rLT*IRpIBN!2lcW3R1C%dbe zSvw}SgoMNkQl-8lRPuuQLe(c;Kp^pe5S7}82o+x1z93$ZP$gbKjrqPabL{ncFJo^~ z8tA|J=bSln=KSaU=f9rWx8FMY-p}4R`Mzj@i(P$A9u7>48h)OLh@7aRbi^ulGCUj?2RC(|a?%YV>AxTQAou3LessF@S-)oi6l>y! zxB}`G)NrL)`RLzFx81`VK(3rQa(hKHlv9@GZC+4+eWw@k9zqBx$^4$TXfSh)sh2-WNNl;mbiN) zd4MdEhUYNN%@JM*j4k#GY7_f;|F3vCBgTae@1w&Cm|_`a9$vu2ZyI_%C1%i4M2iJ~ zVWXach4yf_j2=7to_Yi~PImc$c1+ zvzQkR%xpo9F(-SM#3Jr``92O9f&ZcW(*Cmyh;%Ku-}DuPR{Cko%9OLOV|L`3*L5Ce z;r|)0k~TpO+T+4F_Jg2LD}BZv^u2Y^wJ?KfSL#B173-%a(+Y;A&)7rx|5o~Wx#lvY zpoU#>dd2~yPr4j0EPci+#{rojTTm}ajTiW2D4!O3l7D}88tl(J$ za?Y5mf!(%oH-okYq?KHcz^`i}2Gpg-+?1M9g;&?1D_N^zCqr#LO*RBEA0E7!g_S?XQfiD=`je0xT1Dm| zbAc|@VADF;qCv<%V^+qbVd*noW~@eNrQhEEG|$9;PhE#VpD{0OT3Grg&{yd{?Tv>u zJFqm=1M0txdl$aL&x}mSwI{WJwvf3&vqc==1OGn{`hNow0yE&>?BQCHev>}X*LfX! z==)7-1hrj9x#c$vxfz@c3sD^qe;mk;YxvzxCGxq^p z!>f+r%32P7Hw{VfYeU$B1n#2ZIXsEuj!!f4ZUh!*46Pd88$ruDY*ZQ2N!ztWcS?GX zW~w|f+1^LZ&EH-2Jp^AO#QmJxd6{)}A2EwPDuG)!1IcQZ^n%Z2KpS2K0Pe`X8S`wYh(S&+cQ4nNrZ)Xi2j$}#g7Aa z(q;?nkEBc5g!a9*w|)V)?*;3hf{nca30?p#pZ1oH&qBg_!D+0YvdtVkEd8&buksJO zmG)`K3GEY4O-!*C*l5PCF>oy{`Nilljb3HY+0r~_-rZ$!w{zLD-Mg8`keo*fGtNVk zM`01D<e<%R#EBZ}i$*j0#WP$o5sxL(l3lIE1WFM1|4dx_ySVE=I zDhs&*>0vx~E67T2fUn9kahE&iW9aqRsbjCjPyISN_3|^ndU@fe`xo)Dg!jFBcQU_x z`{*xDidX;eSk7eu$#of2&?X&*w{K;SsY0F)ijhWchRxgC% zy8zC=1^pS%d&BylX8)_=AjZLUDNp3E6GTh&h24SY?>tv#OdFOyaTiMWVw zuRedd&USvzy|`8y*G;`_F6$M?G##(z>Igv$TQ_jN?p0ii1y3UIqokVerU9}mp zm9Tq^KY8L*h2&jDjaFTGY0~Zld&&RLVK9|{Z`U`Tur?rp9!`1u?}3h#%g!-4@{hjs zk7uos7On5J)^_dq{y0F*U``*_{zTE&2?m>zxrYraP?fmQWcjjaQT>AMI||xA(p9jd zLz{+Y(I!8$pbQtZGKMY37T4BpXEh|_!+hdZ^!B^lTf)7NIy#H_rR2W0%AWS?a)Y}aB8PY(q>y6GQd66O6m4M_dt zdHy57u=I22dznT9FpCuyv10msp0?hC{?qd>L-)h{2Y~rMPnQ%AQ*VyhU?P=f~dfKK1-}iickroqYA@-+d?k?;kQ+Rr6J4k12P2TuLUQ&y|caP72G3 z=vY!q;G}RkIW(+ESkL}XnV(iRoDlr@6#SJ24^RA-vF+AWwHudmzlukI^t r|Fqxuw_pDCvVV#8)81^|i~SwP+yB}eq5q275tjXrw)+ttX8QjDH|eFb diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj deleted file mode 100644 index 06914a791..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj +++ /dev/null @@ -1,91 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {31A9131E-BD1E-4F2D-8E1F-BC8E679E0368} - Win32Proj - MakeFSData_proj - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(LWIP_DIR)\src\include;$(LWIP_DIR)\..\contrib-1.4.0\ports\win32\include;$(LWIP_DIR)\src\include\ipv4 - - - Console - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - true - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.filters b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.filters deleted file mode 100644 index c88c739e6..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.user b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.user deleted file mode 100644 index 695b5c78b..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/MakeFSData_proj.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/404.html b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/404.html deleted file mode 100644 index 40b343a91..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/404.html +++ /dev/null @@ -1,21 +0,0 @@ - -lwIP - A Lightweight TCP/IP Stack - - -
    LocalRemoteStateRetransmissionsTimerFlags
    - -
    - SICS logo - -

    lwIP - A Lightweight TCP/IP Stack

    -

    404 - Page not found

    -

    - Sorry, the page you are requesting was not found on this - server. -

    -
    -   -
    - - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/index.shtml b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/index.shtml deleted file mode 100644 index 90358d158..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/index.shtml +++ /dev/null @@ -1,20 +0,0 @@ - - - - FreeRTOS.org lwIP WEB server demo - - - -Task Stats | Run Time Stats | FreeRTOS Homepage | 37K jpg -

    -


    -

    -

    Task statistics

    -Page will refresh every 2 seconds.

    -

    Task          State  Priority  Stack	#
    ************************************************
    - -
    -
    - - - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/runtime.shtml b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/runtime.shtml deleted file mode 100644 index e66202b9d..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fs/runtime.shtml +++ /dev/null @@ -1,20 +0,0 @@ - - - - FreeRTOS.org lwIP WEB server demo - - - -Task Stats | Run Time Stats | FreeRTOS Homepage | 37K jpg -

    -


    -

    -

    Run-time statistics

    -Page will refresh every 2 seconds.

    -

    Task            Abs Time      % Time
    ****************************************
    - -
    -
    - - - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fsdata.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fsdata.c deleted file mode 100644 index f2ddfd935..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/fsdata.c +++ /dev/null @@ -1,2068 +0,0 @@ -#include "fs.h" -#include "lwip/def.h" -#include "fsdata.h" - - -#define file_NULL (struct fsdata_file *) NULL - - -static const unsigned int dummy_align__404_html = 0; -static const unsigned char data__404_html[] = { -/* /404.html (10 chars) */ -0x2f,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 404 File not found -" (29 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x34,0x30,0x34,0x20,0x46,0x69,0x6c, -0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0d,0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: text/html - -" (27 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, -0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a, -/* raw file data (544 bytes) */ -0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x3c,0x74,0x69, -0x74,0x6c,0x65,0x3e,0x6c,0x77,0x49,0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69,0x67, -0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20, -0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x3c,0x2f,0x68, -0x65,0x61,0x64,0x3e,0x0a,0x3c,0x62,0x6f,0x64,0x79,0x20,0x62,0x67,0x63,0x6f,0x6c, -0x6f,0x72,0x3d,0x22,0x77,0x68,0x69,0x74,0x65,0x22,0x20,0x74,0x65,0x78,0x74,0x3d, -0x22,0x62,0x6c,0x61,0x63,0x6b,0x22,0x3e,0x0a,0x0a,0x20,0x20,0x20,0x20,0x3c,0x74, -0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x31,0x30,0x30,0x25, -0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x72,0x20,0x76,0x61,0x6c, -0x69,0x67,0x6e,0x3d,0x22,0x74,0x6f,0x70,0x22,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69, -0x64,0x74,0x68,0x3d,0x22,0x38,0x30,0x22,0x3e,0x09,0x20,0x20,0x0a,0x09,0x20,0x20, -0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, -0x77,0x77,0x77,0x2e,0x73,0x69,0x63,0x73,0x2e,0x73,0x65,0x2f,0x22,0x3e,0x3c,0x69, -0x6d,0x67,0x20,0x73,0x72,0x63,0x3d,0x22,0x2f,0x69,0x6d,0x67,0x2f,0x73,0x69,0x63, -0x73,0x2e,0x67,0x69,0x66,0x22,0x0a,0x09,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72, -0x3d,0x22,0x30,0x22,0x20,0x61,0x6c,0x74,0x3d,0x22,0x53,0x49,0x43,0x53,0x20,0x6c, -0x6f,0x67,0x6f,0x22,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x53,0x49,0x43,0x53, -0x20,0x6c,0x6f,0x67,0x6f,0x22,0x3e,0x3c,0x2f,0x61,0x3e,0x0a,0x09,0x3c,0x2f,0x74, -0x64,0x3e,0x3c,0x74,0x64,0x20,0x77,0x69,0x64,0x74,0x68,0x3d,0x22,0x35,0x30,0x30, -0x22,0x3e,0x09,0x20,0x20,0x0a,0x09,0x20,0x20,0x3c,0x68,0x31,0x3e,0x6c,0x77,0x49, -0x50,0x20,0x2d,0x20,0x41,0x20,0x4c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68, -0x74,0x20,0x54,0x43,0x50,0x2f,0x49,0x50,0x20,0x53,0x74,0x61,0x63,0x6b,0x3c,0x2f, -0x68,0x31,0x3e,0x0a,0x09,0x20,0x20,0x3c,0x68,0x32,0x3e,0x34,0x30,0x34,0x20,0x2d, -0x20,0x50,0x61,0x67,0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x3c, -0x2f,0x68,0x32,0x3e,0x0a,0x09,0x20,0x20,0x3c,0x70,0x3e,0x0a,0x09,0x20,0x20,0x20, -0x20,0x53,0x6f,0x72,0x72,0x79,0x2c,0x20,0x74,0x68,0x65,0x20,0x70,0x61,0x67,0x65, -0x20,0x79,0x6f,0x75,0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x71,0x75,0x65,0x73,0x74, -0x69,0x6e,0x67,0x20,0x77,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e, -0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x69,0x73,0x0a,0x09,0x20,0x20,0x20,0x20,0x73, -0x65,0x72,0x76,0x65,0x72,0x2e,0x20,0x0a,0x09,0x20,0x20,0x3c,0x2f,0x70,0x3e,0x0a, -0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x74,0x64,0x3e,0x0a,0x09,0x20,0x20,0x26,0x6e, -0x62,0x73,0x70,0x3b,0x0a,0x09,0x3c,0x2f,0x74,0x64,0x3e,0x3c,0x2f,0x74,0x72,0x3e, -0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0a, -0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0a,0x3c,0x2f,0x68,0x74,0x6d,0x6c,0x3e,0x0a, -}; - -static const unsigned int dummy_align__index_shtml = 1; -static const unsigned char data__index_shtml[] = { -/* /index.shtml (13 chars) */ -0x2f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x00,0x00,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 200 OK -" (17 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, -0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: text/html -Expires: Fri, 10 Apr 2008 14:00:00 GMT -Pragma: no-cache - -" (85 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, -0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x45,0x78,0x70,0x69,0x72,0x65,0x73, -0x3a,0x20,0x46,0x72,0x69,0x2c,0x20,0x31,0x30,0x20,0x41,0x70,0x72,0x20,0x32,0x30, -0x30,0x38,0x20,0x31,0x34,0x3a,0x30,0x30,0x3a,0x30,0x30,0x20,0x47,0x4d,0x54,0x0d, -0x0a,0x50,0x72,0x61,0x67,0x6d,0x61,0x3a,0x20,0x6e,0x6f,0x2d,0x63,0x61,0x63,0x68, -0x65,0x0d,0x0a,0x0d,0x0a, -/* raw file data (762 bytes) */ -0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, -0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, -0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, -0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x20,0x22, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72, -0x67,0x2f,0x54,0x52,0x2f,0x68,0x74,0x6d,0x6c,0x34,0x2f,0x6c,0x6f,0x6f,0x73,0x65, -0x2e,0x64,0x74,0x64,0x22,0x3e,0x0d,0x0a,0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x3c,0x74, -0x69,0x74,0x6c,0x65,0x3e,0x46,0x72,0x65,0x65,0x52,0x54,0x4f,0x53,0x2e,0x6f,0x72, -0x67,0x20,0x6c,0x77,0x49,0x50,0x20,0x57,0x45,0x42,0x20,0x73,0x65,0x72,0x76,0x65, -0x72,0x20,0x64,0x65,0x6d,0x6f,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x3c,0x42,0x4f, -0x44,0x59,0x20,0x6f,0x6e,0x4c,0x6f,0x61,0x64,0x3d,0x22,0x77,0x69,0x6e,0x64,0x6f, -0x77,0x2e,0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x26,0x71,0x75, -0x6f,0x74,0x3b,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x68,0x72,0x65,0x66, -0x3d,0x27,0x69,0x6e,0x64,0x65,0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x27,0x26,0x71, -0x75,0x6f,0x74,0x3b,0x2c,0x32,0x30,0x30,0x30,0x29,0x22,0x3e,0x0d,0x0a,0x3c,0x66, -0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65,0x3d,0x22,0x61,0x72,0x69,0x61,0x6c,0x22, -0x3e,0x0d,0x0a,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x69,0x6e,0x64,0x65, -0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x54,0x61,0x73,0x6b,0x20,0x53,0x74, -0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62,0x3e,0x7c,0x3c,0x2f,0x62,0x3e, -0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x72,0x75,0x6e,0x74,0x69,0x6d, -0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x52,0x75,0x6e,0x20,0x54,0x69,0x6d, -0x65,0x20,0x53,0x74,0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62,0x3e,0x7c, -0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x68,0x74, -0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x66,0x72,0x65,0x65,0x72,0x74,0x6f, -0x73,0x2e,0x6f,0x72,0x67,0x2f,0x22,0x3e,0x46,0x72,0x65,0x65,0x52,0x54,0x4f,0x53, -0x20,0x48,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62, -0x3e,0x7c,0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22, -0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22,0x3e,0x33,0x37,0x4b,0x20,0x6a,0x70, -0x67,0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e,0x0d,0x0a, -0x3c,0x68,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e,0x0d,0x0a,0x3c, -0x68,0x32,0x3e,0x54,0x61,0x73,0x6b,0x20,0x73,0x74,0x61,0x74,0x69,0x73,0x74,0x69, -0x63,0x73,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a,0x50,0x61,0x67,0x65,0x20,0x77,0x69, -0x6c,0x6c,0x20,0x72,0x65,0x66,0x72,0x65,0x73,0x68,0x20,0x65,0x76,0x65,0x72,0x79, -0x20,0x32,0x20,0x73,0x65,0x63,0x6f,0x6e,0x64,0x73,0x2e,0x3c,0x70,0x3e,0x0d,0x0a, -0x3c,0x66,0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65,0x3d,0x22,0x63,0x6f,0x75,0x72, -0x69,0x65,0x72,0x22,0x3e,0x3c,0x70,0x72,0x65,0x3e,0x54,0x61,0x73,0x6b,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x53,0x74,0x61,0x74,0x65,0x20,0x20,0x50, -0x72,0x69,0x6f,0x72,0x69,0x74,0x79,0x20,0x20,0x53,0x74,0x61,0x63,0x6b,0x09,0x23, -0x3c,0x62,0x72,0x3e,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x21,0x2d,0x2d,0x23,0x72, -0x74,0x6f,0x73,0x5f,0x73,0x74,0x61,0x74,0x73,0x2d,0x2d,0x3e,0x0d,0x0a,0x3c,0x2f, -0x70,0x72,0x65,0x3e,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x2f,0x66, -0x6f,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c, -0x2f,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; - -static const unsigned int dummy_align__logo_jpg = 2; -static const unsigned char data__logo_jpg[] = { -/* /logo.jpg (10 chars) */ -0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x00,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 200 OK -" (17 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, -0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: image/jpeg - -" (28 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x69,0x6d, -0x61,0x67,0x65,0x2f,0x6a,0x70,0x65,0x67,0x0d,0x0a,0x0d,0x0a, -/* raw file data (28602 bytes) */ -0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x00,0x00,0x01, -0x00,0x01,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x03,0x02,0x02,0x03,0x02,0x02,0x03, -0x03,0x03,0x03,0x04,0x03,0x03,0x04,0x05,0x08,0x05,0x05,0x04,0x04,0x05,0x0a,0x07, -0x07,0x06,0x08,0x0c,0x0a,0x0c,0x0c,0x0b,0x0a,0x0b,0x0b,0x0d,0x0e,0x12,0x10,0x0d, -0x0e,0x11,0x0e,0x0b,0x0b,0x10,0x16,0x10,0x11,0x13,0x14,0x15,0x15,0x15,0x0c,0x0f, -0x17,0x18,0x16,0x14,0x18,0x12,0x14,0x15,0x14,0xff,0xdb,0x00,0x43,0x01,0x03,0x04, -0x04,0x05,0x04,0x05,0x09,0x05,0x05,0x09,0x14,0x0d,0x0b,0x0d,0x14,0x14,0x14,0x14, -0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, -0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, -0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xff,0xc0, -0x00,0x11,0x08,0x00,0xea,0x02,0x71,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, -0x01,0xff,0xc4,0x00,0x1f,0x00,0x00,0x01,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, -0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x10,0x00,0x02,0x01,0x03,0x03,0x02,0x04,0x03,0x05, -0x05,0x04,0x04,0x00,0x00,0x01,0x7d,0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,0x21, -0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,0x23, -0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,0x17, -0x18,0x19,0x1a,0x25,0x26,0x27,0x28,0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,0x3a, -0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a, -0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a, -0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99, -0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7, -0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5, -0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf1, -0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xff,0xc4,0x00,0x1f,0x01,0x00,0x03, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01, -0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0xff,0xc4,0x00,0xb5,0x11,0x00, -0x02,0x01,0x02,0x04,0x04,0x03,0x04,0x07,0x05,0x04,0x04,0x00,0x01,0x02,0x77,0x00, -0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,0x13, -0x22,0x32,0x81,0x08,0x14,0x42,0x91,0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,0x15, -0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,0x27, -0x28,0x29,0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49, -0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69, -0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,0x88, -0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6, -0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4, -0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe2, -0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9, -0xfa,0xff,0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xfd, -0x53,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa2,0x8a,0x28,0x00,0xa4,0x34,0x8e, -0x70,0x09,0xaf,0x0b,0xf1,0xbf,0xc6,0x4b,0x8f,0x13,0x78,0xc2,0xdb,0xc1,0x7e,0x0f, -0xb8,0x2b,0x24,0x93,0x08,0xae,0xf5,0x48,0x88,0x3b,0x47,0xf1,0x2c,0x7f,0x4e,0x72, -0xdf,0x97,0xad,0x72,0x62,0x71,0x54,0xf0,0xb1,0xe6,0x9e,0xef,0x44,0xba,0xb6,0x73, -0x57,0xc4,0x43,0x0e,0x93,0x9e,0xef,0x44,0xba,0xb6,0x77,0xbe,0x3b,0xf8,0xb9,0xa1, -0xf8,0x16,0x39,0x23,0x9d,0xe4,0xd4,0x35,0x05,0x1c,0x58,0x59,0x2e,0xf9,0x3d,0xb7, -0x76,0x51,0xf5,0xfc,0x8d,0x78,0x07,0x8a,0xff,0x00,0x69,0x3f,0x1b,0x6a,0xb3,0x3a, -0x69,0x3a,0x7f,0xf6,0x2d,0xb7,0xf0,0x81,0x09,0x96,0x5f,0xc5,0x98,0x63,0xf2,0x15, -0xf4,0xde,0x83,0xe0,0xdd,0x27,0xc3,0xf6,0x62,0x0b,0x6b,0x38,0xc9,0x3f,0x33,0xcb, -0x20,0xde,0xf2,0x37,0x76,0x66,0x3c,0x92,0x6b,0x40,0xe9,0x16,0x47,0xad,0x9c,0x1f, -0xf7,0xec,0x57,0x9d,0x88,0xc2,0xe3,0x31,0x2b,0xf8,0xbc,0x8b,0xb2,0x5f,0xad,0xce, -0x3c,0x46,0x1b,0x13,0x88,0x56,0x8d,0x5e,0x45,0xe4,0xbf,0x53,0xe0,0x8d,0x4f,0xc6, -0xfe,0x33,0xd5,0x18,0x9b,0xcd,0x5f,0x56,0x90,0x93,0x9c,0x19,0xa4,0x0b,0xf9,0x0e, -0x2b,0x35,0x75,0xff,0x00,0x10,0xc7,0x9c,0x6a,0x3a,0x82,0xfa,0xfe,0xfa,0x41,0xfd, -0x6b,0xf4,0x19,0xb4,0x2d,0x39,0xba,0xd8,0x5b,0x7f,0xdf,0xa1,0xfe,0x15,0x19,0xf0, -0xce,0x94,0xff,0x00,0x7b,0x4d,0xb5,0x3f,0xf6,0xc5,0x7f,0xc2,0xbc,0x79,0x64,0x15, -0xa4,0xef,0xed,0xaf,0xf2,0x7f,0xe6,0x78,0x72,0xc8,0x6a,0x49,0xdd,0xd7,0x7f,0xd7, -0xcc,0xf8,0x0d,0x3c,0x5f,0xe2,0x68,0x94,0x05,0xd6,0x35,0x45,0x03,0xa0,0x17,0x32, -0x0f,0xeb,0x53,0x27,0x8f,0xbc,0x59,0x11,0x25,0x75,0xfd,0x59,0x33,0xe9,0x77,0x28, -0xfe,0xb5,0xf7,0x8b,0x78,0x3b,0x44,0x7e,0xba,0x4d,0x99,0xff,0x00,0xb6,0x2b,0x51, -0x37,0x81,0x7c,0x3c,0xf9,0xce,0x8d,0x66,0x73,0xff,0x00,0x4c,0x56,0xa5,0x64,0x58, -0x85,0xb5,0x6f,0xcc,0x9f,0xec,0x2a,0xeb,0x6a,0xef,0xf1,0xff,0x00,0x33,0xe1,0x6f, -0xf8,0x59,0x3e,0x2f,0x5f,0xf9,0x98,0xb5,0x7f,0xfc,0x0c,0x93,0xfc,0x69,0xeb,0xf1, -0x4f,0xc6,0x51,0x9c,0xaf,0x89,0x35,0x5c,0xfb,0xdd,0x3f,0xf8,0xd7,0xdc,0x0d,0xf0, -0xf3,0xc3,0x6f,0xd7,0x44,0xb2,0x3f,0xf6,0xc8,0x54,0x4f,0xf0,0xcb,0xc2,0xaf,0xf7, -0xb4,0x2b,0x23,0xff,0x00,0x6c,0x85,0x2f,0xec,0x4c,0x5f,0xfc,0xfe,0xfc,0xc5,0xfd, -0x89,0x8a,0x5b,0x57,0x7f,0x89,0xf1,0x54,0x7f,0x17,0xfc,0x6b,0x1f,0xfc,0xcc,0x9a, -0x99,0xfa,0xdc,0x35,0x58,0x8b,0xe3,0x87,0x8e,0xe1,0x6c,0xaf,0x89,0x2f,0x73,0xd3, -0xe6,0x21,0x87,0xe4,0x45,0x7d,0x8e,0xff,0x00,0x09,0x7c,0x20,0xfd,0x74,0x0b,0x3f, -0xc2,0x3c,0x54,0x2f,0xf0,0x6b,0xc1,0xaf,0xd7,0x41,0xb5,0x1f,0x45,0xa4,0xb2,0x7c, -0x72,0xda,0xb7,0xe2,0xc7,0xfd,0x8f,0x8d,0x5b,0x62,0x1f,0xe2,0x7c,0x8a,0x9f,0x1f, -0xbc,0x7e,0x83,0x1f,0xf0,0x91,0x5c,0x7d,0x4c,0x71,0x9f,0xfd,0x96,0xa6,0x1f,0xb4, -0x37,0x8f,0xc7,0xfc,0xcc,0x12,0xfe,0x30,0x45,0xff,0x00,0xc4,0x57,0xd5,0xaf,0xf0, -0x43,0xc1,0x4e,0x0f,0xfc,0x48,0xa0,0x1f,0x4a,0x89,0xbe,0x03,0xf8,0x21,0xf3,0xff, -0x00,0x12,0x48,0x86,0x7d,0x09,0xa7,0xfd,0x95,0x98,0xad,0xab,0x7e,0x2c,0x3f,0xb2, -0xb3,0x15,0xb6,0x21,0xfd,0xec,0xf9,0x69,0x7f,0x68,0xaf,0x1f,0x8f,0xf9,0x8f,0x39, -0xfa,0xdb,0xc5,0xff,0x00,0xc4,0xd4,0x89,0xfb,0x48,0x78,0xf9,0x08,0x3f,0xdb,0x59, -0xc7,0xad,0xb4,0x47,0xff,0x00,0x65,0xaf,0xa6,0x9f,0xf6,0x7d,0xf0,0x33,0x8e,0x74, -0x75,0x1e,0xe1,0x8d,0x42,0xff,0x00,0xb3,0x9f,0x81,0x9c,0x7f,0xc8,0x2d,0x97,0xe9, -0x21,0xa3,0xfb,0x33,0x34,0x5b,0x56,0xff,0x00,0xc9,0x98,0xbf,0xb3,0x33,0x35,0xb5, -0x7f,0xc5,0x9f,0x39,0xc7,0xfb,0x4d,0xf8,0xf1,0x17,0x07,0x52,0x85,0xcf,0xab,0x5a, -0xa6,0x7f,0x95,0x58,0x4f,0xda,0x9b,0xc7,0x49,0x8f,0xf4,0x9b,0x36,0xc7,0xad,0xaa, -0xf3,0xfa,0xd7,0xbe,0xbf,0xec,0xd5,0xe0,0x86,0xc9,0x16,0x32,0xaf,0xd2,0x43,0x50, -0x3f,0xec,0xc5,0xe0,0xa6,0xe9,0x6f,0x3a,0xff,0x00,0xdb,0x4a,0x5f,0xd9,0xf9,0xb2, -0xda,0xaf,0xfe,0x4c,0xc3,0xfb,0x3f,0x36,0x5b,0x57,0xfc,0x59,0xe2,0x0b,0xfb,0x57, -0x78,0xdd,0x7a,0x9d,0x39,0xbe,0xb6,0xc7,0xfa,0x35,0x3d,0x7f,0x6b,0x0f,0x1a,0x82, -0x32,0x9a,0x61,0xff,0x00,0xb7,0x66,0xff,0x00,0xe2,0xeb,0xd9,0xdb,0xf6,0x5a,0xf0, -0x63,0x0e,0x12,0xe5,0x7f,0xed,0xa5,0x42,0xff,0x00,0xb2,0xa7,0x83,0xcf,0x47,0xbb, -0x5f,0xfb,0x69,0x43,0xc1,0xe7,0x0b,0x6a,0x9f,0xf9,0x30,0x7d,0x4b,0x37,0x5b,0x56, -0xfc,0x4f,0x23,0x5f,0xda,0xd7,0xc6,0x43,0xad,0xbe,0x96,0xdf,0xf6,0xc1,0xff,0x00, -0xf8,0xba,0x91,0x3f,0x6b,0x8f,0x16,0x82,0x37,0x59,0x69,0x6d,0xeb,0xfb,0xa7,0xff, -0x00,0xe2,0xeb,0xd4,0x24,0xfd,0x93,0xbc,0x2a,0xd8,0xdb,0x75,0x78,0xbf,0xf0,0x20, -0x6a,0x07,0xfd,0x92,0x3c,0x34,0x73,0x8b,0xfb,0xb5,0xf4,0xe9,0x4b,0xea,0xb9,0xca, -0xfb,0x7f,0x88,0x7d,0x53,0x39,0x5b,0x55,0xfc,0x4f,0x3d,0x8b,0xf6,0xbe,0xf1,0x32, -0xe7,0xcc,0xd2,0xb4,0xc7,0xf4,0xc2,0xc8,0x3f,0xf6,0x6a,0xb0,0x9f,0xb6,0x16,0xbc, -0x31,0xbb,0x43,0xd3,0x5b,0xd7,0x0d,0x20,0xfe,0xb5,0xda,0xc9,0xfb,0x22,0xe8,0x19, -0xf9,0x75,0x3b,0xa0,0x3d,0xd4,0x54,0x0f,0xfb,0x21,0x68,0xe4,0x7c,0xba,0xbd,0xcf, -0xe2,0x82,0x9f,0xb1,0xce,0x97,0xda,0xfc,0x50,0x7b,0x0c,0xe9,0x7d,0xbf,0xc8,0xe6, -0x07,0xed,0x89,0xaa,0xf7,0xf0,0xf5,0x99,0xfa,0x4e,0xdf,0xe1,0x4f,0x5f,0xdb,0x1b, -0x50,0x1f,0x7b,0xc3,0x96,0xa7,0xe9,0x72,0xdf,0xfc,0x4d,0x6f,0x3f,0xec,0x7f,0xa6, -0x1c,0xed,0xd6,0xe7,0x5f,0xac,0x60,0xd4,0x12,0x7e,0xc7,0xb6,0x99,0x1b,0x35,0xd9, -0x31,0xef,0x17,0xff,0x00,0x5e,0x8e,0x4c,0xed,0x75,0xfc,0x85,0xec,0xf3,0xb5,0xf6, -0xbf,0x23,0x35,0x7f,0x6c,0x7b,0xc3,0xf7,0xbc,0x35,0x01,0x1e,0xd7,0x67,0xff,0x00, -0x89,0xa9,0x93,0xf6,0xc8,0x70,0x06,0xef,0x0b,0xa9,0x3d,0xf1,0x7b,0xff,0x00,0xd8, -0x54,0xaf,0xfb,0x1e,0xa0,0x5f,0x97,0x5d,0xe7,0xde,0x2a,0x85,0xbf,0x63,0xe9,0x32, -0x76,0xeb,0xa9,0xed,0x98,0x8d,0x2f,0xf8,0x5b,0x5d,0xff,0x00,0xf2,0x50,0xb6,0x76, -0xba,0xfe,0x44,0xeb,0xfb,0x64,0xc4,0x7e,0xf7,0x85,0xdf,0x1e,0xd7,0xa3,0xff,0x00, -0x8d,0xd4,0xcb,0xfb,0x63,0xda,0x63,0xe6,0xf0,0xcc,0xc0,0xfb,0x5e,0x03,0xff,0x00, -0xb2,0x56,0x63,0xfe,0xc7,0xd7,0x7d,0xb5,0xc8,0x4f,0xd5,0x0d,0x40,0xff,0x00,0xb2, -0x06,0xa6,0x01,0xdb,0xad,0x5b,0x13,0xee,0x84,0x53,0xf6,0x99,0xda,0xe8,0xfe,0xe8, -0x87,0x3e,0x78,0xbf,0xa4,0x6f,0x27,0xed,0x8b,0xa7,0x13,0xcf,0x87,0x2e,0x40,0xff, -0x00,0xaf,0x95,0x3f,0xfb,0x2d,0x48,0x3f,0x6c,0x3d,0x27,0x1f,0x37,0x87,0xaf,0x01, -0xf6,0x9d,0x0f,0xf4,0xae,0x59,0xbf,0x64,0x2d,0x68,0x1e,0x35,0x6b,0x53,0xef,0x83, -0x50,0x37,0xec,0x8d,0xe2,0x11,0xf7,0x75,0x0b,0x46,0xfc,0x4d,0x4f,0xb7,0xce,0x97, -0xd9,0x7f,0x72,0x17,0xb5,0xce,0xd7,0xd9,0xfc,0x11,0xdd,0x45,0xfb,0x5f,0xf8,0x74, -0xb7,0xcf,0xa3,0x6a,0x4a,0x3d,0x54,0xc6,0x7f,0xf6,0x6a,0xb3,0x1f,0xed,0x75,0xe1, -0x36,0x5c,0xbe,0x9b,0xab,0x2b,0x7a,0x08,0xe3,0x3f,0xfb,0x3d,0x79,0xb4,0x9f,0xb2, -0x67,0x89,0x54,0x1c,0x5e,0x5a,0x13,0xfe,0xf1,0xa8,0x1b,0xf6,0x50,0xf1,0x5f,0x69, -0xad,0x1b,0xfe,0x07,0x42,0xc5,0x67,0x0b,0xec,0x3f,0xb9,0x0f,0xeb,0x39,0xd2,0xfb, -0x1f,0x82,0x3d,0x54,0x7e,0xd6,0xfe,0x0e,0xce,0x0d,0x96,0xae,0x07,0xaf,0x93,0x1f, -0xff,0x00,0x17,0x4f,0x1f,0xb5,0xaf,0x83,0x31,0xff,0x00,0x1e,0xba,0xb7,0xfd,0xf8, -0x4f,0xfe,0x2e,0xbc,0x85,0xbf,0x65,0x4f,0x18,0x0f,0xbb,0xf6,0x46,0xff,0x00,0xb6, -0xb5,0x03,0xfe,0xcb,0xbe,0x34,0x4c,0xe2,0x0b,0x76,0x03,0xd2,0x51,0x43,0xc7,0x66, -0xeb,0x7a,0x7f,0xf9,0x28,0x7d,0x73,0x39,0x5f,0xf2,0xeb,0xf0,0x3d,0xa9,0x7f,0x6a, -0xff,0x00,0x05,0x36,0x3f,0x75,0xa9,0xaf,0xd6,0xdd,0x7f,0xf8,0xaa,0x91,0x7f,0x6a, -0xaf,0x04,0x11,0xc9,0xd4,0x53,0xeb,0x6c,0x3f,0xf8,0xaa,0xf0,0xb6,0xfd,0x99,0x7c, -0x6c,0xbd,0x2c,0xe2,0x3f,0x49,0x45,0x42,0xff,0x00,0xb3,0x67,0x8d,0xd4,0x7f,0xc8, -0x3d,0x4f,0xd1,0xc5,0x2f,0xed,0x1c,0xd5,0x7f,0xcb,0xbf,0xfc,0x95,0x8b,0xeb,0xf9, -0xba,0xff,0x00,0x97,0x5f,0x87,0xfc,0x13,0xe8,0x48,0xbf,0x69,0xef,0x01,0xc8,0xe0, -0x1b,0xeb,0xa8,0xc1,0xfe,0x26,0xb5,0x6c,0x0f,0xca,0xad,0x2f,0xed,0x27,0xf0,0xfd, -0x81,0x3f,0xdb,0x2e,0xbe,0xc6,0xd6,0x5f,0xfe,0x26,0xbe,0x6b,0x6f,0xd9,0xd7,0xc7, -0x0a,0x78,0xd2,0xc9,0xc7,0xa3,0x8a,0x81,0xff,0x00,0x67,0xef,0x1c,0xa9,0xff,0x00, -0x90,0x34,0x87,0xe8,0xc0,0xff,0x00,0x5a,0x7f,0xda,0x99,0x9c,0x77,0xa5,0xff,0x00, -0x92,0xb0,0xfe,0xd2,0xcd,0x56,0xf4,0x7f,0x06,0x7d,0x42,0x3f,0x68,0x9f,0x87,0xcd, -0xff,0x00,0x33,0x02,0x8f,0xad,0xb4,0xdf,0xfc,0x45,0x38,0x7e,0xd0,0x9f,0x0f,0xcf, -0x4f,0x11,0x47,0xff,0x00,0x80,0xf2,0x8f,0xfd,0x92,0xbe,0x55,0x6f,0x81,0x3e,0x37, -0x43,0xce,0x89,0x37,0xe1,0x51,0x3f,0xc1,0x4f,0x1a,0x27,0x5d,0x0e,0xe7,0x8f,0x6a, -0x6f,0x38,0xcc,0x16,0xf4,0xbf,0xf2,0x59,0x07,0xf6,0xae,0x64,0xb7,0xa1,0xf8,0x3f, -0xf3,0x3e,0xb2,0x1f,0x1f,0xfc,0x00,0xd8,0xff,0x00,0x8a,0x8e,0x1e,0x7d,0x62,0x93, -0xff,0x00,0x89,0xa9,0xd3,0xe3,0xaf,0x80,0xdc,0x64,0x78,0x92,0xd4,0x7d,0x43,0x8f, -0xe9,0x5f,0x1f,0xbf,0xc1,0xff,0x00,0x18,0xa0,0xe7,0x42,0xba,0xe7,0xfd,0x9a,0x85, -0xbe,0x14,0xf8,0xb9,0x3a,0xe8,0x77,0x7f,0xf7,0xc5,0x2f,0xed,0xac,0x72,0xff,0x00, -0x97,0x4b,0xee,0x62,0xfe,0xd8,0xc7,0xad,0xe8,0x7e,0x0c,0xfb,0x3d,0x3e,0x32,0xf8, -0x21,0xc0,0xc7,0x89,0xb4,0xfe,0x7d,0x65,0xc5,0x48,0x9f,0x17,0x7c,0x14,0xf9,0xc7, -0x89,0xf4,0xce,0x3d,0x6e,0x14,0x57,0xc4,0xef,0xf0,0xd3,0xc5,0x51,0x9f,0x9b,0x44, -0xbd,0x1f,0xf6,0xc8,0xd4,0x0d,0xe0,0x0f,0x12,0x27,0x5d,0x1e,0xf0,0x7f,0xdb,0x23, -0x47,0xf6,0xee,0x29,0x6f,0x49,0x7e,0x23,0xfe,0xdb,0xc6,0x2d,0xe8,0x7e,0x67,0xdc, -0x63,0xe2,0xbf,0x83,0x4f,0x4f,0x13,0xe9,0x7f,0xf8,0x16,0x9f,0xe3,0x52,0x2f,0xc4, -0xef,0x09,0x36,0x71,0xe2,0x5d,0x2f,0x8f,0xfa,0x7b,0x4f,0xf1,0xaf,0x85,0x1b,0xc1, -0x5e,0x20,0x5e,0xba,0x55,0xd0,0xff,0x00,0xb6,0x46,0xa2,0x6f,0x0a,0x6b,0x69,0xd7, -0x4c,0xba,0x1f,0xf6,0xc8,0xd1,0xfd,0xbf,0x89,0xeb,0x49,0x7e,0x22,0xfe,0xdd,0xc5, -0x2d,0xe8,0x7e,0x67,0xde,0xc9,0xf1,0x07,0xc2,0xf2,0x80,0x57,0xc4,0x3a,0x59,0x07, -0xa7,0xfa,0x64,0x7f,0xe3,0x56,0x13,0xc6,0x5a,0x04,0x9f,0x77,0x5a,0xd3,0x9b,0x1e, -0x97,0x49,0xfe,0x35,0xf9,0xfa,0xde,0x1c,0xd5,0xd7,0xae,0x9f,0x72,0x3f,0xed,0x91, -0xa8,0xce,0x89,0xa9,0x27,0x06,0xca,0xe0,0x7d,0x63,0x34,0xd7,0x10,0xd6,0x5b,0xd3, -0x5f,0x8f,0xf9,0x0f,0xfb,0x7e,0xbf,0x5a,0x1f,0x99,0xfa,0x1a,0x9e,0x23,0xd2,0x64, -0x50,0x57,0x54,0xb3,0x60,0x7a,0x62,0xe1,0x3f,0xc6,0x9f,0xfd,0xbb,0xa6,0x9e,0x9a, -0x8d,0xa9,0xff,0x00,0xb6,0xeb,0xfe,0x35,0xf9,0xd8,0x74,0xbb,0xe1,0xd6,0xd6,0x61, -0xff,0x00,0x00,0x34,0xc3,0x61,0x78,0xbd,0x60,0x90,0x7d,0x54,0xd3,0xff,0x00,0x58, -0xe7,0xd6,0x97,0xe3,0xff,0x00,0x00,0x7f,0xeb,0x0d,0x45,0xff,0x00,0x2e,0x7f,0x1f, -0xf8,0x07,0xe8,0xca,0x6a,0xf6,0x2e,0x32,0x2f,0x2d,0xd8,0x7a,0x89,0x54,0xff,0x00, -0x5a,0x78,0xd4,0x6d,0x49,0xe2,0xe6,0x03,0xf4,0x90,0x7f,0x8d,0x7e,0x71,0x7d,0x9e, -0xed,0x7f,0xe5,0x9c,0xa3,0xf0,0x34,0xb9,0xbb,0x43,0xff,0x00,0x2d,0x47,0xe7,0x47, -0xfa,0xc7,0x2f,0xf9,0xf5,0xf8,0xff,0x00,0xc0,0x0f,0xf5,0x8a,0x56,0xd6,0x8b,0xfb, -0xff,0x00,0xe0,0x1f,0xa4,0x0b,0x75,0x13,0x8c,0xac,0xa8,0xc3,0xd4,0x30,0x34,0xf1, -0x20,0x3d,0xc1,0xfc,0x6b,0xf3,0x78,0x5e,0x5e,0xa7,0x49,0x66,0x51,0xec,0xcd,0x53, -0x2e,0xb5,0xaa,0xc6,0xc0,0xad,0xf5,0xda,0x9f,0x51,0x33,0x83,0xfc,0xea,0xd7,0x11, -0xf7,0xa5,0xf8,0xff,0x00,0xc0,0x29,0x71,0x1a,0xeb,0x49,0xfd,0xff,0x00,0xf0,0x0f, -0xd1,0xb0,0xc3,0xd6,0x97,0x75,0x7e,0x74,0x0f,0x13,0x6b,0x4a,0x30,0x35,0x4b,0xe5, -0xfa,0x5c,0x3f,0xf8,0xd2,0x8f,0x16,0x6b,0x8a,0x72,0x35,0x7d,0x40,0x1f,0xfa,0xfa, -0x93,0xfc,0x6a,0xff,0x00,0xd6,0x38,0xff,0x00,0xcf,0xbf,0xc7,0xfe,0x00,0xff,0x00, -0xd6,0x48,0x75,0xa4,0xfe,0xf3,0xf4,0x58,0x36,0x69,0x6b,0xf3,0xb1,0x7c,0x6b,0xe2, -0x04,0x04,0x0d,0x6b,0x51,0x1f,0xf6,0xf5,0x27,0xf8,0xd5,0x88,0xfe,0x23,0x78,0xa2, -0x10,0x36,0x78,0x83,0x54,0x5c,0x70,0x31,0x79,0x27,0xf8,0xd3,0x5c,0x45,0x0e,0xb4, -0xdf,0xde,0x52,0xe2,0x4a,0x5d,0x69,0xb3,0xf4,0x32,0x8a,0xfc,0xf9,0x5f,0x8a,0x5e, -0x2e,0x41,0x81,0xe2,0x4d,0x54,0x0f,0xfa,0xfb,0x73,0xfd,0x6a,0xc2,0x7c,0x62,0xf1, -0xaa,0x63,0x1e,0x26,0xd4,0xb8,0xe9,0xfb,0xf2,0x6a,0xd7,0x11,0x52,0xeb,0x4d,0xfe, -0x05,0x7f,0xac,0x94,0x3a,0xc1,0xfe,0x07,0xdf,0xd4,0x57,0xc0,0xa3,0xe3,0x57,0x8d, -0xd7,0xfe,0x66,0x6d,0x43,0xf1,0x97,0xff,0x00,0xad,0x4f,0x4f,0x8d,0xfe,0x38,0x5c, -0x7f,0xc5,0x4b,0x7c,0x71,0xea,0xe0,0xff,0x00,0x4a,0xaf,0xf5,0x8a,0x87,0xf2,0x3f, -0xc0,0xaf,0xf5,0x8f,0x0d,0xfc,0x8f,0xf0,0x3e,0xf7,0xa2,0xbe,0x0c,0x5f,0x8e,0xde, -0x3a,0x5e,0x9e,0x24,0xbc,0xfc,0x76,0x9f,0xe9,0x56,0x53,0xf6,0x84,0xf1,0xea,0x63, -0xfe,0x2a,0x19,0x8e,0x3d,0x61,0x8c,0xff,0x00,0xec,0xb4,0xd7,0x11,0x61,0xdf,0xd8, -0x97,0xe1,0xfe,0x65,0x2e,0x22,0xc2,0xf5,0x8c,0xbf,0x0f,0xf3,0x3e,0xea,0xa2,0xbe, -0x1c,0x8b,0xf6,0x8e,0xf1,0xf4,0x44,0x9f,0xed,0xc2,0xd9,0xfe,0xf5,0xbc,0x47,0xff, -0x00,0x65,0xab,0xf6,0x3f,0xb5,0x17,0x8e,0xed,0x26,0x57,0x96,0xee,0xd2,0xed,0x07, -0x54,0x9a,0xd5,0x40,0x3f,0xf7,0xce,0x0d,0x68,0xb8,0x83,0x0a,0xf7,0x4f,0xf0,0xff, -0x00,0x32,0xd7,0x10,0xe0,0xde,0xe9,0xaf,0x97,0xfc,0x13,0xed,0x4a,0x2b,0xe6,0x2f, -0x0c,0xfe,0xd8,0x52,0x06,0x58,0xfc,0x41,0xa1,0x86,0x5e,0xf3,0xe9,0xcf,0x83,0xed, -0xf2,0x39,0xff,0x00,0xd9,0xab,0xda,0xbc,0x15,0xf1,0x6f,0xc2,0xfe,0x3f,0x5d,0xba, -0x46,0xa9,0x1c,0x97,0x40,0x65,0xad,0x26,0xfd,0xdc,0xcb,0xff,0x00,0x01,0x3d,0x7e, -0xa3,0x22,0xbd,0x6c,0x3e,0x63,0x86,0xc4,0xe9,0x4e,0x7a,0xf6,0xd9,0x9e,0xa6,0x1f, -0x32,0xc2,0xe2,0x9d,0xa9,0xcd,0x5f,0xb6,0xcc,0xec,0xe8,0xa6,0xa9,0xcd,0x3a,0xbd, -0x13,0xd3,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x0a,0x42, -0x69,0x6a,0xbd,0xe5,0xd4,0x56,0x56,0xd3,0x5c,0x4f,0x22,0xc5,0x04,0x48,0x5d,0xdd, -0xce,0x02,0xa8,0x19,0x24,0x9a,0x4f,0x45,0x71,0x37,0x65,0x76,0x78,0x6f,0xed,0x35, -0xf1,0x65,0xfc,0x33,0xa6,0x2f,0x86,0xb4,0xb9,0xb6,0x6a,0x57,0xd1,0xee,0xb8,0x95, -0x1b,0x0d,0x0c,0x3d,0x30,0x3d,0x0b,0x72,0x3e,0x80,0xfa,0x8a,0xe4,0xbf,0x64,0xbf, -0x08,0xfd,0xa7,0x55,0xbe,0xd7,0x66,0x43,0xb6,0xdd,0x7c,0xa8,0x8f,0x6d,0xc7,0xad, -0x78,0x9f,0x8c,0xbc,0x4d,0x71,0xe3,0x9f,0x17,0xea,0x3a,0xbc,0xdb,0x8b,0xde,0x4e, -0x5a,0x34,0x3d,0x51,0x33,0x84,0x5f,0xc0,0x00,0x2b,0xed,0x7f,0x82,0x9e,0x13,0x1e, -0x11,0xf8,0x7d,0xa6,0xdb,0x15,0xdb,0x3c,0xa9,0xe7,0xcb,0x91,0x83,0xb9,0xb9,0xaf, -0x89,0xc3,0x4e,0x59,0x96,0x64,0xea,0xbf,0x86,0x1b,0x7e,0x9f,0xe6,0x7c,0x56,0x0a, -0xa4,0xb3,0x3c,0xc1,0xd7,0x97,0xc3,0x0d,0xbf,0x4f,0xf3,0x3b,0xb0,0x31,0x4b,0x45, -0x15,0xf6,0xe7,0xdb,0x09,0x4b,0x45,0x14,0x00,0x53,0x43,0x83,0xd2,0x9d,0x5e,0x0f, -0xf1,0xcb,0xf6,0xdc,0xf8,0x3b,0xfb,0x3e,0x5c,0xc9,0x61,0xe2,0xaf,0x16,0xc2,0xfa, -0xda,0x02,0x7f,0xb1,0xf4,0xc4,0x6b,0xbb,0xa0,0x47,0x66,0x54,0xc8,0x8c,0x9e,0xde, -0x61,0x5c,0xd0,0x07,0xba,0x89,0x01,0x6d,0xbc,0xe7,0xdc,0x1a,0x7d,0x7e,0x71,0xeb, -0xdf,0xf0,0x5a,0xdf,0x00,0x5b,0xb3,0x0d,0x1b,0xe1,0xf7,0x89,0x2f,0x80,0xe8,0xd7, -0xd3,0xdb,0xdb,0xe7,0xf0,0x56,0x92,0xbe,0x9f,0xfd,0x94,0x7f,0x6a,0xb8,0xbf,0x69, -0x8f,0x85,0xfa,0xaf,0x8f,0x2e,0x7c,0x36,0xfe,0x0b,0xd0,0xac,0xae,0x64,0xb7,0x59, -0xef,0xef,0x92,0x44,0x91,0x63,0x40,0xd2,0xca,0x5b,0x6a,0x85,0x45,0xce,0x32,0x7d, -0x1b,0xa6,0x28,0x11,0xef,0xb4,0x57,0x17,0x6d,0xf1,0xb3,0xe1,0xe5,0xeb,0x2a,0xdb, -0xf8,0xf3,0xc3,0x33,0xb3,0x1c,0x05,0x8b,0x58,0xb7,0x62,0x4f,0xe0,0xf5,0xd9,0x83, -0x9e,0x94,0x0c,0x5a,0x2b,0x33,0x5f,0xf1,0x1e,0x9f,0xe1,0x7d,0x3d,0xaf,0xb5,0x3b, -0x91,0x6b,0x6a,0xac,0x14,0xb9,0x52,0xdc,0x93,0x80,0x30,0x01,0x35,0x81,0x17,0xc5, -0xff,0x00,0x07,0xcd,0xd3,0x5d,0x80,0x7f,0xbe,0xae,0xbf,0xcc,0x57,0x34,0xf1,0x34, -0x69,0x4b,0x96,0xa4,0xd2,0x7e,0x6d,0x22,0x1c,0xe1,0x17,0x66,0xd2,0x3b,0x1a,0x31, -0x5c,0xcc,0x7f,0x12,0xfc,0x2b,0x26,0x31,0xe2,0x0b,0x01,0x9f,0xef,0x4e,0xa3,0xf9, -0xd4,0xc3,0xe2,0x0f,0x86,0x0f,0x4f,0x10,0xe9,0x9f,0xf8,0x16,0x9f,0xe3,0x49,0x62, -0xb0,0xef,0x6a,0x8b,0xef,0x42,0xf6,0x90,0xfe,0x64,0x74,0x34,0x56,0x12,0xf8,0xe7, -0xc3,0x8e,0x78,0xd7,0xf4,0xc3,0xff,0x00,0x6f,0x91,0xff,0x00,0x8d,0x58,0x8b,0xc5, -0x3a,0x34,0xe3,0xf7,0x7a,0xb5,0x8c,0x9f,0xee,0xdc,0x21,0xfe,0xb5,0xa2,0xad,0x4d, -0xed,0x25,0xf7,0x8f,0x9a,0x2f,0x66,0x6a,0xd1,0x55,0x13,0x55,0xb2,0x97,0x95,0xbb, -0x81,0xbf,0xdd,0x95,0x4f,0xf5,0xa9,0x96,0x78,0xa4,0xfb,0xb2,0x2b,0x7d,0x1a,0xaf, -0x9e,0x2f,0x66,0x55,0xd1,0x2d,0x14,0xdd,0xdd,0xc1,0xa5,0x07,0x35,0x43,0x16,0x8a, -0x28,0xa6,0x01,0x45,0x21,0xe9,0x49,0x9a,0x00,0x75,0x26,0x29,0x32,0x3d,0x69,0x73, -0x48,0x05,0xa4,0xc5,0x18,0xf7,0xa5,0xa6,0x02,0x62,0x96,0x8a,0x28,0x00,0xa2,0x8a, -0x28,0x01,0x29,0x68,0xa2,0x80,0x12,0x8c,0x52,0xd1,0x40,0x05,0x14,0x51,0x40,0x05, -0x26,0x29,0x68,0xa0,0x04,0xc5,0x18,0x1e,0x94,0xb4,0x50,0x02,0x6d,0x1e,0x82,0x93, -0xcb,0x53,0xfc,0x23,0xf2,0xa0,0x92,0x3f,0x87,0x3f,0x8d,0x28,0xcf,0x71,0x8a,0x00, -0x69,0x82,0x33,0xd6,0x35,0x3f,0x80,0xa6,0x9b,0x58,0x5b,0xac,0x48,0x7f,0xe0,0x22, -0xa5,0xa2,0x95,0x97,0x61,0x59,0x10,0x1b,0x1b,0x73,0xd6,0x08,0xff,0x00,0xef,0x91, -0x4d,0x3a,0x6d,0xa3,0x75,0xb6,0x84,0xfd,0x50,0x55,0x9a,0x29,0x72,0xc7,0xb0,0x59, -0x14,0x9b,0x46,0xb0,0x6e,0xb6,0x56,0xe7,0xfe,0xd9,0x8f,0xf0,0xa8,0xdb,0xc3,0xba, -0x5b,0x75,0xd3,0xed,0x8f,0xfd,0xb2,0x5f,0xf0,0xad,0x1a,0x29,0x7b,0x38,0x76,0x17, -0x2a,0xec,0x64,0xb7,0x85,0x74,0x76,0xeb,0xa6,0x5a,0x9f,0xfb,0x64,0xbf,0xe1,0x51, -0xb7,0x83,0x74,0x36,0xeb,0xa4,0xda,0x1f,0xac,0x23,0xfc,0x2b,0x6a,0x8a,0x9f,0x65, -0x4f,0xf9,0x57,0xdc,0x2e,0x48,0x76,0x30,0x1f,0xc0,0x9e,0x1e,0x93,0xef,0x68,0xd6, -0x67,0xfe,0xd8,0x8a,0x89,0xbe,0x1c,0xf8,0x65,0xba,0xe8,0x96,0x7f,0xf7,0xec,0x57, -0x49,0x45,0x4b,0xc3,0xd2,0x7b,0xc1,0x7d,0xc4,0xfb,0x28,0x3f,0xb2,0x8e,0x55,0xbe, -0x17,0xf8,0x55,0xfa,0xe8,0x96,0x9f,0xf7,0xc5,0x42,0xdf,0x09,0x3c,0x22,0xdd,0x74, -0x3b,0x5f,0xfb,0xe6,0xba,0xfa,0x5a,0x8f,0xaa,0xd0,0xfe,0x45,0xf7,0x21,0x7b,0x1a, -0x5f,0xca,0xbe,0xe3,0x89,0x7f,0x83,0x7e,0x0e,0x7e,0xba,0x1d,0xb7,0xe5,0x50,0x3f, -0xc0,0xff,0x00,0x05,0x3f,0xfc,0xc0,0xe0,0x1f,0x4c,0xd7,0x7b,0x45,0x4b,0xc1,0xe1, -0xdf,0xfc,0xbb,0x5f,0x72,0x27,0xea,0xf4,0x7f,0x91,0x7d,0xc7,0x9e,0x3f,0xc0,0x5f, -0x04,0xbf,0xfc,0xc1,0xa3,0x1f,0x46,0x35,0x0b,0xfe,0xcf,0x7e,0x09,0x7f,0xf9,0x85, -0x63,0xe8,0xe6,0xbd,0x23,0x34,0x64,0x7a,0xd4,0x7d,0x47,0x0b,0xff,0x00,0x3e,0xd7, -0xdc,0x88,0xfa,0xa5,0x0f,0xe4,0x5f,0x71,0xe6,0x0f,0xfb,0x39,0x78,0x25,0xff,0x00, -0xe6,0x1c,0xc3,0xe8,0xf5,0x0b,0xfe,0xcd,0x5e,0x09,0x7f,0xf9,0x72,0x90,0x7d,0x24, -0xaf,0x55,0xa2,0xa7,0xfb,0x3f,0x08,0xff,0x00,0xe5,0xda,0xfb,0x89,0xfa,0x96,0x19, -0xef,0x4d,0x7d,0xc7,0x92,0x3f,0xec,0xc5,0xe0,0xb6,0xe9,0x05,0xc2,0xff,0x00,0xdb, -0x4a,0x81,0xff,0x00,0x65,0xcf,0x07,0xb7,0x41,0x72,0xbf,0xf6,0xd2,0xbd,0x8e,0x8a, -0x9f,0xec,0xcc,0x1b,0xff,0x00,0x97,0x4b,0xee,0x27,0xea,0x18,0x57,0xff,0x00,0x2e, -0xd7,0xdc,0x78,0xb3,0xfe,0xca,0xbe,0x12,0x6e,0x92,0x5d,0x2f,0xfc,0x08,0x54,0x2f, -0xfb,0x27,0xf8,0x5d,0xba,0x5c,0xdd,0x0f,0xc4,0x57,0xb7,0xd1,0x51,0xfd,0x95,0x82, -0xff,0x00,0x9f,0x48,0x97,0x97,0x61,0x1f,0xfc,0xbb,0x47,0x84,0xbf,0xec,0x95,0xe1, -0xb6,0xe9,0x7d,0x76,0x3f,0x2a,0xa5,0x77,0xfb,0x24,0x69,0xd0,0x95,0x9f,0x4e,0xd6, -0x6e,0xed,0xae,0xe3,0x21,0xe2,0x90,0x60,0x15,0x61,0xd0,0x82,0x39,0x06,0xbe,0x83, -0xa4,0x3d,0x29,0x7f,0x64,0xe0,0xf7,0x54,0xed,0xf7,0x99,0xbc,0xaf,0x07,0x2f,0xf9, -0x76,0x8f,0x01,0xf0,0x97,0xc6,0x3d,0x4f,0xe1,0xff,0x00,0x89,0xd3,0xc2,0x5e,0x3e, -0xb9,0x59,0xa1,0x77,0x10,0xda,0x6b,0xa4,0x6d,0xcb,0x67,0x01,0x66,0xed,0xcf,0x1f, -0x3f,0xe7,0xeb,0x5e,0xfa,0x8c,0x18,0x70,0x72,0x3d,0x6b,0xe3,0x1f,0xda,0x88,0xa5, -0xee,0xbb,0x24,0x4c,0x01,0x05,0x88,0xc7,0xad,0x77,0x1f,0xb1,0xff,0x00,0xc6,0x49, -0xbc,0x47,0x65,0x79,0xe0,0x6d,0x66,0xe9,0xa6,0xd5,0xf4,0xa8,0x84,0xd6,0x53,0x4a, -0xd9,0x79,0xed,0x72,0x06,0x09,0xee,0x63,0x25,0x47,0xd1,0x97,0xd2,0xb9,0x70,0x18, -0xde,0x6a,0xd3,0xc3,0x4d,0xdf,0x95,0xe8,0xcf,0x23,0x07,0x98,0xfb,0x2c,0x6b,0xcb, -0xea,0xbb,0xaf,0xb2,0xdf,0xe4,0xff,0x00,0x43,0xe9,0x8a,0x29,0x9b,0xbd,0xff,0x00, -0x5a,0x2b,0xe8,0x8f,0xaa,0xe6,0x43,0xe8,0xa2,0x8a,0x45,0x05,0x14,0x51,0x40,0x05, -0x79,0x0f,0xed,0x3d,0xe2,0xdf,0xf8,0x46,0xfe,0x1a,0xdc,0x5a,0x45,0x26,0xcb,0xad, -0x55,0xc5,0xa2,0x60,0xf3,0xb3,0xac,0x9f,0xf8,0xe8,0x23,0xfe,0x05,0x5e,0xb8,0x49, -0xed,0x5f,0x1b,0x7e,0xd4,0xbe,0x30,0x3a,0xff,0x00,0xc4,0x4f,0xec,0xb8,0xdf,0x75, -0xae,0x93,0x10,0x8b,0x00,0x82,0x0c,0xad,0x86,0x73,0xf8,0x0d,0xa3,0xea,0x0d,0x78, -0xf9,0xb6,0x23,0xea,0xf8,0x59,0x35,0xbb,0xd1,0x7c,0xcf,0x13,0x38,0xc4,0xfd,0x5b, -0x07,0x26,0xb7,0x96,0x8b,0xe6,0x72,0x5f,0x06,0x7c,0x26,0x7c,0x5d,0xe3,0xed,0x32, -0xd3,0x6e,0xe8,0x52,0x41,0x2c,0xb9,0xfe,0xe8,0xe6,0xbe,0xf6,0x8d,0x04,0x68,0xa8, -0xa3,0x0a,0xa3,0x00,0x0f,0x4a,0xf9,0xd3,0xf6,0x49,0xf0,0x8f,0xd9,0xf4,0xfb,0xfd, -0x7a,0x68,0xfe,0x79,0x4f,0x93,0x13,0x1f,0x4e,0xf5,0xf4,0x60,0xae,0x3c,0x8b,0x0f, -0xec,0xb0,0xde,0xd1,0xef,0x2d,0x7e,0x5d,0x0c,0x32,0x2c,0x37,0xb0,0xc2,0x29,0x3d, -0xe5,0xa8,0xb4,0x51,0x45,0x7d,0x21,0xf4,0x41,0x48,0x4e,0x29,0x6b,0x95,0xf8,0xad, -0xe3,0x88,0x3e,0x19,0xfc,0x32,0xf1,0x5f,0x8b,0x6e,0x81,0x68,0x34,0x4d,0x2e,0xe7, -0x50,0x65,0x03,0x39,0xf2,0xa3,0x67,0xc7,0xe3,0x8a,0x00,0xfc,0xfb,0xff,0x00,0x82, -0x96,0x7f,0xc1,0x41,0x75,0x2f,0x01,0x6a,0xd7,0xbf,0x09,0xbe,0x1b,0x6a,0x06,0xcf, -0x59,0x8e,0x30,0x35,0xcd,0x72,0x03,0x87,0xb6,0xdc,0x33,0xf6,0x68,0x5b,0xb3,0xed, -0x20,0xb3,0x8f,0xbb,0xb8,0x01,0xce,0xec,0x7c,0x27,0xf0,0x53,0xf6,0x29,0xf8,0xcd, -0xfb,0x4a,0x59,0xcb,0xaf,0x78,0x6b,0xc3,0xb2,0x4d,0xa4,0xc9,0x21,0x27,0x5a,0xd5, -0xee,0x45,0xbc,0x33,0xbe,0x4e,0xe2,0xae,0xe7,0x32,0x1c,0x83,0x92,0xa0,0xe0,0xf5, -0x35,0xe5,0x9a,0x76,0xab,0x1f,0x8f,0xbe,0x29,0xda,0x6a,0x3e,0x2e,0xbf,0x2b,0x0e, -0xb3,0xac,0xa4,0xfa,0xb5,0xfb,0xb6,0xd2,0xa9,0x2c,0xe0,0xcf,0x21,0x3d,0xb0,0x19, -0x8f,0xb5,0x7f,0x40,0x9f,0x1c,0x3e,0x24,0xe8,0x3f,0xb3,0x97,0xec,0xbf,0xae,0xf8, -0x9b,0x43,0x5b,0x5b,0x7d,0x2b,0x46,0xd1,0x44,0x7a,0x34,0x36,0xa5,0x44,0x4c,0xcc, -0xa2,0x3b,0x61,0x1e,0x38,0x20,0xb3,0x27,0x4e,0xdc,0xd3,0x25,0x6a,0x7f,0x3e,0x1e, -0x2f,0xf0,0x4e,0xa1,0xe0,0xef,0x1d,0x6a,0xbe,0x13,0x9d,0xa1,0xbe,0xd5,0x74,0xeb, -0xe7,0xd3,0xa4,0xfb,0x03,0x99,0x63,0x92,0x64,0x7d,0x85,0x50,0xe0,0x6e,0xf9,0x81, -0x03,0x8e,0x71,0x5f,0xbd,0xbe,0x1c,0xf8,0x6b,0xa7,0x7e,0xce,0x7f,0xb0,0xcd,0xef, -0x86,0x2e,0x84,0x51,0xc7,0xa3,0x78,0x42,0xed,0xf5,0x07,0xc6,0x16,0x4b,0x86,0xb7, -0x91,0xe7,0x27,0xeb,0x23,0x30,0xfc,0xab,0xf2,0x6b,0xfe,0x09,0xd5,0xf0,0x92,0x7f, -0x8e,0x9f,0xb5,0xbf,0x87,0xae,0x75,0x24,0x6b,0xed,0x3f,0x45,0x95,0xfc,0x45,0xa9, -0xcb,0x29,0xfb,0xcd,0x11,0x06,0x32,0x4f,0x72,0xd3,0xb4,0x59,0xf5,0x19,0xaf,0xb2, -0xff,0x00,0xe0,0xac,0x1f,0xb6,0x06,0x8d,0xa5,0x78,0x12,0xe7,0xe0,0xdf,0x85,0xb5, -0x38,0x6f,0xf5,0xfd,0x52,0x44,0xfe,0xde,0x6b,0x67,0x0e,0xb6,0x56,0xc8,0x43,0x08, -0x19,0x81,0xe2,0x47,0x60,0x99,0x5e,0x48,0x50,0x72,0x06,0xe1,0x40,0x2d,0x35,0x3f, -0x2c,0xfe,0x17,0x78,0x72,0xe3,0xc6,0x1f,0x12,0xfc,0x27,0xa0,0xd9,0x0c,0xdd,0xea, -0x7a,0xb5,0xa5,0x9c,0x5c,0xe3,0xe6,0x92,0x64,0x51,0xfc,0xeb,0xfa,0x6e,0x8d,0x3c, -0xb4,0x55,0xeb,0x80,0x06,0x6b,0xf1,0x1f,0xfe,0x09,0x3f,0xf0,0x0e,0xe3,0xe2,0x67, -0xed,0x0b,0x17,0x8c,0xaf,0x2d,0x0b,0xf8,0x7b,0xc1,0xa9,0xf6,0xb6,0x92,0x45,0x3b, -0x1e,0xf1,0x81,0x10,0x20,0x3e,0xaa,0x73,0x27,0xb6,0xc1,0xeb,0x5f,0xb7,0x2c,0xc1, -0x14,0x92,0x70,0x00,0xcd,0x0c,0x16,0xc7,0x81,0xfe,0xd2,0x7e,0x22,0x12,0xdd,0x69, -0x9a,0x24,0x6d,0x91,0x18,0x37,0x52,0x8f,0x73,0x95,0x4f,0xd3,0x77,0xe6,0x2b,0xc4, -0xab,0x7b,0xc7,0x5e,0x20,0x3e,0x28,0xf1,0x6e,0xa7,0xa9,0x64,0x98,0xe5,0x98,0x88, -0xb3,0xd9,0x07,0x0b,0xfa,0x01,0x58,0x35,0xf8,0x96,0x67,0x89,0xfa,0xde,0x2e,0x75, -0x56,0xd7,0xb2,0xf4,0x5a,0x1f,0x29,0x88,0xa9,0xed,0x6a,0xb9,0x06,0x68,0xa2,0x8c, -0xd7,0x98,0x73,0x85,0x14,0x51,0x48,0x00,0x71,0x4e,0x49,0x5e,0x33,0x95,0x76,0x52, -0x3b,0x83,0x8a,0x6d,0x14,0xd3,0x6b,0x60,0xb9,0xb5,0xa6,0xf8,0xd7,0x5f,0xd2,0x0a, -0xfd,0x93,0x58,0xbd,0x84,0x2f,0x45,0x13,0x31,0x5f,0xc8,0xf1,0x5e,0x89,0xe1,0x6f, -0xda,0x2b,0x56,0xb0,0x91,0x22,0xd6,0xed,0xd3,0x51,0xb7,0xef,0x2c,0x2a,0x12,0x51, -0xf8,0x7d,0xd3,0xfa,0x7d,0x6b,0xc8,0x68,0xaf,0x43,0x0f,0x98,0xe2,0xb0,0xb2,0xbd, -0x2a,0x8f,0xf4,0xfb,0x8d,0xe1,0x5e,0xa5,0x37,0x78,0xc8,0xfb,0x57,0xc3,0x5e,0x28, -0xd3,0xbc,0x59,0xa6,0xa5,0xf6,0x9b,0x72,0xb7,0x10,0x31,0xc1,0xec,0xc8,0xdd,0xd5, -0x87,0x63,0x5a,0xd5,0xf2,0x47,0xc2,0x6f,0x18,0x4f,0xe1,0x2f,0x17,0xda,0x10,0xe7, -0xec,0x57,0x6e,0xb0,0x5c,0xc7,0x9e,0x08,0x27,0x01,0xbe,0xaa,0x4e,0x7f,0x3f,0x5a, -0xfa,0xd9,0x4e,0x46,0x6b,0xf5,0x3c,0xa7,0x31,0x59,0x8d,0x0e,0x76,0xad,0x25,0xa3, -0x3e,0x8b,0x0d,0x5f,0xdb,0xc2,0xfd,0x50,0x37,0x00,0xd7,0xcd,0x1f,0x15,0x3e,0x26, -0xeb,0x51,0x78,0xeb,0x51,0xb7,0xd2,0xf5,0x5b,0x9b,0x5b,0x4b,0x56,0x10,0x04,0x89, -0xf0,0xa5,0x94,0x7c,0xc7,0x1f,0xef,0x64,0x7e,0x15,0xf4,0x4e,0xbb,0xaa,0xc7,0xa1, -0xe8,0xd7,0xda,0x84,0xdc,0xc5,0x6b,0x0b,0xcc,0xc0,0x75,0x21,0x41,0x38,0xfd,0x2b, -0xe2,0x8b,0xbb,0xa9,0x2f,0x6e,0xa6,0xb8,0x95,0xb7,0xcb,0x33,0xb4,0x8e,0xc7,0xbb, -0x13,0x92,0x6b,0xc6,0xe2,0x5c,0x64,0xe8,0xd3,0xa7,0x4a,0x9c,0xac,0xdb,0xbe,0x9d, -0x8e,0x6c,0x7d,0x57,0x08,0xa8,0xc5,0xd8,0xea,0x13,0xe2,0xc7,0x8b,0xa3,0xe9,0xae, -0xdd,0x7e,0x3b,0x4f,0xf3,0x15,0x32,0x7c,0x64,0xf1,0x94,0x7d,0x35,0xb9,0x0f,0xfb, -0xd1,0x46,0x7f,0xf6,0x5a,0xe3,0x28,0xaf,0x82,0x58,0xec,0x52,0xda,0xac,0xbe,0xf6, -0x78,0x9e,0xda,0xa7,0xf3,0x3f,0xbc,0xef,0x13,0xe3,0x8f,0x8c,0xd3,0xfe,0x62,0xc1, -0xbf,0xde,0xb7,0x8b,0xff,0x00,0x89,0xab,0x09,0xf1,0xef,0xc6,0x0b,0xd6,0xf6,0x06, -0xfa,0xdb,0xaf,0xf8,0x57,0x9d,0xd1,0x5a,0x2c,0xcb,0x1a,0xb6,0xad,0x2f,0xbd,0x97, -0xf5,0x8a,0xbf,0xcc,0xcf,0x4a,0x5f,0xda,0x0b,0xc5,0xca,0x79,0x96,0xd1,0xff,0x00, -0xde,0xb7,0xff,0x00,0x03,0x53,0xa7,0xed,0x17,0xe2,0xa4,0xeb,0x16,0x9c,0xff,0x00, -0x58,0x1b,0xff,0x00,0x8b,0xaf,0x2e,0xa2,0xb4,0x59,0xb6,0x39,0x6d,0x59,0xfd,0xe3, -0x58,0x9a,0xcb,0xed,0x33,0xd6,0x23,0xfd,0xa4,0xbc,0x48,0xbf,0x7a,0xcb,0x4e,0x6f, -0xfb,0x66,0xe3,0xff,0x00,0x67,0xab,0x09,0xfb,0x4b,0x6b,0x60,0x7c,0xda,0x5d,0x8b, -0x1f,0x6d,0xe3,0xfa,0xd7,0x8f,0xd1,0x56,0xb3,0x9c,0x7a,0xff,0x00,0x97,0xac,0x7f, -0x5a,0xaf,0xfc,0xc7,0xb3,0x27,0xed,0x33,0xaa,0x0f,0xbd,0xa2,0xda,0xb7,0xd2,0x56, -0x1f,0xd2,0xa7,0x5f,0xda,0x6e,0xef,0xf8,0xb4,0x08,0x7f,0x0b,0xa3,0xff,0x00,0xc4, -0xd7,0x89,0x51,0xfa,0xd6,0xab,0x3c,0xcc,0x3a,0x55,0xfc,0x17,0xf9,0x14,0xb1,0x95, -0xff,0x00,0x98,0xfb,0x1b,0xe1,0xef,0x8b,0x26,0xf1,0xb7,0x86,0x61,0xd5,0xa5,0xb3, -0x16,0x42,0x67,0x75,0x48,0xc3,0xee,0xc8,0x52,0x57,0x39,0xc0,0xee,0x0d,0x74,0xb5, -0x89,0xe0,0xad,0x23,0xfb,0x03,0xc2,0x9a,0x56,0x9e,0x7e,0xf4,0x16,0xe8,0xaf,0xee, -0xd8,0xcb,0x1f,0xcf,0x35,0xb4,0x6b,0xf5,0xac,0x3f,0x3f,0xb1,0x87,0xb5,0x77,0x95, -0x95,0xfd,0x4f,0xa5,0x85,0xf9,0x17,0x36,0xe2,0xd2,0x13,0x8a,0xaf,0x7b,0x7f,0x6f, -0xa7,0x5a,0x49,0x73,0x75,0x3c,0x76,0xf6,0xf1,0x8d,0xcf,0x2c,0xac,0x15,0x54,0x7a, -0x92,0x6b,0xc7,0x3c,0x65,0xfb,0x45,0xdb,0xda,0xb3,0xdb,0x78,0x7a,0xdf,0xed,0x72, -0x0e,0x3e,0xd9,0x70,0x08,0x8f,0xea,0xab,0xd4,0xfe,0x38,0xfc,0x6b,0x0c,0x5e,0x3b, -0x0f,0x82,0x8f,0x35,0x69,0x5b,0xcb,0xaf,0xdc,0x4d,0x5a,0xd0,0xa4,0xaf,0x36,0x7b, -0x51,0x70,0xa3,0x24,0xe0,0x7a,0x9a,0xe5,0xf5,0x8f,0x8a,0x3e,0x16,0xd0,0xb7,0x0b, -0x9d,0x6a,0xd8,0xba,0x9c,0x18,0xe0,0x6f,0x39,0x81,0xf7,0x09,0x92,0x2b,0xe5,0xbf, -0x10,0xf8,0xe3,0x5d,0xf1,0x4c,0x8c,0xda,0x96,0xa5,0x34,0xe8,0x4e,0x7c,0xa0,0xdb, -0x63,0x1f,0x45,0x18,0x15,0x85,0xd2,0xbe,0x33,0x11,0xc5,0x2f,0x6c,0x3d,0x3f,0x9b, -0xff,0x00,0x25,0xfe,0x67,0x95,0x3c,0xc7,0xf9,0x23,0xf7,0x9f,0x4b,0xdf,0xfe,0xd1, -0x7e,0x19,0xb6,0x72,0xb0,0x45,0x7d,0x79,0xe8,0xd1,0xc4,0x15,0x7f,0xf1,0xe6,0x07, -0xf4,0xac,0xb9,0xbf,0x69,0x9d,0x31,0x4f,0xee,0x74,0x6b,0xb7,0x1f,0xed,0xc8,0xab, -0xfc,0xb3,0x5f,0x3e,0x51,0x5e,0x44,0xb8,0x8f,0x1f,0x2d,0x9a,0x5f,0x2f,0xf3,0x39, -0x5e,0x3a,0xb3,0xea,0x7b,0xfa,0xfe,0xd3,0x76,0x64,0xfc,0xda,0x14,0xe0,0x7b,0x4e, -0xa7,0xfa,0x55,0xb8,0xbf,0x69,0x6d,0x10,0xe3,0xcc,0xd2,0xf5,0x04,0xf5,0xda,0x23, -0x6f,0xfd,0x98,0x57,0xce,0xb4,0x54,0xae,0x21,0xcc,0x17,0xda,0x4f,0xe4,0x84,0xb1, -0xd5,0xfb,0x9f,0x53,0x58,0x7c,0x7b,0xf0,0x85,0xe8,0x4f,0x32,0xf2,0x6b,0x36,0x6f, -0xe1,0x9e,0xdd,0xb8,0xfa,0x95,0x04,0x7e,0xb5,0xd8,0xe9,0x3e,0x25,0xd2,0xb5,0xe0, -0x4e,0x9d,0xa9,0x5a,0xde,0xe0,0x64,0x88,0x25,0x56,0x23,0xea,0x07,0x4a,0xf8,0xa2, -0x9d,0x14,0xaf,0x04,0x8a,0xf1,0xbb,0x46,0xeb,0xca,0xb2,0x1c,0x11,0xf4,0x22,0xbd, -0x0a,0x3c,0x51,0x88,0x8b,0xfd,0xf4,0x13,0x5e,0x5a,0x3f,0xd4,0xde,0x19,0x8c,0xd7, -0xc4,0xae,0x7d,0xcf,0x9c,0x9e,0xb4,0xb5,0xf2,0xcf,0x84,0xfe,0x39,0x78,0x8b,0xc3, -0xae,0x91,0xdd,0x4d,0xfd,0xaf,0x68,0x3a,0xc7,0x72,0x7e,0x70,0x3d,0x9f,0xaf,0xe7, -0x9a,0xf7,0xbf,0x04,0x7c,0x49,0xd1,0xfc,0x75,0x6e,0x4d,0x94,0xde,0x55,0xda,0x0c, -0xc9,0x69,0x36,0x04,0x8b,0xee,0x3d,0x47,0xb8,0xaf,0xaf,0xc0,0xe7,0x18,0x5c,0x73, -0xe5,0x83,0xb4,0xbb,0x3f,0xd0,0xf4,0xe8,0xe2,0xa9,0xd6,0xd1,0x3b,0x33,0xac,0xa2, -0x90,0x1c,0x8a,0x5a,0xf7,0x0e,0xc0,0xa2,0x8a,0x28,0x00,0xa2,0x90,0x9c,0x57,0x3b, -0xe2,0x9f,0x88,0x1a,0x1f,0x83,0x93,0x3a,0x9d,0xfc,0x71,0x4a,0x46,0x44,0x09,0xf3, -0xc8,0xdf,0xf0,0x11,0xce,0x3d,0xcf,0x15,0x95,0x4a,0xb0,0xa5,0x1e,0x6a,0x92,0xb2, -0xf3,0x26,0x52,0x51,0x57,0x93,0x3a,0x3a,0x4c,0xd7,0x84,0x6b,0xdf,0xb4,0xb3,0x1d, -0xc9,0xa3,0xe9,0x20,0x0e,0xd2,0xde,0x3f,0x3f,0xf7,0xc2,0xff,0x00,0xf1,0x55,0xc3, -0xea,0x7f,0x1b,0x7c,0x5f,0xa9,0x13,0xff,0x00,0x13,0x31,0x68,0xa7,0xf8,0x6d,0xa2, -0x55,0xc7,0xe3,0x82,0x7f,0x5a,0xf9,0xca,0xfc,0x45,0x81,0xa5,0xa4,0x5b,0x97,0xa2, -0xff,0x00,0x33,0x82,0x78,0xea,0x31,0xd1,0x6a,0x7d,0x5d,0x9f,0xca,0x8d,0xc3,0xd6, -0xbe,0x30,0xba,0xf1,0xaf,0x88,0x2f,0x73,0xe7,0xeb,0x7a,0x84,0x80,0xf5,0x06,0xe5, -0xf1,0xf9,0x66,0xb3,0x1e,0xfa,0xe6,0x43,0x96,0xb8,0x95,0x89,0xee,0xce,0x4d,0x79, -0x92,0xe2,0xaa,0x6b,0xe1,0xa4,0xfe,0xff,0x00,0xf8,0x07,0x3b,0xcc,0xa3,0xd2,0x27, -0xdc,0x04,0x2b,0x1f,0x9b,0x69,0xfa,0xd3,0x86,0xd0,0x30,0x00,0xfc,0x2b,0xe1,0xbf, -0xb5,0xcf,0xff,0x00,0x3d,0xa4,0xff,0x00,0xbe,0x8d,0x58,0xb6,0xd7,0x35,0x2b,0x33, -0x9b,0x7d,0x42,0xea,0x03,0xeb,0x1c,0xcc,0xbf,0xc8,0xd4,0xae,0x2a,0x87,0x5a,0x3f, -0x8f,0xfc,0x01,0x7f,0x69,0x2e,0xb1,0xfc,0x4f,0xb6,0xb6,0xa9,0x3d,0x06,0x69,0xd9, -0xe3,0x8a,0xf8,0xe6,0xd3,0xe2,0x37,0x8a,0x2c,0xbf,0xd5,0x6b,0xd7,0xff,0x00,0x47, -0x9d,0x9c,0x7f,0xe3,0xd9,0xae,0x82,0xc3,0xe3,0xcf,0x8b,0xec,0x48,0xdf,0x75,0x05, -0xea,0x8e,0xd3,0xc0,0xbf,0xcd,0x71,0x5d,0x74,0xf8,0x9f,0x0b,0x2f,0x8e,0x2d,0x7d, -0xcc,0xda,0x39,0x85,0x37,0xba,0x68,0xfa,0xa2,0x90,0xf1,0x5e,0x27,0xe1,0x2f,0xda, -0x22,0x6d,0x5f,0x53,0xb3,0xd3,0xef,0xb4,0x61,0xe6,0xdc,0xca,0x90,0xac,0x96,0xb2, -0x7f,0x13,0x10,0x07,0xca,0xdf,0x5f,0x5a,0xf6,0xc1,0xc8,0x15,0xf4,0x78,0x4c,0x75, -0x0c,0x74,0x5c,0xa8,0x4a,0xf6,0x3b,0xa9,0x56,0x85,0x65,0x78,0x30,0x56,0x0e,0xa0, -0x8e,0x86,0x96,0x9a,0xab,0xb4,0x60,0x74,0xa7,0x57,0x79,0xb0,0x53,0x5c,0xe1,0x49, -0xf4,0x14,0xea,0x8a,0xe9,0xfc,0xbb,0x69,0x5b,0xd1,0x09,0xfd,0x29,0x3d,0x80,0xf8, -0x93,0xf6,0x80,0xb9,0xfb,0x47,0x8a,0xe4,0x5c,0xe7,0x04,0xd7,0x87,0xe8,0xfe,0x3c, -0x97,0xe1,0x5f,0xc5,0x4f,0x09,0x78,0xaa,0x10,0x0a,0x5a,0x5f,0x24,0x57,0x0a,0x4e, -0x03,0x41,0x27,0xee,0xe4,0x07,0xfe,0x02,0xc4,0x8f,0x70,0x3d,0x2b,0xd6,0xbe,0x33, -0x5c,0x79,0xde,0x2d,0xb8,0x39,0xce,0x33,0x5f,0x2e,0x7c,0x77,0xba,0x30,0xe8,0x72, -0xed,0x38,0x60,0xa4,0x8c,0x7a,0xd7,0xe7,0x18,0x29,0x37,0x8e,0x94,0x97,0x76,0x7e, -0x39,0x8f,0xa9,0x25,0x9a,0x53,0x9c,0x77,0xe7,0x47,0xec,0x77,0xdb,0x61,0xff,0x00, -0x9e,0xc9,0xf9,0xd1,0x5e,0x03,0xfd,0x91,0x7b,0xff,0x00,0x3f,0x72,0xff,0x00,0xdf, -0x46,0x8a,0xfd,0x0f,0x9d,0x9f,0xaf,0x73,0x79,0x1f,0x44,0xd1,0x45,0x15,0xa9,0xa8, -0x51,0x45,0x14,0x01,0x93,0xe2,0x9d,0x7a,0x1f,0x0b,0xf8,0x77,0x53,0xd5,0xae,0x48, -0xf2,0x6c,0xed,0xde,0x76,0x1e,0xbb,0x41,0x38,0xfc,0x4f,0x15,0xf9,0xe8,0xf3,0x5d, -0x78,0x97,0x5b,0x92,0x79,0x4b,0x4d,0x79,0x7d,0x39,0x76,0x3d,0x49,0x66,0x6c,0xff, -0x00,0x5a,0xfa,0x97,0xf6,0xb9,0xf1,0x6b,0x69,0x9e,0x11,0xb1,0xd0,0xa0,0x90,0x2c, -0xba,0x9c,0xdb,0xe5,0x51,0x8c,0xf9,0x51,0xf3,0xfa,0xb1,0x5f,0xc8,0xd7,0x8e,0x7e, -0xce,0xde,0x11,0xff,0x00,0x84,0xa3,0xe2,0x15,0xa3,0xc8,0xbb,0xad,0xac,0xff,0x00, -0x7e,0xfc,0x71,0xc7,0x41,0xf9,0xd7,0xc3,0xe7,0x33,0x78,0xac,0x54,0x30,0x90,0xfe, -0x9b,0xff,0x00,0x80,0x7c,0x26,0x6f,0x27,0x8c,0xc7,0x53,0xc2,0x47,0x65,0xbf,0xab, -0xff,0x00,0x80,0x7d,0x75,0xf0,0xeb,0xc3,0x51,0xf8,0x4f,0xc1,0xba,0x5e,0x9a,0x8b, -0xb5,0xa2,0x84,0x17,0xf7,0x62,0x32,0x6b,0xa4,0x03,0x14,0x2f,0x02,0x96,0xbe,0xd2, -0x9c,0x15,0x38,0x28,0x47,0x64,0x7d,0xc4,0x22,0xa1,0x15,0x15,0xb2,0x0a,0x28,0xa2, -0xb4,0x2c,0x2b,0x88,0xf8,0xe1,0xe0,0x17,0xf8,0xa9,0xf0,0x77,0xc6,0xbe,0x0f,0x8e, -0x5f,0x22,0x5d,0x73,0x48,0xba,0xb0,0x8e,0x53,0xfc,0x0f,0x24,0x4c,0xaa,0x7f,0x02, -0x45,0x76,0xf4,0x84,0x66,0x80,0x3f,0x97,0xbf,0x12,0xf8,0x6f,0x53,0xf0,0x77,0x88, -0x75,0x2d,0x0f,0x59,0xb3,0x97,0x4f,0xd5,0x74,0xeb,0x87,0xb5,0xba,0xb5,0x9d,0x70, -0xf1,0x48,0xa4,0x86,0x52,0x3e,0xa2,0xb4,0xa7,0xf8,0x99,0xe2,0xdb,0x9f,0x06,0x0f, -0x08,0x4d,0xe2,0x5d,0x56,0x6f,0x0b,0x09,0x56,0x71,0xa3,0x49,0x79,0x23,0x5a,0xac, -0x8b,0x9d,0xac,0x23,0x27,0x68,0x23,0x27,0xa0,0xef,0x5f,0xbd,0xff,0x00,0xb4,0x67, -0xec,0x2b,0xf0,0x9f,0xf6,0x99,0xb8,0x6d,0x4b,0xc4,0xba,0x3c,0xba,0x77,0x88,0xf6, -0x04,0x1a,0xee,0x8f,0x20,0x82,0xe9,0x80,0x18,0x01,0xf8,0x29,0x26,0x07,0x03,0x7a, -0x92,0x07,0x00,0x81,0x5f,0x2a,0x6a,0xbf,0xf0,0x44,0xcf,0x0c,0x49,0x76,0x0e,0x99, -0xf1,0x3b,0x56,0xb6,0xb5,0xef,0x1d,0xde,0x9b,0x14,0xcf,0x8f,0xf7,0x95,0x90,0x7e, -0x95,0x57,0x22,0xcf,0xa1,0xf9,0x77,0xe0,0xff,0x00,0x89,0x7e,0x2c,0xf8,0x7d,0x0e, -0xa7,0x17,0x86,0x3c,0x45,0xa9,0x78,0x7d,0x75,0x38,0x84,0x17,0x9f,0xd9,0xb7,0x2f, -0x03,0x4f,0x18,0x24,0x84,0x62,0xa4,0x12,0x32,0x4f,0x15,0xdb,0xfe,0xcf,0x3f,0xb3, -0x4f,0x8e,0xff,0x00,0x6a,0x2f,0x1c,0x47,0xa3,0x78,0x5a,0xc6,0x49,0x63,0xf3,0x03, -0x6a,0x1a,0xcd,0xc8,0x3f,0x66,0xb3,0x42,0x79,0x79,0x1f,0xb9,0xeb,0x85,0x19,0x66, -0x3d,0x2b,0xf5,0x27,0xe1,0xef,0xfc,0x11,0xd7,0xe0,0xf7,0x86,0x2f,0xe1,0xbb,0xf1, -0x1e,0xad,0xe2,0x0f,0x18,0x98,0xf9,0x36,0x97,0x17,0x0b,0x6b,0x6e,0xc7,0xdc,0x44, -0xa1,0xff,0x00,0x0d,0xf5,0xf6,0xa7,0x82,0x3c,0x03,0xe1,0xcf,0x86,0xbe,0x1e,0xb6, -0xd0,0x7c,0x2b,0xa2,0x58,0xf8,0x7f,0x47,0xb7,0x1f,0xbb,0xb3,0xd3,0xe0,0x58,0xa3, -0x07,0xb9,0x20,0x0e,0x58,0xf7,0x63,0xc9,0xee,0x69,0x5c,0x12,0xee,0x71,0xdf,0xb3, -0x97,0xec,0xfd,0xe1,0xbf,0xd9,0xab,0xe1,0x7e,0x9d,0xe0,0xcf,0x0d,0xc6,0x5a,0x38, -0x7f,0x7b,0x77,0x7d,0x22,0x81,0x35,0xed,0xc3,0x01,0xbe,0x67,0x3e,0xa7,0x00,0x01, -0xd8,0x00,0x07,0x02,0xb6,0x7e,0x30,0xf8,0x8c,0x78,0x6f,0xc0,0x7a,0x8c,0x8a,0xc1, -0x6e,0x2e,0x57,0xec,0xb0,0xf3,0x83,0xb9,0xf8,0x24,0x7b,0x85,0xdc,0x7f,0x0a,0xed, -0xeb,0xe7,0x8f,0xda,0x43,0xc4,0x5f,0x6b,0xd6,0x6c,0x34,0x68,0xdf,0x29,0x6b,0x19, -0x9e,0x50,0x3a,0x6f,0x6e,0x07,0xe4,0x07,0xfe,0x3d,0x5e,0x2e,0x6f,0x89,0xfa,0xae, -0x0e,0x73,0x5b,0xbd,0x17,0xab,0xd0,0xe7,0xc5,0x54,0xf6,0x74,0x9b,0x3c,0x6e,0x8a, -0x28,0xaf,0xc6,0x0f,0x95,0x0a,0xf6,0xff,0x00,0xd9,0xcf,0xc2,0x90,0x5e,0xc5,0xaa, -0xea,0xf7,0x76,0xf1,0x4e,0x99,0x16,0xd1,0x09,0x50,0x30,0xc8,0xf9,0x98,0xe0,0xfd, -0x57,0xf5,0xaf,0x10,0xaf,0xb0,0xbe,0x1a,0x78,0x74,0xf8,0x63,0xc1,0x1a,0x4d,0x8b, -0xa9,0x59,0xc4,0x5e,0x64,0xc0,0x8c,0x10,0xee,0x77,0x30,0xfc,0x09,0xc7,0xe1,0x5f, -0x57,0xc3,0xb8,0x5f,0x6f,0x8b,0xf6,0x92,0x5a,0x45,0x7e,0x2f,0x44,0x7a,0x58,0x0a, -0x7c,0xf5,0x79,0x9f,0x43,0x4e,0x4f,0x09,0xe8,0x93,0x0f,0xde,0x69,0x16,0x2f,0xf5, -0xb6,0x43,0xfd,0x2b,0x36,0xf3,0xe1,0x87,0x85,0x2f,0x91,0x96,0x4d,0x02,0xc5,0x41, -0xea,0x62,0x84,0x46,0x7f,0x35,0xc1,0xae,0x9c,0x0c,0x51,0x5f,0xa6,0xcb,0x0f,0x46, -0x5f,0x14,0x13,0xf9,0x23,0xe8,0x1d,0x38,0x3d,0xd2,0x3c,0x33,0xe2,0x17,0xc0,0x1b, -0x3b,0x6d,0x3a,0xe3,0x50,0xf0,0xf3,0xcb,0x1c,0x90,0xa1,0x76,0xb3,0x95,0xb7,0x87, -0x03,0x93,0xb5,0x8f,0x39,0xfa,0x93,0x9f,0x6a,0xf0,0x8a,0xfb,0x2b,0xc7,0x7e,0x21, -0x83,0xc3,0x3e,0x14,0xd4,0x6f,0xe6,0x20,0x6c,0x89,0x95,0x14,0xff,0x00,0x1b,0x91, -0x85,0x1f,0x99,0xaf,0x8d,0x40,0xc0,0x02,0xbf,0x34,0xe2,0x2c,0x2e,0x1b,0x0d,0x5a, -0x1e,0xc1,0x59,0xb5,0xaa,0x5f,0x81,0xe0,0x63,0xa9,0xc2,0x9c,0xd7,0x26,0x81,0x45, -0x14,0x57,0xc9,0x1e,0x61,0x6f,0x49,0xb5,0x7b,0xed,0x56,0xce,0xde,0x21,0x99,0x25, -0x99,0x23,0x5c,0x7a,0x96,0x00,0x7f,0x3a,0xfb,0x79,0x38,0x50,0x2b,0xe5,0xdf,0x81, -0x3e,0x13,0x6f,0x10,0x78,0xce,0x2b,0xc9,0x13,0x75,0xa6,0x9a,0x3c,0xf7,0x24,0x70, -0x64,0xe8,0x83,0xeb,0x9f,0x9b,0xfe,0x03,0x5f,0x51,0x81,0x5f,0xa5,0xf0,0xc5,0x09, -0x53,0xc3,0xce,0xab,0xfb,0x4f,0x4f,0x91,0xef,0xe5,0xd0,0x71,0x83,0x93,0xea,0x61, -0x78,0xdb,0xc3,0x4f,0xe2,0xff,0x00,0x0e,0x5d,0xe9,0x2b,0x78,0xf6,0x22,0xe3,0x68, -0x69,0x91,0x37,0x10,0x03,0x02,0x46,0x32,0x3a,0xe3,0x15,0xe4,0xf2,0x7e,0xcc,0x63, -0xf8,0x3c,0x40,0x7f,0xe0,0x56,0x9f,0xfd,0x9d,0x7b,0xb5,0x26,0x2b,0xe8,0x71,0x59, -0x6e,0x17,0x19,0x25,0x3a,0xf0,0xbb,0xf5,0x67,0x75,0x4c,0x3d,0x3a,0xae,0xf3,0x57, -0x3c,0x09,0xff,0x00,0x66,0x4b,0xaf,0xe0,0xd7,0xa1,0x3f,0xef,0x5b,0x11,0xff,0x00, -0xb3,0x55,0x77,0xfd,0x99,0xf5,0x31,0xf7,0x35,0xab,0x46,0xfa,0xc4,0xc2,0xbe,0x85, -0xc5,0x52,0xd6,0x35,0x38,0xb4,0x7d,0x2a,0xf2,0xfa,0x63,0x88,0xad,0xa2,0x79,0x58, -0xfb,0x28,0x26,0xbc,0xe9,0xe4,0x39,0x72,0x4d,0xb8,0x5b,0xe6,0xff,0x00,0xcc,0xc1, -0xe0,0xa8,0x2d,0x6c,0x7c,0x65,0xe2,0x0d,0x20,0xe8,0x1a,0xdd,0xee,0x9a,0xd7,0x11, -0xdc,0xbd,0xac,0x86,0x26,0x92,0x20,0x42,0x96,0x1d,0x40,0xcf,0xa1,0xc8,0xfc,0x2b, -0x3e,0xa6,0xbc,0xba,0x96,0xfe,0xee,0x6b,0x99,0xdb,0x7c,0xf3,0x3b,0x49,0x23,0x7a, -0xb1,0x39,0x27,0xf3,0x35,0x0d,0x7e,0x51,0x53,0x95,0xcd,0xb8,0x2d,0x2f,0xa1,0xf3, -0x4e,0xd7,0x76,0x0a,0x28,0xad,0x2f,0x0d,0xe9,0x2d,0xaf,0x78,0x83,0x4d,0xd3,0xd4, -0x13,0xf6,0x9b,0x84,0x8c,0xe3,0xb2,0x93,0xc9,0xfc,0xb3,0x4a,0x10,0x75,0x24,0xa0, -0xb7,0x6e,0xc1,0x15,0x76,0x91,0xd2,0xda,0xfc,0x17,0xf1,0x7d,0xe5,0xa4,0x37,0x30, -0xe9,0x41,0xe2,0x99,0x04,0x88,0x7c,0xf8,0xc1,0xc1,0x19,0x19,0x05,0xb8,0xa4,0x93, -0xe0,0xb7,0x8c,0xe3,0xeb,0xa2,0x39,0xff,0x00,0x76,0x68,0x8f,0xfe,0xcd,0x5f,0x59, -0x43,0x1a,0xc5,0x12,0x22,0x8d,0xaa,0xa0,0x00,0x07,0x61,0x4e,0xc7,0xbd,0x7e,0x99, -0xfe,0xac,0x61,0x1a,0x5e,0xf4,0xaf,0xea,0xbf,0xc8,0xf7,0xff,0x00,0xb3,0xa9,0xf7, -0x67,0xc8,0x12,0x7c,0x2a,0xf1,0x6c,0x47,0xe6,0xd0,0x6e,0xcf,0xfb,0xaa,0x0f,0xf2, -0x35,0xa1,0xe1,0x2f,0x86,0x1e,0x20,0x9b,0xc5,0x3a,0x52,0x5e,0xe8,0xb7,0x50,0x5a, -0x7d,0xa5,0x1a,0x67,0x9a,0x22,0x10,0x20,0x39,0x6c,0x9f,0x70,0x31,0x5f,0x57,0x8a, -0x31,0x44,0x38,0x67,0x0d,0x09,0xa9,0x29,0xbd,0x3d,0x06,0xb2,0xfa,0x69,0xde,0xec, -0x07,0x02,0xb1,0x7c,0x59,0xe2,0xed,0x3f,0xc1,0xba,0x3c,0x9a,0x86,0xa1,0x2e,0xc8, -0xc7,0xca,0x91,0xaf,0xdf,0x95,0xbb,0x2a,0x8e,0xe7,0xf9,0x75,0x35,0x7f,0x56,0xd5, -0x6d,0xb4,0x4d,0x36,0xe6,0xfa,0xf2,0x51,0x0d,0xb4,0x08,0x64,0x91,0xcf,0x60,0x3f, -0xcf,0x4a,0xf9,0x1b,0xe2,0x07,0x8e,0x6e,0xfc,0x77,0xae,0xbd,0xe4,0xe5,0xa3,0xb6, -0x8c,0x95,0xb6,0xb7,0xcf,0x11,0x27,0xf8,0x9e,0xe7,0xfa,0x62,0xbd,0x1c,0xdb,0x34, -0x8e,0x5d,0x4a,0xd1,0xd6,0x6f,0x65,0xfa,0xb3,0x7c,0x4e,0x21,0x50,0x8e,0x9b,0xb2, -0x6f,0x1e,0x7c,0x48,0xd5,0x3c,0x79,0x78,0x5a,0xe5,0xcd,0xbd,0x8a,0x1c,0xc5,0x67, -0x1b,0x1d,0x8b,0xe8,0x4f,0xf7,0x9b,0xdc,0xfe,0x18,0xae,0x4e,0x8a,0x2b,0xf2,0x5a, -0xd5,0xaa,0x62,0x26,0xea,0x55,0x77,0x6c,0xf9,0x99,0x4e,0x53,0x7c,0xd2,0x7a,0x85, -0x14,0x57,0x5d,0xe0,0x0f,0x86,0x9a,0xa7,0x8f,0xae,0x8f,0xd9,0x80,0xb7,0xb1,0x8d, -0xb1,0x2d,0xe4,0x83,0xe5,0x1f,0xec,0x81,0xfc,0x4d,0xed,0xf9,0xd3,0xa3,0x46,0xa6, -0x22,0x6a,0x9d,0x25,0x76,0xc7,0x08,0x4a,0xa4,0xb9,0x62,0xae,0xce,0x46,0xa7,0xb7, -0xb1,0xb9,0xbc,0xff,0x00,0x51,0x6f,0x2c,0xf8,0xeb,0xe5,0xa1,0x6f,0xe5,0x5f,0x55, -0xf8,0x5f,0xe0,0xe7,0x86,0x7c,0x35,0x12,0x11,0x60,0x97,0xf7,0x23,0x19,0x9e,0xf0, -0x09,0x0e,0x7d,0x40,0x3f,0x28,0xfc,0x05,0x76,0xc9,0x0a,0x46,0x00,0x55,0x0a,0x07, -0x18,0x03,0x02,0xbe,0xce,0x87,0x0b,0x54,0x94,0x6f,0x5a,0xa2,0x4f,0xb2,0x57,0xfc, -0x74,0x3d,0x58,0x65,0xd2,0x7f,0x1c,0xac,0x7c,0x3f,0x71,0xa7,0x5d,0xda,0x0c,0xcf, -0x6b,0x34,0x23,0xd6,0x48,0xca,0xff,0x00,0x31,0x55,0xeb,0xee,0x96,0x8d,0x5d,0x48, -0x60,0x08,0x3d,0x8d,0x71,0xde,0x29,0xf8,0x4d,0xe1,0xcf,0x15,0x42,0xfe,0x6d,0x8a, -0x59,0xdd,0x31,0x2c,0x2e,0xad,0x00,0x8d,0xf7,0x7a,0x9c,0x70,0xdf,0x88,0x34,0xeb, -0xf0,0xb5,0x48,0xc6,0xf4,0x6a,0x5d,0xf6,0x6a,0xc1,0x3c,0xb9,0xa5,0xee,0x4a,0xe7, -0xc8,0xf4,0x57,0x4b,0xe3,0xbf,0x02,0x5f,0xf8,0x0f,0x56,0xfb,0x25,0xd8,0xf3,0x61, -0x93,0x2d,0x05,0xca,0x8c,0x2c,0x8b,0xfd,0x08,0xee,0x3d,0xeb,0x9a,0xaf,0x89,0xab, -0x4a,0x74,0x26,0xe9,0xd4,0x56,0x68,0xf2,0x65,0x17,0x07,0xcb,0x2d,0xc2,0xac,0x69, -0xfa,0x85,0xce,0x95,0x7b,0x0d,0xdd,0x9c,0xef,0x6d,0x73,0x0b,0x6e,0x8e,0x58,0xdb, -0x05,0x4d,0x57,0xa2,0xb3,0x4d,0xc5,0xa7,0x1d,0x1a,0x25,0x3b,0x6a,0x8f,0xaa,0xfe, -0x13,0xfc,0x4d,0x8f,0xc7,0x9a,0x61,0x86,0xe3,0x6c,0x5a,0xb5,0xb2,0x8f,0x3a,0x31, -0xc0,0x91,0x7f,0xbe,0xbe,0xde,0xa3,0xb1,0xfa,0x8a,0xef,0xc5,0x7c,0x59,0xe1,0x3f, -0x12,0xdc,0x78,0x47,0xc4,0x16,0x7a,0xad,0xb1,0x25,0xe0,0x6f,0x99,0x33,0xfe,0xb1, -0x0f,0xde,0x53,0xf5,0x19,0xaf,0xb2,0xf4,0xeb,0xd8,0x75,0x2b,0x0b,0x7b,0xbb,0x77, -0x12,0x41,0x3c,0x6b,0x24,0x6c,0x3a,0x15,0x23,0x20,0xd7,0xeb,0x39,0x16,0x64,0xf1, -0xd4,0x5c,0x2a,0x3f,0x7e,0x3b,0xf9,0xae,0x8c,0xfa,0x5c,0x1d,0x77,0x5a,0x16,0x96, -0xe8,0xb3,0x48,0x4e,0xd1,0x93,0x41,0xaf,0x29,0xf8,0xf9,0xe3,0x99,0x3c,0x3f,0xa2, -0x45,0xa4,0xd9,0xc8,0x52,0xf3,0x50,0x07,0x7b,0x29,0xe5,0x22,0x1d,0x7f,0x3e,0x9f, -0x4c,0xd7,0xb5,0x8b,0xc4,0xc3,0x07,0x46,0x55,0xa7,0xb2,0x3a,0xea,0xd4,0x54,0xa0, -0xe6,0xfa,0x1c,0xff,0x00,0xc5,0x1f,0x8e,0xb2,0x2c,0xb3,0x69,0x5e,0x1b,0x94,0x2e, -0xdc,0xa4,0xba,0x82,0xf3,0xcf,0x71,0x1f,0xff,0x00,0x15,0xf9,0x7a,0xd7,0x87,0x4f, -0x3c,0xb7,0x33,0x3c,0xb3,0x48,0xf2,0xca,0xec,0x59,0x9d,0xd8,0xb3,0x31,0x3d,0x49, -0x26,0x99,0x45,0x7e,0x39,0x8d,0xc7,0xd7,0xc7,0xd4,0xe7,0xaa,0xfd,0x17,0x44,0x7c, -0xb5,0x5a,0xd3,0xac,0xef,0x20,0xa2,0x8a,0x2b,0xce,0x30,0x0a,0x2b,0xba,0xf0,0xbf, -0xc1,0x8f,0x13,0x78,0xa2,0x14,0xb8,0x4b,0x64,0xb0,0xb5,0x7e,0x56,0x5b,0xc6,0x29, -0xb8,0x7a,0x85,0x00,0x9f,0xd2,0xbb,0x28,0x3f,0x66,0x5b,0xb6,0x51,0xe7,0xeb,0xd1, -0x21,0xee,0x23,0xb6,0x2d,0xfa,0x96,0x15,0xeb,0xd1,0xca,0x31,0xd5,0xd7,0x34,0x29, -0xbb,0x79,0xe9,0xf9,0x9d,0x31,0xc3,0x56,0x9a,0xba,0x89,0xe2,0x74,0x57,0xb9,0x37, -0xec,0xc6,0xf8,0xf9,0x7c,0x42,0x3f,0x1b,0x4f,0xfe,0xce,0xaa,0x5c,0x7e,0xcc,0xfa, -0x8a,0xa9,0xf2,0x35,0xab,0x59,0x0f,0x61,0x24,0x2c,0x9f,0xc8,0x9a,0xdd,0xe4,0x59, -0x82,0xff,0x00,0x97,0x7f,0x8a,0xff,0x00,0x32,0xfe,0xa7,0x5d,0x7d,0x93,0xc6,0x28, -0xaf,0x47,0xd4,0xbe,0x01,0x78,0xb2,0xc4,0x33,0x43,0x05,0xb5,0xf2,0x8f,0xf9,0xe1, -0x38,0xcf,0xe4,0xc0,0x57,0x15,0xac,0x78,0x6b,0x56,0xf0,0xfb,0xed,0xd4,0xb4,0xdb, -0x9b,0x2e,0x70,0x1a,0x68,0xc8,0x53,0xf4,0x3d,0x0d,0x79,0xd5,0xb0,0x58,0x9c,0x3e, -0xb5,0x69,0xb5,0xf2,0x30,0x95,0x2a,0x90,0xf8,0xa3,0x63,0xac,0xf8,0x1d,0xa4,0x0d, -0x57,0xe2,0x25,0x83,0x32,0x6e,0x8e,0xd5,0x5e,0xe1,0xbd,0xb0,0x30,0xa7,0xfe,0xfa, -0x65,0xaf,0xab,0x07,0x4a,0xf0,0x8f,0xd9,0x9f,0x48,0x05,0xb5,0x9d,0x51,0x97,0xfb, -0x96,0xc8,0x7f,0xf1,0xe6,0xff,0x00,0xd9,0x6b,0xde,0x2b,0xf4,0xce,0x1d,0xa3,0xec, -0xb0,0x2a,0x5f,0xcc,0xdb,0xfd,0x3f,0x43,0xe8,0x30,0x30,0xe5,0xa3,0x7e,0xe1,0x45, -0x14,0x57,0xd3,0x9e,0x80,0x55,0x2d,0x66,0x4f,0x2b,0x4a,0xbb,0x6f,0x48,0xcd,0x5d, -0xac,0x7f,0x16,0xcb,0xe4,0x78,0x7a,0xf9,0xff,0x00,0xe9,0x99,0xac,0xea,0x3b,0x41, -0xb2,0x64,0xed,0x16,0xcf,0x83,0x7e,0x27,0xcf,0xe7,0x78,0xa6,0xf4,0x83,0x9c,0x12, -0x3f,0x5a,0xf9,0xc3,0xe2,0xbc,0x5f,0xda,0x1a,0xa6,0x95,0x65,0xb7,0x79,0xb8,0xbd, -0x82,0x1d,0x9d,0x77,0x6e,0x91,0x57,0x1f,0xad,0x7d,0x01,0xe3,0xa9,0xbc,0xdd,0x7a, -0xf5,0xb3,0x9f,0x9c,0x8a,0xf1,0x3b,0xa8,0x3f,0xb4,0xfe,0x36,0xfc,0x3b,0xb2,0xed, -0x37,0x88,0xf4,0xe4,0xfa,0x8f,0xb4,0xc7,0xfe,0x15,0xf9,0xde,0x54,0xb9,0xb1,0x2d, -0xf9,0xfe,0xa7,0xe3,0x33,0x5e,0xd7,0x36,0xa4,0xbf,0xbc,0x7e,0xb6,0xff,0x00,0x61, -0x5a,0xff,0x00,0xcf,0xba,0xfe,0x54,0x56,0xad,0x15,0xfa,0x2f,0x2a,0x3f,0x66,0xb2, -0x1f,0x45,0x14,0x55,0x94,0x14,0xd2,0x69,0xd5,0xc8,0xfc,0x55,0xf1,0x6f,0xfc,0x21, -0x1e,0x01,0xd6,0xb5,0x75,0x60,0xb3,0xc3,0x09,0x48,0x33,0x8f,0xf5,0xad,0xf2,0xa7, -0x07,0xaf,0x24,0x1c,0x7b,0x56,0x75,0x26,0xa9,0xc1,0xce,0x5b,0x23,0x3a,0x93,0x54, -0xa0,0xe7,0x2d,0x96,0xa7,0xc8,0x5f,0x1f,0xbc,0x5f,0xff,0x00,0x09,0x8f,0xc4,0xfd, -0x4e,0x48,0xa4,0x2f,0x69,0x64,0x45,0x94,0x18,0x24,0x8c,0x26,0x77,0x11,0xf5,0x62, -0xdf,0xa5,0x7b,0xc7,0xec,0xaf,0xe1,0x1f,0xec,0x7f,0x08,0x4d,0xab,0x4a,0x98,0x9a, -0xf9,0xfe,0x52,0x47,0x3b,0x05,0x7c,0xa9,0xa0,0x69,0x73,0xf8,0x83,0x5d,0xb5,0xb3, -0x8c,0x19,0x66,0xb9,0x98,0x2f,0xa9,0x24,0x9e,0x4d,0x7e,0x85,0x78,0x67,0x45,0x8b, -0xc3,0xfa,0x0d,0x8e,0x9f,0x12,0x85,0x4b,0x78,0x95,0x30,0x3d,0x40,0xe6,0xbe,0x27, -0x28,0x83,0xc5,0xe3,0x27,0x8a,0x9f,0x4f,0xcd,0xff,0x00,0xc0,0x3e,0x27,0x23,0x84, -0xb1,0x58,0x9a,0x98,0xc9,0xff,0x00,0x57,0x34,0xc5,0x2d,0x14,0x57,0xdd,0x1f,0x74, -0x14,0x51,0x45,0x00,0x32,0x49,0x16,0x18,0xd9,0xdd,0x82,0x22,0x82,0x59,0x98,0xe0, -0x01,0xea,0x6b,0xe0,0x7f,0xda,0x6b,0xfe,0x0a,0xd3,0xe0,0xaf,0x85,0x9a,0x95,0xe7, -0x87,0xbe,0x1e,0x69,0xc9,0xe3,0xcd,0x72,0xdd,0x8c,0x73,0x5f,0xb4,0xa6,0x3d,0x36, -0x17,0x07,0x95,0x0e,0x3e,0x69,0x88,0xff,0x00,0x67,0x0b,0xfe,0xd7,0x5a,0xe2,0xbf, -0xe0,0xad,0x3f,0xb5,0xed,0xe7,0x84,0xed,0x62,0xf8,0x37,0xe1,0x3b,0xf6,0xb6,0xbe, -0xd4,0x2d,0xc5,0xc7,0x88,0x6e,0xa0,0x7c,0x3c,0x76,0xef,0xfe,0xae,0xd8,0x10,0x78, -0x2e,0x3e,0x66,0xff,0x00,0x64,0xa8,0xe8,0xc6,0xbe,0x5a,0xfd,0x8a,0x7f,0xe0,0x9d, -0x9a,0xff,0x00,0xed,0x53,0xa7,0xc9,0xe2,0x9d,0x5f,0x55,0x3e,0x15,0xf0,0x3c,0x53, -0x18,0x12,0xed,0x21,0xf3,0x2e,0x6f,0x5d,0x71,0xb9,0x61,0x52,0x40,0x0a,0xbd,0x0b, -0xb6,0x46,0x78,0x00,0xe0,0xe1,0x92,0xfc,0x8c,0xef,0x1a,0xff,0x00,0xc1,0x51,0x7f, -0x68,0x5f,0x17,0xcd,0x37,0x91,0xe2,0xeb,0x7f,0x0e,0xdb,0x3b,0x16,0x5b,0x7d,0x1b, -0x4f,0x86,0x30,0x83,0xb0,0x0e,0xea,0xcf,0xf9,0xb5,0x7d,0x1d,0xff,0x00,0x04,0xc4, -0xf8,0xc5,0xf1,0xb7,0xf6,0x81,0xf8,0xe3,0x7d,0x71,0xe2,0x9f,0x88,0x1a,0xe6,0xad, -0xe0,0xff,0x00,0x0f,0xd8,0xbd,0xd5,0xe5,0xb5,0xc3,0x29,0x86,0x79,0xe4,0xcc,0x70, -0xc4,0xc7,0x6e,0x47,0x57,0x93,0x03,0xfe,0x79,0x57,0xc9,0xbf,0xb7,0x6f,0xc0,0x4f, -0x01,0xfe,0xcd,0x7f,0x18,0x6d,0xbc,0x0b,0xe0,0x8d,0x57,0x58,0xd5,0xde,0xd7,0x4f, -0x8e,0xe3,0x53,0x9f,0x57,0x9e,0x29,0x19,0x27,0x90,0x96,0x58,0xc0,0x8e,0x34,0x0b, -0x88,0xf6,0x31,0xce,0x7f,0xd6,0x0e,0x98,0xaf,0xd3,0xef,0xf8,0x25,0x5f,0xc1,0x81, -0xf0,0xbf,0xf6,0x5f,0xb1,0xd7,0x2e,0xad,0xfc,0xad,0x5f,0xc5,0xf3,0x9d,0x56,0x56, -0x3f,0x7b,0xec,0xff,0x00,0x72,0xdd,0x7d,0x86,0xd0,0x5b,0xfe,0xda,0x50,0x08,0x8f, -0xe3,0x97,0xfc,0x15,0x17,0xc0,0x9f,0x00,0x7e,0x2c,0xeb,0xfe,0x01,0xd7,0xfc,0x21, -0xe2,0x5b,0xbd,0x43,0x48,0x92,0x34,0x92,0xea,0xc4,0x5b,0xb4,0x32,0x07,0x89,0x24, -0x56,0x5d,0xd2,0x29,0xe8,0xe3,0xb7,0x50,0x6b,0xe8,0x3f,0xd9,0xdb,0xe3,0xe6,0x87, -0xfb,0x4a,0xfc,0x30,0xb3,0xf1,0xc7,0x87,0x6c,0xef,0xac,0x34,0xcb,0x99,0xe5,0xb7, -0x58,0x35,0x15,0x45,0x98,0x34,0x6d,0xb5,0xb2,0x15,0x98,0x63,0x3d,0x39,0xaf,0xc2, -0xdf,0xdb,0xb3,0xc7,0x76,0x9f,0x11,0xbf,0x6b,0x6f,0x89,0x5a,0xcd,0x84,0xbe,0x75, -0x90,0xd4,0xbe,0xc5,0x13,0x8e,0x84,0x5b,0xc6,0x90,0x12,0x3d,0x8b,0x46,0xc7,0xf1, -0xaf,0xd8,0xaf,0xf8,0x27,0x2f,0x81,0x67,0xf0,0x0f,0xec,0x75,0xf0,0xfa,0xd2,0xe5, -0x59,0x2e,0x2f,0xed,0xa4,0xd5,0x59,0x58,0x60,0x81,0x71,0x2b,0x4a,0x9f,0xf8,0xe3, -0x2d,0x03,0x4f,0x53,0xe9,0x19,0xa7,0x5b,0x78,0x9e,0x49,0x18,0x24,0x68,0xa5,0x99, -0x98,0xe0,0x00,0x3b,0xd7,0xc5,0xfe,0x2d,0xd7,0x5f,0xc4,0xde,0x25,0xd4,0x75,0x37, -0x27,0xfd,0x22,0x66,0x65,0x07,0xb2,0x74,0x51,0xf8,0x00,0x05,0x7d,0x29,0xf1,0xbf, -0xc4,0x5f,0xd8,0x1e,0x01,0xbc,0x54,0x70,0xb7,0x17,0xc4,0x5a,0x46,0x3d,0x43,0x7d, -0xff,0x00,0xfc,0x74,0x37,0xe9,0x5f,0x2a,0x57,0xe7,0x1c,0x51,0x8a,0xe6,0x9c,0x30, -0xeb,0xa6,0xaf,0xe7,0xb1,0xe1,0xe6,0x15,0x2f,0x25,0x4f,0xe6,0x14,0x51,0x45,0x7c, -0x29,0xe3,0x9a,0x5e,0x1a,0x92,0xc6,0x2d,0x7f,0x4f,0x93,0x52,0x25,0x6c,0x23,0x99, -0x5e,0x6d,0xab,0xb8,0x95,0x07,0x24,0x60,0x7a,0xe3,0x1f,0x8d,0x7d,0x2b,0x1f,0xc7, -0x9f,0x06,0xb0,0x03,0xed,0xf2,0xaf,0xd6,0xda,0x4f,0xf0,0xaf,0x96,0x28,0xaf,0x6b, -0x01,0x9b,0x56,0xcb,0xa3,0x28,0xd2,0x49,0xdf,0xbf,0xfc,0x39,0xd7,0x47,0x13,0x3a, -0x09,0xa8,0xad,0xcf,0xaa,0xcf,0xc7,0x5f,0x06,0x81,0x9f,0xed,0x37,0xff,0x00,0xc0, -0x69,0x3f,0xf8,0x9a,0xc7,0xd6,0x3f,0x68,0xcf,0x0e,0xda,0x44,0xc2,0xc6,0xde,0xef, -0x50,0x97,0xb0,0xd9,0xe5,0xaf,0xe2,0x4f,0x3f,0xa5,0x7c,0xd9,0x45,0x7a,0x53,0xe2, -0x6c,0x6c,0x95,0x92,0x8a,0xf9,0x7f,0xc1,0x37,0x79,0x85,0x67,0xb5,0x8e,0xa7,0xc7, -0x5f,0x11,0x35,0x5f,0x1e,0xdd,0xab,0xde,0x32,0xc3,0x69,0x19,0x26,0x1b,0x48,0xbe, -0xe2,0x7b,0x9f,0x53,0xee,0x7f,0x0c,0x57,0x2d,0x45,0x6b,0xe9,0x1e,0x12,0xd6,0xb5, -0xed,0xa7,0x4f,0xd2,0xee,0xae,0x91,0xba,0x3c,0x71,0x1d,0x9f,0xf7,0xd7,0x4f,0xd6, -0xbe,0x72,0x73,0xad,0x8b,0xa8,0xe5,0x2b,0xca,0x4f,0xe6,0x70,0xc9,0xce,0xac,0xae, -0xf5,0x66,0x45,0x69,0x78,0x7b,0xc3,0xb7,0xfe,0x29,0xd5,0x21,0xd3,0xf4,0xe8,0x0c, -0xd7,0x12,0x1f,0xf8,0x0a,0x0e,0xec,0xc7,0xb0,0x15,0xe9,0x5e,0x18,0xfd,0x9d,0x75, -0x7d,0x45,0xd2,0x4d,0x66,0xe2,0x3d,0x36,0x0e,0x09,0x8a,0x32,0x24,0x94,0x8f,0x4e, -0x38,0x1f,0x99,0xfa,0x57,0xb9,0x78,0x4f,0xc1,0x7a,0x57,0x82,0xec,0x3e,0xcb,0xa6, -0x5b,0x08,0xb3,0x83,0x24,0xad,0xcc,0x92,0x1f,0x56,0x6e,0xff,0x00,0x4e,0x83,0xb0, -0x15,0xf4,0x79,0x7f,0x0f,0xe2,0x31,0x12,0x52,0xc4,0x2e,0x48,0xfe,0x2f,0xfa,0xf3, -0x3b,0xa8,0x60,0xa7,0x37,0x79,0xe8,0x8a,0xfe,0x01,0xf0,0x5d,0xaf,0x81,0xbc,0x3f, -0x0e,0x9f,0x6e,0x7c,0xc9,0x4f,0xcf,0x3c,0xf8,0xc1,0x95,0xcf,0x53,0xf4,0xec,0x3d, -0x85,0x74,0xb4,0x94,0xb5,0xfa,0x7d,0x2a,0x51,0xa3,0x05,0x4e,0x0a,0xc9,0x1f,0x43, -0x18,0xa8,0xa5,0x15,0xb0,0x51,0x45,0x15,0xa9,0x41,0x5e,0x6f,0xf1,0xeb,0x5c,0xfe, -0xc9,0xf0,0x05,0xc4,0x0a,0xdb,0x65,0xbe,0x91,0x6d,0xd7,0x1e,0x99,0xdc,0xdf,0xa0, -0x23,0xf1,0xaf,0x47,0x3d,0x2b,0xe7,0x8f,0xda,0x4f,0x5b,0xfb,0x4e,0xbd,0xa6,0x69, -0x68,0xdf,0x25,0xac,0x26,0x67,0x03,0xfb,0xce,0x70,0x3f,0x20,0xbf,0xad,0x78,0x79, -0xd5,0x7f,0xab,0xe0,0x6a,0x49,0x6e,0xf4,0xfb,0xce,0x4c,0x5c,0xf9,0x28,0xc9,0x9e, -0x39,0x45,0x14,0x57,0xe3,0x67,0xca,0x85,0x7a,0x67,0xec,0xfb,0xa2,0xff,0x00,0x69, -0x78,0xec,0x5d,0xba,0x93,0x1d,0x84,0x0d,0x2e,0x7b,0x07,0x6f,0x95,0x41,0xfc,0x0b, -0x1f,0xc2,0xbc,0xce,0xbe,0x89,0xfd,0x9b,0x74,0x41,0x6b,0xe1,0xdd,0x47,0x54,0x65, -0x22,0x4b,0xc9,0xc4,0x4a,0x4f,0x42,0x91,0x8e,0x08,0xfc,0x59,0x87,0xe1,0x5e,0xf6, -0x47,0x43,0xdb,0xe3,0xe0,0x9e,0xcb,0x5f,0xbb,0xfe,0x09,0xd9,0x84,0x87,0x3d,0x68, -0xf9,0x6a,0x7b,0x08,0xe9,0x4b,0x45,0x15,0xfb,0x11,0xf5,0x21,0x48,0x4e,0x29,0x6a, -0x9e,0xad,0xa8,0xc5,0xa4,0xe9,0xb7,0x57,0xb3,0x9c,0x43,0x6f,0x13,0x4a,0xe7,0xd9, -0x41,0x27,0xf9,0x54,0xc9,0xa8,0xa6,0xde,0xc2,0x6e,0xda,0xb3,0xc3,0x3f,0x68,0x9f, -0x1b,0xb5,0xc5,0xdc,0x3e,0x1b,0xb5,0x90,0x88,0xa2,0x02,0x6b,0xbd,0xa7,0xef,0x31, -0xe5,0x50,0xfd,0x07,0xcd,0x8f,0x71,0xe9,0x5e,0x27,0x57,0x35,0x9d,0x52,0x7d,0x6f, -0x55,0xbb,0xd4,0x2e,0x4e,0x67,0xb9,0x95,0xa5,0x7f,0xa9,0x39,0xc7,0xd0,0x74,0xfc, -0x2a,0x9d,0x7e,0x25,0x98,0x62,0xe5,0x8d,0xc4,0xca,0xb3,0xdb,0xa7,0xa7,0x43,0xe4, -0xab,0xd5,0x75,0xaa,0x39,0x30,0xa2,0x8a,0x2b,0xce,0x30,0x3a,0x5f,0x87,0xde,0x0a, -0x9f,0xc7,0x5e,0x22,0x86,0xc2,0x32,0x63,0xb7,0x5f,0xde,0x5c,0x4c,0x07,0xdc,0x8f, -0xbf,0xe2,0x7a,0x0f,0xfe,0xb5,0x7d,0x71,0xa3,0x69,0x16,0x9a,0x16,0x9b,0x05,0x8d, -0x8c,0x2b,0x6f,0x6b,0x02,0xed,0x48,0xd0,0x71,0xf5,0x3e,0xa4,0xf5,0x27,0xa9,0xae, -0x13,0xe0,0x4f,0x84,0xd7,0xc3,0xde,0x0d,0x8a,0xf2,0x44,0x02,0xf3,0x52,0xc5,0xc3, -0x92,0x39,0x11,0xff,0x00,0xcb,0x31,0xf9,0x73,0xf5,0x63,0x5e,0x93,0x5f,0xad,0x64, -0x59,0x7c,0x70,0x98,0x75,0x52,0x4b,0xdf,0x9e,0xaf,0xc9,0x74,0x47,0xd2,0xe0,0xe8, -0x2a,0x54,0xd4,0x9e,0xec,0x4a,0x5a,0x28,0xaf,0xa6,0x3d,0x00,0xa2,0x8a,0x28,0x03, -0x8c,0xf8,0xb1,0xe1,0x58,0xbc,0x55,0xe0,0xbb,0xe8,0x76,0x03,0x75,0x6e,0x86,0xe2, -0xdd,0xb1,0xc8,0x75,0x19,0xc0,0xfa,0x8c,0x8f,0xc6,0xbe,0x47,0xaf,0xb9,0xe4,0x50, -0xe8,0x54,0x8c,0x82,0x30,0x6b,0xe2,0x0d,0x46,0x11,0x6f,0xa8,0xdd,0x42,0x3a,0x47, -0x2b,0xa0,0xfc,0x09,0x15,0xf9,0xd7,0x14,0xd0,0x8c,0x67,0x4e,0xb2,0xdd,0xdd,0x3f, -0x91,0xe1,0x66,0x30,0x49,0xc6,0x5d,0xca,0xf4,0x51,0x45,0x7c,0x21,0xe3,0x85,0x7d, -0x49,0xf0,0x17,0x5a,0x6d,0x57,0xe1,0xf5,0xb4,0x4e,0xe5,0xe4,0xb2,0x95,0xed,0xc9, -0x3e,0x83,0xe6,0x51,0xf8,0x2b,0x01,0xf8,0x57,0xcb,0x75,0xf4,0x27,0xec,0xcf,0x29, -0x3a,0x0e,0xb3,0x1f,0x65,0xba,0x56,0xfc,0xd3,0x1f,0xd2,0xbe,0xa7,0x86,0xea,0x38, -0x63,0x94,0x57,0x54,0xff,0x00,0xcc,0xf4,0x70,0x12,0x6a,0xb5,0xbb,0x9e,0xcc,0x6b, -0xe5,0x2f,0x8e,0x1a,0x9b,0xea,0x3f,0x11,0xb5,0x14,0x66,0x2d,0x1d,0xa8,0x48,0x23, -0x1e,0x80,0x28,0x27,0xff,0x00,0x1e,0x66,0xaf,0xab,0x3b,0x57,0xc8,0xdf,0x17,0x6d, -0x5a,0xd3,0xe2,0x3e,0xb8,0xad,0xd5,0xa6,0x12,0x0f,0xa3,0x28,0x23,0xf9,0xd7,0xd3, -0x71,0x3c,0xa4,0xb0,0x91,0x4b,0x67,0x2f,0xd1,0x9d,0xf9,0x83,0xfd,0xd2,0xf5,0x38, -0xfa,0x28,0xa2,0xbf,0x30,0x3e,0x7c,0x2b,0xb7,0xf8,0x35,0xa3,0xd9,0xeb,0x5e,0x3f, -0xb0,0x8a,0xf7,0x6b,0x45,0x18,0x69,0x96,0x37,0xe4,0x48,0xca,0x32,0xa3,0xf3,0xe7, -0xf0,0xae,0x22,0xac,0xe9,0xba,0x8d,0xce,0x91,0x7f,0x05,0xed,0xa4,0xcd,0x05,0xcc, -0x0e,0x1e,0x39,0x13,0xaa,0x91,0x5d,0x38,0x6a,0x91,0xa3,0x5e,0x15,0x26,0xae,0x93, -0x4e,0xc5,0xd3,0x92,0x8c,0xd4,0x9e,0xc7,0xdb,0xea,0x38,0xc5,0x3b,0x15,0xe2,0xbe, -0x10,0xfd,0xa3,0x2c,0xe7,0x8d,0x21,0xf1,0x0d,0xb3,0xda,0xcc,0x38,0x37,0x56,0xeb, -0xba,0x33,0xee,0x57,0xa8,0xfc,0x33,0x5e,0xa7,0xa3,0x78,0xbb,0x46,0xf1,0x0a,0x06, -0xd3,0xb5,0x2b,0x6b,0xbf,0x55,0x8e,0x41,0xb8,0x7d,0x57,0xa8,0xaf,0xd9,0x70,0xb9, -0x86,0x17,0x16,0x93,0xa5,0x35,0xe9,0xd7,0xee,0x3e,0xae,0x9d,0x7a,0x75,0x7e,0x16, -0x6b,0xe2,0x82,0x29,0x37,0x52,0xe6,0xbd,0x23,0x70,0xc7,0xe3,0x4c,0x9e,0xde,0x3b, -0x98,0xda,0x39,0x51,0x64,0x8d,0x86,0x19,0x1d,0x72,0x08,0xf4,0x22,0xa4,0xa2,0x95, -0x93,0xdc,0x2c,0x50,0xd2,0x74,0x2b,0x0d,0x06,0x29,0x62,0xd3,0xed,0x21,0xb3,0x8a, -0x49,0x0c,0xad,0x1c,0x08,0x15,0x4b,0x10,0x01,0x38,0x1f,0x41,0x57,0xe8,0xa2,0x94, -0x62,0xa2,0xad,0x15,0x64,0x24,0x92,0xd1,0x05,0x14,0x51,0x54,0x30,0xae,0x67,0xe2, -0x24,0xfe,0x47,0x85,0x2f,0x5b,0xa1,0xdb,0x8a,0xe9,0xab,0x88,0xf8,0xbd,0x71,0xf6, -0x7f,0x07,0xdc,0x1c,0xe3,0x3f,0xe1,0x5c,0xb8,0xa9,0x72,0xd0,0x9b,0xf2,0x66,0x35, -0x9d,0xa9,0xc9,0x9f,0x08,0x78,0xa6,0x5d,0xfa,0x9d,0xe3,0x67,0xf8,0xcd,0x79,0xb7, -0xc3,0x9b,0x15,0xd7,0x3f,0x6a,0xdf,0x86,0x16,0x6f,0xc8,0x1a,0xd4,0x73,0xe3,0xde, -0x25,0x69,0x47,0xea,0x95,0xdf,0x6b,0xaf,0xba,0x7b,0x86,0xf5,0x63,0x5c,0x9f,0xec, -0xe3,0x0b,0xea,0x3f,0xb6,0xaf,0xc3,0xb4,0x0b,0xb9,0x21,0x96,0xf6,0x66,0xf6,0x0b, -0x67,0x3e,0x0f,0xe6,0x45,0x7c,0x36,0x48,0xaf,0x56,0xe7,0xe4,0x38,0x15,0xed,0x33, -0x9a,0x5e,0xad,0x9f,0xab,0x7b,0x68,0xa5,0xcd,0x15,0xfa,0x21,0xfb,0x08,0xb4,0x51, -0x45,0x22,0xc4,0xcd,0x7c,0xcb,0xfb,0x60,0xf8,0xbc,0xee,0xd1,0xfc,0x33,0x0b,0xe0, -0x1c,0xdf,0x5c,0x80,0x4f,0xba,0xc6,0x3e,0x9f,0x7c,0xfe,0x02,0xbe,0x97,0x95,0xc4, -0x68,0xce,0xc4,0x2a,0xa8,0x24,0x92,0x70,0x00,0xaf,0xcf,0xaf,0x89,0xbe,0x2c,0x93, -0xc6,0xfe,0x3c,0xd6,0x35,0x56,0x72,0xf1,0x4b,0x39,0x8e,0x01,0x9c,0x85,0x89,0x7e, -0x54,0xc7,0xe0,0x33,0xf8,0xd7,0xce,0x67,0x98,0x8f,0x63,0x86,0xf6,0x6b,0x79,0x69, -0xf2,0xea,0x7c,0xc7,0x10,0x62,0x7d,0x96,0x17,0xd9,0x47,0x79,0xbb,0x7c,0xba,0x9e, -0x89,0xfb,0x2d,0x78,0x47,0xfb,0x6b,0xc6,0x8d,0xa9,0xcb,0x1e,0xe8,0x2c,0x17,0x70, -0x27,0xa6,0xf3,0xd2,0xbe,0xc4,0x1d,0x2b,0xca,0x3f,0x67,0x0f,0x08,0xff,0x00,0xc2, -0x37,0xf0,0xfe,0x09,0xe4,0x4d,0xb7,0x17,0xc7,0xce,0x62,0x47,0x38,0xed,0x5e,0xaf, -0x5d,0x19,0x3e,0x1f,0xd8,0x61,0x63,0x7d,0xe5,0xab,0xf9,0xff,0x00,0xc0,0x3d,0x0c, -0xab,0x0d,0xf5,0x6c,0x24,0x62,0xf7,0x7a,0xb1,0x68,0xa2,0x8a,0xf6,0xcf,0x5c,0x29, -0x09,0xa5,0xa4,0xc5,0x00,0x7f,0x37,0xdf,0xb5,0x6f,0x8c,0xaf,0x3c,0x7d,0xfb,0x4a, -0x7c,0x4c,0xd6,0xef,0x9c,0xc9,0x34,0xda,0xfd,0xe4,0x28,0x4f,0x55,0x8a,0x29,0x4c, -0x51,0x2f,0xe1,0x1c,0x68,0x3f,0x0a,0xfd,0x53,0xfd,0x82,0x7f,0x6c,0xcf,0x83,0xf6, -0x1f,0xb3,0x47,0x85,0xfc,0x31,0xa9,0xf8,0xa7,0x4c,0xf0,0xae,0xbb,0xe1,0xbb,0x13, -0x6f,0x77,0xa7,0x6a,0x93,0xad,0xb1,0x99,0x94,0xb3,0x19,0x62,0x67,0x20,0x49,0xbf, -0x24,0xe0,0x1c,0xe4,0x90,0x47,0x4a,0xf8,0x47,0xfe,0x0a,0x39,0xfb,0x2b,0x78,0x83, -0xe0,0x87,0xc7,0x0f,0x10,0xf8,0xa2,0x1d,0x3e,0x69,0xfc,0x11,0xe2,0x7b,0xf9,0x75, -0x1b,0x2d,0x4a,0x35,0xdd,0x1c,0x32,0xca,0xdb,0xe5,0x82,0x4c,0x0f,0x91,0x83,0xb3, -0x6d,0xcf,0x55,0x23,0x07,0x39,0x03,0xe4,0x43,0xc7,0x19,0xaa,0x22,0xf6,0x67,0xaf, -0x6b,0x7a,0xcd,0xcf,0xed,0x4b,0xfb,0x51,0x5c,0xea,0x1a,0x95,0xf2,0x58,0x0f,0x17, -0x78,0x83,0x32,0x5d,0x5d,0xca,0xa8,0xb6,0x76,0xaf,0x20,0x03,0x73,0x36,0x00,0x11, -0xc2,0x00,0xe7,0xfb,0x95,0xfa,0x69,0xfb,0x5b,0xff,0x00,0xc1,0x44,0x3e,0x1f,0x7c, -0x15,0xf8,0x50,0xfe,0x01,0xf8,0x43,0xac,0xda,0x78,0x83,0xc4,0xc7,0x4f,0x5d,0x32, -0xd2,0xe7,0x49,0x71,0x2d,0xa6,0x95,0x08,0x4f,0x2c,0x48,0x65,0x19,0x57,0x90,0x28, -0xf9,0x55,0x49,0xc1,0xc1,0x38,0xc6,0x0f,0xe3,0x6f,0x5a,0xf5,0x3f,0x80,0xff,0x00, -0xb3,0x47,0xc4,0x3f,0xda,0x3b,0xc4,0x91,0x69,0x3e,0x0b,0xd0,0x66,0xbc,0x8b,0x78, -0x17,0x3a,0x9c,0xe0,0xc7,0x65,0x6a,0x33,0xcb,0x4b,0x2e,0x30,0x31,0x9f,0xba,0x32, -0xc7,0xb0,0x34,0x09,0x17,0x3f,0x65,0xcf,0x80,0x7a,0xc7,0xed,0x37,0xf1,0xb7,0x43, -0xf0,0x8d,0x92,0xcc,0x6d,0x27,0x9b,0xed,0x3a,0xb5,0xf8,0xc9,0xfb,0x35,0xa2,0x90, -0x65,0x90,0x9e,0x79,0x3f,0x75,0x73,0xd5,0x99,0x6b,0xfa,0x2e,0xd2,0xb4,0xcb,0x6d, -0x13,0x4b,0xb4,0xd3,0xec,0xa2,0x58,0x2c,0xed,0x21,0x48,0x21,0x89,0x06,0x02,0x22, -0xa8,0x55,0x03,0xe8,0x00,0xaf,0x0f,0xfd,0x90,0xff,0x00,0x64,0x5f,0x0d,0x7e,0xc9, -0xbe,0x00,0x1a,0x4e,0x98,0xcb,0xaa,0x78,0x86,0xfb,0x6c,0x9a,0xb6,0xb6,0xf1,0xed, -0x7b,0x99,0x00,0xe1,0x50,0x73,0xb2,0x35,0xe7,0x6a,0xe4,0xf5,0x24,0x92,0x6b,0xdd, -0x2f,0x6f,0x22,0xb0,0xb4,0x9e,0xe6,0x76,0xd9,0x0c,0x31,0xb4,0x8e,0xc7,0xb2,0x81, -0x92,0x7f,0x2a,0x87,0x24,0x95,0xd9,0x5b,0x23,0xe7,0x6f,0xda,0x2f,0xc4,0x7f,0xda, -0x1e,0x26,0xb5,0xd2,0xa3,0x6c,0xc7,0x61,0x16,0xe7,0x19,0xe3,0xcc,0x7c,0x1f,0xd1, -0x42,0xfe,0x75,0xe4,0x95,0xa1,0xe2,0x0d,0x62,0x4f,0x10,0x6b,0x97,0xfa,0x94,0xbf, -0x7e,0xea,0x66,0x97,0x1e,0x80,0x9e,0x07,0xe0,0x30,0x3f,0x0a,0xcf,0xaf,0xc4,0x31, -0xf8,0x87,0x8a,0xc5,0x4e,0xb7,0x77,0xf8,0x74,0x3e,0x4a,0xb5,0x4f,0x6b,0x51,0xcc, -0x28,0xa2,0xba,0x5f,0x87,0x1e,0x1f,0xff,0x00,0x84,0x9f,0xc6,0xba,0x5d,0x8b,0x2e, -0xe8,0x4c,0xa2,0x49,0x81,0xe9,0xb1,0x7e,0x66,0x07,0xeb,0x8c,0x7e,0x35,0xcb,0x46, -0x94,0xab,0x54,0x8d,0x28,0xef,0x27,0x6f,0xbc,0xce,0x31,0x73,0x92,0x8a,0xea,0x61, -0x49,0xa7,0xdd,0x43,0xfe,0xb2,0xda,0x64,0xff,0x00,0x7a,0x32,0x2a,0xb9,0x18,0x35, -0xf7,0x40,0x41,0x80,0x36,0x8c,0x56,0x37,0x88,0x3c,0x17,0xa3,0x78,0x9e,0xd9,0xe1, -0xd4,0x34,0xe8,0x27,0xdc,0x31,0xe6,0x6c,0x02,0x45,0xf7,0x0c,0x39,0x15,0xf7,0x15, -0x38,0x56,0x49,0x5e,0x9d,0x5b,0xbf,0x35,0xff,0x00,0x04,0xf5,0xe5,0x97,0x3b,0x7b, -0xb2,0x3e,0x30,0xa2,0xba,0x4f,0x88,0x3e,0x0e,0x97,0xc0,0xfe,0x26,0xb8,0xd3,0x5d, -0x8c,0x90,0xe0,0x4b,0x04,0xad,0xd5,0xe3,0x3d,0x09,0xf7,0x18,0x20,0xfb,0x8a,0xe6, -0xeb,0xe1,0xaa,0xd2,0x9d,0x1a,0x8e,0x9c,0xd5,0x9a,0xd0,0xf2,0x25,0x17,0x06,0xe2, -0xfa,0x05,0x74,0x7e,0x0d,0xf1,0xde,0xab,0xe0,0x9d,0x4a,0x3b,0x8b,0x2b,0x87,0x36, -0xfb,0x81,0x96,0xd5,0x98,0xf9,0x72,0xaf,0x70,0x47,0x63,0xef,0xd4,0x57,0x39,0x45, -0x14,0xaa,0xce,0x8c,0xd5,0x4a,0x6e,0xcd,0x04,0x64,0xe0,0xf9,0xa3,0xb9,0xf7,0x06, -0x95,0xa8,0xc3,0xab,0xe9,0xb6,0xd7,0xb6,0xed,0xba,0x0b,0x88,0xd6,0x54,0x3e,0xc4, -0x64,0x7f,0x3a,0xb7,0x5c,0x27,0xc1,0x2b,0xef,0xb7,0x7c,0x37,0xd2,0x49,0x39,0x68, -0x83,0xc2,0x7f,0xe0,0x2e,0x40,0xfd,0x31,0x5d,0xdd,0x7e,0xe5,0x86,0xab,0xed,0xe8, -0x42,0xaf,0x74,0x9f,0xde,0x8f,0xaf,0xa7,0x2e,0x78,0x29,0x77,0x0a,0x28,0xa2,0xba, -0x4d,0x02,0x8a,0x28,0xa0,0x04,0x27,0x00,0xd7,0xc7,0x1f,0x11,0x35,0xcf,0xf8,0x48, -0xbc,0x6d,0xac,0x5f,0x2b,0x07,0x8d,0xa7,0x64,0x8c,0x8e,0x85,0x17,0xe5,0x53,0xf8, -0x80,0x0f,0xe3,0x5f,0x54,0x78,0xf7,0x5d,0xff,0x00,0x84,0x73,0xc1,0xfa,0xb6,0xa0, -0xae,0x12,0x48,0xad,0xdb,0xcb,0x2d,0xd3,0x79,0x18,0x4f,0xfc,0x78,0x8a,0xf8,0xcc, -0x0c,0x0c,0x57,0xc0,0x71,0x4d,0x7d,0x29,0xd0,0x5e,0xaf,0xf2,0x5f,0xa9,0xe2,0xe6, -0x33,0xf8,0x60,0x2d,0x14,0x51,0x5f,0x9f,0x1e,0x20,0x57,0xd8,0xdf,0x0e,0xb4,0x4f, -0xec,0x0f,0x04,0xe8,0xf6,0x44,0x61,0xd6,0xdd,0x5d,0xc7,0xfb,0x4d,0xf3,0x37,0xea, -0xc6,0xbe,0x53,0xf0,0x5e,0x91,0xfd,0xbf,0xe2,0xcd,0x27,0x4f,0xc6,0x56,0x7b,0x94, -0x0e,0x3f,0xd9,0x07,0x2d,0xfa,0x03,0x5f,0x68,0x28,0x01,0x40,0x1c,0x01,0x5f,0x7f, -0xc2,0xd4,0x3f,0x89,0x5d,0xfa,0x7e,0xaf,0xf4,0x3d,0xac,0xba,0x1f,0x14,0xfe,0x41, -0x4b,0x45,0x15,0xfa,0x09,0xed,0x85,0x79,0xb7,0xc7,0xed,0x63,0xfb,0x2f,0xe1,0xfc, -0xf0,0xa9,0x2b,0x25,0xf4,0xc9,0x6e,0xa4,0x7a,0x67,0x73,0x7e,0x88,0x47,0xe3,0x5e, -0x93,0x5e,0x17,0xfb,0x4e,0x6a,0x0e,0xb1,0xe8,0x36,0x4a,0x7e,0x46,0x32,0xcc,0xc3, -0xdc,0x6d,0x03,0xf9,0xb5,0x78,0xd9,0xc5,0x57,0x47,0x01,0x56,0x4b,0xb5,0xbe,0xfd, -0x0e,0x5c,0x54,0xb9,0x28,0xc9,0x9e,0x11,0x45,0x14,0x57,0xe3,0x07,0xca,0x05,0x5e, -0xd0,0xb4,0xc6,0xd6,0xb5,0xab,0x0d,0x3d,0x0e,0x1a,0xea,0x74,0x87,0x3e,0x9b,0x88, -0x19,0xaa,0x35,0xda,0x7c,0x1b,0xb4,0x5b,0xdf,0x89,0x3a,0x2a,0x3f,0xdd,0x57,0x79, -0x3f,0x15,0x8d,0x88,0xfd,0x40,0xae,0xac,0x2d,0x3f,0x6d,0x5e,0x14,0xdf,0x56,0x97, -0xe2,0x69,0x4e,0x3c,0xd3,0x8c,0x7c,0xcf,0xac,0xad,0xa0,0x8e,0xd6,0xde,0x28,0x62, -0x50,0x91,0x46,0xa1,0x11,0x47,0x40,0x00,0xc0,0x02,0xa5,0xa4,0x14,0xb5,0xfb,0xaa, -0x49,0x2b,0x23,0xec,0x42,0x8a,0x28,0xa6,0x01,0x45,0x14,0x50,0x04,0x73,0x38,0x86, -0x27,0x76,0x38,0x55,0x04,0x93,0xf8,0x57,0xc3,0xd7,0x93,0x7d,0xa6,0xf2,0x79,0xbf, -0xe7,0xa4,0x8c,0xff,0x00,0x99,0xcd,0x7d,0x79,0xf1,0x37,0x5a,0x5d,0x07,0xc0,0xba, -0xc5,0xd1,0x38,0x73,0x01,0x8a,0x3c,0x1e,0x77,0x3f,0xca,0x3f,0x9e,0x7f,0x0a,0xf8, -0xf6,0xbf,0x3a,0xe2,0x9a,0xa9,0xce,0x95,0x25,0xd1,0x36,0x78,0x59,0x8c,0xb5,0x8c, -0x42,0x8a,0x28,0xaf,0x84,0x3c,0x70,0xaf,0xa1,0xff,0x00,0x66,0x98,0x36,0xf8,0x6b, -0x56,0x97,0x04,0x6f,0xbb,0x0b,0x9f,0xa2,0x0f,0xf1,0xaf,0x9e,0x3a,0xd7,0xd5,0x5f, -0x02,0xf4,0xa6,0xd3,0x3e,0x1d,0x58,0x3b,0xae,0xd9,0x2e,0x9d,0xee,0x08,0xf6,0x27, -0x0b,0xff,0x00,0x8e,0x81,0x5f,0x55,0xc3,0x74,0xdc,0xf1,0xdc,0xdd,0x93,0xff,0x00, -0x23,0xd1,0xc0,0x46,0xf5,0xaf,0xd9,0x1e,0x81,0x8e,0x2b,0xc3,0xbf,0x68,0x6f,0x02, -0xcd,0x71,0xe4,0xf8,0x8e,0xce,0x33,0x20,0x89,0x04,0x57,0x61,0x47,0x21,0x73,0xf2, -0xbf,0xe1,0x9c,0x1f,0xc3,0xde,0xbd,0xc4,0x53,0x66,0x85,0x27,0x8d,0xa3,0x91,0x16, -0x44,0x71,0xb5,0x95,0x86,0x41,0x1e,0x86,0xbf,0x46,0xc7,0x60,0xe1,0x8e,0xa1,0x2a, -0x33,0xeb,0xf8,0x33,0xdd,0xad,0x49,0x56,0x83,0x83,0x3e,0x17,0xa2,0xbd,0xc7,0xe2, -0x1f,0xec,0xff,0x00,0x20,0x96,0x5b,0xff,0x00,0x0d,0x60,0xa3,0x65,0x9b,0x4f,0x76, -0xc1,0x53,0xff,0x00,0x4c,0xd8,0xff,0x00,0x23,0xef,0xcf,0x41,0x5e,0x2d,0x7f,0xa7, -0x5d,0x69,0x57,0x2f,0x6f,0x79,0x6f,0x2d,0xac,0xe9,0xf7,0xa3,0x95,0x0a,0xb0,0xfc, -0x0d,0x7e,0x43,0x8c,0xcb,0xf1,0x18,0x19,0xb8,0xd5,0x8e,0x9d,0xfa,0x33,0xe6,0x2a, -0xd0,0x9d,0x17,0x69,0x22,0xbd,0x14,0x51,0x5e,0x69,0x80,0x52,0xab,0x14,0x60,0xca, -0x4a,0xb0,0x39,0x04,0x1c,0x11,0x49,0x45,0x34,0xed,0xaa,0x03,0xab,0xd1,0xbe,0x29, -0xf8,0xa7,0x41,0xda,0xb6,0xba,0xcd,0xc3,0x46,0x08,0xfd,0xdd,0xc1,0xf3,0x94,0x8f, -0x4f,0x9b,0x24,0x0f,0xa6,0x2b,0xd1,0x34,0x0f,0xda,0x56,0x65,0x65,0x4d,0x6b,0x4a, -0x57,0x52,0x79,0x9a,0xc9,0x88,0x20,0x7f,0xb8,0xc7,0x9f,0xfb,0xe8,0x57,0x88,0x51, -0x5e,0xae,0x1f,0x35,0xc6,0x61,0xbf,0x87,0x51,0xdb,0xb3,0xd5,0x7e,0x27,0x4c,0x31, -0x35,0x69,0xfc,0x32,0x3e,0xc3,0xf0,0xc7,0xc4,0x9f,0x0f,0xf8,0xb8,0x2a,0xe9,0xf7, -0xe8,0x6e,0x08,0xcf,0xd9,0xa5,0xf9,0x25,0x1f,0xf0,0x13,0xd7,0xf0,0xcd,0x74,0xf9, -0xaf,0x85,0x91,0xda,0x37,0x57,0x46,0x2a,0xca,0x72,0x18,0x1c,0x10,0x6b,0xd6,0x7e, -0x1c,0xfc,0x75,0xbe,0xd1,0x25,0x8a,0xc7,0x5e,0x77,0xbf,0xd3,0xce,0x14,0x5c,0x9e, -0x66,0x8b,0xeb,0xfd,0xe1,0xf5,0xe7,0xeb,0xd2,0xbe,0xcb,0x01,0xc4,0xb0,0xaa,0xd5, -0x3c,0x52,0xe5,0x7d,0xd6,0xdf,0x3e,0xc7,0xab,0x47,0x1e,0xa4,0xf9,0x6a,0x2b,0x1f, -0x48,0xd1,0x50,0x59,0x5e,0xc1,0xa8,0x5a,0xc5,0x73,0x6d,0x2a,0xcf,0x6f,0x2a,0x87, -0x8e,0x44,0x39,0x56,0x53,0xd0,0x83,0x53,0xd7,0xdb,0xa6,0x9a,0xba,0x3d,0x7d,0xc2, -0x8a,0x28,0xa6,0x01,0x5e,0x5f,0xf1,0xfa,0xf4,0xda,0xf8,0x48,0xa8,0xfe,0x2c,0xd7, -0xa8,0x57,0x8a,0xfe,0xd2,0xd7,0x5e,0x57,0x87,0xe3,0x4c,0xff,0x00,0x09,0x38,0xaf, -0x2f,0x33,0x97,0x2e,0x12,0xa3,0xf2,0x38,0xb1,0xb2,0xe5,0xc3,0xcd,0xf9,0x1f,0x18, -0x6b,0x32,0x65,0x65,0x6e,0xe4,0x93,0x55,0xff,0x00,0x62,0x7b,0x51,0xaa,0x7e,0xd9, -0x36,0xcf,0x8c,0x8b,0x2d,0x16,0xfa,0xe7,0xe8,0x49,0x8a,0x3c,0xff,0x00,0xe4,0x43, -0xf9,0xd1,0xad,0xbe,0xdb,0x69,0x0f,0xb1,0xad,0x6f,0xf8,0x27,0x95,0x9f,0xdb,0x3f, -0x6a,0x3f,0x15,0x5e,0xe3,0x22,0xd7,0xc3,0x72,0xc5,0xbb,0xd0,0xc9,0x73,0x01,0xff, -0x00,0xda,0x66,0xbe,0x63,0x21,0x8f,0xbd,0x73,0xf2,0xcc,0x8d,0x73,0xe7,0x09,0xf6, -0x4c,0xfd,0x29,0xdb,0x45,0x1c,0xd1,0x5f,0x79,0x73,0xf5,0xeb,0x21,0xd4,0x51,0x49, -0x48,0xa3,0xcd,0x3f,0x68,0x5f,0x18,0x9f,0x07,0xfc,0x31,0xd4,0xa4,0x85,0xf6,0x5d, -0xdf,0x62,0xc6,0x03,0xe8,0x5f,0x3b,0x8f,0xe0,0x81,0x8f,0xd4,0x0a,0xf8,0xeb,0xc0, -0x3e,0x1d,0x93,0xc5,0x3e,0x2c,0xd3,0x74,0xd8,0xd7,0x3e,0x6c,0xca,0x1b,0xd8,0x67, -0x9a,0xf5,0x7f,0xda,0xdb,0xc6,0x1f,0xda,0xbe,0x30,0xb2,0xd0,0x61,0x7c,0xc1,0xa6, -0xc3,0xe6,0x4a,0x01,0xe0,0xca,0xfe,0xbe,0xe1,0x40,0xff,0x00,0xbe,0xab,0x43,0xf6, -0x4b,0xf0,0x7f,0xda,0xb5,0x7b,0xdd,0x76,0x64,0xca,0x5b,0x2f,0x97,0x11,0x3f,0xde, -0x3d,0x6b,0xe0,0xb1,0xcd,0xe6,0x19,0x8c,0x68,0x2d,0x96,0x9f,0xe6,0x7c,0x06,0x2d, -0xbc,0xc7,0x35,0x54,0x57,0xc3,0x1d,0x3e,0xed,0x59,0xf5,0x0e,0x9f,0x65,0x1e,0x9d, -0x63,0x6f,0x6d,0x12,0x85,0x8e,0x14,0x08,0xa0,0x7a,0x01,0x8a,0xb3,0x48,0x3a,0x52, -0xd7,0xde,0x24,0x92,0xb2,0x3e,0xf9,0x2b,0x2b,0x20,0xa2,0x8a,0x29,0x8c,0x2b,0xf2, -0xdf,0xf6,0xd7,0xff,0x00,0x82,0x9b,0x78,0xf3,0xe1,0x1f,0xed,0x0d,0xa9,0xf8,0x43, -0xe1,0xcc,0x9a,0x4b,0xe8,0xfa,0x0c,0x49,0x69,0x7d,0xfd,0xa1,0x69,0xf6,0x81,0x3d, -0xe6,0x37,0x49,0x82,0x19,0x59,0x42,0x6e,0x09,0x80,0x7a,0xab,0x57,0xea,0x2c,0xb2, -0xa4,0x31,0xb3,0xc8,0xea,0x88,0xa0,0x96,0x66,0x38,0x00,0x7a,0x93,0x5f,0x84,0x3f, -0xf0,0x51,0x9f,0xd9,0xb7,0xc4,0x9f,0x0a,0xbe,0x3b,0xf8,0xa7,0xc5,0xe2,0xde,0x4d, -0x4b,0xc1,0xbe,0x27,0xd4,0x65,0xd4,0xad,0x75,0x8b,0x71,0xbe,0x28,0xe5,0x99,0x8b, -0xc9,0x04,0x84,0x67,0x63,0x2b,0xb3,0x63,0x38,0xdc,0xb8,0x23,0xb8,0x0d,0x09,0x9f, -0x6d,0x7e,0xc1,0xff,0x00,0xb5,0xcf,0xc4,0xef,0xdb,0x5b,0xc4,0xde,0x24,0xd0,0xbc, -0x73,0xe1,0x9f,0x07,0xcf,0xe0,0x9d,0x2e,0xc5,0x5f,0x51,0x78,0x74,0xf9,0x77,0x4d, -0x2c,0x84,0x88,0x62,0xdb,0x24,0xce,0x9c,0xec,0x91,0x89,0xdb,0xc0,0x4c,0x63,0x90, -0x47,0xb1,0xf8,0xbf,0xfe,0x09,0x9f,0xfb,0x3c,0xf8,0xc2,0xe9,0xae,0x64,0xf0,0x2a, -0xe9,0x13,0x39,0x25,0x8e,0x91,0x79,0x35,0xb2,0x1c,0xff,0x00,0xb0,0x1b,0x68,0xfc, -0x00,0xaf,0x84,0xbf,0xe0,0x93,0xbf,0xb5,0x1f,0x82,0x3e,0x09,0xea,0xfe,0x2e,0xf0, -0x97,0x8d,0xb5,0x2b,0x7f,0x0f,0x45,0xe2,0x09,0x2d,0xee,0x2c,0xb5,0x6b,0xaf,0x92, -0x01,0x24,0x61,0xd5,0xa2,0x96,0x4e,0x88,0x08,0x60,0x54,0x9e,0x33,0xbf,0x24,0x64, -0x67,0xf5,0xef,0x4a,0xf1,0x66,0x89,0xad,0xdb,0x47,0x71,0xa7,0xeb,0x36,0x17,0xf0, -0x48,0x01,0x49,0x6d,0xae,0x92,0x45,0x61,0xec,0x54,0x90,0x68,0x04,0x7c,0xe9,0xe1, -0x0f,0xf8,0x26,0x9f,0xec,0xf1,0xe0,0xeb,0x85,0xb8,0x8f,0xc0,0x51,0xea,0xf3,0x29, -0x05,0x5b,0x58,0xbc,0x9a,0xe5,0x47,0xfc,0x01,0x9f,0x69,0xfc,0x41,0xaf,0xa4,0x34, -0x2f,0x0f,0x69,0x7e,0x18,0xd2,0xe0,0xd3,0x74,0x7d,0x3a,0xd7,0x4a,0xd3,0xe0,0x1b, -0x62,0xb4,0xb2,0x85,0x61,0x89,0x07,0xa0,0x55,0x00,0x0a,0xd0,0x0c,0x18,0x02,0x08, -0x20,0xf7,0x14,0x64,0x1a,0x43,0x16,0xbc,0xdb,0xe3,0xcf,0x88,0xff,0x00,0xb1,0x3c, -0x0d,0x35,0xb4,0x6d,0x89,0xf5,0x17,0x16,0xeb,0x83,0xc8,0x5e,0xae,0x7e,0x98,0x18, -0xff,0x00,0x81,0x0a,0xf4,0x83,0xc0,0xaf,0x99,0x7f,0x68,0x4f,0x10,0x9d,0x5f,0xc6, -0x69,0xa7,0xa3,0x66,0x1d,0x3a,0x30,0x84,0x7f,0xd3,0x46,0xc3,0x37,0xe9,0xb4,0x7e, -0x15,0xe0,0xe7,0x78,0x9f,0xaa,0xe0,0xa6,0xd6,0xf2,0xd1,0x7c,0xff,0x00,0xe0,0x1c, -0x58,0xba,0x9e,0xce,0x93,0xf3,0x3c,0xbe,0x8a,0x28,0xaf,0xc7,0x4f,0x97,0x0a,0xf7, -0x2f,0xd9,0xaf,0xc3,0xd9,0x93,0x55,0xd6,0xa4,0x5c,0xe3,0x16,0xb1,0x1f,0xfc,0x79, -0xff,0x00,0xf6,0x5a,0xf0,0xda,0xfa,0xff,0x00,0xe1,0x77,0x87,0x8f,0x86,0x7c,0x0f, -0xa5,0x5a,0x32,0x14,0x99,0xa2,0x13,0x4c,0x0f,0x50,0xef,0xf3,0x10,0x7e,0x99,0xc7, -0xe1,0x5f,0x55,0xc3,0x98,0x6f,0x6d,0x8c,0xf6,0x8f,0x68,0x2b,0xfc,0xf6,0x47,0xa3, -0x80,0xa7,0xcf,0x57,0x9b,0xb1,0xd6,0x51,0x49,0x4b,0x5f,0xab,0x1f,0x48,0x78,0x4f, -0xed,0x35,0xa7,0x28,0x3a,0x1d,0xfa,0xaf,0xcc,0x7c,0xd8,0x5d,0xbd,0x7e,0xe9,0x5f, -0xfd,0x9b,0xf3,0xaf,0x0a,0xaf,0xa3,0xff,0x00,0x69,0x38,0x03,0xf8,0x3a,0xc2,0x5c, -0x72,0x97,0xca,0x33,0xec,0x63,0x7f,0xf0,0x15,0xf3,0x85,0x7e,0x47,0xc4,0x30,0x50, -0xcc,0x26,0xd7,0x54,0x9f,0xe0,0x7c,0xce,0x39,0x5a,0xbb,0x0a,0x28,0xa2,0xbe,0x6c, -0xe0,0x3e,0x92,0xfd,0x9b,0xef,0x84,0xfe,0x0c,0xbc,0xb6,0xce,0x5a,0x0b,0xc6,0xe3, -0xd1,0x59,0x54,0x8f,0xd7,0x35,0xeb,0x35,0xe1,0x1f,0xb3,0x1d,0xd0,0x0d,0xe2,0x0b, -0x62,0xdc,0x91,0x0c,0x8a,0xbf,0xf7,0xd8,0x27,0xf9,0x57,0xbb,0x66,0xbf,0x64,0xc9, -0x6a,0x7b,0x4c,0x05,0x27,0xd9,0x5b,0xee,0x76,0x3e,0xa7,0x09,0x2e,0x6a,0x11,0x16, -0x8a,0x28,0xaf,0x70,0xec,0x0a,0x28,0xa4,0x3d,0x28,0x03,0xc8,0x3f,0x69,0x0d,0x6f, -0xec,0x9e,0x19,0xb1,0xd3,0x11,0x80,0x7b,0xd9,0xf7,0xb0,0xf5,0x44,0xe7,0xff,0x00, -0x42,0x2b,0xf9,0x57,0xce,0x95,0xe9,0x7f,0xb4,0x06,0xb8,0x75,0x4f,0x1e,0x3d,0xa0, -0x20,0xc5,0x61,0x0a,0xc2,0x30,0x73,0xf3,0x1f,0x99,0xbf,0xf4,0x20,0x3f,0x0a,0xf3, -0x4a,0xfc,0x77,0x3b,0xaf,0xf5,0x8c,0x74,0xda,0xd9,0x69,0xf7,0x7f,0xc1,0x3e,0x5b, -0x19,0x3e,0x7a,0xcf,0xcb,0x40,0xa2,0x8a,0x2b,0xc1,0x38,0xcf,0x55,0xfd,0x9d,0x74, -0x53,0x7f,0xe3,0x2b,0x8b,0xf6,0x40,0x62,0xb1,0xb7,0x24,0x37,0xa3,0xb9,0xda,0x3f, -0x40,0xf5,0xf4,0xb5,0x79,0x2f,0xec,0xe7,0xa2,0x7d,0x87,0xc1,0xf7,0x3a,0x83,0xc6, -0x04,0x97,0xd7,0x07,0x6b,0xf7,0x31,0xa7,0xca,0x07,0xfd,0xf5,0xbf,0xf3,0xaf,0x5a, -0xaf,0xd8,0x32,0x2a,0x1e,0xc3,0x01,0x0b,0xef,0x2d,0x7e,0xff,0x00,0xf8,0x16,0x3e, -0xa3,0x07,0x0e,0x4a,0x2b,0xcf,0x50,0xa2,0x8a,0x2b,0xe8,0x0e,0xd0,0xaf,0x00,0xfd, -0xa6,0xc6,0x35,0x3d,0x04,0xf6,0x30,0xcb,0xfc,0xd6,0xbd,0xfe,0xbc,0x67,0xf6,0x97, -0xd2,0xbc,0xed,0x0f,0x49,0xd4,0x42,0x92,0x6d,0xe7,0x68,0x4e,0x07,0x00,0x3a,0xe7, -0x27,0xf1,0x41,0xf9,0xd7,0x81,0x9e,0xc1,0xcf,0x2f,0xa8,0x97,0x93,0xfc,0x4e,0x2c, -0x62,0xbd,0x09,0x1f,0x3d,0x51,0x45,0x15,0xf8,0xf1,0xf2,0xe1,0x5d,0xa7,0xc1,0xcb, -0xc4,0xb1,0xf8,0x93,0xa2,0xbb,0x9c,0x2b,0xc8,0xf1,0x7e,0x2c,0x8c,0xa3,0xf5,0x22, -0xb8,0xba,0xb1,0xa7,0xdf,0x4d,0xa5,0xdf,0xdb,0x5e,0x5b,0xb6,0xd9,0xed,0xe4,0x59, -0x50,0xfa,0x32,0x9c,0x8f,0xe5,0x5d,0x38,0x6a,0xbe,0xc2,0xbc,0x2a,0xbf,0xb2,0xd3, -0xfb,0x99,0x74,0xe5,0xc9,0x35,0x2e,0xcc,0xfb,0x88,0x52,0xd6,0x4f,0x86,0x3c,0x43, -0x6d,0xe2,0x9d,0x0e,0xcf,0x53,0xb4,0x6c,0xc5,0x70,0x81,0xb6,0xe7,0x25,0x1b,0xba, -0x9f,0x70,0x72,0x3f,0x0a,0xd6,0xaf,0xdd,0x21,0x38,0xce,0x2a,0x71,0x77,0x4c,0xfb, -0x14,0xd3,0x57,0x41,0x45,0x14,0x55,0x8c,0x28,0xa4,0xc8,0xae,0x4f,0xe2,0x2f,0x8f, -0xed,0x3c,0x07,0xa2,0xb5,0xcc,0x84,0x4b,0x7b,0x28,0x2b,0x6d,0x6d,0x9e,0x5d,0xbd, -0x4f,0xfb,0x23,0xb9,0xff,0x00,0x1a,0xc6,0xb5,0x68,0x50,0xa6,0xea,0xd4,0x76,0x48, -0x89,0x49,0x41,0x39,0x4b,0x63,0xcb,0x7f,0x68,0xdf,0x17,0x2d,0xc5,0xcd,0x9f,0x87, -0xad,0xdf,0x3e,0x41,0x17,0x37,0x38,0xec,0xc4,0x10,0x8b,0xf9,0x12,0x7f,0x11,0x5e, -0x27,0x56,0x75,0x2d,0x46,0xe3,0x56,0xbf,0x9e,0xf6,0xee,0x53,0x35,0xcc,0xee,0x64, -0x91,0xcf,0x72,0x6a,0xb5,0x7e,0x2d,0x98,0x62,0xde,0x3b,0x13,0x2a,0xcf,0xae,0xde, -0x9d,0x0f,0x94,0xaf,0x55,0xd6,0x9b,0x98,0x51,0x45,0x15,0xe7,0x18,0x16,0x74,0xcd, -0x3e,0x6d,0x5b,0x51,0xb5,0xb2,0xb6,0x5d,0xf7,0x17,0x32,0x2c,0x51,0xa9,0xe8,0x59, -0x8e,0x07,0xf3,0xaf,0xb5,0xb4,0x7d,0x3a,0x2d,0x1f,0x4a,0xb4,0xb1,0x80,0x62,0x1b, -0x68,0x96,0x14,0x1e,0xca,0x00,0x1f,0xca,0xbc,0x03,0xf6,0x78,0xf0,0x69,0xd4,0x75, -0xa9,0xb5,0xfb,0x84,0xff,0x00,0x47,0xb2,0x06,0x38,0x32,0x3e,0xf4,0xa4,0x72,0x7f, -0x05,0x3f,0x99,0xf6,0xaf,0xa2,0x87,0x4a,0xfd,0x3b,0x86,0xb0,0x8e,0x8d,0x09,0x62, -0x24,0xb5,0x9e,0xde,0x88,0xfa,0x0c,0xbe,0x97,0x2c,0x1c,0xdf,0x51,0x68,0xa4,0xcd, -0x2d,0x7d,0x91,0xea,0x88,0x46,0x6b,0x33,0x5b,0xf0,0xd6,0x97,0xe2,0x2b,0x63,0x06, -0xa5,0x61,0x05,0xec,0x7d,0x84,0xa8,0x09,0x1f,0x43,0xd4,0x7e,0x15,0xa9,0x45,0x4c, -0xa1,0x19,0xae,0x59,0x2b,0xa1,0x34,0x9a,0xb3,0x3c,0x7b,0x5f,0xfd,0x9b,0xf4,0x8b, -0xd6,0x32,0x69,0x57,0xd3,0xe9,0xac,0x4e,0x7c,0xb9,0x07,0x9d,0x18,0x1e,0x83,0x90, -0x47,0xe6,0x6b,0xce,0x35,0xdf,0x81,0x3e,0x2a,0xd1,0x81,0x78,0xad,0xa2,0xd4,0xe2, -0x19,0xf9,0xad,0x1f,0x2d,0x8e,0xdf,0x29,0xc1,0xfc,0xb3,0x5f,0x54,0x52,0x11,0x5f, -0x3d,0x88,0xc8,0x30,0x35,0xf5,0x51,0xe5,0x7e,0x5f,0xe5,0xb1,0xc3,0x3c,0x15,0x19, -0xf4,0xb7,0xa1,0xf0,0xe5,0xed,0x85,0xd6,0x9b,0x39,0x86,0xee,0xda,0x5b,0x59,0x87, -0x58,0xe6,0x42,0x8d,0xf9,0x1a,0x82,0xbe,0xdb,0xd5,0xf4,0x1d,0x3f,0x5d,0xb6,0x36, -0xfa,0x85,0x9c,0x37,0xb0,0x9f,0xe1,0x99,0x03,0x63,0xdc,0x7a,0x57,0x8b,0xfc,0x45, -0xf8,0x03,0x1d,0xbd,0xb4,0xda,0x8f,0x86,0xb7,0xe5,0x32,0xef,0x60,0xe7,0x76,0x47, -0x7d,0x84,0xf3,0x9f,0x63,0x9c,0xfa,0xf6,0xaf,0x91,0xc6,0xf0,0xe5,0x7a,0x11,0x75, -0x28,0x4b,0x9d,0x2e,0x9b,0x3f,0xf8,0x27,0x9b,0x57,0x01,0x38,0x2e,0x68,0x3b,0xa3, -0xc3,0x28,0xa0,0x8c,0x1c,0x74,0xa2,0xbe,0x40,0xf2,0xc2,0x8a,0x28,0xa0,0x0f,0x6f, -0xfd,0x9d,0xbc,0x6b,0x22,0xdc,0xcf,0xe1,0xcb,0x99,0x0b,0x46,0xca,0x67,0xb5,0xdc, -0x7e,0xe9,0x1f,0x79,0x07,0xb1,0xeb,0xf8,0x1a,0xf7,0xba,0xf8,0xf7,0xe1,0x7d,0xe3, -0xd8,0xfc,0x41,0xd0,0x64,0x8c,0xe0,0xb5,0xd2,0xc6,0x7e,0x8d,0xf2,0x9f,0xd1,0x8d, -0x7d,0x84,0x2b,0xf5,0x6e,0x1c,0xc4,0x4a,0xb6,0x13,0x92,0x6f,0xe1,0x76,0xf9,0x1f, -0x47,0x80,0xa8,0xe7,0x4a,0xcf,0xa0,0xb4,0x51,0x45,0x7d,0x51,0xe9,0x08,0x78,0xaf, -0x9f,0xbf,0x6a,0x3b,0xbd,0x96,0x51,0xc7,0x9e,0x89,0xd2,0xbe,0x81,0x35,0xf3,0x27, -0xed,0x4f,0x77,0xfe,0x90,0x23,0x07,0xf8,0x45,0x78,0x59,0xd4,0xb9,0x70,0x53,0x3c, -0xac,0xce,0x5c,0xb8,0x59,0xb3,0xe5,0x3f,0x11,0x3e,0xdb,0x19,0x4f,0xfb,0x26,0xbb, -0xef,0xf8,0x26,0x55,0x81,0xb9,0xf8,0x97,0xf1,0x53,0x53,0xed,0x0d,0xa5,0x8d,0xb0, -0x3f,0xef,0xbc,0xcd,0xff,0x00,0xb2,0x0a,0xf3,0x8f,0x16,0xc9,0xe5,0xe9,0xb3,0x9f, -0x45,0xaf,0x63,0xff,0x00,0x82,0x5b,0xdb,0x16,0xb7,0xf8,0xab,0x7d,0xb7,0x89,0x35, -0x1b,0x38,0x43,0x7a,0xec,0x8a,0x42,0x7f,0xf4,0x3a,0xf2,0xb2,0x28,0xe8,0xd9,0xf9, -0xdf,0x0d,0x47,0x9b,0x33,0x9c,0xbb,0x44,0xfb,0xb3,0x9a,0x29,0xd4,0x57,0xd9,0x1f, -0xac,0x85,0x52,0xd5,0xb5,0x28,0x74,0x9d,0x36,0xee,0xfa,0xe0,0xed,0x82,0xda,0x26, -0x99,0xcf,0xfb,0x2a,0x32,0x6a,0xed,0x78,0xaf,0xed,0x53,0xe3,0x0f,0xec,0x0f,0x87, -0xab,0xa5,0xc3,0x26,0xdb,0xad,0x5e,0x61,0x09,0x00,0xe0,0xf9,0x4b,0xf3,0x48,0x7e, -0x9f,0x75,0x7f,0xe0,0x55,0xcd,0x89,0xac,0xb0,0xf4,0x65,0x55,0xf4,0x47,0x26,0x2e, -0xba,0xc2,0xd0,0x9d,0x67,0xd1,0x1f,0x26,0x78,0x83,0x5a,0xb8,0xf1,0x6f,0x89,0x2f, -0xf5,0x4b,0x8c,0xb5,0xc5,0xf5,0xc3,0x4a,0x47,0xa6,0x4f,0x03,0xf0,0x18,0x1f,0x85, -0x7d,0xbd,0xf0,0x4b,0xc2,0x63,0xc2,0x3f,0x0f,0xf4,0xeb,0x76,0x4d,0xb3,0xcc,0x82, -0x69,0x78,0xc7,0x26,0xbe,0x43,0xf8,0x3b,0xe1,0x46,0xf1,0x77,0x8f,0x74,0xcb,0x3d, -0xbb,0xa1,0x59,0x04,0x92,0x9f,0x45,0x1c,0xd7,0xde,0xf0,0xc4,0xb0,0xc2,0x91,0xa0, -0xda,0xaa,0x00,0x03,0xda,0xbe,0x4f,0x21,0xa2,0xea,0x54,0xa9,0x89,0x9f,0xa7,0xdf, -0xab,0x3e,0x57,0x87,0xa8,0x39,0x73,0xe2,0xa7,0xbb,0xfe,0x99,0x25,0x14,0x56,0x47, -0x8b,0xfc,0x53,0xa7,0x78,0x1f,0xc2,0x9a,0xcf,0x88,0xb5,0x79,0xbe,0xcf,0xa5,0xe9, -0x36,0x73,0x5f,0x5d,0x4b,0x8c,0xec,0x8a,0x34,0x2e,0xe7,0x1d,0xf8,0x53,0x5f,0x6a, -0x7d,0xa9,0xaf,0x45,0x7e,0x2d,0xcd,0xff,0x00,0x05,0x91,0xf8,0xd2,0x35,0x2b,0x86, -0xb6,0xd1,0x7c,0x20,0xd6,0x2d,0x2b,0x18,0x22,0x9e,0xc2,0x7f,0x31,0x63,0x2c,0x76, -0xab,0x30,0x9c,0x02,0x40,0xc0,0xce,0x2b,0xf5,0x5f,0xf6,0x6a,0xf1,0xbf,0x8a,0xfe, -0x25,0x7c,0x0e,0xf0,0x8f,0x8a,0xfc,0x6b,0x65,0x63,0xa6,0xf8,0x83,0x5a,0xb3,0x5b, -0xf9,0x2d,0x34,0xe4,0x74,0x8a,0x38,0xa4,0x25,0xa1,0xe1,0xd9,0x8e,0x4c,0x65,0x09, -0xc9,0xea,0x48,0xa0,0x49,0xdc,0xf9,0xef,0xfe,0x0a,0xb9,0xf1,0xa3,0xfe,0x15,0x97, -0xec,0xc9,0x73,0xe1,0xfb,0x39,0x8c,0x7a,0xb7,0x8c,0x6e,0x06,0x96,0x81,0x7a,0x8b, -0x60,0x37,0xdc,0x1f,0xa1,0x50,0x13,0xfe,0xda,0x57,0xe2,0x00,0xd4,0x6e,0xc5,0xab, -0xdb,0x0b,0xa9,0x85,0xb3,0xfd,0xe8,0x44,0x87,0x63,0x73,0x9e,0x47,0x4e,0xa2,0xbf, -0xa2,0x9f,0x8f,0x5f,0xb2,0x2f,0xc3,0x3f,0xda,0x5e,0xfb,0x4b,0xbc,0xf1,0xf6,0x95, -0x77,0xaa,0xcd,0xa6,0x44,0xf0,0xda,0x79,0x3a,0x8c,0xd6,0xeb,0x12,0xb1,0xcb,0x7c, -0xa8,0xc0,0x12,0x48,0x19,0x24,0x67,0x81,0xe9,0x5e,0x33,0x7d,0xff,0x00,0x04,0x93, -0xfd,0x9e,0xae,0xff,0x00,0xd5,0x69,0x5a,0xed,0x97,0xfd,0x70,0xd6,0x24,0x3f,0xfa, -0x1e,0xea,0x62,0x6a,0xe7,0xe1,0xa7,0x34,0xf8,0x66,0x92,0xde,0x41,0x24,0x4e,0xd1, -0x48,0x3a,0x32,0x1c,0x11,0xf8,0xd7,0xed,0x36,0xa9,0xff,0x00,0x04,0x70,0xf8,0x23, -0x78,0xa7,0xec,0x9a,0xb7,0x8b,0xb4,0xf2,0x7b,0xa5,0xfc,0x2f,0x8f,0xfb,0xea,0x13, -0x5c,0x9d,0xff,0x00,0xfc,0x11,0x47,0xe1,0xf4,0xad,0xfe,0x85,0xf1,0x0f,0xc4,0xd6, -0xe3,0xd2,0xe2,0xde,0xde,0x5f,0xe4,0xab,0x4e,0xe2,0xb3,0x3f,0x28,0xad,0x3e,0x21, -0xf8,0xaa,0xc3,0x02,0xd7,0xc4,0xda,0xc5,0xb6,0x3a,0x08,0x6f,0xe5,0x4c,0x7e,0x4d, -0x5f,0xb1,0x9f,0xf0,0x49,0x2f,0x0c,0x78,0x9e,0x4f,0x82,0x3a,0xbf,0x8e,0x7c,0x53, -0xae,0xea,0xda,0xcc,0xbe,0x20,0xbe,0xf2,0x74,0xf4,0xd4,0xef,0x25,0x9c,0x43,0x6d, -0x06,0x54,0xb2,0x07,0x63,0x8d,0xf2,0x17,0xe9,0xd7,0x60,0xaf,0x36,0xbe,0xff,0x00, -0x82,0x23,0xe8,0x0e,0xa7,0xec,0x9f,0x15,0xb5,0x28,0x4f,0xfd,0x36,0xd1,0xa3,0x93, -0xf9,0x4c,0xb5,0xfa,0x0f,0xf0,0x97,0xe1,0xbe,0x9f,0xf0,0x87,0xe1,0x9f,0x86,0x7c, -0x19,0xa5,0xb6,0xfb,0x1d,0x12,0xc2,0x2b,0x28,0xe5,0x2b,0xb4,0xc9,0xb5,0x70,0xce, -0x47,0x38,0x2c,0xd9,0x63,0xcf,0x52,0x69,0x31,0xa4,0xce,0x8f,0x55,0xd4,0x62,0xd2, -0x74,0xdb,0xab,0xd9,0xdb,0x6c,0x36,0xf1,0x34,0xae,0x7d,0x94,0x64,0xd7,0xc5,0x5a, -0xb6,0xa5,0x2e,0xb1,0xaa,0x5d,0xdf,0x4e,0x73,0x35,0xcc,0xad,0x2b,0x7d,0x49,0xcd, -0x7d,0x6b,0xf1,0x2b,0xc3,0xba,0x97,0x8a,0xfc,0x29,0x73,0xa5,0x69,0x93,0x41,0x04, -0xd7,0x0c,0xa1,0xde,0x76,0x65,0x1b,0x01,0xc9,0x03,0x00,0xf2,0x70,0x07,0xd0,0x9a, -0xf1,0x39,0x7f,0x67,0x2f,0x13,0xa2,0x92,0xb7,0x3a,0x6c,0x87,0xd1,0x66,0x70,0x7f, -0x54,0xaf,0x85,0xe2,0x1a,0x18,0xbc,0x5c,0xe1,0x0a,0x34,0xdb,0x8a,0xd7,0x4e,0xe7, -0x93,0x8e,0x85,0x5a,0x8d,0x46,0x11,0xba,0x47,0x95,0xd1,0x5e,0x87,0x3f,0xc0,0x5f, -0x18,0xc2,0x7e,0x5b,0x18,0x26,0xf7,0x4b,0x84,0xfe,0xa4,0x55,0x39,0x3e,0x0a,0x78, -0xd2,0x3c,0x9f,0xec,0x46,0x61,0xfe,0xcd,0xc4,0x47,0xff,0x00,0x66,0xaf,0x89,0x79, -0x6e,0x36,0x3b,0xd2,0x97,0xdc,0xcf,0x25,0xd0,0xaa,0xbe,0xcb,0x32,0xfe,0x1d,0xf8, -0x7b,0xfe,0x12,0x8f,0x19,0xe9,0x76,0x0c,0x81,0xe1,0x69,0x44,0x92,0x83,0xd3,0xcb, -0x5f,0x99,0x87,0xe2,0x06,0x3f,0x1a,0xfb,0x1c,0x70,0x05,0x78,0xcf,0xc0,0xaf,0x87, -0x5a,0x9f,0x86,0x75,0x2d,0x47,0x51,0xd6,0x2c,0x9a,0xd2,0x7d,0x82,0x08,0x55,0xc8, -0x24,0x82,0x72,0xc7,0x82,0x7d,0x14,0x7e,0x75,0xec,0xd5,0xfa,0x37,0x0f,0x61,0x25, -0x86,0xc2,0xb9,0x54,0x56,0x94,0x9f,0xe5,0xa2,0x3d,0xdc,0x0d,0x27,0x4e,0x9d,0xda, -0xd5,0x8b,0x45,0x14,0x57,0xd4,0x9e,0x89,0xe6,0x1f,0xb4,0x3c,0x7e,0x67,0xc3,0xfc, -0xff,0x00,0x72,0xee,0x36,0xfd,0x18,0x7f,0x5a,0xf9,0x8e,0xbe,0xa7,0xf8,0xf7,0x1e, -0xff,0x00,0x86,0xb7,0xed,0xfd,0xc9,0x61,0x6f,0xfc,0x88,0x07,0xf5,0xaf,0x96,0x33, -0x5f,0x96,0x71,0x32,0xb6,0x35,0x3f,0xee,0xaf,0xcd,0x9f,0x3b,0x98,0x2f,0xde,0xdf, -0xc8,0x28,0xa2,0x8a,0xf9,0x23,0xcc,0x3d,0x5f,0xf6,0x6f,0xb9,0x31,0xf8,0xd6,0xf2, -0x1c,0xe1,0x64,0xb1,0x63,0x8f,0x52,0x1d,0x3f,0xc4,0xd7,0xd2,0x63,0xad,0x7c,0xa1, -0xf0,0x42,0xf1,0xad,0x3e,0x25,0x69,0x4a,0xa7,0x0b,0x30,0x96,0x26,0xfa,0x79,0x6c, -0x7f,0x98,0x15,0xf5,0x78,0xaf,0xd5,0x38,0x6a,0x7c,0xd8,0x2e,0x5e,0xcd,0xff,0x00, -0x99,0xf4,0x78,0x07,0x7a,0x36,0xec,0xc5,0xa2,0x8a,0x2b,0xeb,0x0f,0x48,0x2a,0x3b, -0x89,0xd2,0xda,0x09,0x25,0x91,0x82,0x47,0x1a,0x96,0x66,0x27,0x80,0x00,0xe4,0xd3, -0xcd,0x70,0xff,0x00,0x19,0xb5,0xcf,0xec,0x4f,0x87,0xba,0xa1,0x5c,0x79,0xb7,0x4a, -0x2d,0x14,0x1e,0xfb,0xf8,0x6f,0xfc,0x77,0x71,0xfc,0x2b,0x9f,0x11,0x59,0x50,0xa3, -0x3a,0xaf,0xa2,0x6c,0x89,0xcb,0x92,0x2e,0x5d,0x8f,0x96,0xb5,0xbd,0x56,0x4d,0x73, -0x59,0xbe,0xd4,0x65,0x1b,0x64,0xba,0x9d,0xe6,0x2b,0xfd,0xdd,0xc4,0x9c,0x7e,0x15, -0x4a,0x8a,0x2b,0xf0,0x99,0xc9,0xce,0x4e,0x4f,0x76,0x7c,0x73,0x77,0x77,0x61,0x40, -0x04,0x90,0x07,0x24,0xd1,0x5d,0x17,0xc3,0xcd,0x1b,0xfb,0x7f,0xc6,0xda,0x3d,0x91, -0x5d,0xc8,0xf7,0x0a,0xee,0x3d,0x51,0x7e,0x66,0xfd,0x14,0xd5,0xd1,0xa6,0xeb,0x54, -0x8d,0x35,0xbb,0x69,0x0e,0x31,0x72,0x92,0x8a,0xea,0x7d,0x59,0xe0,0x9d,0x10,0x78, -0x77,0xc2,0x7a,0x56,0x9e,0x17,0x6b,0x43,0x6e,0x81,0xc7,0xfb,0x64,0x65,0xbf,0x52, -0x6b,0x76,0x90,0x74,0x18,0xe9,0x4b,0x5f,0xbb,0xd3,0x82,0xa7,0x05,0x05,0xb2,0x56, -0x3e,0xc6,0x2b,0x95,0x24,0x82,0x8a,0x28,0xad,0x0a,0x0a,0xc0,0xf1,0xcf,0x86,0x93, -0xc5,0xde,0x16,0xd4,0x34,0xb6,0x21,0x5a,0x78,0xff,0x00,0x76,0xc7,0xa2,0xc8,0x0e, -0x54,0x9f,0x6c,0x81,0x5b,0xf4,0x86,0xb3,0xa9,0x08,0xd5,0x83,0x84,0xb6,0x7a,0x0a, -0x49,0x49,0x38,0xbe,0xa7,0xc3,0x57,0x56,0xb2,0xd9,0x5c,0xcb,0x6f,0x3c,0x6d,0x14, -0xd1,0x39,0x8d,0xd1,0x86,0x0a,0xb0,0x38,0x20,0xd4,0x55,0xf4,0x07,0xc6,0xef,0x85, -0x32,0xea,0x8c,0xfe,0x20,0xd1,0xe1,0x32,0x5d,0x01,0x9b,0xab,0x64,0x1c,0xc8,0x07, -0xf1,0xa8,0xee,0x40,0xea,0x3b,0x8f,0x7e,0xbf,0x3f,0xd7,0xe2,0xd9,0x86,0x06,0xa6, -0x02,0xb3,0xa7,0x3d,0xba,0x3e,0xeb,0xfa,0xdc,0xf9,0x3a,0xf4,0x65,0x46,0x7c,0xac, -0x28,0xa2,0x8a,0xf3,0x0e,0x73,0xb3,0xf8,0x73,0xf1,0x3a,0xfb,0xe1,0xf5,0xe3,0x04, -0x43,0x77,0xa7,0x4a,0x73,0x35,0xab,0x1c,0x73,0xfd,0xe5,0x3d,0x8f,0xf3,0xfc,0xb1, -0xf4,0x3f,0x86,0xbe,0x2b,0xf8,0x67,0xc4,0xd1,0x21,0x87,0x52,0x8a,0xd6,0x72,0x39, -0xb7,0xbb,0x61,0x13,0x83,0xe9,0xc9,0xc1,0xfc,0x09,0xaf,0x91,0x68,0xaf,0xa1,0xcb, -0xf3,0xbc,0x46,0x02,0x3e,0xcd,0x7b,0xd1,0xec,0xfa,0x7a,0x33,0xba,0x8e,0x2e,0xa5, -0x15,0xcb,0xba,0x3e,0xe7,0x8e,0xe2,0x29,0x90,0x3c,0x72,0x23,0xa1,0xe8,0xca,0xc0, -0x83,0x54,0xf5,0x0d,0x7f,0x4c,0xd2,0x50,0xb5,0xee,0xa1,0x6b,0x68,0xa3,0xbc,0xd3, -0x2a,0xff,0x00,0x33,0x5f,0x13,0x2c,0x8e,0x83,0x0a,0xcc,0xa3,0xd8,0xe2,0x9a,0x79, -0x39,0x27,0x27,0xde,0xbd,0xd7,0xc5,0x52,0xb7,0xbb,0x47,0x5f,0x5f,0xf8,0x07,0x67, -0xf6,0x93,0xe9,0x1f,0xc7,0xfe,0x01,0xf4,0x6f,0x8c,0x7f,0x68,0x5d,0x2b,0x4c,0x89, -0xe1,0xd0,0xe3,0x3a,0xa5,0xd9,0xc8,0x13,0x30,0x29,0x0a,0x7e,0x7c,0xb7,0xe1,0xc1, -0xf5,0xaf,0x03,0xd7,0xbc,0x41,0x7f,0xe2,0x6d,0x4a,0x5b,0xfd,0x46,0xe1,0xae,0x6e, -0x64,0xea,0xcd,0xd0,0x0e,0xc0,0x0e,0xc0,0x7a,0x0a,0xce,0xa2,0xbe,0x5f,0x1d,0x9a, -0x62,0x71,0xef,0xf7,0xaf,0x4e,0xcb,0x63,0xce,0xad,0x88,0xa9,0x5b,0xe2,0xd8,0x28, -0xa2,0x8a,0xf2,0x4e,0x60,0xad,0x8f,0x09,0xf8,0x5e,0xf7,0xc6,0x1a,0xe5,0xbe,0x9b, -0x62,0x84,0xc9,0x21,0xcb,0xc8,0x47,0xcb,0x1a,0x7f,0x13,0x1f,0x61,0xfa,0x9c,0x0e, -0xf4,0x78,0x5f,0xc2,0x9a,0x97,0x8c,0x35,0x44,0xb1,0xd3,0x60,0x32,0xc8,0x7e,0xfb, -0x9c,0x84,0x89,0x7f,0xbc,0xc7,0xb0,0xfd,0x7d,0x33,0x5f,0x54,0x7c,0x3e,0xf8,0x7f, -0x63,0xe0,0x2d,0x24,0x41,0x6e,0x04,0xd7,0x72,0x00,0x6e,0x2e,0x98,0x61,0xa4,0x3f, -0xd0,0x0e,0xc2,0xbe,0x8b,0x29,0xca,0x67,0x8f,0xa8,0xa7,0x35,0x6a,0x6b,0x77,0xdf, -0xc9,0x1d,0xb8,0x6c,0x34,0xab,0xca,0xef,0xe1,0x35,0xbc,0x35,0xe1,0xeb,0x5f,0x0b, -0x68,0xb6,0xba,0x65,0x92,0x95,0x82,0x04,0xda,0x09,0xea,0xc7,0xbb,0x1f,0x72,0x72, -0x7f,0x1a,0xd4,0x14,0x52,0xd7,0xeb,0x70,0x84,0x69,0xc5,0x46,0x2a,0xc9,0x1f,0x4e, -0x92,0x4a,0xc8,0xc7,0xf1,0x4f,0x8a,0x6c,0x7c,0x21,0xa5,0x9d,0x43,0x51,0x76,0x4b, -0x60,0xe9,0x19,0x28,0xbb,0x8e,0x58,0xe3,0xa7,0xb7,0x5e,0x39,0xc0,0xa9,0x74,0x3f, -0x12,0x69,0x9e,0x23,0xb5,0x17,0x1a,0x6d,0xf4,0x37,0x91,0x11,0x92,0x62,0x6c,0x95, -0xfa,0x8e,0xa0,0xfb,0x1a,0xf1,0xdf,0xda,0x5f,0x5d,0xf9,0x74,0x8d,0x1d,0x1b,0xae, -0xeb,0xa9,0x00,0x3f,0xf0,0x15,0xff,0x00,0xd9,0xab,0xc4,0x2c,0xaf,0xee,0x74,0xeb, -0x85,0x9e,0xd2,0xe2,0x5b,0x69,0xd7,0xee,0xc9,0x0b,0x94,0x61,0xf8,0x8a,0xf8,0xec, -0x77,0x10,0x3c,0x16,0x32,0x54,0x79,0x79,0xa2,0xad,0xeb,0x73,0xcb,0xad,0x8d,0xf6, -0x55,0x5c,0x6d,0x74,0x7d,0xc7,0x9a,0x5a,0xf9,0x63,0x44,0xf8,0xf1,0xe2,0xbd,0x1c, -0x2a,0x4d,0x71,0x16,0xa7,0x10,0xfe,0x1b,0xa8,0xf2,0xd8,0xff,0x00,0x79,0x70,0x7f, -0x3c,0xd7,0x6f,0xa6,0x7e,0xd3,0x36,0xcc,0x48,0xd4,0x34,0x39,0xa2,0x03,0xf8,0xad, -0xa6,0x0f,0x93,0xf4,0x60,0xbf,0xce,0xbb,0xe8,0xf1,0x0e,0x06,0xaa,0xf7,0xa4,0xe2, -0xfc,0xd7,0xf9,0x5c,0xda,0x18,0xea,0x32,0xdd,0xd8,0xf6,0xfc,0xd1,0x9a,0xf3,0x1b, -0x0f,0xda,0x1f,0xc2,0xb7,0x6a,0x0c,0xdf,0x6d,0xb1,0x3e,0x93,0x41,0x9f,0xfd,0x00, -0xb5,0x5f,0x5f,0x8e,0xbe,0x0b,0x23,0xfe,0x42,0xce,0x3e,0xb6,0xb2,0xff,0x00,0xf1, -0x35,0xe9,0x47,0x33,0xc1,0x4b,0x6a,0xb1,0xfb,0xcd,0xd6,0x22,0x93,0xda,0x48,0xef, -0xe9,0x1d,0x82,0xa1,0x24,0x80,0x31,0xce,0x6b,0xcd,0xaf,0xff,0x00,0x68,0x1f,0x09, -0x5a,0xc2,0xcd,0x0c,0xd7,0x37,0xcc,0x3f,0x82,0x1b,0x76,0x52,0x7f,0xef,0xbd,0xa3, -0xf5,0xaf,0x35,0xf1,0xe7,0xc7,0xab,0xef,0x12,0x5a,0x4d,0xa7,0xe9,0x36,0xe7,0x4c, -0xb2,0x94,0x15,0x92,0x56,0x6c,0xcc,0xeb,0xe9,0xc7,0x0b,0xef,0x8c,0xfd,0x6b,0x93, -0x13,0x9d,0xe0,0xa8,0x41,0xb5,0x35,0x27,0xd9,0x6a,0x67,0x53,0x17,0x4a,0x0a,0xf7, -0xb9,0xe7,0xbe,0x28,0x96,0x0b,0x8f,0x12,0xea,0xd2,0xda,0xe3,0xec,0xcf,0x77,0x2b, -0x45,0xb7,0xa6,0xd2,0xe4,0x8c,0x7e,0x15,0x97,0x45,0x15,0xf9,0x04,0xe5,0xcf,0x37, -0x2e,0xee,0xe7,0xcb,0xb7,0x77,0x70,0xa2,0x8a,0x2a,0x04,0x75,0xff,0x00,0x08,0xf4, -0xf6,0xd4,0xbe,0x22,0xe8,0x88,0x01,0xc4,0x73,0x79,0xc4,0x8e,0xc1,0x14,0xb7,0xf4, -0xaf,0xae,0xc7,0x4a,0xf0,0x7f,0xd9,0xbf,0xc2,0xac,0x64,0xbe,0xf1,0x04,0xc9,0x85, -0xdb,0xf6,0x6b,0x72,0x47,0x5e,0xee,0x7f,0x40,0x3f,0x3a,0xf7,0x81,0xd2,0xbf,0x57, -0xe1,0xcc,0x3b,0xa3,0x82,0xe7,0x97,0xda,0x77,0xf9,0x74,0x3e,0x93,0x03,0x07,0x1a, -0x57,0x7d,0x45,0xa2,0x8a,0x2b,0xea,0x4f,0x44,0x69,0xaf,0x92,0xff,0x00,0x69,0xfb, -0xbf,0x33,0x5a,0x74,0xce,0x70,0xd5,0xf5,0xab,0x74,0xaf,0x8c,0x7f,0x68,0xdb,0xbf, -0x3b,0xc4,0xb2,0x8c,0xff,0x00,0x19,0xaf,0x99,0xcf,0xdd,0xb0,0xb6,0xee,0xd1,0xe0, -0x67,0x72,0xe5,0xc2,0x48,0xf9,0xcb,0xc7,0x32,0xec,0xd2,0x67,0x3d,0x3e,0x5a,0xfa, -0x47,0xfe,0x09,0x79,0xa6,0x88,0x7e,0x0f,0xf8,0xbb,0x50,0xc7,0xcd,0x77,0xe2,0x39, -0x57,0x38,0xec,0x90,0x42,0x07,0xea,0x4d,0x7c,0xc3,0xf1,0x1e,0x5f,0x2f,0x46,0x9c, -0xe7,0xb1,0xfe,0x55,0xf5,0xff,0x00,0xfc,0x13,0x53,0x4f,0x36,0x9f,0xb3,0x2c,0x17, -0x24,0x63,0xed,0xda,0xcd,0xf5,0xc0,0x3e,0xb8,0x93,0xcb,0xff,0x00,0xda,0x75,0x9e, -0x47,0x1b,0x53,0xb9,0xf1,0xbc,0x27,0x1b,0xe2,0xeb,0xcf,0xc9,0x1f,0x55,0x51,0x45, -0x15,0xf5,0x47,0xea,0x21,0x5f,0x13,0x7e,0xd3,0x3e,0x2f,0x3e,0x27,0xf8,0x9b,0x71, -0x68,0x8e,0x4d,0xa6,0x92,0x9f,0x64,0x41,0xdb,0x7f,0x59,0x0f,0xe7,0x81,0xff,0x00, -0x01,0xaf,0xae,0xbc,0x73,0xe2,0x68,0x7c,0x1d,0xe1,0x2d,0x57,0x59,0x9b,0x1b,0x6c, -0xe0,0x69,0x14,0x1f,0xe2,0x7c,0x61,0x57,0xf1,0x62,0x07,0xe3,0x5f,0x9f,0x28,0x2e, -0x75,0xcd,0x57,0x74,0x8c,0xd3,0x5d,0x5d,0xcc,0x59,0x98,0xf2,0x59,0xd9,0xb2,0x4f, -0xe6,0x6b,0xe4,0xb8,0x83,0x11,0xcb,0x4e,0x34,0x23,0xbb,0xd7,0xfa,0xf9,0x9f,0x1b, -0xc4,0x58,0x87,0xc9,0x0c,0x34,0x77,0x93,0xbb,0xf4,0xff,0x00,0x87,0x3e,0x96,0xfd, -0x92,0x7c,0x1f,0xe4,0xd9,0xdf,0x6b,0xf2,0xa6,0x0c,0x87,0xc9,0x88,0x91,0xdb,0xb9, -0xaf,0xa3,0xeb,0x97,0xf8,0x6f,0xe1,0xa4,0xf0,0x97,0x83,0x74,0xcd,0x39,0x54,0x2b, -0x47,0x10,0x2f,0x8e,0xec,0x7a,0xd7,0x51,0x5e,0xde,0x5d,0x87,0xfa,0xb6,0x1a,0x14, -0xfa,0xf5,0xf5,0x3e,0x8f,0x03,0x87,0x58,0x5c,0x3c,0x29,0x76,0x41,0x5f,0x0c,0x7f, -0xc1,0x5c,0xbe,0x35,0x9f,0x87,0x7f,0xb3,0xbc,0x3e,0x0f,0xb2,0x9b,0xcb,0xd5,0x3c, -0x65,0x75,0xf6,0x56,0xda,0xd8,0x65,0xb4,0x88,0xac,0x93,0x1f,0x70,0xc7,0xcb,0x42, -0x3b,0x87,0x6f,0x4a,0xfb,0x9e,0xbf,0x23,0xff,0x00,0xe0,0xb6,0x56,0x5a,0x90,0xf8, -0x89,0xf0,0xd6,0xf2,0x48,0xdc,0xe9,0x07,0x4a,0xb9,0x8a,0x17,0xc7,0xc8,0x26,0x13, -0x29,0x90,0x7d,0x76,0x98,0xff,0x00,0x2a,0xf4,0xd1,0xdc,0xcf,0x86,0xbf,0x67,0xbf, -0x04,0xe9,0xbf,0x12,0x7e,0x39,0x78,0x17,0xc3,0x3a,0xcd,0xe4,0x76,0x1a,0x56,0xa9, -0xac,0x5b,0xdb,0x5d,0x4f,0x2b,0x05,0x51,0x19,0x71,0xb8,0x64,0xf7,0x61,0xf2,0x8f, -0x72,0x2b,0xfa,0x16,0xf8,0xcd,0xf1,0x1b,0x4e,0xf8,0x1d,0xf0,0x6f,0xc5,0x1e,0x2e, -0x9e,0x38,0xe3,0xb4,0xd0,0x34,0xc9,0x27,0x86,0xd9,0x70,0x81,0xdd,0x53,0x11,0x44, -0xbd,0x86,0xe6,0xda,0xa0,0x7b,0xd7,0xf3,0x4e,0xac,0x51,0x83,0x29,0x2a,0xc0,0xe4, -0x11,0xd4,0x57,0x5f,0xaa,0xfc,0x62,0xf1,0xde,0xbb,0xe1,0x97,0xf0,0xee,0xa7,0xe3, -0x2d,0x7b,0x51,0xd0,0x5f,0x6e,0xed,0x32,0xeb,0x52,0x9a,0x5b,0x73,0xb4,0x86,0x5c, -0xc6,0xcc,0x47,0x04,0x02,0x38,0xe3,0x14,0xc8,0x4e,0xc7,0x77,0xe1,0x9f,0xda,0x7f, -0xe3,0xb6,0xb5,0xe2,0xab,0x6b,0x5d,0x23,0xe2,0x6f,0x8b,0x5b,0x55,0xd5,0x2f,0x16, -0x28,0xa1,0x4d,0x5a,0x72,0xad,0x2c,0x8f,0x85,0x01,0x4b,0x60,0x0c,0xb7,0x40,0x31, -0x5f,0xd0,0x5f,0xc3,0xcd,0x07,0x50,0xf0,0xbf,0x81,0x74,0x0d,0x27,0x55,0xd4,0xae, -0x35,0x9d,0x52,0xce,0xc6,0x18,0x6f,0x35,0x0b,0xa9,0x0c,0x92,0x5c,0xcc,0x10,0x79, -0x92,0x33,0x1e,0x4e,0x5b,0x26,0xbf,0x99,0xff,0x00,0x09,0xf8,0xaf,0x55,0xf0,0x37, -0x89,0x34,0xed,0x7f,0x43,0xbc,0x6d,0x3f,0x58,0xd3,0xa7,0x5b,0x9b,0x5b,0xa4,0x55, -0x66,0x8a,0x45,0x39,0x56,0x01,0x81,0x19,0x1e,0xe2,0xbe,0x84,0xd3,0x3f,0xe0,0xa5, -0x1f,0xb4,0x76,0x95,0xf7,0x3e,0x24,0x5c,0x4e,0x3d,0x2e,0xb4,0xfb,0x49,0x7f,0xf4, -0x28,0x8d,0x0c,0x69,0x9f,0xbf,0xd4,0x57,0xe1,0x66,0x99,0xff,0x00,0x05,0x62,0xfd, -0xa1,0xec,0x17,0x12,0xeb,0xda,0x46,0xa1,0xef,0x73,0xa4,0x42,0x3f,0xf4,0x00,0xb5, -0xbf,0x63,0xff,0x00,0x05,0x87,0xf8,0xed,0x6b,0x81,0x35,0x9f,0x84,0xaf,0x3f,0xeb, -0xae,0x99,0x2a,0x9f,0xfc,0x76,0x61,0x4a,0xc5,0x5d,0x1f,0xb6,0x94,0x57,0x86,0xfe, -0xc6,0x7f,0x16,0x3c,0x69,0xf1,0xc7,0xe0,0x3e,0x8b,0xe3,0x8f,0x1c,0x58,0xe9,0xba, -0x6e,0xa3,0xac,0x49,0x2c,0xd6,0xb6,0xfa,0x64,0x4f,0x1c,0x7f,0x66,0x0d,0xb5,0x18, -0x87,0x76,0x39,0x62,0xac,0x7a,0xe3,0x05,0x7f,0x1f,0x4a,0xf8,0xa1,0xe3,0xfd,0x3f, -0xe1,0x67,0xc3,0xbf,0x12,0x78,0xbf,0x54,0x60,0x2c,0x34,0x4b,0x09,0xaf,0xa5,0x05, -0xb1,0xbf,0x62,0x92,0x14,0x7b,0xb1,0xc2,0x8f,0x72,0x29,0x0c,0xea,0x28,0xaf,0xcb, -0xad,0x3b,0xfe,0x0b,0x77,0x64,0x42,0x8b,0xef,0x84,0xd3,0xab,0x77,0xfb,0x3e,0xb8, -0x0f,0xf3,0x80,0x57,0x61,0xa5,0x7f,0xc1,0x6a,0xfe,0x1b,0xcb,0x1e,0x75,0x2f,0x00, -0x78,0xa6,0xd2,0x4f,0xee,0xda,0xbd,0xb4,0xe3,0xf3,0x69,0x13,0xf9,0x53,0xb0,0xae, -0x8f,0xd1,0x5a,0x2b,0xe0,0x5b,0x4f,0xf8,0x2c,0xef,0xc1,0x89,0xb1,0xe7,0x78,0x6b, -0xc6,0xb6,0xe7,0xd3,0xec,0x56,0xad,0xfc,0xae,0x2b,0xab,0xd1,0xbf,0xe0,0xad,0xdf, -0xb3,0xe6,0xa6,0xa0,0xdd,0x6a,0x9a,0xee,0x90,0x7d,0x2f,0x34,0x89,0x1b,0x1f,0xf7, -0xe8,0xbd,0x01,0x74,0x7d,0x9f,0x45,0x7c,0xa7,0x69,0xff,0x00,0x05,0x44,0xfd,0x9b, -0x6e,0x80,0x27,0xe2,0x04,0x90,0x67,0xfe,0x7a,0xe8,0xb7,0xe3,0xf9,0x42,0x6b,0xa6, -0xd2,0xff,0x00,0xe0,0xa0,0xbf,0xb3,0xce,0xae,0x14,0xc3,0xf1,0x4f,0x46,0x8b,0x77, -0x41,0x74,0xb3,0x40,0x7f,0xf1,0xf4,0x14,0x87,0x73,0xe8,0x6a,0x2b,0xc9,0xf4,0xff, -0x00,0xda,0xcb,0xe0,0xb6,0xa8,0xa1,0xad,0xfe,0x2b,0xf8,0x35,0x81,0xec,0xfa,0xe5, -0xba,0x1f,0xc9,0x9c,0x56,0xfd,0x97,0xc7,0x5f,0x86,0xda,0x96,0x3e,0xc9,0xf1,0x07, -0xc2,0xd7,0x39,0xe9,0xe5,0x6b,0x56,0xcd,0x9f,0xc9,0xe8,0x03,0xb4,0x9a,0x08,0xe7, -0x52,0x92,0x22,0xc8,0x87,0xaa,0xb0,0xc8,0x3f,0x85,0x50,0x9f,0xc3,0x3a,0x3d,0xcf, -0xfa,0xed,0x2e,0xce,0x5f,0xf7,0xed,0xd0,0xff,0x00,0x4a,0x76,0x9f,0xe2,0x4d,0x27, -0x56,0x8c,0x49,0x63,0xa9,0xd9,0x5e,0xc6,0x79,0x0d,0x6f,0x70,0x92,0x03,0xf9,0x13, -0x5a,0x0a,0xe1,0x86,0x41,0x04,0x7a,0x83,0x51,0x28,0x46,0x5f,0x12,0xb8,0x9a,0x4f, -0x74,0x73,0xf3,0x7c,0x3c,0xf0,0xc5,0xc7,0x32,0x78,0x7f,0x4e,0x3f,0xf6,0xea,0x83, -0xfa,0x55,0x49,0x7e,0x15,0x78,0x46,0x51,0xce,0x81,0x66,0xbf,0xee,0x47,0xb7,0xf9, -0x57,0x59,0x9a,0x5a,0xc2,0x58,0x5a,0x12,0xde,0x0b,0xee,0x44,0x3a,0x70,0x7b,0xc5, -0x1c,0x8e,0x9d,0xf0,0xaf,0xc2,0xfa,0x4e,0xa5,0x6f,0x7f,0x65,0xa5,0xad,0xbd,0xd4, -0x0d,0xba,0x37,0x49,0x5f,0x83,0xd3,0xa6,0x71,0x5d,0x68,0xeb,0x4b,0x45,0x69,0x4e, -0x8d,0x3a,0x2a,0xd4,0xe2,0x92,0xf2,0x2a,0x31,0x8c,0x34,0x8a,0xb0,0x51,0x45,0x15, -0xb1,0x42,0x1a,0xe2,0x7e,0x28,0x7c,0x3c,0x9b,0xe2,0x1d,0x85,0x9d,0xaa,0x6a,0x22, -0xc2,0x3b,0x79,0x0c,0xa5,0x4c,0x3e,0x66,0xf6,0xc6,0x07,0xf1,0x0c,0x63,0x27,0xd7, -0xad,0x76,0xf4,0x56,0x15,0xe8,0x43,0x13,0x4d,0xd2,0xa8,0xaf,0x17,0xb9,0x13,0x82, -0xa9,0x17,0x19,0x6c,0x7c,0xf5,0x37,0xec,0xcd,0xaa,0x2e,0x7c,0x9d,0x66,0xd1,0xff, -0x00,0xdf,0x8d,0x97,0xfc,0x6a,0x93,0xfe,0xcd,0xbe,0x23,0x19,0xd9,0x7d,0xa6,0xb7, -0xd6,0x49,0x07,0xfe,0xc9,0x5f,0x49,0x51,0x5e,0x0b,0xe1,0xdc,0xbd,0xfd,0x97,0xf7, -0xb3,0x8d,0xe0,0x68,0xbe,0x9f,0x89,0xf3,0x1c,0xff,0x00,0xb3,0xbf,0x8a,0xa2,0x52, -0x55,0xf4,0xf9,0x88,0xfe,0x14,0x9c,0x8f,0xe6,0xa2,0xbb,0x0f,0x83,0x7f,0x0a,0xb5, -0x8f,0x0a,0x78,0x9a,0x7d,0x4b,0x57,0x82,0x38,0x55,0x20,0x31,0xc3,0xb6,0x45,0x7d, -0xcc,0xc4,0x64,0xf0,0x78,0xc0,0x18,0xfc,0x6b,0xdb,0x28,0xaa,0xa1,0x90,0xe1,0x30, -0xd5,0x63,0x5a,0x17,0xbc,0x7c,0xc2,0x18,0x2a,0x54,0xe4,0xa4,0xaf,0xa0,0x51,0x45, -0x15,0xf4,0x67,0x78,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x87,0x9a,0xf2,0xef, -0x88,0x7f,0x03,0xac,0x3c,0x55,0x24,0x97,0xda,0x63,0xa6,0x9b,0xa9,0xb6,0x59,0xb8, -0xfd,0xd4,0xc7,0xd5,0x80,0xe8,0x7d,0xc7,0xe4,0x6b,0xd4,0xa8,0xae,0x4c,0x4e,0x16, -0x8e,0x2e,0x1e,0xce,0xb4,0x6e,0x8c,0xea,0x53,0x8d,0x55,0xcb,0x35,0x73,0xe3,0x1f, -0x13,0x78,0x1f,0x5b,0xf0,0x84,0xc5,0x35,0x4b,0x09,0x20,0x8f,0x38,0x13,0xaf,0xcd, -0x13,0x7d,0x18,0x71,0xf8,0x75,0xf6,0xac,0x2a,0xfb,0x9e,0x68,0x52,0x78,0xca,0x48, -0xaa,0xe8,0x78,0x2a,0xc3,0x20,0xd7,0x15,0xae,0x7c,0x18,0xf0,0x9e,0xb8,0x59,0xdf, -0x4d,0x5b,0x49,0x4f,0xfc,0xb4,0xb3,0x6f,0x2b,0xf4,0x1f,0x2f,0xe9,0x5f,0x0f,0x8a, -0xe1,0x79,0x5e,0xf8,0x69,0xfc,0x9f,0xf9,0xa3,0xc7,0xa9,0x97,0x3d,0xe9,0xbf,0xbc, -0xf9,0x36,0x8a,0xf7,0xed,0x43,0xf6,0x65,0xb2,0x91,0x89,0xb0,0xd6,0xe7,0x85,0x7b, -0x2d,0xc4,0x2b,0x27,0xea,0x0a,0xd6,0x0d,0xcf,0xec,0xd5,0xad,0x23,0x91,0x06,0xa9, -0x63,0x2a,0xf6,0x32,0x07,0x43,0xfa,0x03,0x5e,0x0c,0xf2,0x2c,0xc2,0x0f,0xf8,0x77, -0xf4,0x68,0xe3,0x78,0x3a,0xeb,0xec,0x9e,0x3f,0x45,0x7a,0xb1,0xfd,0x9b,0xfc,0x4b, -0xda,0xf7,0x4b,0x3f,0xf6,0xd6,0x4f,0xfe,0x22,0x9e,0x9f,0xb3,0x6f,0x88,0xc9,0xf9, -0xef,0xb4,0xd5,0x1e,0xd2,0x48,0x7f,0xf6,0x4a,0xc1,0x64,0xf8,0xf7,0xff,0x00,0x2e, -0x99,0x1f,0x55,0xad,0xfc,0xac,0xf2,0x6a,0x2b,0xdb,0x74,0xff,0x00,0xd9,0x9a,0xe9, -0xb9,0xbd,0xd7,0x22,0x8f,0xd5,0x60,0xb7,0x2f,0xfa,0x92,0x3f,0x95,0x75,0x9a,0x3f, -0xec,0xf3,0xe1,0x9b,0x0c,0x35,0xdb,0x5d,0x6a,0x4c,0x3b,0x4b,0x26,0xc4,0xfc,0x97, -0x07,0xf5,0xae,0xda,0x5c,0x3d,0x8f,0xa8,0xf5,0x8a,0x8f,0xab,0xff,0x00,0x2b,0x9a, -0xc7,0x03,0x5a,0x5b,0xab,0x1f,0x36,0x59,0xd9,0x5c,0x6a,0x17,0x09,0x05,0xac,0x12, -0xdc,0xcc,0xe7,0x0b,0x1c,0x28,0x59,0x8f,0xd0,0x0a,0xf5,0x5f,0x05,0xfe,0xcf,0x9a, -0x9e,0xaa,0xd1,0xdc,0xeb,0xb2,0x7f,0x66,0x5a,0x13,0x9f,0x21,0x08,0x69,0xd8,0x7e, -0xa1,0x7f,0x1c,0x9f,0x6a,0xf7,0xdd,0x1f,0xc3,0xba,0x6f,0x87,0xe1,0x31,0x69,0xd6, -0x36,0xf6,0x51,0x9e,0xa2,0x18,0xc2,0xe7,0xeb,0xeb,0x5a,0x75,0xf4,0xd8,0x3e,0x19, -0xa3,0x49,0xa9,0xe2,0x25,0xcc,0xfb,0x6c,0xbf,0xcd,0x9e,0x85,0x2c,0xbe,0x31,0xd6, -0xa3,0xb9,0x93,0xe1,0xdf,0x0c,0xe9,0xbe,0x15,0xd3,0xd6,0xcf,0x4c,0xb5,0x4b,0x58, -0x47,0x5d,0xbf,0x79,0xcf,0xab,0x1e,0xa4,0xfd,0x6b,0x54,0x74,0xa5,0xa2,0xbe,0xca, -0x10,0x8d,0x38,0xa8,0xc1,0x59,0x23,0xd5,0x49,0x45,0x59,0x05,0x35,0xba,0x73,0x4e, -0xa8,0x2f,0x56,0x66,0xb5,0x98,0x40,0x50,0x4f,0xb0,0xf9,0x65,0xfe,0xee,0xec,0x71, -0x9f,0x6c,0xd5,0x3d,0x15,0xc6,0x7c,0x99,0xf1,0x6f,0x5d,0xfe,0xdf,0xf1,0xfe,0xab, -0x32,0xb6,0xe8,0xa1,0x93,0xec,0xd1,0xf3,0x9e,0x13,0x83,0x8f,0xab,0x6e,0x3f,0x8d, -0x71,0xd5,0xdd,0x6b,0xff,0x00,0x06,0x7c,0x5b,0xa3,0xb4,0x92,0x35,0x81,0xd4,0x50, -0x1c,0x99,0xac,0xdb,0xcc,0x2d,0xef,0xb7,0xef,0x7e,0x95,0xc5,0xde,0xd9,0x5c,0x69, -0xb3,0x18,0x6e,0xed,0xe5,0xb5,0x98,0x75,0x8e,0x64,0x28,0xdf,0x91,0xe6,0xbf,0x11, -0xc6,0xd2,0xc4,0x2a,0xd3,0xa9,0x5e,0x0d,0x36,0xdb,0xd5,0x1f,0x23,0x5a,0x33,0xe7, -0x72,0x92,0xdc,0x86,0x8a,0x28,0xaf,0x38,0xc0,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a, -0x00,0x28,0xa2,0xae,0xe9,0x5a,0x26,0xa1,0xae,0xcf,0xe4,0xe9,0xd6,0x53,0xde,0xcb, -0xdd,0x60,0x42,0xd8,0xf7,0x38,0xe9,0xf8,0xd5,0x46,0x32,0x9b,0xe5,0x8a,0xbb,0x1a, -0x4d,0xe8,0x8a,0x55,0xd4,0x78,0x03,0xc0,0x17,0xfe,0x3d,0xd5,0xd6,0xde,0xdd,0x5a, -0x2b,0x38,0xc8,0x37,0x17,0x44,0x7c,0xb1,0xaf,0xa0,0xf5,0x63,0xd8,0x7f,0x4a,0xef, -0xbc,0x1b,0xfb,0x3b,0xde,0xdd,0xba,0x5c,0x78,0x86,0x71,0x67,0x00,0xe4,0xda,0x40, -0xc1,0xa4,0x6f,0x62,0xc3,0x81,0xf8,0x67,0xf0,0xaf,0x76,0xd1,0x74,0x5b,0x1f,0x0f, -0xd8,0x47,0x65,0xa7,0xdb,0x25,0xad,0xb4,0x63,0xe5,0x44,0x1f,0xa9,0xf5,0x3e,0xe6, -0xbe,0xc3,0x2c,0xe1,0xfa,0xb5,0xa4,0xaa,0x62,0x97,0x2c,0x7b,0x75,0x7f,0xe4,0x7a, -0x98,0x7c,0x14,0xa4,0xd4,0xaa,0x68,0x83,0x45,0xd1,0xad,0x74,0x0d,0x32,0xdb,0x4f, -0xb2,0x8c,0x45,0x6d,0x02,0x04,0x45,0xf6,0xf5,0x3e,0xa4,0xfa,0xd5,0xe1,0x4b,0x45, -0x7e,0x99,0x18,0xa8,0x25,0x18,0xec,0x8f,0x7d,0x24,0x95,0x90,0x51,0x45,0x15,0x43, -0x1b,0x21,0xdb,0x1b,0x1f,0x40,0x4d,0x7c,0x35,0xf1,0xd6,0xeb,0xcf,0xf1,0x4c,0xbc, -0xe7,0xe6,0x26,0xbe,0xe0,0xbe,0x7f,0x2e,0xce,0x76,0x3d,0x90,0x9f,0xd2,0xbe,0x0b, -0xf8,0xbb,0x38,0x9f,0xc5,0x13,0xfd,0x4f,0xf3,0xaf,0x91,0xe2,0x19,0x5a,0x9d,0x38, -0xf7,0x67,0xcb,0x71,0x0c,0xad,0x86,0xb1,0xe0,0x5f,0x15,0xe7,0xf2,0xb4,0x59,0xb9, -0xec,0x7f,0x95,0x7d,0xeb,0xfb,0x03,0x69,0xbf,0xd9,0xdf,0xb2,0x7f,0x81,0x7d,0x6e, -0x23,0xb8,0xb9,0x38,0xff,0x00,0x6e,0xe2,0x53,0x5f,0x9f,0x7f,0x19,0x26,0x11,0xe8, -0x92,0xf3,0x8f,0x94,0xff,0x00,0x2a,0xfd,0x29,0xfd,0x90,0xec,0x06,0x9b,0xfb,0x31, -0x7c,0x33,0x84,0x2e,0xdc,0xe8,0x76,0xd2,0x90,0x7d,0x5d,0x77,0x9f,0xd5,0xab,0xb3, -0x26,0x56,0xa2,0x78,0x1c,0x1f,0x1b,0xfb,0x79,0xf9,0xa3,0xd7,0xa8,0xa2,0x8a,0xfa, -0x23,0xf4,0x83,0xe7,0x5f,0xda,0xf7,0xc6,0x0d,0x69,0xa2,0xe9,0x5e,0x1c,0x81,0xf0, -0x6f,0x64,0x37,0x37,0x00,0x7f,0x71,0x3e,0xe8,0x3f,0x56,0x39,0xff,0x00,0x80,0xd7, -0x94,0x7e,0xcf,0x3e,0x12,0xff,0x00,0x84,0xa3,0xe2,0x15,0xa3,0x3a,0x6e,0xb7,0xb3, -0xfd,0xfb,0xfa,0x71,0xd2,0xb2,0x7e,0x36,0xf8,0xb1,0xbc,0x65,0xf1,0x33,0x5a,0xbb, -0x0f,0xbe,0xda,0xde,0x53,0x67,0x6f,0xce,0x40,0x48,0xf2,0x38,0xfa,0xb6,0xe3,0xf8, -0xd7,0xd0,0x7f,0xb2,0xb7,0x84,0x46,0x93,0xe1,0x29,0xf5,0x79,0x53,0x13,0xde,0xbe, -0x14,0x91,0xfc,0x03,0xff,0x00,0xaf,0x5f,0x01,0xff,0x00,0x23,0x1c,0xd3,0xfb,0xa9, -0xfe,0x0b,0xfc,0xd9,0xf9,0xfd,0x2f,0xf8,0x52,0xcd,0x5c,0xf7,0x8c,0x7f,0x25,0xff, -0x00,0x04,0xf7,0x30,0x30,0x00,0xe9,0x4b,0x48,0x29,0x6b,0xef,0xcf,0xd0,0x02,0xbc, -0xff,0x00,0xe3,0x67,0xc0,0x9f,0x05,0xfe,0xd0,0x9e,0x0c,0x97,0xc3,0x1e,0x37,0xd1, -0xe3,0xd5,0xb4,0xd2,0xe2,0x58,0x9b,0x71,0x49,0xad,0xe5,0x00,0x81,0x24,0x4e,0x39, -0x46,0xc1,0x23,0x8e,0xa0,0x90,0x72,0x09,0x15,0xe8,0x14,0x50,0x07,0xe6,0x47,0x8d, -0x3f,0xe0,0x89,0xda,0x1d,0xc5,0xc3,0x4b,0xe1,0x5f,0x89,0xb7,0xfa,0x7c,0x1c,0x9f, -0x23,0x57,0xd3,0x92,0xe5,0x87,0xfd,0xb4,0x47,0x8f,0xff,0x00,0x41,0xaf,0xcb,0x8f, -0x1b,0x68,0x56,0x5e,0x17,0xf1,0x86,0xb5,0xa3,0xe9,0xda,0xb4,0x7a,0xf5,0x8e,0x9f, -0x79,0x2d,0xac,0x3a,0x9c,0x31,0x98,0xe3,0xba,0x54,0x72,0xa2,0x55,0x52,0x49,0x0a, -0xd8,0xc8,0xe7,0xa1,0xaf,0xe9,0x9b,0xc6,0x1a,0x1d,0xc7,0x89,0x7c,0x2b,0xac,0x69, -0x16,0x9a,0x94,0xba,0x35,0xcd,0xfd,0x9c,0xb6,0xb1,0xea,0x10,0x20,0x69,0x2d,0x99, -0xd0,0xa8,0x91,0x01,0xe0,0xb2,0xe7,0x23,0x3c,0x64,0x0a,0xfc,0xdd,0xd4,0x3f,0xe0, -0x89,0x1a,0x41,0x95,0x5a,0xc7,0xe2,0x9d,0xea,0xc6,0x18,0x12,0x97,0x3a,0x42,0x31, -0x23,0xb8,0xca,0xca,0x3f,0x95,0x3b,0x92,0xd1,0xf2,0x97,0xc2,0x7f,0xf8,0x26,0x5f, -0xc6,0x3f,0x8c,0xbf,0x0d,0x34,0x4f,0x1b,0xe8,0x03,0x41,0x87,0x4b,0xd5,0xe2,0x69, -0xad,0xed,0xf5,0x0b,0xd7,0x86,0xe3,0x60,0x76,0x50,0xc5,0x7c,0xb2,0x30,0xdb,0x77, -0x0e,0x79,0x04,0x1a,0xd3,0xbc,0xff,0x00,0x82,0x4e,0x7e,0xd1,0x16,0xa4,0x88,0xf4, -0x0d,0x1e,0xe8,0x0e,0xf0,0xeb,0x30,0x8c,0xff,0x00,0xdf,0x44,0x57,0xed,0xff,0x00, -0x85,0x7c,0x35,0x63,0xe0,0xdf,0x0c,0xe9,0x3a,0x06,0x99,0x17,0x91,0xa6,0xe9,0x76, -0x91,0x59,0x5a,0xc5,0x9c,0xec,0x8a,0x34,0x08,0x83,0xf2,0x51,0x5a,0xb4,0x5c,0x2c, -0x8f,0xc0,0x4d,0x47,0xfe,0x09,0xa7,0xfb,0x47,0x69,0xcc,0xc0,0xfc,0x38,0x9a,0xe5, -0x57,0xf8,0xad,0xb5,0x1b,0x47,0x07,0xe9,0xfb,0xdc,0x9a,0xc6,0xd1,0xbf,0x60,0x7f, -0x8e,0xf7,0xde,0x25,0xd3,0x34,0xbb,0xcf,0x86,0x7e,0x20,0xb0,0x86,0xea,0xee,0x2b, -0x79,0x6f,0x5e,0xd7,0x74,0x50,0x2b,0x38,0x53,0x23,0x32,0x92,0x02,0xa8,0x39,0x27, -0x3d,0x05,0x7f,0x42,0x78,0xa0,0x80,0x7b,0x51,0x70,0xe5,0x46,0x2f,0x82,0xfc,0x29, -0x63,0xe0,0x5f,0x07,0x68,0x9e,0x1c,0xd3,0x23,0x58,0xb4,0xfd,0x26,0xce,0x1b,0x28, -0x11,0x46,0x00,0x48,0xd0,0x28,0xfd,0x05,0x7c,0x4f,0xff,0x00,0x05,0x7d,0xf8,0xb1, -0x73,0xe1,0x4f,0x80,0x9a,0x6f,0x82,0x34,0xd5,0xb8,0x6b,0xef,0x15,0xde,0xff,0x00, -0xa4,0x98,0x63,0x2c,0xa2,0xce,0xdf,0x6b,0xb8,0x62,0x3a,0x66,0x46,0x84,0x0f,0x50, -0x1b,0xd2,0xbe,0xf3,0xa6,0xb2,0x2b,0x75,0x00,0xfd,0x45,0x22,0x8f,0xe5,0xad,0xa3, -0x64,0x24,0x32,0xb2,0xe3,0xfb,0xc3,0x14,0xd1,0xcf,0x4e,0x6b,0xfa,0x8b,0xbc,0xd1, -0x74,0xfd,0x42,0x33,0x1d,0xd5,0x85,0xb5,0xca,0x1e,0xab,0x34,0x2a,0xe0,0xfe,0x04, -0x57,0x2d,0xab,0xfc,0x11,0xf8,0x77,0xaf,0xa9,0x5d,0x4b,0xc0,0x7e,0x19,0xbf,0x53, -0xd4,0x5c,0xe9,0x16,0xf2,0x67,0xf3,0x4a,0x77,0x23,0x94,0xfe,0x67,0x71,0x9a,0x2b, -0xfa,0x3a,0xba,0xfd,0x90,0x3e,0x07,0x5e,0xe7,0xcd,0xf8,0x43,0xe0,0x9c,0x9e,0xa5, -0x34,0x1b,0x64,0x3f,0x98,0x41,0x5c,0xbe,0xad,0xff,0x00,0x04,0xfb,0xfd,0x9e,0xb5, -0x9c,0xf9,0xdf,0x0b,0x74,0x58,0x73,0xff,0x00,0x3e,0x7e,0x6d,0xbf,0xfe,0x8b,0x75, -0xc5,0x3b,0x87,0x29,0xfc,0xf6,0xd1,0x5f,0xbd,0x17,0x5f,0xf0,0x4b,0x8f,0xd9,0xb2, -0xe9,0xcb,0x0f,0x01,0xcd,0x01,0x3f,0xf3,0xcb,0x5b,0xbe,0x03,0xf2,0xf3,0xab,0x9f, -0xd5,0x3f,0xe0,0x92,0x1f,0xb3,0xed,0xfe,0xef,0xb3,0xe9,0xba,0xf6,0x9b,0x9e,0x9f, -0x66,0xd5,0xdd,0xb1,0xff,0x00,0x7f,0x03,0x51,0x70,0xe5,0x3f,0x0d,0xe8,0xaf,0xd9, -0xab,0xef,0xf8,0x23,0x0f,0xc1,0xdb,0x87,0x63,0x6d,0xe2,0x8f,0x19,0x5a,0x03,0xd1, -0x7e,0xd5,0x6c,0xe0,0x7e,0x70,0x56,0x05,0xff,0x00,0xfc,0x11,0x43,0xc0,0x32,0x03, -0xf6,0x2f,0x88,0x9e,0x24,0xb7,0x3d,0xbe,0xd1,0x6f,0x6f,0x2e,0x3f,0x25,0x5a,0x2e, -0x1c,0xac,0xfc,0x89,0x8a,0xee,0x68,0x71,0xe5,0xcd,0x24,0x78,0xfe,0xeb,0x11,0x5a, -0xf6,0x3e,0x3b,0xf1,0x2e,0x98,0x41,0xb3,0xf1,0x0e,0xab,0x69,0x8e,0x9e,0x45,0xec, -0xa9,0xfc,0x9a,0xbf,0x4c,0x35,0x5f,0xf8,0x22,0x28,0x24,0xff,0x00,0x66,0x7c,0x59, -0xd8,0x3b,0x0b,0xbd,0x13,0x71,0xff,0x00,0xc7,0x67,0x15,0xcd,0xde,0xff,0x00,0xc1, -0x12,0xbc,0x5d,0x19,0x3f,0x64,0xf8,0x9d,0xa2,0x4e,0x3b,0x79,0xda,0x6c,0xd1,0xff, -0x00,0x27,0x6a,0x05,0x66,0x7c,0x2f,0xa6,0xfe,0xd0,0x9f,0x14,0x34,0x62,0x0d,0x8f, -0xc4,0x5f,0x15,0x5a,0xe3,0xa7,0x95,0xac,0xdc,0x2f,0xfe,0xcf,0x5d,0x56,0x9f,0xfb, -0x6a,0xfc,0x77,0xd2,0xc0,0x16,0xff,0x00,0x15,0xfc,0x53,0x81,0xda,0x5d,0x45,0xe4, -0xff,0x00,0xd0,0xb3,0x5f,0x4c,0x6a,0xdf,0xf0,0x46,0x1f,0x8b,0x96,0xc7,0xfe,0x25, -0xfe,0x2c,0xf0,0x85,0xf0,0xff,0x00,0xa6,0xb3,0x5c,0xc2,0x7f,0xf4,0x4b,0x57,0x29, -0x7d,0xff,0x00,0x04,0x87,0xf8,0xfd,0x68,0x48,0x8a,0x1f,0x0d,0x5e,0x81,0xde,0x1d, -0x57,0x19,0xff,0x00,0xbe,0xd1,0x68,0x1d,0x99,0xe6,0x56,0x1f,0xf0,0x50,0xcf,0xda, -0x23,0x4f,0x60,0x53,0xe2,0x86,0xab,0x28,0x1d,0xae,0x22,0x82,0x5f,0xfd,0x0a,0x33, -0x5d,0x4e,0x9b,0xff,0x00,0x05,0x4c,0xfd,0xa3,0x34,0xec,0x67,0xc6,0x36,0x97,0x80, -0x76,0xb9,0xd2,0x2d,0x9b,0x3f,0x92,0x03,0x4b,0xa9,0xff,0x00,0xc1,0x2c,0x7f,0x68, -0xdd,0x3c,0x9d,0x9e,0x0d,0xb4,0xbd,0x03,0xbd,0xb6,0xb1,0x68,0x73,0xf8,0x34,0x8a, -0x6b,0x8d,0xbf,0xff,0x00,0x82,0x7f,0xfe,0xd0,0xba,0x73,0xb2,0xc9,0xf0,0xb3,0x5a, -0x93,0x6f,0x7b,0x7f,0x2a,0x50,0x7e,0x9b,0x5c,0xe6,0x8d,0x03,0x53,0xd5,0xac,0x7f, -0xe0,0xaf,0x7f,0x1f,0x6d,0x14,0x09,0x64,0xf0,0xcd,0xe7,0xfb,0x53,0x69,0x44,0x1f, -0xfc,0x72,0x45,0xae,0x9f,0x4b,0xff,0x00,0x82,0xce,0xfc,0x5e,0xb4,0x50,0x2f,0x7c, -0x2f,0xe1,0x1b,0xff,0x00,0x53,0xf6,0x7b,0x88,0xcf,0xe9,0x35,0x7c,0xc5,0x7b,0xfb, -0x1b,0xfc,0x73,0xd3,0xf7,0x79,0xff,0x00,0x09,0xbc,0x5c,0x02,0x8c,0x92,0x9a,0x4c, -0xce,0x07,0xe2,0xaa,0x6b,0x90,0xd4,0x7e,0x0a,0xfc,0x42,0xd1,0xd9,0x96,0xfb,0xc0, -0x9e,0x25,0xb4,0x2b,0xf7,0xbc,0xed,0x22,0xe1,0x71,0xf9,0xa5,0x1a,0x05,0xd9,0xf7, -0xa6,0x9f,0xff,0x00,0x05,0xb3,0xf1,0x7c,0x48,0x3e,0xdd,0xf0,0xcb,0x44,0xb8,0x7f, -0x5b,0x7d,0x46,0x68,0x87,0xe4,0x55,0xab,0x7f,0x4f,0xff,0x00,0x82,0xdd,0xce,0x31, -0xf6,0xef,0x84,0x91,0xb7,0xa9,0xb7,0xd7,0x88,0xfd,0x0c,0x06,0xbf,0x32,0xee,0x7c, -0x31,0xac,0x59,0x92,0x27,0xd2,0xaf,0x61,0x23,0xaf,0x99,0x6c,0xeb,0x8f,0xcc,0x56, -0x73,0xa1,0x8d,0xb6,0xb0,0x2a,0xde,0x87,0x8a,0x34,0x0b,0xb3,0xf5,0xc7,0x4a,0xff, -0x00,0x82,0xd8,0xf8,0x36,0x54,0xce,0xa5,0xf0,0xd7,0x5d,0xb6,0x6e,0xe2,0xd2,0xfa, -0x19,0x87,0xfe,0x3c,0x12,0xba,0x0b,0x2f,0xf8,0x2d,0x17,0xc2,0x59,0x71,0xf6,0x9f, -0x06,0xf8,0xc6,0xdc,0xfa,0xa4,0x36,0xae,0x3f,0xf4,0x78,0xaf,0xc6,0xdc,0xe7,0xbd, -0x18,0x34,0x58,0x2e,0xcf,0xdb,0xbd,0x37,0xfe,0x0a,0xfd,0xf0,0x16,0xf5,0x03,0x5c, -0x7f,0xc2,0x4d,0x60,0x4f,0x69,0xb4,0xb0,0xf8,0xff,0x00,0xbe,0x24,0x6a,0xe9,0xec, -0xbf,0xe0,0xaa,0x5f,0xb3,0x75,0xdc,0x41,0xe4,0xf1,0xb5,0xdd,0xa3,0x1f,0xe0,0x9b, -0x44,0xbd,0x24,0x7e,0x2b,0x11,0x1f,0xad,0x7e,0x0e,0xe2,0x8a,0x2c,0x1c,0xc7,0xf4, -0x01,0x63,0xff,0x00,0x05,0x23,0xfd,0x9c,0x6f,0xc0,0xd9,0xf1,0x32,0xce,0x2c,0xf6, -0x9e,0xc6,0xee,0x3f,0xfd,0x0a,0x21,0x5d,0x6e,0x99,0xfb,0x6a,0xfc,0x06,0xd5,0xe3, -0x0f,0x07,0xc5,0xcf,0x08,0xc6,0x0f,0x6b,0xad,0x56,0x2b,0x73,0xf9,0x48,0x54,0xd7, -0xf3,0xa5,0x9a,0x29,0x58,0x39,0x8f,0xe9,0x32,0xcf,0xf6,0x9c,0xf8,0x3f,0xa8,0x15, -0x16,0xdf,0x15,0x3c,0x17,0x39,0x6e,0x82,0x3f,0x10,0x5a,0x1c,0xff,0x00,0xe4,0x4a, -0xeb,0xb4,0xdf,0x1f,0x78,0x63,0x59,0x50,0xd6,0x1e,0x22,0xd2,0x6f,0x94,0xf2,0x0d, -0xb5,0xf4,0x52,0x03,0xf9,0x31,0xaf,0xe6,0x16,0x9c,0xb2,0x32,0x10,0x55,0x8a,0x91, -0xdc,0x1a,0x2c,0x1c,0xc7,0xf5,0x25,0x14,0xf1,0xcc,0x9b,0xe3,0x75,0x75,0xf5,0x52, -0x08,0xa7,0xe6,0xbf,0x97,0x8b,0x7f,0x10,0xea,0xb6,0x98,0xf2,0x35,0x3b,0xc8,0x71, -0xd3,0xcb,0xb8,0x75,0xc7,0xe4,0x6b,0x7b,0x4f,0xf8,0xc3,0xe3,0xcd,0x2b,0x1f,0x62, -0xf1,0xb7,0x88,0xad,0x31,0xd3,0xc9,0xd5,0x67,0x4c,0x7e,0x4f,0x45,0x87,0xcc,0x7f, -0x4d,0x39,0xa5,0xaf,0xe7,0x07,0x4e,0xfd,0xae,0x3e,0x35,0xe9,0x48,0xa9,0x69,0xf1, -0x5b,0xc5,0xf0,0xa2,0xf0,0x17,0xfb,0x66,0x72,0x3f,0x22,0xd5,0xd1,0xe9,0xff,0x00, -0xb7,0xbf,0xed,0x07,0xa6,0xe3,0xca,0xf8,0xab,0xaf,0xc9,0x8e,0xd7,0x12,0x24,0xdf, -0xfa,0x1a,0x9a,0x2c,0x1c,0xc8,0xfe,0x86,0xe8,0xaf,0xc0,0xed,0x33,0xfe,0x0a,0x75, -0xfb,0x46,0xe9,0x7d,0x3c,0x7c,0x2e,0x87,0xa5,0xd6,0x99,0x69,0x27,0xf3,0x8f,0x35, -0xd2,0xd9,0x7f,0xc1,0x5b,0x3f,0x68,0x4b,0x5c,0x79,0xba,0xae,0x85,0x79,0xff,0x00, -0x5d,0xb4,0x88,0xc6,0x7f,0xef,0x82,0xb4,0x58,0x77,0x47,0xee,0x65,0x15,0xf8,0xa9, -0xa6,0xff,0x00,0xc1,0x63,0xbe,0x37,0x5a,0x11,0xf6,0xad,0x2f,0xc2,0x77,0xc3,0xbe, -0xeb,0x09,0x90,0xff,0x00,0xe3,0xb3,0x0a,0xea,0xf4,0xff,0x00,0xf8,0x2d,0x67,0xc4, -0x28,0x71,0xf6,0xdf,0x87,0xfe,0x1b,0xb9,0xff,0x00,0xae,0x33,0xdc,0x45,0xfc,0xd9, -0xa8,0xb0,0x5d,0x1f,0xb0,0x14,0x57,0xe4,0xf5,0x8f,0xfc,0x16,0xe7,0x5b,0x56,0x1f, -0x6c,0xf8,0x51,0x60,0xeb,0xdc,0xc1,0xad,0x3a,0x9f,0xd6,0x13,0x5d,0x66,0x99,0xff, -0x00,0x05,0xb7,0xd0,0x5d,0x07,0xf6,0x8f,0xc2,0xdd,0x4a,0x27,0xef,0xf6,0x5d,0x56, -0x37,0x1f,0xf8,0xf4,0x62,0x8b,0x05,0xd1,0xfa,0x6b,0x45,0x7e,0x77,0xd8,0xff,0x00, -0xc1,0x6a,0x7e,0x18,0xc8,0x83,0xed,0x7e,0x06,0xf1,0x6c,0x12,0x1e,0xa2,0x1f,0xb2, -0xc8,0x07,0xe2,0x65,0x5f,0xe5,0x5d,0x16,0x9b,0xff,0x00,0x05,0x8e,0xf8,0x23,0x76, -0x07,0xda,0x74,0xaf,0x17,0x58,0x9e,0xfb,0xec,0x21,0x7c,0x7f,0xdf,0x33,0x1a,0x56, -0x0b,0xa3,0xee,0xea,0x2b,0xe3,0xdd,0x33,0xfe,0x0a,0xbd,0xfb,0x3a,0xdf,0x45,0xbe, -0x7f,0x12,0x6a,0xba,0x71,0xfe,0xe5,0xce,0x8d,0x72,0xc7,0xff,0x00,0x21,0xab,0x0a, -0xdd,0xb2,0xff,0x00,0x82,0x9c,0x7e,0xcd,0xd7,0xcc,0x14,0x7c,0x43,0x10,0x93,0xff, -0x00,0x3d,0xb4,0xab,0xd4,0xfe,0x70,0xd0,0x3b,0x9f,0x52,0xd1,0x5e,0x13,0xa6,0xfe, -0xdd,0x5f,0x00,0x35,0x58,0x95,0xe2,0xf8,0xb1,0xe1,0xa8,0x81,0xed,0x75,0x77,0xe4, -0x1f,0xc9,0xc0,0x35,0xbd,0x6b,0xfb,0x59,0x7c,0x14,0xbd,0x0a,0x61,0xf8,0xb5,0xe0, -0xa6,0xdd,0xd0,0x1d,0x7e,0xd4,0x13,0xf8,0x17,0xa0,0x0f,0x58,0xa2,0xb8,0xed,0x33, -0xe3,0x27,0x80,0xb5,0xa4,0x56,0xd3,0xfc,0x6d,0xe1,0xdb,0xd5,0x6e,0x86,0xdf,0x55, -0x81,0xf3,0xf9,0x3d,0x74,0xd6,0x9a,0xb5,0x8d,0xfc,0x61,0xed,0xaf,0x2d,0xee,0x10, -0xf4,0x68,0xa5,0x56,0x07,0xf1,0x06,0x80,0x2d,0xd4,0x17,0x56,0x70,0x5e,0x46,0x63, -0x9e,0x08,0xe7,0x8c,0xf5,0x59,0x14,0x30,0x3f,0x81,0xa9,0x43,0x82,0x32,0x0e,0x7e, -0x94,0xb9,0xa4,0xd2,0x6a,0xcc,0x37,0x39,0x4b,0xff,0x00,0x85,0x9e,0x14,0xd4,0x41, -0x12,0xe8,0x56,0x6a,0x4f,0x56,0x85,0x3c,0xa3,0xf9,0xae,0x2b,0x02,0xf3,0xf6,0x7d, -0xf0,0x95,0xc6,0x7c,0xb8,0x6e,0xad,0x73,0xff,0x00,0x3c,0xae,0x09,0xff,0x00,0xd0, -0xb3,0x5e,0x95,0x9a,0x2b,0x86,0xa6,0x5f,0x84,0xab,0xf1,0xd2,0x8b,0xf9,0x23,0x07, -0x42,0x9c,0xb7,0x8a,0x3c,0x7e,0x6f,0xd9,0xa7,0x44,0x63,0xfb,0xad,0x57,0x50,0x4f, -0xf7,0xbc,0xb6,0xff,0x00,0xd9,0x45,0x56,0x6f,0xd9,0x9b,0x4f,0xcf,0xcb,0xad,0x5c, -0x8f,0xac,0x4a,0x7f,0xad,0x7b,0x55,0x26,0x2b,0x8d,0xe4,0xb9,0x7b,0xff,0x00,0x97, -0x4b,0xf1,0xff,0x00,0x33,0x3f,0xaa,0x50,0xfe,0x53,0xc6,0x13,0xf6,0x66,0xd3,0x54, -0xfc,0xda,0xcd,0xd1,0xff,0x00,0x76,0x35,0x15,0x7e,0xd3,0xf6,0x70,0xf0,0xdc,0x0c, -0x0c,0xd7,0x7a,0x85,0xcf,0xb3,0x48,0x8a,0x3f,0x45,0xaf,0x58,0xc5,0x2d,0x38,0xe4, -0xd8,0x08,0xed,0x49,0x02,0xc2,0xd1,0x5f,0x64,0xe2,0x74,0xcf,0x83,0x7e,0x11,0xd2, -0x88,0x29,0xa3,0xc5,0x3b,0x7a,0xdc,0xb3,0x4b,0xfa,0x31,0x22,0xba,0xfb,0x4b,0x2b, -0x7b,0x08,0x56,0x1b,0x68,0x23,0x82,0x25,0xe0,0x24,0x48,0x14,0x0f,0xc0,0x54,0xf4, -0x57,0xa5,0x4b,0x0f,0x46,0x82,0xb5,0x28,0x25,0xe8,0x8e,0x88,0xc2,0x30,0xf8,0x55, -0x82,0x8a,0x28,0xae,0x82,0xc2,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x0c,0xef,0x10, -0xcb,0xe4,0xe8,0x97,0xaf,0xe9,0x13,0x7f,0x2a,0xf8,0x0b,0xe2,0x14,0xe6,0x7f,0x11, -0x5d,0x31,0xe7,0xe6,0x35,0xf7,0x7f,0x8e,0x66,0xf2,0x3c,0x2d,0xa8,0x36,0x71,0xfb, -0xb2,0x2b,0xe0,0x2f,0x18,0x4b,0xe6,0xeb,0x37,0x6d,0xfe,0xd1,0xaf,0x88,0xe2,0x29, -0x7b,0xf4,0xa3,0xea,0x7c,0x67,0x12,0x4a,0xd4,0xa2,0x8f,0x00,0xf8,0xed,0x75,0xe5, -0x68,0x93,0x8c,0xf4,0x42,0x7f,0x4a,0xfd,0x6a,0xf8,0x37,0xa6,0xff,0x00,0x63,0x7c, -0x24,0xf0,0x55,0x81,0x50,0x86,0xdb,0x45,0xb3,0x88,0xa8,0x18,0xc1,0x10,0xa0,0xaf, -0xc8,0x7f,0x8e,0xbf,0xe9,0x36,0x82,0xd8,0x13,0x99,0x59,0x63,0xe3,0xfd,0xa3,0x8f, -0xeb,0x5f,0xb3,0x7a,0x25,0xa8,0xb1,0xd1,0xec,0x6d,0x87,0x48,0x60,0x8e,0x31,0xf8, -0x28,0x1f,0xd2,0xbd,0xcc,0xa9,0x5a,0x82,0x38,0xf8,0x3e,0x3f,0xec,0xd5,0x27,0xde, -0x45,0xea,0x28,0xa2,0xbd,0xb3,0xef,0xcf,0xcd,0xfd,0x0b,0x4e,0x93,0xc4,0x1e,0x25, -0x8e,0xce,0x20,0x5a,0x4b,0x8b,0x92,0xbf,0x9b,0x1a,0xfd,0x0a,0xf0,0xbe,0x8b,0x17, -0x87,0xb4,0x1b,0x1d,0x3a,0x15,0xc2,0x41,0x12,0xa7,0xe3,0x8e,0x6b,0xe1,0x7f,0x80, -0x9a,0xce,0x9f,0xa2,0x7c,0x4f,0x67,0xd6,0x07,0x96,0x6c,0xae,0x65,0x88,0xa3,0x8e, -0x56,0x40,0xe4,0x73,0x9f,0xa5,0x7d,0xb5,0x6f,0xf1,0x0b,0x40,0xb8,0x50,0x57,0x51, -0x8b,0xf1,0x35,0xf2,0x19,0x34,0x29,0xd1,0x9d,0x59,0xce,0x49,0x4a,0xf6,0xf9,0x1f, -0x11,0xc3,0x2a,0x9a,0xc3,0xca,0xa4,0x9f,0xbc,0xdd,0xbe,0xe3,0xa4,0xa2,0xb1,0xe3, -0xf1,0x6e,0x91,0x2f,0xdd,0xbf,0x84,0xff,0x00,0xc0,0xaa,0xd2,0x6b,0x76,0x12,0x7d, -0xdb,0xc8,0x4f,0xfc,0x0c,0x57,0xd5,0xaa,0x90,0x7b,0x34,0x7d,0xaa,0x94,0x5f,0x52, -0xf5,0x23,0x67,0x1c,0x75,0xf7,0xa8,0x12,0xf6,0xde,0x5f,0xb9,0x3c,0x6d,0xf4,0x61, -0x52,0x89,0x50,0xf4,0x70,0x7f,0x1a,0xbb,0xa6,0x3b,0x8e,0x19,0xc0,0xc8,0xe6,0x8a, -0x40,0xd9,0x1d,0x69,0x73,0x4c,0x62,0xd1,0x49,0x45,0x00,0x2d,0x14,0x51,0x40,0x05, -0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x09,0x8a,0x5a,0x28,0xa0, -0x02,0x8a,0x28,0xa0,0x02,0x92,0x96,0x8a,0x00,0x4c,0x0f,0x4a,0x31,0x4b,0x45,0x00, -0x25,0x2d,0x14,0x50,0x01,0x45,0x14,0x50,0x03,0x1e,0x24,0x91,0x4a,0xba,0x2b,0x29, -0xea,0x08,0xc8,0xac,0x4d,0x5b,0xc0,0x5e,0x19,0xd7,0xa2,0x31,0xea,0x7e,0x1d,0xd2, -0x75,0x18,0xcf,0x54,0xba,0xb1,0x8a,0x50,0x7f,0x06,0x53,0x5b,0xd4,0x50,0x07,0x98, -0xdf,0x7e,0xcb,0xdf,0x07,0x35,0x26,0x66,0xba,0xf8,0x51,0xe0,0xa9,0xd9,0xba,0xb3, -0xf8,0x7e,0xd0,0x93,0xf8,0xf9,0x75,0x85,0xa9,0xfe,0xc5,0x1f,0x01,0xb5,0x58,0xca, -0x4d,0xf0,0x8f,0xc2,0x31,0x8f,0x5b,0x6d,0x2a,0x28,0x0f,0xe7,0x18,0x53,0x5e,0xd7, -0x45,0x00,0x7c,0xcb,0xa9,0x7f,0xc1,0x35,0xff,0x00,0x67,0x0d,0x53,0x3e,0x67,0xc3, -0x4b,0x58,0x49,0xef,0x6d,0xa8,0x5d,0xc3,0xff,0x00,0xa0,0xca,0x2b,0x9e,0xbe,0xff, -0x00,0x82,0x54,0x7e,0xce,0x37,0x6b,0x88,0xbc,0x21,0x7f,0x64,0x7f,0xbd,0x06,0xb7, -0x78,0x4f,0xfe,0x3f,0x23,0x57,0xd7,0x74,0x50,0x16,0x3e,0x1b,0xd6,0x3f,0xe0,0x8f, -0x5f,0x02,0xb5,0x01,0xfe,0x89,0x71,0xe2,0x9d,0x2c,0xff,0x00,0xd3,0xbe,0xa4,0x8f, -0xff,0x00,0xa3,0x23,0x6a,0xe5,0xae,0xbf,0xe0,0x8a,0xff,0x00,0x0b,0x1c,0x9f,0xb3, -0xf8,0xe3,0xc6,0x10,0xe7,0xa7,0x98,0xd6,0xaf,0x8f,0xca,0x11,0x5f,0xa1,0xb4,0x50, -0x2b,0x23,0xf3,0x37,0x55,0xff,0x00,0x82,0x25,0x78,0x72,0x40,0xdf,0xd9,0x9f,0x14, -0x35,0x4b,0x73,0xdb,0xed,0x7a,0x5c,0x72,0xe3,0xfe,0xf9,0x75,0xae,0x4e,0xef,0xfe, -0x08,0x8b,0xab,0xab,0x1f,0xb2,0xfc,0x59,0xb1,0x91,0x7b,0x09,0xb4,0x37,0x53,0xf8, -0xe2,0x73,0x5f,0xab,0xd4,0x50,0x16,0x47,0xe4,0x0e,0xa5,0xff,0x00,0x04,0x51,0xf8, -0x81,0x10,0x3f,0x60,0xf8,0x85,0xe1,0xbb,0xa3,0xdb,0xcf,0xb7,0x9e,0x1c,0xfe,0x41, -0xab,0x8f,0xd4,0xff,0x00,0xe0,0x8e,0x7f,0x1c,0x2d,0x1b,0x16,0xba,0x97,0x84,0xaf, -0xc7,0xaa,0xea,0x12,0xa7,0xe8,0xd0,0xd7,0xed,0x6d,0x18,0xa7,0x70,0xb2,0x3f,0x0c, -0x35,0x0f,0xf8,0x24,0xc7,0xed,0x0d,0x65,0x9f,0x2b,0x45,0xd1,0x6f,0xb1,0xff,0x00, -0x3e,0xfa,0xc4,0x43,0x3f,0xf7,0xde,0xda,0xe5,0x35,0x6f,0xf8,0x26,0x9f,0xed,0x1d, -0xa4,0xb1,0x07,0xe1,0xcc,0xd7,0x60,0x75,0x6b,0x5d,0x42,0xd2,0x41,0xff,0x00,0xa3, -0x6b,0xf7,0xeb,0x14,0x62,0x8b,0x85,0x91,0xfc,0xf0,0x5e,0xfe,0xc2,0x3f,0xb4,0x05, -0x81,0x22,0x5f,0x85,0x1e,0x22,0x6c,0x7f,0xcf,0x1b,0x71,0x2f,0xfe,0x80,0x4d,0x72, -0xfa,0xa7,0xec,0xb7,0xf1,0x8b,0x46,0x62,0xb7,0x9f,0x0b,0x7c,0x5f,0x16,0x3a,0x91, -0xa2,0x5c,0x38,0x1f,0x8a,0xa1,0x15,0xfd,0x23,0xd1,0x8a,0x2e,0x2b,0x1f,0xcc,0x7d, -0xff,0x00,0xc2,0xef,0x19,0xe9,0x4c,0x56,0xf7,0xc2,0x5a,0xed,0x99,0x1d,0x44,0xfa, -0x6c,0xc9,0x8f,0xcd,0x6b,0x02,0xe7,0x4e,0xbb,0xb3,0x62,0xb3,0xda,0xcd,0x03,0x0e, -0xa2,0x48,0xca,0x91,0xf9,0x8a,0xfe,0xa3,0xf0,0x2a,0xbd,0xc6,0x99,0x67,0x76,0x8c, -0x93,0xda,0xc1,0x32,0xb7,0x05,0x64,0x8c,0x30,0x3f,0x98,0xa2,0xe1,0xca,0x7f,0x2e, -0x18,0xa2,0xbf,0xa6,0x6d,0x43,0xe0,0xc7,0xc3,0xed,0x58,0xb1,0xbe,0xf0,0x2f,0x86, -0xaf,0x0b,0x72,0xc6,0x7d,0x22,0xdd,0xc9,0xfa,0xe5,0x2b,0x9e,0xbd,0xfd,0x95,0xbe, -0x0c,0xea,0x0a,0xcb,0x3f,0xc2,0x8f,0x06,0x3e,0xee,0xa4,0x68,0x36,0xca,0x7f,0x30, -0x80,0xd1,0x71,0x72,0x9f,0xcd,0xd5,0x18,0x3d,0x6b,0xfa,0x1a,0xd5,0x7f,0x60,0x8f, -0xd9,0xf7,0x58,0x56,0x13,0xfc,0x29,0xd0,0x23,0xdd,0xd4,0xda,0xc4,0xd0,0x1f,0xcd, -0x18,0x57,0x23,0x77,0xff,0x00,0x04,0xbb,0xfd,0x9b,0x2e,0xd9,0x9b,0xfe,0x15,0xfc, -0x90,0x33,0x73,0x98,0x75,0xbb,0xf1,0xfa,0x79,0xf8,0x1f,0x95,0x3b,0x87,0x29,0xf8, -0x27,0x45,0x7e,0xe5,0xeb,0x3f,0xf0,0x49,0x4f,0xd9,0xef,0x53,0x8c,0xad,0xae,0x91, -0xad,0xe9,0x07,0xb3,0x5a,0x6b,0x12,0xb9,0x1f,0xf7,0xf7,0x7d,0x71,0xd7,0xbf,0xf0, -0x46,0x0f,0x83,0x73,0xb9,0x6b,0x7f,0x14,0xf8,0xd6,0xdb,0x3f,0xc3,0xf6,0xcb,0x47, -0x03,0xf3,0xb6,0xcf,0xeb,0x45,0xc3,0x94,0xfc,0x65,0xa2,0xbf,0x5f,0xb5,0x5f,0xf8, -0x22,0x97,0xc3,0xc9,0x50,0x0d,0x37,0xe2,0x0f,0x89,0xed,0x5f,0xd6,0xea,0x1b,0x79, -0xc7,0xe4,0xa8,0x95,0xc8,0xea,0x7f,0xf0,0x44,0x58,0x49,0x3f,0xd9,0xdf,0x16,0x9d, -0x7d,0x05,0xd6,0x85,0x9f,0xd5,0x67,0x14,0x5c,0x56,0x67,0xe5,0x7d,0x48,0x97,0x33, -0x45,0xf7,0x25,0x74,0xff,0x00,0x75,0x88,0xaf,0xd2,0x8b,0xef,0xf8,0x22,0x57,0x8a, -0x63,0xcf,0xd8,0xfe,0x28,0xe9,0x13,0xfa,0x79,0xfa,0x54,0xb1,0x67,0xf2,0x91,0xab, -0x95,0xd4,0xff,0x00,0xe0,0x8c,0x1f,0x16,0xad,0xc9,0xfb,0x0f,0x8b,0x3c,0x27,0x7a, -0x07,0x4f,0x32,0x6b,0x88,0x89,0xff,0x00,0xc8,0x46,0x80,0xb3,0x3e,0x19,0xd3,0xfc, -0x77,0xe2,0x5d,0x25,0x95,0xac,0x7c,0x43,0xaa,0xd9,0x95,0xe4,0x1b,0x7b,0xd9,0x13, -0x1f,0x93,0x57,0x63,0xa7,0x7e,0xd3,0xbf,0x17,0xf4,0x95,0x55,0xb3,0xf8,0xa1,0xe2, -0xfb,0x74,0x5e,0x8a,0x9a,0xdd,0xc8,0x03,0xf0,0xdf,0x5f,0x47,0x5e,0x7f,0xc1,0x20, -0x7e,0x3e,0x5b,0x13,0xe5,0x8f,0x0b,0xdd,0x81,0xd3,0xc9,0xd5,0x58,0x67,0xfe,0xfa, -0x8c,0x57,0x35,0xa9,0xff,0x00,0xc1,0x2b,0xff,0x00,0x68,0xcd,0x3c,0x31,0x8f,0xc2, -0x16,0x77,0xd8,0xff,0x00,0x9f,0x5d,0x5e,0xd8,0xe7,0xe9,0xb9,0xd6,0x80,0xd4,0xf3, -0x8b,0x4f,0xdb,0x7b,0xe3,0xdd,0x96,0x3c,0xaf,0x8b,0x3e,0x29,0x38,0xe9,0xe6,0xdf, -0xb4,0x9f,0xfa,0x16,0x6b,0xa5,0xd3,0x7f,0xe0,0xa3,0xbf,0xb4,0x5e,0x99,0x81,0x1f, -0xc4,0xbb,0xd9,0x80,0xed,0x73,0x69,0x6d,0x2e,0x7f,0xef,0xa8,0xcd,0x56,0xbf,0xff, -0x00,0x82,0x78,0x7e,0xd1,0x3a,0x71,0x3e,0x67,0xc2,0xed,0x52,0x4c,0x7f,0xcf,0x09, -0xed,0xe5,0xff,0x00,0xd0,0x64,0x35,0xcd,0x6a,0x5f,0xb1,0x97,0xc7,0x4d,0x28,0x91, -0x71,0xf0,0x9f,0xc5,0x9c,0x75,0x30,0xe9,0x92,0x4a,0x3f,0x34,0x06,0x80,0xd4,0xf5, -0x8b,0x2f,0xf8,0x2a,0xd7,0xed,0x17,0x68,0xa0,0x3f,0x8a,0x34,0xdb,0xac,0x77,0x9f, -0x46,0xb7,0xe7,0xfe,0xf9,0x51,0x5b,0xf6,0x1f,0xf0,0x57,0xff,0x00,0x8f,0x56,0xa4, -0x79,0xeb,0xe1,0x8b,0xc0,0x3a,0xf9,0xba,0x5b,0x29,0x3f,0xf7,0xcc,0x82,0xbe,0x5b, -0xd4,0xfe,0x04,0xfc,0x49,0xd1,0x5c,0xa5,0xf7,0xc3,0xff,0x00,0x14,0x5a,0x30,0xea, -0x25,0xd1,0xee,0x17,0xff,0x00,0x64,0xae,0x7e,0xf3,0xc1,0x5e,0x21,0xd3,0xce,0x2e, -0xb4,0x1d,0x4e,0xd8,0xff,0x00,0xd3,0x6b,0x39,0x13,0xf9,0xad,0x03,0xd4,0xfb,0xcb, -0x4d,0xff,0x00,0x82,0xd2,0xfc,0x51,0xb7,0x50,0x2f,0x7c,0x15,0xe1,0x5b,0xcf,0x52, -0x82,0xe2,0x23,0xff,0x00,0xa3,0x0d,0x74,0x56,0x5f,0xf0,0x5b,0x5f,0x14,0x2e,0x05, -0xdf,0xc3,0x0d,0x22,0x5f,0x53,0x06,0xa7,0x2a,0x7f,0x34,0x35,0xf9,0xab,0x34,0x12, -0xdb,0xb6,0xd9,0x63,0x78,0x9b,0xd1,0xd4,0x83,0x4c,0xa3,0x40,0xbb,0x3f,0x54,0x74, -0xbf,0xf8,0x2d,0xcd,0xbe,0x40,0xd4,0x7e,0x14,0x4a,0x07,0x73,0x6b,0xad,0x03,0xfa, -0x34,0x35,0xd4,0x58,0xff,0x00,0xc1,0x6b,0xfc,0x07,0x20,0x1f,0x6c,0xf8,0x77,0xe2, -0x38,0x0f,0xfd,0x30,0xb9,0xb7,0x93,0xf9,0x95,0xaf,0xc8,0x6c,0x51,0x45,0x85,0xcc, -0xcf,0xd9,0x9d,0x3b,0xfe,0x0b,0x39,0xf0,0x82,0xe4,0x81,0x77,0xe1,0x8f,0x17,0xd9, -0x67,0xf8,0xbe,0xcd,0x6f,0x20,0x1f,0x94,0xd5,0xd7,0x69,0xdf,0xf0,0x56,0xff,0x00, -0xd9,0xf6,0xf2,0x20,0xd7,0x1a,0x96,0xbd,0xa7,0xb1,0xfe,0x19,0xf4,0x99,0x18,0x8f, -0xfb,0xe0,0xb0,0xaf,0xc3,0x8a,0xb5,0xa4,0xd8,0xbe,0xa7,0xaa,0xd9,0xd9,0xc4,0xbb, -0xa5,0xb8,0x99,0x21,0x50,0x3b,0x96,0x60,0x07,0xf3,0xa2,0xc3,0xb9,0xfd,0x3f,0xe8, -0x3a,0xd5,0xb7,0x88,0xf4,0x4d,0x3f,0x56,0xb3,0x2e,0x6c,0xef,0xed,0xe3,0xba,0x84, -0xc8,0xa5,0x58,0xa3,0xa8,0x65,0xca,0x9e,0x41,0xc1,0x1c,0x1a,0xbf,0x55,0x34,0xab, -0x18,0xf4,0xcd,0x32,0xd2,0xce,0x14,0x11,0xc5,0x6f,0x0a,0x44,0x88,0x3a,0x28,0x55, -0x00,0x0f,0xd2,0xad,0xd4,0x96,0x14,0x51,0x45,0x00,0x72,0x3f,0x14,0xe7,0xfb,0x3f, -0x83,0x6f,0x4f,0xa8,0xc5,0x7c,0x0d,0xe2,0x29,0x37,0xdf,0xdd,0x37,0xab,0x9a,0xfb, -0x9b,0xe3,0x65,0xcf,0x91,0xe0,0xc9,0x87,0xf7,0x8e,0x3f,0x4a,0xf8,0x43,0x5a,0x7d, -0xd3,0x4e,0xde,0xac,0x6b,0xe0,0x33,0xe7,0x7c,0x54,0x23,0xd9,0x1f,0x01,0xc4,0xf3, -0xb2,0x48,0xf1,0x4f,0x1a,0x42,0x35,0x2f,0x88,0x9e,0x12,0xb1,0x64,0xf3,0x16,0xe7, -0x5a,0xb2,0x84,0xa6,0x33,0xb8,0x34,0xe8,0x08,0xfc,0x8d,0x7e,0xcc,0xa0,0x0a,0xa1, -0x40,0xc0,0x1c,0x57,0xe3,0xef,0x87,0xac,0x9f,0x5c,0xfd,0xa4,0xfe,0x19,0x59,0x2f, -0x3b,0xbc,0x47,0x67,0x26,0x3d,0x92,0x40,0xe7,0xff,0x00,0x40,0xaf,0xd8,0x31,0x5f, -0x57,0x97,0x46,0xd4,0x11,0xd7,0xc2,0x71,0xe5,0xcb,0xef,0xdd,0xb1,0x68,0xa2,0x8a, -0xf5,0x0f,0xb4,0x3f,0x3c,0xbf,0x6b,0x4f,0x07,0xde,0xfc,0x28,0xf8,0xc1,0x3e,0xbf, -0x6f,0x19,0x5d,0x0b,0xc4,0x4d,0xf6,0x95,0x78,0xc6,0x04,0x73,0x80,0x04,0xaa,0x7d, -0xc9,0xf9,0xff,0x00,0xe0,0x47,0xd2,0xb9,0x0d,0x2b,0xc6,0x12,0x5d,0xc4,0xaf,0x15, -0xeb,0xe0,0x8e,0xcf,0x5f,0xa1,0xbf,0x13,0xfe,0x1a,0x68,0xdf,0x15,0xfc,0x21,0x77, -0xe1,0xfd,0x6e,0x0f,0x36,0xda,0x61,0xba,0x39,0x57,0x1b,0xe0,0x90,0x0f,0x96,0x44, -0x3d,0x88,0xcf,0xe3,0xc8,0x3c,0x1a,0xfc,0xed,0xf8,0x9f,0xfb,0x2e,0xf8,0xe3,0xe1, -0x16,0xa9,0x33,0xdb,0xac,0x97,0xda,0x46,0xec,0xc3,0x7f,0x6e,0xa4,0xc6,0xc3,0x3c, -0x06,0x1f,0xc2,0x7d,0x8f,0xe1,0x9a,0xf9,0x3c,0xcb,0x2d,0x84,0xe4,0xea,0x6c,0x7e, -0x4f,0x9d,0xe5,0x78,0x9c,0x16,0x22,0x58,0xac,0x22,0x6e,0x13,0x77,0x69,0x74,0x66, -0xfc,0x3e,0x28,0xd4,0x23,0xe6,0x3b,0xf9,0x47,0xfc,0x0e,0xaf,0x43,0xe3,0x9d,0x6e, -0x1f,0xbb,0xa9,0x4b,0xf8,0xb5,0x78,0xb9,0xb9,0xf1,0x3e,0x9f,0xf2,0x4d,0x68,0x5c, -0x8e,0xf8,0xe4,0xd2,0x8f,0x15,0xeb,0x11,0x7d,0xfb,0x09,0x3f,0x23,0x5f,0x35,0xf5, -0x19,0xaf,0x86,0x4b,0xef,0x3c,0x48,0xe2,0x71,0xd1,0x5f,0x0c,0xbe,0xf3,0xdd,0x21, -0xf8,0x9f,0xe2,0x38,0x0f,0xcb,0xa8,0xb9,0xad,0x1b,0x7f,0x8c,0xfe,0x26,0xb7,0xe9, -0x7a,0xcd,0xf5,0xaf,0x9f,0x57,0xc7,0x97,0x91,0xfd,0xfb,0x49,0x57,0xf0,0x35,0x22, -0x7c,0x46,0x2b,0xf7,0xe2,0x90,0x1f,0x71,0x4d,0x61,0x71,0x31,0xf8,0x64,0xfe,0xf3, -0x55,0x99,0x63,0x61,0xba,0x91,0xf4,0x94,0x1f,0xb4,0x1f,0x8a,0x21,0xc7,0xef,0xf3, -0xf8,0xd6,0xa5,0xbf,0xed,0x33,0xe2,0x38,0xb1,0xbc,0x96,0xc7,0xbd,0x7c,0xc2,0x9f, -0x12,0x60,0xfe,0x2d,0xc3,0xf0,0xab,0x31,0xfc,0x44,0xb4,0x60,0x32,0xff,0x00,0xa5, -0x5a,0x58,0xf8,0xed,0x37,0xf7,0x9b,0x47,0x3c,0xc5,0x43,0x79,0x4b,0xee,0x3e,0xa8, -0xb5,0xfd,0xaa,0x75,0x98,0x88,0xf3,0x22,0xdc,0x3f,0x3a,0xd5,0xb7,0xfd,0xac,0xae, -0x86,0x3c,0xcb,0x6c,0xfa,0xfc,0xa2,0xbe,0x4c,0x8f,0xc7,0x96,0x4d,0xff,0x00,0x2d, -0x16,0xac,0xa7,0x8c,0xac,0x9f,0x1f,0xbd,0x43,0xf8,0xd5,0xac,0x46,0x63,0x0f,0xb4, -0xcd,0xe3,0xc4,0x98,0x88,0xef,0x3f,0xc0,0xfa,0xfe,0xd7,0xf6,0xb2,0x84,0xe3,0xce, -0xb6,0xff,0x00,0xc7,0x6b,0x52,0xdb,0xf6,0xab,0xd2,0xe4,0x23,0xcc,0x80,0x0f,0xc0, -0xd7,0xc6,0x69,0xe2,0x8b,0x37,0xe9,0x2a,0xfe,0x06,0xa7,0x4d,0x7a,0xd5,0xfa,0x38, -0x3f,0x8d,0x52,0xcc,0x73,0x18,0x6e,0xff,0x00,0x03,0xaa,0x3c,0x51,0x5b,0xf9,0x91, -0xf6,0xdd,0xbf,0xed,0x3b,0xe1,0xe9,0x00,0xde,0x30,0x4f,0xfb,0x55,0xa9,0x6d,0xfb, -0x43,0xf8,0x66,0x7c,0x66,0x5d,0xbf,0xf0,0x21,0x5f,0x0a,0xae,0xad,0x6e,0xdd,0x1c, -0x54,0x83,0x50,0x84,0xf4,0x93,0xf5,0xad,0x16,0x73,0x8f,0x8e,0xf6,0xfb,0x8e,0xb8, -0x71,0x45,0x4e,0xb6,0x3e,0xf8,0xb7,0xf8,0xdf,0xe1,0x99,0xc8,0xc5,0xd0,0x1f,0x88, -0xad,0x28,0x3e,0x2a,0xf8,0x72,0x71,0x91,0x7e,0xa3,0xf2,0xaf,0xcf,0xa5,0xbf,0x51, -0xf7,0x66,0x23,0xe8,0x6a,0x64,0xd4,0xe4,0x5f,0xbb,0x70,0xc3,0xfe,0x05,0x5a,0xac, -0xfb,0x14,0xbe,0x28,0x2f,0xc4,0xeb,0x8f,0x13,0xcb,0xac,0x51,0xfa,0x19,0x17,0x8f, -0xb4,0x29,0xbe,0xee,0xa1,0x1f,0xe7,0x57,0x23,0xf1,0x4e,0x95,0x2f,0xdd,0xbe,0x84, -0xff,0x00,0xc0,0xab,0xf3,0xbe,0x3d,0x6e,0xf1,0x3e,0xe5,0xe4,0xa3,0xe8,0xf5,0x66, -0x3f,0x15,0xea,0xb1,0x11,0xb7,0x50,0x9b,0xfe,0xfb,0x35,0xb2,0xe2,0x1a,0x8b,0xe2, -0xa7,0xf8,0x9d,0x51,0xe2,0x58,0x3d,0xe0,0x7e,0x88,0xa6,0xb1,0x63,0x27,0xdd,0xbb, -0x88,0xff,0x00,0xc0,0xc5,0x4a,0xb7,0x90,0x3f,0xdd,0x99,0x0f,0xd1,0x85,0x7e,0x7b, -0x43,0xe3,0xfd,0x7a,0x2f,0xbb,0xa8,0xcb,0xf9,0xd5,0xf8,0x3e,0x2b,0x78,0x8e,0x0c, -0x62,0xf9,0xcf,0xd4,0xd6,0xeb,0x88,0xa3,0xf6,0xa9,0xbf,0xbc,0xe8,0x8f,0x11,0xd0, -0x7b,0xc5,0x9f,0x7f,0x09,0x14,0xff,0x00,0x10,0xfc,0xe9,0x73,0xef,0x5f,0x08,0xc1, -0xf1,0xbf,0xc4,0xd0,0x7f,0xcb,0xd1,0x6f,0xc4,0xd6,0x9d,0xb7,0xed,0x11,0xe2,0x58, -0x3a,0xcb,0x9f,0xf8,0x11,0xad,0xe3,0xc4,0x34,0x1e,0xf0,0x67,0x44,0x78,0x83,0x0a, -0xf7,0xb9,0xf6,0xe0,0x34,0x66,0xbe,0x37,0xb6,0xfd,0xa7,0x35,0xf8,0x71,0xbf,0x2d, -0xf8,0xd6,0xad,0xbf,0xed,0x57,0xaa,0x2f,0xfa,0xc8,0x49,0x1f,0x85,0x6d,0x1c,0xfb, -0x08,0xf7,0xbf,0xdc,0x6f,0x1c,0xf3,0x06,0xfe,0xd1,0xf5,0x9e,0x68,0x07,0x35,0xf3, -0x0d,0xbf,0xed,0x65,0x28,0xff,0x00,0x59,0x6f,0x9f,0xf8,0x0e,0x6b,0x52,0xdb,0xf6, -0xb1,0xb5,0x38,0xf3,0x6d,0xc0,0xfc,0x2b,0xa2,0x39,0xd6,0x09,0xfd,0xaf,0xc0,0xe9, -0x8e,0x6d,0x83,0x97,0xdb,0x3e,0x8b,0xa2,0xbc,0x26,0x0f,0xda,0xa3,0x47,0x7c,0x07, -0x88,0x03,0xdf,0xad,0x6a,0x5b,0x7e,0xd2,0xde,0x1e,0x98,0x0d,0xe4,0x2f,0xfc,0x0a, -0xb7,0x8e,0x6b,0x83,0x97,0xfc,0xbc,0x46,0xf1,0xc7,0xe1,0xa5,0xb4,0xd1,0xec,0x54, -0x57,0x98,0xdb,0xfe,0xd0,0x3e,0x19,0x9f,0xfe,0x5b,0x05,0xff,0x00,0x81,0x56,0x9c, -0x1f,0x19,0xfc,0x35,0x36,0x3f,0xd3,0x00,0xfc,0x45,0x74,0x47,0x1d,0x86,0x96,0xd5, -0x17,0xde,0x6e,0xb1,0x34,0x65,0xb4,0xd1,0xdd,0xd1,0x5c,0xa4,0x1f,0x13,0xfc,0x3d, -0x38,0x18,0xbe,0x41,0xf5,0x35,0x76,0x2f,0x1c,0xe8,0x93,0x7d,0xdb,0xf8,0x8f,0xe3, -0x5b,0x2c,0x45,0x29,0x6d,0x25,0xf7,0x9a,0x2a,0xb4,0xde,0xd2,0x46,0xf5,0x15,0x97, -0x1f,0x89,0x74,0xc9,0x47,0xcb,0x7d,0x09,0xff,0x00,0x81,0x55,0x94,0xd5,0xac,0xe4, -0xfb,0xb7,0x51,0x1f,0xf8,0x10,0xad,0x54,0xe2,0xf6,0x65,0xa9,0x27,0xb3,0x2d,0xd1, -0x51,0x0b,0xa8,0x5b,0xa4,0xa8,0x7f,0xe0,0x42,0x9e,0x1d,0x58,0x64,0x10,0x7e,0x86, -0xaa,0xe8,0xab,0x8e,0xa2,0x93,0x34,0x66,0x98,0x0b,0x45,0x26,0x45,0x19,0xa0,0x05, -0xa2,0x93,0x34,0xb4,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, -0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14,0x00,0x51,0x45,0x14, -0x00,0x51,0x45,0x14,0x00,0x94,0x6d,0x06,0x96,0x8a,0x00,0x4c,0x51,0x8a,0x5a,0x28, -0x01,0x31,0x4d,0x31,0xa1,0x04,0x15,0x04,0x1e,0xb9,0x14,0xfa,0x28,0x03,0x1e,0xfb, -0xc1,0xba,0x06,0xa9,0x9f,0xb6,0x68,0x7a,0x6d,0xde,0x7a,0xf9,0xf6,0x91,0xbe,0x7f, -0x31,0x5c,0xe5,0xf7,0xc0,0x6f,0x86,0x7a,0x9e,0xef,0xb5,0xfc,0x3c,0xf0,0xad,0xc9, -0x6e,0xa6,0x5d,0x16,0xd9,0x89,0xfc,0x4a,0x57,0x77,0x45,0x00,0x78,0xd6,0xa9,0xfb, -0x1a,0x7c,0x0b,0xd6,0x15,0xc5,0xcf,0xc2,0x6f,0x09,0x12,0xfd,0x5a,0x2d,0x2a,0x28, -0x9b,0xfe,0xfa,0x40,0x08,0xae,0x2e,0xfb,0xfe,0x09,0xb1,0xfb,0x37,0x5f,0xbb,0xb4, -0x9f,0x0c,0xad,0x23,0x2d,0xd7,0xc8,0xd4,0x6f,0x22,0x03,0xe8,0x16,0x60,0x05,0x7d, -0x33,0x45,0x00,0x7c,0x97,0x7f,0xff,0x00,0x04,0xb0,0xfd,0x9b,0xaf,0x22,0x65,0x8f, -0xc1,0x17,0x56,0x6c,0x7f,0x8e,0x0d,0x6e,0xf4,0x91,0xff,0x00,0x7d,0x4a,0xc3,0xf4, -0xac,0x5d,0x0f,0xfe,0x09,0x3f,0xf0,0x43,0xc3,0x5e,0x2b,0xd2,0x3c,0x41,0xa7,0x37, -0x89,0x21,0xba,0xd2,0xef,0x61,0xbe,0x86,0x17,0xd4,0x52,0x48,0x59,0xe3,0x70,0xe1, -0x58,0x34,0x44,0x95,0x25,0x40,0x23,0x3d,0x3b,0xd7,0xd9,0xd4,0x50,0x2b,0x05,0x14, -0x51,0x40,0xc2,0x8a,0x28,0xa0,0x0f,0x29,0xfd,0xa1,0x2e,0x7c,0x9f,0x0a,0x05,0xce, -0x32,0x58,0xfe,0x95,0xf0,0xf6,0xaa,0xfc,0x48,0x7d,0xcd,0x7d,0x97,0xfb,0x4b,0xdc, -0xf9,0x7a,0x24,0x29,0x9f,0xe1,0x3c,0x57,0xc5,0xda,0xb3,0xe2,0x27,0x3f,0x5a,0xfc, -0xeb,0x38,0x7c,0xd8,0xfb,0x76,0x48,0xfc,0xd3,0x8a,0x27,0xef,0xdb,0xc8,0xe4,0x3e, -0x04,0xda,0x0d,0x63,0xf6,0xc8,0xf8,0x6d,0x01,0xc9,0xf2,0xaf,0xe6,0xb9,0xe3,0xfe, -0x99,0xdb,0xca,0xc3,0xf9,0x57,0xeb,0x58,0xaf,0xcb,0x1f,0xd8,0xe7,0x4f,0x6d,0x5f, -0xf6,0xce,0xd0,0xa5,0x03,0x29,0x61,0xa7,0xdf,0x5d,0x37,0xb0,0xf2,0xbc,0xb1,0xfa, -0xc8,0x2b,0xf5,0x38,0x77,0xaf,0xb7,0xc1,0xab,0x51,0x47,0xd1,0xf0,0xd4,0x39,0x32, -0xca,0x7e,0x62,0xd1,0x45,0x15,0xdc,0x7d,0x40,0x98,0xa6,0xc9,0x0a,0x4a,0xa5,0x5d, -0x43,0xa1,0xe0,0xab,0x0c,0x83,0x4f,0xa2,0x80,0x38,0xad,0x6b,0xe0,0xcf,0x83,0x35, -0xf9,0x1a,0x4b,0xbd,0x02,0xd7,0xcc,0x61,0x82,0xd0,0x83,0x17,0xe8,0xa4,0x0a,0xe5, -0xaf,0x7f,0x65,0x8f,0x01,0x5d,0x9c,0xad,0x95,0xc5,0xbf,0xb4,0x53,0x7f,0xf1,0x40, -0xd7,0xaf,0x51,0x5c,0xd2,0xc3,0x51,0x96,0xf0,0x47,0x24,0xb0,0x98,0x79,0xbb,0xca, -0x9a,0xfb,0x8f,0x09,0xba,0xfd,0x8f,0x3c,0x13,0x36,0x4a,0x4d,0xa8,0x46,0x7d,0xdd, -0x08,0xff,0x00,0xd0,0x2b,0x02,0xff,0x00,0xf6,0x26,0xd0,0x27,0xcf,0xd9,0xf5,0x69, -0x22,0x3f,0xf4,0xd2,0xdc,0x3f,0xf2,0x61,0x5f,0x4a,0x51,0xf8,0xd6,0x4f,0x03,0x87, -0x7f,0x60,0xe7,0x79,0x6e,0x16,0x5f,0x63,0xf3,0x3e,0x50,0xbc,0xfd,0x84,0xec,0x64, -0xe6,0x2d,0x6a,0x17,0x3f,0xed,0xda,0x95,0xff,0x00,0xd9,0x8d,0x73,0xd7,0xdf,0xb0, -0x65,0xd9,0x62,0x20,0xbb,0xd3,0x5c,0x76,0x2c,0x59,0x4f,0xfe,0x81,0x5f,0x68,0x62, -0x8c,0x56,0x4f,0x2e,0xa0,0xfa,0x3f,0xbd,0x98,0xbc,0xa7,0x0a,0xfe,0xcb,0xfb,0xd9, -0xf0,0x8d,0xe7,0xec,0x1d,0xae,0x2a,0xb1,0x8d,0x6c,0x65,0x3d,0x82,0x4d,0x8c,0xfe, -0x78,0xae,0x7a,0xfb,0xf6,0x20,0xf1,0x54,0x07,0xe4,0xd3,0x0b,0x0f,0xfa,0x67,0x70, -0x87,0xff,0x00,0x66,0xaf,0xd0,0xfc,0x51,0x8a,0x87,0x96,0xd3,0xe9,0x27,0xf7,0x9c, -0xf2,0xc8,0xf0,0xb2,0xef,0xf8,0x7f,0x91,0xf9,0xa7,0x7b,0xfb,0x1f,0x78,0xc6,0xd4, -0x90,0xba,0x46,0xa0,0x4f,0xfb,0x1f,0x30,0xfd,0x2b,0x0a,0xef,0xf6,0x69,0xf1,0x85, -0x91,0x3b,0xb4,0xed,0x4e,0x3c,0x7a,0xdb,0xb7,0xf8,0x57,0xea,0x4e,0x29,0x0a,0xe6, -0xa1,0xe5,0xab,0xa4,0xdf,0xe0,0x72,0xcb,0x87,0x70,0xd2,0xeb,0xf8,0x23,0xf2,0x7a, -0xef,0xe0,0xd7,0x8a,0x6c,0x72,0x59,0x6e,0xa3,0x03,0xfb,0xf1,0x11,0x59,0xef,0xe0, -0x3f,0x13,0xdb,0x74,0x91,0xce,0x3d,0x54,0xd7,0xeb,0x83,0x44,0xae,0x30,0xc0,0x11, -0xe8,0x45,0x55,0x9f,0x45,0xb0,0xba,0xff,0x00,0x5d,0x65,0x6f,0x30,0xff,0x00,0x6e, -0x25,0x3f,0xd2,0xb2,0x79,0x6c,0xba,0x4f,0xf0,0x38,0xe5,0xc2,0xf8,0x79,0x76,0xfb, -0xbf,0xe0,0x9f,0x92,0x6d,0xa0,0x78,0xaa,0xdf,0xdf,0xeb,0x9a,0x88,0xa7,0x8a,0x2d, -0xfe,0xf4,0x3b,0xbe,0x86,0xbf,0x57,0xee,0x3c,0x03,0xe1,0xbb,0xa0,0x7c,0xdd,0x07, -0x4d,0x7c,0xf7,0x36,0xa9,0xfe,0x15,0x97,0x73,0xf0,0x6f,0xc1,0x77,0x79,0xf3,0x3c, -0x3b,0x67,0xff,0x00,0x00,0x52,0x9f,0xc8,0x8a,0xc9,0xe5,0xb5,0x3b,0xa6,0x72,0x4b, -0x84,0xe9,0x74,0xb7,0xe2,0x8f,0xcb,0x31,0xaa,0xf8,0x8a,0x0f,0xbf,0x68,0xc6,0x94, -0x78,0xab,0x58,0x8b,0xef,0xd8,0xcb,0xc7,0xfb,0x26,0xbf,0x4d,0xae,0x7f,0x67,0x8f, -0x00,0xdd,0x67,0x3a,0x12,0x46,0x4f,0x74,0x99,0xff,0x00,0xf8,0xaa,0xc5,0xbb,0xfd, -0x94,0xfc,0x09,0x75,0x9d,0xb6,0xf7,0x70,0x67,0xfe,0x79,0xca,0xbf,0xd5,0x4d,0x63, -0x2c,0xb2,0xa7,0xf2,0xc5,0x9c,0xb2,0xe1,0x37,0xd3,0xff,0x00,0x4a,0x67,0xe7,0x32, -0xf8,0xee,0xf6,0x3f,0xbf,0x6b,0x28,0xfc,0x0d,0x4c,0x9f,0x11,0x4a,0x9f,0x9e,0x17, -0x1f,0x85,0x7d,0xf7,0x79,0xfb,0x1c,0x78,0x36,0x7f,0xf5,0x37,0x57,0xd1,0x1f,0xf6, -0x8a,0x37,0xfe,0xca,0x2b,0x02,0xf3,0xf6,0x22,0xd1,0x26,0x72,0x62,0xd6,0x9d,0x17, -0xd1,0xed,0x43,0x1f,0xcf,0x78,0xac,0x1e,0x59,0x3e,0xb4,0x97,0xde,0x73,0x4b,0x85, -0xab,0xaf,0x86,0xff,0x00,0x7a,0x3e,0x2b,0x4f,0x89,0x10,0xff,0x00,0x10,0x65,0xfa, -0x8a,0xb1,0x1f,0xc4,0x4b,0x46,0xea,0xf8,0xaf,0xac,0x2f,0x7f,0x61,0x2b,0x49,0x01, -0xf2,0x35,0x88,0x1d,0xbb,0x09,0x2d,0x8a,0xff,0x00,0x53,0x5c,0xf5,0xe7,0xec,0x19, -0xa8,0x1f,0xf5,0x77,0x5a,0x63,0x8f,0xf7,0x98,0x7f,0xec,0xb5,0x83,0xcb,0x5f,0x5a, -0x4c,0xe7,0x97,0x0e,0xe2,0xe3,0xb3,0x97,0xe0,0xcf,0x9e,0xa3,0xf1,0xed,0x9b,0xff, -0x00,0xcb,0x45,0x15,0x66,0x3f,0x19,0xd9,0x3f,0xfc,0xb5,0x4f,0xce,0xbd,0x7a,0xfb, -0xf6,0x11,0xd7,0xe3,0x62,0x23,0x86,0xce,0x61,0xeb,0x1c,0xc0,0x67,0xf3,0xc5,0x73, -0xf7,0x9f,0xb1,0x27,0x8b,0x21,0xdd,0xb3,0x4a,0x76,0x03,0xfe,0x79,0xdc,0x21,0xff, -0x00,0xd9,0xab,0x09,0x65,0xb1,0x5b,0xd3,0x92,0xf9,0x1c,0xd2,0xc9,0x31,0xd1,0xea, -0xff,0x00,0xf0,0x13,0x89,0x4f,0x14,0xd9,0xbf,0xfc,0xb5,0x4f,0xfb,0xea,0xa7,0x4d, -0x7e,0xd5,0xff,0x00,0x8d,0x4f,0xe2,0x2b,0x4a,0xf7,0xf6,0x43,0xf1,0x8d,0xa0,0x2d, -0xfd,0x8f,0xa8,0x81,0xe9,0x1a,0x16,0xfe,0x42,0xb0,0xef,0x7f,0x66,0xdf,0x17,0x58, -0xf2,0xda,0x76,0xa7,0x17,0xfb,0xf6,0xed,0xfe,0x15,0xcf,0x2c,0xbe,0x9a,0xee,0xbe, -0x47,0x3c,0xb2,0xdc,0x74,0x3a,0xfe,0x0c,0xbe,0xba,0xb5,0xbb,0x7f,0x18,0xa9,0x17, -0x51,0x80,0xff,0x00,0x18,0xae,0x46,0xe7,0xe1,0x07,0x89,0xac,0x8e,0x1b,0xed,0x28, -0x47,0x67,0x88,0xd5,0x17,0xf0,0x2f,0x89,0xad,0x8f,0x12,0x3f,0x1e,0xaa,0x6b,0x17, -0x81,0xa5,0xd2,0x46,0x2f,0x0d,0x8d,0x8f,0x63,0xd0,0x16,0xfa,0x23,0xd2,0x4f,0xd6, -0xa5,0x5b,0xdc,0x7d,0xd9,0x88,0xfc,0x6b,0xcc,0xdb,0x42,0xf1,0x4d,0xbe,0x79,0x27, -0xeb,0x9a,0x66,0xcf,0x13,0x41,0xf7,0xa2,0x2d,0x8f,0x43,0x51,0xfd,0x9f,0x17,0xb4, -0x85,0xc9,0x8d,0x8f,0xd8,0xfc,0x4f,0x55,0x4d,0x52,0x74,0xfb,0xb7,0x4e,0x3e,0x8d, -0x56,0x23,0xd7,0xef,0xe3,0xfb,0x97,0xb2,0x8f,0xa3,0x1a,0xf2,0x1f,0xed,0x5f,0x10, -0xc2,0x3e,0x6b,0x47,0x3f,0x4a,0x51,0xe2,0x9d,0x62,0x3f,0xbf,0x67,0x27,0xfd,0xf3, -0x51,0xfd,0x9d,0x2e,0x92,0x41,0xed,0x31,0xb0,0xde,0x9b,0xfb,0xcf,0x67,0x8f,0xc6, -0x1a,0xc4,0x5f,0x77,0x50,0x97,0xfe,0xfa,0xab,0xb0,0x7c,0x44,0xd7,0xe0,0xfb,0xba, -0x84,0x9f,0x8d,0x78,0x7a,0xf8,0xea,0xf2,0x3f,0xf5,0x96,0xb2,0x8f,0xf8,0x09,0xa9, -0x53,0xe2,0x29,0x5f,0xbf,0x14,0x8b,0xf5,0x14,0x96,0x06,0xbc,0x7e,0x17,0xf8,0x94, -0xb1,0xd8,0xb8,0x6f,0x19,0x23,0xde,0x60,0xf8,0xb7,0xe2,0x48,0x3f,0xe5,0xf4,0x9f, -0xad,0x69,0x43,0xf1,0xd7,0xc4,0xd0,0x81,0x8b,0x8c,0xe3,0xdc,0xd7,0xcf,0x91,0xfc, -0x48,0x87,0xb8,0x65,0xfc,0x2a,0xcc,0x7f,0x11,0x2d,0x5b,0xab,0xe3,0xea,0x2a,0x95, -0x0c,0x5c,0x7e,0x19,0x3f,0xbc,0xd5,0x67,0x18,0x98,0x6e,0xe4,0xbe,0x47,0xd1,0xb6, -0xbf,0xb4,0x67,0x88,0xe0,0x00,0x17,0xcf,0xd0,0xd6,0xa5,0xbf,0xed,0x3f,0xae,0x46, -0x7e,0x70,0xc7,0xf1,0xaf,0x99,0xe3,0xf1,0xed,0x9b,0x7f,0xcb,0x41,0xf8,0xd5,0x98, -0xfc,0x69,0x66,0xf8,0xfd,0xea,0x7e,0x75,0x4a,0x58,0xf8,0x6d,0x26,0x6f,0x1e,0x20, -0xaf,0x1f,0xb6,0xfe,0xe3,0xea,0x5b,0x7f,0xda,0xb3,0x50,0x4c,0x6f,0x84,0x93,0xf4, -0x15,0xa9,0x6b,0xfb,0x58,0x37,0x1e,0x6c,0x39,0xff,0x00,0x80,0xd7,0xc9,0xd1,0xf8, -0xae,0xd1,0xff,0x00,0xe5,0xa2,0x7e,0x75,0x3a,0x78,0x86,0xd5,0xfa,0x3a,0xfe,0x75, -0x6b,0x19,0x98,0xc3,0xed,0x33,0xa6,0x3c,0x4d,0x59,0x7f,0xcb,0xc4,0x7d,0x7f,0x6f, -0xfb,0x56,0xd9,0x39,0xc3,0xc2,0x07,0xd4,0x56,0xad,0xb7,0xed,0x45,0xa2,0xc9,0x8f, -0x31,0x00,0xfc,0x6b,0xe3,0x15,0xd6,0x2d,0xdb,0xf8,0x87,0xe7,0x52,0x2e,0xa5,0x03, -0x7f,0x1e,0x2b,0x45,0x9a,0xe6,0x11,0xdd,0xfe,0x07,0x5c,0x38,0x9a,0xb7,0xf3,0x26, -0x7d,0xbb,0x6d,0xfb,0x48,0x78,0x7a,0x7c,0x6e,0x60,0xbf,0xf0,0x2a,0xd4,0x83,0xe3, -0xdf,0x86,0x66,0xc7,0xef,0xc0,0xff,0x00,0x81,0x0a,0xf8,0x48,0x5f,0x44,0x7a,0x3f, -0xeb,0x4f,0x5b,0xc5,0xea,0x25,0xc7,0xe3,0x5a,0x2c,0xef,0x1b,0x1d,0xd2,0xfb,0x8e, -0xc8,0xf1,0x35,0x5e,0xa9,0x33,0xef,0xd8,0x3e,0x30,0xf8,0x6e,0x7c,0x62,0xec,0x0f, -0xc4,0x55,0xe8,0x7e,0x25,0x78,0x7e,0x7c,0x6d,0xbe,0x4f,0xc6,0xbf,0x3e,0x56,0xf9, -0x86,0x31,0x3b,0x7f,0xdf,0x55,0x3a,0x6a,0xd7,0x51,0xfd,0xcb,0xb9,0x07,0xd1,0xab, -0x65,0xc4,0x18,0x85,0xbc,0x11,0xd5,0x1e,0x25,0x7d,0x60,0x7e,0x86,0x47,0xe3,0x4d, -0x16,0x5c,0x62,0xfe,0x2f,0xc4,0xd5,0xa8,0xfc,0x45,0xa6,0xcb,0xf7,0x6f,0x61,0x3f, -0xf0,0x2a,0xfc,0xf1,0x8f,0xc4,0x7a,0x8c,0x7f,0x76,0xf6,0x51,0xff,0x00,0x02,0xab, -0x91,0x78,0xdf,0x5a,0x87,0xee,0xea,0x12,0x7e,0x75,0xb2,0xe2,0x29,0xaf,0x8a,0x9f, -0xe2,0x74,0x47,0x89,0x21,0xd6,0x07,0xe8,0x52,0xea,0x96,0x8f,0xf7,0x6e,0x62,0x3f, -0x46,0x15,0x2a,0xdc,0x44,0xdd,0x24,0x43,0xf4,0x22,0xbf,0x3f,0x20,0xf8,0x97,0xe2, -0x08,0x08,0xdb,0x7c,0xe7,0xeb,0x57,0xe1,0xf8,0xc5,0xe2,0x48,0x7f,0xe5,0xec,0x9a, -0xde,0x3c,0x45,0x0f,0xb5,0x4d,0x9d,0x31,0xe2,0x2c,0x3b,0xde,0x2c,0xfb,0xdc,0x3a, -0x9e,0x8c,0x0f,0xe3,0x4b,0x9a,0xf8,0x66,0xdf,0xe3,0xdf,0x89,0x2d,0xff,0x00,0xe5, -0xb6,0x7f,0x13,0x5a,0x96,0xdf,0xb4,0x87,0x88,0x21,0xc6,0xe6,0x2d,0xf8,0x9a,0xdd, -0x71,0x0e,0x1d,0xef,0x16,0x8d,0xe3,0x9f,0xe1,0x1e,0xec,0xfb,0x4b,0x38,0xa3,0x22, -0xbe,0x42,0xb7,0xfd,0xa8,0xb5,0x98,0xf1,0xb9,0x0f,0xe7,0x9a,0xd4,0xb5,0xfd,0xab, -0x2e,0xd7,0x1e,0x64,0x44,0xfe,0x15,0xba,0xcf,0xb0,0x8f,0x7b,0xfd,0xc7,0x44,0x73, -0xac,0x1c,0xbe,0xd1,0xf5,0x4e,0x45,0x15,0xf3,0x55,0xb7,0xed,0x5c,0xac,0x47,0x99, -0x00,0x03,0xfd,0xda,0xd5,0xb7,0xfd,0xaa,0x74,0xe6,0xc6,0xf8,0x97,0xf2,0x35,0xbc, -0x73,0x9c,0x14,0xbe,0xd9,0xd1,0x1c,0xd3,0x09,0x2d,0xa6,0x8f,0xa0,0x33,0x4b,0x5e, -0x25,0x6b,0xfb,0x4e,0x68,0xb2,0xfd,0xf0,0x8b,0xf8,0x9a,0xd5,0xb7,0xfd,0xa2,0xfc, -0x3b,0x36,0x01,0x60,0x0f,0xfb,0xd5,0xd1,0x1c,0xcf,0x07,0x2d,0xaa,0x23,0x75,0x8e, -0xc3,0xcb,0x69,0xa3,0xd6,0x28,0xaf,0x3a,0x83,0xe3,0x9f,0x86,0xe6,0xc7,0xfa,0x40, -0x5c,0xff,0x00,0xb4,0x2b,0x46,0xdf,0xe2,0xdf,0x87,0x6e,0x31,0x8b,0xb5,0x1f,0x52, -0x2b,0x75,0x8d,0xc3,0x4b,0x6a,0x8b,0xef,0x36,0x58,0x8a,0x2f,0x69,0x23,0xb4,0xa2, -0xb9,0xa8,0xfe,0x22,0xe8,0x12,0xfd,0xdb,0xf4,0xcd,0x5b,0x8b,0xc6,0x1a,0x44,0xdf, -0x76,0xfa,0x2f,0xc4,0xd6,0xca,0xbd,0x29,0x6d,0x25,0xf7,0x9a,0x2a,0x90,0x7b,0x33, -0x6a,0x8a,0xce,0x4f,0x10,0x69,0xd2,0x7d,0xdb,0xc8,0x5b,0xfe,0x05,0x56,0x13,0x51, -0xb6,0x7e,0x97,0x11,0x1f,0xf8,0x18,0xad,0x14,0xe2,0xf6,0x65,0x73,0x2e,0xe5,0x9a, -0x2a,0x35,0xb8,0x89,0xfe,0xec,0x88,0x7e,0x8d,0x4f,0xdc,0x3d,0x45,0x55,0xca,0x16, -0x8a,0x29,0x33,0x4c,0x05,0xa2,0x93,0x34,0x66,0x80,0x16,0x8a,0x4a,0x33,0x40,0x0b, -0x45,0x14,0x94,0x01,0xf3,0xdf,0xed,0x45,0x77,0xb6,0xde,0x38,0xf3,0xd2,0x3c,0x57, -0xc7,0x5e,0x24,0xbc,0x5b,0x7b,0x39,0x58,0x9c,0x61,0x4d,0x7d,0x53,0xfb,0x54,0x5f, -0x88,0xee,0x4a,0x93,0x8c,0x28,0x02,0xbe,0x1a,0xf8,0x97,0xe2,0x95,0xb6,0xb3,0x78, -0x95,0xf2,0xc4,0x73,0xcd,0x7e,0x79,0x88,0xa6,0xeb,0xe6,0x53,0xf2,0xb1,0xf9,0x1f, -0x13,0xd4,0x73,0xc4,0xaa,0x31,0xdd,0x9e,0xad,0xff,0x00,0x04,0xe8,0xd3,0xe6,0xd6, -0x3f,0x69,0x8f,0x14,0xea,0xe1,0x37,0xda,0x69,0xfe,0x1f,0x92,0x06,0x7c,0xfd,0xd9, -0x25,0xb8,0x8b,0x60,0xfc,0x44,0x4f,0xf9,0x57,0xe9,0x78,0xaf,0x87,0x7f,0xe0,0x96, -0xbe,0x07,0x96,0xcb,0xc1,0x1e,0x34,0xf1,0xa4,0xe0,0x8f,0xed,0xcd,0x42,0x3b,0x3b, -0x70,0xc3,0xac,0x56,0xca,0xd9,0x61,0xf5,0x69,0x98,0x7f,0xc0,0x2b,0xee,0x3a,0xfb, -0xba,0x11,0xe5,0xa6,0x91,0xfa,0x46,0x59,0x43,0xea,0xf8,0x3a,0x74,0xfb,0x20,0xa2, -0x8a,0x2b,0xa0,0xf5,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0, -0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0, -0x02,0x8a,0x28,0xa0,0x02,0x8a,0x28,0xa0,0x02,0x93,0x14,0xb4,0x50,0x02,0x62,0x8c, -0x52,0xd1,0x40,0x0d,0x23,0xd2,0x94,0x0a,0x5a,0x28,0x01,0x31,0x46,0xd1,0x4b,0x45, -0x00,0x46,0xd0,0xa3,0x82,0x19,0x15,0x81,0xec,0x45,0x54,0x9b,0x40,0xd3,0x6e,0x46, -0x26,0xd3,0xed,0x65,0x1f,0xed,0xc2,0xa7,0xfa,0x55,0xfa,0x2a,0x5c,0x53,0xdd,0x12, -0xe2,0x9e,0xe8,0xe7,0x6e,0x7e,0x1e,0x78,0x62,0xf3,0xfd,0x76,0x81,0xa7,0x3f,0xfd, -0xbb,0x20,0xfe,0x42,0xb2,0xee,0x7e,0x0b,0xf8,0x26,0xef,0x3e,0x67,0x87,0x2c,0xc6, -0x7f,0xb8,0xa5,0x3f,0x91,0x15,0xdb,0x51,0x59,0xba,0x34,0x9e,0xf1,0x5f,0x71,0x93, -0xa1,0x4a,0x5b,0xc1,0x7d,0xc8,0xf3,0x2b,0xbf,0xd9,0xc7,0xc0,0x37,0x60,0x8f,0xec, -0x51,0x1f,0xba,0x4c,0xff,0x00,0xd4,0x9a,0xc7,0xba,0xfd,0x93,0xfc,0x09,0x70,0x72, -0xb0,0xdd,0xc3,0xec,0x92,0xaf,0xf5,0x53,0x5e,0xcb,0x45,0x64,0xf0,0x94,0x1f,0xd8, -0x46,0x0f,0x03,0x86,0x7b,0xd3,0x5f,0x71,0xe0,0x37,0xbf,0xb1,0xaf,0x84,0x27,0xcf, -0x91,0x77,0x79,0x11,0x3f,0xdf,0xd8,0xf8,0xfd,0x05,0x61,0x5d,0x7e,0xc3,0xba,0x2c, -0xb9,0xf2,0xf5,0xc6,0x5f,0x4d,0xd6,0x80,0xff,0x00,0xec,0xf5,0xf4,0xdd,0x15,0x9b, -0xc0,0xe1,0xdf,0xd9,0xfc,0xcc,0x9e,0x5b,0x84,0x7f,0x63,0xf3,0x3e,0x46,0xd4,0x3f, -0x61,0x38,0x98,0x9f,0xb3,0x6a,0xd6,0x92,0x0f,0xfa,0x69,0x01,0x4f,0xe5,0x9a,0xe7, -0xef,0x3f,0x60,0xcd,0x49,0x89,0xf2,0xee,0xb4,0xb7,0x1d,0xbe,0x77,0x07,0xff,0x00, -0x40,0xaf,0xb6,0x31,0x46,0x2b,0x37,0x97,0x50,0xe9,0x75,0xf3,0x31,0x79,0x46,0x15, -0xf4,0x7f,0x79,0xf0,0x45,0xff,0x00,0xec,0x29,0xe2,0x18,0x81,0x31,0x5b,0x5a,0x4d, -0x8e,0xd1,0xdc,0x00,0x4f,0xe7,0x8a,0xc0,0xba,0xfd,0x89,0xbc,0x5d,0x10,0x24,0x69, -0x12,0x71,0xfd,0xcb,0x84,0x3f,0xc9,0xab,0xf4,0x5b,0x14,0x98,0x35,0x1f,0xd9,0xb4, -0xfa,0x49,0x9c,0xf2,0xc8,0xf0,0xd2,0xea,0xff,0x00,0x0f,0xf2,0x3f,0x33,0x2f,0xbf, -0x64,0xaf,0x18,0x59,0x96,0x1f,0xd8,0xda,0x96,0x47,0xfc,0xf3,0x8d,0x98,0x7e,0x60, -0x56,0x15,0xdf,0xec,0xe7,0xe2,0xcb,0x30,0x49,0xd3,0xf5,0x38,0xc0,0xea,0x5a,0xdd, -0xb1,0xfc,0xab,0xf5,0x47,0x14,0x9b,0x73,0xd6,0xb3,0x79,0x6f,0x6a,0x8c,0xe5,0x97, -0x0e,0xe1,0xe5,0xd7,0xf0,0x47,0xe4,0xbd,0xcf,0xc2,0x3f,0x11,0xd9,0x83,0x93,0x70, -0x9f,0xef,0x46,0x45,0x51,0x93,0xc0,0xfe,0x25,0xb7,0xe9,0x23,0xf1,0xea,0xa6,0xbf, -0x5c,0xde,0xde,0x39,0x06,0x19,0x15,0x87,0xa3,0x0c,0xd5,0x3b,0x8f,0x0f,0x69,0x77, -0x9f,0xeb,0xf4,0xeb,0x49,0xbf,0xdf,0x81,0x5b,0xf9,0x8a,0xcd,0xe5,0xd3,0xe9,0x3f, -0xc0,0xe3,0x9f,0x0b,0xd0,0x97,0x6f,0xbb,0xfe,0x09,0xf9,0x24,0xda,0x1f,0x8a,0x2d, -0xfb,0x96,0xc7,0xd6,0xa3,0x2b,0xe2,0x58,0x3a,0xc5,0xbb,0xe8,0x6b,0xf5,0x7a,0xe3, -0xe1,0xb7,0x85,0x6e,0xb3,0xe6,0xf8,0x7b,0x4d,0x6c,0xf5,0x3f,0x66,0x40,0x7f,0x41, -0x59,0x57,0x5f,0x04,0x7c,0x0f,0x77,0xf7,0xfc,0x3b,0x68,0x3d,0x76,0xee,0x5f,0xe4, -0x6b,0x27,0x96,0xd5,0xee,0x99,0xc7,0x2e,0x14,0xa6,0xf6,0xb7,0xe2,0x7e,0x5a,0xff, -0x00,0x6a,0xf8,0x86,0x1f,0xbd,0x6a,0xc7,0x1e,0x94,0xe1,0xe2,0x9d,0x62,0x2f,0xbf, -0x67,0x27,0xfd,0xf3,0x5f,0xa6,0x37,0x7f,0xb3,0x5f,0x80,0x2e,0xff,0x00,0xe6,0x0c, -0x61,0xff,0x00,0xae,0x73,0x3f,0xf5,0x26,0xb1,0xee,0xbf,0x64,0xbf,0x01,0xdc,0x92, -0x56,0x1b,0xd8,0x7d,0x92,0x65,0xfe,0xaa,0x6b,0x17,0x96,0xd5,0xfe,0x58,0x9c,0xb2, -0xe1,0x3e,0xcb,0xf1,0x7f,0xe4,0x7e,0x74,0x8f,0x1c,0xde,0xc6,0x7e,0x7b,0x59,0x07, -0xe0,0x6a,0x54,0xf8,0x88,0xeb,0xf7,0xe2,0x71,0xf9,0xd7,0xde,0xd7,0xbf,0xb1,0x87, -0x85,0x27,0xcf,0x91,0x7f,0x79,0x0f,0xfb,0xea,0xaf,0xfe,0x15,0x89,0x75,0xfb,0x0e, -0x68,0xf2,0x92,0x63,0xd7,0x18,0x7b,0x35,0xa0,0x3f,0xfb,0x3d,0x61,0x2c,0xb6,0xa7, -0x5a,0x6b,0xef,0x39,0xa5,0xc2,0xd5,0x97,0xc3,0x7f,0xbd,0x1f,0x16,0xc7,0xf1,0x1e, -0x2e,0xe0,0x8a,0xb3,0x1f,0xc4,0x4b,0x66,0xea,0xf5,0xf5,0x5e,0xa1,0xfb,0x08,0x29, -0xcf,0xd9,0xb5,0x6b,0x39,0x07,0x6f,0x36,0x16,0x5f,0xe5,0x9a,0xe7,0xee,0xff,0x00, -0x60,0xbd,0x4c,0x82,0x52,0xe7,0x4a,0x7f,0x6d,0xce,0x3f,0xf6,0x4a,0xc2,0x59,0x6b, -0xeb,0x49,0x9c,0xd2,0xe1,0xcc,0x5c,0x76,0x72,0xfc,0x19,0xf3,0xec,0x7e,0x3d,0xb4, -0x7c,0x66,0x40,0x3e,0xb5,0x66,0x3f,0x1a,0xd9,0xbe,0x3f,0x7a,0xb5,0xea,0xfa,0x87, -0xec,0x2f,0xe2,0x58,0x58,0x88,0xac,0x6d,0xe7,0x03,0xbc,0x57,0x0a,0x07,0xea,0x45, -0x61,0x5e,0x7e,0xc5,0x3e,0x2f,0x81,0x49,0x1a,0x3c,0xa7,0x1f,0xf3,0xce,0x74,0x6f, -0xe4,0xd5,0x83,0xcb,0xa3,0xd6,0x9c,0x97,0xc8,0xe7,0x96,0x49,0x8e,0x8e,0xd2,0x7f, -0xf8,0x09,0xc6,0xc7,0xe2,0xcb,0x47,0xc7,0xef,0x53,0xf3,0xa9,0xd3,0xc4,0x76,0xaf, -0xd2,0x45,0x3f,0x8d,0x5d,0xbc,0xfd,0x93,0x7c,0x61,0x66,0x0b,0x7f,0x62,0xea,0x60, -0x7f,0xb1,0x13,0x37,0xf2,0x15,0x87,0x79,0xfb,0x3b,0xf8,0xb2,0xc7,0xef,0xe9,0xfa, -0x9c,0x5f,0xef,0xdb,0xb0,0xfe,0x95,0xce,0xf0,0x14,0x97,0x46,0xbe,0x47,0x3c,0xb2, -0xec,0x74,0x3e,0xd7,0xe0,0xcd,0x55,0xd6,0xad,0xdb,0xf8,0x87,0xe7,0x52,0x0d,0x4e, -0x06,0xfe,0x31,0x5c,0x6d,0xc7,0xc2,0x9f,0x10,0xda,0x31,0x52,0xd3,0xa1,0x07,0x18, -0x68,0xc8,0xaa,0x72,0x78,0x23,0xc4,0x96,0xfd,0x24,0x63,0x8f,0xf6,0x4d,0x66,0xf0, -0x34,0xba,0x48,0xc1,0xe1,0x71,0xb1,0xec,0xcf,0x41,0x17,0xf0,0xff,0x00,0x7a,0x9e, -0xb7,0x91,0xf6,0x7f,0xd6,0xbc,0xd1,0xb4,0x4f,0x13,0x41,0xdc,0x9f,0x6e,0x69,0xa4, -0x78,0x96,0x0e,0xb1,0x16,0xfc,0x6b,0x37,0x97,0xc5,0xed,0x22,0x7d,0x9e,0x35,0x7d, -0x84,0xfe,0x67,0xa8,0xad,0xe0,0x1d,0x25,0x23,0xf1,0xa9,0x93,0x50,0x95,0x7e,0xed, -0xc3,0x8f,0xa3,0x57,0x93,0xff,0x00,0x6a,0xf8,0x82,0x1f,0xbd,0x6a,0xc7,0x1e,0x94, -0xa3,0xc5,0x3a,0xbc,0x5f,0x7e,0xd2,0x4f,0xfb,0xe6,0xa1,0xe5,0xcf,0xa4,0x90,0x73, -0x62,0xe3,0xbd,0x37,0xf7,0x9e,0xbd,0x1e,0xb5,0x7b,0x11,0xf9,0x2e,0xe4,0x1f,0x47, -0x35,0x65,0x3c,0x55,0xaa,0xc7,0xf7,0x6f,0xa5,0xff,0x00,0xbe,0x8d,0x78,0xe0,0xf1, -0xcd,0xe4,0x7f,0x7e,0xda,0x41,0xff,0x00,0x01,0x35,0x2a,0x7c,0x44,0x61,0xf7,0xa2, -0x71,0x51,0xfd,0x9f,0x55,0x6c,0xff,0x00,0x11,0xac,0x5e,0x26,0x3b,0xc2,0x47,0xb4, -0xc3,0xe3,0xcd,0x72,0x0f,0xbb,0x7d,0x27,0xe2,0x6a,0xec,0x3f,0x14,0x7c,0x43,0x0e, -0x31,0x7a,0xe7,0xea,0x6b,0xc4,0x13,0xe2,0x3c,0x47,0x19,0xdd,0x56,0xa3,0xf8,0x89, -0x6c,0x71,0x97,0x22,0x8f,0xa9,0xe2,0x63,0xb5,0xfe,0xf3,0x45,0x9a,0x57,0x86,0xfc, -0xcb,0xef,0x3d,0xda,0xdf,0xe3,0x4f,0x89,0x20,0xc6,0x2e,0x4f,0xe6,0x6b,0x46,0xdb, -0xe3,0xff,0x00,0x88,0xa0,0xc6,0x64,0x2c,0x7d,0x77,0x57,0x81,0x47,0xe3,0xdb,0x46, -0xff,0x00,0x96,0x95,0x66,0x3f,0x1a,0xda,0x37,0xfc,0xb5,0x5a,0x7c,0x98,0xc8,0x6d, -0x27,0xf7,0x9b,0x47,0x3c,0xad,0x1f,0xb6,0xfe,0xe3,0xe8,0x8b,0x7f,0xda,0x53,0x5f, -0x8b,0x86,0x27,0x1e,0xcd,0x5a,0x96,0xdf,0xb5,0x26,0xab,0x10,0x1b,0xe3,0x63,0xf5, -0x35,0xf3,0x5c,0x7e,0x2d,0xb4,0x7e,0x92,0xaf,0xe7,0x53,0xaf,0x88,0xed,0x5f,0xa3, -0xaf,0xe7,0x56,0xab,0xe3,0xe1,0xb4,0xd9,0xd3,0x1e,0x22,0xac,0xbf,0xe5,0xe1,0xf5, -0x0d,0xb7,0xed,0x59,0x73,0x91,0xe6,0xa1,0xff,0x00,0xbe,0x45,0x6b,0x5b,0x7e,0xd5, -0xb0,0xb6,0x03,0xc2,0x3e,0xa4,0x57,0xc9,0xc9,0xad,0xdb,0xbf,0xf1,0x8f,0xce,0xa5, -0x5d,0x52,0x06,0xfe,0x2a,0xb5,0x98,0x66,0x10,0xfb,0x6f,0xee,0x3a,0xe1,0xc4,0x95, -0x97,0xdb,0x47,0xd8,0x16,0xbf,0xb5,0x26,0x9a,0xc3,0xf7,0xa8,0xbf,0x91,0xad,0x4b, -0x6f,0xda,0x5b,0x44,0x9b,0x19,0x0a,0x3f,0x1a,0xf8,0xb4,0x6a,0x30,0x9e,0x77,0x0a, -0x6b,0xea,0xb0,0x20,0x3f,0x3f,0xeb,0x5b,0x47,0x36,0xc7,0xad,0x2f,0x7f,0x91,0xd4, -0xb8,0x9e,0xac,0x77,0x68,0xfb,0xa2,0xdf,0xf6,0x84,0xf0,0xec,0xa0,0x66,0x50,0x0f, -0xb3,0x0a,0xb7,0x37,0xc7,0x8f,0x0d,0x43,0x6e,0x65,0x7b,0x8c,0x01,0xdb,0x70,0xcd, -0x7e,0x7b,0xdf,0xf8,0xce,0xd6,0xc9,0x09,0x33,0x85,0xc7,0xfb,0x55,0xc0,0x78,0x93, -0xe2,0xcc,0x80,0x34,0x76,0x92,0xb1,0x27,0xbe,0x6b,0xd5,0xa1,0x8f,0xcc,0x2a,0xbd, -0x52,0x17,0xfa,0xd9,0x56,0x4f,0x96,0x9d,0x3e,0x66,0x7b,0xb7,0xed,0x37,0xf1,0xc6, -0xcf,0x5f,0xd5,0xee,0xe4,0xb5,0x93,0x31,0x74,0x8c,0x1e,0xb5,0xf2,0xd7,0x87,0x3c, -0x2b,0xaf,0xfc,0x6d,0xf1,0xe6,0x9f,0xe1,0x8d,0x0a,0x16,0xb8,0xd4,0x35,0x09,0x76, -0x6e,0xfe,0x08,0x63,0xcf,0xcd,0x23,0x9e,0xca,0xa3,0x24,0x9f,0x6f,0x5a,0x93,0xc2, -0xbe,0x13,0xf1,0x57,0xc6,0x6f,0x16,0x41,0xa3,0x68,0x36,0x13,0x6a,0xba,0x95,0xc3, -0x70,0x89,0xf7,0x51,0x7b,0xbb,0xb1,0xe1,0x54,0x77,0x27,0xfa,0x8a,0xfd,0x46,0xfd, -0x97,0x3f,0x65,0xdd,0x1b,0xf6,0x79,0xf0,0xdb,0x39,0x31,0xea,0x5e,0x2b,0xbe,0x41, -0xfd,0xa1,0xa9,0xe3,0x8c,0x75,0xf2,0xa2,0xcf,0x21,0x01,0xfc,0x58,0xf2,0x7b,0x01, -0xe9,0x61,0x70,0xaf,0x99,0xce,0x5b,0xbd,0x5b,0x34,0xcb,0x30,0x15,0x73,0x1c,0x53, -0xc6,0x62,0x3f,0xe0,0x7a,0x23,0xd2,0xfe,0x17,0x7c,0x3e,0xd3,0x7e,0x15,0xf8,0x03, -0x44,0xf0,0xa6,0x92,0x81,0x6c,0x74,0xbb,0x65,0x81,0x5b,0x1c,0xbb,0x75,0x67,0x3e, -0xec,0xc4,0x93,0xf5,0xae,0xaa,0x90,0x0c,0x52,0xd7,0xd0,0x25,0x6d,0x0f,0xd2,0xd2, -0xb2,0xb2,0x0a,0x28,0xa2,0x81,0x85,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14,0x51,0x40,0x05,0x14, -0x51,0x40,0x05,0x14,0x51,0x40,0x09,0x46,0x29,0x68,0xa0,0x04,0xc5,0x18,0xa5,0xa2, -0x80,0x13,0x6d,0x26,0xda,0x75,0x14,0x01,0x13,0xda,0xc3,0x26,0x77,0xc4,0x8d,0x9e, -0xb9,0x50,0x6a,0x8d,0xc7,0x86,0xb4,0x9b,0xa0,0x44,0xda,0x5d,0x9c,0xca,0x7a,0x89, -0x20,0x43,0xfd,0x2b,0x4e,0x8a,0x97,0x18,0xbd,0xd1,0x2e,0x31,0x7b,0xa3,0x98,0xb9, -0xf8,0x65,0xe1,0x3b,0xb1,0xfb,0xdf,0x0e,0xe9,0xa7,0xe9,0x6c,0x8b,0xfc,0x85,0x65, -0xdd,0x7c,0x0e,0xf0,0x35,0xd9,0x26,0x4f,0x0e,0x5a,0x0f,0xf7,0x37,0x27,0xf2,0x22, -0xbb,0xba,0x2b,0x37,0x42,0x93,0xde,0x2b,0xee,0x31,0x78,0x7a,0x32,0xde,0x0b,0xee, -0x47,0x96,0x5d,0xfe,0xcc,0xfe,0x00,0xbb,0x24,0xff,0x00,0x64,0x34,0x24,0xff,0x00, -0xcf,0x39,0x9b,0x8f,0xcc,0x9a,0xc7,0xba,0xfd,0x91,0xfc,0x0b,0x71,0xf7,0x12,0xf6, -0x13,0xfe,0xcc,0xaa,0x7f,0x9a,0xd7,0xb5,0xd1,0x59,0x3c,0x25,0x07,0xf6,0x11,0x8b, -0xc0,0xe1,0x9f,0xfc,0xbb,0x47,0xcf,0x37,0xbf,0xb1,0x77,0x85,0x67,0x27,0xc8,0xd4, -0x2e,0xe1,0x1e,0x8e,0x88,0xff,0x00,0xcb,0x15,0x8b,0x75,0xfb,0x0d,0x69,0x12,0xe7, -0xcb,0xd7,0x58,0x7a,0x6f,0xb4,0x07,0xff,0x00,0x66,0xaf,0xa8,0x28,0xac,0xde,0x07, -0x0e,0xfe,0xcf,0xe6,0x64,0xf2,0xcc,0x2b,0xfb,0x1f,0x8b,0x3e,0x3e,0xbf,0xfd,0x84, -0x1c,0x93,0xf6,0x7d,0x56,0xc6,0x40,0x7f,0xe7,0xac,0x4c,0xbf,0xc8,0x1a,0xc1,0xbd, -0xfd,0x83,0x35,0x65,0xc9,0x8e,0xe7,0x4b,0x97,0xe8,0xee,0x0f,0xea,0xa2,0xbe,0xdf, -0xa4,0x6e,0x95,0x93,0xcb,0xa8,0x74,0xbf,0xde,0x60,0xf2,0x8c,0x2b,0xe8,0xfe,0xf3, -0xe0,0x0b,0xef,0xd8,0x67,0xc4,0xd1,0x93,0xe5,0xe9,0xf0,0x4c,0x3f,0xe9,0x95,0xc2, -0x0f,0xe6,0x45,0x61,0x5e,0x7e,0xc5,0x7e,0x30,0xb7,0x04,0x8d,0x16,0x63,0xff,0x00, -0x5c,0xe7,0x46,0xfe,0x4c,0x6b,0xf4,0x6c,0x75,0xa0,0x75,0xac,0xde,0x5d,0x4f,0xa4, -0x99,0xcf,0x2c,0x8f,0x0c,0xfa,0xbf,0xc3,0xfc,0x8f,0xcc,0x3b,0xcf,0xd9,0x53,0xc5, -0xd6,0x8c,0x41,0xd1,0x35,0x51,0x8f,0xee,0xc0,0xec,0x3f,0x30,0x2b,0x16,0xfb,0xf6, -0x7b,0xf1,0x56,0x9e,0xa5,0xa4,0xb1,0xd4,0xa1,0x03,0xbb,0xc0,0xc3,0xfa,0x57,0xea, -0xb8,0xe9,0x4d,0x3c,0xd4,0x3c,0xbb,0xb4,0xd9,0xcb,0x2e,0x1d,0xc3,0xbe,0xbf,0x82, -0x3f,0x24,0x67,0xf8,0x59,0xaf,0xda,0x9c,0x16,0x99,0x7f,0xde,0x42,0x2a,0xa3,0xf8, -0x2b,0xc4,0x50,0x1e,0x25,0x6f,0xc4,0x1a,0xfd,0x75,0x96,0xd6,0x19,0x57,0xe7,0x89, -0x1f,0xfd,0xe5,0x06,0xb3,0x2f,0x3c,0x37,0xa4,0x5d,0xff,0x00,0xaf,0xd2,0xec,0xa6, -0xff,0x00,0xae,0x96,0xe8,0xdf,0xcc,0x57,0x34,0xf0,0x72,0x8f,0xdb,0xfc,0x3f,0xe0, -0x9e,0x65,0x5e,0x1d,0xc3,0xc7,0xb7,0xdd,0xff,0x00,0x04,0xfc,0x94,0x9b,0x44,0xf1, -0x2c,0x2b,0xc3,0x13,0xf4,0xcd,0x64,0x5d,0xe8,0x9e,0x28,0x94,0x13,0x99,0x31,0xec, -0x09,0xaf,0xd4,0x6f,0x14,0x78,0x37,0x40,0x44,0x98,0xae,0x87,0xa6,0x83,0x8e,0xa2, -0xd2,0x3f,0xf0,0xac,0x0f,0x06,0xf8,0x4b,0x43,0x9e,0xf1,0xd6,0x5d,0x1b,0x4f,0x91, -0x72,0x38,0x7b,0x54,0x23,0xf9,0x57,0x1c,0x63,0x25,0x2b,0x2b,0x7d,0xc7,0x8f,0x2c, -0x97,0x0c,0xa5,0xca,0x92,0xfb,0x8f,0xcc,0x9b,0x2f,0x86,0x9e,0x2d,0xf1,0x2d,0xd8, -0xb7,0xb3,0xd3,0xef,0x75,0x19,0xd8,0xf1,0x15,0xbc,0x4c,0xed,0xcf,0xb0,0x15,0xf4, -0x27,0xc2,0x4f,0xf8,0x27,0x6f,0x8a,0x7c,0x4d,0x3c,0x37,0x7e,0x31,0xb9,0x5f,0x0d, -0xe9,0x99,0x05,0xa0,0x52,0x24,0xba,0x71,0xd7,0x85,0x1f,0x2a,0xfd,0x58,0xe4,0x7f, -0x76,0xbf,0x46,0x74,0xed,0x2e,0xcf,0x4c,0xb7,0x58,0xac,0xed,0x20,0xb4,0x8c,0x0e, -0x12,0x08,0xd5,0x00,0xfc,0x00,0xab,0x8b,0x5e,0xfd,0x1c,0x3d,0xd2,0x94,0xdd,0xcf, -0xa2,0xc0,0xf0,0xed,0x18,0x5a,0x75,0x26,0xe4,0xbb,0x5a,0xc8,0xe2,0x7e,0x16,0xfc, -0x1b,0xf0,0xa7,0xc1,0xcd,0x0c,0x69,0x9e,0x18,0xd2,0xe3,0xb3,0x46,0x03,0xce,0xb8, -0x6f,0x9a,0x79,0xc8,0xef,0x23,0xf5,0x3f,0x4e,0x83,0xb0,0x15,0xdb,0x8e,0x28,0x1d, -0x29,0x6b,0xd0,0x49,0x25,0x64,0x7d,0x8c,0x29,0xc6,0x9c,0x54,0x20,0xac,0x90,0x51, -0x45,0x14,0xcd,0x02,0x8a,0x28,0xa0,0x0f,0xff,0xd9,}; - -static const unsigned int dummy_align__runtime_shtml = 3; -static const unsigned char data__runtime_shtml[] = { -/* /runtime.shtml (15 chars) */ -0x2f,0x72,0x75,0x6e,0x74,0x69,0x6d,0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x00,0x00, - -/* HTTP header */ -/* "HTTP/1.0 200 OK -" (17 bytes) */ -0x48,0x54,0x54,0x50,0x2f,0x31,0x2e,0x30,0x20,0x32,0x30,0x30,0x20,0x4f,0x4b,0x0d, -0x0a, -/* "Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) -" (63 bytes) */ -0x53,0x65,0x72,0x76,0x65,0x72,0x3a,0x20,0x6c,0x77,0x49,0x50,0x2f,0x31,0x2e,0x33, -0x2e,0x31,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x61,0x76,0x61,0x6e, -0x6e,0x61,0x68,0x2e,0x6e,0x6f,0x6e,0x67,0x6e,0x75,0x2e,0x6f,0x72,0x67,0x2f,0x70, -0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x77,0x69,0x70,0x29,0x0d,0x0a, -/* "Content-type: text/html -Expires: Fri, 10 Apr 2008 14:00:00 GMT -Pragma: no-cache - -" (85 bytes) */ -0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65, -0x78,0x74,0x2f,0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x45,0x78,0x70,0x69,0x72,0x65,0x73, -0x3a,0x20,0x46,0x72,0x69,0x2c,0x20,0x31,0x30,0x20,0x41,0x70,0x72,0x20,0x32,0x30, -0x30,0x38,0x20,0x31,0x34,0x3a,0x30,0x30,0x3a,0x30,0x30,0x20,0x47,0x4d,0x54,0x0d, -0x0a,0x50,0x72,0x61,0x67,0x6d,0x61,0x3a,0x20,0x6e,0x6f,0x2d,0x63,0x61,0x63,0x68, -0x65,0x0d,0x0a,0x0d,0x0a, -/* raw file data (758 bytes) */ -0x3c,0x21,0x44,0x4f,0x43,0x54,0x59,0x50,0x45,0x20,0x48,0x54,0x4d,0x4c,0x20,0x50, -0x55,0x42,0x4c,0x49,0x43,0x20,0x22,0x2d,0x2f,0x2f,0x57,0x33,0x43,0x2f,0x2f,0x44, -0x54,0x44,0x20,0x48,0x54,0x4d,0x4c,0x20,0x34,0x2e,0x30,0x31,0x20,0x54,0x72,0x61, -0x6e,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2f,0x2f,0x45,0x4e,0x22,0x20,0x22, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72, -0x67,0x2f,0x54,0x52,0x2f,0x68,0x74,0x6d,0x6c,0x34,0x2f,0x6c,0x6f,0x6f,0x73,0x65, -0x2e,0x64,0x74,0x64,0x22,0x3e,0x0d,0x0a,0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x20,0x20,0x3c,0x74, -0x69,0x74,0x6c,0x65,0x3e,0x46,0x72,0x65,0x65,0x52,0x54,0x4f,0x53,0x2e,0x6f,0x72, -0x67,0x20,0x6c,0x77,0x49,0x50,0x20,0x57,0x45,0x42,0x20,0x73,0x65,0x72,0x76,0x65, -0x72,0x20,0x64,0x65,0x6d,0x6f,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e,0x0d,0x0a, -0x20,0x20,0x3c,0x2f,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x20,0x20,0x3c,0x42,0x4f, -0x44,0x59,0x20,0x6f,0x6e,0x4c,0x6f,0x61,0x64,0x3d,0x22,0x77,0x69,0x6e,0x64,0x6f, -0x77,0x2e,0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x26,0x71,0x75, -0x6f,0x74,0x3b,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x68,0x72,0x65,0x66, -0x3d,0x27,0x72,0x75,0x6e,0x74,0x69,0x6d,0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x27, -0x26,0x71,0x75,0x6f,0x74,0x3b,0x2c,0x32,0x30,0x30,0x30,0x29,0x22,0x3e,0x0d,0x0a, -0x3c,0x66,0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65,0x3d,0x22,0x61,0x72,0x69,0x61, -0x6c,0x22,0x3e,0x0d,0x0a,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x69,0x6e, -0x64,0x65,0x78,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x54,0x61,0x73,0x6b,0x20, -0x53,0x74,0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62,0x3e,0x7c,0x3c,0x2f, -0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22,0x72,0x75,0x6e,0x74, -0x69,0x6d,0x65,0x2e,0x73,0x68,0x74,0x6d,0x6c,0x22,0x3e,0x52,0x75,0x6e,0x20,0x54, -0x69,0x6d,0x65,0x20,0x53,0x74,0x61,0x74,0x73,0x3c,0x2f,0x61,0x3e,0x20,0x3c,0x62, -0x3e,0x7c,0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x22, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x66,0x72,0x65,0x65,0x72, -0x74,0x6f,0x73,0x2e,0x6f,0x72,0x67,0x2f,0x22,0x3e,0x46,0x72,0x65,0x65,0x52,0x54, -0x4f,0x53,0x20,0x48,0x6f,0x6d,0x65,0x70,0x61,0x67,0x65,0x3c,0x2f,0x61,0x3e,0x20, -0x3c,0x62,0x3e,0x7c,0x3c,0x2f,0x62,0x3e,0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66, -0x3d,0x22,0x6c,0x6f,0x67,0x6f,0x2e,0x6a,0x70,0x67,0x22,0x3e,0x33,0x37,0x4b,0x20, -0x6a,0x70,0x67,0x3c,0x2f,0x61,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e, -0x0d,0x0a,0x3c,0x68,0x72,0x3e,0x0d,0x0a,0x3c,0x62,0x72,0x3e,0x3c,0x70,0x3e,0x0d, -0x0a,0x3c,0x68,0x32,0x3e,0x52,0x75,0x6e,0x2d,0x74,0x69,0x6d,0x65,0x20,0x73,0x74, -0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x73,0x3c,0x2f,0x68,0x32,0x3e,0x0d,0x0a,0x50, -0x61,0x67,0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x72,0x65,0x66,0x72,0x65,0x73,0x68, -0x20,0x65,0x76,0x65,0x72,0x79,0x20,0x32,0x20,0x73,0x65,0x63,0x6f,0x6e,0x64,0x73, -0x2e,0x3c,0x70,0x3e,0x0d,0x0a,0x3c,0x66,0x6f,0x6e,0x74,0x20,0x66,0x61,0x63,0x65, -0x3d,0x22,0x63,0x6f,0x75,0x72,0x69,0x65,0x72,0x22,0x3e,0x3c,0x70,0x72,0x65,0x3e, -0x54,0x61,0x73,0x6b,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x41,0x62,0x73,0x20,0x54,0x69,0x6d,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x25,0x20, -0x54,0x69,0x6d,0x65,0x3c,0x62,0x72,0x3e,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x3c,0x62,0x72,0x3e,0x0d,0x0a,0x3c,0x21,0x2d,0x2d,0x23,0x72,0x75,0x6e,0x5f,0x73, -0x74,0x61,0x74,0x73,0x2d,0x2d,0x3e,0x0d,0x0d,0x0a,0x3c,0x2f,0x70,0x72,0x65,0x3e, -0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e,0x0d,0x0a,0x3c,0x2f,0x66,0x6f,0x6e,0x74,0x3e, -0x0d,0x0a,0x3c,0x2f,0x62,0x6f,0x64,0x79,0x3e,0x0d,0x0a,0x3c,0x2f,0x68,0x74,0x6d, -0x6c,0x3e,0x0d,0x0a,0x0d,0x0a,}; - - - -const struct fsdata_file file__404_html[] = { { -file_NULL, -data__404_html, -data__404_html + 12, -sizeof(data__404_html) - 12, -1, -}}; - -const struct fsdata_file file__index_shtml[] = { { -file__404_html, -data__index_shtml, -data__index_shtml + 16, -sizeof(data__index_shtml) - 16, -1, -}}; - -const struct fsdata_file file__logo_jpg[] = { { -file__index_shtml, -data__logo_jpg, -data__logo_jpg + 12, -sizeof(data__logo_jpg) - 12, -1, -}}; - -const struct fsdata_file file__runtime_shtml[] = { { -file__logo_jpg, -data__runtime_shtml, -data__runtime_shtml + 16, -sizeof(data__runtime_shtml) - 16, -1, -}}; - -#define FS_ROOT file__runtime_shtml -#define FS_NUMFILES 4 - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata deleted file mode 100644 index 37b4203e6..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/perl - -open(OUTPUT, "> fsdata.c"); - -chdir("fs"); -open(FILES, "find . -type f |"); - -while($file = ) { - - # Do not include files in CVS directories nor backup files. - if($file =~ /(CVS|~)/) { - next; - } - - chop($file); - - open(HEADER, "> /tmp/header") || die $!; - if($file =~ /404/) { - print(HEADER "HTTP/1.0 404 File not found\r\n"); - } else { - print(HEADER "HTTP/1.0 200 OK\r\n"); - } - print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n"); - if($file =~ /\.html$/) { - print(HEADER "Content-type: text/html\r\n"); - } elsif($file =~ /\.gif$/) { - print(HEADER "Content-type: image/gif\r\n"); - } elsif($file =~ /\.png$/) { - print(HEADER "Content-type: image/png\r\n"); - } elsif($file =~ /\.jpg$/) { - print(HEADER "Content-type: image/jpeg\r\n"); - } elsif($file =~ /\.class$/) { - print(HEADER "Content-type: application/octet-stream\r\n"); - } elsif($file =~ /\.ram$/) { - print(HEADER "Content-type: audio/x-pn-realaudio\r\n"); - } else { - print(HEADER "Content-type: text/plain\r\n"); - } - print(HEADER "\r\n"); - close(HEADER); - - unless($file =~ /\.plain$/ || $file =~ /cgi/) { - system("cat /tmp/header $file > /tmp/file"); - } else { - system("cp $file /tmp/file"); - } - - open(FILE, "/tmp/file"); - unlink("/tmp/file"); - unlink("/tmp/header"); - - $file =~ s/\.//; - $fvar = $file; - $fvar =~ s-/-_-g; - $fvar =~ s-\.-_-g; - print(OUTPUT "static const unsigned char data".$fvar."[] = {\n"); - print(OUTPUT "\t/* $file */\n\t"); - for($j = 0; $j < length($file); $j++) { - printf(OUTPUT "%#02x, ", unpack("C", substr($file, $j, 1))); - } - printf(OUTPUT "0,\n"); - - - $i = 0; - while(read(FILE, $data, 1)) { - if($i == 0) { - print(OUTPUT "\t"); - } - printf(OUTPUT "%#02x, ", unpack("C", $data)); - $i++; - if($i == 10) { - print(OUTPUT "\n"); - $i = 0; - } - } - print(OUTPUT "};\n\n"); - close(FILE); - push(@fvars, $fvar); - push(@files, $file); -} - -for($i = 0; $i < @fvars; $i++) { - $file = $files[$i]; - $fvar = $fvars[$i]; - - if($i == 0) { - $prevfile = "NULL"; - } else { - $prevfile = "file" . $fvars[$i - 1]; - } - print(OUTPUT "const struct fsdata_file file".$fvar."[] = {{$prevfile, data$fvar, "); - print(OUTPUT "data$fvar + ". (length($file) + 1) .", "); - print(OUTPUT "sizeof(data$fvar) - ". (length($file) + 1) ."}};\n\n"); -} - -print(OUTPUT "#define FS_ROOT file$fvars[$i - 1]\n\n"); -print(OUTPUT "#define FS_NUMFILES $i\n"); diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.c deleted file mode 100644 index b065caa08..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.c +++ /dev/null @@ -1,610 +0,0 @@ -/** - * makefsdata: Converts a directory structure for use with the lwIP httpd. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Jim Pettinato - * Simon Goldschmidt - * - * @todo: - * - take TCP_MSS, LWIP_TCP_TIMESTAMPS and - * PAYLOAD_ALIGN_TYPE/PAYLOAD_ALIGNMENT as arguments - */ - -#include -#include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include "windows.h" -#else -#include -#endif -#include -#include - -/* Compatibility defines Win32 vs. DOS */ -#ifdef WIN32 - -#define FIND_T WIN32_FIND_DATAA -#define FIND_T_FILENAME(fInfo) (fInfo.cFileName) -#define FIND_T_IS_DIR(fInfo) ((fInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) -#define FIND_T_IS_FILE(fInfo) ((fInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) -#define FIND_RET_T HANDLE -#define FINDFIRST_FILE(path, result) FindFirstFileA(path, result) -#define FINDFIRST_DIR(path, result) FindFirstFileA(path, result) -#define FINDNEXT(ff_res, result) FindNextFileA(ff_res, result) -#define FINDFIRST_SUCCEEDED(ret) (ret != INVALID_HANDLE_VALUE) -#define FINDNEXT_SUCCEEDED(ret) (ret == TRUE) - -#define GETCWD(path, len) GetCurrentDirectoryA(len, path) -#define CHDIR(path) SetCurrentDirectoryA(path) - -#define NEWLINE "\r\n" -#define NEWLINE_LEN 2 - -#else - -#define FIND_T struct fflbk -#define FIND_T_FILENAME(fInfo) (fInfo.ff_name) -#define FIND_T_IS_DIR(fInfo) ((fInfo.ff_attrib & FA_DIREC) == FA_DIREC) -#define FIND_T_IS_FILE(fInfo) (1) -#define FIND_RET_T int -#define FINDFIRST_FILE(path, result) findfirst(path, result, FA_ARCH) -#define FINDFIRST_DIR(path, result) findfirst(path, result, FA_DIREC) -#define FINDNEXT(ff_res, result) FindNextFileA(ff_res, result) -#define FINDFIRST_SUCCEEDED(ret) (ret == 0) -#define FINDNEXT_SUCCEEDED(ret) (ret == 0) - -#define GETCWD(path, len) getcwd(path, len) -#define CHDIR(path) chdir(path) - -#endif - -/* define this to get the header variables we use to build HTTP headers */ -#define LWIP_HTTPD_DYNAMIC_HEADERS 1 -#include "../httpd_structs.h" - -#include "../../../lwip-1.4.0/src/core/ipv4/inet_chksum.c" -#include "../../../lwip-1.4.0/src/core/def.c" - -/** (Your server name here) */ -const char *serverID = "Server: "HTTPD_SERVER_AGENT"\r\n"; - -/* change this to suit your MEM_ALIGNMENT */ -#define PAYLOAD_ALIGNMENT 4 -/* set this to 0 to prevent aligning payload */ -#define ALIGN_PAYLOAD 1 -/* define this to a type that has the required alignment */ -#define PAYLOAD_ALIGN_TYPE "unsigned int" -static int payload_alingment_dummy_counter = 0; - -#define HEX_BYTES_PER_LINE 16 - -#define MAX_PATH_LEN 256 - -#define COPY_BUFSIZE 10240 - -int process_sub(FILE *data_file, FILE *struct_file); -int process_file(FILE *data_file, FILE *struct_file, const char *filename); -int file_write_http_header(FILE *data_file, const char *filename, int file_size, - u16_t *http_hdr_len, u16_t *http_hdr_chksum); -int file_put_ascii(FILE *file, const char *ascii_string, int len, int *i); -int s_put_ascii(char *buf, const char *ascii_string, int len, int *i); -void concat_files(const char *file1, const char *file2, const char *targetfile); - -static unsigned char file_buffer_raw[COPY_BUFSIZE]; -/* 5 bytes per char + 3 bytes per line */ -static char file_buffer_c[COPY_BUFSIZE * 5 + ((COPY_BUFSIZE / HEX_BYTES_PER_LINE) * 3)]; - -char curSubdir[MAX_PATH_LEN]; -char lastFileVar[MAX_PATH_LEN]; -char hdr_buf[4096]; - -unsigned char processSubs = 1; -unsigned char includeHttpHeader = 1; -unsigned char useHttp11 = 0; -unsigned char precalcChksum = 0; - -int main(int argc, char *argv[]) -{ - FIND_T fInfo; - FIND_RET_T fret; - char path[MAX_PATH_LEN]; - char appPath[MAX_PATH_LEN]; - FILE *data_file; - FILE *struct_file; - int filesProcessed; - int i; - char targetfile[MAX_PATH_LEN]; - strcpy(targetfile, "fsdata.c"); - - memset(path, 0, sizeof(path)); - memset(appPath, 0, sizeof(appPath)); - - printf(NEWLINE " makefsdata - HTML to C source converter" NEWLINE); - printf(" by Jim Pettinato - circa 2003 " NEWLINE); - printf(" extended by Simon Goldschmidt - 2009 " NEWLINE NEWLINE); - - strcpy(path, "fs"); - for(i = 1; i < argc; i++) { - if (argv[i][0] == '-') { - if (strstr(argv[i], "-s")) { - processSubs = 0; - } else if (strstr(argv[i], "-e")) { - includeHttpHeader = 0; - } else if (strstr(argv[i], "-11")) { - useHttp11 = 1; - } else if (strstr(argv[i], "-c")) { - precalcChksum = 1; - } else if((argv[i][1] == 'f') && (argv[i][2] == ':')) { - strcpy(targetfile, &argv[i][3]); - printf("Writing to file \"%s\"\n", targetfile); - } - } else { - strcpy(path, argv[i]); - } - } - - /* if command line param or subdir named 'fs' not found spout usage verbiage */ - fret = FINDFIRST_DIR(path, &fInfo); - if (!FINDFIRST_SUCCEEDED(fret)) { - /* if no subdir named 'fs' (or the one which was given) exists, spout usage verbiage */ - printf(" Failed to open directory \"%s\"." NEWLINE NEWLINE, path); - printf(" Usage: htmlgen [targetdir] [-s] [-i] [-f:]" NEWLINE NEWLINE); - printf(" targetdir: relative or absolute path to files to convert" NEWLINE); - printf(" switch -s: toggle processing of subdirectories (default is on)" NEWLINE); - printf(" switch -e: exclude HTTP header from file (header is created at runtime, default is off)" NEWLINE); - printf(" switch -11: include HTTP 1.1 header (1.0 is default)" NEWLINE); - printf(" switch -c: precalculate checksums for all pages (default is off)" NEWLINE); - printf(" switch -f: target filename (default is \"fsdata.c\")" NEWLINE); - printf(" if targetdir not specified, htmlgen will attempt to" NEWLINE); - printf(" process files in subdirectory 'fs'" NEWLINE); - exit(-1); - } - - printf("HTTP %sheader will %s statically included." NEWLINE, - (includeHttpHeader ? (useHttp11 ? "1.1 " : "1.0 ") : ""), - (includeHttpHeader ? "be" : "not be")); - - sprintf(curSubdir, ""); /* start off in web page's root directory - relative paths */ - printf(" Processing all files in directory %s", path); - if (processSubs) { - printf(" and subdirectories..." NEWLINE NEWLINE); - } else { - printf("..." NEWLINE NEWLINE); - } - - GETCWD(appPath, MAX_PATH_LEN); - data_file = fopen("fsdata.tmp", "wb"); - if (data_file == NULL) { - printf("Failed to create file \"fsdata.tmp\"\n"); - exit(-1); - } - struct_file = fopen("fshdr.tmp", "wb"); - if (struct_file == NULL) { - printf("Failed to create file \"fshdr.tmp\"\n"); - exit(-1); - } - - CHDIR(path); - - fprintf(data_file, "#include \"fs.h\"" NEWLINE); - fprintf(data_file, "#include \"lwip/def.h\"" NEWLINE); - fprintf(data_file, "#include \"fsdata.h\"" NEWLINE NEWLINE NEWLINE); - - fprintf(data_file, "#define file_NULL (struct fsdata_file *) NULL" NEWLINE NEWLINE NEWLINE); - - sprintf(lastFileVar, "NULL"); - - filesProcessed = process_sub(data_file, struct_file); - - /* data_file now contains all of the raw data.. now append linked list of - * file header structs to allow embedded app to search for a file name */ - fprintf(data_file, NEWLINE NEWLINE); - fprintf(struct_file, "#define FS_ROOT file_%s" NEWLINE, lastFileVar); - fprintf(struct_file, "#define FS_NUMFILES %d" NEWLINE NEWLINE, filesProcessed); - - fclose(data_file); - fclose(struct_file); - - CHDIR(appPath); - /* append struct_file to data_file */ - printf(NEWLINE "Creating target file..." NEWLINE NEWLINE); - concat_files("fsdata.tmp", "fshdr.tmp", targetfile); - - /* if succeeded, delete the temporary files */ - remove("fsdata.tmp"); - remove("fshdr.tmp"); - - printf(NEWLINE "Processed %d files - done." NEWLINE NEWLINE, filesProcessed); - - return 0; -} - -static void copy_file(const char *filename_in, FILE *fout) -{ - FILE *fin; - size_t len; - fin = fopen(filename_in, "rb"); - if (fin == NULL) { - printf("Failed to open file \"%s\"\n", filename_in); - exit(-1); - } - - while((len = fread(file_buffer_raw, 1, COPY_BUFSIZE, fin)) > 0) - { - fwrite(file_buffer_raw, 1, len, fout); - } - fclose(fin); -} - -void concat_files(const char *file1, const char *file2, const char *targetfile) -{ - FILE *fout; - fout = fopen(targetfile, "wb"); - if (fout == NULL) { - printf("Failed to open file \"%s\"\n", targetfile); - exit(-1); - } - copy_file(file1, fout); - copy_file(file2, fout); - fclose(fout); -} - -int process_sub(FILE *data_file, FILE *struct_file) -{ - FIND_T fInfo; - FIND_RET_T fret; - int filesProcessed = 0; - char oldSubdir[MAX_PATH_LEN]; - - if (processSubs) { - /* process subs recursively */ - strcpy(oldSubdir, curSubdir); - fret = FINDFIRST_DIR("*", &fInfo); - if (FINDFIRST_SUCCEEDED(fret)) { - do { - const char *curName = FIND_T_FILENAME(fInfo); - if (curName == NULL) continue; - if (curName[0] == '.') continue; - if (strcmp(curName, "CVS") == 0) continue; - if (!FIND_T_IS_DIR(fInfo)) continue; - CHDIR(curName); - strcat(curSubdir, "/"); - strcat(curSubdir, curName); - printf(NEWLINE "processing subdirectory %s/..." NEWLINE, curSubdir); - filesProcessed += process_sub(data_file, struct_file); - CHDIR(".."); - strcpy(curSubdir, oldSubdir); - } while (FINDNEXT_SUCCEEDED(FINDNEXT(fret, &fInfo))); - } - } - - fret = FINDFIRST_FILE("*.*", &fInfo); - if (FINDFIRST_SUCCEEDED(fret)) { - /* at least one file in directory */ - do { - if (FIND_T_IS_FILE(fInfo)) { - const char *curName = FIND_T_FILENAME(fInfo); - printf("processing %s/%s..." NEWLINE, curSubdir, curName); - if (process_file(data_file, struct_file, curName) < 0) { - printf(NEWLINE "Error... aborting" NEWLINE); - return -1; - } - filesProcessed++; - } - } while (FINDNEXT_SUCCEEDED(FINDNEXT(fret, &fInfo))); - } - return filesProcessed; -} - -int get_file_size(const char* filename) -{ - FILE *inFile; - int file_size = -1; - inFile = fopen(filename, "rb"); - if (inFile == NULL) { - printf("Failed to open file \"%s\"\n", filename); - exit(-1); - } - fseek(inFile, 0, SEEK_END); - file_size = ftell(inFile); - fclose(inFile); - return file_size; -} - -void process_file_data(const char *filename, FILE *data_file) -{ - FILE *source_file; - size_t len, written, i, src_off=0; - - source_file = fopen(filename, "rb"); - - do { - size_t off = 0; - len = fread(file_buffer_raw, 1, COPY_BUFSIZE, source_file); - if (len > 0) { - for (i = 0; i < len; i++) { - sprintf(&file_buffer_c[off], "0x%02.2x,", file_buffer_raw[i]); - off += 5; - if ((++src_off % HEX_BYTES_PER_LINE) == 0) { - memcpy(&file_buffer_c[off], NEWLINE, NEWLINE_LEN); - off += NEWLINE_LEN; - } - } - written = fwrite(file_buffer_c, 1, off, data_file); - } - } while(len > 0); - fclose(source_file); -} - -int write_checksums(FILE *struct_file, const char *filename, const char *varname, - u16_t hdr_len, u16_t hdr_chksum) -{ - int chunk_size = TCP_MSS; - int offset; - size_t len; - int i = 0; - FILE *f; -#if LWIP_TCP_TIMESTAMPS - /* when timestamps are used, usable space is 12 bytes less per segment */ - chunk_size -= 12; -#endif - - fprintf(struct_file, "#if HTTPD_PRECALCULATED_CHECKSUM" NEWLINE); - fprintf(struct_file, "const struct fsdata_chksum chksums_%s[] = {" NEWLINE, varname); - - memset(file_buffer_raw, 0xab, sizeof(file_buffer_raw)); - f = fopen(filename, "rb"); - if (f == INVALID_HANDLE_VALUE) { - printf("Failed to open file \"%s\"\n", filename); - exit(-1); - } - if (hdr_len > 0) { - /* add checksum for HTTP header */ - fprintf(struct_file, "{%d, 0x%04x, %d}," NEWLINE, 0, hdr_chksum, hdr_len); - i++; - } - for (offset = hdr_len; ; offset += len) { - unsigned short chksum; - len = fread(file_buffer_raw, 1, chunk_size, f); - if (len == 0) { - break; - } - chksum = ~inet_chksum(file_buffer_raw, (u16_t)len); - /* add checksum for data */ - fprintf(struct_file, "{%d, 0x%04x, %d}," NEWLINE, offset, chksum, len); - i++; - } - fclose(f); - fprintf(struct_file, "};" NEWLINE); - fprintf(struct_file, "#endif /* HTTPD_PRECALCULATED_CHECKSUM */" NEWLINE); - return i; -} - -int process_file(FILE *data_file, FILE *struct_file, const char *filename) -{ - char *pch; - char varname[MAX_PATH_LEN]; - int i = 0; - char qualifiedName[MAX_PATH_LEN]; - int file_size; - u16_t http_hdr_chksum = 0; - u16_t http_hdr_len = 0; - int chksum_count = 0; - - /* create qualified name (TODO: prepend slash or not?) */ - sprintf(qualifiedName,"%s/%s", curSubdir, filename); - /* create C variable name */ - strcpy(varname, qualifiedName); - /* convert slashes & dots to underscores */ - while ((pch = strpbrk(varname, "./\\")) != NULL) { - *pch = '_'; - } -#if ALIGN_PAYLOAD - /* to force even alignment of array */ - fprintf(data_file, "static const " PAYLOAD_ALIGN_TYPE " dummy_align_%s = %d;" NEWLINE, varname, payload_alingment_dummy_counter++); -#endif /* ALIGN_PAYLOAD */ - fprintf(data_file, "static const unsigned char data_%s[] = {" NEWLINE, varname); - /* encode source file name (used by file system, not returned to browser) */ - fprintf(data_file, "/* %s (%d chars) */" NEWLINE, qualifiedName, strlen(qualifiedName)+1); - file_put_ascii(data_file, qualifiedName, strlen(qualifiedName)+1, &i); -#if ALIGN_PAYLOAD - /* pad to even number of bytes to assure payload is on aligned boundary */ - while(i % PAYLOAD_ALIGNMENT != 0) { - fprintf(data_file, "0x%02.2x,", 0); - i++; - } -#endif /* ALIGN_PAYLOAD */ - fprintf(data_file, NEWLINE); - - file_size = get_file_size(filename); - if (includeHttpHeader) { - file_write_http_header(data_file, filename, file_size, &http_hdr_len, &http_hdr_chksum); - } - if (precalcChksum) { - chksum_count = write_checksums(struct_file, filename, varname, http_hdr_len, http_hdr_chksum); - } - - /* build declaration of struct fsdata_file in temp file */ - fprintf(struct_file, "const struct fsdata_file file_%s[] = { {" NEWLINE, varname); - fprintf(struct_file, "file_%s," NEWLINE, lastFileVar); - fprintf(struct_file, "data_%s," NEWLINE, varname); - fprintf(struct_file, "data_%s + %d," NEWLINE, varname, i); - fprintf(struct_file, "sizeof(data_%s) - %d," NEWLINE, varname, i); - fprintf(struct_file, "%d," NEWLINE, includeHttpHeader); - if (precalcChksum) { - fprintf(struct_file, "#if HTTPD_PRECALCULATED_CHECKSUM" NEWLINE); - fprintf(struct_file, "%d, chksums_%s," NEWLINE, chksum_count, varname); - fprintf(struct_file, "#endif /* HTTPD_PRECALCULATED_CHECKSUM */" NEWLINE); - } - fprintf(struct_file, "}};" NEWLINE NEWLINE); - strcpy(lastFileVar, varname); - - /* write actual file contents */ - i = 0; - fprintf(data_file, NEWLINE "/* raw file data (%d bytes) */" NEWLINE, file_size); - process_file_data(filename, data_file); - fprintf(data_file, "};" NEWLINE NEWLINE); - - return 0; -} - -int file_write_http_header(FILE *data_file, const char *filename, int file_size, - u16_t *http_hdr_len, u16_t *http_hdr_chksum) -{ - int i = 0; - int response_type = HTTP_HDR_OK; - int file_type = HTTP_HDR_DEFAULT_TYPE; - const char *cur_string; - size_t cur_len; - int written = 0; - size_t hdr_len = 0; - u16_t acc; - const char *file_ext; - int j; - - memset(hdr_buf, 0, sizeof(hdr_buf)); - - if (useHttp11) { - response_type = HTTP_HDR_OK_11; - } - - fprintf(data_file, NEWLINE "/* HTTP header */"); - if (strstr(filename, "404") == filename) { - response_type = HTTP_HDR_NOT_FOUND; - if (useHttp11) { - response_type = HTTP_HDR_NOT_FOUND_11; - } - } else if (strstr(filename, "400") == filename) { - response_type = HTTP_HDR_BAD_REQUEST; - if (useHttp11) { - response_type = HTTP_HDR_BAD_REQUEST_11; - } - } else if (strstr(filename, "501") == filename) { - response_type = HTTP_HDR_NOT_IMPL; - if (useHttp11) { - response_type = HTTP_HDR_NOT_IMPL_11; - } - } - cur_string = g_psHTTPHeaderStrings[response_type]; - cur_len = strlen(cur_string); - fprintf(data_file, NEWLINE "/* \"%s\" (%d bytes) */" NEWLINE, cur_string, cur_len); - written += file_put_ascii(data_file, cur_string, cur_len, &i); - i = 0; - if (precalcChksum) { - memcpy(&hdr_buf[hdr_len], cur_string, cur_len); - hdr_len += cur_len; - } - - cur_string = serverID; - cur_len = strlen(cur_string); - fprintf(data_file, NEWLINE "/* \"%s\" (%d bytes) */" NEWLINE, cur_string, cur_len); - written += file_put_ascii(data_file, cur_string, cur_len, &i); - i = 0; - if (precalcChksum) { - memcpy(&hdr_buf[hdr_len], cur_string, cur_len); - hdr_len += cur_len; - } - - file_ext = filename; - while(strstr(file_ext, ".") != NULL) { - file_ext = strstr(file_ext, "."); - file_ext++; - } - if((file_ext == NULL) || (*file_ext == 0)) { - printf("failed to get extension for file \"%s\", using default.\n", filename); - } else { - for(j = 0; j < NUM_HTTP_HEADERS; j++) { - if(!strcmp(file_ext, g_psHTTPHeaders[j].extension)) { - file_type = g_psHTTPHeaders[j].headerIndex; - break; - } - } - if (j >= NUM_HTTP_HEADERS) { - printf("failed to get file type for extension \"%s\", using default.\n", file_ext); - file_type = HTTP_HDR_DEFAULT_TYPE; - } - } - - if (useHttp11) { - char intbuf[MAX_PATH_LEN]; - memset(intbuf, 0, sizeof(intbuf)); - - cur_string = g_psHTTPHeaderStrings[HTTP_HDR_CONTENT_LENGTH]; - cur_len = strlen(cur_string); - fprintf(data_file, NEWLINE "/* \"%s%d\r\n\" (%d+ bytes) */" NEWLINE, cur_string, file_size, cur_len+2); - written += file_put_ascii(data_file, cur_string, cur_len, &i); - if (precalcChksum) { - memcpy(&hdr_buf[hdr_len], cur_string, cur_len); - hdr_len += cur_len; - } - - _itoa(file_size, intbuf, 10); - strcat(intbuf, "\r\n"); - cur_len = strlen(intbuf); - written += file_put_ascii(data_file, intbuf, cur_len, &i); - i = 0; - if (precalcChksum) { - memcpy(&hdr_buf[hdr_len], intbuf, cur_len); - hdr_len += cur_len; - } - - cur_string = g_psHTTPHeaderStrings[HTTP_HDR_CONN_CLOSE]; - cur_len = strlen(cur_string); - fprintf(data_file, NEWLINE "/* \"%s\" (%d bytes) */" NEWLINE, cur_string, cur_len); - written += file_put_ascii(data_file, cur_string, cur_len, &i); - i = 0; - if (precalcChksum) { - memcpy(&hdr_buf[hdr_len], cur_string, cur_len); - hdr_len += cur_len; - } - } - - cur_string = g_psHTTPHeaderStrings[file_type]; - cur_len = strlen(cur_string); - fprintf(data_file, NEWLINE "/* \"%s\" (%d bytes) */" NEWLINE, cur_string, cur_len); - written += file_put_ascii(data_file, cur_string, cur_len, &i); - i = 0; - if (precalcChksum) { - memcpy(&hdr_buf[hdr_len], cur_string, cur_len); - hdr_len += cur_len; - - LWIP_ASSERT("hdr_len <= 0xffff", hdr_len <= 0xffff); - LWIP_ASSERT("strlen(hdr_buf) == hdr_len", strlen(hdr_buf) == hdr_len); - acc = ~inet_chksum(hdr_buf, (u16_t)hdr_len); - *http_hdr_len = (u16_t)hdr_len; - *http_hdr_chksum = acc; - } - - return written; -} - -int file_put_ascii(FILE *file, const char* ascii_string, int len, int *i) -{ - int x; - for(x = 0; x < len; x++) { - unsigned char cur = ascii_string[x]; - fprintf(file, "0x%02.2x,", cur); - if ((++(*i) % HEX_BYTES_PER_LINE) == 0) { - fprintf(file, NEWLINE); - } - } - return len; -} - -int s_put_ascii(char *buf, const char *ascii_string, int len, int *i) -{ - int x; - int idx = 0; - for(x = 0; x < len; x++) { - unsigned char cur = ascii_string[x]; - sprintf(&buf[idx], "0x%02.2x,", cur); - idx += 5; - if ((++(*i) % HEX_BYTES_PER_LINE) == 0) { - sprintf(&buf[idx], NEWLINE); - idx += NEWLINE_LEN; - } - } - return len; -} diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.exe b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.exe deleted file mode 100644 index 7d4271d0aa18c7f8eeb905dee82a49bce8ba89ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46592 zcmeHw3w%_?_5b9BAqEp_VzEZOBGCvW>}EHQ&FAj z-K1r`uC*;#>Q5^aYi-NV+SUqMv;iYTOD!rtMa7>{XuFtHsiqp0y8rK)d-oLrQf+_z zx1Ve>bLY;SIdkUBnKS2}nY~+k?Hw$MF_w%F3Nf}5SNc@)`1H{biqE z>YQIY!(n;*<<4T<>&5oNp)a><6dgnu#O@>OEZ(8B1YOdHBi{;1)3ppCne< z!vT36MEn}LNI-znQ7SWueOaz27f2T&iOrqDnDC7RmJ?TS`kVB`Bz8a|Z9>2TkEPqQ z!tG{6zf9M7z%7goaX1vb(uOD#u*8#bbP9~!P~b9~JSN5-EkOBtz$tLGA;f$t!MFkm zj5%un^AG}f$Tr6SAqlwt0=opL#xM{kSvoFvQ9AmmBsiDbMWk`wfrkvdV)sX3C{;=A zx-11q81=kSpks?G7EJE}G zr9Pp8$FD*(h48(879vG0qRR=mlHh(yAPWf9Q&eLvm6|B;UAn!OQVUgxUZdOhDe9wW z0F&w1y%4Hn9}#`OA_VCK{9`IDrzXEgw;dNFdU7$M2dUs&6g5+H9Yys7@}ojTW=PJl zcc^c7QQdqh_@o|D(*i_yQo$O68!1P$V+NuzD!u1CM7LAw2zACrAiL?-L!|wTNK;Tl za|mC5HKGfMVXHKV&ZfMzly@by(NER%#HNMB-6tt}hVrhY=oX^jca-|55YZJh9*k1U zsUaN|m6^O2yhv?4)vXM%w3CqH(5&Z=$=HfUR zO>*G>7Y;OuBRwO>p(q=gmj)is4243E(sI6&=zH&{`wU~WitIJK#6&}?-!L?sDjJ5w zRDbP|Z`}~{+>E=79ShUy#HJx}ezGz6I95d8Kx)R0!KB(Tf9;rP7~37p6l=$N-XQBM zX}8~iJYJ{g4ZyBnld{P7^e0t)PkUx(JYsn1QRJ~XgBxmJLd{&%V7rG>d3A=H-N#bT zCJe_`gH8hP>-XfG4p20t6R{(rVI-HgZy4hQjDV=PjLb6uv!cl?bgeGRNd)$jco!WInfKVzo9hEDw}XZk(wPc+lN5zhU5Go9uc zX1eNwf5l8cGrhv)xgT_LeNajIfS!zGeE^|Khy1111qYz5B;k{_7}Y`FmV#5Kn_?XQ z(J=lT!VhyQj6X78j$kHW{TZS4XN2o&-?|aL{y>fJ^=E{yKl(5kryUqxXQK7zNM!vv z0(p+A4lG|Wsw1-g9QpM1Cr-0dKf#mgzn-2aXErht)TfS5YPc8B9jS6RKEyJ53f1@N z_>4jSdwfpt#j0QGl5_MFT{=BJ4601t3`mho-5a1zY)b8U6CNA3`>oWo_ef>9-FF-F9<$ohq_(zvRFU#`3H4`dS^_1Um!nX4}RV>hF zhWr_W_wp7}ZRDG1NA7)pqudL4Zh9p5?h}-oBIQCSuLp*(0w!gfLqv_*D#vA~NZHBb zvfl5)1|ADGV)j*-^|b&j8|&Y{0>+NSPJ`2*D%UK!uX`3b%;tG9k!Cc0kc)yHP~_9WGZ z2Y1hLuIa>4Im31k1cb+p_+dty!#T0lQCAw1uS<20xv{Ddf}OY;0|6?m3uR{|@>O*f z>ihe)(`x=W#i5M8Pk2{lEVc*6HTWK|f)O{wWRv_Hma?A$t<4T9tvffB{Sn(WMn*&LXtvq zwy*DQOvB@-HJm1;gGgsQGK~W~?U|SHNH$4G-}3~!8L&e#ETs=2E%ID{A5CY%LDv^4 ze^d+*?mBT3W!2lZATvC)>0pxo9nNWjwXOf(`6#nRra>n!3y+aArX~r+5|pA3G(*sb z^D$h;7zi4Gd_W9;5d}5l3bJIxTwieQ5z5Y#MCHS`B^5#RD0sDw2tBW%%-?qhCcp1- zikUYL$dkt*-@!4&F#G-(lw-G3_oFCp~x8C zz0}ads4a3bjiGF3g!+r6(#;c>CP<~-6PF(OGv`X_#HCM3r3#eVD&LDA!yi*wA9c+r z28d~O!3<=pa&sfL6i+Ojrhy9oAbkx?F04MacCH zq@#C|5Oqgd-7KLY&`@?XyN73oyK;9-BP8o>C{^{>i@!4lvbX0}v0&M7D75TavN&o_ zsD2l`_pMNN`3Xi#gMcgg_FyKimR$>u3fi$T`T2MYfntDj-caWxqmeNO& z_Ly8NEgq}A!@^8Xr_toGF(*aVMO{|Mq|5E^F(?1yV7dK9)&+llQPcAUT(e>O4H91o zg(w;_G1sDc?gz)9I^ow?H^#hku_&O}HV|WPk&xd47(5Vg~Mlrt-6%hNY9ERbrHzM2&58_ z!@nSqc}A<%aesQrDn0fp~zikUa% z*kLp!^1O^EQhgs5AnR#l*_HvLly3~`rRMtjQMjGMldAL$W#ayBx*wGxBg?=c)UY)I z1t&ZBzkiVExtH{f` z6(BNuB>dkF`k5uFaH1*#b zX6kydlh{C4se`uUm>$s*I{<=Y0I@b5uItqL;Oj?-G3kB%>vGVcV9Z>nRg-sNFf^hj*auo&l0cn*T%`Bs>w_>j!Xn zEqoJck~v!Q4k7L6FgJKtnC-5A^HuKj`f8s6)&cR^Hj&!;7>tWk(-WwzmjDx|w)RRH ziS5vWq--j=5+b?S&P$}+nurB-CvRlrWZkrmzzrj@>ZzTwK9_ou^iwJZnd_%92-&09 zHVo_UeTG5Y&{OY3{1|?d^JAZ3mjrY=-TWI4%XM?c*M9+c*_}T;6>f17aPDf?8b;h6 zWMn+Dft0&AT4yt3Hi=EUdiLD#autIgKzaZo{&fJQXxQcJPw^XeiH1RrWe^F~^N(ht zg%AGH_q_L#_C(tagu<{Zg)kU{uVQD2j8Ccw-~X;-H}esfbj~imS^zGT9bGMwIPKVh z8etjVI7fz#UpR(k<#ca*-alyuUC+axsW4k&tB0q@TRJ{|qp3 z^W^);fO|Kqum2VWUByu&Jcu*u+L>)T7lBj^zC?5usB%#Ku;dUtIcp(HBT0rKB&k1x zSpCPMtAEr^P;vVBj-oelxDK_4j8ea9|CjoOEsensp2H@_EXGp0)3PXN7e{%)&;k`#zzed-b{7+C>QKkbDc^y#eCH98%BNWMwtgT^5|aHI{e($ zA^2?keMGW2jncl|34Wdc6`LpEJ5UrgP@7C9}qI7!M6_+ ziOEn=kZZYDwsfilYalGwg!a3<67ebw7W_q|t}(EQI$qD+%1P)HcFsi3*j$VN_O=)L z22WJN-&268#U#}kBdtVK36agKaI1nE8itt5Ix=1{oK3J$3&Brb<<$H8_M`QvXDm0s z#}S0mD8h+F#UL)zNX!bp{|eR00zCObK~;Xn4yi)M4yi_96LC+jfv1)ycsp5sE)P-W z9@<3gPmj||4lo5|bN|O6mBZK%^O5?wgqMehXXgYM@;QXW3v_`fsk7ZjfKBOfLy|lZ z;D!kRUj_LxcQDGf^%FF@Qv#70(uy8P8aYZl$?LZP73sbhpxIGpvrW*Voden=%{Y?3YN> z9H9IkB29{fY}ZXllN3^V1JX8+$JuH#yIMOeUD2C1+l_8-C;N)m)M2;UE#_-Xofc+i zt4yvgN}Z|Fn}mySKzhCf*QMuMjKHJc!VsLS{|%$ah9wd_hhGj)mjZWmhmE*3DNzc8Wd>_>D~)~ zAp;oVah{8uVGpo2PEd7fOjR-|EsIw^u`M6c$D?lDFi~?W)hRFeGL3o$5EHlZl({I?h zPvSQSmUYdgVT5AS_MSb&?O7CJ4mTe}_#&lp^KkWYiH zGYGLfFhAgV$$m(QVF1rCSZhcVlN{K((NOHvAXB*pjh!?;PjS*^VL82&{6wN5A|o`z~qmhGIZ{SuwnDqlmfB)?{-cPMzyJuW8tBtn%CTiv$jxxR(e|$4HMVt8^p4zq> zrMA9%fD2jpscnmB$g+yH+pT`s`ZJK)!c#jXkJ$bSSRv;fbl_NP z$Xs_LRui0pq{E}{;P~J>WdC!|)i`I$&fi10;M_>X!=~7j<;RMIo1Qmdmq?o0UDogT^_dzN}X!aa5)pU#HMqijerj9~qb9)56!F~Ng3a?FAW8s>_8=4}Z9 zd}glf-yh1Q{e@629efDo(zZY-mo^Z*2~UD$z7b}uhs7%zlH1`@w4*UR17TFIT{f;! zF$C~BfT}{`yW-3Kbtg3Cw=5h^4cs@2ID3buBN|JSlb-9*eTi;8 z)5XQ5sbW)dU48J~{k#p)aH7(;50=ph?Uc29(BioEs9NlYx8E%OrSE;uB{-mRVS{*G zYTv7#tfdd_7e5i7dG9A;l7B(6zd7BnYF&Q)b$gP>DYFRu;=Aa<%i0e-^->?M4*VB& zK%)OKYEsj9{t55dVhuX5Taz^dhfc0Z78^65gp=!y!9t0C4jI>p$A?p-Om8Y$*b73N z#meL>VN{JFeU;`sZ-%Bh%bTWYp5aZ=H0OBE6>F21HrECJ#xbT#l^3LI8WkrZWpBim ztx8_f_rCWLiCHK0FqT`No?fqC`O198ycf4)2ND5)ds8SYA$Ts@GzP!^TNvaJ zCzRX5<7J4o)98qxH}SnEk1c&B6henWx#YX*sAUX4|m2 z=bye+pqpuCx=9T_4T^$egJ6(e4Jw)U9NRTtAOn0Bpnx*?JTFtAEaW|#8px9hRQ+fA zy#!9LZ9yg$`Sho0B$Br}(fGEtAl^oiIIRQsb+!)5a8hJL6v{rxdzH1V8+SfE#cW+# zdup%_Gy}`2+L!pV26XeMypzCqdHW}})c=NM^)rxV-b&NP=o>f+rNH-pm4-3ZQ^tVd zxOp2D`7J@8-Ud#BJzT&bFYqOUynO~bz>N#--Ll|i=pSYZ|7rwjJ%}QX=GWPbsEflh zsNgpo_N_b2JQs;ghqX;Z-l_WxM`63L;c2!YTrPO<0nqTEPhW{D3EuSfi-Rj9rVU>$ zWioH+z7$@HYPK0)M<>#K;O$);EESJn=V5b!e77JDrV-Te!D9_*1IOG_dcj0$E{s3N zmijdyVC#Y4&^}^os)QVdmkgBXnQ1$Y=RLRq4x_5Ao6?D)>2XV}Ep^dJ=Z<8DiB!j$kun>E1IDLS8lHMRe40%V8 zkv!Bvc5$f>PUlF{x2?yWPfya%yy;u%4oeZuKA)a?$h=cR*+W1kb6~h0hYrN)B37nD zbo@YUI#eIb4ZuXPggnjwb_5P=8vi}xc*&~%;YDK831lYC*U=ZJ@I5XKedC-L z72q2_89V0B(4P&-;5j(}@U8KjvzlsVpjg%Kdn`yC%GlKZDGQ_AeNGQ77~fd(>REVJ zn*rS;X7zdQ#uL$pAx}oV5s%Y##$XMQ!rOk`laCp{hkeMM zuV9odkM|?q*EfI|s9A9ANiNdj{OZ2{6#&(+;U%r=jMZescVlZ!sIw7u!*w$oAx87gQ;{qbPwie zBD`I}{lke5CHNlaRExhN zQoX5t?`QNTqp%kZVjhA@0)H2svQc(m(xWbrTv7et(+gx0 zLEZTK#vtSn_l(|tFmZh;{O%dOcapph2ELLYhHjl+)%(2n!#U6TcIWqeNSptwZw}mZ z0+m!x2h6kBt>3y2b9ckWX_Q5vZ;JOo&Bi!-hJZWt(le7h77)2{7ZZV8T`HbT8C49-SU0-mxy{XK$JJMCmQR5 zAACeJA~SqGH}u3mZYs$9tAU6``PU#`mdVfn<`;moJz6E*P?!f9yI*d-OKy&r}gt%RsDK@9u`TF-Zn}JLlBN> zO7O}s3~m4!fsHAI3OkcTj~JjXVE+}du|2t=F1YPO;%OdP2K>pMiW0sO{y=&+n;;^}wJURuyYm{z_IGhHeCgpT$@_hq-{ zD6r&bJo4K*+b9?&_s<6tfSe5j=^HM(a>4M^*#3p|2eQ`eO+Jh5P5vS~QwvCzhvaed zX_h>nGI}4u5HvK?xZXkIO0y_t4wcDsXmxlF-TJMApLzZq{S5Qx1bDKQsBLIZ!ZL@i zyg&9q+~nEw>wnzj!Ps-dCg$Ol^AD^i`)I0|+?Tqw3Wi+tc}yy=#R<~n)#pNsipc>o zq5N6=a@~`@!BE^YQ5b&fMo6)L8pZokHY27_9Hb~+G(@%4=4!6exBz^jDvK8mxqP<-Lt6c=r#Sicdm^|tJOewp?#zg&0+zogv8 zFS#4|CBGM!yT6&T6Bp6Iwr%IvMoXNhFF;J6$zpYfbZ9DJH7Q|DN zS^vJ2`*j{yo+te!7kfQiYh5$EQz87*nhz}oM-9A;PYq~#^(fbDM_a+ zPrh}jaJdYhk8jCiD{clJ`Ld#iTHXbYSOlS5@^-}4j}j@#XWV`B6UXnz^0`+(`al(P zpDRv*v6>h<;M<$r^9g0S{(OCmyo;gcCr@>69*PH&kJ0WaTqpPK-~!4Y^&r&QR1x}JuER{q*^F*jRs@$eRcH6wX84;%hrbZrAE_Pn?at#g5zrKkVa$Cgc!m{HTbJ%S544F3(?M|3 zRjHcVbax6ehLeYXqdG&kMMR)DeVD%+PMW`mPBDMsUxXWw-trcnn1-Xq;P!|4jDcf; z9D204%9Dy5df&w@dOxT3C=NHkmxxJpzY{)~;g#of|_;$R%=!C@Q+lKhST z6sK4ymmH3v+~ZshM-hh^&iRe4E9iMTa*@vUm8~QbD+o>Dpn)^x)GJ1~KC1dgYRE#~ zM?GWhIRV2iqw48vnyvn{P<9TQ#8{lA>c5`ERIJ5hoFN+e>)_wW7I>lOh}hKsD9r?` zCe8bzIA4dO)4xyJ(^E=Q!21;5Q!%AsX~vH3tU%3Kv*uv?M)fLQd-O#yQ~R!Ks`$yA zkF?GcuGDH@f1dVb*D>wOp5@i+_1$oeGp_)DCr>O4{u)Yk8{J^pDchSu&8hKDt%X=GRCkcP6|2E5Io17wstd07zt)OrC3=|sfRhS2j=bTuy;^?OfHOAaN8N5c= z+`w>Q)bel72& zyIt>#HG84avf5cLnq&S1(kkeWQ$m5WxAe8QFe*%wqhJARjv-_&5rU3j6hhBa?F7+S zNvR;EN-0HSVa!9ya1^_OXQU{@6XgH1E1z#YBRP=bs6Sx6ehtKzc`~7H`NQ(M2c?Io zX0eFe0JaVY;NBDhN(jA(;qChtm}pzO4OZogG=|=c>!pe{a>b>ho_qzi4uCX=Uh?+^ z;WLEXW2asMyg&wQuq~57#6#GIRofQIcVm4a&t*82i)u#NA+#L=2{ur@KD0@~<@r)G z_Ce6d@>ZHkobIRoTcSGSVu0!g!VcA=92v9S2UKf2>_7pWG{IghqLu&n;u zcuA%2nb4dAzK_ny_*x6(GO%!3&xhpQ&G<$wZn4h-8nC~DIMB;0_%p?94{rSnu@}=# z31h05y_V;sV@rhRWLm}SUY?a@^&4jdByX?et6AR4d2oHOf4jtlf1%`sa>p<*q1+QZ zW_;~P=5Z>I(|Mf9;~6|A+clKCp2ur>+|6STkDWXwS2=cjd2HtK4Ll}E3+0laVsDqn zMjq3nUnqAWk85~b$zvUlOL^$$K>aXII#Z8sxyL{1e)Z)e>w*a zESQ`NJ8>Fg@-xYSFbBfF9f!RLb{|6C4-;5kfU)k*4(48MWo`JGHT>WmYj-o&*5O7l z(GRaNdz*u;=ybAn=St@6TFF-0t<3GVGq=stNx13Sfh*n0Nj5D_N6B*C3Ws@3xz1Kt zu2!haghm^FMbGjTuf^@Lm<20d$Q zWkSd5MaFr`0#$)h$fI|Ul+ByxHm$-h_L*!2U5>7mUETtRYvnxrmS4N2&EuZevD)su zVjR9|M^_gL?T)T8p}NE2w#enk_gK0-`HL-GD?PR{fe2XG*huXug(8JgxCTE9xTw?F zVd(^z#T<(^0;g6eg!v}3P%rg53=>nX78Vd6=r;yA2f`rHwhDn`$<^cY6=z6;LO4AQ zRQ_o+D1>n|gn8pxo=euo= zwi{QQR$20`kV0Fuk}L)Bb$R;`-zZpoc|7iR2#CAQWp{d_@Pzi%bsTLTiznahaal~A zr>kS{G_ACNdd!$OPK?Jb!C_9tA&YNcf@ybJR>lHN1cNyl3o@=B5+2Oi)4*{4(Nvq3 zX6Sa>T^4tlu)t-XD<~C0mD5FoUn(foWeNrUg)3_tr==NPrj?zhGKg({o2ku)ITIat zd5lixX-qrgpf`(EOo5P&5WKaD4Ipem=tihP$dtozKi)Tluo1zDuna+skcBX^p^6ArfEiRfH!pvOvOu=e` z$}kHikI-T7vIx0m`d!jocT`WBEgcq*MZn9Iq)%H}i>1YES=C~7S%AplZt=M6rj8a9 z^xi5 znras;T5M;IQg*;4iZyR*6n||4| zm9J5=uMnt=Dn~F$2rspFwRL#S7Gb6YUtpUV2Nf+Rrp^QP9D-MlmRa4=T*ekigX?h! zZNv|Yv`(S{yjQEh)9IWU?hLR*GLb%IJ?hA~iZZppCiP?W3dUkNEttB@f}6j27E7bU zWw*FvigbS16;gK(GaYexsKJE82Pt$!mnmt?tWX&;j0Vl|>6w z@)g(Zw6yV8lFb!J|E;uiNyM2v9!sawBX}G!2+%%oxL4afZ8jm_igk~_k)F3sFESJI zFuo>lheyEA2ZsfsZRU7;gZdGJr>zX#uz(9~-VPdVDAP82T^f4jaBcDLC&?PiYvwTrb}Bb-DTuZt>I**gWJ#e;TD;70r> zUud(t+DwE&1q@N63vxE)?s8>Cudti=^yQPx9z;TXpn zu6cV~FTVfMTTb$G9VR=T-4*F0AsWa{p@SiIKFm0`dlw+A{gcKMMOR_Fw-5wMaizfRB# zH^*QFEg*zu=BcQN1tuEkep(txcbQg8Gnf_#ArEWwiZvdK`-*t7*}8Bg^qWYJ5)-DJ z=ksRV_M0pYYaU-ZbAc%z9SlRsnZlft^THsEufw_S$o)h-;esIpO6-Vd2zrLKg}T#b zGr8isBds_jjbOF6%WYrTg}Fj-f=u4Y44$|S-a;jqy`7zFTJciLm0cJb3{0+B9%HbI ze+uTcFfNR^!^lE2AFojbbSrRpa8E6InKN?l zL7Bkx_!E%V3g|8bs$~K#c6JlW&Ed|(T${RX?1Jep)JvgYXp;vyf*?S1Af2WB&;^U7;v~;UMCzQks6Fu2~^x6;MK2o(+aHd1n8wFgB2Ex zp+&HJc$U2jYab@oO>woywRx&WKwB03N|@nTflPwC6GXx4WE|3>01{=IIz z3>e@hnNq?>AVhIYEwcq)NEZ-tw&IB~0>ljpJ~&cYOeLp-1`Y!rSJ?z(3+!@XL?=M< z8TexRFZdxabl~9A1x{6*FUaZNhNs59W1#Bg}JoVw36R#q7H@*Gx-x^uaBx2WlN= zFJ>!$aWi2J=P!_r-Ed3w&^}!(pEW|abaLH;)A_izu^XX*7C`IRp?AE{Q>2$JWx3Ek z0^kLtqOFFpF(%<7eRVQ61F*QDZC%inX>1yBG;y6s`j)VhE*5|vo@!{s4z#@n_w}Hy z8rNFDxbbIVE0H=K%cOCOjE&G`fwkb36=Zk}qa^cGc&sg^@tRTAmzbZl>~cGu&+EuU z!5~N4ieLPI87nRSqejXF#(hgX$BDSZj0k}W<*u!0+h5OBdQ@Q)&FMld7j5a>f+cBe1Fhd&8OBqAgs zkYBSEGt`0E4C#oz1Rb3WT{xD`2N6_@7d~D#qojBKcRK zjfp;Fw^-1s8L<^}(Tnl*pl#9*ZG7h1IbGxH{$uSfvWm!3>VOSKJuf}2^;OFnn32`6 z`Aq6}0n&@{7yh`AFxJdpg6I2Ym@u#_EJajiKr5@zC(>D6T%S>^H9UuUOZv(M9Tod& zU`wDi8`)BZcXR+l3-p#9u!O^nU`4GK*33EO1^+rg8(Dy)^&BW63JVZgkWYLj+mPTJ zVjGD`*IQQdEwHOC5*@g&^IBYM&=If2(7lvEkw<+4h?D^jJuqVJV~gZ@8qbdy^pnYd zF$d}!Y8q6XSwnR%yjs2a!!_I1OucP0>4EC97DG!7_6HVVf1ti`NkdB`-yf)w_6Neb z*dJJAY*{KjUslueWeq)FE?smDo-b<~nyc}AxyaaBbq3FuHI^0Ll`XY!8ZBrb<=+Ym zvc14*UhyyH&}8%f4jeE{o^APe7^X=Y{|`7YcXBTLA8`5KqY1p1j=#4QZ|~$+x=+5U zid~FApK$rEnDSXms@QCVQNHWg>XN@od`bxu7AX5E&6vW!d(bIKzIn@ zF@(Jc?Fb_XV+d2wW)6Y^p%S4Up#`BG!G*9E;Re7pB2*&GMo2?QL>L2a-bOfza2Vkr z!ZQf{2s;rTM7R&(E`&P}HXz)BunM6AVFki6gliCL5OfHy0PjEgGdZ6BS>w4lxxwP8 z_PS{2rY3y4tP1Z0Pq=cz{KA9<_Ac`RyUXpN?Fm3u^PFq2T`Xl>ZK%J-uvk@CVD5lB z`JNPhlmzp|YVGj4@ixjCQzQ>G{Owa*aB!@`DVrTB);2mE&e%YTRW9C>Vx?0&m`$?F znmwFi>9%_qyLt+C`|;0M))aXB-4^6&DX+~5$J$FN*3~%N16-2f2z)-p>b6*JWSNAC*RLWN`h`ulkW$VSt{d5+q*lAfVPcmgv{u(Qw$?XR zw=TM7Q6oHd;eDik%myB8$3V(ZLm$B}kwnQzBhux7Tlf=KwZU7a`+WpRP>FA-#C zCpHZkTa(yol~Mx|B%L8>C66^@?m6g(C+fkXw!CcH5~FDb{WsBS+TO-;>3X;^ygS2uK+Zi z?5$|J)xz?D)#Yh5lWS=ujx^XDjvL|MPN*PQI?`mRto(A-vSrt@i#QiNE=Pye*@_L5 zcL>ia$BmZO)h3Ud9Q1?9tzH~`ZM%`J1BDP2Y(CP^UYpd)a}$$W<(x+9VVlM2X~m|k z89U8tiEmx(EoSJVO;@9|A<0G(7tzKf)wh@p-Pro=T4`awNN(t`Se)orOlh^F(}|7G z2oQTAaiPWJ1aB5~VWS*_#J3Tqr!2LbE!Zt~H9Bf(!*@PT@W8FV$j$w0V1ki$n!v}E zNs;nKN4OIEc~ZT}?xtoyKgU>`(jf^K=8Yi{Gt7uHmhx^7V--n@aT<8BeTB>9T7$9Z zPi_pemf)}>guIw}8P0qmxv5Ly4)t4VOBMz8Lz>^GEPjU7SYmnjqa^N-Hd$w?+~?(_ORfvr()=6a(XbF{G65p@BI2Vx(a-oOTfuNI=ZKy ziBsh>1q&^A*uK`!Y-(JPUpkXc_;;C2w07!euCcghR+QtLf%saXrE>)i{{TUkTR+q5 z>MFwtWebi-<#*cY^@Q$TWsh?Ra!0=TUJ>*gbs@JGfnPA+=Ot= z6ukDTHd+kzGp(i$w`C^2&=|oTUpaz52I8dFb@SqA)y<1^8r604!u%{h?T}3tPIBNs zmjjsztP;KZq9#X^tC_7)XlgXgn$~iA`A^G#UcRS%u>9rn*UR57Ur_Poiq49gDgqT- zD;})aUGYB^Z&v)Z0u_Y>witSUs-jI{S8P`tRJ@`XR{TYgs7zI!ue?~PP!=n%RMsl5 zSDKYx<;}|5l;2ivQ~p@_xbnBkmz94|jwnA+rW8&uyrQtYu%@u7@Y=!~3cCw$Dg0*P zU4>f;e_8lw;Y)>oD158%cwwgMJk@MfsYmE!D@W zRQ37li`28!b?WQY4z)+!qyC=ye)VtEhtz*jhtw%W7ZeFa^NNa!78ETmG8eTMtuK10 zXjjo-(ZQmjqDxBWlrAb=QrcE}XX$j!1saW}Lerq>(6}^rYVOuNteID4D621XlzGc` zmyMMrYo}^2)Xvo^wIy1!wq3hU`(N5ewZGARqD|6G)fMTqI*0C?x?Q?K-9g=;{(1dz z{rmc~@=MA~%8liR%HJ$ctvIJ*QAJ(FwH2m{jTLuS3{*T*@#hMrNMNPl<-Lj@E1pmc zD&9~WSA3+Hp}a_0sB8oWH!AN^KC1j*Wl))3cwyn?g{6h_3o}#()m5scs#{c|>Zht5 zs(#h~s9slnph{5BRTryoQ{SoHsotahgF3sYvFQ3DN0F!KmZCe0wiNxQ=;@+h(Yr-S z#b+017hhJaEY=oZTWl`&7Js$)j^ewDA1Xdj{7Ui1#VI8hlq@W1EV-eiqoli}wvoYW$k}HIHcqG;e7BstIXw%9P+xOWC)}epL2E+3RJ;$}ZNbwGG4|ox0!YMs-R02K|ltuj#kx|66}VKc>$rFDkDn_mg#(g!pyF^vu!2=4Fo-cbyD+v;`-uc#n+>s?ZwXGRmE$IzgD~v zz1>oLfARL>Uli{wexi7w_?hBYi;on)UHo40Sn=PAlS-zRWR{#)l2@WADK4ogSyJ-# zlJAskF1e>A}+1O5ZF^ z*PN%hNOP%1snLRaOEgP0of@}hjiyKQJkU3gw$abZQ_ zLd?9j!fzMqFt_ej{YdquDo1TpH>rozNkwTzSMXW$<)YRiOHohJw~96wZ7=#o(axeL ziUx|FDSEExP|@o}e=PcQ(P+`fT%OJ?zPLEAIKNm`tS`Q@xS_Ze{9aXjb8%1cH;V5C zr@vluTglxeKPmZH$-^bHN*ha;mv)u*mWrj{FWp)Cc?aBPmIP;;f` zI?W2q#IIht{Z&cr<-U4m3UHuEp$S2eT>Sxq!eFDy# z!Ox=1RA&|SYX`K0+Wp!C+Jo9d+QZr*?NMz|JEA?V9o3F$PiW!x)urmvb(y*>-3-hk zK{rd6r&H)kb(Ok>I-_ox?gpJr=hSuU*6TLt?$B-4Z2=$H9SJN8ZFrEs7A3tXV_On% z-jK0WWx6s`nWdbe6qK`+$4gF><>&>yPG6~S(chq7ufJQrMb92ekiK^f -#include - - - -// TODO: reference additional headers your program requires here diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/targetver.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/targetver.h deleted file mode 100644 index 90e767bfc..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c deleted file mode 100644 index 7dafcd4ab..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* lwIP core includes */ -#include "lwip/opt.h" -#include "lwip/tcpip.h" - -/* applications includes */ -#include "apps/httpserver_raw_from_lwIP_download/httpd.h" - -/* include the port-dependent configuration */ -#include "lwipcfg_msvc.h" - -/* Dimensions the cTxBuffer array - which is itself used to hold replies from -command line commands. cTxBuffer is a shared buffer, so protected by the -xTxBufferMutex mutex. */ -#define lwipappsTX_BUFFER_SIZE 1024 - -/* The maximum time to block waiting to obtain the xTxBufferMutex to become -available. */ -#define lwipappsMAX_TIME_TO_WAIT_FOR_TX_BUFFER_MS ( 100 / portTICK_PERIOD_MS ) - -/* Definitions of the various SSI callback functions within the pccSSITags -array. If pccSSITags is updated, then these definitions must also be updated. */ -#define ssiTASK_STATS_INDEX 0 -#define ssiRUN_TIME_STATS_INDEX 1 - -/*-----------------------------------------------------------*/ - -/* - * The function that implements the lwIP based sockets command interpreter - * server. - */ -extern void vBasicSocketsCommandInterpreterTask( void *pvParameters ); - -/* - * The SSI handler callback function passed to lwIP. - */ -static unsigned short uslwIPAppsSSIHandler( int iIndex, char *pcBuffer, int iBufferLength ); - -/*-----------------------------------------------------------*/ - -/* The SSI strings that are embedded in the served html files. If this array -is changed, then the index position defined by the #defines such as -ssiTASK_STATS_INDEX above must also be updated. */ -static const char *pccSSITags[] = -{ - "rtos_stats", - "run_stats" -}; - -/* Semaphore used to guard the Tx buffer. */ -static SemaphoreHandle_t xTxBufferMutex = NULL; - -/* The Tx buffer itself. This is used to hold the text generated by the -execution of command line commands, and (hopefully) the execution of -server side include callbacks. It is a shared buffer so protected by the -xTxBufferMutex mutex. pcLwipAppsBlockingGetTxBuffer() and -vLwipAppsReleaseTxBuffer() are provided to obtain and release the -xTxBufferMutex respectively. pcLwipAppsBlockingGetTxBuffer() must be used with -caution as it has the potential to block. */ -static signed char cTxBuffer[ lwipappsTX_BUFFER_SIZE ]; - -/*-----------------------------------------------------------*/ - - -/* Called from the TCP/IP thread. */ -void lwIPAppsInit( void *pvArgument ) -{ -ip_addr_t xIPAddr, xNetMask, xGateway; -extern err_t ethernetif_init( struct netif *xNetIf ); -static struct netif xNetIf; - - ( void ) pvArgument; - - /* Set up the network interface. */ - ip_addr_set_zero( &xGateway ); - ip_addr_set_zero( &xIPAddr ); - ip_addr_set_zero( &xNetMask ); - - LWIP_PORT_INIT_GW(&xGateway); - LWIP_PORT_INIT_IPADDR(&xIPAddr); - LWIP_PORT_INIT_NETMASK(&xNetMask); - printf("Starting lwIP, local interface IP is %s\n", ip_ntoa(&xIPAddr)); - - netif_set_default( netif_add( &xNetIf, &xIPAddr, &xNetMask, &xGateway, NULL, ethernetif_init, tcpip_input ) ); - netif_set_up( &xNetIf ); - - /* Install the server side include handler. */ - http_set_ssi_handler( uslwIPAppsSSIHandler, pccSSITags, sizeof( pccSSITags ) / sizeof( char * ) ); - - /* Create the mutex used to ensure mutual exclusive access to the Tx - buffer. */ - xTxBufferMutex = xSemaphoreCreateMutex(); - configASSERT( xTxBufferMutex ); - - /* Create the httpd server from the standard lwIP code. This demonstrates - use of the lwIP raw API. */ - httpd_init(); - - /* Create the FreeRTOS defined basic command server. This demonstrates use - of the lwIP sockets API. */ - xTaskCreate( vBasicSocketsCommandInterpreterTask, "CmdInt", configMINIMAL_STACK_SIZE * 10, NULL, configMAX_PRIORITIES - 2, NULL ); -} -/*-----------------------------------------------------------*/ - -static unsigned short uslwIPAppsSSIHandler( int iIndex, char *pcBuffer, int iBufferLength ) -{ -static unsigned int uiUpdateCount = 0; -static char cUpdateString[ 200 ]; -extern char *pcMainGetTaskStatusMessage( void ); - - /* Unused parameter. */ - ( void ) iBufferLength; - - /* The SSI handler function that generates text depending on the index of - the SSI tag encountered. */ - - switch( iIndex ) - { - case ssiTASK_STATS_INDEX : - vTaskList( pcBuffer ); - break; - - case ssiRUN_TIME_STATS_INDEX : - vTaskGetRunTimeStats( pcBuffer ); - break; - } - - /* Include a count of the number of times an SSI function has been executed - in the returned string. */ - uiUpdateCount++; - sprintf( cUpdateString, "\r\n\r\n%u\r\nStatus - %s", uiUpdateCount, pcMainGetTaskStatusMessage() ); - strcat( pcBuffer, cUpdateString ); - - return strlen( pcBuffer ); -} -/*-----------------------------------------------------------*/ - -signed char *pcLwipAppsBlockingGetTxBuffer( void ) -{ -signed char *pcReturn; - - /* Attempt to obtain the semaphore that guards the Tx buffer. */ - if( xSemaphoreTakeRecursive( xTxBufferMutex, lwipappsMAX_TIME_TO_WAIT_FOR_TX_BUFFER_MS ) == pdFAIL ) - { - /* The semaphore could not be obtained before timing out. */ - pcReturn = NULL; - } - else - { - /* The semaphore was obtained successfully. Return a pointer to the - Tx buffer. */ - pcReturn = cTxBuffer; - } - - return pcReturn; -} -/*-----------------------------------------------------------*/ - -void vLwipAppsReleaseTxBuffer( void ) -{ - /* Finished with the Tx buffer. Return the mutex. */ - xSemaphoreGiveRecursive( xTxBufferMutex ); -} - - - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.h deleted file mode 100644 index 07b4d2a4a..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwIP_Apps.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -#ifndef LWIP_APPS_H -#define LWIP_APPS_H - -/* Functions used to obtain and release exclusive access to the Tx buffer. The -Get function will block if the Tx buffer is not available - use with care! */ -signed char *pcLwipAppsBlockingGetTxBuffer( void ); -void vLwipAppsReleaseTxBuffer( void ); - -#endif /* LWIP_APPS_H */ - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipcfg_msvc.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipcfg_msvc.h deleted file mode 100644 index fa35c3c99..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipcfg_msvc.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Additional settings for the win32 port. - * Copy this to lwipcfg_msvc.h and make the config changes you need. - */ - -/* configuration for this port */ -#define PPP_USERNAME "Admin" -#define PPP_PASSWORD "pass" - - -/** Define this to the GUID of the windows network adapter to use - * or NOT define this if you want PACKET_LIB_ADAPTER_NR to be used */ -/*#define PACKET_LIB_ADAPTER_GUID "00000000-0000-0000-0000-000000000000"*/ -/*#define PACKET_LIB_GET_ADAPTER_NETADDRESS(addr) IP4_ADDR((addr), 192,168,1,0)*/ -/*#define PACKET_LIB_QUIET*/ - -#define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), configIP_ADDR0,configIP_ADDR1,configIP_ADDR2,configIP_ADDR3) -#define LWIP_PORT_INIT_GW(addr) IP4_ADDR((addr), 192,168,0,3) -#define LWIP_PORT_INIT_NETMASK(addr) IP4_ADDR((addr), 255,255,255,0) - -/* remember to change this MAC address to suit your needs! - the last octet will be increased by netif->num for each netif */ -#define LWIP_MAC_ADDR_BASE {0x00,0x01,0x02,0x03,0x04,0x05} - -/* configuration for applications */ - -#define LWIP_CHARGEN_APP 0 -#define LWIP_DNS_APP 0 -#define LWIP_HTTPD_APP 1 -/* Set this to 1 to use the netconn http server, - * otherwise the raw api server will be used. */ -/*#define LWIP_HTTPD_APP_NETCONN */ -#define LWIP_NETBIOS_APP 0 -#define LWIP_NETIO_APP 0 -#define LWIP_PING_APP 0 -#define LWIP_RTP_APP 0 -#define LWIP_SHELL_APP 0 -#define LWIP_SNTP_APP 0 -#define LWIP_SOCKET_EXAMPLES_APP 0 -#define LWIP_TCPECHO_APP 0 -/* Set this to 1 to use the netconn tcpecho server, - * otherwise the raw api server will be used. */ -/*#define LWIP_TCPECHO_APP_NETCONN */ -#define LWIP_UDPECHO_APP 0 - - diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipopts.h b/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipopts.h deleted file mode 100644 index fb6adccfb..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/lwIP_Apps/lwipopts.h +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __LWIPOPTS_H__ -#define __LWIPOPTS_H__ - -/* Functions used to obtain and release exclusive access to the Tx buffer. The -Get function will block if the Tx buffer is not available - use with care! */ -signed char *pcLwipBlockingGetTxBuffer( void ); -void vLwipAppsReleaseTxBuffer( void ); - - -/* SSI options. */ -#define TCPIP_THREAD_NAME "tcpip" -#define LWIP_HTTPD_MAX_TAG_NAME_LEN 20 -#define LWIP_HTTPD_MAX_TAG_INSERT_LEN 1024 -#define TCPIP_THREAD_PRIO configLWIP_TASK_PRIORITY -#define TCPIP_THREAD_STACKSIZE configMINIMAL_STACK_SIZE * 3 - -#define DEFAULT_TCP_RECVMBOX_SIZE 5 -#define DEFAULT_ACCEPTMBOX_SIZE 5 -#define TCPIP_MBOX_SIZE 10 - -#define NO_SYS 0 -#define LWIP_SOCKET (NO_SYS==0) -#define LWIP_NETCONN 1 - -#define LWIP_SNMP 0 -#define LWIP_IGMP 0 -#define LWIP_ICMP 1 - -/* DNS is not going to be used as this is a simple local example. */ -#define LWIP_DNS 0 - -#define LWIP_HAVE_LOOPIF 0 -#define TCP_LISTEN_BACKLOG 0 -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_RCVBUF 1 - -#ifdef LWIP_DEBUG - -#define LWIP_DBG_MIN_LEVEL 0 -#define PPP_DEBUG LWIP_DBG_ON -#define MEM_DEBUG LWIP_DBG_ON -#define MEMP_DEBUG LWIP_DBG_ON -#define PBUF_DEBUG LWIP_DBG_ON -#define API_LIB_DEBUG LWIP_DBG_ON -#define API_MSG_DEBUG LWIP_DBG_ON -#define TCPIP_DEBUG LWIP_DBG_ON -#define NETIF_DEBUG LWIP_DBG_ON -#define SOCKETS_DEBUG LWIP_DBG_ON -#define DNS_DEBUG LWIP_DBG_ON -#define AUTOIP_DEBUG LWIP_DBG_ON -#define DHCP_DEBUG LWIP_DBG_ON -#define IP_DEBUG LWIP_DBG_ON -#define IP_REASS_DEBUG LWIP_DBG_ON -#define ICMP_DEBUG LWIP_DBG_ON -#define IGMP_DEBUG LWIP_DBG_ON -#define UDP_DEBUG LWIP_DBG_ON -#define TCP_DEBUG LWIP_DBG_ON -#define TCP_INPUT_DEBUG LWIP_DBG_ON -#define TCP_OUTPUT_DEBUG LWIP_DBG_ON -#define TCP_RTO_DEBUG LWIP_DBG_ON -#define TCP_CWND_DEBUG LWIP_DBG_ON -#define TCP_WND_DEBUG LWIP_DBG_ON -#define TCP_FR_DEBUG LWIP_DBG_ON -#define TCP_QLEN_DEBUG LWIP_DBG_ON -#define TCP_RST_DEBUG LWIP_DBG_ON -#endif - -#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) - - - -/* ---------- Memory options ---------- */ -/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which - lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 - byte alignment -> define MEM_ALIGNMENT to 2. */ -/* MSVC port: intel processors don't need 4-byte alignment, - but are faster that way! */ -#define MEM_ALIGNMENT 4 - -/* MEM_SIZE: the size of the heap memory. If the application will send -a lot of data that needs to be copied, this should be set high. */ -#define MEM_SIZE 10240 - -/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application - sends a lot of data out of ROM (or other static memory), this - should be set high. */ -#define MEMP_NUM_PBUF 10 - -/* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One - per active RAW "connection". */ -#define LWIP_RAW 0 -#define MEMP_NUM_RAW_PCB 0 - -/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One - per active UDP "connection". */ -#define MEMP_NUM_UDP_PCB 2 - -/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP - connections. */ -#define MEMP_NUM_TCP_PCB 30 - -/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP - connections. */ -#define MEMP_NUM_TCP_PCB_LISTEN 2 - -/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP - segments. */ -#define MEMP_NUM_TCP_SEG 10 - -/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active - timeouts. */ -#define MEMP_NUM_SYS_TIMEOUT 15 - -/* The following four are used only with the sequential API and can be - set to 0 if the application only will use the raw API. */ -/* MEMP_NUM_NETBUF: the number of struct netbufs. */ -#define MEMP_NUM_NETBUF 0 - -/* MEMP_NUM_NETCONN: the number of struct netconns. */ -#define MEMP_NUM_NETCONN 10 - -/* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used - for sequential API communication and incoming packets. Used in - src/api/tcpip.c. */ -#define MEMP_NUM_TCPIP_MSG_API 4 -#define MEMP_NUM_TCPIP_MSG_INPKT 4 - -#define MEMP_NUM_ARP_QUEUE 5 - -/* ---------- Pbuf options ---------- */ -/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#define PBUF_POOL_SIZE 10 - -/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ -#define PBUF_POOL_BUFSIZE 375 - -/* PBUF_LINK_HLEN: the number of bytes that should be allocated for a - link level header. */ -#define PBUF_LINK_HLEN 16 - -/** SYS_LIGHTWEIGHT_PROT - * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection - * for certain critical regions during buffer allocation, deallocation and memory - * allocation and deallocation. - */ -#define SYS_LIGHTWEIGHT_PROT (NO_SYS==0) - - -/* ---------- TCP options ---------- */ -#define LWIP_TCP 1 -#define TCP_TTL 255 - -/* Controls if TCP should queue segments that arrive out of - order. Define to 0 if your device is low on memory. */ -#define TCP_QUEUE_OOSEQ 1 - -/* TCP Maximum segment size. */ -#define TCP_MSS 1460 - -/* TCP sender buffer space (bytes). */ -#define TCP_SND_BUF ( TCP_MSS * 2 ) - -/* TCP sender buffer space (pbufs). This must be at least = 2 * - TCP_SND_BUF/TCP_MSS for things to work. */ -#define TCP_SND_QUEUELEN (4 * TCP_SND_BUF/TCP_MSS) - -/* TCP writable space (bytes). This must be less than or equal - to TCP_SND_BUF. It is the amount of space which must be - available in the tcp snd_buf for select to return writable */ -#define TCP_SNDLOWAT (TCP_SND_BUF/2) - -/* TCP receive window. */ -#define TCP_WND ( PBUF_POOL_SIZE * PBUF_POOL_BUFSIZE ) - -/* Maximum number of retransmissions of data segments. */ -#define TCP_MAXRTX 12 - -/* Maximum number of retransmissions of SYN segments. */ -#define TCP_SYNMAXRTX 4 - - -/* ---------- ARP options ---------- */ -#define LWIP_ARP 1 -#define ARP_TABLE_SIZE 10 -#define ARP_QUEUEING 1 - - -/* ---------- IP options ---------- */ -/* Define IP_FORWARD to 1 if you wish to have the ability to forward - IP packets across network interfaces. If you are going to run lwIP - on a device with only one network interface, define this to 0. */ -#define IP_FORWARD 0 - -/* IP reassembly and segmentation.These are orthogonal even - * if they both deal with IP fragments */ -#define IP_REASSEMBLY 0 -#define IP_REASS_MAX_PBUFS 10 -#define MEMP_NUM_REASSDATA 10 -#define IP_FRAG 0 - - -/* ---------- ICMP options ---------- */ -#define ICMP_TTL 255 - - -/* ---------- DHCP options ---------- */ -/* Define LWIP_DHCP to 1 if you want DHCP configuration of - interfaces. */ -#define LWIP_DHCP 0 - -/* 1 if you want to do an ARP check on the offered address - (recommended). */ -#define DHCP_DOES_ARP_CHECK (LWIP_DHCP) - - -/* ---------- AUTOIP options ------- */ -#define LWIP_AUTOIP 0 -#define LWIP_DHCP_AUTOIP_COOP (LWIP_DHCP && LWIP_AUTOIP) - - -/* ---------- UDP options ---------- */ -#define LWIP_UDP 1 -#define LWIP_UDPLITE 1 -#define UDP_TTL 255 - - -/* ---------- Statistics options ---------- */ - -#define LWIP_STATS 1 -#define LWIP_STATS_DISPLAY 0 - -#if LWIP_STATS - #define LINK_STATS 1 - #define IP_STATS 1 - #define ICMP_STATS 0 - #define IGMP_STATS 0 - #define IPFRAG_STATS 0 - #define UDP_STATS 1 - #define TCP_STATS 1 - #define MEM_STATS 1 - #define MEMP_STATS 1 - #define PBUF_STATS 1 - #define SYS_STATS 1 -#endif /* LWIP_STATS */ - - -/* ---------- PPP options ---------- */ - -#define PPP_SUPPORT 0 /* Set > 0 for PPP */ - -#if PPP_SUPPORT - - #define NUM_PPP 1 /* Max PPP sessions. */ - - /* Select modules to enable. Ideally these would be set in the makefile but - * we're limited by the command line length so you need to modify the settings - * in this file. - */ - #define PPPOE_SUPPORT 1 - #define PPPOS_SUPPORT 1 - #define PAP_SUPPORT 1 /* Set > 0 for PAP. */ - #define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */ - #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */ - #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */ - #define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */ - #define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */ - #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */ - -#endif /* PPP_SUPPORT */ - -#endif /* __LWIPOPTS_H__ */ diff --git a/FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c b/FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c deleted file mode 100644 index 8fc2a2744..000000000 --- a/FreeRTOS/Demo/WIN32-MSVC-lwIP/main.c +++ /dev/null @@ -1,336 +0,0 @@ -/* - * FreeRTOS Kernel V10.1.0 - * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://www.FreeRTOS.org - * http://aws.amazon.com/freertos - * - * 1 tab == 4 spaces! - */ - -/* - ******************************************************************************* - * -NOTE- The Win32 port is a simulation (or is that emulation?) only! Do not - * expect to get real time behaviour from the Win32 port or this demo - * application. It is provided as a convenient development and demonstration - * test bed only. This was tested using Windows XP on a dual core laptop. - * - * - READ THE WEB DOCUMENTATION FOR THIS PORT FOR MORE INFORMATION ON USING IT - - * - http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html - * - Note that the above linked page describes the simulator environment. It - * - is not the correct page to view for information on using this lwIP demo. - ******************************************************************************* - * - * This project demonstrates use of the lwIP stack. The lwIP raw API is - * demonstrated by a simple http server that comes as part of the lwIP - * distribution - and executes in the tcpip task. The lwIP sockets API - * is demonstrated by a simple command line interpreter interface, which - * executes in its own task. - * - * Both the http and command line server can be used to view task stats, and - * run time stats. Task stats give a snapshot of the state of each task in - * the system. Run time stats show how much processing time has been allocated - * to each task. A few of the standard demo tasks are created, just to ensure - * there is some data to be viewed. - * - * Finally, a check timer is created. The check timer is a software timer that - * inspects the few standard demo tasks that are created to ensure they are - * executing as expected. It maintains a status string that can be viewed on - * the "task stats" page served by the web server. - * - * More information about this demo, including details of how to set up the - * network interface, and the command line commands that are available, is - * available on the documentation page for this demo on the - * http://www.FreeRTOS.org web site. - * - */ - - -/* Standard includes. */ -#include - -/* Kernel includes. */ -#include -#include "task.h" -#include "timers.h" - -/* Standard demo includes. */ -#include "GenQTest.h" - -/* lwIP includes. */ -#include "lwip/tcpip.h" -#include "lwIP_Apps.h" - -/* Utils includes. */ -#include "CommandInterpreter.h" - -/* Priorities at which the tasks are created. */ -#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) - -/* The period at which the check timer will expire, in ms, provided no errors -have been reported by any of the standard demo tasks. ms are converted to the -equivalent in ticks using the portTICK_PERIOD_MS constant. */ -#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS ) - -/* Check timer callback function. */ -static void prvCheckTimerCallback( TimerHandle_t xTimer ); - -/* Defined in lwIPApps.c. */ -extern void lwIPAppsInit( void *pvArguments ); - -/* Callbacks to handle the command line commands defined by the xTaskStats and -xRunTimeStats command definitions respectively. These functions are not -necessarily reentrant! They must be used from one task only - or at least by -only one task at a time. */ -static portBASE_TYPE prvTaskStatsCommand( signed char *pcWriteBuffer, size_t xWriteBufferLen, const signed char * pcCommandString ); -static portBASE_TYPE prvRunTimeStatsCommand( signed char *pcWriteBuffer, size_t xWriteBufferLen, const signed char * pcCommandString ); - -/* The string that latches the current demo status. */ -static char *pcStatusMessage = "All tasks running without error"; - -/* Variables used in the creation of the run time stats time base. Run time -stats record how much time each task spends in the Running state. */ -long long llInitialRunTimeCounterValue = 0LL, llRunTimeStatsDivisor = 0LL; - -/* The check timer. This uses prvCheckTimerCallback() as its callback -function. */ -static TimerHandle_t xCheckTimer = NULL; - -/* Structure that defines the "run-time-stats" command line command. */ -static const xCommandLineInput xRunTimeStats = -{ - "run-time-stats", - "run-time-stats: Displays a table showing how much processing time each FreeRTOS task has used\r\n", - prvRunTimeStatsCommand, - 0 -}; - -/* Structure that defines the "task-stats" command line command. */ -static const xCommandLineInput xTaskStats = -{ - "task-stats", - "task-stats: Displays a table showing the state of each FreeRTOS task\r\n", - prvTaskStatsCommand, - 0 -}; - -/*-----------------------------------------------------------*/ - -int main( void ) -{ -const unsigned long ulLongTime_ms = 1000UL; - - /* This call creates the TCP/IP thread. */ - tcpip_init( lwIPAppsInit, NULL ); - - /* Create and start the check timer, as described at the top of this file. */ - xCheckTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ - ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ - pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ - ( void * ) 0, /* The ID is not used, so can be set to anything. */ - prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ - ); - - /* Sanity check that the timer was created. */ - configASSERT( xCheckTimer ); - - /* Start the check timer. */ - xTimerStart( xCheckTimer, 0UL ); - - /* Create a few standard demo tasks, just so there are tasks running to - view on the web server and via the command line command interpreter. */ - vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); - - /* Register two command line commands to show task stats and run time stats - respectively. */ - xCmdIntRegisterCommand( &xTaskStats ); - xCmdIntRegisterCommand( &xRunTimeStats ); - - /* Start the scheduler itself. */ - vTaskStartScheduler(); - - /* This line should never be reached. If it does execute then there was - insufficient FreeRTOS heap memory available for the idle and/or timer - tasks to be created. */ - for( ;; ) - { - Sleep( ulLongTime_ms ); - } -} -/*-----------------------------------------------------------*/ - -static void prvCheckTimerCallback( TimerHandle_t xTimer ) -{ - /* The parameter is not used in this case. */ - ( void ) xTimer; - - /* Check the standard demo tasks are running without error. Latch the - latest reported error in the pcStatusMessage character pointer. The latched - string can be viewed using the embedded web server and the command line - interpreter. This project is really to demonstrate the lwIP stack - so very - few tasks are created - and those that are created are created purely so - there is something to view. */ - if( xAreGenericQueueTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: The GenQueue test reported an error."; - } -} -/*-----------------------------------------------------------*/ - -void vApplicationIdleHook( void ) -{ -const unsigned long ulMSToSleep = 5; - - /* Sleep to reduce CPU load, but don't sleep indefinitely in case there are - tasks waiting to be terminated by the idle task. */ - Sleep( ulMSToSleep ); -} -/*-----------------------------------------------------------*/ - -void vApplicationMallocFailedHook( void ) -{ -const unsigned long ulLongSleep = 1000UL; - - /* Can be implemented if required, but probably not required in this - environment and running this demo. */ - taskDISABLE_INTERRUPTS(); - for( ;; ) - { - Sleep( ulLongSleep ); - } -} -/*-----------------------------------------------------------*/ - -void vApplicationStackOverflowHook( void ) -{ -const unsigned long ulLongSleep = 1000UL; - - /* Can be implemented if required, but probably not required in this - environment and running this demo. */ - taskDISABLE_INTERRUPTS(); - for( ;; ) - { - Sleep( ulLongSleep ); - } -} -/*-----------------------------------------------------------*/ - -void vAssertCalled( void ) -{ -const unsigned long ulLongSleep = 1000UL; - - taskDISABLE_INTERRUPTS(); - for( ;; ) - { - Sleep( ulLongSleep ); - } -} -/*-----------------------------------------------------------*/ - -char *pcMainGetTaskStatusMessage( void ) -{ - return pcStatusMessage; -} -/*-----------------------------------------------------------*/ - -void vMainConfigureTimerForRunTimeStats( void ) -{ -LARGE_INTEGER liPerformanceCounterFrequency, liInitialRunTimeValue; - - /* Initialise the variables used to create the run time stats time base. - Run time stats record how much time each task spends in the Running - state. */ - - if( QueryPerformanceFrequency( &liPerformanceCounterFrequency ) == 0 ) - { - llRunTimeStatsDivisor = 1; - } - else - { - /* How many times does the performance counter increment in 10ms? */ - llRunTimeStatsDivisor = liPerformanceCounterFrequency.QuadPart / 1000LL; - - /* What is the performance counter value now, this will be subtracted - from readings taken at run time. */ - QueryPerformanceCounter( &liInitialRunTimeValue ); - llInitialRunTimeCounterValue = liInitialRunTimeValue.QuadPart; - } -} -/*-----------------------------------------------------------*/ - -unsigned long ulMainGetRunTimeCounterValue( void ) -{ -LARGE_INTEGER liCurrentCount; -unsigned long ulReturn; - - /* What is the performance counter value now? */ - QueryPerformanceCounter( &liCurrentCount ); - - /* Subtract the performance counter value reading taken when the - application started to get a count from that reference point, then - scale to a 32 bit number. */ - ulReturn = ( unsigned long ) ( ( liCurrentCount.QuadPart - llInitialRunTimeCounterValue ) / llRunTimeStatsDivisor ); - - return ulReturn; -} -/*-----------------------------------------------------------*/ - -static portBASE_TYPE prvTaskStatsCommand( signed char *pcWriteBuffer, size_t xWriteBufferLen, const signed char * pcCommandString ) -{ -const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; - - configASSERT( pcWriteBuffer ); - - /* This function assumes the buffer length is adequate and does not look - for parameters. */ - ( void ) xWriteBufferLen; - ( void ) pcCommandString; - - /* Generate a table of task stats. */ - strcpy( pcWriteBuffer, pcHeader ); - vTaskList( pcWriteBuffer + strlen( pcHeader ) ); - - /* There is no more data to return after this single string, so return - pdFALSE. */ - return pdFALSE; -} -/*-----------------------------------------------------------*/ - -static portBASE_TYPE prvRunTimeStatsCommand( signed char *pcWriteBuffer, size_t xWriteBufferLen, const signed char * pcCommandString ) -{ -const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; - - configASSERT( pcWriteBuffer ); - - /* This function assumes the buffer length is adequate and does not look - for parameters. */ - ( void ) xWriteBufferLen; - ( void ) pcCommandString; - - /* Generate a table of task stats. */ - strcpy( pcWriteBuffer, pcHeader ); - vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( pcHeader ) ); - - /* There is no more data to return after this single string, so return - pdFALSE. */ - return pdFALSE; -} - - diff --git a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h index 2dca61617..ff78188fd 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c b/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c index d9b7a593d..bda52a958 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c +++ b/FreeRTOS/Demo/WIN32-MSVC/Run-time-stats-utils.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c index ee8219744..c26b641dd 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c index e9ef5fb30..c23eeeb24 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_full.c b/FreeRTOS/Demo/WIN32-MSVC/main_full.c index fddd40303..a73e6459e 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main_full.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c b/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c index d02fb1668..2fddfe251 100644 --- a/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c +++ b/FreeRTOS/Demo/WIN32-MingW/DemosModifiedForLowTickRate/recmutex.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h index 076c72c62..3daa2ccbb 100644 --- a/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c b/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c index bab4ce6eb..44848e823 100644 --- a/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c +++ b/FreeRTOS/Demo/WIN32-MingW/Run-time-stats-utils.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MingW/code_coverage_additions.c b/FreeRTOS/Demo/WIN32-MingW/code_coverage_additions.c index 82ae7d4c6..97d30a96c 100644 --- a/FreeRTOS/Demo/WIN32-MingW/code_coverage_additions.c +++ b/FreeRTOS/Demo/WIN32-MingW/code_coverage_additions.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MingW/main.c b/FreeRTOS/Demo/WIN32-MingW/main.c index 2ccf29ac7..bd136f628 100644 --- a/FreeRTOS/Demo/WIN32-MingW/main.c +++ b/FreeRTOS/Demo/WIN32-MingW/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MingW/main_blinky.c b/FreeRTOS/Demo/WIN32-MingW/main_blinky.c index 5b91bfe75..4d3c60ddb 100644 --- a/FreeRTOS/Demo/WIN32-MingW/main_blinky.c +++ b/FreeRTOS/Demo/WIN32-MingW/main_blinky.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WIN32-MingW/main_full.c b/FreeRTOS/Demo/WIN32-MingW/main_full.c index d444d51e0..e24aacb47 100644 --- a/FreeRTOS/Demo/WIN32-MingW/main_full.c +++ b/FreeRTOS/Demo/WIN32-MingW/main_full.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h index 506ea0899..d29471f51 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c index 6e19c2fda..6a09ec907 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h index c7d384f54..027a505cf 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/HTTP_Serv.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile index 19b193309..9f863a1c4 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/Makefile @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c index 6f46e875d..06feb7956 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h index 3f4112044..be98287c4 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCP.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c index 055b8bc02..05e2fcbee 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/TCPISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h index 458c4e430..5ec7ddb0d 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/html_pages.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c index bfcb4ab2c..395b73dc1 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h index ead034353..733e3ad63 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2c.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c index 7bcc85ce3..9b28354d8 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/i2cISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c index 8f53f9f21..a9d9a2168 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c +++ b/FreeRTOS/Demo/WizNET_DEMO_GCC_ARM7/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h index 1acb0ad37..b91f4b7fe 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c index 1183466e8..eb9a1fa40 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c +++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h index 92ed408de..097e6f3ee 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h +++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/HTTPTask.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c index a856fb7bf..5ad3c8987 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c +++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c index e0fabd6ee..0b22bff2a 100644 --- a/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c +++ b/FreeRTOS/Demo/WizNET_DEMO_TERN_186/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h b/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h index 766baaf15..48517a775 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/dsPIC_MPLAB/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c b/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c index 04ecf2832..cb4720cd0 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c +++ b/FreeRTOS/Demo/dsPIC_MPLAB/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c index f9267b454..21a431ae0 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c +++ b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h index 99a537962..ace730eff 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h +++ b/FreeRTOS/Demo/dsPIC_MPLAB/lcd.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/main.c b/FreeRTOS/Demo/dsPIC_MPLAB/main.c index 462606468..0b269766c 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/main.c +++ b/FreeRTOS/Demo/dsPIC_MPLAB/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c b/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c index 6d1d4646c..c63482f6a 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c +++ b/FreeRTOS/Demo/dsPIC_MPLAB/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c index 5fa0950eb..8b49715fa 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c +++ b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h index 98ffa08eb..f552114d7 100644 --- a/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h +++ b/FreeRTOS/Demo/dsPIC_MPLAB/timertest.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c index 1ca5dfccf..767ee0654 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h index de921ce79..70e04d5b0 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c index 64aa90d94..e8142d8e4 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h index 3f88d789b..f5751f5fd 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c index 1967c0d66..1451f9bae 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h index bc104d096..b7e371fca 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c index f3b7ecbc2..f9e159e6e 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c index d2ada0499..e5831f830 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h index fe70c0201..60d626035 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c index 2f904d36a..72ecda855 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h index 969930a05..3ec9b9e98 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h index 1479acd3c..e73fa9be5 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c index 2c4858cc3..6e77d57b3 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile index c4d2972f3..a75362f2b 100644 --- a/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile +++ b/FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/makefile @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h b/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h index 9287f5cbc..a9cf9f64b 100644 --- a/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/msp430_CrossWorks/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c b/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c index 564829dd7..5feaaae27 100644 --- a/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c +++ b/FreeRTOS/Demo/msp430_CrossWorks/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_CrossWorks/main.c b/FreeRTOS/Demo/msp430_CrossWorks/main.c index a27d2c731..e3d4743d9 100644 --- a/FreeRTOS/Demo/msp430_CrossWorks/main.c +++ b/FreeRTOS/Demo/msp430_CrossWorks/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c b/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c index c2cdb7b64..e90aee7ab 100644 --- a/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c +++ b/FreeRTOS/Demo/msp430_CrossWorks/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm b/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm index fa6c7dbdb..b7417e4ef 100644 --- a/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm +++ b/FreeRTOS/Demo/msp430_CrossWorks/serial/serialASM.asm @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h index 0496120df..db601dd60 100644 --- a/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/msp430_GCC/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c b/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c index c8848a290..16b318acd 100644 --- a/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c +++ b/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_GCC/main.c b/FreeRTOS/Demo/msp430_GCC/main.c index bed2fe183..5567c593b 100644 --- a/FreeRTOS/Demo/msp430_GCC/main.c +++ b/FreeRTOS/Demo/msp430_GCC/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_GCC/makefile b/FreeRTOS/Demo/msp430_GCC/makefile index eed65e8c0..7351116f5 100644 --- a/FreeRTOS/Demo/msp430_GCC/makefile +++ b/FreeRTOS/Demo/msp430_GCC/makefile @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_GCC/serial/serial.c b/FreeRTOS/Demo/msp430_GCC/serial/serial.c index 81796b329..5029ca282 100644 --- a/FreeRTOS/Demo/msp430_GCC/serial/serial.c +++ b/FreeRTOS/Demo/msp430_GCC/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h index edab55cae..53af8809a 100644 --- a/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/msp430_IAR/FreeRTOSConfig.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c b/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c index 564829dd7..5feaaae27 100644 --- a/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c +++ b/FreeRTOS/Demo/msp430_IAR/ParTest/ParTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_IAR/main.c b/FreeRTOS/Demo/msp430_IAR/main.c index 6c3510593..41efa0563 100644 --- a/FreeRTOS/Demo/msp430_IAR/main.c +++ b/FreeRTOS/Demo/msp430_IAR/main.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_IAR/serial/serial.c b/FreeRTOS/Demo/msp430_IAR/serial/serial.c index 32867fccb..e65cf0b5f 100644 --- a/FreeRTOS/Demo/msp430_IAR/serial/serial.c +++ b/FreeRTOS/Demo/msp430_IAR/serial/serial.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43 b/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43 index 871e47d18..8c0214acf 100644 --- a/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43 +++ b/FreeRTOS/Demo/msp430_IAR/serial/serialASM.s43 @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/History.txt b/FreeRTOS/History.txt index 3a22164f5..566db43d7 100644 --- a/FreeRTOS/History.txt +++ b/FreeRTOS/History.txt @@ -1,47 +1,55 @@ Documentation and download available at http://www.FreeRTOS.org/ -Changes since the last release: - + Added xTaskCatchUpTicks() which corrects the tick count value after the - application code has held interrupts disabled for an extended period. - + Updated the xTaskResumeAll() implementation so it uses the new - xTaskCatchUpTicks() function mentioned above to unwind ticks that were - pended while the scheduler was suspended. +Changes between FreeRTOS V10.2.1 and FreeRTOS V10.3.0 released TBD + + See http://www.FreeRTOS.org/FreeRTOS-V10.3.x.html + + New and updated kernel ports: + + + Added RISC-V port for the IAR compiler. + Update the Windows simulator port to use a synchronous object to prevent a user reported error whereby a task continues to run for a short time after being moved to the Blocked state. Note we were not able to - replicate the reported error. - + Added the vPortGetHeapStats() API function which returns information on - the heap_4 and heap_5 state. - + Change type of uxPendedTicks from UBaseType_t to TickType_t to ensure it - has same type as variables it is compared to, and therefore also rename - the variable xPendingTicks. + replicate the reported issue and it likely depends on your CPU model. + Correct alignment of stack top in RISC-V port when - configISR_STACK_SIZE_WORDS is defined to a non zero value. - + RISC-V port updates: The machine timer compare register can now be for - any HART, and correct the sequence used to update the 64-bit machine timer - compare register on 32-bit cores. - + Update Keil projects that use the MPU so memory regions come from linker - script (scatter file) variables instead of being hard coded. + configISR_STACK_SIZE_WORDS is defined to a non zero value, which causes + the interrupt stack to be statically allocated. + + The RISC-V machine timer compare register can now be for any HART, whereas + previously it was always assumed FreeRTOS was running on HART 0. + + Update the sequence used to update the 64-bit machine timer + compare register on 32-bit cores to match that suggested in RISC-V + documentation. + Added tickless low power modes into the ARM, IAR and GCC Cortex-M0 compiler ports. + Updated the behaviour of the ARMv7-M MPU (Memory Protection Unit) ports to match that of the ARMv8-M ports whereby privilege escalations can only originate from within the kernel's own memory segment. Added configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY configuration constant. - + Update existing MPU ports to correctly disable the MPU before it is - updated. - + Added LPC51U68 Cortex-M0+ port for GCC (MCUXpresso), Keil and IAR + + Update existing MPU ports to correctly disable the MPU before it is + updated. + + Added contributed port and demo application for a T-Head (formally C-SKY) + microcontroller. + + New API functions: + + + Added the vPortGetHeapStats() API function which returns information on + the heap_4 and heap_5 state. + + Added xTaskCatchUpTicks(), which corrects the tick count value after the + application code has held interrupts disabled for an extended period. + + Added xTaskNotifyValueClear() API function. + + Added uxTimerGetReloadMode() API function. + + Other miscellaneous changes: + + Change type of uxPendedTicks from UBaseType_t to TickType_t to ensure it + has the same type as variables with which it is compared to, and therefore + also renamed the variable xPendingTicks. + + Update Keil projects that use the MPU so memory regions come from linker + script (scatter file) variables instead of being hard coded. + + Added LPC51U68 Cortex-M0+ demos for GCC (MCUXpresso), Keil and IAR compilers. + Added CORTEX_MPU_STM32L4_Discovery_Keil_STM32Cube demo. - + Added xTaskNotifyValueClear() API function. - + Improve timing accuracy (reduce clock slippage when compared to real time) - in the Windows simulator port by using a waitable timer to determine the - next time slice in place of calls to sleep(). - + Added T-Head demo. + Added LPC54018 MPU demo. - + Added uxTimerGetReloadMode() API function. + Rename xTaskGetIdleRunTimeCounter() to ulTaskGetIdleRunTimeCounter(). - + Added RISC-V port for IAR compiler. Changes between FreeRTOS V10.2.1 and FreeRTOS V10.2.0 released May 13 2019: diff --git a/FreeRTOS/License/license.txt b/FreeRTOS/License/license.txt index 9c59050c5..4b899b24a 100644 --- a/FreeRTOS/License/license.txt +++ b/FreeRTOS/License/license.txt @@ -17,7 +17,7 @@ source file. License text: ------------- -Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to diff --git a/FreeRTOS/Source/croutine.c b/FreeRTOS/Source/croutine.c index 565691b49..69bf614ab 100644 --- a/FreeRTOS/Source/croutine.c +++ b/FreeRTOS/Source/croutine.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/event_groups.c b/FreeRTOS/Source/event_groups.c index 81c1965f9..03cef5bd3 100644 --- a/FreeRTOS/Source/event_groups.c +++ b/FreeRTOS/Source/event_groups.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/FreeRTOS.h b/FreeRTOS/Source/include/FreeRTOS.h index 4df39db39..a621f8a3b 100644 --- a/FreeRTOS/Source/include/FreeRTOS.h +++ b/FreeRTOS/Source/include/FreeRTOS.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/StackMacros.h b/FreeRTOS/Source/include/StackMacros.h index 000d8665c..63efd4d46 100644 --- a/FreeRTOS/Source/include/StackMacros.h +++ b/FreeRTOS/Source/include/StackMacros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/atomic.h b/FreeRTOS/Source/include/atomic.h index e0d0af3a4..d6009f675 100644 --- a/FreeRTOS/Source/include/atomic.h +++ b/FreeRTOS/Source/include/atomic.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/croutine.h b/FreeRTOS/Source/include/croutine.h index 97366e1a3..9bdf8a08f 100644 --- a/FreeRTOS/Source/include/croutine.h +++ b/FreeRTOS/Source/include/croutine.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/deprecated_definitions.h b/FreeRTOS/Source/include/deprecated_definitions.h index 4d0ce0113..e5cb48478 100644 --- a/FreeRTOS/Source/include/deprecated_definitions.h +++ b/FreeRTOS/Source/include/deprecated_definitions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/event_groups.h b/FreeRTOS/Source/include/event_groups.h index 522b0b6c6..70989b0e4 100644 --- a/FreeRTOS/Source/include/event_groups.h +++ b/FreeRTOS/Source/include/event_groups.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/list.h b/FreeRTOS/Source/include/list.h index f6b66baef..51322f216 100644 --- a/FreeRTOS/Source/include/list.h +++ b/FreeRTOS/Source/include/list.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/message_buffer.h b/FreeRTOS/Source/include/message_buffer.h index 745f0b613..9923b330b 100644 --- a/FreeRTOS/Source/include/message_buffer.h +++ b/FreeRTOS/Source/include/message_buffer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/mpu_prototypes.h b/FreeRTOS/Source/include/mpu_prototypes.h index c1fd2b011..ca8763269 100644 --- a/FreeRTOS/Source/include/mpu_prototypes.h +++ b/FreeRTOS/Source/include/mpu_prototypes.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/mpu_wrappers.h b/FreeRTOS/Source/include/mpu_wrappers.h index b131042ad..55a0ba333 100644 --- a/FreeRTOS/Source/include/mpu_wrappers.h +++ b/FreeRTOS/Source/include/mpu_wrappers.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/portable.h b/FreeRTOS/Source/include/portable.h index d2baf14a4..a9cb726dc 100644 --- a/FreeRTOS/Source/include/portable.h +++ b/FreeRTOS/Source/include/portable.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/projdefs.h b/FreeRTOS/Source/include/projdefs.h index dbcf9bb46..19a6b8f3e 100644 --- a/FreeRTOS/Source/include/projdefs.h +++ b/FreeRTOS/Source/include/projdefs.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/queue.h b/FreeRTOS/Source/include/queue.h index b8b6f028f..a0439c520 100644 --- a/FreeRTOS/Source/include/queue.h +++ b/FreeRTOS/Source/include/queue.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/semphr.h b/FreeRTOS/Source/include/semphr.h index 32b4e5ec0..0f01948c7 100644 --- a/FreeRTOS/Source/include/semphr.h +++ b/FreeRTOS/Source/include/semphr.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/stack_macros.h b/FreeRTOS/Source/include/stack_macros.h index fb5ed155c..4f6f5cac5 100644 --- a/FreeRTOS/Source/include/stack_macros.h +++ b/FreeRTOS/Source/include/stack_macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/stream_buffer.h b/FreeRTOS/Source/include/stream_buffer.h index 72fa2d33a..50c782ae5 100644 --- a/FreeRTOS/Source/include/stream_buffer.h +++ b/FreeRTOS/Source/include/stream_buffer.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/task.h b/FreeRTOS/Source/include/task.h index 1ee178ad9..286c5f221 100644 --- a/FreeRTOS/Source/include/task.h +++ b/FreeRTOS/Source/include/task.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/include/timers.h b/FreeRTOS/Source/include/timers.h index 831f389ee..914838467 100644 --- a/FreeRTOS/Source/include/timers.h +++ b/FreeRTOS/Source/include/timers.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/list.c b/FreeRTOS/Source/list.c index 9875b90c9..86b3eced2 100644 --- a/FreeRTOS/Source/list.c +++ b/FreeRTOS/Source/list.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/copy_files.py b/FreeRTOS/Source/portable/ARMv8M/copy_files.py index e99c1b1e6..dbe7f06a4 100644 --- a/FreeRTOS/Source/portable/ARMv8M/copy_files.py +++ b/FreeRTOS/Source/portable/ARMv8M/copy_files.py @@ -1,6 +1,6 @@ #/* -# * FreeRTOS Kernel V10.2.1 -# * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# * FreeRTOS Kernel V10.3.0 +# * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # * # * Permission is hereby granted, free of charge, to any person obtaining a copy of # * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c index f94dcd347..97ce87f94 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h index a73570137..ace80ee88 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c index 8dee923e3..e05e5942d 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portmacro.h index a73570137..ace80ee88 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c index 2aadacc79..ea216bde5 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h index 5ac934cd8..0280956f9 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c index dc5179fb3..2a9f21483 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portmacro.h index c582ecfb3..9a7ed8b42 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portasm.s b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portasm.s index 8ac94fd33..3565ccf42 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portasm.s +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portmacro.h index 14cb37f86..17e5a6941 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portasm.s b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portasm.s index d6a8cb844..5a6377a03 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portasm.s +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portmacro.h index 14cb37f86..17e5a6941 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s index e3b590be9..2514d8ae7 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portmacro.h index c5fb74b6d..04d1cd628 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portasm.s b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portasm.s index aa65b946f..2a7529d11 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portasm.s +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portmacro.h index c5fb74b6d..04d1cd628 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portasm.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM23/secure_context_port.c b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM23/secure_context_port.c index 4e63dd36b..71db598ae 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM23/secure_context_port.c +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM23/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM33/secure_context_port.c b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM33/secure_context_port.c index 245adff79..8d9c8c6c6 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM33/secure_context_port.c +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/GCC/ARM_CM33/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port.c b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port.c index 6df620d5f..4ef68b78a 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port.c +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port_asm.s b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port_asm.s index 947e70adf..669b5b0b2 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port_asm.s +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM23/secure_context_port_asm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port.c b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port.c index 6df620d5f..4ef68b78a 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port.c +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port_asm.s b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port_asm.s index 759a21fa8..a27e5d4df 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port_asm.s +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/portable/IAR/ARM_CM33/secure_context_port_asm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.c b/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.c index 8a422309c..586e1339f 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.c +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.h b/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.h index a98a7d08f..77db8b6c4 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.h +++ b/FreeRTOS/Source/portable/ARMv8M/secure/context/secure_context.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.c b/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.c index c4f613fc5..ab167ab75 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.c +++ b/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.h b/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.h index aae5cfced..6a8452b98 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.h +++ b/FreeRTOS/Source/portable/ARMv8M/secure/heap/secure_heap.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.c b/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.c index 60ef1e822..d46a9365a 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.c +++ b/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.h b/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.h index 3954e13d5..a8c2090b3 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.h +++ b/FreeRTOS/Source/portable/ARMv8M/secure/init/secure_init.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/macros/secure_port_macros.h b/FreeRTOS/Source/portable/ARMv8M/secure/macros/secure_port_macros.h index f392537e3..40e186479 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/macros/secure_port_macros.h +++ b/FreeRTOS/Source/portable/ARMv8M/secure/macros/secure_port_macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c index fc8cca0f5..e9d310622 100644 --- a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c +++ b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h index 834ea3d71..fe0c356eb 100644 --- a/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h +++ b/FreeRTOS/Source/portable/BCC/16BitDOS/Flsh186/prtmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c index 3a7069500..18e24355d 100644 --- a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c +++ b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h index 67fd78c5e..b5ba252ad 100644 --- a/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h +++ b/FreeRTOS/Source/portable/BCC/16BitDOS/PC/prtmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h index ca4d44c55..f62609028 100644 --- a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h +++ b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c index f4d20527c..7fbf38dec 100644 --- a/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c +++ b/FreeRTOS/Source/portable/BCC/16BitDOS/common/portcomn.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM3/port.c b/FreeRTOS/Source/portable/CCS/ARM_CM3/port.c index 57bc6d128..74c51b810 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_CM3/port.c +++ b/FreeRTOS/Source/portable/CCS/ARM_CM3/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM3/portasm.asm b/FreeRTOS/Source/portable/CCS/ARM_CM3/portasm.asm index f79296302..df3818a5a 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_CM3/portasm.asm +++ b/FreeRTOS/Source/portable/CCS/ARM_CM3/portasm.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/CCS/ARM_CM3/portmacro.h index a73c5eb85..f25a529ee 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_CM3/portmacro.h +++ b/FreeRTOS/Source/portable/CCS/ARM_CM3/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c b/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c index fb0f72774..9b8768fc8 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm index 347fe84bf..8068af607 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm +++ b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h index a94ec7d86..88c65329a 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/CCS/ARM_CM4F/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c index 31904d4a2..2e6195e44 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c +++ b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm index fa13b18b1..768f4e427 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm +++ b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portASM.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h index 1257b7d38..2b36d5cbf 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h +++ b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h b/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h index 018a4b009..d45720c82 100644 --- a/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h +++ b/FreeRTOS/Source/portable/CCS/MSP430X/data_model.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/port.c b/FreeRTOS/Source/portable/CCS/MSP430X/port.c index c9087ff82..b4b9b9e3c 100644 --- a/FreeRTOS/Source/portable/CCS/MSP430X/port.c +++ b/FreeRTOS/Source/portable/CCS/MSP430X/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm b/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm index 9e29a5d95..918b7385b 100644 --- a/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm +++ b/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h b/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h index 3a46b018a..767df262c 100644 --- a/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h +++ b/FreeRTOS/Source/portable/CCS/MSP430X/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c index 4d261bcc0..48bfbd74d 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c +++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S index b05e20ec4..ff702faf9 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S +++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h index 0a18bc7c8..804a5050a 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h +++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V1/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c index 605975632..878c886e2 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c +++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S index c20204e18..82581dde1 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S +++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h index a2092cf66..8ff35df1a 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h +++ b/FreeRTOS/Source/portable/CodeWarrior/ColdFire_V2/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c b/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c index b27341cda..24d5dfe23 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c +++ b/FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h b/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h index e28d78870..5dc85750b 100644 --- a/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h +++ b/FreeRTOS/Source/portable/CodeWarrior/HCS12/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Common/mpu_wrappers.c b/FreeRTOS/Source/portable/Common/mpu_wrappers.c index d183e903b..98922cb57 100644 --- a/FreeRTOS/Source/portable/Common/mpu_wrappers.c +++ b/FreeRTOS/Source/portable/Common/mpu_wrappers.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c index 00c694c1d..37c09a6bb 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c index ac1e40f84..9041fe3fd 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h index 6f656658b..4d20e2877 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91FR40008/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c index 426318d44..55d5e1b42 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c index bbd5bde4c..a2613939c 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h index 12117d435..67c105780 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c index 826c7c256..800498a27 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c index ab02033b1..40b61689e 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h index 758bc3688..7d0d0efd1 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c index 49307669b..b2b70ec52 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c index 74b5228dc..ad2e4485c 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c +++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h index 34838f95c..99a1e3f74 100644 --- a/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/port.c b/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/port.c index fdfae40ef..c29aa1ed6 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portASM.S b/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portASM.S index 1b1609a84..f26ad9d4f 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portASM.S +++ b/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portASM.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portmacro.h index 50d154aaf..c16449976 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CA53_64_BIT/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c b/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c index f8c9572df..92cb2df91 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CA9/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S b/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S index f005084d9..a7aba3e6b 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S +++ b/FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h index 6b50588ff..85fca6838 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c index 15a5795ef..f5aed42ec 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h index 9ad565518..63fa8a56c 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c index f94dcd347..97ce87f94 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.h b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portmacro.h index a73570137..ace80ee88 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.c b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.c index 8a422309c..586e1339f 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.h b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.h index a98a7d08f..77db8b6c4 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context_port.c b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context_port.c index 4e63dd36b..71db598ae 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context_port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.c b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.c index c4f613fc5..ab167ab75 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.h b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.h index aae5cfced..6a8452b98 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_heap.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.c b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.c index 60ef1e822..d46a9365a 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.h b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.h index 3954e13d5..a8c2090b3 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_init.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_port_macros.h b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_port_macros.h index f392537e3..40e186479 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_port_macros.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/secure/secure_port_macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c index 8dee923e3..e05e5942d 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.h b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h index a73570137..ace80ee88 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c index abab6c049..505c67cb6 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h index dae91427b..df322022a 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c index 2aadacc79..ea216bde5 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.h b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h index 5ac934cd8..0280956f9 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.c index 8a422309c..586e1339f 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.h b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.h index a98a7d08f..77db8b6c4 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context_port.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context_port.c index 245adff79..8d9c8c6c6 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context_port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.c index c4f613fc5..ab167ab75 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.h b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.h index aae5cfced..6a8452b98 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_heap.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.c index 60ef1e822..d46a9365a 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.h b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.h index 3954e13d5..a8c2090b3 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_init.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_port_macros.h b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_port_macros.h index f392537e3..40e186479 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_port_macros.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/secure/secure_port_macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c index dc5179fb3..2a9f21483 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.h b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h index c582ecfb3..9a7ed8b42 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c index 312500950..6917addca 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h index 54f37e0e1..1b6c9b002 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c index 15e28df57..eca9a3c33 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h index 868d384ca..2a5ca140f 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c index 8f9119c2c..4b7492b33 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/portmacro.h index 54f37e0e1..1b6c9b002 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c index 9806a879a..0d08f234d 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h index 1d7d6537d..d73c5e352 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CR5/port.c b/FreeRTOS/Source/portable/GCC/ARM_CR5/port.c index 626956823..40805e7a2 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CR5/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CR5/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CR5/portASM.S b/FreeRTOS/Source/portable/GCC/ARM_CR5/portASM.S index 8f37686b0..c3dbb9cbe 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CR5/portASM.S +++ b/FreeRTOS/Source/portable/GCC/ARM_CR5/portASM.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CR5/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CR5/portmacro.h index bcb638bea..3d30a5170 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CR5/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CR5/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/port.c b/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/port.c index facc5a80a..ef457bace 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portASM.S b/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portASM.S index d5f022217..07fe3bd1d 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portASM.S +++ b/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portASM.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portmacro.h index 9056b0d59..442187420 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ATMega323/port.c b/FreeRTOS/Source/portable/GCC/ATMega323/port.c index 6220ef021..e8a4aaa49 100644 --- a/FreeRTOS/Source/portable/GCC/ATMega323/port.c +++ b/FreeRTOS/Source/portable/GCC/ATMega323/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h b/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h index a29841f58..9d319c01c 100644 --- a/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ATMega323/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c b/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c index 36a6e2625..71eea04d0 100644 --- a/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c +++ b/FreeRTOS/Source/portable/GCC/AVR32_UC3/port.c @@ -13,8 +13,8 @@ *****************************************************************************/ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h b/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h index fc51cb284..08b25914e 100644 --- a/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h @@ -13,8 +13,8 @@ *****************************************************************************/ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c index ca6adf1ac..4d7eec754 100644 --- a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c +++ b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h index f64199732..b596eb8d5 100644 --- a/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/CORTUS_APS3/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c b/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c index 995c6d98c..ba37c5aae 100644 --- a/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c +++ b/FreeRTOS/Source/portable/GCC/ColdFire_V2/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S index a11608f41..d39ec73d4 100644 --- a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S +++ b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h index 550281f7c..3a32a4c4a 100644 --- a/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ColdFire_V2/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/H8S2329/port.c b/FreeRTOS/Source/portable/GCC/H8S2329/port.c index 88295f9cb..0493974a2 100644 --- a/FreeRTOS/Source/portable/GCC/H8S2329/port.c +++ b/FreeRTOS/Source/portable/GCC/H8S2329/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h b/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h index 147616c46..4a1dc577d 100644 --- a/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/H8S2329/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/HCS12/port.c b/FreeRTOS/Source/portable/GCC/HCS12/port.c index bc3f60dad..5394eedc1 100644 --- a/FreeRTOS/Source/portable/GCC/HCS12/port.c +++ b/FreeRTOS/Source/portable/GCC/HCS12/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h b/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h index 66e9a1821..bb373620d 100644 --- a/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/HCS12/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h b/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h index e45c2748e..610df3458 100644 --- a/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h +++ b/FreeRTOS/Source/portable/GCC/IA32_flat/ISR_Support.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/port.c b/FreeRTOS/Source/portable/GCC/IA32_flat/port.c index 56c0b4cf7..fe8ed90b2 100644 --- a/FreeRTOS/Source/portable/GCC/IA32_flat/port.c +++ b/FreeRTOS/Source/portable/GCC/IA32_flat/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S b/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S index 10394b038..031bc8696 100644 --- a/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S +++ b/FreeRTOS/Source/portable/GCC/IA32_flat/portASM.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h b/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h index eabeeeee3..c7002b6f9 100644 --- a/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/IA32_flat/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MSP430F449/port.c b/FreeRTOS/Source/portable/GCC/MSP430F449/port.c index d84bf9f6a..c6358ded8 100644 --- a/FreeRTOS/Source/portable/GCC/MSP430F449/port.c +++ b/FreeRTOS/Source/portable/GCC/MSP430F449/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h b/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h index 9b5d224f7..6fc4da985 100644 --- a/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/MSP430F449/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c b/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c index 632bbd32d..2d6c61843 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c +++ b/FreeRTOS/Source/portable/GCC/MicroBlaze/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s b/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s index 67cf22c8c..f6f7e3fa0 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s +++ b/FreeRTOS/Source/portable/GCC/MicroBlaze/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h b/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h index d6af7a4a2..74782499e 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/MicroBlaze/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c index ec35a4391..1d0e4289a 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c index 33380c75a..08474a959 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S index 5d6b4b886..99f5c9cf3 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h index f0e6dcf33..14c400c25 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c index 62d3bb151..821421c6a 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port_exceptions.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port_exceptions.c index 33380c75a..08474a959 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port_exceptions.c +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port_exceptions.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portasm.S b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portasm.S index 5d6b4b886..99f5c9cf3 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portasm.S +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portmacro.h b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portmacro.h index f0e6dcf33..14c400c25 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/NiosII/port.c b/FreeRTOS/Source/portable/GCC/NiosII/port.c index ed6d11ae3..4bb0f1249 100644 --- a/FreeRTOS/Source/portable/GCC/NiosII/port.c +++ b/FreeRTOS/Source/portable/GCC/NiosII/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S b/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S index e8691c578..467dd25e1 100644 --- a/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S +++ b/FreeRTOS/Source/portable/GCC/NiosII/port_asm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h b/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h index 9e988ad1c..368a043cf 100644 --- a/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/NiosII/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h index cc99ceea3..ce0ea5afd 100644 --- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h +++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/FPU_Macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c index dd113aea0..3e3788d98 100644 --- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c +++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S index dd855a19e..36fc33203 100644 --- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S +++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h index 7986f2e31..b0b5e17f6 100644 --- a/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/PPC405_Xilinx/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h index cc99ceea3..ce0ea5afd 100644 --- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h +++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/FPU_Macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c index 260ccb915..404b72d67 100644 --- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c +++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S index dd855a19e..36fc33203 100644 --- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S +++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h index 7986f2e31..b0b5e17f6 100644 --- a/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/PPC440_Xilinx/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/Pulpino_Vega_RV32M1RM/freertos_risc_v_chip_specific_extensions.h b/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/Pulpino_Vega_RV32M1RM/freertos_risc_v_chip_specific_extensions.h index f3559b3a9..901581199 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/Pulpino_Vega_RV32M1RM/freertos_risc_v_chip_specific_extensions.h +++ b/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/Pulpino_Vega_RV32M1RM/freertos_risc_v_chip_specific_extensions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h b/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h index 995ec7937..e4c9b6050 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h +++ b/FreeRTOS/Source/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RISC-V/port.c b/FreeRTOS/Source/portable/GCC/RISC-V/port.c index 89b468e99..0b8a286e4 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V/port.c +++ b/FreeRTOS/Source/portable/GCC/RISC-V/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S b/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S index fe142dfc9..fb9825bd6 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S +++ b/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h b/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h index db8bcbf2c..b4f348171 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RL78/isr_support.h b/FreeRTOS/Source/portable/GCC/RL78/isr_support.h index 3265b1894..39be6c9a9 100644 --- a/FreeRTOS/Source/portable/GCC/RL78/isr_support.h +++ b/FreeRTOS/Source/portable/GCC/RL78/isr_support.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RL78/port.c b/FreeRTOS/Source/portable/GCC/RL78/port.c index 3fb8d1234..f501be40d 100644 --- a/FreeRTOS/Source/portable/GCC/RL78/port.c +++ b/FreeRTOS/Source/portable/GCC/RL78/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RL78/portasm.S b/FreeRTOS/Source/portable/GCC/RL78/portasm.S index 275f6b932..0f4d9e91a 100644 --- a/FreeRTOS/Source/portable/GCC/RL78/portasm.S +++ b/FreeRTOS/Source/portable/GCC/RL78/portasm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RL78/portmacro.h b/FreeRTOS/Source/portable/GCC/RL78/portmacro.h index d2231efea..9043129e2 100644 --- a/FreeRTOS/Source/portable/GCC/RL78/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/RL78/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RX100/port.c b/FreeRTOS/Source/portable/GCC/RX100/port.c index 6fd49c804..d5d218747 100644 --- a/FreeRTOS/Source/portable/GCC/RX100/port.c +++ b/FreeRTOS/Source/portable/GCC/RX100/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RX100/portmacro.h b/FreeRTOS/Source/portable/GCC/RX100/portmacro.h index 97bed4a29..ae1af6264 100644 --- a/FreeRTOS/Source/portable/GCC/RX100/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/RX100/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RX600/port.c b/FreeRTOS/Source/portable/GCC/RX600/port.c index bafb47f38..4d81f288e 100644 --- a/FreeRTOS/Source/portable/GCC/RX600/port.c +++ b/FreeRTOS/Source/portable/GCC/RX600/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RX600/portmacro.h b/FreeRTOS/Source/portable/GCC/RX600/portmacro.h index 0bafa1e29..f03e8ad78 100644 --- a/FreeRTOS/Source/portable/GCC/RX600/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/RX600/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RX600v2/port.c b/FreeRTOS/Source/portable/GCC/RX600v2/port.c index 809a194d7..d15c39376 100644 --- a/FreeRTOS/Source/portable/GCC/RX600v2/port.c +++ b/FreeRTOS/Source/portable/GCC/RX600v2/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h b/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h index 0bafa1e29..f03e8ad78 100644 --- a/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/RX600v2/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/STR75x/port.c b/FreeRTOS/Source/portable/GCC/STR75x/port.c index 175f359b5..86d4deb1e 100644 --- a/FreeRTOS/Source/portable/GCC/STR75x/port.c +++ b/FreeRTOS/Source/portable/GCC/STR75x/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/STR75x/portISR.c b/FreeRTOS/Source/portable/GCC/STR75x/portISR.c index 748830702..9c6b4e99d 100644 --- a/FreeRTOS/Source/portable/GCC/STR75x/portISR.c +++ b/FreeRTOS/Source/portable/GCC/STR75x/portISR.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h b/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h index 219aac92c..b03bed1c3 100644 --- a/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c index 686129a84..26eb6902e 100644 --- a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c +++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h index f47e84e27..df0ada57a 100644 --- a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c b/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c index 672edc046..736f5e62a 100644 --- a/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c +++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h b/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h index 4d322f331..b05182b81 100644 --- a/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/78K0R/ISR_Support.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/78K0R/port.c b/FreeRTOS/Source/portable/IAR/78K0R/port.c index 18fc494c3..ea09bdb85 100644 --- a/FreeRTOS/Source/portable/IAR/78K0R/port.c +++ b/FreeRTOS/Source/portable/IAR/78K0R/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26 b/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26 index aa49f1a65..69f958a48 100644 --- a/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26 +++ b/FreeRTOS/Source/portable/IAR/78K0R/portasm.s26 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h b/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h index 4267246c5..3914b5323 100644 --- a/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/78K0R/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/port.c b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/port.c index 1171f8a24..700df6846 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.h b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.h index d079fc05f..a82dbe755 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.s b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.s index 674049c19..9a489052b 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portASM.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portmacro.h index f5ae85321..6c60c5bee 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CA5_No_GIC/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c b/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c index 69d8723ad..372f8d65f 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h index 7c15091d3..adc1d5636 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s index d50e561b7..8dd55248f 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/portASM.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h index 4f6c3038f..d09373136 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CA9/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c index 08b59f3d4..6aa408dd3 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s index 76f48c4b2..9afd90698 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM0/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h index 8103f9cc1..b01d1bbbc 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM0/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.h b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.s index 8ac94fd33..3565ccf42 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portmacro.h index 14cb37f86..17e5a6941 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.c b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.c index 8a422309c..586e1339f 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.h b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.h index a98a7d08f..77db8b6c4 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port.c b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port.c index 6df620d5f..4ef68b78a 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port_asm.s b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port_asm.s index 947e70adf..669b5b0b2 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port_asm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_context_port_asm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.c b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.c index c4f613fc5..ab167ab75 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.h b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.h index aae5cfced..6a8452b98 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_heap.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.c b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.c index 60ef1e822..d46a9365a 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.h b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.h index 3954e13d5..a8c2090b3 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_init.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_port_macros.h b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_port_macros.h index f392537e3..40e186479 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_port_macros.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23/secure/secure_port_macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.h b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.s index d6a8cb844..5a6377a03 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portmacro.h index 14cb37f86..17e5a6941 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM23_NTZ/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c index c8f2a59fb..67fa5dd18 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s index f91e1a6d9..2040a9616 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h index 23510e17c..70380763d 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.h b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.s index a134120f0..bffed0e93 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h index c5fb74b6d..04d1cd628 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.c b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.c index 8a422309c..586e1339f 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.h b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.h index a98a7d08f..77db8b6c4 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port.c b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port.c index 6df620d5f..4ef68b78a 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port_asm.s b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port_asm.s index 759a21fa8..a27e5d4df 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port_asm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_context_port_asm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.c b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.c index c4f613fc5..ab167ab75 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.h b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.h index aae5cfced..6a8452b98 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_heap.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.c b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.c index 60ef1e822..d46a9365a 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.h b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.h index 3954e13d5..a8c2090b3 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_init.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_port_macros.h b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_port_macros.h index f392537e3..40e186479 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_port_macros.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/secure/secure_port_macros.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c index 6ffab561f..108eb52dc 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.h b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.h index 8fc58eab2..cc2562f27 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.s index e7c888e7c..ad5e0f86a 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h index c5fb74b6d..04d1cd628 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c index 2a2b66e66..89d5691b6 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s index 8f37baa48..df7e614a5 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h index 1d442a8f7..b2fea955b 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/port.c index b4cc0b53c..c5380285d 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portasm.s index d223de62b..000fb6d6d 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portmacro.h index f0e759fec..4df3372c8 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c index 9bff8ed7d..30d9f7064 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s index 37ac1a7c3..410e6df4d 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h index d98d67a2a..14d46cc12 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/port.c b/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/port.c index 85ce365d9..3328fdabb 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portASM.s b/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portASM.s index 5c9add72c..120c1d306 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portASM.s +++ b/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portASM.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portmacro.h index b6c075ce2..d8ee4596c 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CRx_No_GIC/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/port.c b/FreeRTOS/Source/portable/IAR/ATMega323/port.c index 0914f40c7..2a7dc18d6 100644 --- a/FreeRTOS/Source/portable/IAR/ATMega323/port.c +++ b/FreeRTOS/Source/portable/IAR/ATMega323/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h index 20acd2c06..c4a526e50 100644 --- a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90 b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90 index 6e33f484b..8d34de973 100644 --- a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90 +++ b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c b/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c index 61f941e5b..683413814 100644 --- a/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c +++ b/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c @@ -13,8 +13,8 @@ *****************************************************************************/ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h b/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h index de74a38ab..d93c6af45 100644 --- a/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/AVR32_UC3/portmacro.h @@ -13,8 +13,8 @@ *****************************************************************************/ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h index 18e0b3bf0..cb259739b 100644 --- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/ISR_Support.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c index 56842e432..1e6bdb640 100644 --- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c +++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79 b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79 index 9af364fb0..d54dc60c5 100644 --- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79 +++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h index 5fdf4f2ad..f8a350997 100644 --- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c index 54361b987..da9447733 100644 --- a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c +++ b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h index 7fe236dd5..e62170fc6 100644 --- a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h b/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h index 18e0b3bf0..cb259739b 100644 --- a/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/LPC2000/ISR_Support.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/port.c b/FreeRTOS/Source/portable/IAR/LPC2000/port.c index 371a74a80..0dee06690 100644 --- a/FreeRTOS/Source/portable/IAR/LPC2000/port.c +++ b/FreeRTOS/Source/portable/IAR/LPC2000/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79 b/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79 index 6036e3ed1..be27d041d 100644 --- a/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79 +++ b/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h b/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h index 7ebcbe89e..9261b873b 100644 --- a/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/LPC2000/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430/port.c b/FreeRTOS/Source/portable/IAR/MSP430/port.c index 605c7c705..84de5e844 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430/port.c +++ b/FreeRTOS/Source/portable/IAR/MSP430/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430/portasm.h b/FreeRTOS/Source/portable/IAR/MSP430/portasm.h index bb5da676c..eaeb0090e 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430/portasm.h +++ b/FreeRTOS/Source/portable/IAR/MSP430/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430/portext.s43 b/FreeRTOS/Source/portable/IAR/MSP430/portext.s43 index ace7e5cd3..8585b9d98 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430/portext.s43 +++ b/FreeRTOS/Source/portable/IAR/MSP430/portext.s43 @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h b/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h index 728c17dd4..c0a815636 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/MSP430/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h b/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h index e03a16bfa..b9ee5bdaa 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h +++ b/FreeRTOS/Source/portable/IAR/MSP430X/data_model.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/port.c b/FreeRTOS/Source/portable/IAR/MSP430X/port.c index c8d63dae1..90eeb70b6 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430X/port.c +++ b/FreeRTOS/Source/portable/IAR/MSP430X/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43 b/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43 index eef44545c..57fe37037 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43 +++ b/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43 @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h b/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h index d5719fe18..423a4013c 100644 --- a/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/MSP430X/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h b/FreeRTOS/Source/portable/IAR/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h index dda6f3f6d..3445be151 100644 --- a/FreeRTOS/Source/portable/IAR/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h +++ b/FreeRTOS/Source/portable/IAR/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions/freertos_risc_v_chip_specific_extensions.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RISC-V/port.c b/FreeRTOS/Source/portable/IAR/RISC-V/port.c index 985c9f099..f100b5e8d 100644 --- a/FreeRTOS/Source/portable/IAR/RISC-V/port.c +++ b/FreeRTOS/Source/portable/IAR/RISC-V/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RISC-V/portASM.s b/FreeRTOS/Source/portable/IAR/RISC-V/portASM.s index 473725fa3..cfc3a63bd 100644 --- a/FreeRTOS/Source/portable/IAR/RISC-V/portASM.s +++ b/FreeRTOS/Source/portable/IAR/RISC-V/portASM.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RISC-V/portmacro.h b/FreeRTOS/Source/portable/IAR/RISC-V/portmacro.h index 19116dbc0..5ab4629b3 100644 --- a/FreeRTOS/Source/portable/IAR/RISC-V/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/RISC-V/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h b/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h index d9aeb9588..4e73aa99b 100644 --- a/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/RL78/ISR_Support.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RL78/port.c b/FreeRTOS/Source/portable/IAR/RL78/port.c index 84bfabd03..60906171d 100644 --- a/FreeRTOS/Source/portable/IAR/RL78/port.c +++ b/FreeRTOS/Source/portable/IAR/RL78/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RL78/portasm.s87 b/FreeRTOS/Source/portable/IAR/RL78/portasm.s87 index 8e30f01e5..2ab0844c1 100644 --- a/FreeRTOS/Source/portable/IAR/RL78/portasm.s87 +++ b/FreeRTOS/Source/portable/IAR/RL78/portasm.s87 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RL78/portmacro.h b/FreeRTOS/Source/portable/IAR/RL78/portmacro.h index 9261badf1..1ab3fadc4 100644 --- a/FreeRTOS/Source/portable/IAR/RL78/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/RL78/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RX100/port.c b/FreeRTOS/Source/portable/IAR/RX100/port.c index f9e9dbc70..de76a4863 100644 --- a/FreeRTOS/Source/portable/IAR/RX100/port.c +++ b/FreeRTOS/Source/portable/IAR/RX100/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RX100/port_asm.s b/FreeRTOS/Source/portable/IAR/RX100/port_asm.s index 69d3178b0..7c8b519fb 100644 --- a/FreeRTOS/Source/portable/IAR/RX100/port_asm.s +++ b/FreeRTOS/Source/portable/IAR/RX100/port_asm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RX100/portmacro.h b/FreeRTOS/Source/portable/IAR/RX100/portmacro.h index 324e98889..6a24c47fb 100644 --- a/FreeRTOS/Source/portable/IAR/RX100/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/RX100/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RX600/port.c b/FreeRTOS/Source/portable/IAR/RX600/port.c index 7f8f4ccb1..14f53919d 100644 --- a/FreeRTOS/Source/portable/IAR/RX600/port.c +++ b/FreeRTOS/Source/portable/IAR/RX600/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RX600/port_asm.s b/FreeRTOS/Source/portable/IAR/RX600/port_asm.s index c66e99ec3..5734f7f77 100644 --- a/FreeRTOS/Source/portable/IAR/RX600/port_asm.s +++ b/FreeRTOS/Source/portable/IAR/RX600/port_asm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RX600/portmacro.h b/FreeRTOS/Source/portable/IAR/RX600/portmacro.h index e8696006a..1ffcd733f 100644 --- a/FreeRTOS/Source/portable/IAR/RX600/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/RX600/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RXv2/port.c b/FreeRTOS/Source/portable/IAR/RXv2/port.c index 484d71a2b..7bd4994b0 100644 --- a/FreeRTOS/Source/portable/IAR/RXv2/port.c +++ b/FreeRTOS/Source/portable/IAR/RXv2/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RXv2/port_asm.s b/FreeRTOS/Source/portable/IAR/RXv2/port_asm.s index 3c4ef17c2..dcc624e6a 100644 --- a/FreeRTOS/Source/portable/IAR/RXv2/port_asm.s +++ b/FreeRTOS/Source/portable/IAR/RXv2/port_asm.s @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/RXv2/portmacro.h b/FreeRTOS/Source/portable/IAR/RXv2/portmacro.h index f260ab47d..9d4649795 100644 --- a/FreeRTOS/Source/portable/IAR/RXv2/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/RXv2/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h b/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h index 18e0b3bf0..cb259739b 100644 --- a/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/STR71x/ISR_Support.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR71x/port.c b/FreeRTOS/Source/portable/IAR/STR71x/port.c index ed06217d5..8945cb307 100644 --- a/FreeRTOS/Source/portable/IAR/STR71x/port.c +++ b/FreeRTOS/Source/portable/IAR/STR71x/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79 b/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79 index 59afb026d..184ab43ad 100644 --- a/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79 +++ b/FreeRTOS/Source/portable/IAR/STR71x/portasm.s79 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h b/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h index 2cf720faa..347320be0 100644 --- a/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/STR71x/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h b/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h index 18e0b3bf0..cb259739b 100644 --- a/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/STR75x/ISR_Support.h @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR75x/port.c b/FreeRTOS/Source/portable/IAR/STR75x/port.c index 0d68bcc3c..39cbdc959 100644 --- a/FreeRTOS/Source/portable/IAR/STR75x/port.c +++ b/FreeRTOS/Source/portable/IAR/STR75x/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79 b/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79 index eac9c4b98..fb6d0f36a 100644 --- a/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79 +++ b/FreeRTOS/Source/portable/IAR/STR75x/portasm.s79 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h b/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h index 4a20cf139..fa991da63 100644 --- a/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/STR75x/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h b/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h index f9a64662c..6b2e7db8f 100644 --- a/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/STR91x/ISR_Support.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR91x/port.c b/FreeRTOS/Source/portable/IAR/STR91x/port.c index 2a4c44e81..45d3d1948 100644 --- a/FreeRTOS/Source/portable/IAR/STR91x/port.c +++ b/FreeRTOS/Source/portable/IAR/STR91x/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79 b/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79 index 8ee30f73c..74582a667 100644 --- a/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79 +++ b/FreeRTOS/Source/portable/IAR/STR91x/portasm.s79 @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h b/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h index ba6391608..d55378df8 100644 --- a/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/STR91x/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h b/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h index 8ee843a43..eff83e419 100644 --- a/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h +++ b/FreeRTOS/Source/portable/IAR/V850ES/ISR_Support.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/V850ES/port.c b/FreeRTOS/Source/portable/IAR/V850ES/port.c index b6e75806c..d4c123141 100644 --- a/FreeRTOS/Source/portable/IAR/V850ES/port.c +++ b/FreeRTOS/Source/portable/IAR/V850ES/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85 index f1393b38c..7512da089 100644 --- a/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85 +++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85 index 62cf09fdc..4bb2cef18 100644 --- a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85 +++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85 index 4be6fb317..5436afe89 100644 --- a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85 +++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85 @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h b/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h index 5a976243e..8a9d9d096 100644 --- a/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/V850ES/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c b/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c index 8a2919d7c..5bd805575 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c +++ b/FreeRTOS/Source/portable/MPLAB/PIC18F/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h index e238b8f05..09ae9f912 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC18F/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c index 386197530..b161d76e0 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c +++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S index 83b58033f..01bc3cc52 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S +++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S index e1fc2edd4..b4dd1d408 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S +++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_dsPIC.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h index 7605e1b27..3d70c54fb 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/ISR_Support.h b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/ISR_Support.h index 8b69cb639..609a7aa55 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/ISR_Support.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/ISR_Support.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port.c b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port.c index 261fb6982..7afb23d14 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port.c +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port_asm.S b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port_asm.S index 15c55f4f4..213b7a485 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port_asm.S +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/port_asm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/portmacro.h index 179165b8f..c2122f2ff 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/portmacro.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MEC14xx/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h b/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h index 043a6fcd9..09f43b52d 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c index 75e1a12a2..65d23842c 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S index f47b1b22f..c9ba467be 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h index b53fd649d..3bf8c85ce 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h index 9a570bb3f..f60c8dbc6 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c index 3e1f6552e..e2241499f 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S index 58d8e4065..1e41c1266 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h index 061b901af..a66e07488 100644 --- a/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h +++ b/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MSVC-MingW/port.c b/FreeRTOS/Source/portable/MSVC-MingW/port.c index ec2341748..bd5f7d5f4 100644 --- a/FreeRTOS/Source/portable/MSVC-MingW/port.c +++ b/FreeRTOS/Source/portable/MSVC-MingW/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -456,8 +456,8 @@ CONTEXT xContext; /* Ensure the thread is actually suspended by performing a synchronous operation that can only complete when the thread is - actually suspended. The code below asks for dummy register - data. Experimentation shows that these two lines don't appear + actually suspended. The below code asks for dummy register + data. Experimentation shows that these two lines don't appear to do anything now, but according to https://devblogs.microsoft.com/oldnewthing/20150205-00/?p=44743 they do - so as they do not harm (slight run-time hit). */ diff --git a/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h b/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h index 51b96f2fc..eab64499a 100644 --- a/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h +++ b/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MemMang/heap_1.c b/FreeRTOS/Source/portable/MemMang/heap_1.c index 137733ade..89e86dd76 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_1.c +++ b/FreeRTOS/Source/portable/MemMang/heap_1.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MemMang/heap_2.c b/FreeRTOS/Source/portable/MemMang/heap_2.c index 2c5ceb8ed..561425506 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_2.c +++ b/FreeRTOS/Source/portable/MemMang/heap_2.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MemMang/heap_3.c b/FreeRTOS/Source/portable/MemMang/heap_3.c index c391d463e..c81924bc4 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_3.c +++ b/FreeRTOS/Source/portable/MemMang/heap_3.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MemMang/heap_4.c b/FreeRTOS/Source/portable/MemMang/heap_4.c index b1d8fc894..911d4f9a5 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_4.c +++ b/FreeRTOS/Source/portable/MemMang/heap_4.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MemMang/heap_5.c b/FreeRTOS/Source/portable/MemMang/heap_5.c index cf814d116..196021b3f 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_5.c +++ b/FreeRTOS/Source/portable/MemMang/heap_5.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c b/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c index bd9e1e574..4af7f35a3 100644 --- a/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/MikroC/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/MikroC/ARM_CM4F/portmacro.h index 2931cbcad..10a0898d6 100644 --- a/FreeRTOS/Source/portable/MikroC/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/MikroC/ARM_CM4F/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/port.c b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/port.c index 442af3334..b5783ba6f 100644 --- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/port.c +++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portasm.h b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portasm.h index e19fc8365..4d3f58dc4 100644 --- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portasm.h +++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portmacro.h b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portmacro.h index 4b0f367d6..75d352ea7 100644 --- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portmacro.h +++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/large_untested/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c index e28b3cabe..cefe48de1 100644 --- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c +++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h index 723cc2131..5b2cc7948 100644 --- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h +++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h index 79231c006..4d3070019 100644 --- a/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h +++ b/FreeRTOS/Source/portable/Paradigm/Tern_EE/small/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c index 470577124..c51f81fea 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s index dadcafa1f..87ba9af5a 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s +++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h index 44bb6014a..b6a749e32 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc index 268a024cc..dd999d386 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc +++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portmacro.inc @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c index c68d4bd73..75ae72499 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s index 84ff0d6db..d949291e7 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s +++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h index cf75bdc3a..be6f9f96d 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc index eb7840114..251e7e2f2 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc +++ b/FreeRTOS/Source/portable/RVDS/ARM_CA9/portmacro.inc @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c index 79e8b4d46..b40d6cb21 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h index 5f3b9f44e..77f9dd271 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM0/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c index 6e4e77f97..f30000291 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM3/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h index 90173ee9d..b82efa933 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM3/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c index 99ffeaa39..067715d4a 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h index 90173ee9d..b82efa933 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c index 0d92e0b31..d031d9d06 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/portmacro.h index 431ea4c31..44be29807 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c index fa63025a2..348ee0fe8 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h index 30ef19f47..cff106843 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX100/port.c b/FreeRTOS/Source/portable/Renesas/RX100/port.c index 67cea4de0..344453a0f 100644 --- a/FreeRTOS/Source/portable/Renesas/RX100/port.c +++ b/FreeRTOS/Source/portable/Renesas/RX100/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src index 6a154ea41..1041e2d7d 100644 --- a/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src +++ b/FreeRTOS/Source/portable/Renesas/RX100/port_asm.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h index fd0f1979c..9319e6f1d 100644 --- a/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h +++ b/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX200/port.c b/FreeRTOS/Source/portable/Renesas/RX200/port.c index e3f24bd19..f35d757bc 100644 --- a/FreeRTOS/Source/portable/Renesas/RX200/port.c +++ b/FreeRTOS/Source/portable/Renesas/RX200/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src index 6a154ea41..1041e2d7d 100644 --- a/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src +++ b/FreeRTOS/Source/portable/Renesas/RX200/port_asm.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h index 84ab8c3cc..8c670f22a 100644 --- a/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h +++ b/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX600/port.c b/FreeRTOS/Source/portable/Renesas/RX600/port.c index 1ffdd2d0c..eb0176371 100644 --- a/FreeRTOS/Source/portable/Renesas/RX600/port.c +++ b/FreeRTOS/Source/portable/Renesas/RX600/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src index 6a154ea41..1041e2d7d 100644 --- a/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src +++ b/FreeRTOS/Source/portable/Renesas/RX600/port_asm.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h index 1d6414b37..c6d134330 100644 --- a/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h +++ b/FreeRTOS/Source/portable/Renesas/RX600/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX600v2/port.c b/FreeRTOS/Source/portable/Renesas/RX600v2/port.c index 64fbf837e..c94ecbbf6 100644 --- a/FreeRTOS/Source/portable/Renesas/RX600v2/port.c +++ b/FreeRTOS/Source/portable/Renesas/RX600v2/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src b/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src index c0bc9e235..e13a84ff3 100644 --- a/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src +++ b/FreeRTOS/Source/portable/Renesas/RX600v2/port_asm.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h index 6d143142b..78596b61a 100644 --- a/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h +++ b/FreeRTOS/Source/portable/Renesas/RX600v2/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc index e0a5996c2..e216a07c8 100644 --- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc +++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/ISR_Support.inc @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c index 8c4d50a97..2178e349c 100644 --- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c +++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src index 3bcdb5f28..9bf7e1dae 100644 --- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src +++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portasm.src @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h index 009f2b0fd..18d9b87f0 100644 --- a/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h +++ b/FreeRTOS/Source/portable/Renesas/SH2A_FPU/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c b/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c index 6c0fdddcd..92ff29dc6 100644 --- a/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c +++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h b/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h index 129847b94..6c7a45ecc 100644 --- a/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h +++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm b/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm index b4792d1d8..3dfdef9a9 100644 --- a/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm +++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/portext.asm @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h b/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h index 52eebf91f..c93e154c4 100644 --- a/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h +++ b/FreeRTOS/Source/portable/Rowley/MSP430F449/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/SDCC/Cygnal/port.c b/FreeRTOS/Source/portable/SDCC/Cygnal/port.c index eb1a08e36..05134aaec 100644 --- a/FreeRTOS/Source/portable/SDCC/Cygnal/port.c +++ b/FreeRTOS/Source/portable/SDCC/Cygnal/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h b/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h index 45197f84e..e595ed1f3 100644 --- a/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h +++ b/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Softune/MB91460/port.c b/FreeRTOS/Source/portable/Softune/MB91460/port.c index 424610691..629e6a17e 100644 --- a/FreeRTOS/Source/portable/Softune/MB91460/port.c +++ b/FreeRTOS/Source/portable/Softune/MB91460/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h b/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h index ed2ac6724..54a520b1a 100644 --- a/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h +++ b/FreeRTOS/Source/portable/Softune/MB91460/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Softune/MB96340/port.c b/FreeRTOS/Source/portable/Softune/MB96340/port.c index 8ceabc5f1..49b444a64 100644 --- a/FreeRTOS/Source/portable/Softune/MB96340/port.c +++ b/FreeRTOS/Source/portable/Softune/MB96340/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h b/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h index 2e14db827..407c39065 100644 --- a/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h +++ b/FreeRTOS/Source/portable/Softune/MB96340/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c index a141d3377..2aa1ab71b 100644 --- a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c +++ b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm index c8204b88e..6b47555fa 100644 --- a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm +++ b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm @@ -1,6 +1,6 @@ ;/* -; * FreeRTOS Kernel V10.2.1 -; * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +; * FreeRTOS Kernel V10.3.0 +; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. ; * ; * Permission is hereby granted, free of charge, to any person obtaining a copy of ; * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h index a2d421ca9..a45b26880 100644 --- a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c index a7e937bd2..a7930b3f0 100644 --- a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c +++ b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/Tick.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c index 29b7d04e2..4b4bb30ad 100644 --- a/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c +++ b/FreeRTOS/Source/portable/WizC/PIC18/Drivers/Tick/isrTick.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h b/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h index 02729db39..f9e17896f 100644 --- a/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h +++ b/FreeRTOS/Source/portable/WizC/PIC18/addFreeRTOS.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/WizC/PIC18/port.c b/FreeRTOS/Source/portable/WizC/PIC18/port.c index c999f8729..549bd57cc 100644 --- a/FreeRTOS/Source/portable/WizC/PIC18/port.c +++ b/FreeRTOS/Source/portable/WizC/PIC18/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h b/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h index da73925ab..521148a8f 100644 --- a/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h +++ b/FreeRTOS/Source/portable/WizC/PIC18/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c index 18e88bcc9..a598ed0a0 100644 --- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c +++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h index 59a36ccd1..ebd04edf9 100644 --- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h +++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/Flsh186/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c index 4f9410f83..27f30d3af 100644 --- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c +++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/port.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h index 5e3af2cc7..3684e02e3 100644 --- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h +++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/PC/portmacro.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h index 864f91037..8e03df17f 100644 --- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h +++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portasm.h @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c index 81f810851..787843cd5 100644 --- a/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c +++ b/FreeRTOS/Source/portable/oWatcom/16BitDOS/common/portcomn.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/queue.c b/FreeRTOS/Source/queue.c index eacc69c3f..474fd3462 100644 --- a/FreeRTOS/Source/queue.c +++ b/FreeRTOS/Source/queue.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/stream_buffer.c b/FreeRTOS/Source/stream_buffer.c index 8cda238d3..ec7b3e365 100644 --- a/FreeRTOS/Source/stream_buffer.c +++ b/FreeRTOS/Source/stream_buffer.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index e6efe7f8b..f426a6faa 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/FreeRTOS/Source/timers.c b/FreeRTOS/Source/timers.c index 12a2f4e9b..bfcc4eaff 100644 --- a/FreeRTOS/Source/timers.c +++ b/FreeRTOS/Source/timers.c @@ -1,6 +1,6 @@ /* - * FreeRTOS Kernel V10.2.1 - * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS Kernel V10.3.0 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in diff --git a/Upgrading to FreeRTOS V10.3.0.url b/Upgrading to FreeRTOS V10.3.0.url deleted file mode 100644 index a30f01875..000000000 --- a/Upgrading to FreeRTOS V10.3.0.url +++ /dev/null @@ -1,5 +0,0 @@ -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,11 -[InternetShortcut] -IDList= -URL=https://www.freertos.org/FreeRTOS-V10.3.x.html -- 2.39.5